:root{
  --bg:#11232A; --bg2:#1A3139; --panel:#1A3139; --panel2:#234049;
  --line:#37555C; --text:#EFEAD9; --sub:#CFCDBB; --muted:#93A8A6;
  --accent:#E3B23C; --accent2:#8FD0E3;
  --green:#6EE7A8; --yellow:#FFD166; --gray:#93A8A6; --orange:#FFA45C; --red:#FF6B8B;
  --radius:3px;
  --serif:'Instrument Serif', Georgia, serif;
  --sans:'Hanken Grotesk', 'Segoe UI', system-ui, sans-serif;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg); color:var(--text); font-family:var(--sans);
  font-size:16px; min-height:100vh; line-height:1.55;
}
h1,h2,h3{font-family:var(--serif); font-weight:600; letter-spacing:-.005em;}
a{color:inherit; text-decoration:none;}
::selection{background:var(--accent); color:#1b1405;}
:focus-visible{outline:3px solid var(--accent2); outline-offset:2px;}

.wrap{max-width:1100px; margin:0 auto; padding:0 20px;}

/* Header */
header{position:sticky; top:0; z-index:40; background:rgba(17,35,42,.96); backdrop-filter:blur(8px); border-bottom:1px solid var(--line);}
header .bar{display:flex; align-items:center; justify-content:space-between; padding:14px 20px; max-width:1100px; margin:0 auto;}
.brand{font-family:var(--serif); font-weight:600; font-size:20px;}
.brand span{color:var(--accent2);}
.header-actions{display:flex; gap:10px; align-items:center;}
.btn{border:1px solid var(--line); background:var(--panel); color:var(--text); padding:11px 18px; min-height:44px; border-radius:3px; font-size:14.5px; font-weight:600; cursor:pointer; transition:.15s;}
.btn:hover{border-color:var(--accent);}
.btn-primary{background:var(--accent); color:#1b1405; border:none;}
.btn-primary:hover{filter:brightness(1.1);}
.btn-ghost{background:transparent;}

/* Hero */
.hero{padding:56px 0 24px;}
.hero h1{font-size:40px; line-height:1.12; max-width:640px;}
.hero h1 .accent{color:var(--accent);}
.hero p{color:var(--sub); font-size:17px; max-width:56ch; margin-top:14px;}

/* Disclaimer gate */
.gate-overlay{position:fixed; inset:0; background:rgba(6,16,20,.92); z-index:200; display:flex; align-items:center; justify-content:center; padding:20px;}
.gate-card{max-width:560px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:32px; }
.gate-card h2{font-size:20px; margin-bottom:14px;}
.gate-card p{color:var(--sub); font-size:14px; margin-bottom:12px;}
.gate-card ul{color:var(--sub); font-size:14px; margin:12px 0 18px 18px;}
.gate-card li{margin-bottom:6px;}
.gate-check{display:flex; align-items:flex-start; gap:10px; background:var(--bg2); border:1px solid var(--line); border-radius:3px; padding:14px; margin-bottom:18px;}
.gate-check input{margin-top:3px; width:16px; height:16px; accent-color:var(--accent); flex-shrink:0;}
.gate-check label{font-size:13.5px; color:var(--text); cursor:pointer;}
.gate-card .btn-primary{width:100%; padding:13px; font-size:14px; opacity:.5; pointer-events:none;}
.gate-card .btn-primary.enabled{opacity:1; pointer-events:auto;}

/* Cards / panels */
.card{background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:20px;}
.section{padding:28px 0;}
.section h2{font-size:30px; margin-bottom:6px;}
.section .sub{color:var(--sub); font-size:15.5px; max-width:70ch; margin-bottom:20px;}

/* Quiz */
.quiz-group{margin-bottom:24px;}
.quiz-group h3{font-size:19px; color:var(--text); margin-bottom:10px;}
.quiz-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); gap:10px;}
.quiz-option{display:flex; align-items:flex-start; gap:10px; background:var(--bg2); border:1px solid var(--line); border-radius:3px; padding:12px 14px; cursor:pointer; transition:.15s;}
.quiz-option:hover{border-color:var(--accent);}
.quiz-option input{margin-top:3px; accent-color:var(--accent);}
.quiz-option .label{font-size:13.5px; font-weight:600;}
.quiz-option .desc{font-size:12px; color:var(--muted); margin-top:2px;}
.quiz-option.checked{border-color:var(--accent); background:rgba(227,178,60,.12);}

