:root{
  --bg:#F4F6F3;
  --surface:#FFFFFF;
  --ink:#1B231F;
  --ink-muted:#5B655F;
  --border:#D8DED9;
  --border-strong:#B8C2BB;
  --practice:#2F5D53;
  --practice-soft:#DCEAE5;
  --research:#4A4265;
  --research-soft:#E5E0EC;
  --caution:#9C4E1F;
  --caution-soft:#F3E1CC;
  --track-color: var(--practice);
  --track-soft: var(--practice-soft);
  --shadow: 0 1px 2px rgba(27,35,31,0.06);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#14181A;
    --surface:#1B211F;
    --ink:#E7ECE8;
    --ink-muted:#9AA69F;
    --border:#2C3532;
    --border-strong:#3B4642;
    --practice:#6FBFA8;
    --practice-soft:#1E322C;
    --research:#B3A4D9;
    --research-soft:#2A2436;
    --caution:#E0935C;
    --caution-soft:#3A2A1C;
    --shadow: 0 1px 2px rgba(0,0,0,0.3);
  }
}
:root[data-theme="dark"]{
  --bg:#14181A;
  --surface:#1B211F;
  --ink:#E7ECE8;
  --ink-muted:#9AA69F;
  --border:#2C3532;
  --border-strong:#3B4642;
  --practice:#6FBFA8;
  --practice-soft:#1E322C;
  --research:#B3A4D9;
  --research-soft:#2A2436;
  --caution:#E0935C;
  --caution-soft:#3A2A1C;
  --shadow: 0 1px 2px rgba(0,0,0,0.3);
}

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
[hidden]{ display:none !important; }
body{
  background:var(--bg);
  color:var(--ink);
  font-family:'Libre Franklin', system-ui, sans-serif;
  margin:0;
  padding:32px 16px 64px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:32px;
  min-height:100vh;
}
h1,h2,h3{ text-wrap:balance; font-family:'Source Serif 4', Georgia, serif; margin:0; }
.mono{ font-family:'IBM Plex Mono', ui-monospace, monospace; }

.page-head{ width:100%; max-width:640px; }

.utility-bar{ display:flex; gap:16px; margin-bottom:14px; }
.utility-link{
  font-family:'IBM Plex Mono', monospace; font-size:10px; letter-spacing:0.07em; text-transform:uppercase;
  color:var(--ink-muted); text-decoration:none;
}
.utility-link:hover{ color:var(--ink); text-decoration:underline; text-underline-offset:3px; }

.wordmark{ font-size:20px; font-weight:600; font-family:'Source Serif 4', Georgia, serif; }
.wordmark span{ color:var(--practice); }
.tagline{ margin-top:4px; color:var(--ink-muted); font-size:13px; }
.intro-blurb{ margin-top:10px; color:var(--ink-muted); font-size:13px; line-height:1.55; max-width:56ch; }
.text-link{
  display:block; margin-top:10px; padding:0; background:none; border:none;
  font-family:'IBM Plex Mono', monospace; font-size:11px; letter-spacing:0.06em; text-transform:uppercase;
  color:var(--ink-muted); text-decoration:underline; text-underline-offset:3px; cursor:pointer;
}
.text-link:hover{ color:var(--ink); }

.browse-section{ display:flex; flex-direction:column; }
.browse-heading{
  font-family:'IBM Plex Mono', monospace; font-size:11px; letter-spacing:0.09em; text-transform:uppercase;
  color:var(--ink-muted); padding:20px 20px 10px; border-top:2px solid var(--border-strong);
}
.browse-section:first-child .browse-heading{ border-top:none; }
.browse-item{ display:flex; flex-direction:column; gap:4px; padding:14px 20px; border-bottom:1px solid var(--border); }
.browse-item:last-child{ border-bottom:none; }
.browse-name{ font-family:'Source Serif 4', Georgia, serif; font-weight:600; font-size:16px; }
.browse-blurb{ font-size:13px; color:var(--ink-muted); }

