/* Espark Consulting — public site.
   Tokens and rules follow oscar-consulting-design-system/DESIGN_SYSTEM.md v2.0:
   80/15/5 neutral·teal·accent, warm neutrals only (no grey anywhere), soft
   corners, real air, one accent per section, accents as fill and never as text. */

@font-face{font-family:'Bricolage Grotesque';font-style:normal;font-weight:500 700;font-display:swap;src:url(/fonts/bricolage.woff2) format('woff2')}
@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:400 600;font-display:swap;src:url(/fonts/instrument.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/plexmono400.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/plexmono500.woff2) format('woff2')}

:root{
  --es-teal:#2F5D5E; --es-teal-deep:#25494A; --es-teal-tint:#DCE7E4;
  --es-ink:#21201C; --es-paper:#FAF7F1; --es-cream:#F2ECE1; --es-card:#FFFFFF;
  --es-clay:#CB8264; --es-ochre:#DCA755; --es-sage:#8FB097; --es-blue:#8BA6C6; --es-plum:#B27E93;
  --es-clay-deep:#9A5A3C; --es-ochre-deep:#8A6318; --es-sage-deep:#4A7A55;
  --es-blue-deep:#4C6C90; --es-plum-deep:#8A5A6C;
  --es-n200:#EBE3D5; --es-n300:#CBBFA9; --es-n500:#8A857B; --es-n600:#6B6862; --es-n700:#4A4842;

  --bg:var(--es-paper); --fg:var(--es-ink); --muted:var(--es-n700);
  --faint:var(--es-n600); --rule:var(--es-n200); --card:var(--es-card);
  --alt:var(--es-cream);
  /* Teal is the link colour on Paper but only 2:1 on Ink, so the dark surface
     swaps to sage. Never hardcode teal on an inline link. */
  --link:var(--es-teal);

  --display:'Bricolage Grotesque',system-ui,sans-serif;
  --text:'Instrument Sans',system-ui,-apple-system,sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace;

  --shadow:0 8px 24px rgba(33,32,28,.06);
  --page:1120px;
}

/* Ink surface. The brand book's fourth surface, reused as the dark theme. */
@media (prefers-color-scheme:dark){
  :root{
    --bg:var(--es-ink); --fg:var(--es-paper); --muted:rgba(250,247,241,.78);
    --faint:rgba(250,247,241,.62); --rule:rgba(250,247,241,.14);
    --card:#2A2925; --alt:#2A2925; --link:var(--es-sage);
  }
}
:root[data-theme="dark"]{
  --bg:var(--es-ink); --fg:var(--es-paper); --muted:rgba(250,247,241,.78);
  --faint:rgba(250,247,241,.62); --rule:rgba(250,247,241,.14);
  --card:#2A2925; --alt:#2A2925; --link:var(--es-sage);
}
:root[data-theme="light"]{
  --bg:var(--es-paper); --fg:var(--es-ink); --muted:var(--es-n700);
  --faint:var(--es-n600); --rule:var(--es-n200); --card:var(--es-card);
  --alt:var(--es-cream); --link:var(--es-teal);
}

.link{color:var(--link);font-weight:500}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--fg);
  font:400 17px/1.6 var(--text);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img,svg{max-width:100%}
a{color:inherit}

/* ---------------------------------------------------------------- layout --- */
.wrap{width:100%;max-width:var(--page);margin:0 auto;padding:0 28px}
section{padding:88px 0}
@media (max-width:720px){section{padding:60px 0}.wrap{padding:0 20px}}

.surface-alt{background:var(--alt)}
.surface-teal{background:var(--es-teal);color:var(--es-paper)}
/* Ochre on teal is 3.4:1 — the design system allows it as a full stop at 24px+
   but never as a small label, which is exactly what an 11px eyebrow is. Paper
   at .82 gives 5.4:1; the system's stated floor for paper-on-teal is .75. */
.surface-teal .eyebrow{color:rgba(250,247,241,.82)}
.surface-teal .lead,.surface-teal p{color:rgba(250,247,241,.86)}

