/* Docket — one stylesheet, no framework, no build step.
   Every value comes from assets/tokens.css, which is generated from design/tokens.css
   (ST-20010) and linked before this file on every page. This file defines no colours of
   its own: a hex value here is a token that was missed. Check with
   `python3 design/contrast.py --audit`. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--weight-regular) var(--text-base)/var(--leading-body) var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

/* ── nav ─────────────────────────────────────────────────────────────────── */
.nav { border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.nav__inner { display: flex; align-items: center; justify-content: space-between;
              gap: 18px; padding-block: 15px; }
.brand { font-weight: var(--weight-bold); font-size: var(--text-lg); letter-spacing: var(--tracking-brand);
         color: var(--ink); text-decoration: none;
         display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { display: block; width: 32px; height: 32px; border-radius: 8px; flex: none; }
.nav__links { display: flex; gap: 18px; flex-wrap: wrap; }
.nav__links a { color: var(--ink-2); text-decoration: none; font-size: .95rem;
                min-height: var(--tap); display: inline-flex; align-items: center; }
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); font-weight: var(--weight-strong); }

/* ── general ─────────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(40px, 7vw, 78px) 8px; }
h1 { font-size: var(--text-2xl); line-height: var(--leading-heading);
     letter-spacing: var(--tracking-h1); margin: 0 0 18px; }
h2 { font-size: var(--text-xl); letter-spacing: var(--tracking-h2); margin: 2.1rem 0 .7rem; }
h3 { font-size: 1.04rem; margin: 1.5rem 0 .4rem; }
p { margin: 0 0 1rem; }
.lede { font-size: var(--text-lg); color: var(--ink-2); }
.hero__who { color: var(--ink-3); font-size: .97rem; }
.section { padding-block: 10px 22px; }
a { color: var(--accent); }
:focus-visible { outline: var(--focus-width) solid var(--focus);
                 outline-offset: var(--focus-offset); border-radius: 2px; }

/* ── call to action ──────────────────────────────────────────────────────── */
.cta { margin: 30px 0 8px; padding: 24px; border: 1px solid var(--line);
       border-radius: var(--r); background: var(--bg-raised); }
.cta__head { margin-top: 0; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink);
       text-decoration: none; padding: 13px 22px;
       min-height: var(--tap); border: 0; font: inherit; font-weight: var(--weight-strong);
       cursor: pointer; border-radius: var(--r); }
.btn:hover { filter: brightness(1.08); }
.cta__note { margin: 12px 0 0; color: var(--ink-3); font-size: var(--text-sm); }

/* ── steps and points ────────────────────────────────────────────────────── */
.steps { list-style: none; margin: 1.1rem 0 0; padding: 0; counter-reset: s;
         display: flex; flex-direction: column; gap: 1.15rem; }
.steps li { counter-increment: s; display: flex; gap: .9rem; align-items: flex-start; }
.steps li::before { content: counter(s); flex: 0 0 auto; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; display: grid; place-items: center; font-size: .84rem;
  font-weight: 700; background: var(--accent); color: var(--accent-ink); margin-top: .1rem; }
.steps b { display: block; }
.steps p { margin: .2rem 0 0; color: var(--ink-2); }
.point { border-top: 1px solid var(--line); padding: 1rem 0; }
.point b { display: block; }
.point p { margin: .2rem 0 0; color: var(--ink-2); }
.price h2 { margin-top: 1.4rem; }

/* ── long-form documents ─────────────────────────────────────────────────── */
.doc { max-width: var(--wrap-doc); }
.doc__date { color: var(--ink-3); font-size: var(--text-sm); margin-top: -8px; }
.defs { margin: .5rem 0 0; }
.defs dt { font-weight: var(--weight-strong); margin-top: 1rem; }
.defs dd { margin: .2rem 0 0; color: var(--ink-2); }
.note { border-left: 3px solid var(--accent); padding: .3rem 0 .3rem 1rem;
        margin: 1.3rem 0; color: var(--ink-2); }
.callout { }
.callout > h2 { margin-top: 2.4rem; }
.callout > h2, .callout > p, .callout > .defs {
  background: var(--callout-bg); }
.callout > h2 { border: 1px solid var(--callout-line); border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0; padding: 16px 20px 4px; margin-bottom: 0; }
.callout > p, .callout > .defs { border-inline: 1px solid var(--callout-line);
  padding: 4px 20px; margin: 0; }
.callout > *:last-child { border-bottom: 1px solid var(--callout-line);
  border-radius: 0 0 var(--r) var(--r); padding-bottom: 18px; }

