:root{
  --paper:#eaeff5; --sheet:#fff; --sheet-2:#f4f7fa;
  --ink:#0e1c30; --ink-2:#455a78; --ink-3:#7387a3;
  --rule:#ccd8e6; --rule-soft:#e0e8f1;
  --teal:#00726d; --teal-soft:#d8ecea; --teal-line:#8fc9c4;
  --amber:#a2520f; --amber-soft:#f8e7d3;
  --rose:#a8324b; --rose-soft:#f7dde2;
  --grid:rgba(14,28,48,.05);
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]){
  --paper:#071320; --sheet:#0e2131; --sheet-2:#0b1b28;
  --ink:#d9e9f4; --ink-2:#9db6ca; --ink-3:#6e8aa2;
  --rule:#1f4257; --rule-soft:#16303f;
  --teal:#4fd9cf; --teal-soft:#0d3a3b; --teal-line:#1d6b69;
  --amber:#e5a664; --amber-soft:#3a2915;
  --rose:#f090a4; --rose-soft:#3d1622;
  --grid:rgba(125,195,225,.065);
  color-scheme:dark;
}}
:root[data-theme="dark"]{
  --paper:#071320; --sheet:#0e2131; --sheet-2:#0b1b28;
  --ink:#d9e9f4; --ink-2:#9db6ca; --ink-3:#6e8aa2;
  --rule:#1f4257; --rule-soft:#16303f;
  --teal:#4fd9cf; --teal-soft:#0d3a3b; --teal-line:#1d6b69;
  --amber:#e5a664; --amber-soft:#3a2915;
  --rose:#f090a4; --rose-soft:#3d1622;
  --grid:rgba(125,195,225,.065);
  color-scheme:dark;
}
*,*::before,*::after{box-sizing:inherit}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:16px; line-height:1.58; -webkit-font-smoothing:antialiased;
  background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);
  background-size:28px 28px;
}
h1,h2,h3,.display{font-family:"Space Grotesk",Inter,sans-serif; letter-spacing:-.02em; margin:0}
code,pre,.mono{font-family:"JetBrains Mono",ui-monospace,Menlo,monospace}
button{font-family:inherit; color:inherit}
:focus-visible{outline:2px solid var(--teal); outline-offset:3px; border-radius:3px}
svg.ic{width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}