/* ------------------------------------------------------------------ type --- */
.eyebrow{
  font:500 11px/1 var(--mono);letter-spacing:.2em;text-transform:uppercase;
  color:var(--faint);margin:0 0 18px;display:block;
}
h1,h2,h3{font-family:var(--display);letter-spacing:-.03em;line-height:1.02;margin:0}
h1{font-size:clamp(38px,6.2vw,60px);font-weight:700}
h2{font-size:clamp(29px,4.2vw,40px);font-weight:700;margin-bottom:18px}
h3{font-size:20px;font-weight:600;letter-spacing:-.02em;line-height:1.25}
.lead{font:500 clamp(19px,2.2vw,23px)/1.45 var(--text);color:var(--muted);max-width:62ch;margin:20px 0 0}
p{margin:14px 0 0;color:var(--muted);max-width:68ch}
.small{font-size:15px}
.fine{font:400 13px/1.5 var(--text);color:var(--faint)}

/* The ochre spark: a confident headline ends on an ochre full stop. */
.spark{color:var(--es-ochre)}

/* --------------------------------------------------------------- header --- */
header.site{
  position:sticky;top:0;z-index:40;background:color-mix(in srgb,var(--bg) 88%,transparent);
  backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--rule);
}
header.site .wrap{display:flex;align-items:center;gap:20px;height:68px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:600}
.brand .name{font:600 17px/1 var(--display);letter-spacing:-.02em}
.brand .bolt{width:24px;height:24px;flex:0 0 24px}
nav.site{margin-left:auto;display:flex;align-items:center;gap:26px;flex-shrink:0}
/* On the utility pages body is a flex column, which lets these links shrink and
   wrap mid-phrase. Nav labels are short by design — never wrap them. */
nav.site a{font:500 15px/1 var(--text);color:var(--muted);text-decoration:none;white-space:nowrap}
nav.site a:hover{color:var(--fg)}
/* `nav.site a` outspecifies `.btn`, so the CTA needs its colour restated here or
   it inherits the muted link colour and fails contrast on the teal fill. */
