/* PolitiSizeIt — Audience Builder
   Same dark, non-partisan surface as the studio, with an editorial serif carrying
   the headline and the count. The number is the product: it gets the largest,
   most deliberate type on the page. */

* { box-sizing: border-box; }

/* A display rule outranks the UA's [hidden] { display: none }, so anything
   toggled with the hidden attribute would show anyway. Settle it once. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /*
   * The gradient is the page, not a stripe at the top.
   *
   * The earlier band was the cautious choice — dense forms are hard to read over
   * colour. But every screen here already puts its content in white cards, so
   * the colour never sits behind body text; it sits behind the cards, exactly as
   * it does on the landing page. Fixed attachment so it belongs to the viewport
   * and does not slide away down a long page.
   */
  background: var(--grad);
  background-attachment: fixed;
  color: var(--on-grad);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.ambient { display: none; }

/* --- chrome ------------------------------------------------------------ */

.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--on-grad);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }

.mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  /* White on the band. A crimson-to-navy mark on a crimson-to-navy ground reads
     as a dark smudge, which is what it did on the landing page too. */
  background: var(--on-grad);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.brand-text { display: flex; flex-direction: column; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
.brand-sub { font-size: 12px; font-weight: 500; color: var(--on-grad-faint); letter-spacing: 0.02em; }

.ghost-btn {
  padding: 9px 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 500;
  white-space: nowrap;
  color: var(--on-grad); text-decoration: none;
  background: rgba(255, 255, 255, 0.10); border: 1px solid var(--on-grad-line);
  transition: background .2s var(--ease), border-color .2s var(--ease);
  min-height: 44px; display: inline-flex; align-items: center;
}
.ghost-btn:hover { background: rgba(255, 255, 255, 0.19); border-color: rgba(255,255,255,0.45); }

.stage { position: relative; z-index: 1; padding: 0 clamp(16px, 4vw, 40px) 96px; }

/* --- hero -------------------------------------------------------------- */

.hero { max-width: 720px; margin: clamp(40px, 8vw, 84px) auto clamp(32px, 5vw, 56px); text-align: center; }

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6.4vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(96deg, var(--crimson), var(--navy));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* Italics lean past their advance width; without this the last glyph is
     sheared by the line box, which is what clipped the landing page's "?". */
  display: inline-block; padding-right: 0.14em; margin-right: -0.06em;
}

.hero .sub { margin: 0 auto; max-width: 52ch; color: var(--text-dim); font-size: clamp(1rem, 2.2vw, 1.12rem); }
.hero .sub strong { color: var(--text); font-weight: 600; }

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

/* Lifted so the white cards overlap the bottom of the gradient band rather than
   butting against a hard horizontal edge — the same floating-card relationship
   the counter has with the landing page. */
/*
 * minmax(0, 1fr), not 1fr.
 *
 * A `1fr` track has an automatic minimum of min-content, so the column can
 * never be narrower than the widest thing inside it — and the inbox preview
 * holds three `white-space: nowrap` lines whose min-content is the full
 * untruncated subject and preview text. With a real campaign loaded, that
 * floor was 516px on a 393px phone: the page scrolled sideways, the coloured
 * band stopped short of the right-hand edge because it is sized to the
 * viewport, and the white panel ran off the screen.
 *
 * minmax(0, 1fr) removes the floor, so the column takes the width available
 * and the inbox lines ellipsise the way they were always meant to. The desktop
 * rule below was already written this way; the single-column default was not.
 */
.workbench {
  display: grid; gap: clamp(20px, 3vw, 34px);
  grid-template-columns: minmax(0, 1fr);
  max-width: 1180px; margin: -28px auto 0; align-items: start;
}
@media (min-width: 950px) {
  .workbench { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr); }
}

.panel {
  background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 30px);
  box-shadow: 0 24px 60px -20px rgba(16, 24, 40, 0.35), 0 3px 10px rgba(16, 24, 40, 0.08);
}

/* --- dataset switch ---------------------------------------------------- */

.dataset-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 30px; }