/* ================= top bar ================= */
.bar{
  position:sticky; top:0; z-index:30; background:var(--paper);
  border-bottom:1px solid var(--rule);
  padding-top:env(safe-area-inset-top,0px);
}
.bar-in{max-width:1140px; margin:0 auto; padding:11px 18px; display:flex; gap:12px; align-items:center}
.brand{display:flex; align-items:center; gap:10px; background:none; border:0; cursor:pointer; padding:2px; flex:none}
.brand .mk{width:30px; height:30px; display:grid; place-items:center; background:var(--ink); color:var(--paper); border-radius:7px}
.brand .mk svg{width:17px; height:17px; stroke-width:1.8}
.brand b{font-family:"Space Grotesk",sans-serif; font-size:15px; font-weight:600; letter-spacing:-.01em}
.brand .bl{text-align:left}
.brand .bs{display:block; font-size:11.5px; color:var(--ink-3); font-weight:400; letter-spacing:0}
.bar-sp{flex:1}
.srch{position:relative; flex:0 1 300px; min-width:0}
.srch input{
  width:100%; padding:9px 12px 9px 34px; font-size:14.5px; font-family:inherit;
  border:1px solid var(--rule); background:var(--sheet); color:var(--ink); border-radius:8px;
}
.srch svg{position:absolute; left:10px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:var(--ink-3)}
.tbtn{
  border:1px solid var(--rule); background:var(--sheet); border-radius:8px; cursor:pointer;
  padding:9px 13px; font-size:14px; font-weight:500; display:flex; align-items:center; gap:7px; flex:none;
}
.tbtn:hover{border-color:var(--teal); color:var(--teal)}
.tbtn.solid{background:var(--ink); color:var(--paper); border-color:var(--ink)}
.tbtn.solid:hover{background:var(--teal); border-color:var(--teal); color:#fff}
.tbtn svg{width:16px; height:16px}
.icononly{padding:9px 10px}

.wrap{max-width:1140px; margin:0 auto; padding:30px 18px 90px}

/* ================= hero ================= */
.hero{display:grid; grid-template-columns:1fr auto; gap:30px; align-items:center; margin-bottom:34px}
.hero h1{font-size:clamp(27px,4.6vw,42px); line-height:1.06; max-width:16ch; font-weight:700}
.hero p{margin:13px 0 0; color:var(--ink-2); max-width:54ch; font-size:16px}
.hero .cta{display:flex; flex-wrap:wrap; gap:10px; margin-top:20px}
.trunc{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:46vw}
.ring{position:relative; width:132px; height:132px; flex:none}
.ring svg{transform:rotate(-90deg)}
.ring .rv{position:absolute; inset:0; display:grid; place-content:center; text-align:center}
.ring .rp{font-family:"Space Grotesk",sans-serif; font-size:29px; font-weight:600; line-height:1}
.ring .rl{font-size:11px; color:var(--ink-3); margin-top:3px}

/* ================= map ================= */
.group{margin-bottom:34px}
.ghead{display:flex; align-items:baseline; gap:12px; margin-bottom:14px; padding-bottom:9px; border-bottom:1px solid var(--rule)}
.ghead h2{font-size:14px; font-weight:600; letter-spacing:.01em}
.ghead p{margin:0; font-size:13.5px; color:var(--ink-3)}
.cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(248px,1fr)); gap:12px}
.cc{
  text-align:left; background:var(--sheet); border:1px solid var(--rule); border-radius:12px;
  padding:15px 15px 13px; cursor:pointer; display:flex; flex-direction:column; gap:9px;
  transition:border-color .16s, transform .16s;
}
.cc:hover{border-color:var(--teal); transform:translateY(-2px)}
.cc-top{display:flex; align-items:center; gap:10px}
.cc-ico{width:36px; height:36px; border-radius:9px; display:grid; place-items:center; background:var(--teal-soft); color:var(--teal); flex:none}
.cc-n{margin-left:auto; font-family:"JetBrains Mono",monospace; font-size:11.5px; color:var(--ink-3)}
.cc h3{font-size:15.5px; font-weight:600; line-height:1.28}
.cc-k{font-size:13px; color:var(--ink-2); line-height:1.45; flex:1}
.cc-foot{display:flex; align-items:center; gap:9px; margin-top:2px}
.cc-bar{flex:1; height:4px; border-radius:3px; background:var(--rule-soft); overflow:hidden}
.cc-bar i{display:block; height:100%; width:0; background:var(--teal); border-radius:3px; transition:width .3s}
.cc-m{font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--ink-3); white-space:nowrap}
.cc.full .cc-ico{background:var(--teal); color:#fff}
.cc .dot{width:7px; height:7px; border-radius:50%; background:var(--amber); flex:none}

/* ================= chapter view ================= */
.chv{max-width:820px; margin:0 auto}
.crumb{display:flex; align-items:center; gap:9px; margin-bottom:18px; flex-wrap:wrap}
.crumb button{border:1px solid var(--rule); background:var(--sheet); border-radius:8px; cursor:pointer; padding:7px 12px; font-size:13.5px; display:flex; align-items:center; gap:6px}
.crumb button:hover{border-color:var(--teal); color:var(--teal)}
.crumb .sp{flex:1}
.chead{display:flex; gap:15px; align-items:flex-start; margin-bottom:20px}
.chead .big{width:52px; height:52px; border-radius:13px; background:var(--teal-soft); color:var(--teal); display:grid; place-items:center; flex:none}
.chead .big svg{width:27px; height:27px}
.chead .lbl{font-family:"JetBrains Mono",monospace; font-size:11.5px; color:var(--ink-3); margin-bottom:3px}
.chead h2{font-size:clamp(21px,3.4vw,29px); line-height:1.15; font-weight:700}
.chead p{margin:7px 0 0; color:var(--ink-2); font-size:15px; max-width:60ch}

.track{display:flex; gap:4px; margin-bottom:22px; flex-wrap:wrap}
.track button{
  flex:1 1 14px; min-width:14px; height:7px; border-radius:4px; border:0; padding:0;
  background:var(--rule); cursor:pointer; transition:background .2s, transform .15s;
}
.track button:hover{transform:scaleY(1.7)}
.track button.hasfig{box-shadow:inset 0 0 0 1.5px var(--teal-line)}
.track button.now{background:var(--ink); transform:scaleY(1.7)}

.card{background:var(--sheet); border:1px solid var(--rule); border-radius:14px; padding:26px 26px 24px; position:relative; overflow:hidden}
.card .wm{position:absolute; right:-24px; top:-24px; color:var(--teal); opacity:.07; pointer-events:none}
.card .wm svg{width:150px; height:150px; stroke-width:1}
.card-top{display:flex; align-items:center; gap:10px; margin-bottom:14px; position:relative}
.card-top .step{font-family:"JetBrains Mono",monospace; font-size:11.5px; color:var(--ink-3)}
.pill{font-size:11px; font-weight:600; padding:2px 8px; border-radius:20px; letter-spacing:.02em}
.pill.new{background:var(--amber-soft); color:var(--amber)}
.pill.fig{background:var(--sheet-2); color:var(--ink-2); border:1px solid var(--rule)}
.cq{font-size:clamp(19px,2.9vw,26px); line-height:1.28; font-weight:600; position:relative; max-width:34ch}
.showbtn{
  margin-top:20px; border:1px dashed var(--teal-line); background:var(--teal-soft); color:var(--teal);
  border-radius:10px; padding:13px 18px; font-size:14.5px; font-weight:600; cursor:pointer;
  display:flex; align-items:center; gap:9px; width:100%; justify-content:center;
}
.showbtn:hover{background:var(--teal); color:#fff; border-style:solid}
.ans{margin-top:20px; padding-top:20px; border-top:1px solid var(--rule-soft); position:relative}
.ans p{margin:0 0 12px} .ans p:last-child{margin-bottom:0}
.ans ul{margin:0 0 12px; padding-left:19px} .ans li{margin:0 0 7px}
.ans strong{font-weight:600} .ans em{color:var(--ink-2); font-style:italic}
.ans code{background:var(--sheet-2); border:1px solid var(--rule-soft); color:var(--ink); padding:1px 5px; font-size:.86em; border-radius:4px}
.tablewrap{overflow-x:auto; margin:0 0 14px; border:1px solid var(--rule); border-radius:9px}
.ans table{border-collapse:collapse; width:100%; min-width:400px; font-size:14px}
.ans th,.ans td{border-bottom:1px solid var(--rule-soft); border-right:1px solid var(--rule-soft); padding:8px 11px; text-align:left; vertical-align:top}
.ans th:last-child,.ans td:last-child{border-right:0}
.ans tr:last-child td{border-bottom:0}
.ans th{background:var(--sheet-2); font-weight:600; font-size:13px}

.fig{margin:0 0 16px; padding:14px 12px; background:var(--sheet-2); border:1px solid var(--rule-soft); border-radius:11px; overflow-x:auto}
.fig svg{display:block; width:100%; min-width:430px; max-width:560px; margin:0 auto; height:auto}
.fig .b{fill:var(--sheet); stroke:var(--rule); stroke-width:1.2}
.fig .b.bt{fill:var(--teal-soft); stroke:var(--teal-line)}
.fig .b.ba{fill:var(--amber-soft); stroke:var(--amber)}
.fig .b.br{fill:var(--rule-soft); stroke:var(--rule)}
.fig .b.ovr{fill:none; stroke:var(--amber); stroke-width:1.6; stroke-dasharray:4 3}
.fig .b.bd{fill:none; stroke:var(--rule); stroke-dasharray:5 4}
.fig text{font-family:Inter,sans-serif; fill:var(--ink)}
.fig .tx{font-size:12px; font-weight:500; text-anchor:middle; dominant-baseline:middle}
.fig .tx.mono{font-family:"JetBrains Mono",monospace; font-size:14px; letter-spacing:.06em}
.fig .lb{font-size:11px; fill:var(--ink-3); font-weight:400}
.fig .lb.am{fill:var(--amber)}
.fig .ln{stroke:var(--ink-2); stroke-width:1.3; fill:none}
.fig .ln.tl{stroke:var(--teal)}
.fig .ln.am{stroke:var(--amber)}
.fig .ln.dsh{stroke:var(--rule); stroke-dasharray:4 4}
.card .fig{background:var(--paper)}
@media (max-width:760px){ .fig{padding:10px 8px} }
pre{margin:0 0 14px; padding:15px 17px; background:var(--sheet-2); border:1px solid var(--rule-soft); border-left:3px solid var(--teal); border-radius:9px; font-size:13px; line-height:1.62; overflow-x:auto}

.acts{display:flex; gap:9px; margin-top:20px; flex-wrap:wrap}
.acts button{border:1px solid var(--rule); background:var(--sheet); border-radius:9px; cursor:pointer; padding:11px 15px; font-size:14px; font-weight:500; display:flex; align-items:center; gap:7px}
.acts .sp{flex:1}
.acts .nx{background:var(--ink); color:var(--paper); border-color:var(--ink)}
.acts .nx:hover{background:var(--teal); border-color:var(--teal); color:#fff}
.acts .pv:hover{border-color:var(--ink)}
.kbd{margin-top:14px; font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--ink-3); text-align:center}

/* chapter done panel */
.done{background:var(--sheet); border:1px solid var(--teal-line); border-radius:14px; padding:34px 26px; text-align:center}
.done .big{width:56px; height:56px; margin:0 auto 14px; border-radius:50%; background:var(--teal-soft); color:var(--teal); display:grid; place-items:center}
.done .big svg{width:28px; height:28px; stroke-width:2}
.done h3{font-size:22px; font-weight:700}
.done p{margin:9px 0 0; color:var(--ink-2); font-size:15px}
.done .cta{display:flex; gap:10px; justify-content:center; margin-top:20px; flex-wrap:wrap}

/* list mode */
.list{display:flex; flex-direction:column; gap:9px}
.li{background:var(--sheet); border:1px solid var(--rule); border-radius:11px; overflow:hidden}
.li>button{width:100%; text-align:left; background:none; border:0; cursor:pointer; padding:14px 16px; display:flex; gap:11px; align-items:baseline; font-size:15.5px; font-weight:500; line-height:1.4}
.li>button:hover{color:var(--teal)}
.li .n{font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--ink-3); font-weight:400; flex:none}
.li .body{padding:0 16px 16px; border-top:1px solid var(--rule-soft); margin-top:-1px}
.li .body>.ans{margin-top:14px; padding-top:0; border-top:0}

/* search */
.sres{max-width:820px; margin:0 auto}
.sres h2{font-size:19px; margin-bottom:5px}
.sres .meta{color:var(--ink-3); font-size:14px; margin-bottom:20px}
.sr{width:100%; text-align:left; background:var(--sheet); border:1px solid var(--rule); border-radius:11px; padding:14px 16px; cursor:pointer; display:block; margin-bottom:9px}
.sr:hover{border-color:var(--teal)}
.sr .top{display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--ink-3); margin-bottom:5px}
.sr .top svg{width:14px; height:14px; color:var(--teal)}
.sr .q{font-size:15.5px; font-weight:500; line-height:1.4}
.none{text-align:center; padding:60px 20px; color:var(--ink-3)}