nav.site a.btn,nav.site a.btn:hover{color:#FAF7F1}
@media (max-width:820px){nav.site a:not(.btn){display:none}}

/* -------------------------------------------------------------- buttons --- */
.btn{
  display:inline-flex;align-items:center;gap:9px;
  background:var(--es-teal);color:#FAF7F1;text-decoration:none;
  border:none;border-radius:14px;padding:14px 22px;cursor:pointer;
  font:500 15px/1 var(--text);transition:background .16s ease,transform .16s ease;
}
.btn:hover{background:var(--es-teal-deep);transform:translateY(-1px)}
.btn.ghost{background:transparent;color:var(--fg);border:1px solid var(--rule)}
.btn.ghost:hover{background:var(--alt);transform:none}
.surface-teal .btn{background:var(--es-paper);color:var(--es-teal)}
.surface-teal .btn:hover{background:#fff}

/* ----------------------------------------------------------------- hero --- */
.hero{padding:clamp(64px,10vw,120px) 0 clamp(56px,8vw,96px);text-align:center}
.hero h1{max-width:16ch;margin:0 auto}
.hero .lead{margin:26px auto 0;text-align:center}
.hero .cta-row{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:36px}

/* ----------------------------------------------------------------- home --- */
/* The home page is one title and one button. Centre it in whatever the header
   leaves of the viewport — laid out as an ordinary section it sits high on the
   screen with the footer stranded in the empty half below it. svh rather than
   vh: on mobile, vh counts browser chrome the page never gets to use. */
.home{min-height:100vh;min-height:100svh;display:flex;flex-direction:column}
/* The full screen below the header, not just what the footer leaves over. The
   banner's lanes run to 84% and need the height to read as drift rather than as
   a crowded row; the footer moving below the fold is the price, and on a page
   whose only job is the button, that is the right way round. 68px is the header
   height, as in .q. */
.home .hero{
  flex:1;min-height:calc(100svh - 68px);
  display:grid;place-items:center;padding:clamp(56px,10vh,110px) 0;
  /* The banner below is absolutely positioned against this, and has to be cut
     off at the section edge rather than at the page edge. `isolation` keeps the
     layer's stacking to this section so it can never rise over the header. */
  position:relative;overflow:clip;isolation:isolate;
}
.home .hero .wrap{position:relative;z-index:2}
/* Bigger than the shared h1 token, per the banner design: on a page with one
   sentence on it, that sentence is the page. Balance keeps the last line from
   coming out as a single orphaned word. */
.home .hero h1{font-size:clamp(38px,6.4vw,80px);letter-spacing:-.035em;max-width:15ch}
.home .hero h1,.home .hero .lead{text-wrap:balance}
.home .hero .lead{font-weight:400}
.home .hero .btn{min-height:52px;padding:0 30px;font-size:17px;font-weight:600}

/* ---------------------------------------------------------- hero banner --- */
/* Fragments of a finished plan drifting behind the headline at a fraction of
   their real contrast — the emergency fund, the spending waterfall, the
   retirement curve. Strictly decorative: the layer is aria-hidden, carries
   nothing the page needs, and sits at opacity 0 until the script runs, so no
   JS means no banner and nothing else about the page changes.
   Every number in it is invented. Nothing here is a claim about a result. */
.hb{
  position:absolute;inset:0;z-index:1;pointer-events:none;opacity:0;
  /* The centre is masked out. A card drifting behind the words has to vanish
     there rather than compete with them, and a mask does that on the card's
     own shape — fading the whole layer would only make the edges weaker too. */
  -webkit-mask-image:radial-gradient(ellipse 40% 38% at 50% 48%,rgba(0,0,0,0) 42%,rgba(0,0,0,1) 100%);
          mask-image:radial-gradient(ellipse 40% 38% at 50% 48%,rgba(0,0,0,0) 42%,rgba(0,0,0,1) 100%);
}
/* top and transform are the script's; everything else is the card's own. */
.hb-card{position:absolute;left:0;top:0;display:flex;flex-direction:column;border-radius:20px}
.hb-card.paper{background:var(--card);border:1px solid var(--rule);box-shadow:var(--shadow);padding:20px;gap:12px}
.hb-card.cream{background:var(--alt);border:1px solid var(--es-n300);padding:20px;gap:10px}
/* Teal is a brand surface, not a themed one: it stays teal on the ink theme
   exactly as .surface-teal does, so the paper-on-teal values below hold in
   both. */
.hb-card.teal{background:var(--es-teal);color:var(--es-paper);padding:22px;gap:14px}
.hb-card.mark{border-radius:0}
.hb-card.mark svg{display:block}

.hb-kicker{font:500 10px/1 var(--mono);letter-spacing:.22em;text-transform:uppercase;color:var(--faint)}
.hb-card.teal .hb-kicker{color:rgba(250,247,241,.75)}
.hb-name{font:600 15px/1.2 var(--text)}
.hb-num{font:700 30px/1 var(--display);letter-spacing:-.03em}
.hb-mono{font:400 11px/1.2 var(--mono);color:var(--faint)}
.hb-card.teal .hb-mono{color:rgba(250,247,241,.75)}
.hb-note{font:400 12px/1.4 var(--text);color:var(--muted)}
.hb-card.teal .hb-note{color:rgba(250,247,241,.8)}
.hb-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.hb-chip{font:400 12px/1 var(--mono);color:var(--es-blue-deep);background:var(--alt);border-radius:9999px;padding:7px 13px}
.hb-track{height:10px;border-radius:9999px;background:var(--es-n200);overflow:hidden}
.hb-card.teal .hb-track{height:8px;background:rgba(250,247,241,.16)}
.hb-fill{height:100%;width:0;border-radius:9999px}
.hb-rule{height:1px;background:rgba(250,247,241,.22)}
.hb-key{display:flex;align-items:center;gap:7px;font:400 11px/1 var(--mono);color:var(--muted)}
.hb-key i{width:9px;height:9px;border-radius:9999px}

/* The waterfall. Bars are absolutely placed against a fixed 148px plot so each
   one can start at the level the one before it ended — the drop is the point,
   and a flex row cannot say it. Their tops are one-offs and stay inline. */
.hb-plot{position:relative;height:148px}
.hb-axis{position:absolute;left:0;right:0;bottom:26px;height:1px;background:var(--es-n300)}
.hb-bars{position:absolute;inset:0 0 26px 0;display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.hb-bars>div{position:relative}
.hb-bars b{position:absolute;left:0;font:500 10px/1 var(--mono);color:var(--muted);white-space:nowrap}
.hb-bars i{position:absolute;left:0;right:0;height:0;border-radius:5px}
.hb-cats{position:absolute;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(7,1fr);gap:8px;font:400 9px/1.15 var(--text);color:var(--faint);text-align:center}
.hb-stats{display:flex;gap:8px}
.hb-stats>div{flex:1;border:1px solid rgba(250,247,241,.18);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:3px}
.hb-stats b{font:700 15px/1.1 var(--display);letter-spacing:-.02em}
.hb-stats span{font:400 10px/1.2 var(--text);color:rgba(250,247,241,.7)}

/* Under ~720px a 220px card is a third of the screen: at that size the drift
   stops reading as texture behind the words and starts reading as clutter on
   top of them. The headline is what the page is for. */
@media (max-width:720px){.hb{display:none}}

/* ---------------------------------------------------------------- stats --- */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:24px;margin-top:44px}
.stat{background:var(--card);border:1px solid var(--rule);border-radius:16px;padding:28px;box-shadow:var(--shadow)}
.stat .n{font:700 clamp(44px,6vw,60px)/1 var(--display);letter-spacing:-.04em;color:var(--es-ochre-deep)}
.stat p{margin-top:12px;font-size:16px}
.stat .src{margin-top:16px;font:400 12px/1.4 var(--mono);color:var(--faint)}
@media (prefers-color-scheme:dark){.stat .n{color:var(--es-ochre)}}
:root[data-theme="dark"] .stat .n{color:var(--es-ochre)}

/* Visible marker so unverified copy cannot ship unnoticed. */
.todo{
  display:inline-block;font:500 11px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;
  background:var(--es-ochre);color:#3D2E0A;border-radius:999px;padding:5px 9px;
}

/* ------------------------------------------------------------- timeline --- */
.timeline{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin-top:52px;position:relative}
.timeline::before{
  content:'';position:absolute;top:23px;left:12.5%;right:12.5%;height:1px;background:var(--rule);
}
.tl-step{text-align:center;padding:0 10px;position:relative}
.tl-dot{
  width:46px;height:46px;border-radius:999px;margin:0 auto 16px;
  display:grid;place-items:center;background:var(--bg);
  border:1.5px solid var(--rule);
  font:500 14px/1 var(--mono);color:var(--muted);position:relative;z-index:1;
}
.tl-step:nth-child(1) .tl-dot{border-color:var(--es-clay);color:var(--es-clay-deep)}
.tl-step:nth-child(2) .tl-dot{border-color:var(--es-sage);color:var(--es-sage-deep)}
.tl-step:nth-child(3) .tl-dot{border-color:var(--es-blue);color:var(--es-blue-deep)}
.tl-step:nth-child(4) .tl-dot{background:var(--es-teal);border-color:var(--es-teal);color:var(--es-ochre);font-size:17px}
.tl-step h3{font-size:16px;font-family:var(--text);font-weight:600;letter-spacing:0}
@media (max-width:720px){
  .timeline{grid-template-columns:1fr;gap:26px;text-align:left}
  .timeline::before{display:none}
  .tl-step{display:flex;gap:16px;align-items:center;text-align:left;padding:0}
  .tl-dot{margin:0;flex:0 0 46px}
}
/* On teal the `-deep` accents fall to ~2:1, and the nth-child rules above
   outspecify a plain `.surface-teal .tl-dot`. Restate at matching specificity:
   paper at 0.92 clears AA, and only the ochre fill carries the ∞. */
.surface-teal .timeline::before{background:rgba(250,247,241,.2)}
.surface-teal .tl-step:nth-child(1) .tl-dot,
.surface-teal .tl-step:nth-child(2) .tl-dot,
.surface-teal .tl-step:nth-child(3) .tl-dot{
  background:var(--es-teal);border-color:rgba(250,247,241,.34);color:rgba(250,247,241,.92);
}
/* Ink on the ochre fill, not teal: teal-on-ochre is 3.4:1, which the design
   system only permits at 24px+. Ink clears AA at this size. */
.surface-teal .tl-step:nth-child(4) .tl-dot{
  background:var(--es-ochre);border-color:var(--es-ochre);color:var(--es-ink);font-size:19px;
}
.surface-teal .tl-step h3{color:var(--es-paper)}

/* -------------------------------------------------------------- session --- */
.sessions{display:grid;gap:22px;margin-top:44px}
.session{
  background:var(--card);border:1px solid var(--rule);border-radius:18px;
  padding:32px;box-shadow:var(--shadow);
  display:grid;grid-template-columns:150px 1fr;gap:32px;align-items:start;
}
.session .tag{font:500 11px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--faint)}
.session .tag .num{
  display:block;font:700 34px/1 var(--display);letter-spacing:-.03em;
  color:var(--es-teal);margin-bottom:8px;
}
@media (prefers-color-scheme:dark){.session .tag .num{color:var(--es-sage)}}
:root[data-theme="dark"] .session .tag .num{color:var(--es-sage)}
@media (max-width:720px){.session{grid-template-columns:1fr;gap:14px;padding:26px}}

/* The Sesión 2 contrast — conceptual only, never the mechanics. */
.contrast{display:grid;grid-template-columns:1fr auto 1fr;gap:16px;align-items:center;margin-top:22px}
.contrast .panel{border-radius:16px;padding:22px 24px;min-height:118px;display:flex;flex-direction:column;justify-content:center}
.contrast .panel.before{background:var(--alt);border:1px solid var(--rule)}
.contrast .panel.after{background:var(--es-teal);color:var(--es-paper)}
.contrast .panel .k{font:500 11px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;margin-bottom:10px;color:var(--faint)}
.contrast .panel.after .k{color:rgba(250,247,241,.82)}
.contrast .panel .v{font:700 21px/1.2 var(--display);letter-spacing:-.02em}
.contrast .arrow{
  width:38px;height:38px;border-radius:999px;background:var(--es-ochre);
  display:grid;place-items:center;color:var(--es-ink);font-size:18px;flex:0 0 38px;
}
@media (max-width:720px){
  .contrast{grid-template-columns:1fr;gap:12px}
  .contrast .arrow{transform:rotate(90deg);margin:0 auto}
}

/* --------------------------------------------------------- deliverables --- */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:22px;margin-top:44px}
.card{background:var(--card);border:1px solid var(--rule);border-radius:16px;padding:28px;box-shadow:var(--shadow)}
.card .ico{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;margin-bottom:18px}
.card:nth-child(1) .ico{background:var(--es-clay)}
.card:nth-child(2) .ico{background:var(--es-sage)}
.card:nth-child(3) .ico{background:var(--es-blue)}
.card .ico svg{width:20px;height:20px;stroke:#21201C;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.card p{font-size:16px}

/* ------------------------------------------------------------ recursos --- */
/* One card per resource. A single column rather than the home page's grid: the
   list is meant to be read in order, and two wide cards say "there are two of
   these" more honestly than two half-width ones say "there are many". */
.res{display:flex;flex-direction:column;gap:18px;margin-top:40px}
.res-item{
  display:block;background:var(--card);border:1px solid var(--rule);border-radius:18px;
  padding:28px 30px;box-shadow:var(--shadow);color:inherit;text-decoration:none;
  transition:border-color .15s ease,transform .15s ease;
}
.res-item:hover{border-color:var(--es-teal);transform:translateY(-2px);text-decoration:none}
.res-item:focus-visible{outline:2px solid var(--es-teal);outline-offset:3px}
.res-kind{
  display:inline-block;font:500 10px/1 var(--mono);letter-spacing:.16em;
  text-transform:uppercase;color:var(--faint);margin-bottom:12px;
}
.res-item h2{font-size:clamp(20px,2.6vw,25px);margin:0 0 10px;letter-spacing:-.02em}
.res-item p{color:var(--muted);margin:0;max-width:58ch;font-size:16px}
.res-go{
  display:inline-block;margin-top:16px;font:600 15px/1 var(--text);color:var(--es-teal);
}
.res-item:hover .res-go{text-decoration:underline;text-underline-offset:3px}
@media (prefers-color-scheme:dark){.res-go{color:var(--es-sage)}}
:root[data-theme="dark"] .res-go{color:var(--es-sage)}
:root[data-theme="light"] .res-go{color:var(--es-teal)}
@media (max-width:560px){.res-item{padding:22px 20px}}

/* ------------------------------------------------------------- privacy --- */
.privacy-list{display:grid;gap:18px;margin-top:36px;padding:0;list-style:none}
.privacy-list li{
  display:grid;grid-template-columns:26px 1fr;gap:16px;align-items:start;
  padding-bottom:18px;border-bottom:1px solid var(--rule);
}
.privacy-list li:last-child{border-bottom:none;padding-bottom:0}
.privacy-list .check{
  width:26px;height:26px;border-radius:999px;background:var(--es-sage);
  display:grid;place-items:center;margin-top:2px;
}
.privacy-list .check svg{width:14px;height:14px;stroke:#21201C;fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.privacy-list strong{font-weight:600;color:var(--fg);display:block;margin-bottom:4px}
.privacy-list p{margin:0;font-size:16px}

/* ---------------------------------------------------------------- close --- */
.close-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:32px;margin-top:44px}
.close-grid h3{margin-bottom:10px}
.close-grid ul{margin:10px 0 0;padding-left:18px;color:rgba(250,247,241,.86)}
.close-grid li{margin:7px 0}

/* --------------------------------------------------------------- footer --- */
footer.site{border-top:1px solid var(--rule);padding:52px 0 60px;background:var(--bg)}
footer.site .cols{display:flex;gap:44px;flex-wrap:wrap;align-items:flex-start}
footer.site .col{min-width:180px}
footer.site h4{font:500 11px/1 var(--mono);letter-spacing:.2em;text-transform:uppercase;color:var(--faint);margin:0 0 16px}
footer.site a{display:block;color:var(--muted);text-decoration:none;font-size:15px;margin-bottom:10px}
footer.site a:hover{color:var(--fg);text-decoration:underline}
footer.site .legal{margin-top:44px;padding-top:24px;border-top:1px solid var(--rule);display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
footer.site .legal span{font:400 13px/1.5 var(--mono);color:var(--faint)}

/* -------------------------------------------------------- utility page --- */
/* Deliberately plain. This must read as a receipts desk, not a product. */
.utility{min-height:100vh;display:flex;flex-direction:column}
.utility main{flex:1;display:grid;place-items:center;padding:56px 24px}
.utility .box{width:100%;max-width:470px}
.utility h1{font-size:clamp(26px,4vw,32px);margin-bottom:14px}
.utility .panel{
  background:var(--card);border:1px solid var(--rule);border-radius:16px;
  padding:30px;margin-top:28px;
}
.utility label{display:block;font:500 13px/1 var(--text);margin-bottom:8px}
.utility input{
  width:100%;padding:13px 14px;border:1px solid var(--rule);border-radius:12px;
  background:var(--bg);color:var(--fg);font:400 16px/1 var(--text);
}
.utility input:focus-visible{outline:2px solid var(--es-teal);outline-offset:2px}
.utility .btn{width:100%;justify-content:center;margin-top:16px}

/* ------------------------------------------------------- questionnaire --- */
/* A focused, single-task page: minimal chrome, one decision on screen. */
.q{min-height:calc(100vh - 68px);display:grid;place-items:center;padding:48px 20px 72px}
.q-box{width:100%;max-width:660px}
.q-screen{display:none}
.q-screen.active{display:block}

.q-card{background:var(--card);border:1px solid var(--rule);border-radius:20px;padding:40px 36px;box-shadow:var(--shadow)}
.q-card h1{font-size:clamp(27px,4.4vw,34px);margin-bottom:16px}
.q-card .btn{margin-top:22px}
@media (max-width:560px){.q-card{padding:30px 24px}}

.q-progress{margin-bottom:30px}
.q-progress-label{font:500 11px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--faint);margin-bottom:10px}
.q-track{height:4px;background:var(--rule);border-radius:999px;overflow:hidden}
.q-fill{height:100%;width:0;background:var(--es-ochre);border-radius:999px;transition:width .35s ease}

.q-prompt{text-align:center;font:500 20px/1.3 var(--text);color:var(--fg);margin:0 0 26px;max-width:none}

.q-pair{display:grid;grid-template-columns:1fr 34px 1fr;gap:12px;align-items:stretch}
.q-option{
  display:flex;flex-direction:column;justify-content:center;gap:9px;text-align:center;
  background:var(--card);border:2px solid transparent;border-radius:18px;
  padding:28px 22px;min-height:190px;cursor:pointer;box-shadow:var(--shadow);
  font-family:var(--text);color:var(--fg);
  transition:border-color .15s ease,transform .15s ease;
}
.q-option:hover{border-color:var(--es-teal);transform:translateY(-2px)}
.q-option:active{transform:translateY(0)}
.q-option .q-name{font:600 17px/1.3 var(--display);letter-spacing:-.02em}
.q-option .q-desc{font:400 13px/1.45 var(--text);color:var(--muted)}
.q-tag{font:500 10px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--faint)}
.q-or{display:grid;place-items:center;font:400 13px/1 var(--mono);color:var(--faint)}
@media (max-width:560px){
  .q-pair{grid-template-columns:1fr;gap:10px}
  .q-option{min-height:0;padding:22px 18px}
  .q-or{padding:2px 0}
}

