/* WireFlow public pages (website + buy pages on HQ). Same tokens as the app: navy and one amber accent. */
@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f6f7f9; --surface: #fff; --surface-2: #f1f3f6; --line: #e3e7ed; --line-strong: #cfd6e0;
  --ink: #0f172a; --ink-2: #334155; --ink-3: #5c6879;
  --accent: #f59e0b; --accent-hover: #e38e05; --accent-ink: #0f172a; --accent-text: #a8520a; --accent-soft: #fdf1d6;
  --navy: #0f172a; --navy-2: #1c263b; --navy-ink: #c2cad7;
  --good: #15803d; --good-soft: #e3f6e9; --bad: #b91c1c; --bad-soft: #fde4e4; --note: #1d4ed8; --note-soft: #e1eafd;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(15 23 42 / .05), 0 4px 16px rgb(15 23 42 / .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0a0f1b; --surface: #111827; --surface-2: #171f31; --line: #243049; --line-strong: #33415e;
    --ink: #e8edf5; --ink-2: #b6c0cf; --ink-3: #8f9bb0;
    --accent: #fbbf24; --accent-hover: #fcca4d; --accent-text: #fbbf24; --accent-soft: rgb(251 191 36 / .13);
    --navy: #070b14; --navy-2: #151d2e;
    --good: #4ade80; --good-soft: rgb(74 222 128 / .13); --bad: #f87171; --bad-soft: rgb(248 113 113 / .14); --note: #7aa7fa; --note-soft: rgb(96 165 250 / .14);
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 "Geist", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 680; }
h3 { font-size: 1.125rem; font-weight: 620; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
code, .mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: .92em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }
.narrow { max-width: 44rem; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 40rem; }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--navy) 94%, transparent); backdrop-filter: blur(8px); color: #fff; }
.site-head .wrap { display: flex; align-items: center; gap: 1rem; height: 4rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.125rem; text-decoration: none; color: #fff; letter-spacing: -0.01em; }
.logo svg { width: 2rem; height: 2rem; }
.site-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.site-nav a:not(.button) { color: var(--navy-ink); text-decoration: none; font-weight: 500; font-size: .9375rem; padding: .5rem .7rem; border-radius: var(--radius-sm); }
.site-nav a:not(.button):hover, .site-nav a[aria-current="page"] { color: #fff; background: var(--navy-2); }
@media (max-width: 640px) { .site-nav a.hide-sm { display: none; } }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .6rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-family: inherit; font-weight: 600; font-size: .9375rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s; touch-action: manipulation; }
.button:hover { background: var(--surface-2); }
.button-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-lg { min-height: 3.25rem; padding: .8rem 1.5rem; font-size: 1.0625rem; }
.button-block { width: 100%; }
.button-ghost-dark { background: transparent; border-color: rgb(255 255 255 / .25); color: #fff; }
.button-ghost-dark:hover { background: rgb(255 255 255 / .08); }
.button[disabled] { opacity: .6; cursor: default; }

/* Sections */
.hero { background: var(--navy); color: #fff; padding: 4.5rem 0 5rem; }
.hero .lead { color: var(--navy-ink); margin-top: 1.25rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero .fine { margin-top: 1rem; color: var(--navy-ink); font-size: .875rem; }
.eyebrow { display: inline-block; margin-bottom: 1rem; color: var(--accent); font-weight: 600; font-size: .875rem; letter-spacing: .02em; }
.section { padding: 4.5rem 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 2.5rem; }
.section-head .lead { margin-top: .75rem; }

.grid { display: grid; gap: 1rem; }
.grid > * { min-width: 0; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 720px) and (max-width: 999px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card h3 + p { margin-top: .5rem; color: var(--ink-2); }
.feature-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 1rem; }
.feature-icon svg { width: 1.35rem; height: 1.35rem; }

/* Screens mock */
.shot { border-radius: var(--radius); border: 1px solid rgb(255 255 255 / .12); background: var(--navy-2); padding: .75rem; margin-top: 3rem; box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.shot-inner { border-radius: 8px; background: var(--bg); color: var(--ink); padding: 1rem; display: grid; gap: .75rem; }
@media (min-width: 720px) { .shot-inner { grid-template-columns: 1.4fr 1fr; padding: 1.25rem; } }
.mini-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: .875rem; }
.mini-row b { font-weight: 600; }
.mini-row .grow { flex: 1; min-width: 0; }
.mini-row .muted { display: block; font-size: .8125rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--pill, var(--ink-3)) 13%, transparent); color: color-mix(in srgb, var(--pill, var(--ink-3)) 80%, var(--ink)); }
.pill::before { content: ""; width: .4rem; height: .4rem; border-radius: 99px; background: var(--pill, var(--ink-3)); }
.pill-good { --pill: var(--good); } .pill-note { --pill: var(--note); } .pill-accent { --pill: var(--accent); }
.mini-metric { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; }
.mini-metric .n { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Plans */
.period-switch { display: inline-flex; padding: .25rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); gap: .25rem; margin-bottom: 2rem; }
.period-switch label { position: relative; padding: .45rem 1rem; border-radius: 7px; font-weight: 600; font-size: .9375rem; cursor: pointer; color: var(--ink-2); }
.period-switch input { position: absolute; opacity: 0; pointer-events: none; }
.period-switch label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.period-switch label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.save { color: var(--good); font-size: .8125rem; margin-left: .25rem; }
.plans { display: grid; gap: 1rem; align-items: stretch; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { position: relative; display: flex; flex-direction: column; gap: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem 1.5rem; box-shadow: var(--shadow); }
.plan-featured { border: 2px solid var(--accent); }
.plan-flag { position: absolute; top: -.8rem; left: 1.5rem; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.plan .price { display: flex; align-items: baseline; gap: .35rem; }
.plan .price b { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan .for { color: var(--ink-2); font-size: .9375rem; min-height: 3rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .9375rem; }
.ticks li { display: flex; gap: .6rem; align-items: flex-start; }
.ticks li::before { content: ""; flex: none; width: 1.1rem; height: 1.1rem; margin-top: .2rem; border-radius: 99px; background: var(--good-soft)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2315803d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; }
.ticks li.no { color: var(--ink-3); }
.ticks li.no::before { background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 8h6' fill='none' stroke='%238f9bb0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/80% no-repeat; }
.plan .button { margin-top: auto; }
.show-annual, .plan .price.show-annual { display: none; }
.plans + p { margin-top: 1.25rem; }
.pricing:has(#p-annual:checked) .show-annual { display: revert; }
.pricing:has(#p-annual:checked) .button.show-annual, .pricing:has(#p-annual:checked) .price.show-annual { display: flex; }
.pricing:has(#p-annual:checked) .show-monthly { display: none; }
.plan h2 { font-size: 1.35rem; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.compare { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 34rem; }
table.compare th, table.compare td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
table.compare thead th { font-size: .8125rem; color: var(--ink-3); font-weight: 600; background: var(--surface-2); }
table.compare tbody tr:last-child td, table.compare tbody tr:last-child th { border-bottom: 0; }
table.compare td { font-variant-numeric: tabular-nums; }
table.compare tbody th { font-weight: 500; }

/* FAQ */
.faq { display: grid; gap: .75rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: .75rem; color: var(--ink-2); }

/* Steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 99px; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 1rem; }
@media (prefers-color-scheme: dark) { .steps li::before { background: var(--accent); color: var(--accent-ink); } }
.steps p { margin-top: .4rem; color: var(--ink-2); }
.narrow .steps { grid-template-columns: 1fr; }
.narrow .steps li { display: grid; grid-template-columns: 2rem 1fr; column-gap: 1rem; padding: 1.1rem 1.25rem; }
.narrow .steps li::before { grid-row: span 2; margin: 0; }

/* CTA band */
.cta { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 2.5rem 1.5rem; text-align: center; }
.cta p { color: var(--navy-ink); margin: .75rem auto 1.5rem; max-width: 36rem; }

/* Forms (buy page) */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; align-content: start; }
.label { font-weight: 600; font-size: .875rem; }
.optional { color: var(--ink-3); font-weight: 400; }
.input { width: 100%; min-height: 2.75rem; padding: .6rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.hint { font-size: .8125rem; color: var(--ink-3); }
.choice-grid { display: grid; gap: .5rem; }
@media (min-width: 560px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; display: block; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .8rem .9rem; cursor: pointer; background: var(--surface); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { display: block; }
.choice span { font-size: .875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9375rem; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; accent-color: var(--accent); }
.notice { display: flex; gap: .6rem; padding: .8rem 1rem; border-radius: var(--radius-sm); font-size: .9375rem; background: var(--note-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--note) 25%, transparent); }
.notice-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.notice-good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.summary { display: grid; gap: .5rem; font-size: .9375rem; }
.summary div { display: flex; justify-content: space-between; gap: 1rem; }
.summary .total { border-top: 1px solid var(--line); padding-top: .6rem; font-weight: 700; font-size: 1.0625rem; }
.key { font-family: "Geist Mono", ui-monospace, monospace; font-size: clamp(1.1rem, 4vw, 1.6rem); font-weight: 600; letter-spacing: .04em; padding: 1rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px dashed var(--line-strong); text-align: center; user-select: all; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 0; font-size: .9375rem; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 500; }
.buy-layout { display: grid; gap: 1.5rem; padding: 2.5rem 0 4rem; }
@media (min-width: 900px) { .buy-layout { grid-template-columns: 1fr 22rem; align-items: start; } .buy-layout aside { position: sticky; top: 5.5rem; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--ink-3); font-size: .875rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.card-title { font-size: 1.25rem; }
.card-intro { margin-top: .35rem; }
.card-list { margin-top: 1.1rem; }

/* Help centre */
.hero-sm { padding: 3.5rem 0 3.75rem; }
.stack-lg > * + * { margin-top: 3rem; }
.help-section-title { font-size: 1.35rem; margin-bottom: 1rem; }
.card-link { display: block; text-decoration: none; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--accent); }
.card-link p { margin-top: .4rem; color: var(--ink-2); font-size: .9375rem; }
.help-layout { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 4rem; }
@media (min-width: 960px) { .help-layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; } .help-nav { position: sticky; top: 5.5rem; align-self: start; max-height: calc(100vh - 7rem); overflow-y: auto; } }
@media (max-width: 959px) { .help-nav ul, .help-nav-head { display: none; } }
.help-nav { font-size: .9rem; }
.help-back { display: inline-block; font-weight: 600; color: var(--accent-text); text-decoration: none; margin-bottom: .5rem; }
.help-back::before { content: "\2190  "; }
.help-nav-head { margin-top: 1.25rem; margin-bottom: .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.help-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.help-nav li a { display: block; padding: .35rem .6rem; border-radius: 6px; color: var(--ink-2); text-decoration: none; }
.help-nav li a:hover { background: var(--surface-2); color: var(--ink); }
.help-nav li a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.eyebrow-dark { color: var(--accent-text); font-weight: 600; font-size: .875rem; margin-bottom: .5rem; }
.prose { max-width: 44rem; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.prose .lead { margin-top: .75rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2.5rem; scroll-margin-top: 5.5rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.75rem; scroll-margin-top: 5.5rem; }
.prose p, .prose ul, .prose ol, .prose pre, .prose .table-wrap, .prose .notice { margin-top: 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .4rem; }
.prose li > ul, .prose li > ol { margin-top: .4rem; }
.prose a { color: var(--accent-text); text-underline-offset: 2px; }
.prose strong { font-weight: 650; }
.prose code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: .05rem .3rem; font-size: .85em; overflow-wrap: anywhere; }
pre.code { background: var(--navy); color: #e8edf5; border-radius: var(--radius-sm); padding: .9rem 1rem; overflow-x: auto; font-size: .85rem; line-height: 1.55; }
pre.code code { background: none; border: 0; padding: 0; color: inherit; overflow-wrap: normal; }
.prose .table-wrap table.compare { min-width: 0; }
.help-note { display: block; }
.help-foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: grid; gap: 1rem; justify-items: start; }
.help-layout > * { min-width: 0; }

/* Legal pages */
.legal .prose { max-width: 46rem; }
.legal-draft { display: block; margin-bottom: 1.5rem; }
mark.gap { background: #fde68a; color: #0f172a; padding: 0 .2rem; border-radius: 3px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9rem; margin-top: 1.25rem; }
.legal-toc a { color: var(--accent-text); }