/* checklist */
.ckl{display:flex; flex-direction:column; gap:7px}
.ckl label{display:flex; gap:12px; align-items:flex-start; background:var(--sheet); border:1px solid var(--rule); border-radius:10px; padding:13px 15px; cursor:pointer; font-size:15px; line-height:1.45}
.ckl label:hover{border-color:var(--teal)}
.ckl input{margin-top:3px; width:17px; height:17px; accent-color:var(--teal); flex:none}
.ckl input:checked ~ span{color:var(--ink-3); text-decoration:line-through}

/* ================= drill ================= */
.drill{position:fixed; inset:0; z-index:60; background:var(--paper); display:flex; flex-direction:column;
  padding:calc(env(safe-area-inset-top,0px) + 14px) 18px calc(env(safe-area-inset-bottom,0px) + 16px)}
.drill[hidden]{display:none}
.dtop{display:flex; align-items:center; gap:12px; padding-bottom:12px; border-bottom:1px solid var(--rule); flex:none}
.dtop .pos{font-family:"JetBrains Mono",monospace; font-size:12.5px; color:var(--ink-3)}
.dprog{flex:1; height:4px; background:var(--rule-soft); border-radius:3px; overflow:hidden}
.dprog i{display:block; height:100%; background:var(--teal); width:0; transition:width .25s}
.dbody{flex:1 1 auto; overflow:auto; display:flex; align-items:center; padding:22px 0}
.dinner{width:100%; max-width:760px; margin:0 auto}
.dsrc{display:flex; align-items:center; gap:8px; font-size:12px; color:var(--ink-3); margin-bottom:12px}
.dsrc svg{width:15px; height:15px; color:var(--teal)}
.dq{font-size:clamp(20px,3.4vw,29px); line-height:1.26; font-weight:600; font-family:"Space Grotesk",sans-serif; letter-spacing:-.02em}
.dfoot{flex:none; display:flex; gap:9px; align-items:center; padding-top:13px; border-top:1px solid var(--rule); flex-wrap:wrap}
.dfoot button{border:1px solid var(--rule); background:var(--sheet); border-radius:9px; cursor:pointer; padding:11px 16px; font-size:14px; font-weight:500}
.dfoot .rv{background:var(--ink); color:var(--paper); border-color:var(--ink)}
.dfoot .hint{margin-left:auto; font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--ink-3)}

