/*
  TaxPilot web. Colours, type and radii follow docs/ui-kit.md and mobile/src/theme/tokens.ts:
  this file and tokens.ts are the only places a raw colour may appear.
  Rule 1 from the kit holds here too: yellow (signal) means action.
*/

/* ---------- Fonts (self-hosted: no request to Google from the public pages) ---------- */
@font-face { font-family: "Archivo"; font-weight: 500; font-display: swap; src: url("../fonts/Archivo_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url("../fonts/Archivo_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url("../fonts/Archivo_700Bold.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/Inter_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/Inter_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/Inter_600SemiBold.ttf") format("truetype"); }

/* ---------- Tokens ---------- */
:root {
  --teal: #0F3B36;
  --teal-wing: #7FA79E;
  --signal: #FFC53D;
  --signal-soft: #FFF6DD;
  --paper: #EFEDE6;
  --surface: #FFFFFF;
  --ink: #10231E;
  --ink-soft: #4A5C56;
  --line: #E2E0D7;
  --muted: #C9C6BB;
  --alert: #B8402A;
  --ok: #2E7D5B;
  --ok-soft: #E3F1EA;
  --viewfinder: #0B0F0E;
  --on-teal: #FFFFFF;
  --on-teal-soft: rgba(255, 255, 255, 0.72);
  --on-teal-line: rgba(255, 255, 255, 0.45);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-control: 10px;
  --r-card: 14px;
  --r-fab: 18px;
  --r-screen: 26px;
  --r-pill: 999px;

  --container: 1200px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; color: inherit; }
p { margin: 0; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
img, svg { display: block; }

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: var(--r-control); z-index: 10; }
.skip-link:focus { left: 8px; }

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

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 860px; }
.container--page { max-width: 1120px; }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.on-teal .eyebrow { color: var(--on-teal-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 20px; border-radius: var(--r-control);
  font: 600 16px/1.2 var(--font-body); text-decoration: none; border: 0; cursor: pointer;
  transition: opacity 0.1s;
}
.btn:hover { opacity: 0.9; }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn--signal { background: var(--signal); color: var(--ink); }
.btn--signal:hover { color: var(--ink); }
.btn--teal { background: var(--teal); color: var(--on-teal); }
.btn--teal:hover { color: var(--on-teal); }
.btn--outline-light { border: 1.5px solid var(--on-teal-line); color: var(--on-teal); background: transparent; }
.btn--outline-light:hover { color: var(--on-teal); border-color: var(--on-teal); }
.btn--link { background: none; padding: 0; min-height: 0; color: var(--teal); text-decoration: underline; font-weight: 500; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 22px;
  border-radius: var(--r-control); text-decoration: none;
}
.store-btn__text { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn__small { font-size: 12px; font-weight: 500; }
.store-btn__big { font: 700 19px/1.15 var(--font-display); }
.store-btn__mid { font-weight: 600; font-size: 15px; }
.store-btn--primary { background: var(--signal); color: var(--ink); }
.store-btn--primary:hover { color: var(--ink); opacity: 0.92; }
.store-btn--outline { border: 1.5px solid var(--on-teal-line); color: var(--on-teal); }
.store-btn--outline:hover { color: var(--on-teal); border-color: var(--on-teal); }
.store-btn--soon { border: 1.5px dashed rgba(255, 255, 255, 0.35); color: var(--on-teal-soft); }

/* ---------- Header ---------- */
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 16px; }
.site-header--dark { background: var(--teal); color: var(--on-teal); }
.site-header--light { background: var(--surface); border-bottom: 1px solid var(--line); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand--on-dark, .brand--on-dark:hover { color: var(--on-teal); }
.brand__mark { width: 32px; height: 32px; }
.brand__word { font: 700 21px/1 var(--font-display); letter-spacing: -0.03em; }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 15px; }
.nav__link { color: var(--on-teal-soft); text-decoration: none; }
.nav__link:hover { color: var(--on-teal); }
@media (max-width: 760px) { .nav__link { display: none; } }

.pill-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 15px; }
.pill-nav a { text-decoration: none; color: var(--ink-soft); padding: 6px 14px; border-radius: var(--r-pill); }
.pill-nav a:hover { color: var(--ink); background: var(--paper); }
.pill-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--paper); }

