/* AI原生企業 — online edition */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
:root {
  --paper: #F3F5F8;
  --sheet: #FFFFFF;
  --ink: #18232E;
  --ink-2: #33414F;
  --muted: #5E6B78;
  --navy: #1F4E79;
  --navy-2: #2C6399;
  --ochre: #B5651D;
  --rule: #D6DEE6;
  --rule-2: #E6EBF0;
  --grid: rgba(31, 78, 121, .075);
  --mark: #FCE7B5;
  --ok: #2E7D4F;
  --bad: #A83A32;
  --k-concept: #1F4E79; --k-concept-bg: #EEF3F8;
  --k-theory: #5B3F8C;  --k-theory-bg: #F3EFF8;
  --k-research: #2E6F8E; --k-research-bg: #EAF4F8;
  --k-history: #8A5A00; --k-history-bg: #FBF4E6;
  --k-model: #1E6B5C;   --k-model-bg: #EAF5F2;
  --k-teach: #B5651D;   --k-teach-bg: #FBF3EA;
  --k-trend: #2E7D4F;   --k-trend-bg: #EDF6F0;
  --k-taiwan: #A83A32;  --k-taiwan-bg: #FAEEEE;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --num: "Barlow Condensed", "Noto Sans TC", sans-serif;
  --read-size: 18px;
  --read-lh: 1.95;
  --top: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1720; --sheet: #16212D; --ink: #E2E8EE; --ink-2: #C3CDD7; --muted: #95A3B1;
    --navy: #82B3E0; --navy-2: #A3C8EA; --ochre: #E39A5C; --rule: #2A3A4B; --rule-2: #223040;
    --grid: rgba(130, 179, 224, .07); --mark: #5A4512; --ok: #6CC495; --bad: #E58A82;
    --k-concept: #82B3E0; --k-concept-bg: #172839; --k-theory: #B9A2E3; --k-theory-bg: #221D33;
    --k-research: #7EC2DF; --k-research-bg: #14293A; --k-history: #E2B866; --k-history-bg: #2A2414;
    --k-model: #73C8B3; --k-model-bg: #132A26; --k-teach: #E39A5C; --k-teach-bg: #2C2016;
    --k-trend: #7FCB9A; --k-trend-bg: #15281D; --k-taiwan: #E58A82; --k-taiwan-bg: #2E1A1A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1720; --sheet: #16212D; --ink: #E2E8EE; --ink-2: #C3CDD7; --muted: #95A3B1;
  --navy: #82B3E0; --navy-2: #A3C8EA; --ochre: #E39A5C; --rule: #2A3A4B; --rule-2: #223040;
  --grid: rgba(130, 179, 224, .07); --mark: #5A4512; --ok: #6CC495; --bad: #E58A82;
  --k-concept: #82B3E0; --k-concept-bg: #172839; --k-theory: #B9A2E3; --k-theory-bg: #221D33;
  --k-research: #7EC2DF; --k-research-bg: #14293A; --k-history: #E2B866; --k-history-bg: #2A2414;
  --k-model: #73C8B3; --k-model-bg: #132A26; --k-teach: #E39A5C; --k-teach-bg: #2C2016;
  --k-trend: #7FCB9A; --k-trend-bg: #15281D; --k-taiwan: #E58A82; --k-taiwan-bg: #2E1A1A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 var(--sans); }
a { color: var(--navy); }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sheet); padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
main { min-height: calc(100vh - var(--top)); }
main:focus { outline: none; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); background: var(--sheet); border-bottom: 1px solid var(--rule); }
.topbar-in { max-width: 1320px; margin: 0 auto; height: 100%; padding: 0 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; flex: none; }
.brand-mark { width: 26px; height: 26px; }
.brand-t { font-weight: 700; font-size: 18px; letter-spacing: .04em; color: var(--ink); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 12px; border-radius: 6px; font-weight: 500; }
.nav a:hover { background: var(--rule-2); }
.nav a.on { color: var(--navy); box-shadow: inset 0 -3px 0 var(--ochre); border-radius: 0; }
.qbox { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 0 10px; width: 300px; height: 38px; }
.qbox svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.qbox input { border: 0; background: transparent; outline: none; width: 100%; height: 100%; }
.iconbtn { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--rule); background: var(--sheet); border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.iconbtn svg { width: 19px; height: 19px; }
.menubtn { display: none; }