.ds-btn {
  display: flex; flex-direction: column; gap: 3px; text-align: left; cursor: pointer;
  padding: 15px 16px; border-radius: var(--radius); font: inherit; color: var(--text-dim);
  background: transparent; border: 1px solid var(--line);
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.ds-btn:hover { border-color: var(--line-strong); color: var(--text); }
.ds-btn.is-active {
  color: var(--text); border-color: transparent; background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 8px 26px -14px var(--accent-glow);
}
.ds-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.ds-sub { font-size: 12.5px; color: var(--text-faint); line-height: 1.4; }

/* --- blocks ------------------------------------------------------------ */

.block + .block { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }

.block-title {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: 1.65rem; letter-spacing: -0.01em;
}
.block-hint { margin: 4px 0 18px; color: var(--text-faint); font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-grow { flex: 1 1 auto; }
.field-label { font-size: 12.5px; font-weight: 500; color: var(--text-faint); letter-spacing: 0.01em; }
.opt { color: var(--text-faint); font-weight: 400; }

.control {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.control:focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--sky-soft);
}
.control::placeholder { color: var(--text-faint); }
select.control { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
                    linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position: right 18px center, right 13px center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.geo-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
/*
 * The narrow first field is the "Type" dropdown in the manual row, and only
 * there. Unscoped, this also caught the main Place input — which carries
 * .field-grow and lost to this rule's specificity — so the one field somebody
 * types a town into sat at 150px with 700px of empty panel beside it, cutting
 * its own placeholder off mid-word.
 */
.geo-row-manual .field:first-child { flex: 0 0 150px; }

.add-btn {
  min-height: 46px; padding: 0 20px; border-radius: var(--radius); cursor: pointer;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line-strong);
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.add-btn:hover { background: var(--crimson-soft); border-color: var(--accent); }

.geo-help { margin: 9px 0 0; font-size: 13px; color: var(--text-faint); }
.geo-help em { color: var(--text-dim); font-style: normal; }

/* --- chips ------------------------------------------------------------- */

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 14px; border-radius: 999px; font-size: 13.5px;
  background: var(--surface-2); border: 1px solid var(--line);
  animation: chip-in .22s var(--ease) both;
}
.chip-x {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; font-size: 15px; line-height: 1; color: var(--text-faint);
  background: transparent; border: 0; font-family: inherit;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.chip-x:hover { background: #FDEBEF; color: var(--danger); }

@keyframes chip-in { from { opacity: 0; transform: translateY(-3px) scale(.97); } to { opacity: 1; transform: none; } }

/* --- categories -------------------------------------------------------- */

.search-wrap { display: block; margin-bottom: 16px; }
.search { background-image: none; }

.categories { display: flex; flex-direction: column; gap: 8px; }

.cat { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }

.cat-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; cursor: pointer; font: inherit; font-size: 15px; font-weight: 500;
  color: var(--text); background: transparent; border: 0; text-align: left; min-height: 50px;
  transition: background .16s var(--ease);
}
.cat-head:hover { background: var(--surface); }
.cat-meta { display: flex; align-items: center; gap: 10px; color: var(--text-faint); font-size: 12.5px; }

.cat-count {
  min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: var(--on-dark); background: linear-gradient(140deg, var(--crimson), var(--navy));
}
.cat-caret { transition: transform .2s var(--ease); }
.cat.is-open .cat-caret { transform: rotate(90deg); }

.cat-body { display: none; padding: 4px 16px 16px; }
.cat.is-open .cat-body { display: block; }

.sel + .sel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sel-label { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.01em; }

.opts { display: flex; flex-wrap: wrap; gap: 7px; }

.opt-btn {
  padding: 7px 12px; border-radius: 9px; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--text-dim);
  background: transparent; border: 1px solid var(--line); text-align: left;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.opt-btn:hover { color: var(--text); border-color: var(--line-strong); }
.opt-btn.is-on {
  color: var(--text); border-color: var(--accent); background: var(--crimson-soft);
  font-weight: 500;
}
.opt-btn[data-level="1"] { margin-left: 12px; font-size: 13px; }
.opt-btn[data-level="2"] { margin-left: 24px; font-size: 12.5px; }
.opt-btn[data-level="3"] { margin-left: 36px; font-size: 12.5px; }

.range-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.range-row .field { flex: 1 1 110px; }

.empty-note { margin: 18px 2px; color: var(--text-faint); font-size: 14px; }

/* --- summary ----------------------------------------------------------- */

.summary { position: relative; }
@media (min-width: 950px) { .summary-inner { position: sticky; top: 24px; } }

.summary-inner {
  /* Solid white, like .panel. The old translucent fill was a dark-theme relic:
     over the gradient band it left dark text sitting on dark colour. */
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: var(--radius-lg);
  padding: clamp(20px, 2.6vw, 28px);
  box-shadow: 0 24px 60px -20px rgba(16, 24, 40, 0.35), 0 3px 10px rgba(16, 24, 40, 0.08);
}

.summary-title { margin: 0 0 16px; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }

.summary-body { min-height: 60px; margin-bottom: 20px; }
.summary-empty { margin: 0; color: var(--text-faint); font-size: 14px; }

.sum-group + .sum-group { margin-top: 14px; }
.sum-head { margin: 0 0 5px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-faint); }
.sum-line { margin: 0; font-size: 14.5px; color: var(--text); }
.sum-line .sum-dim { color: var(--text-dim); }

/* the number is the product — give it room */
.count-result {
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px;
  padding: 20px; border-radius: var(--radius);
  background: var(--crimson-soft); border: 1px solid rgba(174, 28, 65, 0.28);
  animation: rise .34s var(--ease) both;
}
.count-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-dim); }
.count-number {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 7vw, 3.4rem);
  line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.count-note { font-size: 13px; color: var(--text-dim); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 50px; padding: 13px 22px; border-radius: var(--radius);
  cursor: pointer; font: inherit; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--on-dark); text-decoration: none; border: 0;
  background: linear-gradient(140deg, var(--crimson), var(--navy));
  box-shadow: 0 12px 32px -14px var(--accent-glow);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease);
}
.primary-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 18px 40px -16px var(--accent-glow); }
.primary-btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(0.4); }
.primary-btn.is-busy { pointer-events: none; }

