/* ── Chalk & Paper — QuickScore landing ────────────────────────────────────
   Palette locked to apps/quickscore/mobile/src/paperTheme.ts (light theme).
   Fonts below are self-hosted (variable woff2, latin subset) rather than fetched from a
   font CDN, so the page needs no third-party request to render its own type. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/Fraunces-variable-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/Inter-variable-latin.woff2') format('woff2');
}

:root {
  /* COUPLING: --sage must match $primary in apps/quickscore/admin/src/assets/css/bootstrap5.scss,
     BRAND_PRIMARY_COLOR in apps/quickscore/mobile/app.config.js, lightPaperTheme.colors.primary in
     apps/quickscore/mobile/src/paperTheme.ts, and QUICKSCORE_BRAND_GREEN in
     libs/quickscore/common/src/email/buildQuickscoreEmail.ts — this file is served to the browser
     as-is, and plain CSS can import neither a Sass variable nor a TS const. */
  --sage: #50783F; /* white on --sage 5.123:1, --sage on --cream 4.654:1 — both tight, no headroom for a further tweak.
     --sage on --cream-2 4.864:1 (the estimator's lighter paper fill), and --sage on --sage-soft
     only 4.059:1, which is why text over the soft tint uses --sage-deep instead. */
  --sage-rgb: 80, 120, 63; /* --sage's channels, for the rgba() halos below — keeps the green searchable as one token */
  --sage-deep: #3F5E31; /* 5.825:1 on --sage-soft — the darker step for text/icons on the soft container tint.
     --sage-deep on --cream 6.678:1, the darker hover/emphasis step over the page background. */
  /* COUPLING: --sage-soft must match primaryContainer in apps/quickscore/mobile/src/paperTheme.ts
     and primary25 in apps/quickscore/admin/src/hooks/useAppContext/index.tsx — plain CSS cannot
     import a TS value. */
  --sage-soft: #D9EAD1; /* primary container */
  /* COUPLING: --rose must match $secondary in apps/quickscore/admin/src/assets/css/bootstrap5.scss
     and secondary/tertiary in apps/quickscore/mobile/src/paperTheme.ts — plain CSS can import
     neither a Sass variable nor a TS value. */
  --rose: #c77d8a;
  --rose-soft: #fce4e4;
  --cream: #f7f6d3;
  --cream-2: #fbfae8; /* lighter paper for large fields */
  --surface: #ffffff;
  --ink: #4a3b3b; /* on-surface text */
  --muted: #6e5f5f; /* on-surface variant */
  --muted-invert: #a59d8c; /* muted text on dark surfaces (footer) */
  --outline: #e7e4d8;
  --success: #388e3c;
  --link: #1565c0;

  --radius: 6px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(74, 59, 59, 0.06), 0 4px 14px rgba(74, 59, 59, 0.05);
  --shadow-md: 0 6px 30px rgba(74, 59, 59, 0.1);
  --maxw: 1120px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  /* faint paper grid */
  background-image: radial-gradient(circle at 1px 1px, rgba(74, 59, 59, 0.05) 1px, transparent 0);
  background-size: 22px 22px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.accent {
  position: relative;
  white-space: nowrap;
}
.accent::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08em;
  height: 0.32em;
  background: var(--rose-soft);
  border-radius: 3px;
  z-index: -1;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--sage);
  color: #fff;
  /* halo tracks the fill it surrounds — no contrast pairing of its own */
  box-shadow: 0 6px 18px rgba(var(--sage-rgb), 0.35);
}
.btn-primary:hover {
  /* the filter darkens the label along with the fill, so the pairing that actually paints
     is #F0F0F0 on #4B713B — 4.948:1. Lightening was rejected: it only spends headroom,
     down to 4.663:1. */
  filter: brightness(0.94);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--outline);
}
.btn-ghost:hover {
  border-color: var(--sage);
  color: var(--sage-deep);
}
.btn-rose {
  background: var(--rose);
  color: #fff;
}
.btn-rose:hover {
  filter: brightness(0.96);
}