/* ---------- shared ---------- */
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 20px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--navy); background: var(--navy); color: #fff; text-decoration: none; font-weight: 600; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--navy); }
:root[data-theme="dark"] .btn:not(.ghost) { color: #0F1720; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.ghost) { color: #0F1720; } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--rule); background: var(--sheet); cursor: pointer; font-size: 14px; color: var(--ink-2); }
.chip[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--sheet); }
.chip .n { font-family: var(--num); font-size: 15px; opacity: .8; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 4px; color: #fff; background: var(--navy); vertical-align: 2px; letter-spacing: .04em; }
.k-concept { --k: var(--k-concept); --kb: var(--k-concept-bg); }
.k-theory { --k: var(--k-theory); --kb: var(--k-theory-bg); }
.k-research { --k: var(--k-research); --kb: var(--k-research-bg); }
.k-history { --k: var(--k-history); --kb: var(--k-history-bg); }
.k-model { --k: var(--k-model); --kb: var(--k-model-bg); }
.k-teach { --k: var(--k-teach); --kb: var(--k-teach-bg); }
.k-trend { --k: var(--k-trend); --kb: var(--k-trend-bg); }
.k-taiwan { --k: var(--k-taiwan); --kb: var(--k-taiwan-bg); }
.tag[class*="k-"] { background: var(--k); }
:root[data-theme="dark"] .tag[class*="k-"] { color: #0F1720; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag[class*="k-"] { color: #0F1720; } }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.35; }
.empty { padding: 40px 0; color: var(--muted); }

/* ---------- home ---------- */
.hero { position: relative; background:
  linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px, var(--sheet);
  border-bottom: 1px solid var(--rule); }
.hero-in { max-width: 1320px; margin: 0 auto; padding: 56px 20px 40px; display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 48px; align-items: start; }
.hero .series { color: var(--ochre); font-weight: 700; margin: 0 0 10px; }
.hero h1 { font-family: var(--serif); font-size: clamp(44px, 6vw, 76px); margin: 0; color: var(--navy); letter-spacing: .02em; line-height: 1.1; }
.hero .sub { font-family: var(--serif); font-size: 21px; margin: 16px 0 0; color: var(--ink-2); line-height: 1.6; padding-bottom: 18px; border-bottom: 3px solid var(--ochre); }
.hero .by { margin: 18px 0 0; font-weight: 700; }
.hero .by span { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
.hero .cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.facts { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.facts div { line-height: 1.2; }
.facts b { display: block; font-family: var(--num); font-size: 32px; color: var(--navy); font-weight: 600; }
.facts span { font-size: 13px; color: var(--muted); }

.line { min-width: 0; }
.line-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.line-head h2 { margin: 0; font-size: 15px; color: var(--ink-2); font-weight: 700; }
.line-head p { margin: 0; font-size: 13px; color: var(--muted); }
.line svg { width: 100%; height: auto; display: block; overflow: visible; }
.st-box { fill: var(--sheet); stroke: var(--navy); stroke-width: 2; }
.st-name { font: 700 18px var(--sans); fill: var(--navy); }
.st-title { font: 500 14.5px var(--sans); fill: var(--muted); }
.belt { stroke: var(--ink-2); stroke-width: 6; }
.belt-dash { stroke: var(--sheet); stroke-width: 2; stroke-dasharray: 2 10; }
.mc { cursor: pointer; }
.mc rect { fill: var(--sheet); stroke: var(--ink-2); stroke-width: 1.6; transition: fill .15s; }
.mc text { font: 600 24px var(--num); fill: var(--ink); pointer-events: none; }
.mc:hover rect, .mc:focus rect, .mc.on rect { fill: var(--navy); stroke: var(--navy); }
.mc:hover text, .mc:focus text, .mc.on text { fill: var(--sheet); }
.mc:focus { outline: none; }
.mc .leg { stroke: var(--ink-2); stroke-width: 1.6; }
.flow-arrow { fill: var(--ochre); }
.line-info { margin-top: 14px; min-height: 108px; background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--ochre); padding: 14px 18px; border-radius: 4px; }
.line-info .k { font-family: var(--num); color: var(--ochre); font-size: 18px; font-weight: 600; }
.line-info h3 { margin: 0 0 4px; font-size: 18px; }
.line-info p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.parts { padding: 56px 0 24px; }
.part { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 34px 0; border-top: 1px solid var(--rule); }
.part-h .pn { font-family: var(--num); font-size: 15px; font-weight: 600; color: var(--ochre); }
.part-h h2 { font-family: var(--serif); margin: 4px 0 10px; font-size: 26px; color: var(--navy); }
.part-h p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 0 28px; }
.ch-list li { border-bottom: 1px solid var(--rule-2); }
.ch-list a { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 16px 0; text-decoration: none; color: var(--ink); }
.ch-list .cn { font-family: var(--num); font-size: 38px; font-weight: 600; line-height: .95; color: var(--navy); }
.ch-list b { display: block; font-size: 16.5px; line-height: 1.45; }
.ch-list span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.ch-list a:hover b { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

.band { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 50px 0; margin-top: 30px; }
.band-in { display: grid; grid-template-columns: 260px 1fr; gap: 40px; }
.band h2 { font-family: var(--serif); font-size: 26px; color: var(--navy); margin: 0; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 28px; }
.legend div { display: grid; grid-template-columns: 82px 1fr; gap: 10px; align-items: start; font-size: 14.5px; color: var(--ink-2); }
.foot { padding: 34px 0 50px; color: var(--muted); font-size: 13.5px; }

/* ---------- reader ---------- */
.reader { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 270px minmax(0, 1fr) 250px; gap: 40px; padding: 0 20px; }
.toc { position: sticky; top: var(--top); align-self: start; max-height: calc(100vh - var(--top)); overflow: auto; padding: 22px 6px 30px 0; font-size: 14px; }
.toc select { width: 100%; height: 40px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); padding: 0 8px; margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 6px 10px; text-decoration: none; color: var(--ink-2); border-left: 2px solid var(--rule); line-height: 1.5; }
.toc a.end { color: var(--muted); font-size: 13.5px; }
.toc a.on { border-left-color: var(--ochre); color: var(--navy); font-weight: 700; background: var(--sheet); }
.toc .sep { margin: 12px 0 6px 10px; font-size: 12.5px; color: var(--muted); }
.progress { height: 3px; background: var(--rule); position: sticky; top: var(--top); z-index: 5; }
.progress i { display: block; height: 100%; width: 0; background: var(--ochre); }
.doc { padding: 28px 0 80px; min-width: 0; }
.doc-in { max-width: 760px; }
.rail { position: sticky; top: var(--top); align-self: start; padding: 22px 0; font-size: 14px; max-height: calc(100vh - var(--top)); overflow: auto; }
.rail h3 { font-size: 13.5px; margin: 0 0 10px; color: var(--muted); }
.rail .setting { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--sheet); }
.seg button { border: 0; background: transparent; padding: 4px 11px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--sheet); }
.rail-list { list-style: none; padding: 0; margin: 0 0 22px; }
.rail-list a { display: block; padding: 5px 0; text-decoration: none; color: var(--ink-2); border-bottom: 1px dashed var(--rule); line-height: 1.45; }
.rail-list a:hover { color: var(--navy); }
.rail-list .nm { font-family: var(--num); font-weight: 600; color: var(--navy); margin-right: 6px; }