/* ── tables ──────────────────────────────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: .96rem; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: .65rem .8rem .65rem 0;
                   border-top: 1px solid var(--line); font-weight: 400; }
.tbl thead th { font-weight: var(--weight-strong); border-top: 0; color: var(--ink-3);
                font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.tbl tbody th { font-weight: var(--weight-strong); }
.tbl td { color: var(--ink-2); }
/* Stacked rather than side-scrolled on narrow screens: a three-column row that needs
   horizontal scrolling to read is worse than three stacked lines. */
@media (max-width: 640px) {
  .tbl, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; width: auto; }
  .tbl thead { display: none; }
  .tbl tr { border-top: 1px solid var(--line); padding: .7rem 0; }
  .tbl th, .tbl td { border: 0; padding: 0; }
  .tbl tbody th { margin-bottom: .2rem; }
}

/* ── footer ──────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding-block: 26px 40px;
          color: var(--ink-3); font-size: var(--text-sm); }
.footer__legal { margin-bottom: .4rem; }
.footer__links a { color: var(--ink-2); }

/* Beta signup form (ST-79523) */
.beta-form { max-width: 30rem; margin: 1.5rem 0; }
.beta-form .field { margin-bottom: 1.1rem; }
.beta-form label { display: block; font-weight: var(--weight-strong); margin-bottom: .35rem; }
.beta-form .req { color: var(--status-danger); }
.beta-form input, .beta-form textarea {
  width: 100%; padding: .6rem .7rem; font: inherit;
  color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg-raised); box-sizing: border-box; min-height: var(--tap);
}
.beta-form textarea { resize: vertical; }
.beta-form input:focus-visible, .beta-form textarea:focus-visible {
  outline-offset: 0; border-color: var(--focus); }
.beta-form .check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; }
.beta-form .check input { width: auto; margin-top: .25rem; flex: none; }
.wa-link { font-weight: 600; }
.field__help { margin: .3rem 0 0; font-size: var(--text-sm); color: var(--ink-3); }
.form__intro { color: var(--ink-3); }
/* Honeypot: off-screen, not display:none, so bots that skip hidden fields still fill it. */
.beta-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.beta-status { margin-top: 1rem; font-weight: var(--weight-strong); }
.beta-status.ok { color: var(--status-success); }
.beta-status.err { color: var(--status-danger); }

/* ── wide sections: the lifecycle and the tiers need more than a reading column ── */
.wrap--wide { max-width: 68rem; }
.wrap--wide > h2, .wrap--wide > .lede { max-width: var(--wrap); }

/* ── status tags. The words carry the meaning; colour only repeats it. ───── */
.tag { display: inline-block; vertical-align: .12em; margin-left: var(--space-1);
       padding: 1px var(--space-2); border-radius: var(--radius-pill);
       font-size: var(--text-xs); font-weight: var(--weight-strong);
       letter-spacing: .01em; white-space: nowrap; }
.tag--pilot { color: var(--human); background: var(--human-bg); border: 1px solid var(--human); }
.tag--planned { color: var(--ink-2); background: var(--bg-raised); border: 1px solid var(--line-strong); }

/* ── how it works (ST-53898) ─────────────────────────────────────────────── */
.life { list-style: none; margin: var(--space-6) 0 0; padding: 0; counter-reset: life;
        display: flex; flex-direction: column; gap: var(--space-6); }
.life__step { counter-increment: life; display: grid; gap: var(--space-4);
              grid-template-columns: 1fr; align-items: start;
              padding-top: var(--space-5); border-top: 1px solid var(--line); }
.life__text h3 { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.life__text h3::before { content: counter(life); display: inline-grid; place-items: center;
  width: 1.75rem; height: 1.75rem; margin-right: var(--space-3); border-radius: 50%;
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  background: var(--accent); color: var(--accent-ink); vertical-align: .1em; }
.life__text p { color: var(--ink-2); margin: 0 0 var(--space-2); }
.life__note { font-size: var(--text-sm); }
.life__note .tag { margin-left: 0; margin-right: var(--space-1); }
@media (min-width: 760px) {
  .life__step { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--space-7); }
}

/* WhatsApp depiction. Draws a thread with the --wa-* tokens; it is an illustration,
   not a screenshot, and WhatsApp's own rendering is outside our control (WHATSAPP.md). */
.wa { margin: 0; background: var(--wa-chat-bg); border-radius: var(--r);
      padding: var(--space-4) var(--space-3); display: flex; flex-direction: column;
      gap: var(--space-2); font: 15px/1.4 var(--font-sans); }