/* ── Nav ─────────────────────────────────────────────── */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  /* opaque — a translucent/blurred surface has no defined WCAG contrast ratio, so text painted on one can't be measured */
  background: var(--cream);
  border-bottom: 1px solid var(--outline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.28rem;
  color: var(--ink);
}
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  transform: rotate(-4deg);
  overflow: hidden;
  line-height: 0;
}
.brand .mark img,
.brand .mark svg {
  width: 34px;
  height: 34px;
  display: block;
}
nav.links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
nav.links a {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.96rem;
}
nav.links a:hover,
nav.links a:focus-visible {
  color: var(--ink);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.menu-btn {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 4rem);
  letter-spacing: -0.015em;
}
.hero .sub {
  margin-top: 1.25rem;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34ch;
}
.hero .cta-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.store-row {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.15;
}
.store-badge .big {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--body);
}
.store-badge-eyebrow {
  opacity: 0.8;
}
.store-badge.soon {
  background: #edebdd;
  color: var(--muted);
  cursor: default;
}
.store-badge svg {
  width: 22px;
  height: 22px;
}

/* phone + scanned sheet */
.device {
  position: relative;
  justify-self: center;
}
.sheet {
  position: absolute;
  left: -46px;
  top: 34px;
  width: 190px;
  rotate: -8deg;
  background: #fff;
  border-radius: 8px;
  padding: 16px 16px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--outline);
}
.sheet h4 {
  font-family: var(--body);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.sheet .q {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 9px 0;
}
.sheet .bub {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #cfc9bd;
}
.sheet .bub.on {
  background: var(--ink);
  border-color: var(--ink);
}
.sheet .line {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: #ece8dd;
}
.phone {
  position: relative;
  width: 268px;
  height: 540px;
  border-radius: 40px;
  background: linear-gradient(160deg, #2f2b23, #191712);
  padding: 12px;
  box-shadow: 0 30px 60px rgba(74, 59, 59, 0.28);
  border: 1px solid #000;
}
.phone .screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: var(--cream-2);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone .app-top {
  padding: 22px 18px 14px;
  background: var(--sage-soft);
}
.phone .app-top .t {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--sage-deep);
}
.phone .app-top .s {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}
.phone .app-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.result-card {
  background: #fff;
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.result-card .name {
  font-weight: 600;
  font-size: 0.84rem;
}
.result-card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.score-pill {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--sage-deep);
}
.badge-flag {
  font-size: 0.66rem;
  background: var(--rose-soft);
  color: #a24c5b;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.badge-done {
  font-size: 0.66rem;
  background: var(--sage-soft);
  color: var(--sage-deep);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.graded-stamp {
  position: absolute;
  right: -22px;
  bottom: 72px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  display: grid;
  place-items: center;
  /* halo tracks the fill it surrounds — no contrast pairing of its own */
  box-shadow: 0 12px 26px rgba(var(--sage-rgb), 0.5);
  rotate: 8deg;
  animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) 0.5s both;
}
.graded-stamp svg {
  width: 40px;
  height: 40px;
}
.graded-stamp svg path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.5s ease 0.9s forwards;
}
@keyframes pop {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .graded-stamp {
    animation: none;
  }
  .graded-stamp svg path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* ── Section scaffolding ─────────────────────────────── */
section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}
.band {
  background: var(--surface);
  border-top: 1px solid var(--outline);
  border-bottom: 1px solid var(--outline);
}
.sec-head {
  max-width: 620px;
  margin: 0 auto 3rem;
  text-align: center;
}
.sec-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-top: 0.6rem;
}
.sec-head p {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 1.08rem;
}

/* trust strip */
.trust {
  /* the new brand green, not --sage-deep */
  background: var(--sage);
  color: #fff; /* the old near-white (#eaf3e3) was rejected — only 4.495:1 on this base */
}
.trust .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2.6rem;
  padding: 1.1rem 24px;
  text-align: center;
}
.trust .item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.96rem;
  font-weight: 500;
}
.trust .item b {
  font-family: var(--display);
}