.summary-fine { margin: 10px 0 0; font-size: 12.5px; color: var(--text-faint); text-align: center; }

.spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid rgba(10, 12, 18, 0.3); border-top-color: var(--on-dark);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- the offer --------------------------------------------------------- */

.offer {
  margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line);
  animation: rise .4s var(--ease) both;
}
.offer-title { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.offer-body { margin: 0 0 16px; font-size: 14px; color: var(--text-dim); }
.offer-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.offer-price {
  font-family: var(--serif); font-size: 1.9rem; line-height: 1; letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 6px;
}
.offer-price-sub { font-family: var(--sans); font-size: 11.5px; font-weight: 500;
  color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.offer-btn { width: auto; flex: 1 1 170px; }

/* --- gate -------------------------------------------------------------- */

.gate {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  padding: 20px; background: rgba(4, 5, 9, 0.76); backdrop-filter: blur(6px);
  animation: fade .2s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.gate-card {
  position: relative; width: min(430px, 100%);
  /*
   * A light card, like every other dialog here.
   *
   * This was #0e1017 — a leftover from when the app was dark-first — while
   * everything inside it still used light-page ink. The heading was #212529 on
   * near-black, so "Where should we send it?" was invisible and the sentence
   * under it barely there. The card, not the text, was the thing out of date.
   */
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 32px);
  box-shadow: var(--shadow-lg);
  animation: sheet-in .28s var(--ease) both;
  max-height: calc(100dvh - 40px); overflow-y: auto;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.gate-close {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 0; color: var(--text-faint);
  font-size: 22px; line-height: 1; border-radius: 50%;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.gate-close:hover { color: var(--text); background: var(--surface); }

.gate-title { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 1.7rem; letter-spacing: -0.01em; }
.gate-sub { margin: 0 0 22px; color: var(--text-dim); font-size: 14.5px; }

.gate-form { display: flex; flex-direction: column; gap: 15px; }
.gate-submit { margin-top: 4px; }
.gate-fine { margin: 0; font-size: 12px; color: var(--text-faint); text-align: center; }
.gate-error {
  margin: 0; padding: 10px 13px; border-radius: 10px; font-size: 13.5px; color: var(--danger);
  background: #FDEBEF; border: 1px solid rgba(255, 139, 139, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.offer-error { margin: 14px 0 0; }
.offer-fine { margin: 12px 0 0; font-size: 12px; color: var(--text-faint); text-align: center; }
.offer-btn:disabled { opacity: .55; }

.offer-note { margin-top: 12px; font-size: 13px; }

/* --- verification flow -------------------------------------------------- */

/* The count is running the whole time this is open. Saying so removes the sense
   that the form is a toll gate rather than a use of the wait. */
.run-strip {
  display: flex; align-items: center; gap: 9px; margin-bottom: 20px;
  /* Clear of the close button, which is pinned to the card's top-right corner.
     Without this the × sat inside the end of the pill, looking like a control
     that dismissed the status line rather than the dialog. */
  margin-right: 46px;
  padding: 9px 13px; border-radius: 999px;
  background: var(--crimson-soft); border: 1px solid rgba(174, 28, 65, 0.20);
  font-size: 13px; color: var(--text-dim);
}
.run-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--accent-2);
  box-shadow: 0 0 0 0 var(--sky-soft); animation: pulse 1.9s var(--ease) infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(3, 169, 244, 0); }
  100% { box-shadow: 0 0 0 0 rgba(3, 169, 244, 0); }
}
.run-strip.is-ready { background: #E3F5EC; border-color: rgba(74, 222, 128, 0.3); }
.run-strip.is-ready .run-dot { background: var(--ok); animation: none; }

.gate-step { animation: rise .26s var(--ease) both; }

/* six boxes read as a code; one long field reads as a password */
.code-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }

.code-box {
  width: 100%; aspect-ratio: 3 / 4; min-height: 52px; padding: 0;
  text-align: center; font-family: var(--serif); font-size: 1.7rem; line-height: 1;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
.code-box:focus-visible {
  outline: none; border-color: var(--accent); background: var(--crimson-soft);
  box-shadow: 0 0 0 3px var(--sky-soft);
}
.code-box.is-filled { border-color: var(--line-strong); background: var(--surface-2); }
.code-row.is-wrong .code-box { border-color: var(--danger); animation: shake .34s var(--ease); }

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  30%, 70% { transform: translateX(2px); }
  50% { transform: translateX(-2px); }
}

.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: inherit;
  color: var(--accent); text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent-2); }
