/* INBDE Prep — design tokens, light + dark. System fonts only (works offline, no tracking). */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f0f2f5; --text: #141922; --muted: #5a6575; --faint: #8a94a3;
  --border: #e2e6ec; --border-strong: #cdd3dc;
  --accent: #0b7a85; --accent-ink: #ffffff; --accent-soft: #dff1f3; --accent-strong: #095f68;
  --good: #17784a; --good-soft: #e2f4ea; --bad: #be3a2d; --bad-soft: #fcebe8; --warn: #9a6408; --warn-soft: #fdf2d8;
  --shadow: 0 1px 2px rgba(20,25,34,.05), 0 4px 16px rgba(20,25,34,.06);
  --radius: 14px; --radius-sm: 10px; --rail: 232px; --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-read: ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c1117; --surface: #141b24; --surface-2: #1b2430; --text: #e7ebf1; --muted: #9aa5b4; --faint: #6c7788;
  --border: #243040; --border-strong: #344256;
  --accent: #3dbfcb; --accent-ink: #04242a; --accent-soft: #11323a; --accent-strong: #7ad8e1;
  --good: #4cc38a; --good-soft: #10301f; --bad: #ff8a7a; --bad-soft: #3a1b17; --warn: #e7b04a; --warn-soft: #33270d;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1117; --surface: #141b24; --surface-2: #1b2430; --text: #e7ebf1; --muted: #9aa5b4; --faint: #6c7788;
    --border: #243040; --border-strong: #344256; --accent: #3dbfcb; --accent-ink: #04242a; --accent-soft: #11323a; --accent-strong: #7ad8e1;
    --good: #4cc38a; --good-soft: #10301f; --bad: #ff8a7a; --bad-soft: #3a1b17; --warn: #e7b04a; --warn-soft: #33270d;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; } h2 { font-size: 1.15rem; font-weight: 650; } h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75em; }