/* features */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card .ic {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--sage-deep);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.card .ic svg {
  width: 24px;
  height: 24px;
}
.card h3 {
  font-size: 1.18rem;
  display: inline;
}
.card h3 .u {
  box-shadow: inset 0 -0.35em 0 var(--rose-soft);
}
.card p {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.98rem;
}

/* how it works */
.how-it-works-video {
  aspect-ratio: 720 / 930;
  max-width: 420px;
  margin: 0 auto 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--outline);
}
.how-it-works-video video,
.how-it-works-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 1rem;
}
.step .n {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(199, 125, 138, 0.35);
  margin-bottom: 1rem;
}
.step h3 {
  font-size: 1.12rem;
}
.step p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.96rem;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 23px;
  left: 58px;
  right: -18px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--outline) 0 8px, transparent 8px 16px);
}

/* what it reads */
.reads-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.read-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
}
.read-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.read-card p {
  color: var(--muted);
}
.chips {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--outline);
  color: var(--ink);
}

/* pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
/* Panel treatment shared with .estimator below (:1111) — grouped here to avoid
   duplicating it byte-for-byte in the estimator block. */
.price,
.estimator {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 2rem 1.7rem;
  box-shadow: var(--shadow-sm);
}
.price {
  display: flex;
  flex-direction: column;
}
.price.featured {
  border: 2px solid var(--sage);
  box-shadow: var(--shadow-md);
  position: relative;
}
.price.featured .tag {
  position: absolute;
  top: -13px;
  left: 1.7rem;
  background: var(--sage);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.price h3,
.estimator h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.price .amt,
.estimator-total {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.6rem;
}
.price .amt {
  margin: 0.6rem 0 0.2rem;
}
.price .amt small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  font-family: var(--body);
}
.price-desc {
  color: var(--muted);
  font-size: 0.94rem;
}
.price ul {
  list-style: none;
  padding: 0;
  margin: 1.3rem 0 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.price li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--ink);
}
.price li svg {
  width: 18px;
  height: 18px;
  color: var(--sage-deep);
  flex: none;
  margin-top: 3px;
}
.price .btn {
  margin-top: auto;
  justify-content: center;
}
.ph {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
}

/* faq */
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.qa {
  border-bottom: 1px solid var(--outline);
}
.qa button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 1.25rem 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.qa button:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 2px;
}
.qa button .plus {
  flex: none;
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform 0.2s ease;
}
.qa button .plus::before,
.qa button .plus::after {
  content: '';
  position: absolute;
  background: var(--sage-deep);
  border-radius: 2px;
}
.qa button .plus::before {
  left: 4px;
  right: 4px;
  top: 11px;
  height: 2px;
}
.qa button .plus::after {
  top: 4px;
  bottom: 4px;
  left: 11px;
  width: 2px;
  transition: opacity 0.2s ease;
}
.qa.open button .plus::after {
  opacity: 0;
}
.qa .a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  color: var(--muted);
}
.qa .a p {
  padding-bottom: 1.25rem;
}

