/* tools.css — shared instrument-panel design system for the Eccentryx tools suite.
   Dark shell #0d0e12, mono data, big-number hero elements, tag chips.
   Linked by tools.html, volume-tool, weak-link-report, analyze, lift-lab, coach, ask.
   No shared shell dependencies (styles.css/script.js untouched). */

/* ── Self-hosted type — CSP font-src 'self', font-display:swap (no FOIT) ── */
@font-face{font-family:'Space Grotesk';font-weight:500 800;font-display:swap;src:url('./fonts/space-grotesk-latin.woff2') format('woff2');}
@font-face{font-family:'JetBrains Mono';font-weight:400 700;font-display:swap;src:url('./fonts/jetbrains-mono-latin.woff2') format('woff2');}
@font-face{font-family:'Inter';font-weight:400 700;font-display:swap;src:url('./fonts/inter-400.woff2') format('woff2');}

/* ── Design tokens ──
   Canonical token set + four palettes copied BYTE-EXACT from home.css (#332):
   dark (default, :root) / light / obsidian / clinical, keyed on [data-theme]
   set by the themeBtn cycle in tools.js (#334, shared eccentryx.theme key).
   Legacy tool-suite names (--ink/--dim/--cy/--teal/--card/--panel/--elev/
   --bg-2/--line-2) are ALIASED onto the canonical tokens so every rule below
   — and every sibling tool page sharing this sheet — re-themes from one set.
   Pinned in tools_theme_system_contract_test.js (hex parity + polarity). */
:root{
  color-scheme:dark;
  --bg:#0d0e12; --surface:#11131a; --surface-2:#0a0b0e;
  --text:#eef2f8; --muted:#9aa6b8;
  --line:rgba(255,255,255,0.08); --line-strong:rgba(255,255,255,0.16);
  --action:#2563eb; --action-hover:#1d4ed8; --on-action:#ffffff;
  --action-ink:#60a5fa; --teal-ink:#2dd4bf;
  /* legacy aliases — single source of truth stays the canonical set above */
  --bg-2:var(--surface-2);
  --card:var(--surface);
  --panel:var(--surface);
  --elev:var(--surface);
  --line-2:var(--line-strong);
  --ink:var(--text); --dim:var(--muted); --faint:var(--muted);
  --cy:var(--action); --cy-deep:var(--action-hover); --cy-soft:rgba(37,99,235,.15);
  --teal:var(--teal-ink);
  --good:#36e07f;
  --caution:#e8615a;
  --font-display:'Space Grotesk',ui-sans-serif,system-ui,sans-serif;
  --font-body:'Inter',ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,"SFMono-Regular","Segoe UI Mono",monospace;
  --t-cap:0.75rem; --t-sm:0.875rem; --t-base:1rem; --t-lg:1.25rem; --t-xl:1.75rem;
  --t-hero:clamp(2.4rem,8vw,4rem);
  --t-num:clamp(2rem,6vw,3rem);
  --s-1:8px; --s-2:16px; --s-3:24px; --s-4:32px; --s-6:48px;
  --r:14px; --r-sm:10px;
  --how-mt:16px; --how-border:var(--line); --how-radius:12px; --how-bg:var(--panel);
  --how-sum-pad:12px 15px; --how-sum-color:var(--ink); --how-accent:var(--cy); --how-sum-fs:.88rem;
  --how-body-pad:0 15px 13px; --how-body-color:var(--dim); --how-strong-color:var(--ink);
  --how-body-mt:10px; --how-body-fs:.84rem;
}

/* ── Four-theme palettes (hex copied byte-exact from home.css #332) ── */
[data-theme="light"]{
  --bg:#f4f6fa; --surface:#ffffff; --surface-2:#eef1f6;
  --text:#0e1116; --muted:#4a5568;
  --line:rgba(8,12,20,0.10); --line-strong:rgba(8,12,20,0.18);
  --action:#2563eb; --action-hover:#1d4ed8; --on-action:#ffffff;
  --action-ink:#1e40af; --teal-ink:#0f766e;
  --cy-soft:rgba(37,99,235,.12);
  --good:#047857; --caution:#c93a34;
}
/* obsidian — deepest premium black + gold ink (a DARKER dark variant, #332). */
[data-theme="obsidian"]{
  --bg:#050506; --surface:#0d0d0f; --surface-2:#141416;
  --text:#f5f5f7; --muted:#a1a1aa;
  --line:rgba(255,255,255,0.08); --line-strong:rgba(255,255,255,0.14);
  --action:#2563eb; --action-hover:#1d4ed8; --on-action:#ffffff;
  --action-ink:#ffba08; --teal-ink:#f5b301;
}
/* clinical — clean instrument WHITE + green accent (a LIGHT variant, #332). */
[data-theme="clinical"]{
  --bg:#f7faf9; --surface:#ffffff; --surface-2:#eef4f2;
  --text:#0d1512; --muted:#3f4f49;
  --line:rgba(4,120,87,0.12); --line-strong:rgba(4,120,87,0.20);
  --action:#047857; --action-hover:#036249; --on-action:#ffffff;
  --action-ink:#046a4e; --teal-ink:#047857;
  --cy-soft:rgba(4,120,87,.12);
  --good:#047857; --caution:#c93a34;
}
[data-theme="light"],[data-theme="clinical"]{color-scheme:light;}

/* ── Zen (light) theme ── */
html[data-theme="zen"]{
  color-scheme:light;
  --bg:#f8fafc; --bg-2:#f1f5f9;
  --surface:#ffffff; --surface-2:#eef1f6;
  --card:rgba(255,255,255,0.8);
  --panel:rgba(241,245,249,0.8);
  --elev:rgba(255,255,255,0.9);
  --line:rgba(0,0,0,.08); --line-2:rgba(0,0,0,.15);
  --line-strong:rgba(8,12,20,0.18);
  --ink:#0f172a; --text:#0e1116; --dim:#64748b; --muted:#4a5568; --faint:#64748b;
  --cy:#2563eb; --cy-deep:#1d4ed8; --cy-soft:rgba(37,99,235,.12);
  --caution:#c93a34;
}

/* ── Base ── */
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
body{margin:0; font:16px/1.55 var(--font-body); color:var(--ink); -webkit-font-smoothing:antialiased; -webkit-text-size-adjust:100%; text-size-adjust:100%; min-height:100vh; position:relative; background:var(--bg);}
canvas#matrix-bg{position:fixed; inset:0; z-index:0; pointer-events:none; opacity:0.3;}
main{position:relative; z-index:1; max-width:820px; margin:0 auto; padding:40px 20px 90px;}
.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;}
a{color:var(--action-ink); text-underline-offset:2px;}

/* ── Topnav ── */
.topnav{display:flex; align-items:center; justify-content:space-between; max-width:760px; margin:0 auto; padding:18px 24px 0;}
.topnav a{color:var(--action-ink); text-decoration:none; font-size:.86rem; font-weight:600;}
.topnav a:hover{text-decoration:underline;}
.topnav .brand{font-family:var(--font-display); font-weight:700; color:var(--ink); font-size:1rem; letter-spacing:-.01em;}