.ch-head { padding: 26px 0 26px; margin-bottom: 30px; border-bottom: 3px solid var(--ochre); }
.ch-head .pl { color: var(--ochre); font-weight: 700; font-size: 14px; }
.ch-head .big { font-family: var(--num); font-size: 96px; line-height: .9; color: var(--navy); font-weight: 600; margin: 8px 0 6px; }
.ch-head h1 { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 38px); margin: 0; color: var(--ink); }
.ch-head .st { font-size: 17px; color: var(--muted); margin: 10px 0 0; }
.core { background: var(--k-concept-bg); border-left: 4px solid var(--navy); padding: 16px 20px; margin: 0 0 22px; border-radius: 0 6px 6px 0; }
.core b { color: var(--navy); display: block; margin-bottom: 4px; }
.obj { margin: 0 0 30px; }
.obj h2 { font-size: 17px; color: var(--navy); margin: 0 0 8px; }
.obj ol { margin: 0; padding-left: 1.5em; color: var(--ink-2); }
.obj li { margin: 4px 0; }

.prose { font-family: var(--serif); font-size: var(--read-size); line-height: var(--read-lh); color: var(--ink); }
.prose p { margin: 0 0 1em; text-align: justify; text-indent: 2em; }
.prose .noi, .prose .box p, .prose li p { text-indent: 0; }
.prose h2 { font-family: var(--sans); font-size: 1.42em; color: var(--navy); margin: 2.2em 0 .8em; padding-bottom: .35em; border-bottom: 2px solid var(--ochre); line-height: 1.4; }
.prose h3 { font-family: var(--sans); font-size: 1.12em; color: var(--ink); margin: 1.8em 0 .6em; }
.prose sup, .prose sub { font-size: .7em; line-height: 0; }
.qcall { font-family: var(--sans); font-size: .9em; background: var(--k-concept-bg); border-left: 4px solid var(--navy); padding: 12px 16px; margin: 0 0 1.4em; color: var(--ink-2); border-radius: 0 6px 6px 0; line-height: 1.8; }
.claim { font-family: var(--sans); font-size: .95em; border: 2px solid var(--navy); padding: 16px 20px; margin: 1.6em 0; border-radius: 6px; line-height: 1.85; }
.box { margin: 1.8em 0; background: var(--kb); border-left: 5px solid var(--k); border-radius: 0 8px 8px 0; padding: 4px 22px 8px; font-size: .94em; }
.box > header { display: flex; gap: 10px; align-items: baseline; padding: 14px 0 6px; font-family: var(--sans); font-weight: 700; font-size: 1.02em; color: var(--ink); line-height: 1.5; }
.box > header .tag { flex: none; }
.box p { margin: .5em 0 .8em; }
.case { font-family: var(--sans); margin: 2.2em 0 .8em; padding: 12px 18px; border-left: 5px solid var(--ochre); background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 1.05em; font-weight: 700; color: var(--navy); }
.prose .lp { text-indent: 0; }
.prose .lp b { font-family: var(--sans); color: var(--ochre); margin-right: .6em; font-size: .92em; }
.cap { font-family: var(--sans); font-weight: 700; font-size: .85em; color: var(--navy); margin: 1.8em 0 .5em; }
.tbl { overflow-x: auto; margin: 0 0 1.8em; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); }
.tbl table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 14.5px; line-height: 1.65; }
.tbl th { background: var(--navy); color: var(--sheet); text-align: left; padding: 9px 12px; font-weight: 700; white-space: nowrap; }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--rule-2); vertical-align: top; }
.tbl tr:nth-child(even) td { background: color-mix(in srgb, var(--paper) 55%, transparent); }
.tbl td:first-child { font-weight: 600; }
figure.fig { margin: 2em 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 10px; }
figure.fig button { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; }
figure.fig img { display: block; width: 100%; border-radius: 4px; }
figure.fig figcaption { font-family: var(--sans); font-size: 13.5px; color: var(--muted); padding: 8px 4px 2px; display: flex; justify-content: space-between; gap: 12px; }
figure.fig figcaption b { color: var(--navy); }
.math { overflow-x: auto; overflow-y: hidden; padding: .4em 0; margin: .6em 0 1em; text-align: center; font-size: 1.04em; }
.prose ol, .prose ul { padding-left: 1.6em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose .ref { font-family: var(--sans); font-size: 14px; line-height: 1.7; text-indent: -2em; padding-left: 2em; margin: 0 0 .55em; text-align: left; word-break: break-word; }
.mcq { font-family: var(--sans); font-size: .9em; }
.mcq > li { margin-bottom: 1em; }
.mcq .opts { list-style: none; padding: 0; margin: .4em 0 0; color: var(--ink-2); }
details.ans { font-family: var(--sans); font-size: .9em; border: 1px solid var(--rule); border-radius: 8px; padding: 10px 16px; background: var(--sheet); }
details.ans summary { cursor: pointer; font-weight: 700; color: var(--navy); }
details.ans ol { margin-top: 10px; }
.flash { animation: flash 2.2s ease-out 1; border-radius: 4px; }
@keyframes flash { 0%, 40% { background: var(--mark); box-shadow: 0 0 0 6px var(--mark); } 100% { background: transparent; box-shadow: none; } }
mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 2px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--rule); font-family: var(--sans); }
.pager a { display: block; max-width: 48%; text-decoration: none; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); }
.pager a span { display: block; font-size: 13px; color: var(--muted); }
.pager a.next { text-align: right; margin-left: auto; }
.mobbar { display: none; }