/* Exercise grid (reused pattern from the personal site) */
.filters{display:flex; gap:10px; margin-bottom:18px; flex-wrap:wrap;}
.filters select{background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:3px; padding:8px 10px; font-size:13px;}
.ex-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); gap:14px;}
.ex-card{background:var(--panel); border:1px solid var(--line); border-radius:3px; overflow:hidden; cursor:pointer; transition:.15s; display:flex; flex-direction:column;}
.ex-card:hover{border-color:var(--accent);}
.ex-card img{width:100%; height:130px; object-fit:cover; background:var(--bg2);}
.ex-card .body{padding:14px;}
.ex-card h4{font-size:16px; font-family:var(--serif); margin-bottom:6px;}
.ex-card .tag-pill{display:inline-block; font-size:12px; font-weight:600; padding:2px 9px; border-radius:3px; margin-bottom:8px;}
.pill-green{background:rgba(110,231,168,.14); color:var(--green);}
.pill-yellow{background:rgba(255,209,102,.14); color:var(--yellow);}
.pill-orange{background:rgba(255,164,92,.14); color:var(--orange);}
.pill-red{background:rgba(255,107,139,.14); color:var(--red);}
.pill-gray{background:rgba(147,168,166,.14); color:var(--gray);}
.ex-card p{font-size:13.5px; color:var(--sub); line-height:1.4;}

/* Modal */
.modal-overlay{position:fixed; inset:0; background:rgba(6,16,20,.88); z-index:100; display:flex; align-items:flex-start; justify-content:center; padding:40px 20px; overflow-y:auto;}
.modal{max-width:620px; width:100%; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:0; overflow:hidden;}
.modal .modal-close{position:absolute; top:16px; right:20px; background:var(--bg2); border:1px solid var(--line); border-radius:3px; width:44px; height:44px; cursor:pointer; color:var(--text); font-size:20px;}
.modal-imgs{display:flex; gap:2px;}
.modal-imgs img{flex:1; height:200px; object-fit:cover;}
.modal-body{padding:24px;}
.modal-body h3{font-size:26px; margin-bottom:10px;}
.modal-body .desc{color:var(--sub); font-size:15.5px; max-width:70ch; margin-bottom:16px;}
.caution-box{background:rgba(255,209,102,.08); border:1px solid rgba(255,209,102,.3); border-radius:3px; padding:14px; margin-bottom:16px;}
.caution-box.red-box{background:rgba(255,107,139,.08); border-color:rgba(255,107,139,.3);}
.caution-box h5{font-size:14px; color:var(--yellow); margin-bottom:8px;}
.caution-box.red-box h5{color:var(--red);}
.caution-box p{font-size:13px; color:var(--text); margin-bottom:6px;}
.modal-body ol{margin-left:20px; font-size:15px; max-width:70ch; color:var(--text);}
.modal-body ol li{margin-bottom:8px;}

/* Footer */
footer{border-top:1px solid var(--line); padding:28px 0; margin-top:40px;}
footer p{color:var(--muted); font-size:12px; text-align:center;}
footer button{color:var(--accent2); background:none; border:none; cursor:pointer; text-decoration:underline; font-size:12px;}

.empty-state{color:var(--muted); font-size:14px; padding:30px 0; text-align:center;}
.hidden{display:none !important;}

@media (max-width:640px){
  .hero h1{font-size:26px;}
  header .bar{flex-wrap:wrap; gap:10px;}
}

