:root{
  --bg:#FAF7F2;
  --ink:#1F1D1B;
  --ink-soft:#4A4641;
  --muted:#8A857F;
  --line:#E9E3D8;
  --c-troubleshoot:#D9663A;
  --c-track:#E5A03E;
  --c-overhaul:#D8D3A8;
  --c-peaceful:#BFCCA6;
  --serif:'Fraunces',Georgia,serif;
  --sans:'Inter',-apple-system,system-ui,sans-serif;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:var(--sans);
  background:var(--bg);
  color:var(--ink);
  font-size:17px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}

/* ── Screen system ───────────────────────────────────── */
.screen{display:none;min-height:100vh}
.screen.active{display:block;animation:fade .4s ease}
@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ── Landing ─────────────────────────────────────────── */
#landing.active{display:flex;flex-direction:column;align-items:center;padding:64px 24px 80px}
.landing-head{text-align:center;margin-bottom:48px;max-width:520px}
.landing-eyebrow{
  font-family:var(--sans);
  font-size:11px;letter-spacing:.22em;text-transform:uppercase;
  color:var(--muted);margin-bottom:18px;
}
.landing-title{
  font-family:var(--serif);
  font-weight:500;
  font-size:clamp(44px,7vw,68px);
  letter-spacing:-.02em;line-height:1;
  font-variation-settings:"opsz" 144;
  margin-bottom:18px;
}
.landing-sub{
  color:var(--ink-soft);font-size:15px;line-height:1.6;
  max-width:380px;margin:0 auto;
}

/* The stacked shapes — the signature element */
.stack{
  width:100%;max-width:380px;
  display:flex;flex-direction:column;
  position:relative;
}
.layer{
  position:relative;
  border-radius:28px 28px 8px 8px;
  padding:26px 28px 38px;
  text-align:center;
  cursor:pointer;
  transition:transform .35s cubic-bezier(.2,.7,.2,1),filter .25s ease, box-shadow .25s ease;
  color:#fff;
  margin-top:-18px;
  box-shadow:0 6px 18px -10px rgba(40,30,20,.35);
}
.layer:first-child{margin-top:0}
.layer:hover{transform:translateY(-4px);filter:brightness(1.04);box-shadow:0 14px 28px -14px rgba(40,30,20,.45)}
.layer:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.layer-num{
  font-family:var(--sans);
  font-size:10px;letter-spacing:.2em;
  opacity:.7;margin-bottom:8px;
}
.layer-title{
  font-family:var(--serif);
  font-weight:500;
  font-size:21px;letter-spacing:-.005em;
  line-height:1.15;
  margin-bottom:6px;
  font-variation-settings:"opsz" 36;
}
.layer-sub{
  font-size:12px;opacity:.86;
  letter-spacing:.02em;
  max-width:260px;margin:0 auto;
}