/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.contact-copy h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}
.contact-copy p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.08rem;
}
form.lead {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.field {
  margin-bottom: 1rem;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.field-optional {
  color: var(--muted);
  font-weight: 400;
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--outline);
  font-family: var(--body);
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--cream-2);
}
.field input::placeholder,
.field textarea::placeholder {
  /* the UA default placeholder grey (#757575) is only 4.375:1 on the --cream-2 field fill —
     it clears 4.5:1 on white but not on cream, so the colour is set here rather than left to
     the browser. --muted is 5.755:1 on --cream-2 and stays lighter than the --ink typed value.
     opacity:1 overrides Firefox's 0.54 UA default, which would otherwise composite --muted
     down to an unmeasurable translucent grey. */
  color: var(--muted);
  opacity: 1;
}
.field input:focus,
.field textarea:focus,
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--sage);
  /* halo tracks the fill it surrounds — no contrast pairing of its own */
  box-shadow: 0 0 0 3px rgba(var(--sage-rgb), 0.2);
}
.field .err {
  color: #a24c5b;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}
.field.invalid input,
.field.invalid textarea {
  border-color: var(--rose);
}
.field.invalid .err {
  display: block;
}
.form-ok {
  display: none;
  background: var(--sage-soft);
  color: var(--sage-deep);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.form-ok.show {
  display: block;
}
/* Server/network failure banner — same shape as .form-ok, rose tone
   instead of sage so success vs retry read as distinct at a glance. */
.form-err {
  display: none;
  background: var(--rose-soft);
  color: #a24c5b;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.form-err.show {
  display: block;
}
form.lead .btn {
  width: 100%;
  justify-content: center;
}

/* footer */
footer {
  background: #2f2b23;
  color: #d9d3c4;
  padding: 3.5rem 0 2rem;
}
.foot-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
footer .brand {
  color: #fff;
}
footer .brand .mark {
  /* the master-SVG mark carries its own sage square — no background override */
}
footer .cols {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
}
footer .cols h5 {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-invert);
  margin: 0 0 0.9rem;
}
footer .cols a {
  display: block;
  color: #d9d3c4;
  font-size: 0.94rem;
  margin-bottom: 0.5rem;
}
footer .cols a:hover,
footer .cols a:focus-visible {
  color: #fff;
}
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted-invert);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.foot-brand-copy {
  max-width: 280px;
}
.foot-tagline {
  margin-top: 1rem;
  color: var(--muted-invert);
  font-size: 0.94rem;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  nav.links {
    display: none;
  }
  .menu-btn {
    display: block;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero .sub {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }
  .hero .cta-row,
  .store-row {
    justify-content: center;
  }
  .device {
    margin-top: 2rem;
  }
  .cards,
  .steps,
  .price-grid {
    grid-template-columns: 1fr 1fr;
  }
  .step:not(:last-child)::after {
    display: none;
  }
  .reads-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  nav.links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--outline);
    padding: 1rem 24px 1.4rem;
    gap: 1rem;
    align-items: flex-start;
  }
}
@media (max-width: 560px) {
  .cards,
  .steps,
  .price-grid {
    grid-template-columns: 1fr;
  }
  .nav-cta .btn-ghost {
    display: none;
  }
  /* Keep the "Get the app" CTA compact on small screens so it stays a single-line
     pill next to the logo + hamburger instead of wrapping into a tall blob that
     overflows the nav and overlaps the wordmark. */
  .nav-cta {
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .nav-cta .btn-primary {
    white-space: nowrap;
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
  }
}

/* 404 page — the site has no Bootstrap, so style with the brand system. */
.notfound { text-align: center; padding: clamp(4rem, 12vw, 9rem) 24px; }
.notfound h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.notfound p { color: var(--muted); margin-bottom: 1.6rem; }
/* the sage rest state, not --link: this page paints no other accent, so the material blue
   would be the only non-brand hue on it. Hover darkens to --sage-deep. */
.notfound a { color: var(--sage); font-weight: 600; }
.notfound a:hover { color: var(--sage-deep); }

/* Delete-account page — standalone (no header/footer), narrow reading column
   so the Google-mandated copy and request form stay legible. */
.delete-account { max-width: 640px; padding-top: clamp(3rem, 8vw, 5rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.delete-account h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.delete-account .eyebrow { display: block; margin-top: 0.6rem; }
.delete-account section { padding: 1.6rem 0 0; }
.delete-account h2 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.delete-account ol { padding-left: 1.2rem; color: var(--muted); }
.delete-account ol li { margin-bottom: 0.4rem; }
.delete-account section p { color: var(--muted); margin-bottom: 0.5rem; }
.delete-account form.lead { margin-top: 2rem; }

/* Join-school invite page — standalone (no header/footer), reached from the
   emailed invite link. Narrow reading column like .delete-account. */
.join-school { max-width: 640px; padding-top: clamp(3rem, 8vw, 5rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.join-school h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
/* the eyebrow is a <p> here, so .join-school p's --muted would otherwise win on specificity
   and paint this one role a different colour than it has on every other page. --sage-deep
   restores .eyebrow's own token. */
.join-school .eyebrow { display: block; margin-top: 0.6rem; color: var(--sage-deep); }
.join-school p { margin-top: 1.2rem; color: var(--muted); }
.join-school p strong { color: var(--ink); }
/* the sage rest state, not --link — see .notfound a above. */
.join-school a { color: var(--sage); font-weight: 600; }
.join-school a:hover { color: var(--sage-deep); }
.join-school-warning {
  margin-top: 1.4rem;
  background: var(--rose-soft);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  font-weight: 600;
}
.join-school-ack {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.4rem;
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
}
.join-school-ack input { margin-top: 0.2rem; accent-color: var(--sage); }
.join-school .btn { margin-top: 1.4rem; }
.join-school .btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Legal / Help pages (privacy, terms, help index, help article) — Chalk & Paper themed,
   standalone. All three share the same reading column, home link and heading/paragraph
   typography; .help-body additionally carries h3, blockquote, img, iframe and video, which
   legal copy never uses, and .help-index-body swaps prose for the card list below instead. ── */
.legal, .help { max-width: 760px; padding-top: 2.5rem; padding-bottom: 5rem; }
.legal-home {
  display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 2.2rem;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--ink);
}
.legal-home .legal-mark {
  width: 30px; height: 30px; border-radius: 8px; overflow: hidden; line-height: 0;
  box-shadow: var(--shadow-sm); transform: rotate(-4deg);
}
.legal-home .legal-mark img { width: 30px; height: 30px; display: block; }
.legal-home:hover { color: var(--sage-deep); }
.legal-body h1, .help-body h1, .help-head h1 {
  font-family: var(--display); font-size: clamp(2rem, 4vw, 2.7rem); color: var(--ink);
  letter-spacing: -.01em; margin-bottom: .6rem;
}
.legal-body h2, .help-body h2 {
  font-family: var(--display); font-size: 1.4rem; color: var(--ink);
  margin: 2.2rem 0 .6rem; padding-bottom: .3rem;
  box-shadow: inset 0 -.32em 0 var(--rose-soft);
  display: inline-block;
}
.legal-body p, .legal-body li, .help-body p, .help-body li, .help-head p, .help-index-body > p {
  color: var(--muted); line-height: 1.75; margin: .8rem 0;
}
.legal-body strong, .help-body strong { color: var(--ink); }
.legal-body ul, .legal-body ol, .help-body ul, .help-body ol { padding-left: 1.4rem; }
/* the sage rest state, not --link — see .notfound a above; the hover below darkens to
   --sage-deep. */
.legal-body a, .help-body a { color: var(--sage); font-weight: 600; }
.legal-body a:hover, .help-body a:hover { color: var(--sage-deep); }
/* the effective-date line sits right under the title — .legal-body only: .help-body's own
   first paragraph is HelpListPage/HelpArticlePage's loading, error or empty-state text, never
   a styled lede, so this must stay ungrouped rather than also matching .help-body. */
.legal-body > p:first-of-type { color: var(--sage-deep); font-weight: 600; margin-top: 0; }

/* ── Help-exclusive body tags — an article body can hold these; legal copy never does ── */
.help-body h3 {
  font-family: var(--display); font-size: 1.15rem; color: var(--ink);
  margin: 1.8rem 0 .5rem;
}
.help-body blockquote {
  margin: 1.4rem 0; padding: .2rem 1.2rem; border-left: 3px solid var(--outline);
  color: var(--muted); font-style: italic;
}
.help-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.help-body iframe {
  width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-lg); display: block;
}
.help-body video {
  max-width: 100%; height: auto; border-radius: var(--radius-lg); display: block;
}

/* Back-to-index crumb on the article page — nests inside .help-body, so it already inherits
   .help-body a's color/weight/hover above; this just adds the crumb's own layout. */
.crumb { display: inline-block; font-size: .8125rem; text-decoration: none; margin-bottom: .875rem; }

/* ── Help index — card list (a bare <ul>/<li> left the title as the page's only
   interactive element, indistinguishable from static bold text once .help-body's `strong`
   rule masked the link color). Own classes rather than .help-body, and the whole card — not
   just the title — is the <a>, so the click target and its hover affordance (border + lift)
   are unmistakable regardless of text color. Ported from the prototype board, values pulled
   from the :root palette above. ── */
.help-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .7rem; }
.help-card {
  display: block; text-decoration: none; background: var(--surface);
  border: 1px solid var(--outline); border-radius: var(--radius);
  padding: 1rem 1.1rem; transition: border-color .15s ease, transform .15s ease;
}
.help-card:hover { border-color: var(--sage); transform: translateY(-1px); }
.help-card h2 { font-family: var(--display); font-size: 1.1rem; margin: 0 0 .3rem; color: var(--ink); }
.help-card p { margin: 0; font-size: .875rem; color: var(--muted); line-height: 1.6; }
.help-meta { display: flex; align-items: center; gap: .55rem; margin-top: .65rem; font-size: .72rem; color: var(--muted); }
.pill {
  /* --ink on --sage-soft clears 8.4:1; kept the sage background so the tag still reads
     as the green pill it always was. */
  background: var(--sage-soft); color: var(--ink); border-radius: 999px;
  padding: .1rem .55rem; font-weight: 600; letter-spacing: .02em;
}

/* ── Pricing scan-cost estimator — appended per the section convention ── */
.estimator {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.7rem;
  align-items: start;
}
.estimator-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 1rem;
  row-gap: 0;
}
.estimator-hint {
  color: var(--muted);
  font-size: 0.85rem;
}
.estimator-result {
  /* Grid items default to min-width: auto, so an unbreakable long total (e.g. ₱199,400,599.80
     at the inputs' legal maximum) forces the whole page to scroll horizontally at phone
     widths — this overrides the intrinsic minimum so the box can shrink and wrap instead. */
  min-width: 0;
  background: var(--cream-2);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
}
.estimator-sheets {
  /* Emphasised, but a clear second to .estimator-total (2.6rem/--display/--ink) rather than a
     rival: smaller size, body font (no --display), and --sage (the AA-passing green already
     used by .estimator-pack below) rather than --ink so it doesn't read as a second total. */
  color: var(--sage);
  font-size: 1.25rem;
  font-weight: 700;
}
.estimator-rate {
  color: var(--muted);
  font-size: 0.94rem;
}
.estimator-total {
  margin: 0.4rem 0 0.2rem;
  /* Second defense alongside .estimator-result's min-width: 0 — lets the long unbroken
     total itself wrap instead of forcing the page to scroll horizontally. */
  overflow-wrap: anywhere;
}
.estimator-pack {
  /* --sage rather than --sage-deep: it clears the AA floor on --cream-2 unaided, so this
     surface needs no darker step. */
  color: var(--sage);
  font-weight: 600;
}
.estimator-pack a {
  /* Rest colour matches the surrounding --sage text, so the underline
     alone carries the link affordance — colour no longer distinguishes it from its parent
     .estimator-pack text. */
  color: var(--sage);
  text-decoration: underline;
}
.estimator-pack a:hover,
.estimator-pack a:focus-visible {
  /* --ink — follows nav.links a's muted-to-ink emphasis idiom (:217-219) so hover/focus read
     distinctly darker than the --sage rest state. */
  color: var(--ink);
}
.estimator-note {
  background: var(--rose-soft);
  border-left: 3px solid var(--rose);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-top: 1rem;
  font-size: 0.94rem;
  line-height: normal;
}
@media (max-width: 900px) {
  .estimator {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .estimator-inputs {
    grid-template-columns: 1fr;
  }
}