.q-screen h2{font-size:clamp(24px,3.6vw,30px)}
.q-screen .sub{color:var(--muted);margin:8px 0 26px}
.q-list{list-style:none;margin:0 0 26px;padding:0;display:flex;flex-direction:column;gap:8px}
.q-row{
  display:grid;grid-template-columns:26px 1fr auto;gap:14px;align-items:center;
  background:var(--card);border:1px solid var(--rule);border-radius:12px;
  padding:13px 16px;box-shadow:var(--shadow);cursor:grab;
}
.q-row.dragging{opacity:.4}
.q-rank{font:500 14px/1 var(--mono);color:var(--es-ochre-deep);text-align:center}
@media (prefers-color-scheme:dark){.q-rank{color:var(--es-ochre)}}
:root[data-theme="dark"] .q-rank{color:var(--es-ochre)}
.q-info{display:flex;flex-direction:column;gap:3px;min-width:0}
.q-info .q-name{font:500 15px/1.3 var(--text)}
.q-moves{display:flex;flex-direction:column;gap:3px}
.q-moves button{
  width:26px;height:21px;border:none;border-radius:6px;cursor:pointer;
  background:var(--es-teal-tint);color:var(--es-teal);font-size:10px;line-height:1;
  display:grid;place-items:center;
}
.q-moves button:hover:not(:disabled){background:var(--es-teal);color:var(--es-paper)}
.q-moves button:disabled{opacity:.3;cursor:default}
/* Sage-on-sage-tint lands near 4.1:1 at this glyph size. Paper on the tint is
   ~8:1, and these arrows are the only way to reorder without a mouse. */