.wa__who { align-self: center; font-size: 12px; color: var(--wa-meta); margin-bottom: var(--space-1); }
.wa__msg { max-width: 88%; border-radius: var(--radius-bubble); overflow: hidden;
           box-shadow: 0 1px 0.5px rgb(0 0 0 / 0.13); }
.wa__msg--in { align-self: flex-start; background: var(--wa-in-bg); color: var(--wa-in-ink);
               border-top-left-radius: 0; }
.wa__msg--out { align-self: flex-end; background: var(--wa-out-bg); color: var(--wa-out-ink);
                border-top-right-radius: 0; }
.wa__text { margin: 0; padding: 6px 9px 6px; overflow-wrap: anywhere; }
/* A caption wraps to the photo's width, as it does in WhatsApp. */
.wa__msg--photo { width: min(88%, 15rem); }
.wa__photo { display: grid; place-items: center; width: calc(100% - 8px); aspect-ratio: 4 / 3;
             margin: 4px 4px 0; border-radius: calc(var(--radius-bubble) - 2px);
             background: var(--wa-chat-bg); color: var(--wa-meta); font-size: 12px; }
.wa__btns { display: block; border-top: 1px solid rgb(127 127 127 / 0.28); }
.wa__btn { display: block; text-align: center; padding: 10px 8px; font-weight: 500;
           color: var(--wa-button-ink); border-top: 1px solid rgb(127 127 127 / 0.28); }
.wa__btns .wa__btn:first-child { border-top: 0; }

/* ── pricing (ST-53898). Rendered from scripts/pricing_data.py only. ─────── */
.pilot { margin: var(--space-4) 0 var(--space-6); padding: var(--space-5);
         background: var(--human-bg); border: 1px solid var(--human); border-radius: var(--r); }
.pilot__head { font-size: var(--text-xl); font-weight: var(--weight-bold);
               letter-spacing: var(--tracking-h2); margin: 0 0 var(--space-2); color: var(--ink); }
.pilot p { max-width: var(--wrap); color: var(--ink-2); }
.tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4);
         grid-template-columns: 1fr; }
@media (min-width: 860px) { .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tier { background: var(--bg-raised); border: 1px solid var(--line-strong);
        border-radius: var(--r); padding: var(--space-5); }
.tier__name { margin: 0; font-size: var(--text-lg); }
.tier__price { margin: var(--space-2) 0 var(--space-3); font-size: var(--text-xl);
               font-weight: var(--weight-bold); color: var(--ink); }
.tier__price--pending { font-size: var(--text-base); font-weight: var(--weight-strong); color: var(--ink-2); }
.tier__for { color: var(--ink-2); }
.tier__usage { font-size: var(--text-sm); color: var(--ink-2); }
.tier__includes { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--ink-3); }
.tier__features { margin: 0; padding-left: 1.1rem; }
.tier__features li { margin: 0 0 var(--space-2); }
.tiers__note { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--ink-3); }

/* ── home: hero, invoice demo, everything in WhatsApp, what the agent does
      (ST-53898, docket-website#15). Tokens only. ─────────────────────────── */
.hero.wrap--wide > h1, .hero.wrap--wide > .lede, .hero.wrap--wide > .hero__who { max-width: 44rem; }
.btn--quiet { background: transparent; color: var(--accent); border: 1px solid var(--line-strong);
              margin-left: var(--space-2); }
.btn--quiet:hover { filter: none; background: var(--accent-soft); }
.cta .btn + .btn { margin-top: var(--space-2); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
      clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.demo { margin: var(--space-5) 0 0; }
.demo__phones { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 760px) { .demo__phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); } }
.phone { background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: calc(var(--r) * 2);
         padding: var(--space-2); overflow: hidden; }
.phone__bar { display: flex; flex-direction: column; padding: var(--space-3) var(--space-4); }
.phone__bar b { font-size: var(--text-base); color: var(--ink); }
.phone__bar span { font-size: var(--text-sm); color: var(--ink-3); }
.wa--screen { border-radius: calc(var(--r) * 1.4); padding: var(--space-3); gap: var(--space-2); }
.wa__text { white-space: pre-line; }
.wa__time { display: block; text-align: right; padding: 0 9px 5px; font-size: 11px; color: var(--wa-meta); }
.wa__msg--in .wa__text, .wa__msg--out .wa__text { padding-bottom: 2px; }
.wa__chip { align-self: center; margin: var(--space-2) 0; padding: 3px var(--space-3);
            border-radius: var(--radius-pill); background: var(--wa-in-bg); color: var(--wa-meta);
            font-size: 12px; box-shadow: 0 1px 0.5px rgb(0 0 0 / 0.13); }