/* ---------- Hero ---------- */
.on-teal { background: var(--teal); color: var(--on-teal); }
.hero { overflow: hidden; }
.hero__grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 48px; padding-top: 56px; }
.hero__copy { flex: 1 1 460px; min-width: 0; padding-bottom: 72px; }
.hero__title { font-weight: 700; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero__lede { font-size: 19px; line-height: 1.55; color: var(--on-teal-soft); max-width: 520px; margin-bottom: 32px; }
.hero__fine { margin-top: 20px; font-size: 14px; color: var(--on-teal-soft); }
.hero__device { flex: 0 1 340px; display: flex; justify-content: center; margin: 0 auto; }

/* Phone mockup: a drawing of the Home screen, not a screenshot, so it never goes stale against the UI kit. */
.phone { width: 320px; max-width: 100%; background: var(--viewfinder); border-radius: 40px 40px 0 0; padding: 12px 12px 0; }
.phone__screen { position: relative; height: 560px; overflow: hidden; background: var(--paper); color: var(--ink); border-radius: 30px 30px 0 0; padding: 22px 16px 0; }
.phone__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.phone__title { font: 600 20px/1.2 var(--font-display); letter-spacing: -0.02em; }
.phone__meta { font-size: 12px; color: var(--ink-soft); }
.phone__label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin: 16px 0 6px; }
.phone__fab { position: absolute; right: 18px; bottom: 74px; width: 56px; height: 56px; background: var(--signal); border-radius: var(--r-fab); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.phone__fab .icon { stroke-width: 2.2; }
.phone__tabs { position: absolute; inset: auto 0 0 0; height: 58px; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; font-size: 11px; color: var(--ink-soft); }
.phone__tabs .is-active { color: var(--teal); font-weight: 600; }

.set-aside { background: var(--teal); color: var(--on-teal); border-radius: var(--r-card); padding: 16px; }
.set-aside__label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-teal-soft); }
.set-aside__value { font: 700 38px/1.1 var(--font-display); letter-spacing: -1px; font-variant-numeric: tabular-nums; margin: 4px 0; }
.set-aside__note { font-size: 12px; color: var(--on-teal-soft); }
.set-aside__link { font-size: 12px; color: var(--signal); font-weight: 600; margin-top: 8px; }
.set-aside--large .set-aside__value { font-size: 40px; margin: 6px 0; }

.mini-card { background: var(--surface); border-radius: var(--r-card); padding: 14px 16px; margin-top: 10px; }
.mini-card__row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.mini-card__due { color: var(--alert); }
.progress { height: 6px; background: var(--line); border-radius: var(--r-pill); margin: 10px 0; }
.progress > span { display: block; height: 6px; background: var(--teal); border-radius: var(--r-pill); }
.mini-card__figures { display: flex; gap: 16px; font-size: 11px; color: var(--ink-soft); }
.mini-card__figures .num { display: block; font-weight: 500; font-size: 15px; color: var(--ink); }

.rows { background: var(--surface); border-radius: var(--r-card); padding: 4px 14px; font-size: 13px; }
.rows__item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows__item:last-child { border-bottom: 0; }
.rows__item--in .num { color: var(--ok); }