.link-btn:disabled { color: var(--text-faint); cursor: default; text-decoration: none; }
.resend-note { color: var(--text-faint); }

.done-mark {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px; color: var(--on-dark);
  background: linear-gradient(140deg, var(--ok), var(--accent-2));
  animation: pop .3s var(--ease) both;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

#step-done { text-align: center; }
#step-done .gate-sub { margin-bottom: 20px; }


/* --- the gradient band ---------------------------------------------------- */

/*
 * A coloured header, white work area underneath. Not a full-page gradient like
 * the landing page: these are dense forms, and reading long labels over a moving
 * colour field is worse in every way that matters. Moxy does the same — coloured
 * hero, white below — and the white panels float on the band exactly as the
 * counter card does on the landing page, so both halves look like one product.
 *
 * background-attachment: fixed is what makes this work. Each element paints the
 * slice of one viewport-sized gradient that happens to sit behind it, so the
 * topbar and the band line up with no seam despite being separate elements and
 * not siblings. The earlier version painted a fixed-height band on the body and
 * had to guess how tall each page's hero was — it guessed wrong on the builder
 * and sheared the sub-heading in half.
 */
/* The band no longer paints — the page underneath is already the gradient. It
   stays as a wrapper because the hero type inside it is coloured for the ground. */
.topbar { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }

/*
 * Full-bleed, by breaking out of .stage's horizontal padding and putting the
 * same value back as its own. Sitting inside that padding, the band rendered as
 * a floating rectangle with white margins down both sides.
 */
.band {
  margin-left: calc(-1 * clamp(16px, 4vw, 40px));
  margin-right: calc(-1 * clamp(16px, 4vw, 40px));
  padding-left: clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
  padding-top: clamp(20px, 3vw, 32px);
  padding-bottom: clamp(26px, 4vw, 44px);
  margin-bottom: 0;
}

/*
 * Margins carry no background, so a top margin here opens a white stripe between
 * the topbar and the band. All of that spacing lives on the band's padding.
 */
.band > .crumbs { margin-top: 0; }
.band > .hero { margin-top: 0; margin-bottom: 0; }
.band > .intro { margin-top: 0; margin-bottom: 0; }

@media (prefers-reduced-motion: no-preference) {
  /* iOS ignores fixed attachment; the band still paints, just without the
     seamless join. Nothing breaks. */
}


/*
 * On-gradient type, scoped to the band.
 *
 * These were applied to .hero globally, which turned the account page's
 * signed-out heading white — on a white background, because that hero has no
 * band around it. A page can have a hero without having a coloured header, so
 * the colour belongs to the band, not to the hero.
 */
.hero h1,
.intro h1,
.headline,
.paid-title { color: var(--on-grad); }

.hero h1 em,
.intro h1 em,
.headline em {
  background: none; -webkit-background-clip: initial; background-clip: initial;
  color: var(--on-grad);
}

.hero .sub,
.intro .sub,
.paid-sub,
.paid-note { color: var(--on-grad-dim); }
.hero .sub strong,
.intro .sub strong { color: var(--on-grad); }

/* Anything inside a white card goes back to ink. */
.panel, .summary-inner, .card, .acct-block .card { color: var(--text); }
.panel .hero h1, .panel .block-title { color: var(--text); }

/* The footer sits on the gradient now too. */
.legal-foot { border-top-color: var(--on-grad-line); color: var(--on-grad-faint); }
.legal-foot a { color: var(--on-grad-dim); }
.legal-foot a:hover { color: var(--on-grad); }

/* A gradient button on a gradient ground has almost no contrast. White wins. */
.primary-btn.hero-btn, .paid-btn {
  background: var(--on-grad); color: var(--crimson);
  border: 0; box-shadow: 0 10px 26px -12px rgba(0,0,0,.45);
}
.primary-btn.hero-btn:hover, .paid-btn:hover { background: #fff; }

/* --- the topbar on a phone -------------------------------------------------
 * Three destinations plus the brand does not fit 390px at desktop sizing: the
 * nav wrapped onto a second row and "Build your campaign" broke across two
 * lines under it. The subtitle is decoration and goes first; the buttons then
 * fit on one row with room to spare.
 */
@media (max-width: 620px) {
  .brand-sub { display: none; }
  .brand-text { font-size: 15px; }
  /* Nav button sizing lives in theme.css so every page gets the same bar. */
}

@media (max-width: 360px) {
  .ghost-btn { font-size: 12px; padding: 0 9px; }
}


/* --- surfaces on the gradient --------------------------------------------
 * With the whole page coloured, anything that used to inherit a white page has
 * to say so itself, or it renders dark text on dark colour.
 */
.acct-block,
.paid,
.hero-card { color: var(--on-grad); }

/* .empty-note is deliberately not in that list. It is used on the gradient on
   the account page — where account.css, which loads after this file, colours it
   — and inside a white card on the builder, where white text made "Nothing
   matches that search." invisible. A rule for one page's context does not
   belong in a selector that matches both. */

.acct-title, .acct-email { color: var(--on-grad); }
.acct-email { color: var(--on-grad-dim); }
.acct-block > .block-title { color: var(--on-grad); }
.acct-block > .block-hint { color: var(--on-grad-dim); }

/* Sign out, now beside the address rather than in the nav. */
.acct-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.acct-signout {
  /* 40px is a thumb-miss on a phone; the minimum is 44. */
  flex: none; min-height: 44px; padding: 0 15px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--on-grad); background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--on-grad-line);
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.acct-signout:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.45); }