.sketch-block{ width:100%; max-width:640px; --track-color: var(--practice); --track-soft: var(--practice-soft); }
.sketch-block[data-track="research"]{ --track-color: var(--research); --track-soft: var(--research-soft); }

.card{
  background:var(--surface);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.progress{ display:flex; gap:4px; padding:14px 20px 0; }
.progress i{ display:block; height:3px; flex:1; min-width:6px; background:var(--border-strong); }
.progress i.done{ background:var(--ink-muted); }

.item-head{ display:flex; justify-content:space-between; align-items:baseline; padding:14px 20px 0; gap:12px; flex-wrap:wrap; }
.item-count{ font-family:'IBM Plex Mono', monospace; font-size:11px; letter-spacing:0.09em; text-transform:uppercase; color:var(--ink-muted); }
.item-fork{ font-family:'IBM Plex Mono', monospace; font-size:11px; letter-spacing:0.09em; text-transform:uppercase; color:var(--ink-muted); }

.prompt{ padding:16px 20px 4px; font-size:22px; line-height:1.3; font-weight:600; }
.prompt-sub{ padding:0 20px 16px; color:var(--ink-muted); font-size:13px; max-width:52ch; }

.options{ display:flex; flex-direction:column; border-top:1px solid var(--border); }
.option{ display:flex; align-items:flex-start; gap:14px; padding:16px 20px; border-bottom:1px solid var(--border); cursor:pointer; }
.option:last-child{ border-bottom:none; }
.option:hover{ background:var(--track-soft); }
.option input{ appearance:none; width:18px; height:18px; margin-top:2px; border:1.5px solid var(--border-strong); border-radius:50%; flex-shrink:0; position:relative; }
.option input:checked{ border-color:var(--track-color); }
.option input:checked::after{ content:""; position:absolute; inset:3px; border-radius:50%; background:var(--track-color); }
.option input:focus-visible{ outline:2px solid var(--track-color); outline-offset:2px; }
.option-text{ display:flex; flex-direction:column; gap:2px; }
.option-text .label{ font-size:15px; font-weight:500; }
.option-text .desc{ font-size:13px; color:var(--ink-muted); }

.option-divider{ border-top:1px dashed var(--border-strong); }
.option.idk{ border-left:2px solid var(--track-color); }

.idk-advice{ margin:0; padding:14px 20px; border-top:1px solid var(--border); display:flex; flex-direction:column; gap:4px; background:var(--track-soft); }
.idk-advice.standalone{ border-top:none; margin:0 20px 4px; border:1px solid var(--border); }
.idk-advice .k{ font-family:'IBM Plex Mono', monospace; font-size:11px; letter-spacing:0.07em; text-transform:uppercase; color:var(--ink-muted); }
.idk-advice p{ margin:0; font-size:13px; line-height:1.55; }

.idk-toggle{
  display:inline-flex; align-items:center; gap:6px; margin:0 20px 14px;
  padding:6px 10px; border:1px solid var(--border-strong); background:none;
  font-family:'IBM Plex Mono', monospace; font-size:11px; letter-spacing:0.05em; text-transform:uppercase;
  color:var(--ink-muted); cursor:pointer; align-self:flex-start;
}
.idk-toggle:hover{ color:var(--ink); border-color:var(--ink-muted); }
.idk-toggle .plus{ font-size:13px; line-height:1; }

.rate-instruction{ padding:0 20px 12px; font-size:12px; color:var(--ink-muted); }
.rate-battery{ display:flex; flex-direction:column; border-top:1px solid var(--border); }
.rate-item{ display:flex; flex-direction:column; gap:10px; padding:16px 20px; border-bottom:1px solid var(--border); }
.rate-item:last-child{ border-bottom:none; }
.rate-scale{ display:flex; gap:12px; }

.scale-row{ display:flex; justify-content:space-between; gap:8px; padding:8px 20px 4px; border-top:1px solid var(--border); }
.scale-opt{ flex:1; display:flex; justify-content:center; padding:14px 0; cursor:pointer; }
.scale-opt input{ appearance:none; position:absolute; opacity:0; width:44px; height:44px; }
.scale-num{
  width:40px; height:40px; min-width:40px; border:1.5px solid var(--border-strong);
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-family:'IBM Plex Mono', monospace; font-size:14px; color:var(--ink-muted);
}
.scale-opt input:checked + .scale-num{ border-color:var(--track-color); color:var(--surface); background:var(--track-color); }
.scale-opt input:focus-visible + .scale-num{ outline:2px solid var(--track-color); outline-offset:2px; }
.scale-caption{ display:flex; justify-content:space-between; padding:0 20px 16px; font-size:11px; color:var(--ink-muted); }

.card-foot{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 20px; border-top:1px solid var(--border); flex-wrap:wrap; }
.btn{
  font-family:'IBM Plex Mono', monospace; font-size:12px; letter-spacing:0.06em; text-transform:uppercase;
  padding:12px 18px; border:1px solid var(--ink); background:var(--ink); color:var(--bg); cursor:pointer;
  min-height:44px;
}
.btn:disabled{ opacity:0.4; cursor:not-allowed; }
.btn.ghost{ background:transparent; color:var(--ink-muted); border-color:var(--border); }

.result-tag{
  display:inline-block; align-self:flex-start;
  font-family:'IBM Plex Mono', monospace; font-size:11px; letter-spacing:0.09em; text-transform:uppercase;
  padding:4px 8px; border:1px solid var(--track-color); color:var(--track-color);
}
.result-head{ padding:20px 20px 0; display:flex; flex-direction:column; gap:8px; border-left:3px solid var(--track-color); }
.verdict{ font-size:26px; font-weight:700; line-height:1.25; }
.verdict-sub{ color:var(--ink-muted); font-size:14px; }
.licensure-line{ font-size:13px; color:var(--ink-muted); }
.licensure-line .k{ font-family:'IBM Plex Mono', monospace; font-size:11px; letter-spacing:0.07em; text-transform:uppercase; margin-right:6px; }

.result-tag.neutral{ border-color:var(--border-strong); color:var(--ink-muted); }
.degree-block{ margin:28px 20px 0; padding:20px 0 0; border-top:2px solid var(--border-strong); }
.degree-stop{ display:flex; flex-direction:column; gap:8px; }
.degree-verdict{ font-size:21px; }

.callout{ margin:16px 20px 0; padding:14px; border:1px solid var(--border-strong); display:flex; flex-direction:column; gap:6px; }
.callout[data-tone="caution"]{ background:var(--caution-soft); border-color:var(--caution); }
.callout .k{ font-family:'IBM Plex Mono', monospace; font-size:11px; letter-spacing:0.07em; text-transform:uppercase; color:var(--ink-muted); }
.callout[data-tone="caution"] .k{ color:var(--caution); }
.callout p{ margin:0; font-size:13px; line-height:1.55; }

.cite{ margin:18px 20px 20px; font-size:11px; color:var(--ink-muted); line-height:1.6; }

@media (max-width: 480px){
  body{ padding:20px 0 48px; gap:24px; }
  .page-head, .sketch-block{ max-width:100%; padding:0 12px; }
  .card{ border-left:none; border-right:none; }
  .prompt{ font-size:19px; }
  .verdict{ font-size:22px; }
  .readout-row{ grid-template-columns: 1fr; gap:2px; }
  .readout-row .k{ padding-top:0; }
  .scale-num{ width:34px; height:34px; min-width:34px; font-size:13px; }
  .card-foot{ justify-content:stretch; }
  .card-foot .btn{ flex:1; }
}

@media (prefers-reduced-motion: no-preference){
  .option, .scale-num{ transition: background 120ms ease, border-color 120ms ease; }
}