/* ---------- search ---------- */
.page { max-width: 1320px; margin: 0 auto; padding: 34px 20px 70px; }
.page-h h1 { font-family: var(--serif); color: var(--navy); font-size: 34px; margin: 0 0 6px; }
.page-h p { margin: 0; color: var(--muted); }
.sbar { display: flex; gap: 10px; margin: 24px 0 16px; }
.sbar input { flex: 1; height: 52px; border: 2px solid var(--navy); border-radius: 10px; padding: 0 18px; font-size: 18px; background: var(--sheet); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.s-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: start; }
.s-side { position: sticky; top: calc(var(--top) + 16px); background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; }
.s-side h2 { font-size: 14px; margin: 0 0 10px; color: var(--ink-2); }
.dist { display: grid; gap: 4px; }
.dist button { display: grid; grid-template-columns: 34px 1fr 36px; align-items: center; gap: 8px; border: 0; background: transparent; padding: 3px 4px; cursor: pointer; border-radius: 4px; text-align: left; font-size: 13px; }
.dist button:hover, .dist button[aria-pressed="true"] { background: var(--rule-2); }
.dist .bar { height: 10px; background: var(--rule-2); border-radius: 2px; overflow: hidden; }
.dist .bar i { display: block; height: 100%; background: var(--navy); }
.dist .c { font-family: var(--num); font-weight: 600; color: var(--navy); font-size: 15px; }
.dist .v { font-family: var(--num); text-align: right; color: var(--muted); font-size: 14px; }
.s-meta { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.results { list-style: none; margin: 0; padding: 0; }
.results li { border-bottom: 1px solid var(--rule); }
.results a { display: block; padding: 16px 4px; text-decoration: none; color: var(--ink); }
.results a:hover { background: var(--sheet); }
.r-top { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 4px; flex-wrap: wrap; }
.r-top .cn { font-family: var(--num); font-weight: 600; color: var(--navy); font-size: 15px; }
.r-txt { font-family: var(--serif); font-size: 16px; line-height: 1.8; }
.more { margin: 20px 0; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- analysis ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin: 26px 0 26px; overflow-x: auto; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--ink-2); white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--ochre); font-weight: 700; }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 22px; margin-bottom: 22px; }
.panel h2 { font-size: 19px; margin: 0 0 4px; }
.panel .lead { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-bottom: 22px; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); overflow: hidden; }
.kpis div { padding: 16px 18px; border-right: 1px solid var(--rule-2); }
.kpis b { display: block; font-family: var(--num); font-size: 34px; font-weight: 600; color: var(--navy); line-height: 1.1; }
.kpis span { font-size: 13px; color: var(--muted); }
.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; min-width: 640px; width: 100%; height: auto; }
.chart text { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
.chart .ax { stroke: var(--rule); }
.chart .lab { fill: var(--ink-2); font-size: 12.5px; }
.chart .cnum { font-family: var(--num); font-size: 15px; font-weight: 600; fill: var(--navy); }
.chart .hit { cursor: pointer; }
.chart .hit:hover rect.bg { fill: var(--rule-2); }
.leg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
.leg i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--k); }
.tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 13px; padding: 8px 10px; border-radius: 6px; max-width: 300px; line-height: 1.5; }
.heat { border-collapse: separate; border-spacing: 3px; font-size: 13px; }
.heat th { font-weight: 500; color: var(--muted); font-family: var(--num); font-size: 14px; }
.heat th.t { text-align: right; padding-right: 8px; color: var(--ink); font-family: var(--sans); font-size: 13.5px; white-space: nowrap; }
.heat td { width: 38px; height: 30px; text-align: center; border-radius: 4px; cursor: pointer; font-family: var(--num); font-size: 14px; }
.heat td:hover { outline: 2px solid var(--ochre); }
.heat-wrap { overflow-x: auto; }
.terms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.terms .chip button { border: 0; background: transparent; cursor: pointer; padding: 0; color: inherit; font-size: 16px; line-height: 1; }
.terms input { height: 34px; border: 1px solid var(--rule); border-radius: 17px; padding: 0 14px; background: var(--paper); width: 200px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.dtable th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 2px solid var(--rule); white-space: nowrap; }
.dtable td { padding: 10px; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
.dtable td.cn { font-family: var(--num); font-weight: 600; color: var(--navy); font-size: 16px; width: 54px; }
.dtable a { text-decoration: none; }
.dtable a:hover { text-decoration: underline; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input, .filters select { height: 38px; border: 1px solid var(--rule); border-radius: 8px; padding: 0 12px; background: var(--paper); }
.filters input { width: 260px; }
.tl { position: relative; margin-left: 76px; border-left: 2px solid var(--rule); }
.tl-era { position: relative; margin: 26px 0 8px -76px; font-family: var(--num); font-size: 22px; font-weight: 600; color: var(--ochre); }
.tl-item { position: relative; padding: 6px 0 12px 22px; }
.tl-item::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--navy); }
.tl-item .y { position: absolute; left: -76px; top: 5px; width: 62px; text-align: right; font-family: var(--num); font-weight: 600; font-size: 16px; color: var(--navy); }
.tl-item .ev { font-weight: 700; }
.tl-item .sg { color: var(--muted); font-size: 14px; }
.tl-item .src { font-size: 12.5px; }
.figgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.figgrid a { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.figgrid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center top; background: var(--sheet); }
.figgrid .fc { padding: 10px 12px 12px; font-size: 13.5px; line-height: 1.55; }
.figgrid .fc b { color: var(--navy); font-family: var(--num); font-size: 15px; margin-right: 6px; }
.figgrid .fc span { display: block; color: var(--muted); margin-top: 3px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* ---------- quiz ---------- */
.qz { max-width: 820px; }
.qz-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 22px 0; }
.qz-top select { height: 42px; border: 1px solid var(--rule); border-radius: 8px; padding: 0 10px; background: var(--sheet); max-width: 100%; }
.qz-score { margin-left: auto; font-family: var(--num); font-size: 20px; color: var(--navy); font-weight: 600; }
.qcard { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 20px 22px; margin-bottom: 16px; }
.qcard .qn { font-family: var(--num); font-size: 20px; color: var(--ochre); font-weight: 600; }
.qcard .qt { font-size: 17px; margin: 4px 0 14px; line-height: 1.75; }
.qcard .ops { display: grid; gap: 8px; }
.qcard .ops button { text-align: left; border: 1px solid var(--rule); background: var(--paper); border-radius: 8px; padding: 10px 14px; cursor: pointer; display: grid; grid-template-columns: 30px 1fr; line-height: 1.6; }
.qcard .ops button b { font-family: var(--num); font-size: 17px; color: var(--navy); }
.qcard .ops button:hover:not([disabled]) { border-color: var(--navy); }
.qcard .ops button[disabled] { cursor: default; }
.qcard .ops button.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--sheet)); }
.qcard .ops button.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--sheet)); }
.qcard .exp { margin-top: 14px; padding: 12px 14px; border-left: 4px solid var(--ok); background: var(--paper); font-size: 15px; line-height: 1.75; }
.qcard .exp.no { border-left-color: var(--bad); }