/* Reopening a past count. Says what happened, and says louder when part of the
   targeting could not be restored — a count run on the wrong criteria because
   two filters silently vanished is worse than one that refused to open. */
.reopen-note {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
}

.reopen-note.reopen-warn {
  background: rgba(163, 29, 78, .06);
  border-color: var(--crimson);
  color: var(--text);
}


/* --------------------------------------------------- the place field, shared

   Same control as the landing page, from the same file. It replaced a text box
   that demanded "Palm Beach Gardens, FL" — a format rule standing between
   somebody and the only thing this page does. */

.geo-row .place-wrap { position: relative; display: block; }

.geo-row .place-wrap .field-label {
  display: block;
  margin-bottom: 6px;
}

/* The manual controls, folded away. Still there for a state, a ZIP or
   nationwide — just no longer the first problem anybody has to solve. */
.geo-manual { margin-top: 12px; }

.geo-manual summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-faint);
  padding: 6px 0;
  list-style: none;
}
.geo-manual summary::-webkit-details-marker { display: none; }
.geo-manual summary::before { content: '+ '; font-weight: 600; }
.geo-manual[open] summary::before { content: '\2212 '; }
.geo-manual summary:hover { color: var(--accent-2); }

.geo-row-manual { margin-top: 10px; }


/*
 * Breathing room under the hero.
 *
 * "…no estimates, no guesses." was landing within a few pixels of the white
 * panel, so the sentence read as if it had been cut off by the card rather
 * than finished. The gap belongs to the hero, not the panel, because the panel
 * is reused on pages with no hero above it.
 */