@media (prefers-color-scheme:dark){
  .q-moves button{background:rgba(143,176,151,.24);color:var(--es-paper)}
}
:root[data-theme="dark"] .q-moves button{background:rgba(143,176,151,.24);color:var(--es-paper)}

/* Ochre-deep is for Paper only; on the Ink surface it drops to 2.7:1.
   The base eyebrow is line-height 1, which collides when this one wraps. */
.q-kicker{color:var(--es-ochre-deep);line-height:1.5;max-width:46ch}
@media (prefers-color-scheme:dark){.q-kicker{color:var(--es-ochre)}}
:root[data-theme="dark"] .q-kicker{color:var(--es-ochre)}
:root[data-theme="light"] .q-kicker{color:var(--es-ochre-deep)}

.q-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

/* Font is inherited explicitly: a textarea does not inherit it on its own, and
   16px is also what stops iOS Safari zooming the page when the field is focused. */
.q-text{display:block;width:100%;box-sizing:border-box;margin-top:20px;padding:14px 16px;
  border:1px solid var(--rule);border-radius:14px;background:var(--bg);color:var(--fg);
  font-family:inherit;font-size:16px;line-height:1.6;resize:vertical;min-height:132px}
.q-text::placeholder{color:var(--faint)}
.q-text:focus-visible{outline:2px solid var(--es-teal);outline-offset:2px}

