/* =====================================================================
   Pathox — design layer (v5). Three selectable designs share one layout:
     marker  — white page + highlighter yellow; Lora headings (textbook)
     lamp    — dark room + amber microscope lamp; Inter Display headings
     clinic  — bright apricot + plum ink; heavy Inter Display, round shapes
   The memorable element in all three: the microscope eyepiece and the
   procedurally drawn H&E slides that replace every illustration.
   ===================================================================== */

/* ---------- design tokens ---------- */
:root[data-design="marker"][data-theme="light"] {
  --night: #1c1f2e;
  --ink: #1c1f2e; --text: #1c1f2e; --body: #3e4254; --muted: #6d7183;
  --blue: #2c3080; --blue-h: #1f2363; --blue-soft: #fff4c2; --blue-line: #f3d86b;
  --orange: #f29b38; --orange-h: #e08a25; --orange-soft: #fff0dd; --orange-ink: #9b5a10;
  --green: #217a5b; --green-soft: #e5f3ec; --red: #c0434e; --red-soft: #fcefef; --gold: #8d6716; --gold-soft: #fbf1d6;
  --paper: #ffffff; --bg: #f5f5f3; --bg-2: #eeeeea; --line: #e4e3de; --line-2: #d7d6cf; --field: #ffffff;
  --hl-y: #ffe36b;
  --btn-bg: #ffd23f; --btn-ink: #1c1f2e; --btn-hover: #ffc61a;
  --side-bg: #ffffff; --side-ink: #1c1f2e; --side-muted: #6d7183; --side-line: #e9e8e3; --side-active: #ffe680; --side-active-ink: #1c1f2e; --side-mark: #1c1f2e; --side-mark-ink: #ffd23f;
  --block-bg: #1c1f2e; --block-2: #272b3e; --block-ink: #ffffff; --block-muted: #b9bccb; --block-line: rgba(255, 255, 255, .14); --block-accent: #ffd23f;
  --font-head: "Lora", Georgia, serif; --head-weight: 600; --head-track: -.012em;
  --radius: 16px; --r-btn: 11px; --r-chip: 999px;
  --shadow: 0 1px 2px rgba(28, 31, 46, .04), 0 12px 32px rgba(28, 31, 46, .07);
}
:root[data-design="marker"][data-theme="dark"] {
  --night: #0c0e14;
  --ink: #f1efe8; --text: #f1efe8; --body: #cfcdc5; --muted: #9d9c95;
  --blue: #ffd23f; --blue-h: #ffdf6e; --blue-soft: #2d2814; --blue-line: #5e5122;
  --orange: #f6a54c; --orange-h: #f8b468; --orange-soft: #33230f; --orange-ink: #ffc58a;
  --green: #5ec7a0; --green-soft: #15302a; --red: #f08a8a; --red-soft: #3a1c1f; --gold: #f2cd77; --gold-soft: #33290f;
  --paper: #171920; --bg: #101217; --bg-2: #1d2029; --line: #2a2d38; --line-2: #383c49; --field: #14161c;
  --btn-bg: #ffd23f; --btn-ink: #1c1f2e; --btn-hover: #ffdf6e;
  --side-bg: #13151b; --side-ink: #f1efe8; --side-muted: #9d9c95; --side-line: #262934; --side-active: #2d2814; --side-active-ink: #ffd23f; --side-mark: #ffd23f; --side-mark-ink: #1c1f2e;
  --block-bg: #1d2029; --block-2: #262a35; --block-ink: #fff; --block-muted: #b5b4ad; --block-line: rgba(255, 255, 255, .1); --block-accent: #ffd23f;
  --font-head: "Lora", Georgia, serif; --head-weight: 600; --head-track: -.012em;
  --radius: 16px; --r-btn: 11px; --r-chip: 999px; --shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
:root[data-design="lamp"] {
  --night: #0b0d12;
  --ink: #f3efe7; --text: #f3efe7; --body: #d0cbc1; --muted: #9b968c;
  --blue: #ffb547; --blue-h: #ffc56e; --blue-soft: #2c2314; --blue-line: #5c4520;
  --orange: #ff8a4c; --orange-h: #ff9d68; --orange-soft: #2f1d14; --orange-ink: #ffb08a;
  --green: #62c9a1; --green-soft: #13302a; --red: #ff7d7d; --red-soft: #3a1b1d; --gold: #f2c66d; --gold-soft: #33290f;
  --paper: #161921; --bg: #0e1016; --bg-2: #1c1f28; --line: #272b36; --line-2: #343946; --field: #12141a;
  --hl-y: #6b5617; --hl-g: #1d4a33; --hl-b: #1f3a66; --hl-p: #5a2440;
  --btn-bg: #ffb547; --btn-ink: #1a1307; --btn-hover: #ffc56e;
  --side-bg: #0b0d12; --side-ink: #ece7dd; --side-muted: #8f8a80; --side-line: #1d2029; --side-active: #241d12; --side-active-ink: #ffb547; --side-mark: #ffb547; --side-mark-ink: #1a1307;
  --block-bg: #161921; --block-2: #1f232d; --block-ink: #fff; --block-muted: #b3ada2; --block-line: rgba(255, 181, 71, .18); --block-accent: #ffb547;
  --font-head: "Inter Display", "Inter", system-ui, sans-serif; --head-weight: 650; --head-track: -.025em;
  --radius: 14px; --r-btn: 10px; --r-chip: 999px;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 18px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
:root[data-design="clinic"][data-theme="light"] {
  --night: #2b1b2f;
  --ink: #2b1b2f; --text: #2b1b2f; --body: #4b3c4f; --muted: #85778a;
  --blue: #e2600f; --blue-h: #c8520a; --blue-soft: #ffe9d8; --blue-line: #ffc9a3;
  --orange: #ffb020; --orange-h: #f3a10c; --orange-soft: #fff3d1; --orange-ink: #8f5d00;
  --green: #12907b; --green-soft: #def4ef; --red: #dc4356; --red-soft: #fdecee; --gold: #9a6a00; --gold-soft: #fff1cc;
  --paper: #ffffff; --bg: #fff7f0; --bg-2: #ffeee2; --line: #f5e2d4; --line-2: #ecd2bf; --field: #ffffff;
  --btn-bg: #ff7a2f; --btn-ink: #ffffff; --btn-hover: #f26a1c;
  --side-bg: #ffffff; --side-ink: #2b1b2f; --side-muted: #85778a; --side-line: #f6e5d8; --side-active: #ffe4d1; --side-active-ink: #c8520a; --side-mark: #ff7a2f; --side-mark-ink: #fff;
  --block-bg: #2b1b2f; --block-2: #3b2840; --block-ink: #fff; --block-muted: #d6c5d8; --block-line: rgba(255, 255, 255, .13); --block-accent: #ffb020;
  --font-head: "Inter Display", "Inter", system-ui, sans-serif; --head-weight: 800; --head-track: -.035em;
  --radius: 22px; --r-btn: 999px; --r-chip: 999px;
  --shadow: 0 2px 4px rgba(120, 60, 20, .04), 0 16px 36px rgba(120, 60, 20, .08);
}
:root[data-design="clinic"][data-theme="dark"] {
  --night: #140c16;
  --ink: #f6ede8; --text: #f6ede8; --body: #d7c9cc; --muted: #a3949a;
  --blue: #ff9a5c; --blue-h: #ffad78; --blue-soft: #3a2116; --blue-line: #6a3a20;
  --orange: #ffc04d; --orange-h: #ffcd70; --orange-soft: #33270f; --orange-ink: #ffd88e;
  --green: #4fd1b5; --green-soft: #11302b; --red: #ff8090; --red-soft: #3c1a21; --gold: #f5c96a; --gold-soft: #33290f;
  --paper: #1f1622; --bg: #160f18; --bg-2: #281d2c; --line: #352838; --line-2: #45354a; --field: #1a121d;
  --btn-bg: #ff7a2f; --btn-ink: #fff; --btn-hover: #ff8d4c;
  --side-bg: #1a121d; --side-ink: #f6ede8; --side-muted: #a3949a; --side-line: #2c2130; --side-active: #3a2116; --side-active-ink: #ff9a5c; --side-mark: #ff7a2f; --side-mark-ink: #fff;
  --block-bg: #281d2c; --block-2: #33263a; --block-ink: #fff; --block-muted: #cbbccd; --block-line: rgba(255, 255, 255, .1); --block-accent: #ffb020;
  --font-head: "Inter Display", "Inter", system-ui, sans-serif; --head-weight: 800; --head-track: -.035em;
  --radius: 22px; --r-btn: 999px; --r-chip: 999px; --shadow: 0 16px 36px rgba(0, 0, 0, .4);
}

/* ---------- type ---------- */
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-optical-sizing: auto; background: var(--bg); }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); }
.brand-name { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 19px; letter-spacing: var(--head-track); }
.brand-name small { font-family: "Inter", sans-serif; font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 11.5px; }
.eyebrow { color: var(--muted); font-weight: 600; }
.eyebrow::before { background: var(--block-accent, var(--orange)); width: 8px; height: 8px; }
:root[data-design="clinic"] .eyebrow { color: var(--blue); }
.page-heading h1 { font-size: clamp(30px, 3vw, 38px); }
:root[data-design="clinic"] .page-heading h1 { font-size: clamp(32px, 3.2vw, 42px); }

