:root {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --ink: #18231f;
  --muted: #56635d;
  --line: #d3dcd7;
  --primary: #0e5a4a;
  --primary-ink: #ffffff;
  --primary-hover: #0a4739;
  --marigold: #e8a317;
  --danger: #b3261e;
  --danger-bg: #fbeceb;
  --ok: #1d7a4f;
  --ok-bg: #e6f3ec;
  --wait-bg: #fdf3dc;
  --wait-ink: #7a5300;
  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101714;
    --surface: #17211d;
    --ink: #e7eeea;
    --muted: #a3b1aa;
    --line: #2c3a34;
    --primary: #5fc2a6;
    --primary-ink: #0b1a15;
    --primary-hover: #7fd3bb;
    --marigold: #f2b83a;
    --danger: #ff8a80;
    --danger-bg: #3a1c1a;
    --ok: #74d3a3;
    --ok-bg: #16302a;
    --wait-bg: #3a2e12;
    --wait-ink: #f5cf7a;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}

a { color: var(--primary); text-underline-offset: 0.18em; }
a:hover { color: var(--primary-hover); }

:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* The woven band: a kanga-cloth border, the one decorative element of the product. */
.band {
  background:
    repeating-linear-gradient(135deg, var(--marigold) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(45deg, #ffffff22 0 6px, transparent 6px 12px),
    #0b4a3d;
}

/* ---------------------------------------------------------------- auth layout */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
}

.auth-panel {
  position: relative;
  background: #0e5a4a;
  color: #f4f8f6;
  padding: 1.25rem 1rem 1.5rem;
}
.auth-panel .band {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
}
.auth-panel h1,
.auth-panel .facts { display: none; }

.auth-main {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 28rem;
}

@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(20rem, 5fr) 7fr; grid-template-rows: 1fr; }
  .auth-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 2.5rem 3.5rem 2.5rem 3rem;
    display: flex;
    flex-direction: column;
  }
  .auth-panel .band {
    left: auto; top: 0; bottom: 0; right: 0;
    width: 14px; height: auto;
  }
  .auth-panel h1 {
    display: block;
    margin: auto 0 1.75rem;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2.25rem, 3.4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    max-width: 14ch;
  }
  .auth-panel .facts {
    display: block;
    margin: 0 0 auto;
    padding: 0;
    list-style: none;
    max-width: 30ch;
  }
  .auth-panel .facts li {
    padding: 0.85rem 0;
    border-top: 1px solid #ffffff2e;
    color: #d8e6e0;
  }
  .auth-panel .facts strong { color: #ffffff; font-weight: 600; }
  .auth-main { align-items: center; padding: 3rem 2rem; }
}

/* ---------------------------------------------------------------- headings and text */

.page-title {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.15;
}
.lede { margin: 0 0 1.75rem; color: var(--muted); max-width: 60ch; }

/* ---------------------------------------------------------------- forms */

form { margin: 0; }

fieldset {
  border: 0;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}
legend {
  padding: 0 0.5rem 0 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.field { margin: 0 0 1rem; }
.field-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr 1fr; } }

label {
  display: block;
  margin: 0 0 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.optional { font-weight: 400; color: var(--muted); }

input, select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
input:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--primary); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }

.hint { margin: 0.3rem 0 0; font-size: 0.875rem; color: var(--muted); }
.field-error { margin: 0.3rem 0 0; font-size: 0.875rem; color: var(--danger); font-weight: 600; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 4.5rem; }
.reveal {
  position: absolute;
  right: 0.35rem; top: 50%;
  transform: translateY(-50%);
  min-height: 2rem;
  padding: 0 0.6rem;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
}

.actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.button.secondary { background: transparent; color: var(--primary); }
.button.secondary:hover { background: var(--ok-bg); color: var(--primary); }
.button[disabled], .button[aria-disabled="true"] {
  cursor: not-allowed;
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
}
.button.wide { width: 100%; }

.switch-link { margin: 1.5rem 0 0; color: var(--muted); }

/* ---------------------------------------------------------------- notices */

.notice {
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--primary);
  background: var(--ok-bg);
  border-radius: 0 6px 6px 0;
}
.notice.error { border-left-color: var(--danger); background: var(--danger-bg); }
.notice p { margin: 0; }
.notice p + p { margin-top: 0.4rem; }

.done-panel h2 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.6rem;
}
.done-panel p { margin: 0 0 1rem; max-width: 52ch; }