/* ---------- Notice strip ---------- */
.notice-strip { border-bottom: 1px solid var(--line); }
.notice-strip__inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; padding-block: 22px; font-size: 15px; color: var(--ink-soft); }
.notice-strip__lead { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.notice-strip__lead .icon { width: 20px; height: 20px; }
.notice-strip__text { flex: 1 1 520px; }

/* ---------- Sections ---------- */
.section { padding-block: 88px; }
.section--white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__title { font-weight: 600; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 48px; max-width: 720px; }
.section__title--tight { margin-bottom: 16px; }
.section__lede { color: var(--ink-soft); font-size: 17px; margin-bottom: 16px; }
.section__note { color: var(--ink-soft); font-size: 15px; }

/* How it works */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.step-card { background: var(--surface); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.step-card__visual { background: var(--paper); border-radius: var(--r-card); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.step-card__index { font: 600 14px/1 var(--font-display); color: var(--ink-soft); margin-bottom: 8px; }
.step-card h3 { font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 8px; }
.step-card p { color: var(--ink-soft); }

.ocr-field { border: 1.5px solid var(--signal); background: var(--signal-soft); border-radius: var(--r-control); padding: 8px 12px; display: flex; justify-content: space-between; font-size: 13px; }
.ocr-field span:first-child { color: var(--ink-soft); }
.ocr-field span:last-child { font-weight: 600; }
.ocr-hint { font-size: 11px; color: var(--ink-soft); }

.quarter-table { font-size: 13px; }
.quarter-table .rows__item { padding: 6px 0; }
.quarter-table__total { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; font-weight: 600; }
.chip-dark { background: var(--teal); color: var(--on-teal); border-radius: var(--r-control); padding: 4px 12px; font-size: 12px; font-weight: 600; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 36px 32px; }
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature .icon { width: 28px; height: 28px; color: var(--teal); stroke-width: 1.6; }
.feature h3 { font-weight: 600; font-size: 18px; }
.feature p { color: var(--ink-soft); font-size: 15px; }

/* MTD */
.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split__side { flex: 1 1 380px; min-width: 0; }
.split__main { flex: 1 1 520px; min-width: 0; }

.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-card); }
.data-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.data-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 16px 24px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 18px 24px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table--compact th, .data-table--compact td { padding: 12px 18px; font-size: 15px; }
.data-table .num { font-weight: 600; }
.tag-alert { color: var(--alert); font-size: 14px; font-weight: 600; }
.table-note { margin-top: 12px; font-size: 13px; color: var(--ink-soft); }

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 600 19px/1.35 var(--font-display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 500; color: var(--ink-soft); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 12px; color: var(--ink-soft); }

/* CTA band */
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding-block: 72px; }
.cta-band__copy { flex: 1 1 480px; min-width: 0; }
.cta-band h2 { font-weight: 700; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 8px; }
.cta-band p { color: var(--on-teal-soft); font-size: 17px; }
.cta-band strong { color: var(--on-teal); }

/* ---------- Footers ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.72); font-size: 14px; }
.site-footer a { color: rgba(255, 255, 255, 0.72); }
.site-footer a:hover { color: var(--on-teal); }
.site-footer__grid { display: flex; flex-wrap: wrap; gap: 40px; padding-block: 56px 40px; }
.site-footer__about { flex: 2 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.site-footer__about p { max-width: 380px; }
.site-footer__about .brand { text-decoration: none; }
.site-footer__col { flex: 1 1 160px; display: flex; flex-direction: column; gap: 10px; }
.site-footer__heading { color: var(--on-teal); font-weight: 600; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 20px 32px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 13px; color: rgba(255, 255, 255, 0.6); }

.slim-footer { border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.slim-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px; }
.slim-footer__links { display: flex; flex-wrap: wrap; gap: 20px; }

/* ---------- Secondary pages ---------- */
.page { padding-block: 56px 80px; }
.page__title { font-weight: 700; font-size: clamp(34px, 4vw, 48px); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 12px; }
.page__lede { font-size: 18px; color: var(--ink-soft); max-width: 680px; margin-bottom: 40px; }
.page__meta { font-size: 15px; color: var(--ink-soft); margin-bottom: 40px; }

.draft { display: inline-block; background: var(--signal); color: var(--ink); font-weight: 600; font-size: 14px; padding: 4px 12px; border-radius: var(--r-pill); margin-bottom: 16px; }

.card { background: var(--surface); border-radius: var(--r-card); padding: 28px; }
.card h2 { font-weight: 600; font-size: 22px; margin-bottom: 12px; }
.card h3 { font-weight: 600; font-size: 19px; margin-bottom: 12px; }
.card > p + p { margin-top: 12px; }
.card ul { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 15px; }
.card li + li { margin-top: 6px; }
.card__muted { color: var(--ink-soft); font-size: 15px; }

.card-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.card-row > * { flex: 1 1 380px; min-width: 0; }

