/* Shared base, header, dashboard and dock CSS. Lifted from #8 (round-2/b-scroll/02-docking-dashboard). Section CSS lives in modules. */
:root {
  --brand-primary: #91B682;
  --brand-accent: #E5484D;
  --brand-primary-foreground: #14201A;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --brand-primary-5: color-mix(in srgb, var(--brand-primary) 5%, transparent);
  --brand-primary-10: color-mix(in srgb, var(--brand-primary) 10%, transparent);
  --brand-primary-20: color-mix(in srgb, var(--brand-primary) 20%, transparent);
  --brand-primary-30: color-mix(in srgb, var(--brand-primary) 30%, transparent);
  --brand-primary-60: color-mix(in srgb, var(--brand-primary) 60%, transparent);
  --brand-accent-5: color-mix(in srgb, var(--brand-accent) 5%, transparent);
  --brand-accent-10: color-mix(in srgb, var(--brand-accent) 10%, transparent);
  --brand-accent-20: color-mix(in srgb, var(--brand-accent) 20%, transparent);
  --ink-green: #4F7A40;
  --tint-12: color-mix(in srgb, var(--brand-primary) 12%, transparent);
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-io: cubic-bezier(.65,0,.35,1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: #0F172A; background: #fff; font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { background: var(--brand-primary-20); }
.num, td, .kpi { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.band { padding: 112px 0; }
.band-alt { background: #F7F8FA; }
@media (max-width: 720px) { .band { padding: 72px 0; } }
h1.h1 { font-weight: 600; font-size: 60px; line-height: 1.05; letter-spacing: -0.025em; }
h2.h2 { font-weight: 600; font-size: 40px; line-height: 1.12; letter-spacing: -0.02em; }
@media (max-width: 720px) { h1.h1 { font-size: 38px; } h2.h2 { font-size: 30px; } }
.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-green); }
.muted { color: #475569; }
.ink { color: var(--ink-green); }
.link { color: var(--ink-green); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.gap { color: var(--brand-accent); font-weight: 600; }
.card { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 10px; background: var(--brand-primary); color: var(--brand-primary-foreground); font-weight: 600; font-size: 15px; transition: background .2s, transform .2s; white-space: nowrap; border: 0; cursor: pointer; }
.btn:hover { background: #7FA570; transform: translateY(-1px); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-outline { background: transparent; color: #0F172A; border: 1px solid #0F172A; }
.btn-outline:hover { background: #0F172A; color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--ink-green); outline-offset: 2px; }
input.field { height: 48px; border: 1px solid #E2E8F0; border-radius: 10px; padding: 0 14px; font-size: 15px; background: #fff; color: #0F172A; min-width: 0; }
input.field:focus { border-color: var(--ink-green); outline: none; box-shadow: 0 0 0 3px var(--brand-primary-20); }
.wm-svg { display: inline-block; }
.grid > * { min-width: 0; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(255,255,255,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); } }
.site-header.scrolled { border-bottom-color: #E2E8F0; box-shadow: 0 1px 8px rgba(15,23,42,.04); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px); min-width: 280px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; padding-top: 10px; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
#mobile-menu { position: fixed; inset: 0; background: #fff; z-index: 60; transform: translateY(-100%); transition: transform .3s; }
#mobile-menu.open { transform: translateY(0); }

/* browser frame + app bits */
.browser { border-radius: 14px; border: 1px solid #E2E8F0; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 24px 60px rgba(15,23,42,.10); overflow: hidden; }
.browser-bar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #F7F8FA; border-bottom: 1px solid #E2E8F0; }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #CBD5E1; display: block; }
.url { margin-left: 14px; flex: 1; min-width: 0; max-width: 360px; height: 24px; border-radius: 6px; background: #fff; border: 1px solid #E2E8F0; font-size: 12px; color: #475569; display: flex; align-items: center; padding: 0 10px; overflow: hidden; white-space: nowrap; }
.app-side a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; font-size: 13px; color: #475569; }
.app-side a.on { background: var(--tint-12); color: #14201A; font-weight: 600; }
.kpi-tile { border: 1px solid #E2E8F0; border-radius: 10px; padding: 14px; }
.chip-ok { background: var(--tint-12); color: var(--ink-green); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.chip-bad { background: var(--brand-accent-10); color: #B4232A; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.chip-n { background: #F1F5F9; color: #475569; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.spark path { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1.2s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.recon th { font-size: 11px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 8px 10px; border-bottom: 1px solid #E2E8F0; }
.recon td { font-size: 13px; padding: 10px; border-bottom: 1px solid #F1F5F9; white-space: nowrap; }
.recon td.r, .recon th.r { text-align: right; }


.stage { position: relative; width: 100%; overflow: hidden; background: #fff; }
.stage-inner { position: absolute; left: 0; top: 0; width: 640px; height: 440px; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.scr { position: absolute; inset: 0; opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity .45s var(--ease), transform .6s var(--ease); pointer-events: none; background: #fff; font-size: 13px; line-height: 1.45; }
.scr.on { opacity: 1; transform: none; pointer-events: auto; transition-delay: .08s; }
.scr.past { transform: translate3d(0, -18px, 0); }
.url-text { transition: opacity .25s; }
/* screen internals */
.s-h { font-weight: 600; font-size: 15px; }
.s-sub { font-size: 11.5px; color: #64748B; }
.s-tile { border: 1px solid #E2E8F0; border-radius: 9px; padding: 10px 12px; }
.s-tile .v { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.s-tile .l { font-size: 11px; color: #64748B; }
.stg > * { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.scr.on .stg > * { opacity: 1; transform: none; }
.scr.on .stg > *:nth-child(1) { transition-delay: .25s; } .scr.on .stg > *:nth-child(2) { transition-delay: .35s; }
.scr.on .stg > *:nth-child(3) { transition-delay: .45s; } .scr.on .stg > *:nth-child(4) { transition-delay: .55s; }
.scr.on .stg > *:nth-child(5) { transition-delay: .65s; } .scr.on .stg > *:nth-child(6) { transition-delay: .75s; }
.dline { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 1.6s var(--ease-io) .3s; }
.scr.on .dline { stroke-dashoffset: 0; }
.pop { opacity: 0; transform: scale(.6); transform-box: fill-box; transform-origin: center; transition: opacity .3s 1.6s, transform .45s cubic-bezier(.3,1.6,.5,1) 1.6s; }
.scr.on .pop { opacity: 1; transform: none; }
.toast { opacity: 0; transform: translateY(-10px); transition: opacity .4s 1.9s, transform .5s var(--ease) 1.9s; }
.scr.on .toast { opacity: 1; transform: none; }
.gbar { transform: scaleY(0); transform-origin: 50% 100%; transform-box: fill-box; transition: transform .7s var(--ease); }
.scr.on .gbar { transform: none; }
.hbar { transform: scaleX(0); transform-origin: 0 50%; transition: transform .8s var(--ease); }
.scr.on .hbar { transform: none; }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #CBD5E1; display: inline-block; position: relative; flex-shrink: 0; }
.radio.on { border-color: var(--ink-green); }
.radio.on::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--ink-green); }
.bar { height: 6px; border-radius: 99px; background: #E2E8F0; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--brand-primary); transition: width 1.2s var(--ease); }
.scr.on .bar > span.grow { width: var(--w); }

/* ---------- D2: DOCK ---------- */
.dock { position: relative; }
.dock-stick { position: relative; }
.dev, .panel, .tour-anchor-pin { display: none; }
.dev { position: absolute; left: 0; top: 0; width: 1080px; transform-origin: 0 0; will-change: transform; }
.dev .browser { box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 30px 80px rgba(15,23,42,.14); }
.dev-body { display: flex; height: 620px; }
.dnav { position: relative; width: 180px; border-right: 1px solid #E2E8F0; padding: 12px; flex-shrink: 0; }
.dnav a { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 7px; font-size: 13px; color: #475569; transition: color .3s; }
.dnav a.on { color: #14201A; font-weight: 600; }
.nav-pill { position: absolute; left: 12px; right: 12px; height: 36px; top: 52px; border-radius: 7px; background: var(--tint-12); transition: transform .55s var(--ease); }
.dcontent { position: relative; flex: 1; overflow: hidden; }
.dcontent > .scr { inset: 0; }
.dbox { position: absolute; left: 2px; top: 2px; width: 640px; height: 440px; transform-origin: 0 0; transform: scale(1.4); }
.panel { position: absolute; top: 0; height: 100%; flex-direction: column; justify-content: center; }
.pcap { position: relative; height: 230px; margin-top: 18px; }
.pstep { position: absolute; inset: 0; opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .55s var(--ease); pointer-events: none; }
.pstep.on { opacity: 1; transform: none; transition-delay: .1s; pointer-events: auto; }
.pstep.past { transform: translateY(-14px); }
.pstep h3 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.pstep p { margin-top: 14px; color: #475569; font-size: 17px; }
.pidx { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.pidx button { text-align: left; border: 0; background: none; cursor: pointer; padding: 0; }
.pidx button i { display: block; height: 3px; border-radius: 2px; background: #E2E8F0; overflow: hidden; position: relative; }
.pidx button i::after { content: ''; position: absolute; inset: 0; background: var(--brand-primary); transform-origin: 0 50%; transform: scaleX(var(--f, 0)); }
.pidx button span { display: block; font-size: 11px; font-weight: 600; color: #94A3B8; margin-top: 8px; transition: color .3s; }
.pidx button.on span { color: #14201A; }
body.pinned .dock { height: calc(var(--mx-dock-vh, 580vh) - 64px); }
body.pinned .dock-stick { position: sticky; top: 64px; height: calc(100vh - 64px); overflow: hidden; }
body.pinned .dev { display: block; }
body.pinned .panel { display: flex; }
body.pinned .flat { display: none; }
body.pinned .tour-anchor-pin { display: block; position: absolute; top: 60vh; }
/* copy layer: in the sticky stage it sits under the dashboard unless the hero module asks for copyAbove */
.mx-hero-copy { position: relative; }
body.pinned .dock.mx-copy-above .mx-hero-copy { z-index: 3; }
body.pinned .dock.mx-copy-above .dev { z-index: 2; }
.m-shot { margin-top: 22px; }
.m-shot .scr { opacity: 1; transform: none; position: absolute; }
.flat-step { padding: 40px 0; border-top: 1px solid #E2E8F0; }
@media (min-width: 1024px) { .flat-step { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; } .flat-step .m-shot { margin-top: 0; } }
.flat-step h3 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-top: 8px; }
.flat-step p { margin-top: 10px; color: #475569; }

/* reveal */
.fade-up { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0ms); } /* --d: round-3 stagger; #8 never sets it */
.fade-up.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  .spark path, .dline { animation: none; transition: none; stroke-dashoffset: 0; }
  .msg, .w, .prop tbody tr, .typing { animation: none; opacity: 1; }
  .scr, .stg > *, .pop, .toast, .gbar, .hbar, .bar > span, .tstep, .astep .vis { transition: none !important; }
  .flow, .scroll-cue span::after, .int-chip .spin { animation: none; }
  .btn:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pstep, .fill .fw, .fill-ans, .hpanel, .itile, .ires, .nav-pill { transition: none !important; }
  .fill .fw { color: #0F172A; } .fill .fw.red { color: var(--brand-accent); } .fill-ans { opacity: 1; transform: none; }
}

/* round-3 shared helpers (identical in every round-3 page; unused by #8, so harmless) */
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.mono-tile { display: grid; place-items: center; border-radius: 10px; background: #F1F5F9; color: #475569; font-weight: 700; font-size: 13px; letter-spacing: -.01em; flex-shrink: 0; }
.mono-tile.sage { background: var(--brand-primary); color: #14201A; }
.mono-tile.tint { background: var(--brand-primary-20); color: #14201A; }