/* ---------- buttons, chips, focus ---------- */
.btn { background: var(--btn-bg); color: var(--btn-ink); border-radius: var(--r-btn); box-shadow: 0 1px 0 rgba(0, 0, 0, .04); }
.btn:hover { background: var(--btn-hover); }
:root[data-theme="dark"] .btn:not(.secondary):not(.ghost):not(.orange):not(.danger) { background: var(--btn-bg); color: var(--btn-ink); }
.btn.secondary { border-radius: var(--r-btn); }
.btn.orange { background: var(--orange); color: #1d1406; }
:root[data-design="clinic"] .btn.orange { color: #3b2700; }
.btn.lg { min-height: 52px; padding: 14px 24px; font-size: 15.5px; }
.tag-button, .badge { border-radius: var(--r-chip); }
.tag-button.active { background: var(--blue-soft); border-color: var(--blue-line); color: var(--ink); }
:root[data-design="clinic"] .tag-button.active, :root[data-design="lamp"] .tag-button.active { color: var(--blue); }
.text-link { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.lang-switch button.on { background: var(--blue-soft); color: var(--ink); }
.progress span { background: var(--blue); }
:root[data-design="marker"][data-theme="light"] .progress span { background: #e0a400; }
.badge.standard, .badge.trial, .badge.info { background: var(--blue-soft); color: var(--blue); }
:root[data-design="marker"][data-theme="light"] .badge.standard, :root[data-design="marker"][data-theme="light"] .badge.trial, :root[data-design="marker"][data-theme="light"] .badge.info { color: #6b5200; }

/* ---------- surfaces ---------- */
.panel, .stat-card, .course-card, .table-wrap, .price-card, .spec-card { border-radius: var(--radius); }
.panel, .stat-card { box-shadow: none; }
.stat-icon { border-radius: 12px; }
:root[data-design="clinic"] .stat-card { border: 0; box-shadow: var(--shadow); }
:root[data-design="clinic"] .panel { border-color: transparent; box-shadow: var(--shadow); }
:root[data-design="lamp"] .panel, :root[data-design="lamp"] .stat-card, :root[data-design="lamp"] .course-card { background: linear-gradient(180deg, #181b24, #14171e); }

/* ---------- header ---------- */
.site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.public-nav a { color: var(--body); font-weight: 500; }
.public-nav a:hover, .public-nav a.on { color: var(--ink); text-decoration: underline; text-decoration-color: var(--block-accent); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.brand-mark { background: var(--side-mark); color: var(--side-mark-ink); border-radius: 12px; }
.announcement { background: var(--block-bg); color: var(--block-ink); }
.demo-bar { background: #0c0d12; }
.demo-bar select { background: #1d2130; border-color: #3a3f55; }

/* ---------- hero: the eyepiece ---------- */
.hero { padding: 64px 0 72px; }
.hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.hero h1 { font-size: clamp(46px, 5.4vw, 74px); line-height: 1.02; margin: 18px 0 22px; }
:root[data-design="clinic"] .hero h1 { font-size: clamp(48px, 6vw, 84px); line-height: .98; }
.hero-copy { color: var(--body); font-size: 18px; line-height: 1.7; max-width: 52ch; }
.scope { position: relative; margin: 0; aspect-ratio: 1; max-width: 520px; justify-self: center; width: 100%; }
.scope-field { position: absolute; inset: 6%; border-radius: 50%; box-shadow: 0 0 0 14px var(--paper), 0 0 0 15px var(--line), 0 40px 80px rgba(40, 20, 60, .18); }
:root[data-design="lamp"] .scope-field { box-shadow: 0 0 0 14px #1a1d26, 0 0 0 15px #2d313d, 0 0 120px 10px rgba(255, 181, 71, .16); }
:root[data-design="marker"][data-theme="light"] .scope::before { content: ""; position: absolute; inset: -2% 4% 8% -4%; border-radius: 50%; background: radial-gradient(circle, #ffe680 0%, rgba(255, 230, 128, 0) 66%); z-index: -1; }
:root[data-design="clinic"] .scope::before { content: ""; position: absolute; inset: -4%; border-radius: 50%; background: conic-gradient(from 210deg, #ffd6b8, #ffb020 30%, #ff7a2f 55%, #ffd6b8 80%); filter: blur(2px); opacity: .55; z-index: -1; }
.scope-field svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.scope-scale { position: absolute; left: 22%; bottom: 17%; color: #fff; font-size: 11px; font-weight: 600; display: flex; flex-direction: column; gap: 3px; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.scope-scale i { display: block; width: 46px; height: 3px; background: #fff; border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.scope-tag { position: absolute; display: inline-flex; align-items: center; gap: 8px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: 7px 13px 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); }
.scope-tag i { width: 9px; height: 9px; border-radius: 50%; background: var(--block-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--block-accent) 30%, transparent); }
.scope-tag.left { flex-direction: row-reverse; padding: 7px 11px 7px 13px; }
.scope-cap { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); width: min(92%, 380px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center; box-shadow: var(--shadow); }
.scope-cap b { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 16.5px; letter-spacing: var(--head-track); }
.scope-cap span { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.scope-cap .text-link { grid-column: 2; grid-row: 1 / span 2; }
.connector { margin-top: 30px; }
.connector .icon { color: var(--blue); }

/* ---------- course cards with slide covers ---------- */
.course-card { border-color: var(--line); }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.course-art { height: auto; aspect-ratio: 16 / 9; background: #e9b8ca; }
.course-art.has-tissue::before, .course-art.has-tissue::after { display: none; }
.course-art > svg.tissue { position: absolute; inset: 0; width: 100%; height: 100%; }
.course-art .cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 30, .38), rgba(20, 10, 30, 0) 42%, rgba(20, 10, 30, 0) 70%, rgba(20, 10, 30, .18)); pointer-events: none; }
.course-art .art-number { z-index: 1; top: 12px; left: 12px; background: rgba(255, 255, 255, .92); color: #1c1f2e; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0; }
:root[data-design="lamp"] .course-art .art-number { background: rgba(14, 16, 22, .82); color: #ffb547; }
.course-art .art-done { top: 12px; right: 12px; }
.thumb-cell.course-art { aspect-ratio: auto; }
.course-card-body { padding: 20px 22px 18px; }
.course-card h3 { font-size: 20px; margin: 10px 0 8px; }
:root[data-design="clinic"] .course-card h3 { font-size: 21px; }
.course-card p { font-size: 13.5px; color: var(--muted); }
.course-row .course-art { aspect-ratio: auto; height: 64px; width: 88px; border-radius: 12px; }
.course-row .course-art .art-number { display: none; }

/* ---------- workspace ---------- */
.sidebar { background: var(--side-bg); color: var(--side-ink); border-right: 1px solid var(--side-line); }
.sidebar .brand-mark { background: var(--side-mark); color: var(--side-mark-ink); }
.sidebar .brand-name { color: var(--side-ink); }
.sidebar .brand-name small, .sidebar-label { color: var(--side-muted); }
.side-nav a { color: var(--side-muted); border-radius: 10px; font-weight: 500; }
.side-nav a:hover { background: color-mix(in srgb, var(--side-active) 50%, transparent); color: var(--side-ink); }
.side-nav a.active { background: var(--side-active); color: var(--side-active-ink); font-weight: 600; }
.side-nav a.active::before { display: none; }
:root[data-design="clinic"] .side-nav a { border-radius: 999px; }
.side-nav .nav-count { background: var(--btn-bg); color: var(--btn-ink); border-radius: 999px; }
.nav-separator { background: var(--side-line); }
.sidebar-note { border-color: var(--side-line); color: var(--side-muted); background: color-mix(in srgb, var(--side-active) 35%, transparent); }
.sidebar-note strong { color: var(--side-ink); }
.sidebar-note .progress { background: var(--side-line); }
.sidebar-note .progress span { background: var(--btn-bg); }
.workspace-topbar { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); }
:root[data-design="clinic"] .workspace-topbar, :root[data-design="marker"] .workspace-topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.avatar { background: var(--blue-soft); color: var(--blue); }
:root[data-design="marker"][data-theme="light"] .avatar { color: #6b5200; }

/* dark feature blocks (tool band, welcome, gold card, auth side, test top) */
.tool-band, .student-welcome, .price-card.goldc, .auth-side, .test-top, .toast, .hl-pop { background: var(--block-bg); color: var(--block-ink); }
.tool-band h2, .student-welcome h2, .auth-side h2 { color: var(--block-ink); }
.tool-band p, .student-welcome p, .auth-side p { color: var(--block-muted); }
.tool-band .eyebrow, .student-welcome .eyebrow { color: var(--block-muted); }
.tool-demo { background: var(--block-2); border-color: var(--block-line); }
.tool-options button { border-color: var(--block-line); color: var(--block-muted); border-radius: var(--r-chip); }
.tool-options button.active { background: var(--block-accent); color: #1c1407; border-color: var(--block-accent); }
.student-welcome { position: relative; overflow: hidden; }
.student-welcome .welcome-art { width: 168px; height: 168px; opacity: 1; flex: none; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.student-welcome .welcome-art svg { width: 100%; height: 100%; }
.student-welcome .btn.orange { background: var(--block-accent); color: #1c1407; }
:root[data-design="lamp"] .student-welcome { background: radial-gradient(120% 140% at 85% 50%, #3a2a12 0%, #161921 55%); border: 1px solid var(--block-line); }
:root[data-design="clinic"][data-theme="light"] .student-welcome { background: linear-gradient(120deg, #2b1b2f, #4a2a3e); }
.price-card.goldc h3 { color: var(--block-accent); }
.price-card.recommended { border: 2px solid var(--btn-bg); box-shadow: var(--shadow); }
.price-label { background: var(--btn-bg); color: var(--btn-ink); border-radius: 999px; }
.pricing-controls { border-radius: 999px; }
.pricing-controls button { border-radius: 999px; }
.test-top { background: var(--block-bg); }

/* tables, tabs */
.data-table th { background: var(--bg-2); color: var(--muted); }
.tabs a.active, .tabs button.active { color: var(--ink); border-color: var(--btn-bg); }
:root[data-design="clinic"] .tabs a.active, :root[data-design="lamp"] .tabs a.active { color: var(--blue); border-color: var(--blue); }

/* reader: textbook page */
.reader { font-family: "Lora", Georgia, serif; }
:root[data-design="marker"][data-theme="light"] .reader mark.c-y, :root[data-design="marker"][data-theme="light"] mark.hl.y { background: linear-gradient(transparent 12%, #ffe36b 12%, #ffe36b 88%, transparent 88%); }
.reader .key, .reader .callout { border-radius: 0 12px 12px 0; }
:root[data-design="marker"][data-theme="light"] .reader .key { background: #fff8d6; border-color: #e0a400; }
:root[data-design="clinic"][data-theme="light"] .reader .key { background: #fff1e6; border-color: #ff7a2f; }
:root[data-design="lamp"] .reader .key, :root[data-design="lamp"] .reader .callout { background: #1f232d; color: var(--ink); }

/* specimens */
.spec-img { background: #e9b8ca; }

/* footer */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); }
:root[data-design="lamp"] .site-footer { background: #0b0d12; }

/* ---------- design picker (profile + admin) ---------- */
.design-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.design-pick { border: 2px solid var(--line); border-radius: 14px; padding: 0; overflow: hidden; background: var(--paper); text-align: left; cursor: pointer; display: flex; flex-direction: column; color: var(--ink); }
.design-pick.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.design-pick .sw { height: 64px; display: grid; grid-template-columns: 1fr 1fr 1fr; }
.design-pick .sw i { display: block; }
.design-pick b { padding: 10px 12px 2px; font-size: 14px; }
.design-pick small { padding: 0 12px 12px; font-size: 12px; color: var(--muted); line-height: 1.45; }
@media (max-width: 620px) { .design-picks { grid-template-columns: minmax(0, 1fr); } }

/* ---------- daily quote ---------- */
.quote-card { position: relative; border-radius: var(--radius); padding: 20px 22px 18px 58px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 22px; }
.quote-card::before { content: "“"; position: absolute; left: 18px; top: 4px; font-family: "Lora", Georgia, serif; font-size: 64px; line-height: 1; color: var(--block-accent); }
:root[data-design="marker"][data-theme="light"] .quote-card::before { color: #e0a400; }
.quote-card .q { font-family: "Lora", Georgia, serif; font-size: 17px; line-height: 1.55; color: var(--ink); }
.quote-card .who { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.quote-card .who b { color: var(--body); font-weight: 600; }
.quote-strip { padding: 34px 0 0; }

/* ---------- section index (course search) ---------- */
.course-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.sec-index { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 4px; }
.sec-index button { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: 11px 13px; border-radius: 12px; color: var(--body); cursor: pointer; }
.sec-index button:hover { background: var(--bg-2); }
.sec-index button.on { background: var(--blue-soft); color: var(--ink); }
.sec-index button b { font-weight: 600; font-size: 14px; line-height: 1.35; }
.sec-index button .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-index button .bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.sec-index button .bar span { display: block; height: 100%; background: var(--btn-bg); }
.sec-index .sec-h { font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 0 13px 6px; }
.big-search { position: relative; margin-bottom: 14px; }
.big-search input { width: 100%; min-height: 54px; padding: 14px 16px 14px 48px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--field); font-size: 16px; color: var(--ink); }
.big-search input:focus { outline: 3px solid var(--blue-soft); border-color: var(--blue); }
.big-search .icon { position: absolute; left: 16px; top: 17px; width: 20px; height: 20px; color: var(--muted); }
.sec-select { display: none; }
.search-hit { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.search-hit + .search-hit { margin-top: 10px; }
.search-hit .course-art { aspect-ratio: 4 / 3; height: auto; border-radius: 10px; }
.search-hit .course-art .art-number { display: none; }
.search-hit h4 { font-size: 16px; }
.search-hit p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.search-hit mark { background: var(--hl-y); color: inherit; border-radius: 3px; padding: 0 2px; }
.sec-group-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.sec-group-h:first-child { margin-top: 4px; }
.sec-group-h h2 { font-size: 22px; }
@media (max-width: 980px) { .course-layout { grid-template-columns: minmax(0, 1fr); } .sec-index { display: none; } .sec-select { display: block; margin-bottom: 12px; } }
@media (max-width: 620px) { .search-hit { grid-template-columns: 72px minmax(0, 1fr); } .search-hit .right { grid-column: 1 / -1; } }

/* ---------- responsive hero ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 70px; }
  .scope { max-width: 420px; }
}
@media (max-width: 620px) {
  .hero h1 { font-size: 44px; }
  :root[data-design="clinic"] .hero h1 { font-size: 46px; }
  .scope { max-width: 330px; }
  .scope-tag { font-size: 11.5px; padding: 5px 10px 5px 8px; }
  .scope-tag.left { right: auto !important; left: -2% !important; flex-direction: row; padding: 5px 10px 5px 8px; }
  .student-welcome .welcome-art { display: none; }
}
@media (prefers-reduced-motion: reduce) { .course-card, .btn { transition: none; } }

/* ---------- v5 fixes ---------- */
.scope-scale { left: auto; right: 24%; bottom: auto; top: 24%; }
.scope-cap { bottom: -34px; }
.notice { background: var(--blue-soft); border-color: var(--blue-line); color: var(--ink); border-radius: 12px; }
.notice .icon { color: var(--blue); }
:root[data-design="marker"][data-theme="light"] .notice .icon { color: #b07d00; }
.notice.orange { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 35%, transparent); color: var(--orange-ink); }
.notice.green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); color: var(--green); }
.notice.red { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--red); }
.notice.green .icon, .notice.orange .icon, .notice.red .icon { color: inherit; }
.ad-banner.tone-navy { --ad-bg: var(--block-bg); --ad-btn: var(--block-accent); --ad-btn-ink: #1c1407; }
:root[data-design="lamp"] .ad-banner.tone-navy { --ad-bg: linear-gradient(110deg, #2a1f0e 0%, #161921 60%); border: 1px solid var(--block-line); }
.ad-banner.tone-blue { --ad-bg: linear-gradient(120deg, var(--blue), color-mix(in srgb, var(--blue) 70%, #000)); }
.ad-body h3, .spec-body h3, .study-card h2 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); }
.dash-top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: stretch; margin-bottom: 22px; }
.dash-top .student-welcome { margin-bottom: 0; }
.dash-top .quote-card { margin: 0; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 1100px) { .dash-top { grid-template-columns: minmax(0, 1fr); } }
.quote-card.wide { max-width: 760px; margin: 0 auto; background: transparent; border: 0; text-align: left; }
.quote-card.wide .q { font-size: 21px; }
:root[data-design="clinic"] .quote-card { border: 0; box-shadow: var(--shadow); }
:root[data-design="clinic"] .quote-card.wide { box-shadow: none; }

.big-search { display: block; }
.quote-card { margin: 0 0 22px; }
.quote-card blockquote { margin: 0; }
.quote-card.wide { text-align: center; padding: 8px 0 0; }
.quote-card.wide::before { position: static; display: block; height: 34px; }
.quote-card.wide .who { justify-content: center; gap: 14px; }
.chart-bar { background: color-mix(in srgb, var(--btn-bg) 32%, var(--bg-2)); }
.chart-bar.current { background: var(--btn-bg); }
.heat i, .heat span { border-radius: 4px; }
.heat i.l1, .legend i.l1 { background: color-mix(in srgb, var(--btn-bg) 25%, var(--bg-2)); }
.heat i.l2, .legend i.l2 { background: color-mix(in srgb, var(--btn-bg) 50%, var(--bg-2)); }
.heat i.l3, .legend i.l3 { background: color-mix(in srgb, var(--btn-bg) 78%, var(--bg-2)); }
.heat i.l4, .legend i.l4 { background: var(--btn-bg); }
:root[data-design="marker"][data-theme="light"] .heat i.l4, :root[data-design="marker"][data-theme="light"] .legend i.l4 { background: #e0a400; }