.foot{margin-top:50px; padding-top:18px; border-top:1px solid var(--rule); display:flex; gap:14px; align-items:center; flex-wrap:wrap; font-size:13px; color:var(--ink-3)}
.foot button{border:1px solid var(--rule); background:none; border-radius:7px; cursor:pointer; padding:6px 11px; font-size:12.5px; color:var(--ink-2)}
.foot button:hover{border-color:var(--amber); color:var(--amber)}

@media (max-width:760px){
  .hero{grid-template-columns:1fr; gap:20px}
  .ring{width:104px; height:104px}
  .bar-in{flex-wrap:wrap; padding:10px 14px; gap:9px}
  .srch{order:9; flex:1 1 100%}
  .brand .bs{display:none}
  .wrap{padding:22px 14px 80px}
  .card{padding:20px 18px}
  .cards{grid-template-columns:1fr}
  .ghead{flex-direction:column; align-items:flex-start; gap:3px}
  .trunc{max-width:64vw}
  .acts .sp{display:none}
  .acts button{flex:1 1 auto; justify-content:center}
  body{font-size:15.5px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ================= progress: confidence, freshness, habit ================= */

/* --- confidence swatches (solid / getting there / shaky) --- */
.sw{width:9px; height:9px; border-radius:3px; flex:none; display:inline-block}
.sw.s3,.cr-bar i.s3,.cc-bar i.s3{background:var(--teal)}
.sw.s2,.cr-bar i.s2,.cc-bar i.s2{background:var(--amber)}
.sw.s1,.cr-bar i.s1,.cc-bar i.s1{background:var(--rose)}
.sw.s0,.cr-bar i.s0{background:var(--rule)}

/* the chapter bar is now three stacked segments */
.cc-bar{display:flex; gap:0}
.cc-bar i{width:0; border-radius:0; transition:width .3s}
.cc-bar i:first-child{border-radius:3px 0 0 3px}
.cc-bar i:last-child{border-radius:0 3px 3px 0}
.cc.stale .cc-m{color:var(--amber)}
.cc .dot.st{background:var(--amber)}
.cc .dot{background:var(--ink-3)}

/* --- progress board --- */
.pboard{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.82fr); gap:12px; margin-bottom:34px;
}
.pb-col{background:var(--sheet); border:1px solid var(--rule); border-radius:14px; padding:18px 19px 19px}
.pb-head{margin-bottom:14px}
.pb-head.tight{margin-top:20px; padding-top:16px; border-top:1px solid var(--rule-soft)}
.pb-head h2{font-size:13px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; color:var(--ink-3)}
.pb-head p{margin:4px 0 0; font-size:13.5px; color:var(--ink-2)}

.conf-rows{display:flex; flex-direction:column; gap:8px}
.cr{display:flex; align-items:center; gap:11px; font-size:13.5px}
.cr-l{display:flex; align-items:center; gap:8px; flex:0 0 108px; color:var(--ink-2)}
.cr-bar{flex:1; min-width:0; height:6px; border-radius:4px; background:var(--rule-soft); overflow:hidden}
.cr-bar i{display:block; height:100%; border-radius:4px; transition:width .3s}
.cr-n{font-family:"JetBrains Mono",monospace; font-size:12px; color:var(--ink-3); min-width:2.4ch; text-align:right}

.pb-note{
  margin-top:16px; width:100%; text-align:left; cursor:pointer;
  display:flex; gap:11px; align-items:flex-start; font-size:13px; line-height:1.45;
  background:var(--amber-soft); border:1px solid var(--amber); border-radius:11px; padding:12px 13px; color:var(--ink);
}
.pb-note svg{width:17px; height:17px; color:var(--amber); flex:none; margin-top:1px}
.pb-note strong{font-weight:600}
.pb-note .go{margin-left:auto; display:flex; align-items:center; gap:4px; color:var(--amber); font-weight:600; white-space:nowrap}
.pb-note .go svg{width:14px; height:14px; margin:0}
.pb-note:hover{background:var(--amber); color:#fff}
.pb-note:hover svg,.pb-note:hover .go{color:#fff}

.pb-link{
  margin-top:12px; width:100%; cursor:pointer; background:none; border:1px solid var(--rule); border-radius:9px;
  padding:9px 12px; font-size:13.5px; display:flex; align-items:center; gap:8px; color:var(--ink-2);
}
.pb-link svg{width:15px; height:15px}
.pb-link svg:last-child{margin-left:auto}
.pb-link:hover{border-color:var(--teal); color:var(--teal)}

/* --- habit chips --- */
.chips{display:flex; flex-wrap:wrap; gap:7px}
.chips.big{margin-bottom:26px; gap:9px}
.chip{
  display:inline-flex; align-items:center; gap:7px; font-size:13px; color:var(--ink-2);
  background:var(--sheet-2); border:1px solid var(--rule-soft); border-radius:20px; padding:6px 12px;
}
.chip svg{width:14px; height:14px; color:var(--ink-3)}
.chip b{font-family:"Space Grotesk",sans-serif; font-weight:600; color:var(--ink)}
.chip.on{background:var(--teal-soft); border-color:var(--teal-line)}
.chip.on svg{color:var(--teal)}
.chips.big .chip{font-size:14px; padding:9px 15px}
.chips.big .chip b{font-size:16px}

/* --- interview-date countdown --- */
.cdown{
  position:relative; display:flex; align-items:center; gap:13px;
  background:var(--teal-soft); border:1px solid var(--teal-line); border-radius:11px; padding:13px 15px;
}
.cdown.soon{background:var(--amber-soft); border-color:var(--amber)}
.cdown.past{background:var(--sheet-2); border-color:var(--rule)}
.cd-n{font-family:"Space Grotesk",sans-serif; font-size:30px; font-weight:700; line-height:1; color:var(--teal)}
.cdown.soon .cd-n{color:var(--amber)}
.cdown.past .cd-n{color:var(--ink-3)}
.cd-l{font-size:13px; color:var(--ink-2); line-height:1.35}
.cd-l span{display:block; font-family:"JetBrains Mono",monospace; font-size:11.5px; color:var(--ink-3)}
.cd-x{
  position:absolute; top:7px; right:9px; background:none; border:0; cursor:pointer;
  font-size:17px; line-height:1; color:var(--ink-3); padding:2px 5px; border-radius:5px;
}
.cd-x:hover{color:var(--ink); background:var(--rule-soft)}

.setdate{
  margin-top:10px; display:flex; align-items:center; gap:9px;
  border:1px solid var(--rule); background:var(--sheet-2); border-radius:9px; padding:9px 12px; cursor:pointer;
}
.setdate:hover{border-color:var(--teal)}
.setdate svg{width:15px; height:15px; color:var(--ink-3); flex:none}
.setdate input{
  border:0; background:none; color:var(--ink); font-family:inherit; font-size:14px;
  width:100%; min-width:0; cursor:pointer;
}

/* --- today's plan --- */
.planbox{margin-top:11px; border:1px solid var(--rule-soft); border-radius:11px; padding:13px 14px; background:var(--sheet-2)}
.plan-top{display:flex; align-items:baseline; gap:9px; font-size:13px; color:var(--ink-2); margin-bottom:8px}
.plan-top b{margin-left:auto; font-family:"Space Grotesk",sans-serif; font-size:15px; color:var(--ink)}
.plan-bar{display:block; height:6px; border-radius:4px; background:var(--rule-soft); overflow:hidden}
.plan-bar i{display:block; height:100%; background:var(--teal); border-radius:4px; transition:width .3s}
.plan-k{margin:10px 0 0; font-size:13px; color:var(--ink-3); line-height:1.5}
.plan-k.done{color:var(--teal)}
.plan-ch{display:flex; flex-direction:column; gap:6px; margin-top:11px}
.plan-ch button{
  display:flex; align-items:center; gap:9px; width:100%; text-align:left; cursor:pointer;
  background:var(--sheet); border:1px solid var(--rule); border-radius:9px; padding:9px 11px; font-size:13.5px;
}
.plan-ch button:hover{border-color:var(--teal); color:var(--teal)}
.plan-ch .pn{font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--ink-3); flex:none}
.plan-ch .pt{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.plan-ch .pl{margin-left:auto; font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--ink-3); flex:none}

/* --- the rating row on a question card --- */
.rate{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px;
  margin-top:20px; padding-top:17px; border-top:1px solid var(--rule-soft);
}
.rate.compact{margin-top:14px; padding-top:13px}
.rate-l{font-size:13px; color:var(--ink-3); margin-right:3px}
.rate .cf,.dfoot .cf{
  border:1px solid var(--rule); background:var(--sheet); border-radius:9px; cursor:pointer;
  padding:10px 14px; font-size:14px; font-weight:500; display:inline-flex; align-items:center; gap:7px;
}
.rate .cf::before,.dfoot .cf::before{content:''; width:9px; height:9px; border-radius:3px; flex:none}
.cf.c3::before{background:var(--teal)} .cf.c2::before{background:var(--amber)} .cf.c1::before{background:var(--rose)}
.cf.c3:hover,.cf.c3[aria-pressed="true"]{background:var(--teal); border-color:var(--teal); color:#fff}
.cf.c2:hover,.cf.c2[aria-pressed="true"]{background:var(--amber); border-color:var(--amber); color:#fff}
.cf.c1:hover,.cf.c1[aria-pressed="true"]{background:var(--rose); border-color:var(--rose); color:#fff}
.cf[aria-pressed="true"]::before,.cf:hover::before{background:rgba(255,255,255,.85)}
.flagb{
  margin-left:auto; border:1px solid var(--rule); background:var(--sheet); border-radius:9px; cursor:pointer;
  padding:10px 13px; font-size:13.5px; display:inline-flex; align-items:center; gap:7px; color:var(--ink-2);
}
.flagb svg{width:15px; height:15px}
.flagb:hover{border-color:var(--ink); color:var(--ink)}
.flagb[aria-pressed="true"]{background:var(--ink); border-color:var(--ink); color:var(--paper)}

.agetag{margin-left:auto; font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--ink-3); white-space:nowrap}

/* --- pills + track + list states for the new model --- */
.pill.solid{background:var(--teal-soft); color:var(--teal)}
.pill.getting{background:var(--amber-soft); color:var(--amber)}
.pill.shaky{background:var(--rose-soft); color:var(--rose)}
.pill.stale{background:var(--amber-soft); color:var(--amber)}
.pill.flagged{background:var(--sheet-2); color:var(--ink-2); border:1px solid var(--rule)}

.track button[data-c="3"]{background:var(--teal)}
.track button[data-c="2"]{background:var(--amber)}
.track button[data-c="1"]{background:var(--rose)}
.track button[data-stale="1"]{opacity:.45}
.track button.now{background:var(--ink); opacity:1}

.li[data-c="3"]{border-color:var(--teal-line)}
.li[data-c="3"]>button{opacity:.62}
.li[data-c="2"]{border-color:var(--amber)}
.li[data-c="1"]{border-color:var(--rose)}
.li[data-stale="1"]>button{opacity:1}
.li[data-stale="1"]{border-color:var(--amber)}
.li[data-flag="1"]{box-shadow:inset 3px 0 0 var(--ink)}
.li>button{flex-wrap:wrap}
.li-tag{display:inline-flex; gap:5px; margin-left:auto; flex:none}

/* --- stats view --- */
.stat-sec{margin-bottom:26px; background:var(--sheet); border:1px solid var(--rule); border-radius:14px; padding:17px 18px}
.stat-sec h3{font-size:13px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; color:var(--ink-3); margin-bottom:13px}
.stat-two{display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:12px}
.stat-two .stat-sec{margin-bottom:0}

.heat{display:grid; grid-template-rows:repeat(7,12px); grid-auto-flow:column; grid-auto-columns:12px; gap:3px}
.heat i{border-radius:3px; background:var(--rule-soft)}
.heat i.l1{background:var(--teal-soft)} .heat i.l2{background:var(--teal-line)}
.heat i.l3{background:var(--teal)} .heat i.l4{background:var(--teal); box-shadow:inset 0 0 0 1.5px var(--ink)}
.heat-l{display:flex; align-items:center; gap:4px; margin-top:11px; font-size:11.5px; color:var(--ink-3)}
.heat-l .sp{flex:1}
.heat-l i{width:11px; height:11px; border-radius:3px; background:var(--rule-soft)}
.heat-l i.l1{background:var(--teal-soft)} .heat-l i.l2{background:var(--teal-line)}
.heat-l i.l3{background:var(--teal)} .heat-l i.l4{background:var(--teal); box-shadow:inset 0 0 0 1.5px var(--ink)}

.sess{display:flex; flex-direction:column; gap:1px}
.se{display:flex; align-items:center; gap:11px; padding:9px 0; border-bottom:1px solid var(--rule-soft); font-size:13.5px}
.se:last-child{border-bottom:0}
.sd{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.sq{color:var(--ink-2)}
.ss{font-family:"JetBrains Mono",monospace; font-size:11.5px; color:var(--ink-3); min-width:6ch; text-align:right}

.chlist{display:flex; flex-direction:column; gap:5px; max-height:330px; overflow-y:auto}
.chlist button{
  display:flex; align-items:center; gap:10px; width:100%; text-align:left; cursor:pointer;
  background:none; border:0; border-radius:8px; padding:7px 8px; font-size:13.5px; color:inherit;
}
.chlist button:hover{background:var(--sheet-2)}
.chlist .cn{font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--ink-3); flex:none}
.chlist .ct{flex:1 1 40%; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.chlist .cc-bar{flex:0 0 62px; height:5px; border-radius:3px; background:var(--rule-soft); overflow:hidden}
.chlist .cp{font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--ink-3); flex:none; min-width:4ch; text-align:right}

/* --- drill footer with three ratings --- */
.dfoot .drate{display:flex; gap:8px; flex-wrap:wrap}
.dfoot .flagb{margin-left:0}
.dsrc .pill{margin-left:4px}

.tbtn.warn{border-color:var(--amber); color:var(--amber)}
.tbtn.warn:hover{background:var(--amber); border-color:var(--amber); color:#fff}

@media (max-width:860px){
  .pboard{grid-template-columns:1fr}
}
@media (max-width:760px){
  .pb-col{padding:16px}
  .cr-l{flex:0 0 96px}
  .rate{gap:7px}
  .rate-l{flex:1 1 100%; margin:0 0 2px}
  .rate .cf{flex:1 1 auto; justify-content:center; padding:11px 10px}
  .flagb{margin-left:0; flex:1 1 100%; justify-content:center}
  .agetag{flex:1 1 100%; margin-left:0; text-align:left}
  .dfoot .drate{flex:1 1 100%}
  .dfoot .cf{flex:1 1 auto; justify-content:center}
  .dfoot .flagb{flex:1 1 auto}
  .dfoot .hint{display:none}
  .heat{grid-auto-columns:10px; grid-template-rows:repeat(7,10px); gap:2.5px}
  .chlist{max-height:none}
  .chlist .ct{flex:1 1 auto}
  .li-tag{margin-left:0; flex:1 1 100%}
}

/* ================= site back-bar (project chrome) ================= */
.back-bar{
  display:flex; align-items:center; gap:12px;
  height:45px; padding:0 18px;
  background:var(--sheet); border-bottom:1px solid var(--rule);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; font-size:13px;
}
.back-bar a{
  flex:none; color:var(--teal); text-decoration:none; font-size:13px; font-weight:500;
  display:inline-flex; align-items:center; gap:6px; transition:color .2s;
}
.back-bar a:hover{color:var(--ink)}
.back-bar-sep{flex:none; color:var(--ink-3)}
.back-bar-current{
  flex:0 1 auto; min-width:0;
  color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:25ch;
}
@media (max-width:760px){
  .back-bar{padding:0 14px; gap:9px}
  .back-bar-current{max-width:none}
}