a { color: var(--accent); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.ic { display: inline-flex; vertical-align: middle; } .ic svg { display: block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .85rem; } .center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--rail) 1fr; }
.rail { position: sticky; top: 0; height: 100vh; padding: 18px 12px; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 750; letter-spacing: -.02em; font-size: 1.1rem; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-ink); display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 560; border: 0; background: none; text-align: left; width: 100%; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); }
.nav-item .badge { margin-left: auto; }
.rail .spacer { flex: 1; }
main { min-width: 0; padding: 28px clamp(16px, 4vw, 40px) 64px; max-width: 1180px; width: 100%; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; padding-bottom: 72px; }
  .rail { position: fixed; z-index: 30; inset: auto 0 0 0; height: auto; flex-direction: row; justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--border); gap: 0; }
  .brand, .rail .spacer, .rail .nav-hide-m { display: none; }
  .nav-item { flex-direction: column; gap: 2px; font-size: .7rem; padding: 6px 4px; justify-content: center; text-align: center; flex: 1; }
  .nav-item .badge { position: absolute; margin: -4px 0 0 18px; }
  main { padding-top: 18px; }
}

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card h2 { margin-bottom: 10px; }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 16px; } .grid.c2 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 820px) { .grid.c2, .grid.c3 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .row.between { justify-content: space-between; } .stack { display: flex; flex-direction: column; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; text-decoration: none; color: var(--text); min-height: 42px; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); } .btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.big { padding: 13px 22px; font-size: 1.02rem; min-height: 48px; } .btn.sm { padding: 6px 12px; min-height: 34px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); } .icon-btn.on { color: var(--warn); background: var(--warn-soft); }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; text-align: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: .8rem; color: var(--muted); font-weight: 560; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h, 200) 55% 50%); }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; } .chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 6px; } .field > label, .label { font-weight: 650; font-size: .88rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
input[type="text"], input[type="number"], input[type="search"], select, textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); }
textarea { min-height: 90px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; } .check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; } .bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.bar.good > i { background: var(--good); } .bar.bad > i { background: var(--bad); } .bar.warn > i { background: var(--warn); }
.stat { display: flex; flex-direction: column; gap: 2px; } .stat b { font-size: 1.9rem; letter-spacing: -.02em; line-height: 1.1; } .stat span { color: var(--muted); font-size: .88rem; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---------- toasts / modal ---------- */
.toasts { position: fixed; z-index: 100; bottom: 84px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 560; box-shadow: var(--shadow); transition: opacity .25s; max-width: 90vw; }
.toast.bad { background: var(--bad); color: #fff; } .toast.warn { background: var(--warn); color: #fff; } .toast.out { opacity: 0; }
.backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(8,12,18,.55); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; width: min(480px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 20px; } .modal-body { padding: 4px 20px 16px; overflow: auto; } .modal-actions { padding: 12px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; background: #fff; } .lightbox .icon-btn { position: fixed; top: 14px; right: 14px; }
.icon-btn.light { color: #fff; background: rgba(0,0,0,.4); }

/* ---------- home / dashboard ---------- */
.hero-card { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; }
.hero-card .big-num { font-size: 2.6rem; font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.disc-row { display: grid; grid-template-columns: minmax(120px, 230px) 1fr 52px 44px; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 10px; width: 100%; border: 0; background: none; text-align: left; }
.disc-row:hover { background: var(--surface-2); }
.disc-row .name { display: flex; align-items: center; gap: 8px; font-weight: 580; min-width: 0; } .disc-row .name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disc-row .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: hsl(var(--h) 55% 50%); }
.disc-row .val { text-align: right; font-weight: 650; } .disc-row .cov { text-align: right; color: var(--faint); font-size: .82rem; }
@media (max-width: 560px) { .disc-row { grid-template-columns: 1fr 70px 44px; } .disc-row .bar { grid-column: 1 / -1; order: 5; } }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); grid-auto-columns: 14px; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heat i { border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); } .heat i.l1 { background: color-mix(in srgb, var(--accent) 25%, var(--surface)); } .heat i.l2 { background: color-mix(in srgb, var(--accent) 50%, var(--surface)); } .heat i.l3 { background: color-mix(in srgb, var(--accent) 75%, var(--surface)); } .heat i.l4 { background: var(--accent); } .heat i.today { outline: 2px solid var(--text); outline-offset: 1px; } .heat i.pad { visibility: hidden; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.quick button { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.quick button:hover { border-color: var(--accent); background: var(--accent-soft); } .quick .ic { color: var(--accent); } .quick b { display: block; } .quick span.sub { color: var(--muted); font-size: .84rem; }

/* ---------- practice builder ---------- */
.builder { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; } @media (max-width: 980px) { .builder { grid-template-columns: 1fr; } }
.summary-card { position: sticky; top: 20px; } @media (max-width: 980px) { .summary-card { position: static; } .builder { padding-bottom: 80px; } }
.disc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.disc-chip { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 580; text-align: left; }
.disc-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: hsl(var(--h) 55% 50%); flex: none; } .disc-chip .n { margin-left: auto; color: var(--faint); font-size: .8rem; font-weight: 500; }
.disc-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.big-count { font-size: 2.4rem; font-weight: 750; letter-spacing: -.03em; line-height: 1; }

/* ---------- session (exam) ---------- */
.exam { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.exam-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px clamp(10px, 2vw, 22px); background: var(--surface); border-bottom: 1px solid var(--border); }
.exam-top .title { flex: 1; min-width: 0; } .exam-top .progress { margin-top: 4px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); display: inline-flex; gap: 6px; align-items: center; } .timer.low { background: var(--bad-soft); color: var(--bad); }
.exam-body { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 22px clamp(12px, 3vw, 28px) 110px; display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
.exam-body.has-case { grid-template-columns: minmax(300px, 5fr) minmax(0, 6fr); }
@media (max-width: 920px) { .exam-body.has-case { grid-template-columns: 1fr; } }
.case-box { position: sticky; top: 74px; max-height: calc(100vh - 160px); overflow: auto; }
@media (max-width: 920px) { .case-box { position: static; max-height: none; } }
.case-box .fieldrow { padding: 8px 0; border-top: 1px solid var(--border); } .case-box .fieldrow:first-of-type { border-top: 0; }
.case-box .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-strong); font-weight: 750; } .case-box .v { font-size: .98rem; }
.qcard { padding: 22px clamp(16px, 3vw, 28px); }
.qmeta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.stem { font-family: var(--font-read); font-size: 1.2rem; line-height: 1.6; margin-bottom: 18px; max-width: 70ch; } .context { color: var(--muted); font-style: italic; margin-bottom: 12px; }
.qimg { display: block; max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--border); background: #fff; cursor: zoom-in; margin: 0 0 16px; }
.imgph { display: flex; gap: 10px; align-items: center; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--muted); margin-bottom: 16px; background: var(--surface-2); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: start; }
.opt { color: var(--text); display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); width: 100%; line-height: 1.45; }
.opt:hover:not([disabled]) { border-color: var(--accent); background: var(--accent-soft); }
.opt .let { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--surface-2); border: 1px solid var(--border-strong); }
.opt .txt { flex: 1; padding-top: 2px; } .opt .mark { flex: none; margin-top: 2px; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); } .opt.sel .let { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.opt.struck .txt { text-decoration: line-through; opacity: .5; }
.opt.correct { border-color: var(--good); background: var(--good-soft); } .opt.correct .let { background: var(--good); color: #fff; border-color: var(--good); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); } .opt.wrong .let { background: var(--bad); color: #fff; border-color: var(--bad); }
.opt.correct .mark { color: var(--good); } .opt.wrong .mark { color: var(--bad); }
.opt[disabled] { cursor: default; }
.strike-btn { margin-top: 8px; } .strike-btn.on { color: var(--accent); background: var(--accent-soft); }
.opt-exp { margin: 6px 4px 6px 42px; padding: 8px 12px; border-left: 3px solid var(--border-strong); color: var(--muted); font-size: .95rem; } .opt-exp.correct { border-color: var(--good); color: var(--text); }
.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; font-weight: 650; margin: 16px 0 8px; } .banner.good { background: var(--good-soft); color: var(--good); } .banner.bad { background: var(--bad-soft); color: var(--bad); } .banner.warn { background: var(--warn-soft); color: var(--warn); font-weight: 560; }
.explain { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); } .explain h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.explain.note { background: var(--warn-soft); border-color: transparent; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.exam-bar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 10px clamp(10px, 2vw, 22px) calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.navgrid button { position: relative; height: 44px; border-radius: 10px; border: 1.5px solid var(--border-strong); background: var(--surface); font-weight: 650; }
.navgrid button.ans { background: var(--accent-soft); border-color: var(--accent); } .navgrid button.cur { outline: 3px solid var(--text); outline-offset: 1px; } .navgrid button.ok { background: var(--good-soft); border-color: var(--good); color: var(--good); } .navgrid button.no { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); } .navgrid button.om { border-style: dashed; }
.navgrid button.fl::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.kbd { display: inline-block; padding: 1px 7px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; font: 600 .8rem var(--font); background: var(--surface-2); }

