:root {
  --font-ui: "Microsoft YaHei UI", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Microsoft YaHei UI", sans-serif;
  --ink: #15201a;
  --muted: #66716b;
  --paper: #f5f5f0;
  --surface: #fffefb;
  --line: #dde1da;
  --header: 68px;
  --shadow: 0 18px 55px rgba(24, 41, 33, .09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-ui); font-size: 14px; line-height: 1.65; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: .5rem; left: .5rem; transform: translateY(-150%); padding: .55rem .8rem; color: #fff; background: #15201a; border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(15,98,254,.35); outline-offset: 2px; }

.app-header { position: sticky; z-index: 30; top: 0; display: grid; grid-template-columns: 240px auto minmax(240px, 460px) 90px; align-items: center; gap: 1.2rem; height: var(--header); padding: 0 1.4rem; border-bottom: 1px solid var(--line); background: rgba(255,254,251,.96); backdrop-filter: blur(12px); }
.brand { display: grid; grid-template-columns: 34px auto; column-gap: .6rem; align-items: center; padding: 0; text-align: left; border: 0; background: transparent; }
.brand > span { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: #15201a; border-radius: 9px; font: 700 1.3rem var(--font-num); }
.brand strong { align-self: end; font-size: .88rem; line-height: 1.2; }
.brand small { align-self: start; color: var(--muted); font: 650 .55rem var(--font-num); letter-spacing: .12em; }
.view-tabs { display: flex; align-items: center; gap: .25rem; }
.view-tabs button { position: relative; height: 38px; padding: 0 .8rem; color: var(--muted); border: 0; background: transparent; font-size: .75rem; font-weight: 700; }
.view-tabs button::after { content: ""; position: absolute; right: .8rem; bottom: 0; left: .8rem; height: 2px; background: transparent; }
.view-tabs button.is-active { color: var(--ink); }
.view-tabs button.is-active::after { background: var(--ink); }
.global-search { display: flex; align-items: center; gap: .5rem; height: 40px; padding: 0 .7rem; border: 1px solid transparent; border-radius: 8px; background: #f0f1eb; }
.global-search:focus-within { border-color: #85918a; background: #fff; }
.global-search > span:first-child { font: 1.2rem var(--font-num); }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: .75rem; }
kbd { padding: .1rem .3rem; color: var(--muted); border: 1px solid #ccd1ca; border-radius: 4px; background: #fff; font: 600 .58rem var(--font-num); }
.header-progress { text-align: right; }
.header-progress span, .header-progress strong { display: block; }
.header-progress span { color: var(--muted); font-size: .58rem; }
.header-progress strong { font: 700 1rem var(--font-num); }

.view { min-height: calc(100vh - var(--header)); }
.graph-view, .catalog-view { width: min(1320px, calc(100% - 3rem)); margin: 0 auto; padding: 3.2rem 0 5rem; }
.view-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 5rem; align-items: end; margin-bottom: 2.3rem; }
.view-intro.compact { align-items: center; margin-bottom: 2rem; }
.eyebrow { color: #59645e; font: 750 .62rem var(--font-num); letter-spacing: .15em; }
.view-intro h1 { margin: .5rem 0 0; font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 750; line-height: 1.12; letter-spacing: -.055em; }
.view-intro.compact h1 { font-size: clamp(2.2rem, 4vw, 3.8rem); }
.view-intro > p, .intro-meta > p { margin: 0; color: var(--muted); font-size: .9rem; }
.intro-meta > div { display: flex; gap: 1.6rem; margin-top: 1.2rem; }
.intro-meta span { color: var(--muted); font-size: .66rem; }
.intro-meta b { display: block; color: var(--ink); font: 700 1.35rem var(--font-num); }
.graph-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.domain-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
.domain-filter button { display: flex; align-items: center; gap: .35rem; min-height: 32px; padding: .35rem .6rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.75); font-size: .65rem; font-weight: 700; }
.domain-filter i { width: 7px; height: 7px; border-radius: 50%; background: var(--domain, #85918a); }
.domain-filter button:first-child i { background: linear-gradient(135deg,#6929c4,#0f78b5,#007d79,#9f1853,#8a3800); }
.domain-filter button.is-active { color: #fff; border-color: #15201a; background: #15201a; }
.graph-help { color: var(--muted); font-size: .62rem; }
.graph-help span { color: var(--ink); font-weight: 800; }
.graph-help i { display: inline-block; width: 1px; height: 10px; margin: 0 .5rem; background: var(--line); vertical-align: middle; }
.taxonomy-rail { display: flex; align-items: center; gap: .55rem; margin: 0 0 .9rem; padding: .55rem .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.68); font-size: .61rem; }
.taxonomy-rail span { display: flex; align-items: center; gap: .3rem; }
.taxonomy-rail b { display: grid; place-items: center; min-width: 24px; height: 20px; color: #fff; background: var(--ink); border-radius: 5px; font: 700 .53rem var(--font-num); }
.taxonomy-rail i { color: #aeb6b0; font-style: normal; }

.graph-canvas { position: relative; height: clamp(500px, 60vw, 660px); max-height: 660px; min-height: 500px; border: 1px solid #d8ddd7; border-radius: 20px; background-color: #fbfbf8; background-image: radial-gradient(#cdd3cd 1px, transparent 1px); background-size: 22px 22px; box-shadow: var(--shadow); overflow: hidden; }
.graph-canvas::before { content: ""; position: absolute; inset: 15%; border: 1px dashed #e4e7e2; border-radius: 50%; }
#graph-edges { position: absolute; inset: 5%; width: 90%; height: 90%; overflow: visible; }
#graph-edges line { stroke: #aeb7b0; stroke-width: .22; vector-effect: non-scaling-stroke; transition: opacity .18s, stroke .18s, stroke-width .18s; }
.graph-nodes { position: absolute; inset: 5%; }
.graph-node { position: absolute; left: var(--x); top: var(--y); display: grid; grid-template-columns: 34px auto; grid-template-rows: auto auto; align-items: center; column-gap: .5rem; min-width: 132px; max-width: 174px; padding: .55rem .65rem; text-align: left; border: 1px solid color-mix(in srgb, var(--domain) 35%, white); border-radius: 12px; background: rgba(255,255,255,.93); box-shadow: 0 8px 25px rgba(20,35,27,.08); transform: translate(-50%,-50%); transition: transform .18s, opacity .18s, box-shadow .18s, border-color .18s; }
.graph-node > span { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--domain); border-radius: 10px; font: 750 .84rem var(--font-num); }
.graph-node strong { align-self: end; font-size: .68rem; line-height: 1.3; }
.graph-node small { align-self: start; color: var(--muted); font: 600 .55rem var(--font-num); }
.graph-node.is-key { min-width: 146px; padding: .7rem; border-width: 2px; }
.graph-node.is-key > span { width: 40px; height: 40px; }
.graph-node:hover, .graph-node:focus-visible, .graph-node.is-related { z-index: 3; border-color: var(--domain); box-shadow: 0 12px 35px color-mix(in srgb, var(--domain) 18%, transparent); transform: translate(-50%,-50%) scale(1.07); }
.graph-canvas.has-focus .graph-node:not(.is-related), .graph-canvas.has-focus #graph-edges line:not(.is-related) { opacity: .12; }
#graph-edges line.is-related { stroke: #15201a; stroke-width: .48; }
.graph-node.is-domain-dim, #graph-edges line.is-domain-dim { opacity: .13; }
.graph-core { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 116px; height: 116px; text-align: center; border: 1px solid #c6cdc7; border-radius: 50%; background: rgba(255,254,251,.86); transform: translate(-50%,-50%); }
.graph-core span { font-size: .8rem; font-weight: 800; }
.graph-core small { margin-top: -2.1rem; color: var(--muted); font-size: .58rem; }
.graph-insight { display: grid; grid-template-columns: 250px 1fr; gap: 1.2rem; margin-top: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.graph-insight header { padding-right: 1rem; border-right: 1px solid var(--line); }
.graph-insight header span { color: #59645e; font: 750 .57rem var(--font-num); letter-spacing: .08em; }
.graph-insight header h2 { margin: .15rem 0 .35rem; font-size: 1.05rem; }
.graph-insight header p { margin: 0; color: var(--muted); font-size: .62rem; }
.graph-insight > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .55rem; }
.graph-insight button { padding: .65rem; text-align: left; border: 1px solid #e3e6e1; border-radius: 8px; background: #fafbf8; }
.graph-insight button:hover { border-color: #87928b; background: #fff; }
.graph-insight button small, .graph-insight button strong, .graph-insight button span { display: block; }
.graph-insight button small { color: #6929c4; font-size: .54rem; font-weight: 800; }
.graph-insight button strong { margin: .12rem 0 .25rem; font-size: .67rem; }
.graph-insight button p { margin: 0; color: var(--muted); font-size: .57rem; line-height: 1.55; }
.graph-insight button span { margin-top: .35rem; color: #0f62fe; font-size: .54rem; }
.domain-summary { margin-top: 4.2rem; }
.section-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1.2rem; }
.section-title h2 { margin: .2rem 0 0; font-size: 2rem; letter-spacing: -.03em; }
.domain-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: .7rem; }
.domain-card { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: .8rem; min-height: 190px; padding: 1rem; text-align: left; border: 1px solid var(--line); border-top: 4px solid var(--domain); border-radius: 12px; background: #fff; overflow: hidden; }
.domain-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 110px; height: 110px; border-radius: 50%; background: var(--domain-light); }
.domain-card > span { display: grid; place-items: center; width: 30px; height: 30px; color: #fff; background: var(--domain); border-radius: 7px; font: 700 .7rem var(--font-num); }
.domain-card small { color: var(--domain); font: 700 .58rem var(--font-num); }
.domain-card h3 { margin: .3rem 0 .45rem; font-size: .85rem; line-height: 1.4; }
.domain-card p { margin: 0; color: var(--muted); font-size: .66rem; }
.domain-card em { position: absolute; z-index: 1; right: .8rem; bottom: .65rem; color: var(--domain); font: 700 .62rem var(--font-num); font-style: normal; }
.domain-card:hover { border-color: var(--domain); transform: translateY(-2px); box-shadow: var(--shadow); }

.type-legend { position: sticky; z-index: 5; top: calc(var(--header) + .5rem); display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-bottom: 1.5rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,254,251,.94); backdrop-filter: blur(8px); }
.type-legend > span { margin-right: .3rem; font-size: .68rem; font-weight: 800; }
.type-legend i { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .62rem; font-style: normal; }
.type-legend b { width: 9px; height: 9px; border-radius: 3px; background: var(--type); }
.type-legend em { margin-left: auto; color: var(--muted); font-size: .58rem; font-style: normal; }
.catalog-domains { display: flex; flex-direction: column; gap: 1rem; }
.catalog-domain { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.catalog-domain > header { display: grid; grid-template-columns: 48px 1fr auto; gap: 1rem; align-items: center; padding: 1.2rem 1.4rem; background: var(--domain-light); }
.catalog-domain > header > span { display: grid; place-items: center; width: 44px; height: 44px; color: #fff; background: var(--domain); border-radius: 11px; font: 700 .8rem var(--font-num); }
.catalog-domain > header small { color: var(--domain); font-size: .6rem; font-weight: 800; }
.catalog-domain > header h2 { margin: .1rem 0; font-size: 1.25rem; }
.catalog-domain > header p { margin: 0; color: var(--muted); font-size: .68rem; }
.catalog-domain > header > strong { color: var(--domain); font: 700 .72rem var(--font-num); }
.catalog-lectures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.catalog-lecture { padding: 1.1rem 1.3rem; border-top: 1px solid var(--line); }
.catalog-lecture:nth-child(odd) { border-right: 1px solid var(--line); }
.catalog-lecture > button { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; width: 100%; padding: 0 0 .8rem; text-align: left; border: 0; background: transparent; }
.catalog-lecture > button span { color: var(--domain); font-size: .62rem; font-weight: 800; }
.catalog-lecture > button h3 { margin: 0; font-size: .82rem; }
.catalog-lecture > button em { color: var(--muted); font-size: .58rem; font-style: normal; }
.catalog-lecture > .stage-stack { display: grid; gap: .6rem; }
.stage-group { margin: 0; }
.stage-group h4 { display: flex; align-items: center; gap: .35rem; margin: 0 0 .3rem; color: var(--muted); font-size: .57rem; }
.stage-group h4::before { content: ""; width: 13px; height: 1px; background: var(--domain); }
.stage-group h4 small { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid var(--line); border-radius: 50%; font: 600 .48rem var(--font-num); }
.stage-group > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .3rem; }
.topic-chip { display: grid; grid-template-columns: 7px 1fr; align-items: center; gap: .35rem; padding: .35rem .45rem; text-align: left; color: #4f5a54; border: 1px solid #e1e4df; border-radius: 6px; background: #fafbf8; font-size: .6rem; }
.topic-chip i { width: 6px; height: 6px; border-radius: 2px; background: var(--type); }
.topic-chip span, .topic-chip small { grid-column: 2; }
.topic-chip small { color: var(--muted); font-size: .48rem; }
.topic-chip:hover { color: #111; border-color: var(--type); }

.study-view { display: grid; grid-template-columns: 235px 350px minmax(0,1fr); height: calc(100vh - var(--header)); overflow: hidden; }
.course-sidebar { display: flex; flex-direction: column; padding: 1rem .7rem; border-right: 1px solid var(--line); background: #eef0eb; overflow-y: auto; }
.sidebar-heading { display: flex; align-items: start; justify-content: space-between; padding: 0 .35rem .7rem; }
.sidebar-heading h2 { margin: .15rem 0 0; font-size: 1.25rem; }
#close-menu, #mobile-menu { display: none; }
#close-menu { width: 30px; height: 30px; border: 0; background: transparent; font-size: 1.2rem; }
.progress-card { padding: .75rem; margin-bottom: .8rem; color: #fff; background: #15201a; border-radius: 8px; }
.progress-card > div { display: flex; align-items: baseline; justify-content: space-between; }
.progress-card strong { font: 700 1.1rem var(--font-num); }
.progress-card span { color: rgba(255,255,255,.7); font-size: .58rem; }
.progress-card progress { display: block; width: 100%; height: 4px; margin-top: .5rem; border: 0; }
progress::-webkit-progress-bar { background: rgba(255,255,255,.2); }
progress::-webkit-progress-value { background: #dff1a8; }
.nav-domain { padding-bottom: .65rem; }
.nav-domain > span { display: block; margin: .25rem .4rem; color: var(--domain); font-size: .56rem; font-weight: 900; letter-spacing: .08em; }
.lecture-link { display: grid; grid-template-columns: 28px 1fr; gap: .5rem; align-items: center; width: 100%; padding: .45rem; text-align: left; border: 0; border-radius: 7px; background: transparent; }
.lecture-link i { display: grid; place-items: center; width: 26px; height: 26px; color: var(--domain); border: 1px solid color-mix(in srgb,var(--domain) 30%,white); border-radius: 7px; font: 700 .65rem var(--font-num); font-style: normal; }
.lecture-link strong, .lecture-link small { display: block; }
.lecture-link strong { font-size: .68rem; line-height: 1.3; }
.lecture-link small { color: var(--muted); font-size: .54rem; }
.lecture-link:hover { background: #fff; }
.lecture-link.is-active { background: #fff; box-shadow: 0 5px 15px rgba(20,40,30,.06); }
.lecture-link.is-active i { color: #fff; background: var(--domain); }
.source-note { display: flex; gap: .5rem; padding: .7rem .35rem 0; margin-top: auto; border-top: 1px solid #d4d9d2; }
.source-note i { width: 7px; height: 7px; margin-top: .3rem; border-radius: 50%; background: #dd7444; }
.source-note strong, .source-note span { display: block; }
.source-note strong { font-size: .6rem; }
.source-note span { color: var(--muted); font-size: .54rem; }
.topic-pane { border-right: 1px solid var(--line); background: #f9f9f5; overflow-y: auto; }
.pane-heading { position: sticky; z-index: 3; top: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; padding: 1.1rem 1rem .85rem; border-bottom: 1px solid var(--line); background: rgba(249,249,245,.96); }
.pane-heading h2 { margin: .15rem 0 0; font-size: 1.18rem; line-height: 1.3; }
.pane-heading > span { color: var(--muted); font-size: .6rem; }
.search-context { padding: .45rem 1rem; color: #005d5d; background: #e5f7f5; font-size: .58rem; }
.topic-list { padding: .45rem; }
.topic-row { display: grid; grid-template-columns: 1fr 32px; align-items: center; border: 1px solid transparent; border-radius: 9px; }
.topic-row + .topic-row { margin-top: .2rem; }
.topic-row:hover, .topic-row.is-selected { border-color: color-mix(in srgb,var(--domain) 28%,white); background: #fff; }
.topic-row.is-selected { box-shadow: 0 7px 20px rgba(25,45,35,.07); }
.topic-open { display: grid; grid-template-columns: 30px 1fr; gap: .65rem; align-items: start; padding: .75rem .2rem .75rem .6rem; text-align: left; border: 0; background: transparent; }
.topic-state { display: grid; place-items: center; width: 28px; height: 28px; color: var(--type); border: 1px solid color-mix(in srgb,var(--type) 35%,white); border-radius: 8px; font: 700 .62rem var(--font-num); }
.is-learned .topic-state { color: #fff; background: #198038; border-color: #198038; }
.topic-copy { min-width: 0; }
.topic-copy small { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .55rem; }
.topic-copy small i { width: 6px; height: 6px; border-radius: 2px; background: var(--type); }
.topic-copy small b { padding: .05rem .24rem; color: #657069; border: 1px solid #e1e4df; border-radius: 4px; font-size: .48rem; font-weight: 600; }
.topic-copy strong { display: block; margin-top: .12rem; font-size: .82rem; line-height: 1.4; }
.topic-copy p { display: -webkit-box; margin: .18rem 0 0; color: var(--muted); font-size: .62rem; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.favorite-mini { width: 28px; height: 28px; padding: 0; color: #b28600; border: 0; border-radius: 50%; background: transparent; }
mark { color: inherit; background: #ffe099; }
.empty-state { margin: 1rem; padding: 2.5rem 1rem; text-align: center; border: 1px dashed var(--line); border-radius: 9px; }
.empty-state p { color: var(--muted); font-size: .68rem; }
.empty-state button { color: #0f62fe; border: 0; background: transparent; font-size: .65rem; }
.reader { background: var(--surface); overflow-y: auto; }
#reader-content { width: min(820px, calc(100% - 3rem)); margin: 0 auto; padding: 2.8rem 0 5rem; }
.reader-accent { --domain:#6929c4; --domain-light:#f3effc; --type:#0f62fe; }
.reader-header { position: relative; padding-top: 1rem; padding-bottom: 1.6rem; border-top: 5px solid var(--domain); border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; color: var(--muted); font-size: .6rem; }
.breadcrumbs i { color: #bec5bf; font-style: normal; }
.type-badge { position: absolute; top: 1rem; right: 0; display: flex; align-items: center; gap: .35rem; padding: .25rem .45rem; color: var(--type); border: 1px solid color-mix(in srgb,var(--type) 25%,white); border-radius: 5px; background: #fff; font-size: .58rem; font-weight: 800; }
.type-badge i { width: 7px; height: 7px; border-radius: 2px; background: var(--type); }
.reader-header h1 { max-width: 14ch; margin: .75rem 0 .6rem; font-size: clamp(2.2rem, 4vw, 3.7rem); line-height: 1.12; letter-spacing: -.045em; }
.reader-taxonomy { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .55rem; }
.reader-taxonomy span { padding: .22rem .4rem; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; font-size: .54rem; }
.reader-taxonomy b { color: var(--ink); }
.reader-tags, .relation-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.reader-tags span { padding: .15rem .4rem; color: var(--domain); background: var(--domain-light); border-radius: 4px; font-size: .56rem; }
.reader-actions { display: flex; gap: .4rem; margin-top: 1rem; }
.reader-actions button { padding: .4rem .65rem; color: var(--domain); border: 1px solid color-mix(in srgb,var(--domain) 30%,white); border-radius: 6px; background: #fff; font-size: .63rem; font-weight: 750; }
.reader-actions .master-button { color: #fff; background: var(--domain); }
.reader-actions .master-button.is-done { color: #fff; background: #198038; border-color: #198038; }
.plain-block { position: relative; margin: 1.8rem 0; padding: 1.2rem; border-left: 4px solid var(--type); border-radius: 0 9px 9px 0; background: color-mix(in srgb,var(--type) 7%,white); }
.plain-block > span { position: absolute; top: -.65rem; padding: .12rem .4rem; color: #fff; background: var(--type); border-radius: 4px; font-size: .55rem; font-weight: 800; }
.plain-block p { margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.75; }
.reader section { margin-top: 2rem; }
.reader-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.reader h2 { margin: .22rem 0 .55rem; color: var(--domain); font-size: 1rem; }
.reader section p { margin: 0; font-size: .8rem; }
.section-no { color: var(--type); font: 700 .58rem var(--font-num); }
.steps-block ol { padding: 0; list-style: none; counter-reset: steps; }
.steps-block li { counter-increment: steps; display: grid; grid-template-columns: 28px 1fr; gap: .65rem; padding: .65rem 0; border-bottom: 1px solid #eceee9; font-size: .76rem; }
.steps-block li::before { content: counter(steps); display: grid; place-items: center; width: 26px; height: 26px; color: #fff; background: var(--type); border-radius: 7px; font: 700 .62rem var(--font-num); }
.warning-block, .example-block { padding: .9rem; border-radius: 8px; }
.warning-block { border-left: 3px solid #da1e28; background: #fff1f1; }
.example-block { border-left: 3px solid #198038; background: #eef8f0; }
.relation-list span { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; font-size: .64rem; }
.section-lead { color: var(--muted); }
.mini-graph { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; align-items: stretch; margin: .8rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background-color: #fafbf8; background-image: radial-gradient(#d6dbd6 .8px,transparent .8px); background-size: 16px 16px; }
.mini-core { display: flex; flex-direction: column; justify-content: center; padding: .9rem; color: #fff; background: var(--domain); border-radius: 10px; box-shadow: 0 8px 20px color-mix(in srgb,var(--domain) 20%,transparent); }
.mini-core small { opacity: .76; font-size: .54rem; }
.mini-core strong { margin-top: .2rem; font-size: .86rem; line-height: 1.4; }
.mini-relations { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
.mini-relations button { position: relative; padding: .55rem .65rem .55rem .8rem; text-align: left; border: 1px solid #e0e4df; border-left: 3px solid var(--target); border-radius: 7px; background: rgba(255,255,255,.92); }
.mini-relations button:hover { border-color: var(--target); }
.mini-relations small, .mini-relations strong, .mini-relations span { display: block; }
.mini-relations small { color: var(--target); font-size: .52rem; font-weight: 800; }
.mini-relations strong { margin: .12rem 0; font-size: .67rem; }
.mini-relations p { color: var(--muted); font-size: .55rem !important; line-height: 1.5; }
.mini-relations span { margin-top: .3rem; color: #0f62fe; font-size: .51rem; }
.source-details, .notes-details { margin-top: 2rem; border-top: 1px solid var(--line); }
.source-details summary, .notes-details summary { display: grid; grid-template-columns: 24px auto 1fr; gap: .45rem; align-items: center; padding: .9rem 0; cursor: pointer; list-style: none; }
.source-details summary::-webkit-details-marker, .notes-details summary::-webkit-details-marker { display: none; }
.source-details summary > span, .notes-details summary > span { color: var(--type); font: 700 .58rem var(--font-num); }
.source-details summary strong, .notes-details summary strong { color: var(--domain); font-size: .85rem; }
.source-details summary em, .notes-details summary em { justify-self: end; color: var(--muted); font-size: .56rem; font-style: normal; }
.source-warning { padding: .55rem .7rem; color: #743b28; background: #fff0e6; border-radius: 6px; font-size: .64rem; }
.source-details ul { padding: 0; list-style: none; }
.source-details li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.source-details li > div { display: flex; justify-content: space-between; }
.source-details li strong { font-size: .68rem; }
.source-details li span, .source-details li small, .source-details li > p { color: var(--muted); font-size: .56rem; }
.source-details li > p { margin: .1rem 0; }
.source-details blockquote { margin: .45rem 0; padding-left: .65rem; border-left: 2px solid #cbd2cb; font-size: .62rem; }
.notes-details textarea { width: 100%; padding: .7rem; resize: vertical; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: .72rem; }
.reader-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.reader-pagination button { padding: .4rem .6rem; color: var(--domain); border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: .62rem; }
.reader-pagination button:last-child { justify-self: end; }
.reader-pagination button:disabled { opacity: .3; }
.reader-pagination span { color: var(--muted); font-size: .58rem; }
.reader-empty { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.mobile-backdrop { position: fixed; z-index: 20; inset: var(--header) 0 0; background: rgba(12,25,18,.45); }
.fatal { padding: 4rem; }

@media (max-width: 1100px) {
  .app-header { grid-template-columns: 210px auto minmax(220px,1fr) 70px; gap: .7rem; }
  .graph-node { min-width: 112px; max-width: 140px; padding: .45rem; }
  .graph-node strong { font-size: .6rem; }
  .domain-cards { grid-template-columns: repeat(3,1fr); }
  .study-view { grid-template-columns: 210px 320px minmax(0,1fr); }
  .reader-grid { grid-template-columns: 1fr; gap: 0; }
  .graph-insight > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .app-header { grid-template-columns: auto 1fr auto; }
  .view-tabs { order: 4; grid-column: 1 / -1; justify-content: center; height: 38px; margin: 0 -1.4rem; border-top: 1px solid var(--line); background: #fff; }
  :root { --header: 107px; }
  .header-progress { display: none; }
  .graph-view, .catalog-view { width: min(100% - 1.5rem, 780px); padding-top: 2rem; }
  .view-intro { grid-template-columns: 1fr; gap: 1.2rem; }
  .graph-canvas { height: 600px; overflow-x: auto; }
  .graph-node { min-width: 98px; }
  .domain-cards { grid-template-columns: repeat(2,1fr); }
  .catalog-lectures { grid-template-columns: 1fr; }
  .catalog-lecture:nth-child(odd) { border-right: 0; }
  .graph-insight { grid-template-columns: 1fr; }
  .graph-insight header { padding: 0 0 .7rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .study-view { grid-template-columns: 320px minmax(0,1fr); height: calc(100vh - var(--header)); }
  .course-sidebar { position: fixed; z-index: 25; top: var(--header); bottom: 0; left: 0; width: 270px; transform: translateX(-105%); transition: .2s ease; box-shadow: var(--shadow); }
  .course-sidebar.is-open { transform: translateX(0); }
  #close-menu, #mobile-menu { display: block; }
  #mobile-menu { grid-row: 1 / 3; align-self: center; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: .6rem; }
  .pane-heading { grid-template-columns: auto 1fr auto; }
}
@media (max-width: 640px) {
  .app-header { grid-template-columns: auto auto; height: auto; min-height: 68px; padding: .65rem .75rem 0; }
  .brand small, kbd { display: none; }
  .global-search { grid-column: 1 / -1; grid-row: 2; height: 36px; }
  .view-tabs { grid-row: 3; margin: 0 -.75rem; }
  :root { --header: 145px; }
  .view-intro h1 { font-size: 2.5rem; }
  .intro-meta > div { gap: 1rem; }
  .graph-toolbar { align-items: start; flex-direction: column; }
  .taxonomy-rail { overflow-x: auto; white-space: nowrap; }
  .graph-canvas { min-height: 690px; }
  .graph-nodes { inset: 3%; }
  #graph-edges { inset: 3%; width: 94%; height: 94%; }
  .graph-node { min-width: 76px; max-width: 92px; grid-template-columns: 25px 1fr; column-gap: .3rem; padding: .3rem; border-radius: 8px; }
  .graph-node[data-lecture="01"] { --x: 16% !important; }
  .graph-node[data-lecture="14"] { --x: 86% !important; }
  .graph-node > span, .graph-node.is-key > span { width: 25px; height: 25px; border-radius: 6px; }
  .graph-node strong { font-size: .48rem; }
  .graph-node small { font-size: .44rem; }
  .graph-core { width: 82px; height: 82px; }
  .domain-cards { grid-template-columns: 1fr; }
  .domain-card { min-height: 145px; }
  .catalog-domain > header { grid-template-columns: 40px 1fr; }
  .catalog-domain > header > strong { display: none; }
  .catalog-lecture > button { grid-template-columns: 65px 1fr; }
  .catalog-lecture > button em { display: none; }
  .stage-group > div { grid-template-columns: 1fr; }
  .graph-insight > div { grid-template-columns: 1fr; }
  .study-view { display: block; height: auto; overflow: visible; }
  .course-sidebar { top: 0; }
  .topic-pane, .reader { overflow: visible; border: 0; }
  .pane-heading { position: static; }
  #reader-content { width: auto; padding: 2rem 1rem 4rem; border-top: 8px solid var(--paper); }
  .type-badge { position: static; display: inline-flex; margin-top: .7rem; }
  .reader-header h1 { font-size: 2.4rem; }
  .mini-graph { grid-template-columns: 1fr; }
  .mini-relations { grid-template-columns: 1fr; }
  .mobile-backdrop { inset: 0; }
}