.demo__caption { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--ink-3); }

/* Live: fixed-height screens, newest message at the bottom, older ones scroll off the top. */
.demo--live .wa--screen { height: 30rem; overflow: hidden; justify-content: flex-start; }
/* A bubble must never shrink to fit the screen: it would clip its own text. */
.demo--live .wa--screen > * { flex-shrink: 0; }
.demo--live [data-step] { display: none; }
.demo--live [data-step].is-on { display: block; animation: wa-pop .28s ease-out both; }
.demo--live .wa__msg[data-step].is-on { display: block; }
.demo--live .wa__msg--out[data-step].is-on { align-self: flex-end; }
.demo--live .wa__chip[data-step].is-on { display: block; align-self: center; }
@keyframes wa-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .demo--live [data-step].is-on { animation: none; } }

.facts, .does { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid;
                gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
                            .does { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 560px) and (max-width: 899px) { .does { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fact, .does__item { background: var(--bg-raised); border: 1px solid var(--line-strong);
                     border-radius: var(--r); padding: var(--space-4) var(--space-5); }
.fact b { display: block; margin-bottom: var(--space-2); }
.fact p, .does__item p { margin: 0 0 var(--space-2); color: var(--ink-2); }
.does__item h3 { margin: 0 0 var(--space-2); font-size: var(--text-base); }
.does__tier { margin: 0; font-size: var(--text-xs); text-transform: uppercase;
              letter-spacing: var(--tracking-caps); color: var(--ink-3); }

/* sign-up page */
.note--approve { background: var(--human-bg); border: 1px solid var(--human);
                 border-left-width: 4px; border-radius: var(--r); padding: var(--space-4) var(--space-5); }
.note--approve b { display: block; margin-bottom: var(--space-1); color: var(--ink); }
.note--approve p { margin: 0; color: var(--ink-2); }

/* ── icons (ST-53898). One drawing style, currentColor, in a round token-coloured badge. ── */
.badge { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: 0 0 auto;
         border-radius: 50%; background: var(--accent-soft); color: var(--accent);
         margin-bottom: var(--space-3); }
.badge .icon { display: block; width: 28px; height: 28px; }
.point--icon { display: flex; gap: var(--space-4); align-items: flex-start; }
.point--icon .badge { margin-bottom: 0; }
.does__item h3 { margin-top: 0; }

/* ── icons (ST-53898). One drawing style, currentColor, in a round token-coloured badge. ── */
.badge { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: 0 0 auto;
         border-radius: 50%; background: var(--accent-soft); color: var(--accent);
         margin-bottom: var(--space-3); }
.badge .icon { display: block; width: 28px; height: 28px; }
.point--icon { display: flex; gap: var(--space-4); align-items: flex-start; }
.point--icon .badge { margin-bottom: 0; }
.does__item h3 { margin-top: 0; }
/* Security page key diagram (ST-20514). Drawn from the theme tokens, so it reads
   in light and dark; scales down with the column and never scrolls the page. */
.keys { margin: var(--space-4) 0 var(--space-5); }
.keys svg { width: 100%; height: auto; display: block; }
.keys__box { fill: var(--bg-raised); stroke: var(--line); stroke-width: 1.5; }
.keys__box--accent { stroke: var(--accent); stroke-width: 2; }
.keys__t { fill: var(--ink); font: var(--weight-bold) 15px var(--font-sans); }
.keys__s { fill: var(--ink-3); font: 400 13px var(--font-sans); }
.keys__arrow { stroke: var(--ink-3); stroke-width: 1.5; fill: none; marker-end: none; }

/* ── the hook (Jim, 2026-10-24) ─────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
           overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hook__task { color: var(--accent); display: inline-block;
              transition: opacity .26s ease, transform .26s ease; }
.hook__task.is-out { opacity: 0; transform: translateY(.18em); }
@media (prefers-reduced-motion: reduce) { .hook__task { transition: none; } }
.hero__key { font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--ink);
             margin: var(--space-3) 0 var(--space-2); max-width: 44rem; }
.hero__roles { font-size: var(--text-lg); color: var(--ink-2); margin: 0 0 var(--space-3); max-width: 44rem; }
.demo__try { margin-top: var(--space-5); }
