/* ==========================================================================
   ImgAff design system — the single source of truth for the public pages.

   Loaded AFTER each page's inline <style> block, so this file is the
   override layer: it re-points the legacy token names the pages already
   use, and restyles the shared component API without renaming a selector.

   Fonts are SELF-HOSTED and declared at the top of this file:
     Plus Jakarta Sans for HEADINGS and the brand wordmark ONLY; Roboto for
     everything else — buttons, nav, labels, body, figures. A display face is
     ~10% wider than Roboto at UI sizes, which is what made buttons wrap.
   Both are variable and OFL-licensed, so 600 is a real 600 and no page needs a
   third-party font origin. Satoshi was used briefly and dropped: its ITF
   licence forbids self-hosting, and it ships no 600 cut. Roboto Flex was
   trialled after it and swapped out for reading too much like a system default.
   ========================================================================== */

/* Self-hosted webfonts — no third-party origin on any page.
   Only the latin and latin-ext subsets are shipped; latin-ext carries the
   Romanian diacritics (ă â î ș ț) the legal pages need. Both families are
   variable (one file spans the whole weight range), so 600 is a real 600.

   Plus Jakarta Sans — SIL Open Font License 1.1
   Roboto            — Apache License 2.0
   Licences: assets/fonts/OFL.txt

   URLs are RELATIVE to this stylesheet on purpose: they resolve both when
   served (/assets/fonts/…) and when a design-system card opens the file
   straight from a checkout. */