/* ---------------------------------------------------------------- app shell (signed in) */

.topbar {
  position: relative;
  background: #0e5a4a;
  color: #f4f8f6;
}
.topbar-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.85rem 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar .band { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; }
.topbar .who { display: flex; align-items: center; gap: 1rem; font-size: 0.95rem; }
.topbar .who span { color: #d8e6e0; }
.topbar .button.secondary { color: #ffffff; border-color: #ffffff80; min-height: 2.25rem; padding: 0.3rem 0.9rem; }
.topbar .button.secondary:hover { background: #ffffff1f; color: #ffffff; }
@media (max-width: 599px) { .topbar .who span { display: none; } }

.app-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.25rem 1rem 4rem;
}

.org-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}
.org-meta { margin: 0.4rem 0 2.25rem; color: var(--muted); }

.home-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .home-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }

.section-title {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
}
.section-intro { margin: 0 0 1rem; color: var(--muted); max-width: 60ch; }

.checklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.checklist li {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.checklist .mark {
  width: 1.5rem; height: 1.5rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
}
.checklist .mark svg { width: 0.9rem; height: 0.9rem; visibility: hidden; }
.checklist li.done .mark svg { visibility: visible; }
.checklist li.done .mark { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.checklist .item-title { margin: 0; font-weight: 600; }
.checklist .item-text { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.95rem; }
.checklist .item-action { margin: 0.35rem 0 0; font-weight: 600; }

.status {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.status.done { background: var(--ok-bg); color: var(--ok); }
.status.wait { background: var(--wait-bg); color: var(--wait-ink); }
.status.off { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

.campaigns { margin-top: 2.5rem; }
.campaigns .button { margin-top: 0.25rem; }

.plan {
  align-self: start;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--marigold);
  border-radius: 0 0 8px 8px;
}
.plan h2 { margin: 0 0 0.25rem; font-family: var(--serif); font-size: 1.4rem; }
.plan .plan-name { margin: 0 0 1rem; font-size: 1.05rem; font-weight: 600; color: var(--primary); }
.plan p { margin: 0 0 0.75rem; color: var(--muted); }
.plan p:last-child { margin-bottom: 0; }

.loading { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .button, input, select { transition: background-color 120ms ease, border-color 120ms ease; }
}

[tabindex="-1"]:focus { outline: none; }

/* ---------------------------------------------------------------- signed-in pages */

.crumbs { margin: 0 0 1.25rem; font-size: 0.95rem; }
.narrow { max-width: 40rem; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.section-head .section-title { margin: 0; }

.empty {
  margin: 0.5rem 0 0;
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  max-width: 60ch;
}

.row-list { list-style: none; margin: 0.75rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.row-list li { border-bottom: 1px solid var(--line); }
.row-list a.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1rem;
  align-items: center;
  padding: 0.9rem 0.25rem;
  color: inherit;
  text-decoration: none;
}
.row-list a.row:hover .row-title { color: var(--primary); text-decoration: underline; text-underline-offset: 0.18em; }
.row-title { margin: 0; font-weight: 600; }
.row-meta { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.95rem; }
.row-list .status { justify-self: end; }

.status.review { background: var(--wait-bg); color: var(--wait-ink); }
.status.problem { background: var(--danger-bg); color: var(--danger); }

.facts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem 2rem;
  margin: 1.25rem 0 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts-list div { min-width: 0; }
.facts-list dt { font-size: 0.875rem; color: var(--muted); }
.facts-list dd { margin: 0.15rem 0 0; font-weight: 600; overflow-wrap: anywhere; }

textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
textarea:focus-visible { outline-offset: 0; border-color: var(--primary); }
textarea[aria-invalid="true"] { border-color: var(--danger); }

input[type="file"] { min-height: auto; padding: 0.5rem; }
input[type="radio"] { width: auto; min-height: auto; margin: 0.2rem 0 0; accent-color: var(--primary); }

fieldset.first { margin-top: 0; padding-top: 0; border-top: 0; }

.choice-group { display: grid; gap: 0.5rem; margin: 0 0 1rem; }
.choice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-weight: 400;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.choice strong { display: block; }
.choice-text { display: block; color: var(--muted); font-size: 0.9rem; }
.sizes { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }

.counter { text-align: right; }
.link-button {
  margin-top: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.submit-box {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.submit-box p { margin: 0 0 0.75rem; max-width: 60ch; }
.submit-box .section-title { margin-top: 0; }
.submit-box form { margin-top: 1rem; }
.submit-box .choice { margin-bottom: 0.4rem; }
.submit-box .choice input[type="checkbox"] { margin-top: 0.2rem; }
.editor-column { min-width: 0; }

input[type="checkbox"] { width: 1.1rem; height: 1.1rem; min-height: auto; margin: 0; flex: none; accent-color: var(--primary); }

fieldset.question { margin: 1rem 0 0; padding: 0.9rem 0 0; }
fieldset.question legend { font-family: var(--sans); font-size: 1rem; }
.inline-choices { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0.4rem 0 0.25rem; }
.inline-choices label { display: flex; align-items: center; gap: 0.45rem; margin: 0; font-weight: 400; cursor: pointer; }
.inline-choices input[type="radio"] { margin: 0; }
fieldset.question + .field { margin-top: 0.75rem; }

.fulltext { margin: 1.25rem 0 0; }
.fulltext summary { cursor: pointer; color: var(--primary); text-decoration: underline; text-underline-offset: 0.18em; }
.doc-text {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  max-height: 22rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  font-size: 0.92rem;
}
.doc-text p { margin: 0 0 0.6rem; max-width: 70ch; white-space: pre-line; }
.doc-text p:last-child { margin-bottom: 0; }
.doc-text .doc-label { color: var(--muted); font-size: 0.85rem; }

/* ---------------------------------------------------------------- card check */

.commitments { display: grid; gap: 0.5rem; margin: 0 0 1rem; }
.payment-box {
  margin: 1rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-height: 4rem;
}
.test-hint { margin: 0.75rem 0 0; padding: 0.6rem 0.8rem; border-radius: 6px; background: var(--wait-bg); color: var(--wait-ink); font-size: 0.9rem; }
.step-title { margin: 2rem 0 0.4rem; font-family: var(--serif); font-size: 1.3rem; }
.step-title:first-of-type { margin-top: 0; }

/* ---------------------------------------------------------------- ad builder */

.builder { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
.preview-panel { min-width: 0; }
.preview-frame {
  padding: 1.5rem 1rem;
  border-radius: 8px;
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(127, 127, 127, 0.06) 10px 20px),
    var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.preview-scale { transform-origin: top left; margin: 0 auto; }

.app-main.wide, .topbar-inner.wide { max-width: 86rem; }

@media (min-width: 1100px) {
  .builder { grid-template-columns: 26rem minmax(0, 1fr); }
  .preview-panel { order: 2; position: sticky; top: 1.5rem; align-self: start; }
}

/* The ad itself. It looks the same on every Zawadi Media site, whatever the page's own theme. */
.ad {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  background: #ffffff;
  color: #1c1f1e;
  border: 1px solid #d6dad8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.25;
  text-align: left;
}
.ad p { margin: 0; }
.ad-img { display: block; object-fit: cover; background: #eef1ef; }
.ad-headline { font-weight: 700; overflow-wrap: anywhere; }
.ad-body { color: #3d4442; overflow-wrap: anywhere; }
.ad-headline, .ad-body { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.ad-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5em; color: #5e6663; }
.ad-domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-badge {
  flex: none;
  padding: 0 0.35em;
  border: 1px solid #9aa29f;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
  color: #4b524f;
}
.ad-empty .ad-headline, .ad-empty .ad-body { color: #9aa29f; }

.ad-300x250 { width: 300px; height: 250px; display: flex; flex-direction: column; }
.ad-300x250 .ad-img { width: 100%; height: 140px; }
.ad-300x250 .ad-copy { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 9px 11px 8px; min-height: 0; }
.ad-300x250 .ad-headline { font-size: 17px; -webkit-line-clamp: 2; }
.ad-300x250 .ad-body { font-size: 13px; -webkit-line-clamp: 2; }
.ad-300x250 .ad-foot { margin-top: auto; font-size: 11px; }
.ad-300x250.ad-noimg .ad-copy { padding: 18px 18px 12px; gap: 8px; }
.ad-300x250.ad-noimg .ad-headline { font-size: 24px; -webkit-line-clamp: 3; }
.ad-300x250.ad-noimg .ad-body { font-size: 15px; -webkit-line-clamp: 5; }

.ad-728x90 { width: 728px; height: 90px; display: flex; }
.ad-728x90 .ad-img { width: 160px; height: 100%; flex: none; }
.ad-728x90 .ad-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 8px 14px; }
.ad-728x90 .ad-headline { font-size: 19px; -webkit-line-clamp: 1; }
.ad-728x90 .ad-body { font-size: 13px; -webkit-line-clamp: 1; }
.ad-728x90 .ad-foot { font-size: 11px; }

.ad-320x50 { width: 320px; height: 50px; display: flex; }
.ad-320x50 .ad-img { width: 50px; height: 50px; flex: none; }
.ad-320x50 .ad-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 8px; }
.ad-320x50 .ad-headline { font-size: 14px; -webkit-line-clamp: 1; }
.ad-320x50 .ad-body { display: none; }
.ad-320x50 .ad-foot { font-size: 10px; }

.ad-16-9 { width: 480px; height: 270px; }
.ad-16-9 .ad-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ad-16-9 .ad-copy {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 4px;
  padding: 40px 16px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  color: #ffffff;
}
.ad-16-9 .ad-headline { font-size: 22px; -webkit-line-clamp: 2; }
.ad-16-9 .ad-body { font-size: 14px; color: #e9eeec; -webkit-line-clamp: 2; }
.ad-16-9 .ad-foot { font-size: 11px; color: #e1e7e4; }
.ad-16-9 .ad-badge { color: #ffffff; border-color: #ffffffb0; }
.ad-16-9.ad-noimg .ad-copy { top: 0; justify-content: center; padding: 24px 28px; background: #ffffff; color: #1c1f1e; }
.ad-16-9.ad-noimg .ad-headline { font-size: 30px; -webkit-line-clamp: 3; }
.ad-16-9.ad-noimg .ad-body { font-size: 16px; color: #3d4442; -webkit-line-clamp: 3; }
.ad-16-9.ad-noimg .ad-foot { color: #5e6663; }
.ad-16-9.ad-noimg .ad-badge { color: #4b524f; border-color: #9aa29f; }

/* ---------------------------------------------------------------- review results and running a campaign */

.review-result { margin: 0 0 1rem; padding: 0.9rem 1rem; border-radius: 6px; border-left: 4px solid var(--line); background: var(--bg); }
.review-result.ok { border-left-color: var(--ok); background: var(--ok-bg); }
.review-result.wait { border-left-color: var(--marigold); background: var(--wait-bg); }
.review-result.problem { border-left-color: var(--danger); background: var(--danger-bg); }
.review-result .review-headline { margin: 0; font-weight: 600; }
.review-result .hint { margin-top: 0.6rem; }
.review-result p:last-child { margin-bottom: 0; }
.review-result #review-action { margin-top: 0.75rem; }
.findings { margin: 0.6rem 0 0; padding: 0 0 0 1.1rem; }
.findings li { margin: 0 0 0.6rem; }
.findings li:last-child { margin-bottom: 0; }
.findings .fix { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.92rem; }

.run-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.run-box .section-title { margin: 0 0 0.25rem; }
.run-box p { margin: 0; color: var(--muted); max-width: 60ch; }
.run-box .actions { margin-top: 0; }

/* ---------------------------------------------------------------- settings */

.topbar .topbar-link { color: #ffffff; font-weight: 600; text-decoration: none; }
.topbar .topbar-link:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 0.18em; }
.topbar .topbar-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 2px; text-decoration-color: var(--marigold); }
input[readonly] { background: var(--bg); color: var(--muted); }
.settings-section { padding: 1.75rem 0 0; margin: 0 0 1.75rem; border-top: 1px solid var(--line); }
.settings-section:first-of-type { border-top: 0; padding-top: 0; }
.settings-section .actions { margin-top: 1rem; }
.subsection-title { margin: 2rem 0 0.5rem; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.history-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.history-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.history-list .what { margin: 0; }
.history-list .when { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.9rem; }
.brand-name, .topbar .button, .topbar .topbar-link { white-space: nowrap; }
.settings-section:first-of-type { margin-top: 1.5rem; }
@media (max-width: 440px) {
  .topbar .who { gap: 0.6rem; }
  .topbar .brand-name { font-size: 1.15rem; }
  .topbar .button.secondary { padding: 0.3rem 0.7rem; }
}

/* ---------------------------------------------------------------- staff area */

.staff-badge {
  margin-left: 0.6rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--marigold);
  color: #1b1405;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.staff-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .staff-layout { grid-template-columns: 22rem minmax(0, 1fr); align-items: start; } }
.queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.queue-item {
  display: block;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.queue-item:hover { border-color: var(--primary); }
.queue-item[aria-current="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.queue-item .q-title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.queue-item .q-meta { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.9rem; }
.queue-item .q-due.overdue, .detail-due.overdue { color: var(--danger); font-weight: 600; }
.review-detail { padding: 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; }
.review-detail .section-title { overflow-wrap: anywhere; }
.detail-due { margin: 0 0 1rem; color: var(--muted); }
.staff-preview { overflow-x: auto; margin-bottom: 1rem; }
.detail-facts { margin-bottom: 0.5rem; }
.detail-facts .wide-fact { grid-column: 1 / -1; }
.answers, .check-notes { margin: 0; padding: 0 0 0 1.1rem; }
.answers li, .check-notes li { margin: 0 0 0.4rem; overflow-wrap: anywhere; }
.check-notes .note-detail { display: block; color: var(--muted); font-size: 0.9rem; }
.decision-form { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* Campaign delivery numbers */
.delivery { margin: 1.5rem 0; }
.delivery .section-title { margin-bottom: 0.5rem; }
.table-scroll { overflow-x: auto; position: relative; }
.stats-table { border-collapse: collapse; min-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.stats-table th, .stats-table td { padding: 0.6rem 0.9rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.stats-table thead th { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.stats-table tbody th { text-align: left; font-weight: 600; }
.stats-table tbody tr:last-child th, .stats-table tbody tr:last-child td { border-bottom: 0; }
.stats-table td { font-variant-numeric: tabular-nums; font-weight: 600; }
.stats-table td.few { font-weight: 400; color: var(--muted); }
.delivery-note { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--muted); max-width: 70ch; }
@media (max-width: 480px) { .stats-table th, .stats-table td { padding: 0.5rem 0.45rem; font-size: 0.875rem; } }

/* Staff navigation and house ads */
.topbar .staff-nav { display: flex; gap: 1.25rem; margin-right: auto; margin-left: 2rem; }
.topbar .staff-nav a { color: #ffffff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.topbar .staff-nav a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.topbar .staff-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 2px; text-decoration-color: var(--marigold); }
@media (max-width: 760px) {
  .topbar.staff .topbar-inner { flex-wrap: wrap; }
  .topbar .staff-nav { order: 3; width: 100%; margin: 0.5rem 0 0; gap: 1rem; }
  .topbar .staff-badge { display: none; }
}
.house-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.house-head .section-title { margin: 0; }
.house-actions { margin: 0.25rem 0 1rem; }
.house-actions[hidden] { display: none; }
.queue-item .q-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.queue-item .q-top .status { flex: none; }
.choice-group.two { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.narrow-field input { max-width: 8rem; }
.house-form { margin-top: 0.5rem; }
.house-form fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.house-form legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
@media (min-width: 640px) { .house-form .field-row { grid-template-columns: 1fr 1fr; } }

/* Campaign Intelligence */
.ci section { margin: 2rem 0; }
.ci-pick { display: flex; flex-wrap: wrap; gap: 0 1rem; margin: 1rem 0 0; }
.ci-pick .field { min-width: 14rem; flex: 1 1 14rem; max-width: 22rem; }
.ci-locked { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; max-width: 46rem; }
.ci-list { margin: 0 0 1rem; padding-left: 1.2rem; }
.ci-list li { margin: 0.3rem 0; }
.ci-cards { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.ci-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.ci-card p { margin: 0; }
.ci-card-label { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.ci-card-value { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ci-card-sub { color: var(--muted); font-size: 0.875rem; }
.ci-insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ci-insights li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--marigold); border-radius: 8px; padding: 0.75rem 1rem; }
.ci-table { margin-bottom: 1rem; }
.ci-table caption { text-align: left; font-weight: 600; padding: 0 0 0.4rem; caption-side: top; }
.ci-two { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
.ci-two > * { min-width: 0; }
@media (min-width: 760px) { .ci-two { grid-template-columns: 1fr 1fr; } }
.ci-sub { font-size: 1rem; margin: 1rem 0 0.25rem; }
.ci-bars { list-style: none; margin: 0; padding: 0; max-width: 40rem; }
.ci-bars li { display: grid; grid-template-columns: minmax(7rem, 12rem) 1fr 3rem; gap: 0.75rem; align-items: center; padding: 0.25rem 0; }
.ci-bar { height: 0.7rem; background: var(--line); border-radius: 4px; overflow: hidden; }
.ci-bar-fill { display: block; height: 100%; background: var(--muted); }
.ci-bar-fill.up { background: var(--primary); }
.ci-bar-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