.layer.troubleshoot{background:var(--c-troubleshoot)}
.layer.track{background:var(--c-track)}
.layer.overhaul{background:var(--c-overhaul);color:#534F2E}
.layer.peaceful{background:var(--c-peaceful);color:#3D5235;padding-bottom:46px}

/* ── Detail page ─────────────────────────────────────── */
.topnav{
  position:sticky;top:0;z-index:10;
  background:rgba(250,247,242,.85);
  backdrop-filter:saturate(140%) blur(10px);
  -webkit-backdrop-filter:saturate(140%) blur(10px);
  border-bottom:1px solid var(--line);
}
.topnav-inner{
  max-width:720px;margin:0 auto;
  padding:14px 24px;
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;
}
.nav-btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:9px 14px;border-radius:999px;
  font-size:13px;font-weight:500;color:var(--ink-soft);
  transition:background .18s ease,color .18s ease;
}
.nav-btn:hover:not(:disabled){background:rgba(0,0,0,.04);color:var(--ink)}
.nav-btn:disabled{opacity:.35;cursor:default}
.nav-btn.next{justify-self:end;background:var(--ink);color:var(--bg)}
.nav-btn.next:hover:not(:disabled){background:#000;color:var(--bg)}
.nav-btn.next:disabled{background:#D4CFC6;color:#fff}
.step-meta{
  text-align:center;font-size:11px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--muted);
}
.step-meta b{color:var(--ink);font-weight:500;letter-spacing:.18em}

/* Detail body */
.detail-wrap{max-width:640px;margin:0 auto;padding:56px 24px 80px}
.cat-eyebrow{
  display:inline-flex;align-items:center;gap:10px;
  font-size:11px;letter-spacing:.22em;text-transform:uppercase;
  color:var(--muted);margin-bottom:18px;
}
.cat-dot{width:9px;height:9px;border-radius:50%}
.cat-title{
  font-family:var(--serif);
  font-weight:500;
  font-size:clamp(34px,5vw,46px);letter-spacing:-.015em;
  line-height:1.08;margin-bottom:10px;
  font-variation-settings:"opsz" 144;
}
.cat-sub{
  color:var(--ink-soft);font-size:16px;
  margin-bottom:40px;max-width:520px;
}
.rule{height:1px;background:var(--line);margin:0 0 36px}

/* Accent rail showing progress through steps */
.rail{
  display:flex;gap:6px;margin-bottom:36px;
}
.rail-cell{
  flex:1;height:3px;border-radius:2px;background:var(--line);
  transition:background .25s ease;
}
.rail-cell.done{background:var(--accent,#999)}
.rail-cell.current{background:var(--accent,#999)}

/* Question / instruction body — PLACEHOLDER ZONE */
.step-body{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:36px 32px;
  min-height:260px;
}
.step-kicker{
  font-size:11px;letter-spacing:.2em;text-transform:uppercase;
  color:var(--muted);margin-bottom:14px;
}
.step-heading{
  font-family:var(--serif);
  font-weight:500;font-size:24px;line-height:1.25;
  margin-bottom:14px;
  font-variation-settings:"opsz" 36;
}
.step-text{color:var(--ink-soft);font-size:15px;line-height:1.7}
.placeholder-note{
  margin-top:28px;padding:14px 16px;
  border:1px dashed var(--line);border-radius:10px;
  font-size:12px;color:var(--muted);
  font-family:'SF Mono',ui-monospace,monospace;
  letter-spacing:.01em;
}

@media (max-width:540px){
  .topnav-inner{padding:12px 16px}
  .nav-btn{padding:8px 12px;font-size:12.5px}
  .step-body{padding:26px 22px}
}

/* ── Troubleshoot matrix ─────────────────────────────── */
.topnav-flat{background:#fff;border-bottom:1px solid var(--line)}

.matrix{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:2px;
  background:#fff;
  min-height:calc(100vh - 56px);
}
.tier{
  padding:32px 28px 40px;
  display:flex;flex-direction:column;
  gap:18px;
}
.tier-1{background:#9BA88E}
.tier-2{background:#DEDBA8}
.tier-3{background:#D9663A}
.tier-4{background:#E5A03E}

.tier-h{
  font-family:var(--serif);
  font-weight:500;
  font-size:clamp(15px,1.6vw,18px);
  line-height:1.35;
  letter-spacing:-.005em;
  font-variation-settings:"opsz" 36;
  max-width:38ch;
}
.tier-1 .tier-h{color:#F4F1E5}
.tier-2 .tier-h{color:#3F4A3A}
.tier-3 .tier-h{color:#FBEFE6}
.tier-4 .tier-h{color:#3A2A18}

.tier-pills{
  display:flex;flex-direction:column;
  gap:14px;
  margin-top:6px;
}

.pill{
  background:#FBF8EE;
  border-radius:999px;
  padding:12px 22px;
  font-size:13px;
  font-weight:500;
  line-height:1.3;
  text-align:center;
  max-width:240px;
  box-shadow:0 1px 0 rgba(0,0,0,.04);
  text-decoration:none;
  display:inline-block;
}
.tier-1 .pill{color:#5C6A56}
.tier-2 .pill{color:#5E6B3A}
.tier-3 .pill{color:#9F3E1B}
.tier-4 .pill{color:#7A4A1C}

/* Link-style pills — small terracotta dot marks them as clickable */
.pill-link{
  text-decoration:none;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
  position:relative;
}
.pill-link:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 10px -4px rgba(0,0,0,.18);
}

/* Scatter alignment within each column */
.align-l{align-self:flex-start}
.align-c{align-self:center}
.align-r{align-self:flex-end}

/* Track screen: solo column — force everything centered, no zigzag */
#track .tier-pills-solo{margin-left:auto;margin-right:auto}
#track .tier-pills-solo .pill{align-self:center}

@media (max-width:780px){
  .matrix{grid-template-columns:1fr;min-height:auto}
  .tier{padding:28px 22px 32px}
  .tier-h{max-width:none}
  .pill{max-width:none}
  .align-l,.align-c,.align-r{align-self:stretch}
  .pill{text-align:center}
}


/* ── Track screen: amber background ─────────────────── */
#track .tier-3{background:var(--c-track)}

/* ── Troubleshoot matrix (terracotta cascade, deepest → lightest) ── */
#troubleshoot .tier-1{background:#B94E29}   /* deepest */
#troubleshoot .tier-2{background:#D9663A}   /* anchor — matches landing card */
#troubleshoot .tier-3{background:#E58C67}
#troubleshoot .tier-4{background:#F2B79A}   /* lightest */

#troubleshoot .tier-h{color:#F4EFE7}         /* cream heading — all tiers */
#troubleshoot .pill{
  color:#8C2E14;
  border:1px solid rgba(140,46,20,.12);
  background:#FBF8EE;
}


/* ── Overhaul matrix (khaki cascade, solid shades) ────── */
#overhaul .tier-1{background:#BFB985}   /* deepest — anchor */
#overhaul .tier-2{background:#CDC796}
#overhaul .tier-3{background:#DBD6AC}
#overhaul .tier-4{background:#E6E1C2}   /* lightest */

#overhaul .tier-h{color:#3F4A3A}
#overhaul .pill{
  color:#5E6B3A;
  border:1px solid rgba(95,75,40,.12);
  background:#FBF8EE;
}

/* ── Overhaul matrix (khaki cascade, solid shades) ────── */
#overhaul .tier-1{background:#BFB985}   /* deepest — anchor */
#overhaul .tier-2{background:#CDC796}
#overhaul .tier-3{background:#DBD6AC}
#overhaul .tier-4{background:#E6E1C2}   /* lightest */

#overhaul .tier-h{color:#3F4A3A}
#overhaul .pill{
  color:#5E6B3A;
  border:1px solid rgba(95,75,40,.12);
  background:#FBF8EE;
}

/* ── Solo tier (single-column standalone page) ── */
.tier-solo{
  min-height:calc(100vh - 56px);
  padding:40px 24px 60px;
  align-items:center;
}
.tier-h-solo{
  text-align:center;
  font-size:clamp(22px,3vw,28px);
  font-weight:600;
  max-width:none;
  margin-bottom:28px;
  display:flex;flex-direction:column;gap:6px;
  font-variation-settings:"opsz" 144;
}
.tier-h-sub{
  font-size:.7em;
  font-weight:500;
}
.tier-pills-solo{
  width:100%;
  max-width:520px;
  gap:22px;
}
.tier-pills-solo .pill{
  max-width:360px;
  padding:16px 28px;
  font-size:14px;
}

/* ── Surya Namaskar modal ────────────────────────────── */
.modal-surya-ov{
  display:none;
  position:fixed;inset:0;z-index:1000;
  background:var(--bg);
  overflow-y:auto;
  padding:60px 16px 48px;
}
.modal-surya-ov.open{display:block}

.modal-close{
  position:fixed;
  top:18px;left:50%;transform:translateX(-50%);
  width:44px;height:44px;border-radius:999px;
  background:rgba(0,0,0,.18);
  color:var(--ink);
  display:flex;align-items:center;justify-content:center;
  z-index:1100;
  transition:background .2s;
}
.modal-close:hover{background:rgba(0,0,0,.28)}

.modal-surya-inner{max-width:720px;margin:0 auto}

.surya-img{
  display:block;
  width:100%;
  max-width:560px;
  height:auto;
  margin:0 auto;
  border-radius:8px;
  box-shadow:0 4px 24px -8px rgba(0,0,0,.15);
}


/* ── Surya Namaskar modal ────────────────────────────── */
.modal-surya-ov{
  display:none;
  position:fixed;inset:0;z-index:1000;
  background:var(--bg);
  overflow-y:auto;
  padding:60px 16px 48px;
}
.modal-surya-ov.open{display:block}

.modal-close{
  position:fixed;
  top:18px;left:50%;transform:translateX(-50%);
  width:44px;height:44px;border-radius:999px;
  background:rgba(0,0,0,.18);
  color:var(--ink);
  display:flex;align-items:center;justify-content:center;
  z-index:1100;
  transition:background .2s;
}
.modal-close:hover{background:rgba(0,0,0,.28)}

.modal-surya-inner{max-width:720px;margin:0 auto}

.surya-img{
  display:block;
  width:100%;
  max-width:560px;
  height:auto;
  margin:0 auto;
  border-radius:8px;
  box-shadow:0 4px 24px -8px rgba(0,0,0,.15);
}

/* ── Presencing modal ────────────────────────────────── */
.modal-presencing-ov{
  display:none;
  position:fixed;inset:0;z-index:1000;
  background:var(--bg);
  overflow-y:auto;
  padding:70px 16px 60px;
}
.modal-presencing-ov.open{display:block}

.presencing-inner{max-width:580px;margin:0 auto}

.presencing-header{text-align:center;margin-bottom:36px}
.presencing-eyebrow{
  font-size:18px;font-weight:500;
  color:var(--ink-soft);margin-bottom:2px;
}
.presencing-title{
  font-family:var(--serif);
  font-weight:600;
  font-size:32px;
  color:var(--ink);
  font-variation-settings:"opsz" 144;
}

.sense-list{display:flex;flex-direction:column;gap:28px}
.sense-row{display:flex;align-items:center;gap:14px}

.sense-thumb{
  flex-shrink:0;
  width:72px;height:72px;
  border-radius:14px;
  display:flex;align-items:center;justify-content:center;
}
.sense-thumb svg{width:30px;height:30px}

.sense-line{
  flex-shrink:0;
  width:18px;height:1px;
  background:rgba(0,0,0,.2);
}

.sense-pill{
  flex:1;
  padding:14px 22px;
  border-radius:999px;
  text-align:center;
  min-height:62px;
  display:flex;flex-direction:column;justify-content:center;
}
.sense-pill-main{font-weight:600;font-size:14px;line-height:1.3}
.sense-pill-hint{font-size:11px;opacity:.92;margin-top:3px}

/* Per-sense colors */
.sense-thumb-see{background:#DDE5DA;color:#6B7864}
.sense-pill-see{background:#9BA88E;color:#fff}

.sense-thumb-hear{background:#F3D6C5;color:#A04E2A}
.sense-pill-hear{background:#D9663A;color:#fff}

.sense-thumb-touch{background:#F5E1B8;color:#9F7A2A}
.sense-pill-touch{background:#E5A03E;color:#fff}

.sense-thumb-taste{background:#EDEBC6;color:#7E7A3E}
.sense-pill-taste{background:#DEDBA8;color:#5E5A26}

.sense-thumb-smell{background:#DCE7F0;color:#4A6480}
.sense-pill-smell{background:#BCCFE0;color:#2E4E70}

@media(max-width:480px){
  .sense-thumb{width:56px;height:56px;border-radius:12px}
  .sense-thumb svg{width:24px;height:24px}
  .sense-line{width:10px}
  .sense-pill{padding:12px 16px;min-height:56px}
  .sense-pill-main{font-size:12.5px}
  .sense-pill-hint{font-size:10px}
}

/* ── Anulom Vilom modal ──────────────────────────────── */
.modal-anulom-ov{
  display:none;
  position:fixed;inset:0;z-index:1000;
  background:var(--bg);
  overflow-y:auto;
  padding:60px 0 40px;
}
.modal-anulom-ov.open{display:block}

.anulom-stage{
  position:relative;
  max-width:560px;
  margin:0 auto;
  min-height:calc(100vh - 100px);
  overflow:hidden;
}

.anulom-shape{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  height:95%;
  width:110px;
  border-radius:50%;
  z-index:0;
}
.anulom-shape-left{
  left:-55px;
  background:#9BA88E;
}
.anulom-shape-right{
  right:-55px;
  background:#E5A03E;
}

.anulom-content{
  position:relative;
  z-index:1;
  padding:24px 80px 32px;
  text-align:center;
}

.anulom-header{margin-bottom:48px}
.anulom-eyebrow{
  font-size:17px;
  font-weight:600;
  color:var(--ink-soft);
  margin-bottom:2px;
}
.anulom-title{
  font-size:clamp(22px,4.5vw,32px);
  font-weight:700;
  letter-spacing:.04em;
  line-height:1;
}
.part-sage{color:#7A8A6E}
.part-amber{color:#C68A2E}
.part-dash{color:var(--ink-soft)}

.anulom-steps{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:36px;
}
.anulom-steps li{
  font-size:clamp(16px,2.4vw,19px);
  line-height:1.4;
  color:var(--ink-soft);
  font-weight:500;
}
.emph-sage{color:#7A8A6E;font-weight:700}
.emph-amber{color:#C68A2E;font-weight:700}

.anulom-credit{
  margin-top:48px;
  font-size:10px;
  letter-spacing:.18em;
  color:var(--ink);
  font-weight:700;
  text-align:right;
  padding-right:8px;
}

@media(max-width:480px){
  .anulom-shape{width:80px}
  .anulom-shape-left{left:-40px}
  .anulom-shape-right{right:-40px}
  .anulom-content{padding:20px 60px 24px}
  .anulom-steps{gap:28px}
}


/* ── Eye Movements modal ─────────────────────────────── */
.modal-eye-ov{
  display:none;
  position:fixed;inset:0;z-index:1000;
  background:#2A2A2A;
  overflow-y:auto;
  padding:60px 0 60px;
}
.modal-eye-ov.open{display:block}

.modal-close-dark,
.modal-close-dark svg{
  color:#fff;
  stroke:#fff;
}
.modal-close-dark{
  background:rgba(255,255,255,.15);
}
.modal-close-dark:hover{background:rgba(255,255,255,.28)}

.eye-inner{
  max-width:560px;
  margin:0 auto;
  padding:0 24px;
}

.eye-header{text-align:center;margin-bottom:60px;color:#fff}
.eye-eyebrow{font-size:18px;font-weight:500;margin-bottom:2px}
.eye-title{
  font-size:clamp(26px,5vw,34px);
  font-weight:500;
  letter-spacing:-.01em;
}

.eye-rows{
  display:flex;
  flex-direction:column;
  gap:80px;
}

.eye-row{
  display:flex;
  position:relative;
  padding:18px 0;
}
.eye-row-left{justify-content:flex-start}
.eye-row-center{justify-content:center}
.eye-row-right{justify-content:flex-end}

.eye-pill{
  border-radius:999px;
  padding:24px 36px;
  max-width:340px;
  text-align:center;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.eye-pill p{
  font-size:15px;
  line-height:1.4;
  margin:0;
  color:#fff;
}
.eye-pill strong{font-weight:700}

.eye-pill-orange{background:#D9663A}
.eye-pill-sage{background:#9BA88E}
.eye-pill-amber{background:#E5A03E;color:#3A2A10}
.eye-pill-amber p{color:#3A2A10}

@media(max-width:480px){
  .eye-rows{gap:50px}
  .eye-pill{padding:20px 28px;max-width:280px}
  .eye-pill p{font-size:13.5px}
}
/* ── Yogic Breath modal ──────────────────────────────── */
.modal-yogic-ov{
  display:none;
  position:fixed;inset:0;z-index:1000;
  background:var(--bg);
  overflow-y:auto;
  padding:60px 0 40px;
}
.modal-yogic-ov.open{display:block}

.yogic-stage{
  position:relative;
  max-width:560px;
  margin:0 auto;
  min-height:calc(100vh - 100px);
  overflow:hidden;
}

.yogic-shape{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  height:95%;
  width:110px;
  border-radius:50%;
  z-index:0;
}
.yogic-shape-left{
  left:-55px;
  background:#9BA88E;
}
.yogic-shape-right{
  right:-55px;
  background:#E5A03E;
}

.yogic-content{
  position:relative;
  z-index:1;
  padding:24px 80px 32px;
  text-align:center;
}

.yogic-header{margin-bottom:36px}
.yogic-eyebrow{
  font-size:17px;
  font-weight:500;
  color:var(--ink-soft);
  margin-bottom:2px;
}
.yogic-title{
  font-size:clamp(22px,4.5vw,30px);
  font-weight:700;
  color:var(--ink);
  letter-spacing:-.005em;
}

.yogic-steps{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:26px;
}
.yogic-step{text-align:center}
.yogic-action{
  font-size:15px;
  letter-spacing:.05em;
  color:var(--ink-soft);
  font-weight:500;
  line-height:1.4;
}
.yogic-action strong{
  font-weight:700;
  color:var(--ink);
  letter-spacing:.06em;
}
.yogic-body{
  font-size:15px;
  letter-spacing:.05em;
  color:var(--ink-soft);
  font-weight:500;
  line-height:1.4;
}
.yogic-count{
  font-size:14px;
  color:var(--ink-soft);
  font-weight:400;
  margin-top:3px;
}

.yogic-credit{
  margin-top:36px;
  font-size:10px;
  letter-spacing:.18em;
  color:var(--ink);
  font-weight:700;
  text-align:right;
  padding-right:8px;
}

@media(max-width:480px){
  .yogic-shape{width:80px}
  .yogic-shape-left{left:-40px}
  .yogic-shape-right{right:-40px}
  .yogic-content{padding:20px 60px 24px}
  .yogic-steps{gap:22px}
  .yogic-action,.yogic-body{font-size:14px}
  .yogic-count{font-size:13px}
}

/* ── Surya animated sequence ─────────────────────────── */
.surya-anim-header{text-align:center;margin-bottom:24px}
.surya-anim-eyebrow{
  font-size:11px;
  letter-spacing:.3em;
  text-transform:uppercase;
  color:var(--ink-soft);
  margin-bottom:6px;
}
.surya-anim-title{
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(26px,4.5vw,34px);
  letter-spacing:-.005em;
  color:var(--ink);
  font-variation-settings:"opsz" 144;
}

.surya-stage{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:280px;
  margin:0 auto 24px;
  padding:0 20px;
}


.surya-figure{
  width:100%;
  max-width:320px;
  animation:suryaFade .5s ease;
}
.surya-figure img{
  width:100%;
  height:auto;
  display:block;
  border-radius:6px;
}


@keyframes suryaFade{
  from{opacity:0;transform:scale(.96)}
  to{opacity:1;transform:scale(1)}
}

.surya-info{text-align:center;margin-bottom:24px}
.surya-pose-name{
  font-family:var(--serif);
  font-size:22px;
  font-weight:600;
  color:var(--ink);
  margin-bottom:10px;
  font-variation-settings:"opsz" 36;
}
.surya-breath{
  display:inline-block;
  padding:4px 14px;
  border-radius:999px;
  font-size:10px;
  letter-spacing:.18em;
  text-transform:uppercase;
  font-weight:700;
  color:#fff;
}
.surya-breath.inhale{background:#D9663A}
.surya-breath.exhale{background:#6B9A6C}
.surya-breath.hold{background:#C9A847}

.surya-progress{max-width:360px;margin:0 auto 20px}
.surya-progress-bar{
  height:3px;
  background:rgba(0,0,0,.08);
  border-radius:3px;
  overflow:hidden;
}
.surya-progress-fill{
  height:100%;
  background:var(--ink);
  border-radius:3px;
  transition:width .3s ease;
  width:0%;
}
.surya-step-count{
  text-align:center;
  margin-top:10px;
  font-size:12px;
  color:var(--ink-soft);
  letter-spacing:.05em;
}
.surya-step-count b{color:var(--ink);font-weight:600}

.surya-controls{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  margin-top:8px;
}
.surya-ctrl{
  width:44px;height:44px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
  color:var(--ink);
  display:flex;align-items:center;justify-content:center;
  transition:background .18s ease,transform .15s ease;
}
.surya-ctrl:hover{background:rgba(0,0,0,.14)}
.surya-ctrl:active{transform:scale(.95)}
.surya-play-btn{
  width:54px;height:54px;
  background:var(--ink);
  color:var(--bg);
}
.surya-play-btn:hover{background:#000}

/* ── Emotion modal ───────────────────────────────────── */

.emotion-greet{
  font-family:var(--serif);
  font-style:italic;
  font-size:15px;
  color:var(--c-troubleshoot);
  margin-top:6px;
  margin-bottom:4px;
  font-variation-settings:"opsz" 36;
  letter-spacing:.005em;
}

.modal-emotion-ov{
  display:none;
  position:fixed;inset:0;z-index:1000;
  background:var(--bg);
  overflow-y:auto;
  padding:60px 16px 60px;
}
.modal-emotion-ov.open{display:block}

.emotion-inner{max-width:520px;margin:0 auto}

.emotion-header{text-align:center;margin-bottom:32px}
.emotion-eyebrow{
  font-size:11px;letter-spacing:.22em;text-transform:uppercase;
  color:var(--muted);margin-bottom:10px;
}
.emotion-title{
  font-family:var(--serif);
  font-weight:500;
  font-size:clamp(26px,4vw,34px);
  letter-spacing:-.01em;
  color:var(--ink);
  margin-bottom:8px;
  font-variation-settings:"opsz" 144;
}
.emotion-sub{color:var(--ink-soft);font-size:14px}

.emotion-form{display:flex;flex-direction:column;gap:18px}
.efg{display:flex;flex-direction:column}
.efg label{
  font-size:11px;font-weight:600;letter-spacing:.08em;
  text-transform:uppercase;color:var(--ink-soft);
  margin-bottom:8px;
}
.efg label .opt{font-weight:400;text-transform:none;letter-spacing:0;color:var(--muted)}
.efg input,
.efg textarea{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  padding:12px 14px;
  font-family:var(--sans);
  font-size:15px;
  color:var(--ink);
  outline:none;
  transition:border-color .15s ease;
  resize:vertical;
}
.efg input:focus,
.efg textarea:focus{border-color:var(--ink)}
.efg.err input,
.efg.err textarea{border-color:#c44}

.emotion-actions{
  display:flex;gap:12px;
  margin-top:8px;justify-content:space-between;
  flex-wrap:wrap;
}
.btn-primary-em{
  background:var(--ink);color:var(--bg);
  border:none;border-radius:999px;
  padding:12px 28px;
  font-size:14px;font-weight:500;
  cursor:pointer;transition:background .18s ease;
}
.btn-primary-em:hover:not(:disabled){background:#000}
.btn-primary-em:disabled{opacity:.5;cursor:wait}
.btn-secondary{
  background:transparent;color:var(--ink-soft);
  border:1px solid var(--line);border-radius:999px;
  padding:12px 22px;font-size:14px;cursor:pointer;
  transition:background .18s ease,color .18s ease;
}
.btn-secondary:hover{background:rgba(0,0,0,.04);color:var(--ink)}

.emotion-status{
  margin-top:6px;font-size:13px;text-align:center;min-height:18px;
}
.emotion-status.ok{color:#3a7a4a}
.emotion-status.fail{color:#c44}

/* History list */
.hist-list{display:flex;flex-direction:column;gap:14px;margin-top:8px}
.hist-card{
  background:#fff;border:1px solid var(--line);
  border-radius:10px;padding:16px 18px;
}
.hist-date{
  font-size:11px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);margin-bottom:8px;
}
.hist-emotion{font-size:15px;line-height:1.5;color:var(--ink);white-space:pre-wrap}
.hist-when{
  font-size:13px;color:var(--ink-soft);
  margin-top:8px;padding-top:8px;border-top:1px dashed var(--line);
  white-space:pre-wrap;
}
.hist-empty{
  text-align:center;color:var(--muted);
  font-size:14px;padding:40px 0;
}

/* ── Trigger history card sections ── */
.hist-section{margin-top:10px;padding-top:10px;border-top:1px dashed var(--line)}
.hist-section:first-child{margin-top:0;padding-top:0;border-top:none}
.hist-label{
  font-size:10px;letter-spacing:.12em;text-transform:uppercase;
  color:var(--muted);margin-bottom:4px;font-weight:600;
}
.hist-text{font-size:14px;line-height:1.5;color:var(--ink);white-space:pre-wrap}

/* ── Auth screens ────────────────────────────────────── */
#signup.active, #login.active{
  display:flex !important;
  align-items:flex-start;
  justify-content:center;
  padding:48px 16px 64px;
  min-height:100vh;
}

.auth-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:36px 32px;
  max-width:460px;
  width:100%;
}
.auth-eyebrow{
  font-size:11px;letter-spacing:.22em;text-transform:uppercase;
  color:var(--muted);margin-bottom:10px;
}
.auth-title{
  font-family:var(--serif);
  font-weight:500;
  font-size:clamp(26px,4vw,32px);
  letter-spacing:-.01em;
  color:var(--ink);
  margin-bottom:8px;
  font-variation-settings:"opsz" 144;
}
.auth-sub{
  color:var(--ink-soft);
  font-size:14px;
  margin-bottom:24px;
}

.auth-form{display:flex;flex-direction:column;gap:16px}
.afg{display:flex;flex-direction:column}
.afg-row{display:grid;grid-template-columns:1fr 110px;gap:12px}
.afg-narrow{min-width:0}
.afg label{
  font-size:11px;font-weight:600;letter-spacing:.08em;
  text-transform:uppercase;color:var(--ink-soft);
  margin-bottom:8px;
}
.afg label .opt{font-weight:400;text-transform:none;letter-spacing:0;color:var(--muted)}
.afg input,
.afg select{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  padding:11px 14px;
  font-family:var(--sans);
  font-size:15px;
  color:var(--ink);
  outline:none;
  transition:border-color .15s ease;
}
.afg input:focus,
.afg select:focus{border-color:var(--ink)}
.afg.err input,
.afg.err select{border-color:#c44}

.pwd-wrap{position:relative}
.pwd-wrap input{padding-right:44px;width:100%}
.pwd-toggle{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  background:none;border:none;cursor:pointer;
  width:34px;height:34px;border-radius:50%;
  color:var(--muted);
  display:flex;align-items:center;justify-content:center;
  transition:color .15s ease,background .15s ease;
}
.pwd-toggle:hover{color:var(--ink);background:rgba(0,0,0,.04)}

.remember{
  display:flex;align-items:center;gap:10px;
  font-size:14px;color:var(--ink-soft);
  cursor:pointer;
  user-select:none;
}
.remember input{width:16px;height:16px;cursor:pointer}

.w100{width:100%}

.auth-status{
  font-size:13px;text-align:center;min-height:18px;
}
.auth-status.ok{color:#3a7a4a}
.auth-status.fail{color:#c44}

.auth-switch{
  text-align:center;
  margin-top:8px;
  font-size:14px;color:var(--ink-soft);
}
.auth-switch a{color:var(--ink);font-weight:600;text-decoration:underline}

/* ── User bar on landing ──────────────────────────────── */
.user-bar{
  position:absolute;top:0;left:0;right:0;
  padding:14px 24px;
  z-index:5;
}
.user-bar-inner{
  max-width:520px;margin:0 auto;
  display:flex;justify-content:space-between;align-items:center;
  font-size:13px;
}
.user-bar-name{color:var(--ink-soft)}
.user-bar-name span{color:var(--ink);font-weight:500}
.user-bar-logout{
  background:none;border:1px solid var(--line);
  padding:6px 14px;border-radius:999px;
  font-size:12px;color:var(--ink-soft);cursor:pointer;
  transition:background .15s ease,color .15s ease;
}
.user-bar-logout:hover{background:rgba(0,0,0,.04);color:var(--ink)}1~/* ── Auth screens ────────────────────────────────────── */
#signup.active, #login.active{
  display:flex !important;
  align-items:flex-start;
  justify-content:center;
  padding:48px 16px 64px;
  min-height:100vh;
}

.auth-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:36px 32px;
  max-width:460px;
  width:100%;
}
.auth-eyebrow{
  font-size:11px;letter-spacing:.22em;text-transform:uppercase;
  color:var(--muted);margin-bottom:10px;
}
.auth-title{
  font-family:var(--serif);
  font-weight:500;
  font-size:clamp(26px,4vw,32px);
  letter-spacing:-.01em;
  color:var(--ink);
  margin-bottom:8px;
  font-variation-settings:"opsz" 144;
}
.auth-sub{
  color:var(--ink-soft);
  font-size:14px;
  margin-bottom:24px;
}

.auth-form{display:flex;flex-direction:column;gap:16px}
.afg{display:flex;flex-direction:column}
.afg-row{display:grid;grid-template-columns:1fr 110px;gap:12px}
.afg-narrow{min-width:0}
.afg label{
  font-size:11px;font-weight:600;letter-spacing:.08em;
  text-transform:uppercase;color:var(--ink-soft);
  margin-bottom:8px;
}
.afg label .opt{font-weight:400;text-transform:none;letter-spacing:0;color:var(--muted)}
.afg input,
.afg select{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  padding:11px 14px;
  font-family:var(--sans);
  font-size:15px;
  color:var(--ink);
  outline:none;
  transition:border-color .15s ease;
}
.afg input:focus,
.afg select:focus{border-color:var(--ink)}
.afg.err input,
.afg.err select{border-color:#c44}

.pwd-wrap{position:relative}
.pwd-wrap input{padding-right:44px;width:100%}
.pwd-toggle{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  background:none;border:none;cursor:pointer;
  width:34px;height:34px;border-radius:50%;
  color:var(--muted);
  display:flex;align-items:center;justify-content:center;
  transition:color .15s ease,background .15s ease;
}
.pwd-toggle:hover{color:var(--ink);background:rgba(0,0,0,.04)}

.remember{
  display:flex;align-items:center;gap:10px;
  font-size:14px;color:var(--ink-soft);
  cursor:pointer;
  user-select:none;
}
.remember input{width:16px;height:16px;cursor:pointer}

.w100{width:100%}

.auth-status{
  font-size:13px;text-align:center;min-height:18px;
}
.auth-status.ok{color:#3a7a4a}
.auth-status.fail{color:#c44}

.auth-switch{
  text-align:center;
  margin-top:8px;
  font-size:14px;color:var(--ink-soft);
}
.auth-switch a{color:var(--ink);font-weight:600;text-decoration:underline}

/* ── User bar on landing ──────────────────────────────── */
.user-bar{
  position:absolute;top:0;left:0;right:0;
  padding:14px 24px;
  z-index:5;
}
.user-bar-inner{
  max-width:520px;margin:0 auto;
  display:flex;justify-content:space-between;align-items:center;
  font-size:13px;
}
.user-bar-name{color:var(--ink-soft)}
.user-bar-name span{color:var(--ink);font-weight:500}
.user-bar-logout{
  background:none;border:1px solid var(--line);
  padding:6px 14px;border-radius:999px;
  font-size:12px;color:var(--ink-soft);cursor:pointer;
  transition:background .15s ease,color .15s ease;
}
.user-bar-logout:hover{background:rgba(0,0,0,.04);color:var(--ink)}

/* ── Free-flow writing screen ───────────────────────── */
#freeflow .ff-wrap, #audioflow .ff-wrap{
  max-width:720px;
  margin:0 auto;
  padding:48px 24px 80px;
}

/* Setup view */
.ff-setup{display:block}
.ff-active{display:none}
#freeflow.ff-running .ff-setup{display:none}
#freeflow.ff-running .ff-active{display:block}

.ff-eyebrow{
  font-size:11px;letter-spacing:.22em;text-transform:uppercase;
  color:var(--muted);margin-bottom:14px;text-align:center;
}
.ff-title{
  font-family:var(--serif);
  font-weight:500;
  font-size:clamp(28px,4.5vw,42px);
  letter-spacing:-.015em;line-height:1.1;
  font-variation-settings:"opsz" 144;
  text-align:center;
  margin-bottom:14px;
}
.ff-sub{
  text-align:center;color:var(--ink-soft);
  max-width:440px;margin:0 auto 40px;line-height:1.55;
}

.ff-durations{
  display:flex;gap:14px;justify-content:center;
  flex-wrap:wrap;margin-bottom:32px;
}
.ff-dur{
  background:#FBF8EE;
  border:1.5px solid var(--line);
  border-radius:18px;
  padding:22px 28px;
  min-width:110px;
  display:flex;flex-direction:column;align-items:center;gap:2px;
  transition:border-color .18s ease, transform .15s ease, box-shadow .18s ease;
}
.ff-dur b{
  font-family:var(--serif);
  font-weight:500;
  font-size:36px;
  line-height:1;
  font-variation-settings:"opsz" 144;
  color:var(--ink);
}
.ff-dur span{
  font-size:12px;color:var(--muted);
  letter-spacing:.05em;
}
.ff-dur:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 16px -10px rgba(40,30,20,.35);
  border-color:var(--c-troubleshoot);
}
.ff-dur.sel{
  border-color:var(--c-troubleshoot);
  background:#FFF5EC;
}
.ff-dur.sel b{color:var(--c-troubleshoot)}

.ff-start{
  display:block;margin:0 auto;
  background:var(--ink);color:var(--bg);
  padding:14px 44px;border-radius:999px;
  font-size:14px;font-weight:500;letter-spacing:.02em;
  transition:opacity .18s ease, transform .15s ease;
}
.ff-start:disabled{opacity:.35;cursor:default}
.ff-start:not(:disabled):hover{transform:translateY(-1px)}

/* Active view */
.ff-timer{
  font-family:var(--serif);
  font-weight:500;
  font-size:clamp(64px,12vw,108px);
  text-align:center;
  letter-spacing:-.02em;line-height:1;
  font-variation-settings:"opsz" 144;
  margin-top:8px;
  color:var(--ink);
  transition:color .3s ease;
}
.ff-timer.done{color:var(--c-troubleshoot)}
.ff-timer-label{
  text-align:center;
  font-size:11px;letter-spacing:.22em;text-transform:uppercase;
  color:var(--muted);margin-top:8px;margin-bottom:32px;
}
.ff-textarea{
  width:100%;
  min-height:300px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:22px 24px;
  font-family:var(--serif);
  font-size:18px;
  line-height:1.6;
  color:var(--ink);
  resize:vertical;
  outline:none;
  font-variation-settings:"opsz" 36;
  transition:border-color .18s ease;
}
.ff-textarea:focus{border-color:var(--c-troubleshoot)}
.ff-stop{
  display:block;margin:24px auto 0;
  background:transparent;
  border:1.5px solid var(--line);
  color:var(--ink-soft);
  padding:12px 28px;border-radius:999px;
  font-size:13px;font-weight:500;
  transition:border-color .18s ease, color .18s ease;
}
.ff-stop:hover{border-color:var(--ink);color:var(--ink)}

/* End-of-session actions ─────────────────────────── */
.ff-end-actions{display:none}
.ff-saved-actions{display:none}
.ff-more-picker{display:none}

/* The standalone "End session" pill is retired — three buttons handle it */
.ff-stop{display:none !important}

/* Row 1 (Save / More time / Erase) shows the whole time you're writing */
#freeflow.ff-running .ff-end-actions{display:flex}
#freeflow.ff-done .ff-end-actions{display:flex}

#freeflow.ff-more-open .ff-end-actions{display:none}
#freeflow.ff-more-open .ff-saved-actions{display:none}
#freeflow.ff-more-open .ff-more-picker{display:block}

/* After save: grey out row 1, reveal row 2 */
#freeflow.ff-saved .ff-end-actions{display:flex;opacity:.45;pointer-events:none}
#freeflow.ff-saved .ff-saved-actions{display:flex;margin-top:14px}
#freeflow.ff-saved .ff-textarea{
  pointer-events:none;
  background:#F4EFE7;
  color:var(--ink-soft);
  border-color:var(--line);
  cursor:default;
}
#freeflow.ff-saved .ff-textarea::selection{background:transparent}

#freeflow.ff-saved .ff-textarea{
  max-height:220px;
  overflow-y:auto;
}


.ff-end-actions,
.ff-saved-actions{
  margin-top:24px;
  gap:14px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}


.ff-end-btn{
  flex:1;min-width:110px;
  padding:13px 22px;
  border:1.5px solid var(--line);
  border-radius:999px;
  background:transparent;
  color:var(--ink-soft);
  font-size:13px;font-weight:500;
  cursor:pointer;
  transition:border-color .18s ease, color .18s ease, background .18s ease, transform .15s ease;
}
.ff-end-btn:hover{
  border-color:var(--ink);
  color:var(--ink);
  transform:translateY(-1px);
}
.ff-end-more{
  border-color:var(--c-troubleshoot);
  color:var(--c-troubleshoot);
}
.ff-end-more:hover{
  background:rgba(217,102,58,.06);
  border-color:var(--c-troubleshoot);
  color:var(--c-troubleshoot);
}
.ff-end-done{
  background:var(--ink);
  color:var(--bg);
  border-color:var(--ink);
}
.ff-end-done:hover{
  background:#000;
  color:var(--bg);
}

/* More-time picker */
.ff-more-picker{
  margin-top:24px;
  text-align:center;
}
.ff-more-label{
  font-size:12px;letter-spacing:.15em;text-transform:uppercase;
  color:var(--muted);margin-bottom:16px;
}
.ff-more-options{
  display:flex;gap:12px;justify-content:center;flex-wrap:wrap;
}
.ff-more-opt{
  background:#FBF8EE;
  border:1.5px solid var(--line);
  border-radius:16px;
  padding:18px 24px;
  min-width:100px;
  display:flex;flex-direction:column;align-items:center;gap:2px;
  cursor:pointer;
  transition:border-color .18s ease, transform .15s ease, box-shadow .18s ease;
}
.ff-more-opt b{
  font-family:var(--serif);
  font-weight:500;
  font-size:28px;line-height:1;
  font-variation-settings:"opsz" 144;
  color:var(--c-troubleshoot);
}
.ff-more-opt span{
  font-size:11px;color:var(--muted);letter-spacing:.05em;
}
.ff-more-opt:hover{
  transform:translateY(-2px);
  border-color:var(--c-troubleshoot);
  box-shadow:0 6px 16px -10px rgba(40,30,20,.35);
}

/* ── Shouldn't modal (matches emotion modal styling) ── */
.emotion-modal-ov{
  display:none;
  position:fixed;inset:0;z-index:1000;
  background:var(--bg);
  overflow-y:auto;
  padding:60px 16px 60px;
}
.emotion-modal-ov.open{display:block}

.emotion-modal-card{
  max-width:520px;
  margin:0 auto;
  position:relative;
}

.emotion-modal-x{
  position:absolute;
  top:-30px;right:0;
  background:none;
  border:none;
  color:var(--ink-soft);
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:8px 12px;
  transition:color .18s ease;
}
.emotion-modal-x:hover{color:var(--ink)}

/* ---------- Exercise Timer ---------- */

.exercise-timer{
    margin-bottom:28px;
    text-align:center;
}

.exercise-time{

    font-family:var(--serif);

    font-size:52px;

    font-weight:500;

    line-height:1;

    color:var(--ink);

    margin-bottom:20px;

    font-variation-settings:"opsz" 144;
}

.exercise-options{

    display:flex;

    justify-content:center;

    gap:12px;

    flex-wrap:wrap;
}

.timer-option{

    border:1px solid var(--line);

    background:#fff;

    color:var(--ink-soft);

    border-radius:999px;

    padding:10px 22px;

    cursor:pointer;

    transition:.2s;
}

.timer-option:hover{

    border-color:var(--c-troubleshoot);

    color:var(--c-troubleshoot);
}

.timer-option.active{

    background:var(--c-troubleshoot);

    color:#fff;

    border-color:var(--c-troubleshoot);
}

.timer-display.finished{

    color:var(--c-troubleshoot);
}


/* ── Exercise end-actions (Presencing + future modals) ── */
.exercise-end-actions{
  display:none;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:24px;
}
.exercise-end-actions.visible{
  display:flex;
}
.exercise-btn{
  border:1.5px solid var(--line);
  background:transparent;
  color:var(--ink);
  border-radius:999px;
  padding:10px 22px;
  font-family:var(--sans);
  font-size:14px;
  font-weight:500;
  cursor:pointer;
  transition:border-color .18s, color .18s, background .18s;
}
.exercise-btn:hover{
  border-color:var(--ink);
  background:var(--ink);
  color:#fff;
}
.exercise-btn.exercise-more{
  border-color:var(--c-troubleshoot);
  color:var(--c-troubleshoot);
}
.exercise-btn.exercise-more:hover{
  background:var(--c-troubleshoot);
  color:#fff;
}


/* ── Audioflow screen ── */
.af-active-wrap{ text-align:center; padding:40px 24px 80px; max-width:600px; margin:0 auto }

.af-mic-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  width:80px;height:80px;
  margin:32px auto 16px;
}
.af-mic-pulse{
  position:absolute;
  inset:0;border-radius:50%;
  background:rgba(217,103,58,.15);
  animation:afPulse 1.4s ease-in-out infinite;
}
.af-mic-icon{
  width:36px;height:36px;
  color:var(--c-troubleshoot);
  position:relative;z-index:1;
}
@keyframes afPulse{
  0%,100%{transform:scale(1);opacity:.6}
  50%{transform:scale(1.35);opacity:1}
}

.af-canvas{
  display:block;
  width:100%;
  height:60px;
  margin:16px 0 24px;
  border-radius:8px;
  background:rgba(217,103,58,.06);
}

.af-end-actions{ justify-content:center }
.af-save-btn{
  background:var(--ink);
  color:var(--bg);
  border-color:var(--ink);
}
.af-save-btn:hover{ opacity:.85 }
.af-more-btn{
  border-color:var(--c-troubleshoot);
  color:var(--c-troubleshoot);
}
.af-more-btn:hover{
  background:var(--c-troubleshoot);
  color:#fff;
}
.af-saved-actions{ justify-content:center; margin-top:14px }