.numbered { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; counter-reset: step; }
.numbered li { display: flex; gap: 14px; align-items: flex-start; counter-increment: step; }
.numbered li::before { content: counter(step); flex: 0 0 28px; height: 28px; border-radius: var(--r-pill); background: var(--paper); font: 600 14px/28px var(--font-display); text-align: center; }

.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.timeline__item { border-top: 3px solid var(--teal); padding-top: 16px; }
.timeline__item--wait { border-top-color: var(--teal-wing); }
.timeline__item--final { border-top-color: var(--alert); }
.timeline__when { font: 600 18px/1.3 var(--font-display); margin-bottom: 6px; }
.timeline__item p { color: var(--ink-soft); font-size: 15px; }

.block-title { font-weight: 600; font-size: 26px; letter-spacing: -0.01em; margin-bottom: 24px; }
.stack-lg > * + * { margin-top: 56px; }
.stack-sm > * + * { margin-top: 20px; }

.callout { background: var(--signal-soft); border: 1.5px solid var(--signal); border-radius: var(--r-card); padding: 22px 28px; display: flex; gap: 16px; align-items: flex-start; }
.callout .icon { margin-top: 2px; }
.callout__title { font-weight: 600; margin-bottom: 4px; }
.callout p { font-size: 15px; color: var(--ink-soft); }
.callout strong { color: var(--ink); }

/* Legal */
.legal { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.toc { flex: 1 1 220px; max-width: 260px; font-size: 14px; position: sticky; top: 24px; }
.toc__label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 1.5px solid var(--line); }
.toc a { display: block; padding: 6px 14px; margin-left: -1.5px; border-left: 1.5px solid transparent; color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--teal); }
@media (max-width: 860px) { .toc { position: static; max-width: none; } }

.prose { flex: 999 1 560px; min-width: 0; max-width: 720px; line-height: 1.65; }
.prose section { margin-bottom: 36px; scroll-margin-top: 24px; }
.prose h2 { font-weight: 600; font-size: 24px; letter-spacing: -0.01em; margin-bottom: 10px; }
.prose p + p, .prose p + ul, .prose ul + p, .prose .table-wrap + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin: 0; }
.prose li + li { margin-top: 6px; }
.prose .summary { margin-bottom: 40px; }
.prose__intro { margin-bottom: 36px; }
.prose p + .table-wrap { margin-top: 16px; }

/* Auth action page (/auth/action) */
.auth-page { min-height: 100vh; background: var(--teal); display: flex; flex-direction: column; align-items: center; padding: 64px 16px; }
.auth-page .brand { margin-bottom: 32px; }
.auth-page .brand__mark { width: 36px; height: 36px; }
.auth-page .brand__word { font-size: 24px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--r-card); padding: 32px; }
.auth-card h1 { font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-card p { color: var(--ink-soft); font-size: 15px; }
.auth-card p + p { margin-top: 12px; }
.auth-card strong { color: var(--ink); }
.auth-card .btn { width: 100%; }
.auth-foot { margin-top: 24px; font-size: 13px; color: var(--on-teal-soft); text-align: center; max-width: 440px; }
.auth-foot a { color: var(--on-teal); }
.status-icon { width: 48px; height: 48px; border-radius: var(--r-pill); background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }

.form { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.form label { font-size: 13px; font-weight: 500; }
.input { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--muted); border-radius: var(--r-control); background: var(--surface); color: var(--ink); min-height: 48px; width: 100%; }
.input:focus { border-color: var(--teal); outline: 2px solid var(--teal); outline-offset: 0; }
.form__hint { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.form__error { font-size: 14px; color: var(--alert); font-weight: 500; }

.spinner { width: 28px; height: 28px; border-radius: var(--r-pill); border: 3px solid var(--line); border-top-color: var(--teal); animation: spin 0.8s linear infinite; margin: 8px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

[hidden] { display: none !important; }

/* Not found / error */
.empty-state { padding-block: 120px; text-align: left; }
.empty-state p { color: var(--ink-soft); font-size: 18px; margin: 12px 0 28px; max-width: 520px; }