/* ---------- results ---------- */
.ring { position: relative; width: 160px; height: 160px; flex: none; } .ring svg { transform: rotate(-90deg); } .ring .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; } .ring .c b { font-size: 2.2rem; letter-spacing: -.03em; line-height: 1; }
.trend svg { width: 100%; height: 180px; overflow: visible; } .trend text { fill: var(--faint); font-size: 10px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--border); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; } .list-row:first-child { border-top: 0; } .list-row:hover { background: var(--surface-2); }
table.tbl { width: 100%; border-collapse: collapse; } .tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--border); } .tbl td { padding: 10px 8px; border-bottom: 1px solid var(--border); } .tbl td.r, .tbl th.r { text-align: right; }
.tbl-wrap { overflow-x: auto; }
.pad-bottom-nav { height: 0; }

.opt[disabled] { color: var(--text); opacity: 1; }
.btn.sm .ic, .btn .ic { flex: none; }

@media (max-width: 820px) {
  .exam-top { gap: 4px; padding: 6px 8px; } .exam-top .lbl, .exam-top .mode-lbl, .exam-top .nav-hide-m { display: none; }
  .exam-top .btn.ghost { padding: 6px 8px; } .timer { padding: 5px 9px; font-size: .92rem; } .icon-btn { width: 38px; height: 38px; }
  .stem { font-size: 1.1rem; } .qcard { padding: 16px; }
}

/* ---------- quiz builder ---------- */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } @media (max-width: 700px) { .type-grid { grid-template-columns: 1fr; } }
.type-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); }
.type-card span { color: var(--muted); font-size: .88rem; } .type-card:hover { border-color: var(--accent); }
.type-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); } .type-card[aria-pressed="true"] b { color: var(--accent-strong); }
.sumlist { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; } .sumlist li { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.linklike { text-align: left; background: none; border: 0; padding: 0; flex: 1; min-width: 0; } .linklike:hover b, .linklike:hover div:first-child { color: var(--accent-strong); }
.mobile-cta { display: none; }
@media (max-width: 980px) { .mobile-cta { display: flex; position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--border); } }
@media (max-width: 820px) { .mobile-cta { bottom: calc(60px + env(safe-area-inset-bottom)); } }

.col { min-width: 0; display: flex; flex-direction: column; } .col > main { flex: 1; }
.site-foot { max-width: 1180px; width: 100%; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 40px; color: var(--faint); font-size: .8rem; line-height: 1.55; border-top: 1px solid var(--border); }
.site-foot p { margin: 12px 0 0; } .site-foot a { color: var(--muted); }
a.brand { text-decoration: none; color: inherit; }
@media (max-width: 820px) { .site-foot { padding-bottom: 24px; } }