.hero .sub:last-child { margin-bottom: clamp(26px, 5vw, 44px); }


@media (max-width: 620px) {
  /*
   * The place field takes the row on a phone.
   *
   * Sharing it with the Add button left about 210px for the input, and the
   * suggestion list inherits that width — so "Palm Beach County" wrapped onto
   * three lines and the list became unreadable. Picking a suggestion is the
   * primary path anyway; Add is the fallback for text that was typed but never
   * picked, and it can sit underneath.
   */
  .geo-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .geo-row .field-grow { width: 100%; }
  .geo-row .place-wrap { width: 100%; }
  .geo-row .add-btn { width: 100%; }
}

/* ------------------------------------------------------------- what it costs */

.cost {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.cost-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}
.cost-summary::-webkit-details-marker { display: none; }
.cost-summary-label { font-size: 14px; font-weight: 600; color: var(--text); }
.cost-summary-rate { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.cost[open] .cost-summary { border-bottom: 1px solid var(--line); }

.cost-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 11px; }
.cost-line { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-dim); }

.cost-try { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cost-try-label { font-size: 13.5px; color: var(--text-dim); }
/* Sized to the number rather than filling the row: this is a scratch input,
   not a form field somebody has to complete. */
.cost-try .control { width: 8.5rem; min-height: 44px; }

.cost-answer {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cost-fine { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-faint); }

/* ---------------------------------------------------------- saved audiences */

.saved { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.saved-row { display: flex; gap: 8px; flex-wrap: wrap; }
/* min-width:0 so two buttons share a narrow panel instead of overflowing it. */
.saved-btn { flex: 1 1 0; min-width: 0; padding: 0 12px; font-size: 13.5px; }

.saved-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  max-height: 15rem;
  overflow-y: auto;
}

.saved-item { display: flex; align-items: stretch; gap: 6px; }

.saved-use {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.saved-use:hover { border-color: var(--accent); background: var(--crimson-soft); }

.saved-name { font-size: 14px; font-weight: 600; color: var(--text); }
.saved-size { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.saved-del {
  flex: none;
  width: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-faint);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.saved-del:hover { color: var(--danger); border-color: var(--danger); }

.saved-empty { margin: 4px; font-size: 13px; color: var(--text-faint); line-height: 1.5; }
.saved-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