/* ── Typography ── */
h1{font:800 var(--t-hero)/1.02 var(--font-display); letter-spacing:-.03em; margin:0 0 8px;}
h1 .accent{background:linear-gradient(135deg,var(--cy),var(--teal)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;}
h2{font:700 1.18rem var(--font-display); letter-spacing:-.01em; margin:0 0 14px;}
.sub{color:var(--dim); margin:0 0 14px; font-size:1.02rem;}
.muted{color:var(--dim); font-size:0.85rem;}
.err{color:var(--caution); font-size:0.85rem; margin-top:8px; font-weight:600;}

/* ── Instrument panel (hero readout — like the front-door readout) ── */
.instrument{background:linear-gradient(160deg,var(--surface) 0%,var(--surface-2) 100%); border:1px solid var(--line-strong); border-top:2px solid var(--teal); border-radius:var(--r); padding:var(--s-3); font-family:var(--font-mono); box-shadow:0 24px 60px rgba(0,0,0,0.35), 0 8px 24px rgba(37,99,235,0.10);}
.instrument-tag{margin:0 0 var(--s-2); padding-bottom:var(--s-1); border-bottom:1px solid var(--line); font-size:var(--t-cap); text-transform:uppercase; letter-spacing:0.18em; color:var(--teal);}
.instrument-num{font:800 var(--t-num)/1 var(--font-mono); color:var(--ink); font-variant-numeric:tabular-nums; letter-spacing:-0.02em;}
.instrument-label{font:400 var(--t-cap) var(--font-mono); letter-spacing:0.1em; text-transform:uppercase; color:var(--muted);}
.instrument-rows{list-style:none; margin:0 0 var(--s-2); padding:0; display:flex; flex-direction:column; gap:var(--s-1); font-size:var(--t-sm);}
.instrument-rows li{display:flex; justify-content:space-between; gap:var(--s-2);}
.instrument-rows span{color:var(--muted);}
.instrument-rows b{color:var(--ink); font-weight:700; text-align:right;}
.instrument-note{margin:0; padding-top:var(--s-1); border-top:1px solid var(--line); font-size:var(--t-cap); color:var(--muted);}

/* ── Stat band ── */
.stat-band{display:flex; gap:0; margin:0 0 28px; padding:14px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.stat-band .stat{flex:1; text-align:center; position:relative;}
.stat-band .stat:not(:last-child)::after{content:""; position:absolute; right:0; top:50%; transform:translateY(-50%); height:24px; width:1px; background:var(--line);}
.stat-band .stat .num{font:800 1.4rem var(--font-display); color:var(--ink); display:block;}
.stat-band .stat .lbl{font:400 .68rem var(--font-mono); letter-spacing:.08em; text-transform:uppercase; color:var(--faint); display:block; margin-top:2px;}

/* ── Tag chips ── */
.tag-chip{display:inline-flex; align-items:center; gap:6px; padding:4px 12px; border-radius:999px; border:1px solid var(--line); background:var(--cy-soft); font:700 .72rem var(--font-mono); letter-spacing:.06em; text-transform:uppercase; color:var(--action-ink);}

/* ── Featured card ── */
.featured{display:block; padding:28px; border:1px solid var(--line-strong); border-top:2px solid var(--teal-ink); background:var(--surface); box-shadow:0 8px 24px rgba(0,0,0,0.12); border-radius:16px; color:var(--ink); text-decoration:none; margin:0 0 16px; position:relative;}
.featured .feat-eyebrow{font:700 .66rem var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--teal-ink); margin:0 0 10px; position:relative;}
.featured .feat-title{font:800 1.75rem/1.08 var(--font-display); margin:0 0 8px; position:relative; letter-spacing:-0.02em;}
.featured .feat-desc{font:400 .92rem/1.45 var(--font-body); color:var(--dim); margin:0 0 12px; position:relative;}
.featured .feat-cta{font:700 .8rem var(--font-mono); letter-spacing:.06em; text-transform:uppercase; color:var(--action-ink); position:relative;}
.featured .feat-cta::after{content:" \2192";}

/* ── Tool map ── */
.cat-label{font:700 .72rem var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--faint); margin:20px 0 10px; padding-left:2px;}
.tool-map{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0 0 24px;}
.tool-map a{display:block; min-height:64px; padding:12px 13px; border:1px solid var(--line); border-left:3px solid var(--action); background:var(--surface); border-radius:12px; color:var(--ink); text-decoration:none; transition:border-color .18s ease,transform .2s ease;}
.tool-map a:hover{border-color:var(--line-strong); border-left-color:var(--teal-ink);}
.tool-map small{display:block; margin-bottom:4px; font:700 .66rem var(--font-mono); letter-spacing:.1em; text-transform:uppercase; color:var(--action-ink);}
.tool-map strong{display:block; font:700 .95rem/1.15 var(--font-display);}
.tool-map .tool-desc{display:block; margin-top:3px; font:400 .76rem/1.3 var(--font-body); color:var(--dim);}
.tool-map a:focus-visible{outline:2px solid var(--action-ink); outline-offset:3px;}

/* ── Section ── */
section{background:var(--surface); box-shadow:0 1px 2px rgba(0,0,0,0.04); border:1px solid var(--line); border-radius:12px; padding:24px; margin:0 0 20px; position:relative; scroll-margin-top:18px;}
section + section{margin-top:0;}
.sec-head{display:flex; align-items:center; gap:10px; margin-bottom:14px;}
.sec-num{flex:0 0 28px; width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:var(--cy-soft); font:800 .82rem var(--font-mono); color:var(--action-ink);}
.sec-eyebrow{font:700 .66rem var(--font-mono); letter-spacing:.1em; text-transform:uppercase; color:var(--action-ink); margin:0 0 2px;}
.sec-head h2{margin:0;}