/* ---------- about ---------- */
.about { max-width: 860px; }
.about .prose h2:first-child { margin-top: .4em; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(10, 16, 24, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1500px, 100%); max-height: calc(100vh - 110px); background: #fff; border-radius: 4px; }
.lb-cap { color: #E2E8EE; margin: 12px 0 0; font-size: 14px; text-align: center; }
.lb-close { position: absolute; top: 12px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .reader { grid-template-columns: 250px minmax(0, 1fr); }
  .rail { display: none; }
}
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 30px; padding-top: 36px; }
  .part, .band-in { grid-template-columns: 1fr; gap: 16px; }
  .s-grid { grid-template-columns: 1fr; }
  .s-side { position: static; order: 2; }
  .two { grid-template-columns: 1fr; }
  .qbox { width: 220px; }
}
@media (max-width: 820px) {
  :root { --top: 56px; --read-size: 17px; }
  .topbar-in { gap: 10px; padding: 0 12px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--sheet); border-top: 1px solid var(--rule); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 40; }
  .nav a { padding: 6px 8px; font-size: 14px; }
  .nav a.on { box-shadow: inset 0 3px 0 var(--ochre); }
  body { padding-bottom: 60px; }
  .qbox { width: auto; flex: 1; margin-left: 0; }
  .brand-t { display: none; }
  .reader { grid-template-columns: 1fr; padding: 0 16px; gap: 0; }
  .toc { position: fixed; top: var(--top); left: 0; bottom: 0; width: min(320px, 86vw); background: var(--paper); z-index: 35; padding: 16px; border-right: 1px solid var(--rule); transform: translateX(-102%); transition: transform .2s; max-height: none; }
  .toc.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .mobbar { display: flex; position: sticky; top: calc(var(--top) + 3px); z-index: 6; background: var(--paper); padding: 8px 0; gap: 8px; align-items: center; border-bottom: 1px solid var(--rule); font-size: 14px; }
  .mobbar button { flex: none; white-space: nowrap; border: 1px solid var(--rule); background: var(--sheet); border-radius: 8px; height: 34px; padding: 0 12px; }
  .mobbar span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
  .ch-head .big { font-size: 72px; }
  .prose p { text-align: left; }
  .box { padding: 2px 14px 6px; margin-left: -4px; margin-right: -4px; }
  .page { padding: 24px 16px 60px; }
  .wrap { padding: 0 16px; }
  .ch-list { grid-template-columns: 1fr; }
  .tl { margin-left: 58px; }
  .tl-item .y { left: -62px; width: 50px; font-size: 14px; }
  .tl-era { margin-left: -58px; }
  .filters input { width: 100%; }
  .pager a { max-width: 100%; }
  .pager { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .toc, .rail, .pager, .mobbar, .progress { display: none !important; }
  .reader { display: block; }
  body { background: #fff; }
}