#sectionNav{display:flex;gap:4px;margin:14px auto 6px;overflow-x:auto;border-bottom:1px solid var(--line);scrollbar-width:thin}
#sectionNav button{background:none;color:var(--sub);border:none;border-bottom:3px solid transparent;padding:12px 14px;min-height:44px;cursor:pointer;font:600 15px var(--sans);white-space:nowrap}
#sectionNav button:hover{color:var(--text)}
#sectionNav button.active{color:var(--accent);border-bottom-color:var(--accent)}
.phase-h{margin:26px 0 8px;color:var(--accent);font-size:20px}
.big-h{margin:30px 0 4px;font-size:20px}
.concept{background:var(--panel);border:1px solid var(--line);border-radius:3px;padding:10px 14px;margin:8px 0}
.concept summary{cursor:pointer}
.concept-body{padding-top:8px;color:var(--sub);line-height:1.55}
.posture-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px;margin:12px 0}
.posture-pick{background:var(--panel);border:1px solid var(--line);border-radius:3px;padding:8px 10px;cursor:pointer;font-size:13px}
.fascia-wrap{display:flex;gap:20px;flex-wrap:wrap;margin-top:14px}
.fascia-svg{width:240px;height:440px;flex:none}
.fascia-side{flex:1;min-width:240px}
.fascia-list{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.fl-btn{border:1px solid;font-size:12px}
.fascia-panel{background:var(--panel);border:1px solid var(--line);border-radius:3px;padding:12px 14px;line-height:1.55}
.rest-body{color:var(--sub);line-height:1.6}
.rest-body .callout,.rest-body .principle{background:var(--panel);border:1px solid var(--line);border-radius:3px;padding:12px 14px;margin:10px 0}
.rest-body .principles{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.rest-body b{display:block;color:var(--text)}
.rest-body .breathe-guide svg{width:120px}
.rest-body .section-title{color:var(--text);margin:22px 0 4px}
.modal h4{margin:16px 0 4px;color:var(--accent);font-size:16px;font-family:var(--serif)}

.quiz-opt-wrap{display:flex;flex-direction:column;gap:4px}
.side-row{display:flex;gap:8px;align-items:center;padding:0 6px 6px;font-size:12px;color:var(--sub)}
.side-pill{border:1px solid var(--line);border-radius:2px;padding:3px 10px;cursor:pointer;background:var(--panel2)}
.side-pill input{margin-right:4px}

/* breathing ring (hero) */
.hero-grid{display:flex;gap:32px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.breath{width:160px;height:160px;flex:none;position:relative;margin:0 auto}
.breath svg{width:100%;height:100%}
.breath .ring{transform-origin:50% 50%;animation:breathe 10s ease-in-out infinite}
@keyframes breathe{0%{transform:scale(.62)}40%{transform:scale(1)}100%{transform:scale(.62)}}
.breath-cap{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font:500 14px var(--sans);color:var(--sub);text-align:center}
@media (prefers-reduced-motion:reduce){.breath .ring{animation:none;transform:scale(.85)} html{scroll-behavior:auto}}
.concept summary,.posture-pick{min-height:44px;display:flex;align-items:center}
.fl-btn{min-height:44px}
@media (max-width:640px){.hero h1{font-size:30px}}

.lymph-body{max-width:70ch;line-height:1.65;color:var(--sub)}.lymph-body h3{margin:22px 0 6px;color:var(--text)}.lymph-body ul,.lymph-body ol{margin:6px 0 10px 22px}.lymph-body li{margin:4px 0}.lymph-body b{color:var(--text)}.lymph-src{font-size:.85em;margin-top:18px}.lymph-src a{color:var(--accent);text-decoration:underline}

body{background:var(--bg)}h1,h2,h3,.brand{font-variation-settings:'opsz' 144,'WONK' 1;letter-spacing:-.02em}h1{font-weight:300}

.mistake{border-left:2px solid var(--accent2);padding:2px 0 2px 12px;margin:10px 0}.mistake .myth{opacity:.8}.mistake .truth{margin-top:4px}