/* ── Labels + inputs ── */
label{display:block; font:700 0.72rem var(--font-mono); letter-spacing:.08em; text-transform:uppercase; color:var(--faint); margin:12px 0 5px;}
input,select{width:100%; padding:12px 14px; border-radius:10px; border:1px solid var(--line-2); background:var(--bg-2); color:var(--ink); font:inherit; transition:border-color .18s ease,box-shadow .18s ease;}
input:focus,select:focus{outline:0; border-color:var(--cy); box-shadow:0 0 0 3px rgba(37,99,235,.15);}
html[data-theme="zen"] input,html[data-theme="zen"] select{background:#fff; border-color:rgba(0,0,0,.18); color:#0f172a;}

/* ── Row ── */
.row{display:flex; gap:12px; flex-wrap:wrap;}
.row > div{flex:1; min-width:120px;}

/* ── Buttons ── */
button{margin-top:18px; width:100%; padding:14px; border:none; border-radius:16px; background:linear-gradient(135deg,var(--cy),var(--cy-deep)); color:#fff; font:800 16px var(--font-display); letter-spacing:.04em; cursor:pointer; box-shadow:0 4px 15px rgba(37,99,235,0.4); transition:transform 0.2s cubic-bezier(0.34,1.56,0.64,1),filter 0.2s;}
button:hover{transform:translateY(-2px); filter:brightness(1.1);}
button:active{transform:translateY(2px);}
button:disabled{opacity:0.5; cursor:default; transform:none; filter:grayscale(1);}

/* ── Output ── */
.out{margin-top:16px; padding:14px; border-radius:10px; background:var(--bg-2); border:1px solid var(--line); min-height:0;}
.out:empty{display:none;}
table{width:100%; border-collapse:collapse; margin-top:12px; font:0.86rem var(--font-mono);}
th,td{text-align:left; padding:7px 8px; border-bottom:1px solid var(--line);}
th{color:var(--dim); font-weight:700; letter-spacing:.04em;}

/* ── Card ── */
.card{background:var(--surface); box-shadow:0 1px 2px rgba(0,0,0,0.04); border:1px solid var(--line); border-radius:12px; padding:13px 15px; margin-top:10px;}
.card h3{margin:0 0 6px; font:700 0.98rem var(--font-display);}

/* ── Badge — color + non-color (symbol) state, colorblind-safe (WCAG 1.4.1) ── */
.badge{display:inline-block; padding:3px 11px; border-radius:12px; font:700 0.72rem var(--font-mono); letter-spacing:.06em; text-transform:uppercase;}
.badge.up{background:#102a19; color:#6ee7a0;}
.badge.up::after{content:" \25B2";}
.badge.down{background:#2f1417; color:#ff9aa0;}
.badge.down::after{content:" \25BC";}
.badge.hold{background:#1d2027; color:#cfd3da;}
.badge.hold::after{content:" \2014";}
.badge.deload{background:#2c2410; color:#ffd27a;}
.badge.deload::after{content:" \25C6";}

/* ── Grid ── */
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; margin-top:10px;}

/* ── Footer ── */
footer{color:var(--faint); font:0.78rem var(--font-mono); letter-spacing:.04em; margin-top:34px;}
.pricing-cta{color:var(--action-ink); font-weight:700;}

/* ── Eyebrow — AI-forward label with live pulse ── */
.eyebrow{display:inline-flex; align-items:center; gap:8px; font-size:.78rem; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--teal-ink); margin:0 0 10px;}
.eyebrow::before{content:""; width:7px; height:7px; border-radius:50%; background:var(--teal-ink); will-change:transform,opacity;}

/* ── How / progressive disclosure ── */
.how{margin-top:var(--how-mt,18px);border:1px solid var(--how-border);border-radius:var(--how-radius,12px);background:var(--how-bg);overflow:hidden}
.how summary{list-style:none;cursor:pointer;padding:var(--how-sum-pad,14px 16px);font-weight:600;color:var(--how-sum-color);font-size:var(--how-sum-fs,.92rem);display:flex;align-items:center;justify-content:space-between}
.how summary::-webkit-details-marker{display:none}
.how summary::after{content:"+";color:var(--how-accent);font-weight:700;font-size:1.15rem;line-height:1}
.how[open] summary::after{content:"\2212"}
.how summary:focus-visible{outline:2px solid var(--how-accent);outline-offset:-2px}
.how-body{padding:var(--how-body-pad,0 16px 14px);border-top:1px solid var(--how-border)}
.how-body p{margin:var(--how-body-mt,12px) 0 0;font-size:var(--how-body-fs,.88rem);color:var(--how-body-color);line-height:1.5}
.how-body p strong{color:var(--how-strong-color)}
.how-note{font-style:italic;}

/* ── Theme toggle (home.css pattern, #334: labels the CURRENT theme) ── */
.theme-toggle{font-family:var(--font-mono); font-size:var(--t-cap); text-transform:uppercase; letter-spacing:0.08em; background:transparent; color:var(--muted); border:1px solid var(--line-strong); border-radius:var(--r-sm); padding:var(--s-1) var(--s-2); min-height:44px; margin-top:0; width:auto; cursor:pointer; transition:color .16s,border-color .16s; flex:none; box-shadow:none;}
.theme-toggle:hover{color:var(--text); border-color:var(--action-ink); transform:none; filter:none;}
.theme-toggle:focus-visible{outline:2px solid var(--action-ink); outline-offset:2px;}

/* ── Theme ICON toggle (icon-only variant used across the tool/satellite pages).
   Was undefined, so the bare button{} rule above painted it full-width blue with a
   shadow and an 18px top margin (mis-aligned in .topnav-actions). Class specificity
   (0,1,0) beats the element rule; mirrors .theme-toggle's transparent/bordered look
   as a 44x44 square (WCAG 2.5.5 tap target), neutralizing the element rule's
   width/margin/gradient/shadow/hover-transform. ── */
.theme-icon-btn{display:inline-flex; align-items:center; justify-content:center; width:44px; min-width:44px; height:44px; min-height:44px; margin-top:0; padding:0; background:transparent; color:var(--muted); border:1px solid var(--line-strong); border-radius:var(--r-sm); cursor:pointer; box-shadow:none; transition:color .16s,border-color .16s; flex:none;}
.theme-icon-btn svg{width:20px; height:20px;}
.theme-icon-btn:hover{color:var(--text); border-color:var(--action-ink); transform:none; filter:none;}
.theme-icon-btn:focus-visible{outline:2px solid var(--action-ink); outline-offset:2px;}

/* ── Tools head ── */
.tools-head{display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:16px;}

/* ── Wrap (shared page container) ── */
.wrap{max-width:760px; margin:0 auto; padding:28px 24px 80px;}

/* ── Panel ── */
.panel{background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:22px; box-shadow:0 1px 2px rgba(0,0,0,0.04), 0 18px 44px rgba(0,0,0,0.06);}

/* ── Motion (compositor-only, gated) ── */
@media (prefers-reduced-motion:no-preference){
  .eyebrow::before{animation:aiPulse 1.7s ease-in-out infinite;}
  @keyframes aiPulse{0%,100%{transform:scale(1);opacity:1;} 50%{transform:scale(1.65);opacity:.45;}}
  .featured{transition:transform .2s ease;}
  .featured:hover{transform:translateY(-2px);}
  .tool-map a{transition:transform .2s ease,border-color .18s ease;}
  .tool-map a:hover{transform:translateY(-2px);}
}
@media (prefers-reduced-motion:reduce){
  button:active{transform:none;}
  button{transition:none;}
}

/* ── Responsive ── */
@media (max-width:620px){
  .tools-head{align-items:stretch;}
  .tools-head > div{min-width:0;}
  .tool-map{grid-template-columns:repeat(2,minmax(0,1fr));}
  .tool-map a{min-height:58px;}
}
@media (max-width:420px){
  .tools-head{gap:12px;}
  .tool-map{grid-template-columns:1fr;}
  :where(.readout){grid-template-columns:1fr;}
  :where(.panel .row){grid-template-columns:1fr;}
}
@media (max-width:390px){
  :where(.v){grid-template-columns:1fr; gap:6px;}
  :where(.v .move){align-self:flex-start;}
  :where(.sev .num){min-width:0; font-size:.72rem;}
  :where(.metric-row){flex-direction:column; gap:2px; align-items:flex-start;}
  :where(.metric-row strong){max-width:none; text-align:left;}
  :where(.mem-item){grid-template-columns:1fr;}
  :where(.mem-item-del){justify-self:flex-start;}
  :where(.bar-label){flex-direction:column; gap:2px;}
  :where(.turn-q){max-width:100%;}
  :where(.turn-a){max-width:100%;}
  :where(.ask-form){flex-direction:column;}
  :where(.ask-btn-submit){width:100%;}
}

/* ── Volume-tool specific ── */
.lvl{display:flex; gap:8px; flex-wrap:wrap; margin:0 0 18px;}
.lvl button{font:inherit; font-size:.86rem; min-height:44px; padding:8px 18px; border-radius:999px; border:1px solid var(--line-2); background:var(--bg-2); color:var(--ink); cursor:pointer; transition:background-color .15s,border-color .15s,color .15s;}
.lvl button[aria-pressed="true"]{background:var(--cy); color:#fff; border-color:var(--cy);}
.lvl button:focus-visible{outline:2px solid var(--cy); outline-offset:2px;}
html[data-theme="zen"] .lvl button{background:#fff; border-color:rgba(0,0,0,.18); color:#0f172a;}

.panel .row{display:grid; grid-template-columns:1fr 92px; gap:10px; align-items:center; padding:9px 0; border-top:1px solid var(--line);}
.panel .row label{font-weight:500; color:var(--ink); text-transform:capitalize; font-size:.9rem;}
.panel .row input{font:inherit; min-height:44px; padding:9px 10px; border:1px solid var(--line-2); border-radius:8px; width:100%; text-align:center; background:var(--bg-2); color:var(--ink);}
.panel .row input:focus-visible{outline:2px solid var(--cy); outline-offset:1px;}
html[data-theme="zen"] .panel .row input{background:#fff; border-color:rgba(0,0,0,.18); color:#0f172a;}

.verdict{display:flex; flex-direction:column; gap:8px;}
.v{display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; padding:12px 14px; border-radius:12px; background:var(--card); border:1px solid var(--line); border-left:4px solid var(--line);}
.v.under{border-left-color:var(--cy);} .v.over{border-left-color:var(--caution);} .v.high{border-left-color:#b8860b;} .v.productive{border-left-color:var(--good);}
.v .m{font-weight:600; color:var(--ink); text-transform:capitalize; font-family:var(--font-display);}
.v .sets{font-variant-numeric:tabular-nums; color:var(--dim); font-size:.86rem; font-family:var(--font-mono);}
.v .move{font-size:.78rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:3px 9px; border-radius:999px; font-family:var(--font-mono);}
.v.under .move{color:var(--cy); background:var(--cy-soft);} .v.over .move{color:var(--caution); background:rgba(232,97,90,.12);}
.v.high .move{color:#ffd27a; background:rgba(184,134,11,.12);} .v.productive .move{color:var(--good); background:rgba(54,224,127,.12);}
.v .label{grid-column:1 / -1; color:var(--dim); font-size:.9rem; margin-top:2px;}
.empty{color:var(--dim); font-style:italic; padding:14px 0;}
.foot{color:var(--faint); font-size:.8rem; margin-top:28px; line-height:1.5; font-family:var(--font-mono);}
.foot a{color:var(--action-ink);}

.sample-btn{margin-top:16px; font:inherit; font-size:.86rem; font-weight:600; min-height:44px; padding:9px 18px; border-radius:999px; border:1px solid var(--line-2); background:var(--bg-2); color:var(--cy); cursor:pointer; transition:background .15s,border-color .15s;}
.sample-btn:hover{background:var(--cy-soft); border-color:var(--cy);}
.sample-btn:focus-visible{outline:2px solid var(--cy); outline-offset:2px;}
html[data-theme="zen"] .sample-btn{background:#fff; border-color:rgba(0,0,0,.18); color:var(--cy);}

/* ── Weak-link-report specific ── */
.hint{color:var(--dim); font-size:.86rem; margin:0 0 16px;}
.share-row{margin:16px 0 0;}
.share-btn{font:inherit; font-size:.86rem; font-weight:700; min-height:44px; padding:9px 20px; border-radius:999px; border:none; background:var(--cy); color:#fff; cursor:pointer;}
.share-btn:hover{opacity:.92;}
.share-btn:focus-visible{outline:2px solid var(--cy); outline-offset:2px;}

.panel .row:first-of-type{border-top:none;}

/* hero verdict */
.hero{border:1px solid var(--line); border-left:5px solid var(--cy); border-radius:14px; padding:18px 20px; background:var(--card); box-shadow:0 4px 16px 0 rgba(0,0,0,0.2);}
.hero.crit{border-left-color:var(--caution);} .hero.elev{border-left-color:#b8860b;} .hero.minor{border-left-color:var(--cy);} .hero.ok{border-left-color:var(--good);}
.hero .tag{font-size:.72rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--dim); margin:0 0 6px; font-family:var(--font-mono);}
.hero .title{font-family:var(--font-display); font-size:1.45rem; color:var(--ink); font-weight:700; margin:0 0 6px; line-height:1.2;}
.hero .fix{color:var(--text); margin:0; font-size:1.02rem;}
.hero .sev{margin-top:14px;}

/* severity meter — compositor-only transform:scaleX */
.sev{display:flex; align-items:center; gap:10px;}
.sev .track{flex:1; height:7px; border-radius:999px; background:var(--bg-2); overflow:hidden;}
.sev .fill{height:100%; border-radius:999px; background:var(--cy); transform:scaleX(0); transform-origin:left center; transition:transform .25s ease;}
.crit .sev .fill{background:var(--caution);} .elev .sev .fill{background:#b8860b;} .minor .sev .fill{background:var(--cy);} .ok .sev .fill{background:var(--good);}
.sev .num{font-variant-numeric:tabular-nums; font-size:.78rem; font-weight:700; color:var(--dim); min-width:58px; text-align:right; font-family:var(--font-mono);}

/* ranked items */
.items{display:flex; flex-direction:column; gap:10px; margin-top:14px;}
.item{display:grid; grid-template-columns:1fr; gap:6px; padding:13px 15px; border-radius:12px; background:var(--card); border:1px solid var(--line); border-left:4px solid var(--line);}
.item.crit{border-left-color:var(--caution);} .item.elev{border-left-color:#b8860b;} .item.minor{border-left-color:var(--cy);}
.item.strong{border-left-color:var(--good);}
.item.strong .it::before{content:"\2713\00a0"; color:var(--good); font-weight:700;}
.item .it{font-weight:600; color:var(--ink); font-family:var(--font-display);}
.item .mv{color:var(--dim); font-size:.92rem;}
.item .ev, .hero .ev{color:var(--ink); font-size:.8rem; font-weight:600; font-variant-numeric:tabular-nums; opacity:.6; margin:1px 0 0; font-family:var(--font-mono);}
.hero .ev{font-size:.86rem; margin:8px 0 0;}

/* AI signal panel */
.signals{display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 0;}
.signals .sig{display:inline-flex; align-items:center; gap:7px; padding:7px 12px; border-radius:999px; background:var(--surface); border:1px solid var(--line); font-size:.8rem; font-weight:600; color:var(--ink);}
.signals .sig .dot{width:8px; height:8px; border-radius:50%; background:var(--dim); flex:none;}
.signals .sig.flag{border-color:rgba(232,97,90,.35);} .signals .sig.flag .dot{background:var(--caution);}
.signals .sig.ok .dot{background:var(--good);}
.signals .sig.idle{opacity:.55;}

/* scan-summary strip */
.scan{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:22px 0 4px;}
.scan .stat{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:13px 15px; box-shadow:0 4px 16px rgba(0,0,0,0.15);}
.scan .stat .n{font-family:var(--font-display); font-weight:700; color:var(--ink); font-size:clamp(1.3rem,5.5vw,1.6rem); line-height:1; font-variant-numeric:tabular-nums;}
.scan .stat .l{display:block; color:var(--dim); font-size:clamp(.66rem,2.4vw,.74rem); font-weight:700; letter-spacing:.04em; text-transform:uppercase; margin-top:7px; font-family:var(--font-mono);}
.scan .stat.fix .n{color:var(--caution);}
.scan .stat.good .n{color:var(--good);}
.scan .stat.strong .n{color:var(--good);}

/* progress vs last check */
.progress{margin:14px 0 0; padding:11px 15px; border-radius:12px; background:var(--cy-soft); border:1px solid rgba(37,99,235,.25); color:var(--ink); font-size:.92rem; font-weight:600;}
.progress.good{background:rgba(54,224,127,.1); border-color:rgba(54,224,127,.25);}

/* motion-gated card entrance */
@media (prefers-reduced-motion:no-preference){
  #hero .hero, .items .item{animation:wlRise .34s cubic-bezier(.2,.7,.2,1) both;}
  @keyframes wlRise{from{opacity:0; transform:translateY(7px);} to{opacity:1; transform:none;}}
}

/* clinical snapshot (print-only) */
#clinicalSnapshot{display:none;}
#clinicalSnapshot h2{margin-top:0;}
.snap-sec{margin:0 0 14px;} .snap-sec h3{font-family:var(--font-display); color:var(--ink); font-size:1.05rem; margin:0 0 6px;}
.snap-row{display:flex; justify-content:space-between; gap:16px; padding:4px 0; border-top:1px solid var(--line); font-size:.92rem;}
.snap-row:first-of-type{border-top:none;} .snap-row .k{color:var(--ink); font-weight:600;} .snap-row .v{color:var(--dim); text-align:right;}
.snap-footer{margin-top:18px; padding-top:10px; border-top:1px solid var(--line); color:var(--dim); font-size:.74rem; word-break:break-all;}
@media print {
  body.printing-snapshot > *{display:none !important;}
  body.printing-snapshot > #clinicalSnapshot{display:block !important; max-width:720px; margin:0 auto; padding:24px;}
  body.printing-snapshot{background:#fff;}
}

/* ── Analyze (Eccentryx Scan) specific ── */
body.analyze-scan{
  --how-mt:18px; --how-border:var(--line); --how-radius:8px; --how-bg:rgba(17,22,31,0.6);
  --how-sum-pad:14px 18px; --how-sum-color:var(--text); --how-accent:var(--cy); --how-sum-fs:.92rem;
  --how-body-pad:0 18px 14px; --how-body-color:var(--muted); --how-strong-color:var(--text);
  --how-body-mt:12px; --how-body-fs:.88rem;
}
.topbar{display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:20px;}
.topbar .mark{width:34px; height:34px; display:grid; place-items:center; border:1px solid rgba(37,99,235,.48); border-radius:8px; background:var(--surface-2); color:var(--good); font-weight:900; font-family:var(--font-display);}
.topbar .nav{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end;}
.topbar .nav a, .pill{display:inline-flex; align-items:center; min-height:44px; padding:6px 10px; border:1px solid var(--line); border-radius:8px; background:var(--panel); color:var(--text); font-size:.82rem; font-weight:700; text-decoration:none; white-space:nowrap;}

.az-hero{display:grid; grid-template-columns:minmax(0,1.15fr) minmax(280px,0.85fr); gap:18px; align-items:stretch; margin-bottom:18px;}
.az-hero .hero-copy{min-height:250px; padding:28px; border:1px solid rgba(37,99,235,.26); border-radius:8px; background:var(--surface); box-shadow:0 24px 70px rgba(0,0,0,0.36);}
.az-hero .eyebrow{color:var(--good);}
.az-hero .eyebrow::before{background:var(--good); box-shadow:0 0 0 4px rgba(54,224,127,.14);}
.az-hero h1{max-width:13ch; font-size:3rem; line-height:.94;}
.az-hero .sub{max-width:62ch; margin:16px 0 0; color:var(--text); font-size:1rem;}

.proof-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px;}
.proof{min-height:120px; padding:14px; border:1px solid var(--line); border-radius:8px; background:var(--surface);}
.proof strong{display:block; margin-bottom:5px; color:var(--ink); font-size:.94rem; font-family:var(--font-display);}
.proof span{color:var(--dim); font-size:.84rem;}

.scan-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start;}
.scan-grid section{min-width:0; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:0 18px 46px rgba(0,0,0,0.28); overflow:hidden;}
.section-head{padding:18px 18px 15px; border-bottom:1px solid var(--line); background:var(--surface-2);}
.section-head h2{display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0; color:var(--ink); font-size:1.15rem;}
.section-head .method{color:#f8c66d; font-size:.72rem; font-weight:800; text-transform:uppercase; font-family:var(--font-mono);}
.section-head .muted{margin:8px 0 0;}
.section-body{padding:18px;}

.consent{display:flex; align-items:flex-start; gap:9px; margin-top:12px; padding:10px 11px; border:1px solid var(--line); border-radius:8px; background:var(--bg-2); color:var(--text); font-size:.84rem;}
.consent label{margin:0; color:var(--text); font-weight:600;}

input[type="file"]{padding:9px; color:var(--dim);}
input[type="checkbox"]{width:17px; min-width:17px; height:17px; min-height:17px; margin:2px 0 0; accent-color:var(--good);}
.az-row{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px;}
.az-row.three{grid-template-columns:repeat(3,minmax(0,1fr));}

.preview{width:100%; max-width:none; max-height:310px; object-fit:cover; border:1px solid var(--line-strong); border-radius:8px; margin-top:10px; display:none; background:var(--bg-2);}

.metric-row{display:flex; justify-content:space-between; gap:14px; padding:7px 0; border-bottom:1px solid var(--line); color:var(--dim); font-size:.9rem;}
.metric-row strong{max-width:58%; color:var(--ink); text-align:right; overflow-wrap:anywhere;}
.metric-row:last-child{border-bottom:0;}

.bar-wrap{height:9px; margin:5px 0 11px; overflow:hidden; border-radius:999px; background:var(--bg-2);}
.bar-fill{width:0; height:100%; border-radius:999px; background:var(--cy); transition:width .4s ease;}
.bar-label{display:flex; justify-content:space-between; gap:10px; margin-top:9px; color:var(--text); font-size:.82rem;}

.note{color:#f8c66d; font-size:.85rem;}
.out:focus{outline:3px solid rgba(37,99,235,.32); outline-offset:4px; border-radius:8px;}
.female-only{display:none;}

@media (max-width:900px){
  .az-hero, .scan-grid{grid-template-columns:1fr;}
  .az-hero .hero-copy{min-height:auto;}
  .az-hero h1{font-size:2.35rem;}
}
@media (max-width:580px){
  .topbar{align-items:flex-start;}
  .topbar .nav{flex-direction:column; align-items:stretch;}
  .az-hero .hero-copy{padding:22px 18px;}
  .proof-grid, .az-row, .az-row.three{grid-template-columns:1fr;}
  .section-body, .section-head{padding-left:15px; padding-right:15px;}
  .az-hero h1{font-size:2rem;}
}
@media (prefers-reduced-motion:reduce){
  .bar-fill{transition:none !important;}
}

/* ── Lift Lab specific ── */
body.lift-lab{
  --how-mt:18px; --how-border:var(--line); --how-radius:12px; --how-bg:var(--panel);
  --how-sum-pad:14px 16px; --how-sum-color:var(--ink); --how-accent:var(--good);
  --how-body-pad:0 16px 14px; --how-body-color:var(--muted); --how-strong-color:var(--ink);
}
.ll-row{display:flex; gap:8px; flex-wrap:wrap; margin:0 0 14px;}
.chip{background:var(--panel); color:var(--ink); border:1px solid var(--line); border-radius:999px; padding:7px 14px; font:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:border-color .15s,background .15s; min-height:44px;}
.chip.on{border-color:var(--good); background:rgba(54,224,127,.12); color:#bbf7d0;}
.stage{position:relative; height:320px; background:linear-gradient(180deg,var(--surface),var(--bg-2)); border:1px solid var(--line); border-radius:16px; overflow:hidden; margin:0 0 16px;}
.controls{display:grid; grid-template-columns:1fr; gap:14px; margin:0 0 16px;}
.ctl{background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:12px 14px;}
.ctl label{display:block; font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); font-weight:700; margin:0 0 8px;}
.ctl .val{float:right; color:var(--ink); font-weight:700; letter-spacing:0;}
input[type=range]{width:100%; accent-color:var(--good);}
input[type=number]{width:100%; background:var(--surface-2); color:var(--ink); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:inherit; font-size:15px; font-weight:600; min-height:44px;}
.readout{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:0 0 12px;}
.ll-stat{background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:12px;}
.ll-stat .k{font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-weight:700; font-family:var(--font-mono);}
.ll-stat .n{font-size:20px; font-weight:800; margin-top:4px; font-family:var(--font-display);}
.ll-stat.eff .n{color:var(--good);}
.ll-stat.fg .n{color:var(--caution);}
.read{background:var(--panel); border:1px solid var(--line); border-left:3px solid var(--good); border-radius:10px; padding:12px 14px; font-size:13px; line-height:1.55; color:var(--text); margin:0 0 18px;}
.curve-card{background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:12px 14px;}
.curve-card .ttl{font-size:11px; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); font-weight:700; display:flex; justify-content:space-between; font-family:var(--font-mono);}
.curve-box{height:88px; margin-top:8px;}
.axis{display:flex; justify-content:space-between; font-size:10px; color:var(--muted); margin-top:4px; font-family:var(--font-mono);}
.impulse-track{height:14px; border-radius:7px; background:rgba(148,163,184,.18); overflow:hidden; margin:10px 0 8px;}
.impulse-fill{height:100%; width:100%; border-radius:7px; background:linear-gradient(90deg,#16a34a,var(--good)); transform:scaleX(0); transform-origin:left center; transition:transform .15s ease;}
.impulse-read{font-size:13px; color:var(--text); font-weight:600;}
.impulse-read b{color:var(--good);}

/* ── Coach (Floor Desk) specific ── */
body.coach-page{
  --how-mt:24px; --how-border:var(--line); --how-radius:12px; --how-bg:var(--surface);
  --how-sum-pad:14px 16px; --how-sum-color:var(--ink); --how-accent:var(--cy);
  --how-body-pad:0 16px 14px; --how-body-color:var(--muted); --how-strong-color:var(--ink);
}
.snapshot{display:flex; gap:10px; flex-wrap:wrap; margin:0 0 20px;}
.coach-snap{flex:1; min-width:120px; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:12px 14px;}
.coach-snap strong{display:block; font-family:var(--font-display); font-size:1.4rem; color:var(--ink); line-height:1.1; text-transform:capitalize;}
.coach-snap span{font-size:.78rem; color:var(--dim);}
.snap-action{cursor:pointer; border-color:var(--cy);}
.snap-action:hover{background:var(--cy-soft);}
.snap-action:focus-visible{outline:2px solid var(--cy); outline-offset:2px;}
.snap-action::after{content:"tap to fix \2192"; display:block; font-size:.68rem; color:var(--cy); font-weight:700; margin-top:5px; letter-spacing:.02em; font-family:var(--font-mono);}
.program-panel{margin:0 0 20px;}
.program-panel h2{margin:0 0 8px;}
.program-copy{margin:0 0 14px; color:var(--dim);}
.program-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 14px;}
.program-row{border:1px solid var(--line); border-radius:12px; padding:11px 12px; background:var(--card);}
.program-row .k{display:block; color:var(--dim); font-size:.72rem; text-transform:uppercase; letter-spacing:.07em; font-family:var(--font-mono);}
.program-row .v{display:block; color:var(--ink); font-weight:800; margin-top:3px;}
.session-list{display:grid; gap:8px; margin-top:12px;}
.session-item{border-left:3px solid var(--cy); padding:8px 10px; background:var(--bg-2); border-radius:8px;}
.session-item strong{display:block; color:var(--ink);}
.session-item span{display:block; color:var(--dim); font-size:.84rem;}
.program-status{margin-top:12px; color:var(--dim); font-size:.9rem;}
.program-actions{display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:14px;}
.export-btn{min-height:44px; border:1px solid var(--cy); border-radius:10px; background:var(--card); color:var(--cy); font:inherit; font-weight:800; padding:0 14px; cursor:pointer;}
.export-btn:hover{background:var(--cy-soft);}
.export-btn:focus-visible{outline:2px solid var(--cy); outline-offset:2px;}
.export-note{margin:0; color:var(--dim); font-size:.82rem;}
@media (max-width:520px){ .program-grid{grid-template-columns:1fr;} }

.ctx{display:flex; align-items:center; gap:8px; font-size:.82rem; color:var(--dim); margin:0 0 14px;}
.ctx .dot{width:8px; height:8px; border-radius:999px; background:var(--line); flex:none;}
.ctx.on .dot{background:var(--good);}

.coach-chips{display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px;}
.coach-chip{font:inherit; font-size:.86rem; padding:8px 14px; border-radius:999px; border:1px solid var(--line); background:var(--card); color:var(--ink); cursor:pointer; min-height:44px;}
.coach-chip:hover{border-color:var(--cy);}
.coach-chip:focus-visible{outline:2px solid var(--cy); outline-offset:2px;}
@media (max-width:380px){ .coach-chip{ min-height:44px; padding:10px 16px; } }

textarea{font:inherit; width:100%; min-height:92px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; resize:vertical; color:var(--text); background:var(--bg-2);}
textarea:focus-visible{outline:2px solid var(--cy); outline-offset:1px;}

.ask-btn{margin-top:12px; display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:0 22px; font:inherit; font-weight:700; color:#fff; background:var(--cy); border:none; border-radius:10px; cursor:pointer;}
.ask-btn:hover{opacity:.92;}
.ask-btn:focus-visible{outline:2px solid var(--cy); outline-offset:2px;}
.ask-btn:disabled{opacity:.6; cursor:progress;}

.answer{background:var(--card); border:1px solid var(--line); border-left:4px solid var(--cy); border-radius:12px; padding:16px 18px; white-space:pre-wrap; color:var(--text); font-size:1.02rem;}
.answer.err{border-left-color:var(--caution);}
.answer.placeholder{color:var(--dim); font-style:italic; border-left-color:var(--line);}
.thread{display:flex; flex-direction:column; gap:12px;}
.turn{padding:13px 16px; border-radius:12px; font-size:1.02rem; white-space:pre-wrap; line-height:1.5;}
.turn-q{align-self:flex-end; max-width:85%; background:var(--surface-2); color:var(--text); border-bottom-right-radius:4px; font-weight:500;}
.turn-a{align-self:flex-start; max-width:94%; background:var(--card); border:1px solid var(--line); border-left:4px solid var(--cy); color:var(--text);}
.turn-a.err{border-left-color:var(--caution);}
.turn-a.loading-turn{display:inline-flex; align-items:center; gap:8px; color:var(--dim);}
.turn-a .copy-btn{display:inline-block; margin-top:10px; font:inherit; font-size:.78rem; font-weight:700; letter-spacing:.02em; color:var(--cy); background:none; border:none; padding:2px 0; cursor:pointer; min-height:24px;}
.turn-a .copy-btn:hover{text-decoration:underline;}
.turn-a .copy-btn:focus-visible{outline:2px solid var(--cy); outline-offset:2px;}
.loading{display:inline-flex; align-items:center; gap:8px; color:var(--dim);}
.loading .pulse{width:9px; height:9px; border-radius:999px; background:var(--cy); animation:pulse 1s ease-in-out infinite;}
@media (prefers-reduced-motion:no-preference){ @keyframes pulse{0%,100%{opacity:.35;}50%{opacity:1;}} }

/* memory transparency panel */
.mem-list{display:grid;gap:10px;margin:12px 0 0}
.mem-item{border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:var(--card);display:grid;grid-template-columns:1fr auto;gap:8px;align-items:start}
.mem-item-body{min-width:0}
.mem-item-type{font-size:.72rem;font-weight:700;color:var(--cy);text-transform:uppercase;letter-spacing:.06em;display:block;margin-bottom:4px;font-family:var(--font-mono)}
.mem-item-content{font-size:.9rem;color:var(--text);line-height:1.4;word-break:break-word}
.mem-item-date{font-size:.72rem;color:var(--dim);margin-top:6px;display:block;font-family:var(--font-mono)}
.mem-item-del{min-height:44px;min-width:44px;border:1px solid var(--line);border-radius:8px;background:var(--bg-2);color:var(--dim);font:inherit;font-size:.76rem;font-weight:700;cursor:pointer;padding:0 10px}
.mem-item-del:hover{border-color:var(--caution);color:var(--caution)}
.mem-item-del:focus-visible{outline:2px solid var(--cy);outline-offset:2px}
.mem-empty{color:var(--dim);font-size:.88rem;margin:12px 0 0;line-height:1.5}
.mem-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:14px}
.mem-erase-all{min-height:44px;border:1px solid var(--caution);border-radius:10px;background:var(--card);color:var(--caution);font:inherit;font-weight:800;padding:0 14px;cursor:pointer}
.mem-erase-all:hover{background:rgba(232,97,90,.08)}
.mem-erase-all:focus-visible{outline:2px solid var(--cy);outline-offset:2px}
.mem-erase-all:disabled{opacity:.5;cursor:not-allowed}
.mem-status{font-size:.82rem;color:var(--dim);margin:0}
.mem-crosslink{margin-top:14px;font-size:.82rem;color:var(--dim)}
.mem-crosslink a{color:var(--cy)}

/* coach-kernel-ascension motion effects */
.coach-snap, .panel, .answer, .turn {
  --coach-motion-x:0px; --coach-motion-y:0px; --coach-glow-x:50%; --coach-glow-y:50%;
  position:relative; overflow:hidden; transition:transform .18s ease;
}
@media (prefers-reduced-motion:no-preference){
  .coach-snap, .panel, .answer, .turn { transform:translate3d(var(--coach-motion-x),var(--coach-motion-y),0); }
}
.coach-snap::after, .panel::after, .answer::after, .turn::after {
  content:""; position:absolute; inset:0;
  background:radial-gradient(circle at var(--coach-glow-x) var(--coach-glow-y),rgba(37,99,235,.055) 0%,transparent 58%);
  border-radius:inherit; opacity:0; pointer-events:none; transition:opacity .18s ease;
}
.coach-snap[data-coach-motion-active="true"]::after, .panel[data-coach-motion-active="true"]::after,
.answer[data-coach-motion-active="true"]::after, .turn[data-coach-motion-active="true"]::after,
.coach-snap:focus-within::after, .panel:focus-within::after, .answer:focus-within::after, .turn:focus-within::after { opacity:1; }
.agent-context-pill {
  background:var(--surface); color:var(--dim); border:1px solid var(--line); border-radius:8px;
  padding:12px 14px; margin-bottom:16px; font-family:var(--font-body); font-size:.85rem; line-height:1.4;
  animation:slideDown .3s cubic-bezier(.16,1,.3,1) forwards;
}
.agent-context-header {
  display:flex; align-items:center; gap:8px; margin-bottom:8px; color:var(--cy);
  font-size:.75rem; letter-spacing:.05em; text-transform:uppercase;
  border-bottom:1px solid var(--line); padding-bottom:6px; font-family:var(--font-mono);
}
.agent-pulse-dot { width:8px; height:8px; background:var(--good); border-radius:50%; animation:pulseDot 1.5s infinite; }
.agent-context-body { font-family:var(--font-body); font-size:.8rem; color:var(--dim); }
@keyframes pulseDot { 0%,100%{opacity:.5;} 50%{opacity:1;} }
@keyframes slideDown { from{opacity:0; transform:translateY(-10px);} to{opacity:1; transform:translateY(0);} }
@media (prefers-reduced-motion:reduce){
  .coach-snap, .panel, .answer, .turn { transform:none !important; transition:none !important; }
  .coach-snap::after, .panel::after, .answer::after, .turn::after { display:none !important; }
  .agent-context-pill, .agent-pulse-dot { animation:none !important; }
}

/* ── Ask (Ask Your Data) specific ── */
body.ask-page{
  --how-mt:24px; --how-border:var(--line); --how-radius:12px; --how-bg:var(--surface-2);
  --how-sum-pad:14px 16px; --how-sum-color:var(--ink); --how-accent:var(--cy);
  --how-body-pad:0 16px 14px; --how-body-color:var(--dim); --how-strong-color:var(--ink);
}
body.ask-page .wrap{max-width:680px;}
.ask-form{display:flex; gap:10px; margin:0 0 20px;}
#askInput{flex:1; background:var(--surface-2); border:1px solid var(--line); color:var(--text);
  border-radius:10px; padding:14px 16px; font-family:var(--font-body); font-size:1rem; min-height:52px;}
#askInput:focus-visible{outline:2px solid var(--cy); outline-offset:2px; border-color:var(--cy);}
.ask-btn-submit{background:var(--cy); color:#fff; border:0; border-radius:10px; padding:0 22px;
  min-height:52px; font-family:var(--font-body); font-weight:700; font-size:1rem; cursor:pointer;}
.ask-btn-submit:hover{background:var(--cy-deep);}
.ask-btn-submit:focus-visible{outline:2px solid var(--text); outline-offset:2px;}
#askAnswer{background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:18px 20px;
  font-size:1.08rem; min-height:64px; white-space:pre-wrap; color:var(--text);}
#askAnswer[data-kind="unknown"],#askAnswer[data-kind="needs-ai"]{color:var(--dim); border-style:dashed;}
#askCitations{margin-top:12px; font-family:var(--font-mono); font-size:.82rem; color:var(--dim);
  display:flex; flex-wrap:wrap; gap:6px; align-items:center;}
.ask-cite-label{color:var(--cy);}
.ask-cite{background:var(--bg-2); border:1px solid var(--line); border-radius:6px; padding:2px 8px;}
.ask-foot{margin-top:22px; color:var(--dim); font-size:.8rem; font-family:var(--font-mono);}
.ask-legal{margin-top:14px; color:var(--dim); font-size:.76rem; line-height:1.5; max-width:680px;}
.ask-legal a{color:var(--cy); text-decoration:none;}

/* ── externalized style= utilities (Tier 2) ── */
.topnav-actions{display:flex;align-items:center;gap:12px}
.coach-q-label{font-weight:500;color:var(--ink);font-size:.9rem}
.ll-row-flush{margin:0}
.ll-val-sm{font-size:14px}
.curve-card-mt{margin-top:14px}

/* ── skip-to-content link (a11y): offscreen until keyboard focus ── */
.skip-link{position:fixed;top:-120px;left:12px;z-index:9999;background:var(--cy);color:#fff;padding:10px 16px;border-radius:var(--r-sm);font:700 .85rem var(--font-display);letter-spacing:.02em;text-decoration:none;transition:top .18s}
.skip-link:focus{top:12px}

/* Cross-surface engagement (wave 1): quiet "Take it to Gym Mode" footer on calculator
   results. Revealed only WITH a result — while the .out area is empty the link stays
   hidden (pure CSS, no JS), so it never promises a number that does not exist yet. */
.take-gym{margin:10px 0 0;}
.out:empty + .take-gym{display:none;}
/* tools.js boots each result area with a single .muted "appears here" hint — that is
   still "no result yet", so the link stays hidden until a real result replaces it. */
.out:has(> .muted:only-child) + .take-gym{display:none;}
.take-gym a{display:inline-flex; align-items:center; min-height:44px; color:var(--action-ink); font-weight:700; font-size:.86rem; text-decoration:none;}
.take-gym a:hover{text-decoration:underline;}
.take-gym a:focus-visible{outline:2px solid var(--action-ink); outline-offset:2px;}

/* --- UX ratchet 2026-07-22 (additive): primary CTA focus ring + footer link targets --- */
.featured:focus-visible{outline:2px solid var(--action-ink); outline-offset:3px;}
footer a{display:inline-flex; align-items:center; min-height:44px;}
footer a:focus-visible, .pricing-cta:focus-visible{outline:2px solid var(--action-ink); outline-offset:2px;}

/* --- UX ratchet 2026-07-22 (additive): topnav wayfinding links get the 44px floor (mirrors consent.css) --- */
.topnav a{min-height:44px; display:inline-flex; align-items:center;}

/* --- UX ratchet 2026-07-22 P3 (additive): theme toggle must not stretch to the hero column height ---
   .tools-head is align-items:stretch by default; the toggle ballooned to a 224px empty box at 360px. */
.tools-head .theme-toggle{align-self:flex-start;}

/* ── Tool index (2026-07-25, cycle 4) ────────────────────────────────────────
   The hub stacks 9 tools over ~8,580px on a 390px screen. Every tool already
   had a stable anchor id but nothing surfaced them, so the page had to be
   scrolled end to end to learn what it contains. This is discovery + deep
   linking only — no tool markup was restructured. Cold-surface palette
   (blue/teal): gold is the live-session signal and never appears here. */
.tool-index{margin:0 0 var(--s-4,32px); border:1px solid var(--line-strong); border-radius:14px;
  background:var(--surface); padding:20px 18px;}
.tool-index h2{margin:0 0 6px; font-size:1.15rem; letter-spacing:-0.01em;}
.ti-lede{margin:0 0 14px; color:var(--muted); font-size:0.92rem; line-height:1.5; max-width:60ch;}
.ti-list{list-style:none; margin:0; padding:0; display:grid; gap:8px;}
@media (min-width:760px){ .ti-list{grid-template-columns:1fr 1fr;} }
.ti-item{display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px;
  min-height:44px; padding:11px 13px; border:1px solid var(--line); border-radius:11px;
  background:var(--surface-2); color:var(--text); text-decoration:none;
  transition:border-color .16s ease, background .16s ease;}
.ti-item:hover{border-color:var(--action-ink); background:rgba(37,99,235,0.08);}
.ti-item:focus-visible{outline:2px solid var(--action-ink); outline-offset:2px;}
.ti-n{display:grid; place-items:center; width:26px; height:26px; border-radius:7px;
  background:rgba(45,212,191,0.14); color:var(--teal-ink);
  font:700 0.78rem/1 var(--mono,ui-monospace,monospace);}
.ti-body{min-width:0; display:flex; flex-direction:column; gap:2px;}
.ti-name{font-weight:700; font-size:0.95rem; line-height:1.25;}
.ti-desc{color:var(--muted); font-size:0.8rem; line-height:1.4;}
.ti-tag{font:700 0.62rem/1 var(--mono,ui-monospace,monospace); letter-spacing:0.12em;
  text-transform:uppercase; color:var(--muted); white-space:nowrap;}
@media (prefers-reduced-motion:reduce){ .ti-item{transition:none;} }

/* 1RM method + spread (2026-07-25, cycle 9). The printed figure is the midpoint of
   two formulas that disagree more as reps rise; this says so, quietly, next to the
   number it qualifies. Cold palette — gold stays the live-session signal. */
.instrument-band{margin:4px 0 0; font:600 11px/1.45 var(--mono,ui-monospace,monospace);
  color:var(--muted); letter-spacing:.01em; max-width:44ch;}

/* ── Plate Loader (cycle 14) ───────────────────────────────────────────────────
   The rack is editable, so the tool has to look like something you can change.
   The drawn bar is built only from plates the engine actually returned. */
.pl-rack{border:1px solid var(--line-strong); border-radius:var(--r-sm); padding:var(--s-2) var(--s-3) var(--s-3); margin:var(--s-3) 0;}
.pl-rack legend{font-family:var(--mono); font-size:var(--t-cap); letter-spacing:0.1em; text-transform:uppercase; color:var(--teal-ink); padding:0 6px;}
.pl-rack-lede{margin:0 0 var(--s-2); font-size:var(--t-sm);}
.pl-rack-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s-2);}
@media (min-width:560px){ .pl-rack-grid{grid-template-columns:repeat(6,1fr);} }
.pl-rack-grid label{display:block; font-family:var(--mono); font-size:var(--t-cap); color:var(--muted); margin-bottom:4px;}
.pl-rack-grid input{width:100%; min-height:44px; padding:6px 8px; border:1px solid var(--line-strong); border-radius:var(--r-sm); background:var(--surface-2); color:var(--text); font-family:var(--mono); text-align:center;}
.pl-rack-grid input:focus-visible{outline:var(--ring) solid var(--action-ink); outline-offset:2px;}

.pl-sample-tag{margin:0 0 var(--s-2); font-family:var(--mono); font-size:var(--t-cap); letter-spacing:0.06em; color:var(--teal-ink);}
.pl-bar{display:flex; align-items:center; justify-content:center; gap:2px; min-height:84px; margin:0 0 var(--s-3); padding:var(--s-2); border:1px solid var(--line-strong); border-radius:var(--r-sm); background:var(--surface-2); overflow-x:auto;}
.pl-sleeve{display:flex; align-items:center; gap:2px;}
.pl-mirror{flex-direction:row-reverse;}
.pl-plate{display:flex; align-items:center; justify-content:center; width:16px; flex:none; border-radius:3px; background:var(--action); color:var(--on-action); font-family:var(--mono); font-size:0.5rem; font-weight:700;}
.pl-shaft{flex:none; min-width:86px; display:flex; align-items:center; justify-content:center; padding:4px 8px; background:var(--line-strong); border-radius:4px; color:var(--text); font-family:var(--mono); font-size:0.5625rem; letter-spacing:0.04em; white-space:nowrap;}
.pl-none{font-family:var(--mono); font-size:var(--t-cap); color:var(--muted); padding:0 var(--s-2);}