@font-face{
  font-family:'Plus Jakarta Sans';
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  src:url('assets/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family:'Plus Jakarta Sans';
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  src:url('assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'Roboto';
  font-style:normal;
  font-weight:400 600;
  font-display:swap;
  src:url('assets/fonts/roboto-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family:'Roboto';
  font-style:normal;
  font-weight:400 600;
  font-display:swap;
  src:url('assets/fonts/roboto-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- canonical tokens ---------------------------------------------------- */
:root{
  --brand:#0178FE; --brand-dark:#0160CF; --brand-soft:#E8F2FF;
  --cta:#FFB020; --cta-hover:#F0A310; --cta-border:#E8991A; --cta-ink:#191B19;
  --ink:#000000; --ink-soft:#11161D; --muted:#717171;
  --line:#E4E7EC; --page:#F5F7FA; --surface:#FFFFFF; --surface-alt:#F8F8F8;
  --chip-grey:#C1C1C4; --chip-green:#76CE29; --chip-orange:#FF8904;
  --good:#16845B; --warn:#9A5B00; --danger:#B42318;
  --radius:12px; --radius-lg:20px; --radius-pill:999px;
  --shadow-sm:0 1px 2px rgba(16,24,40,.05);
  --shadow-md:0 4px 16px rgba(16,24,40,.08);
  --display:"Plus Jakarta Sans",Helvetica,Arial,sans-serif;
  --body:"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
}

/* Status tints — the same three the portals use (packages/*/src/index.css),
   so a "saved" or "failed" message looks identical on the site and in-app. */
:root{
  --good-bg:#E7F4EE;
  --warn-bg:#FBF1DC;
  --danger-bg:#FDECEA;
}

/* --- legacy alias layer --------------------------------------------------
   The pages still reference the old token names inside their own <style>
   blocks. Re-point them here so one palette rules every page. Declared
   after the page's own :root (later source order wins at equal specificity).
   -------------------------------------------------------------------------- */
:root{
  --text:var(--ink);
  --accent:var(--brand);
  --accent-dark:var(--brand-dark);
  --border:var(--line);
  --bg-soft:var(--surface-alt);
  --paper:var(--surface);
  --blue-soft:var(--brand-soft);
  --yellow:var(--cta);
  --yellow-dark:var(--cta-hover);
  --bad:var(--danger);
  --shadow:var(--shadow-md);
  --focus-ring:3px solid rgba(1,120,254,.38);
}

/* --- base ---------------------------------------------------------------- */
html{
  color-scheme: light;
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}
*{ box-sizing: border-box; }
body{
  margin: 0;
  /* break-word, not anywhere: `anywhere` additionally feeds the min-content
     size and allows a break inside an ordinary word, which is how prose ends
     up hyphen-less and split mid-word. `break-word` still rescues a long URL
     that would otherwise overflow. */
  overflow-wrap: break-word;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6{
  color: var(--ink-soft);
  font-family: var(--display);
  letter-spacing: normal;
  /* `pretty`, not `balance`. Balance equalises LINE LENGTHS, which is lovely on
     a two-line hero but wrong for a three-line heading in a narrow column: it
     produced "Which images / could support / product matches?" at 167/169/220px
     inside a 275px card, stranding 20% of the width and reading as a broken
     break. `pretty` fills each line and only intervenes to avoid a one-word
     last line. */
  text-wrap: pretty;
}
h1, .page-title{
  font-size: clamp(2.1rem, 5.2vw, 3.375rem);
  font-weight: 600;
  line-height: 1.2;
}
h2{
  font-size: clamp(1.55rem, 3.4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
}
h3{ font-size: 1.25rem; font-weight: 600; line-height: 1.35; }
h4{ font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }

/* Zero-specificity rhythm: gives headings breathing room on pages that reset
   margins with `* { margin:0 }`, while any page-authored margin still wins. */
:where(h1, h2, h3, h4){ margin: 0 0 .75rem; }
:where(p, ul, ol, figure, table){ margin: 0 0 1rem; }

p, li{ text-wrap: pretty; }
strong, b{ font-weight: 600; }

a{ color: var(--brand); text-underline-offset: .18em; }
a:hover{ color: var(--brand-dark); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline: 3px solid rgba(1,120,254,.38);
  outline-offset: 3px;
  border-radius: 4px;
}

button, input, select, textarea{ font: inherit; }
button, [role="button"], .btn, .cta{ min-height: 44px; }
img{ max-width: 100%; }
code, pre{ overflow-wrap: normal; }
hr{ border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

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

/* --- layout -------------------------------------------------------------- */
.wrap{ width: min(100% - 2rem, 1080px); margin-inline: auto; }

/* Header and footer always sit on the shared 1080 grid, even on pages that
   narrow `.wrap` for their own prose column. Without this the brand landed at
   a different x on every page (720 / 740 / 820 / 860 / 1080) and appeared to
   jump as the reader moved through the site. */
.public-header > .wrap,
.site-topbar > .wrap,
.quiet-footer > .wrap,
footer.site.wrap{ max-width: 1080px; }

/* `.section` is used two ways in the pages: as a centred section HEADING
   (h2.section) and, going forward, as a block wrapper. Both are supported. */
section.section,
div.section{ padding-block: clamp(2.75rem, 7vw, 4.5rem); }

.section-head{
  max-width: 640px;
  margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
}
.section-head > *:last-child{ margin-bottom: 0; }

h2.section{
  margin: 0 0 .6rem;
  padding-top: clamp(2.5rem, 6vw, 3.5rem);
  font-size: clamp(1.55rem, 3.4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: normal;
  text-align: center;
}
p.section-sub,
.section-sub{
  max-width: 60ch;
  margin: 0 auto clamp(1.75rem, 4vw, 2.2rem);
  color: var(--muted);
  font-size: 1.0625rem;
  text-align: center;
}

.page-shell{
  width: min(100% - 2rem, 820px);
  margin: clamp(1.5rem, 4vw, 3rem) auto clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.page-shell-wide{ width: min(100% - 2rem, 1120px); }

.page-title{ max-width: 22ch; margin: 0 0 .85rem; }
.page-lead,
.lede,
.lead,
p.lead,
.subtitle{
  max-width: 66ch;
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* --- brand lockup --------------------------------------------------------
   ONE lockup for every surface: the 30px mark plus the HTML wordmark, at the
   same size on every page and in both portals (admin/user `.brand-logo`).
   Pages must not restate this — per-page copies are how the wordmark drifted
   to 1.2rem / 1.25rem / 1.3rem depending on which page you landed on. */
.site-brand,
.brand-home{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  color: var(--ink-soft);
  font-family: var(--display);
  /* Sized to the hamburger: a 44px mark and a wordmark scaled with it, so the
     two ends of the header bar have the same optical height. */
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.site-brand img,
.brand-home img{
  display: block;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}
.logo{
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: normal;
}
.logo span{ color: var(--brand); }

/* --- eyebrow ------------------------------------------------------------- */
/* Sentence case rather than letterspaced caps. Caps + 0.56px tracking made the
   41-character hero eyebrow too wide for any phone, and it broke as
   "SHOPPABLE IMAGES FOR / AFFILIATE PUBLISHERS" — text-wrap:balance cannot help
   there, because those two lines are already the same length, so balancing
   actively prefers that break. Sentence case is narrower and fits one line. */
.eyebrow{
  margin: 0 0 .8rem;
  color: var(--brand);
  font-family: var(--body);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.45;
  text-transform: none;
  text-wrap: pretty;
}

/* --- buttons -------------------------------------------------------------
   Pill, tonal border, no shadow, no transform on hover. */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 54px;
  padding: 16px 30px;
  border: 3px solid var(--cta-border);
  border-radius: var(--radius-pill);
  background: var(--cta);
  box-shadow: none;
  color: var(--cta-ink);
  cursor: pointer;
  font-family: var(--body);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn:hover{ background: var(--cta-hover); color: var(--cta-ink); box-shadow: none; }

.btn-primary,
.btn.btn-primary,
.tool button,
.capture button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 54px;
  padding: 16px 30px;
  border: 3px solid var(--cta-border);
  border-radius: var(--radius-pill);
  background: var(--cta);
  box-shadow: none;
  color: var(--cta-ink);
  cursor: pointer;
  font-family: var(--body);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn-primary:hover,
.btn.btn-primary:hover,
.tool button:hover,
.capture button:hover{
  background: var(--cta-hover);
  border-color: var(--cta-border);
  box-shadow: none;
  color: var(--cta-ink);
}

.btn-secondary,
.btn.btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 54px;
  padding: 15px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn-secondary:hover,
.btn.btn-secondary:hover{
  border-color: var(--line);
  background: var(--surface-alt);
  color: var(--ink-soft);
}

/* --- header -------------------------------------------------------------- */
.public-header,
header.site{
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site,
.public-header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding-block: .75rem;
}

nav.top,
.public-nav{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(.75rem, 1.8vw, 1.5rem);
}
nav.top a,
.public-nav a{
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
nav.top a:hover,
.public-nav a:hover{ color: var(--brand); }

nav.top a.cta,
.public-nav a.cta{
  min-height: 48px;
  padding: 11px 24px;
  border: 3px solid var(--cta-border);
  border-radius: var(--radius-pill);
  background: var(--cta);
  box-shadow: none;
  color: var(--cta-ink);
  font-size: 1rem;
  font-weight: 600;
}
nav.top a.cta:hover,
.public-nav a.cta:hover{
  background: var(--cta-hover);
  color: var(--cta-ink);
}

/* Mobile hamburger.
   Expected markup:
     <button class="nav-toggle" type="button"
             aria-expanded="false" aria-controls="site-nav">
       <span class="visually-hidden">Menu</span>
     </button>
   The three bars are drawn entirely in CSS: ::before is a 22x16 box whose
   top and bottom borders are the outer bars, ::after is the middle bar. */
.nav-toggle{
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}
.nav-toggle::before{
  content: "";
  width: 22px;
  height: 16px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.nav-toggle::after{
  content: "";
  position: absolute;
  inset: 0;
  width: 22px;
  height: 2px;
  margin: auto;
  background: currentColor;
}
.nav-toggle:hover{ background: var(--surface-alt); }
.nav-toggle[aria-expanded="true"]{
  border-color: var(--brand);
  color: var(--brand);
}

/* --- hero ---------------------------------------------------------------- */
.hero-stage{
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem);
  text-align: left;
}
.hero-copy{ text-align: left; }
.hero h1,
.hero-copy h1{
  max-width: 16ch;
  margin: 0 0 1.15rem;
  font-size: clamp(2.1rem, 5.2vw, 3.375rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
}
.hero h1 em,
.hero-copy h1 em{ color: var(--brand); font-style: normal; }
.hero p.sub,
.hero-copy .sub{
  max-width: 58ch;
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
  text-align: left;
}
.hero-actions{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1rem;
}
.hero-proof,
.hero .fine{
  margin-top: 1rem;
  color: var(--muted);
  font-size: .9rem;
}

/* The real product screenshot (/assets/hero-widget-overlay.png). */
.hero-figure{
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.hero-figure img{
  display: block;
  width: 100%;
  height: auto;
}
.hero-figure figcaption{
  padding: .75rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
  text-align: left;
}

/* --- surfaces ------------------------------------------------------------ */
.card,
.tool,
.step,
.path,
.plan,
.demo-card,
.capture,
.panel-card{
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card{ padding: clamp(1.25rem, 3vw, 1.75rem); margin-bottom: 1.25rem; }
.tool{ padding: clamp(1.5rem, 4vw, 2rem); }
.demo-card img{ border-radius: var(--radius); }

.capture{
  padding: clamp(1.75rem, 4vw, 2.25rem) clamp(1.25rem, 3vw, 1.75rem);
  background: var(--surface);
}
.plan.featured,
.path.reco{
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.plan .price{ font-weight: 700; letter-spacing: normal; }
/* A plan's own link is the secondary button: white, hairline --line border.
   (The featured plan restates the yellow pill for itself.) */
.plan a{
  border-radius: var(--radius-pill);
  border-color: var(--line);
  font-weight: 600;
}
.tag{
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
  letter-spacing: .04em;
}
.step .num{
  background: var(--brand);
  color: var(--surface);
  font-family: var(--body);
  font-weight: 600;
}
.step code{ background: var(--surface-alt); border-radius: 6px; }

/* Inset blocks: quieter than a card, readable on both page and surface. */
.gate,
.rule,
.placeholder{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  box-shadow: none;
}

section.band{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.next-step{
  margin-top: 2.5rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgba(1,120,254,.22);
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
  box-shadow: none;
}

.integrations span{
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}

/* --- forms --------------------------------------------------------------- */
input[type="url"],
input[type="text"],
input[type="email"],
input[type="search"],
select,
textarea{
  min-height: 48px;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
}
input::placeholder, textarea::placeholder{ color: var(--muted); }
.tool input:focus,
.capture input:focus,
input:focus,
select:focus,
textarea:focus{
  outline: 3px solid rgba(1,120,254,.38);
  outline-offset: 3px;
  border-color: var(--brand);
}

/* --- tables -------------------------------------------------------------- */
.table-scroll,
.cmp-wrap{
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.table-scroll table{ min-width: 620px; }
table th, table td{ border-color: var(--line); }
table thead th{
  color: var(--muted);
  font-family: var(--body);
  font-weight: 600;
}
table.cmp thead th.hl{ color: var(--brand); }

/* --- footer -------------------------------------------------------------- */
.quiet-footer,
footer.site{
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.quiet-footer .public-footer-inner,
footer.site{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem;
}
.quiet-footer nav,
footer.site > div:last-child{
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
}
.quiet-footer a,
footer.site a{
  margin: 0;
  color: var(--muted);
  text-decoration: none;
}
.quiet-footer a:hover,
footer.site a:hover{ color: var(--brand); text-decoration: underline; }

/* --- text utilities ------------------------------------------------------ */
.fine, .hint, .note, .updated, .muted{ color: var(--muted); }
.fine{ font-size: .9rem; }
.sig{ border-top: 1px solid var(--line); color: var(--muted); }

/* ==========================================================================
   Responsive — mobile <=640, tablet 641-1024, desktop >=1025.
   Nothing may cause horizontal page scroll at 360px.
   ========================================================================== */

@media (max-width: 1024px){
  .hero-stage{
    grid-template-columns: 1fr;
    gap: clamp(1.75rem, 5vw, 2.5rem);
  }
  .hero h1,
  .hero-copy h1{ max-width: 20ch; }
  .hero-figure{ max-width: 620px; }
}

/* Hamburger territory. The nav becomes a stacked panel — never a scroll strip. */
@media (max-width: 900px){
  .nav-toggle{ display: inline-flex; }

  header.site,
  .public-header-inner{
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
  }

  nav.top,
  .public-nav{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    max-height: calc(100vh - 64px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: .5rem 1rem 1.25rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-md);
  }
  nav.top[data-open="true"],
  .public-nav[data-open="true"]{ display: flex; }

  nav.top a,
  .public-nav a{
    justify-content: flex-start;
    width: 100%;
    min-height: 52px;
    padding: .5rem .25rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.0625rem;
  }
  nav.top a:last-child,
  .public-nav a:last-child{ border-bottom: 0; }

  nav.top a.cta,
  .public-nav a.cta{
    justify-content: center;
    width: 100%;
    min-height: 54px;
    margin-top: .9rem;
    padding: 14px 24px;
    border: 3px solid var(--cta-border);
    border-bottom: 3px solid var(--cta-border);
  }
}

@media (max-width: 640px){
  .wrap{ width: min(100% - 1.5rem, 1080px); }
  .page-shell{
    width: min(100% - 1.5rem, 820px);
    padding: 1.5rem 1.25rem 2rem;
  }
  .hero-stage{ padding-top: 2rem; }

  /* Mobile hero is centred; desktop stays left-aligned. Centring only works if
     every child that has its own max-width also gets auto side margins,
     otherwise the block stays left and only its text centres inside it. */
  .hero-stage,
  .hero-copy{ text-align: center; }
  .hero h1,
  .hero-copy h1{
    max-width: none;
    margin-inline: auto;
  }
  .hero p.sub,
  .hero-copy .sub{
    max-width: 42ch;
    margin-inline: auto;
    text-align: center;
  }
  .hero-copy .eyebrow{ text-align: center; }

  /* One rule for the whole page: on mobile every SECTION HEADING BLOCK centres
     — the hero, the section h2s, and the audit tool's own eyebrow/heading/lead,
     which were left-aligned and read as a misalignment against their centred
     neighbours. Body copy, lists and form controls stay left: centred prose and
     centred form labels are harder to scan. */
  .tool > .eyebrow,
  .tool > h2,
  .tool > p.lead{
    margin-inline: auto;
    text-align: center;
  }
  .hero-proof,
  .hero .fine{ text-align: center; }

  /* Full-width buttons on mobile sit inside cards, not the page, so they have
     less room than the hero's. Measured at 360px: the audit button has 229px
     of inner width and its label needs 258px at 18px — hence the two-line
     button. Dropping to 16px and trimming the side padding gives 237px of room
     for a 229px label. The desktop size is unchanged. */
  .btn,
  .btn-primary,
  .btn.btn-primary,
  .btn-secondary,
  .tool button,
  .capture button{
    width: 100%;
    padding-inline: 1rem;
    font-size: 1rem;
    white-space: normal;
  }
  .hero-actions{ align-items: stretch; flex-direction: column; }

  .quiet-footer .public-footer-inner,
  footer.site{ align-items: flex-start; flex-direction: column; gap: 1rem; }

  input, select, textarea{ min-width: 0 !important; font-size: 16px !important; }
}

@media (max-width: 400px){
  .wrap{ width: min(100% - 1.25rem, 1080px); }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