/* ----------------------------------------------------------- documents --- */
/* The upload page. Shares .q-box, .q-screen, .q-card and .q-track with the
   questionnaire; everything below is what a growing list of files needs and a
   single-decision page does not.

   Deliberately .d and not .q for the wrapper: .q is `place-items:center`, which
   is right for one card and wrong here — vertically centring a list makes the
   whole page jump every time a row appears. */
.d{min-height:calc(100vh - 68px);display:grid;align-items:start;justify-items:center;padding:48px 20px 72px}

.d-drop{
  display:block;margin-top:22px;padding:34px 24px;text-align:center;cursor:pointer;
  background:var(--bg);border:2px dashed var(--rule);border-radius:18px;
  transition:border-color .15s ease,background .15s ease;
}
.d-drop:hover,.d-drop.is-over{border-color:var(--es-teal);background:var(--es-teal-tint)}
.d-drop:focus-within{outline:2px solid var(--es-teal);outline-offset:2px}
.d-drop input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.d-drop-title{display:block;font:600 17px/1.3 var(--display);letter-spacing:-.02em;color:var(--fg)}
.d-drop-sub{display:block;font:400 13px/1.5 var(--text);color:var(--muted);margin-top:6px}

.d-files{list-style:none;margin:22px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.d-file{
  display:grid;grid-template-columns:1fr auto;gap:4px 14px;align-items:center;
  background:var(--card);border:1px solid var(--rule);border-radius:12px;
  padding:13px 16px;box-shadow:var(--shadow);
}
.d-name{font:500 15px/1.35 var(--text);color:var(--fg);word-break:break-word;min-width:0}
.d-meta{font:400 12px/1 var(--mono);color:var(--faint);white-space:nowrap}
.d-file .q-track{grid-column:1/-1;margin-top:4px}
/* Not .q-fill: that carries transition:width .35s, which lags real byte progress
   and keeps sliding after the upload has finished. */
.d-fill{height:100%;width:0;background:var(--es-ochre);border-radius:999px;transition:width .12s linear}
.d-fill.done{background:var(--es-sage)}
.d-err{grid-column:1/-1;font:400 13px/1.5 var(--text);color:var(--es-ochre-deep);margin-top:6px}
@media (prefers-color-scheme:dark){.d-err{color:var(--es-ochre)}}
:root[data-theme="dark"] .d-err{color:var(--es-ochre)}
:root[data-theme="light"] .d-err{color:var(--es-ochre-deep)}
.d-retry{
  grid-column:1/-1;justify-self:start;
  margin-top:8px;padding:7px 14px;border:1px solid var(--es-teal);border-radius:10px;
  background:transparent;color:var(--es-teal);font:500 13px/1 var(--text);cursor:pointer;
}
.d-retry:hover{background:var(--es-teal);color:var(--es-paper)}
/* Teal is a Paper colour; on the Ink surface it drops well under 3:1 and this
   button is the only way back from a failed upload. Sage is the same swap the
   .q-moves arrows make. */
@media (prefers-color-scheme:dark){
  .d-retry{border-color:var(--es-sage);color:var(--es-sage)}
  .d-retry:hover{background:var(--es-sage);color:#21201C}
}
:root[data-theme="dark"] .d-retry{border-color:var(--es-sage);color:var(--es-sage)}
:root[data-theme="dark"] .d-retry:hover{background:var(--es-sage);color:#21201C}

/* The band that appears after the first file lands. A status message inside the
   working screen, never a screen of its own: this page has no terminal state,
   because a client comes back next week with two more statements. */
.d-ok{
  margin-top:22px;padding:14px 18px;border-radius:14px;
  background:var(--es-teal-tint);color:var(--es-teal);
  font:500 15px/1.5 var(--text);
}
@media (prefers-color-scheme:dark){.d-ok{background:rgba(143,176,151,.18);color:var(--es-paper)}}
:root[data-theme="dark"] .d-ok{background:rgba(143,176,151,.18);color:var(--es-paper)}

.d-list{list-style:none;margin:18px 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
.d-list li{display:grid;grid-template-columns:22px 1fr;gap:12px;align-items:start;
  font:400 15px/1.55 var(--text);color:var(--muted)}
.d-list .n{font:500 13px/1.6 var(--mono);color:var(--es-teal)}
@media (prefers-color-scheme:dark){.d-list .n{color:var(--es-sage)}}
:root[data-theme="dark"] .d-list .n{color:var(--es-sage)}

/* ---------------------------------------------------------------- cita --- */
/* The booking page. One card holding Google's appointment widget in an iframe,
   which is the only third-party frame in the project.

   Wider than .q-box only on the screen that needs it: 660px is a reading column
   and Google's day-picker is a seven column grid that starts wrapping below
   about 820. The class is toggled in cita.html, so the text screens on the same
   page keep the measure every other card has. */
.q-box.c-wide{max-width:940px}
.c-frame-wrap{margin-top:22px;border:1px solid var(--rule);border-radius:16px;overflow:hidden;
  /* Google's widget is light-only; without this the card's dark background shows
     through the iframe's own margins on a dark theme. */
  background:#fff}
.c-frame{display:block;width:100%;border:0;
  /* Tall enough for the month grid plus a column of times without an inner
     scrollbar, and still short enough to leave the card's own text visible on a
     laptop. Google's page scrolls inside itself past this. */
  height:min(76vh,820px);min-height:560px}
@media (max-width:560px){.c-frame{height:min(80vh,680px);min-height:520px}}

/* --------------------------------------------------------------- prose --- */
.prose{max-width:74ch}
.prose h2{font-size:clamp(22px,3vw,27px);margin:44px 0 12px}
.prose h2:first-of-type{margin-top:0}
.prose ul{padding-left:20px;color:var(--muted)}
.prose li{margin:8px 0}
.prose p{max-width:none}

a:focus-visible,button:focus-visible{outline:2px solid var(--es-teal);outline-offset:3px;border-radius:6px}

@media (prefers-reduced-motion:reduce){
  *{animation:none !important;transition:none !important}
  .btn:hover{transform:none}
}
