@charset "UTF-8";
/* Topic-led long-form Depth, retaining the accepted dark/gold visual foundation. */
:root {
  color-scheme: dark;
  --bg: #02040a;
  --panel: #080c14;
  --ink: #eeeae2;
  --muted: #a1a8b5;
  --line: #252c38;
  --gold: #c7a66b;
  --curve: #70e0c2;
  --tangent: #f0c15a;
  --rule: #8fbaff;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.9 system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
a { color: var(--gold); text-underline-offset: 5px; }
button, input, select { font: inherit; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; }
button, select { color: var(--ink); background: var(--panel); border: 1px solid var(--line); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.skip { position: absolute; left: 20px; top: -100px; padding: 12px; background: var(--ink); color: var(--bg); z-index: 10; }
.skip:focus { top: 6px; }
.site-header { min-height: 56px; border-bottom: 1px solid var(--line); padding-inline: max(20px, calc((100vw - 1040px)/2)); display: flex; align-items: center; gap: 16px; }
.site-header a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 16px; letter-spacing: .035em; font-weight: 650; }
.site-header span { font-size: 12px; letter-spacing: .1em; color: var(--muted); }
main, .page-footer { width: min(1040px, calc(100% - 40px)); margin-inline: auto; }
.hero { padding: 44px 0 28px; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .08em; margin: 0 0 16px; }
h1 { font-size: clamp(42px, 5.5vw, 70px); font-weight: 650; line-height: 1.2; letter-spacing: -.025em; margin: 0; overflow-wrap: anywhere; }
.english { display: block; font-size: 20px; line-height: 1.6; letter-spacing: .01em; color: var(--muted); font-weight: 400; margin-top: 10px; }
.phrase { white-space: nowrap; }
.lead { font-size: clamp(19px, 2.4vw, 25px); line-height: 1.7; max-width: 780px; margin: 22px 0 10px; }
.intro { color: var(--muted); max-width: 740px; margin: 0; }
.series-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 32px; }
.series-nav a { display: flex; gap: 12px; align-items: center; min-height: 62px; padding: 12px 15px; color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.55; border-bottom: 2px solid transparent; }
.series-nav a:hover { background: var(--panel); }
.series-nav a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--gold); }
.series-nav small { font-size: 11px; color: var(--muted); }
.instrument { border: 1px solid var(--line); background: var(--panel); margin-bottom: 44px; }
.instrument-head { padding: 20px 24px 10px; }
.instrument-head h2 { margin: 0 0 5px; font-size: 19px; line-height: 1.5; }
.instrument-head p { font-size: 14px; color: var(--muted); margin: 0; }
.legend { display: flex; gap: 10px 22px; flex-wrap: wrap; font-size: 12px; line-height: 1.5; margin: 14px 0 0; }
.legend span::before { content: ''; display: inline-block; width: 17px; height: 2px; background: currentColor; vertical-align: middle; margin-right: 7px; }
.curve-text { color: var(--curve); }
.tangent-text { color: var(--tangent); }
.rule-text { color: var(--rule); }
.plot { margin: 0; }
canvas { width: 100%; height: 340px; display: block; touch-action: pan-y; }
figcaption { color: var(--muted); font-size: 12px; padding: 6px 24px 16px; line-height: 1.7; }
.controls { border-top: 1px solid var(--line); padding: 20px 24px; display: grid; gap: 18px; }
.control-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.control-row button { min-height: 44px; padding: 6px 16px; font-size: 15px; border-radius: 3px; }
.control-row button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); background: #171610; }
.control-row .primary { color: var(--bg); background: var(--gold); border-color: var(--gold); font-weight: 600; }
.controls label { font-size: 14px; }
.slider { display: grid; grid-template-columns: minmax(130px, 180px) 1fr; align-items: center; gap: 20px; }
.slider output { color: var(--gold); font-variant-numeric: tabular-nums; margin-left: 8px; }
input[type="range"] { width: 100%; min-width: 0; height: 44px; margin: 0; accent-color: var(--gold); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold); margin: 0; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
select { min-height: 44px; border-radius: 3px; padding: 6px 12px; max-width: 100%; }
.readout { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); padding: 16px 24px; gap: 12px; }
.readout span { display: block; color: var(--muted); font-size: 12px; }
.readout output { font-size: 22px; line-height: 1.7; font-variant-numeric: tabular-nums; }
.observation { padding: 14px 24px 18px; margin: 0; font-size: 14px; border-top: 1px solid var(--line); }
.fallback { padding: 20px 24px; border-left: 2px solid var(--gold); }
.instrument:has(noscript .fallback) .js-only { display: none; }
.reading-layout { display: grid; grid-template-columns: 190px minmax(0, 740px); justify-content: space-between; gap: 48px; align-items: start; }
.contents { position: sticky; top: 24px; font-size: 13px; }
.contents p { color: var(--muted); margin: 0 0 10px; font-size: 12px; }
.contents a { display: block; padding: 10px 0; min-height: 44px; line-height: 1.6; color: var(--muted); text-decoration: none; }
.contents a:hover { color: var(--gold); }
.article { min-width: 0; }
.article section { padding: 0 0 40px; margin: 0 0 36px; border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(23px, 3vw, 29px); line-height: 1.5; font-weight: 550; margin: 0 0 20px; }
h3 { font-size: 19px; font-weight: 600; margin: 28px 0 12px; line-height: 1.6; }
p { margin: 0 0 18px; }
strong { font-weight: 650; }
.kicker { font-size: 12px; color: var(--gold); margin-bottom: 10px; letter-spacing: .06em; }
.article li { margin-bottom: 10px; }
.article ul, .article ol { padding-left: 24px; }
.equation { background: var(--panel); border-left: 2px solid var(--gold); padding: 18px 22px; margin: 22px 0; font-size: clamp(20px, 3vw, 27px); line-height: 1.7; overflow-wrap: anywhere; }
.equation small { display: block; font: 13px/1.8 system-ui, "Microsoft JhengHei", sans-serif; color: var(--muted); margin-top: 8px; }
.math { font-family: "Cambria Math", Cambria, Georgia, serif; letter-spacing: .015em; }
sup, sub { font-size: .72em; line-height: 0; }
.steps { padding: 0; list-style: none; counter-reset: derivation; }
.steps>li { position: relative; padding: 0 0 18px 42px; margin: 0 0 20px; border-bottom: 1px solid #1b202b; counter-increment: derivation; }
.steps>li::before { content: counter(derivation, decimal-leading-zero); position: absolute; left: 0; top: 1px; color: var(--gold); font-size: 12px; }
.steps p { margin-bottom: 8px; }
.steps .math { display: block; font-size: 23px; line-height: 1.9; overflow-wrap: anywhere; }
.note { border-left: 2px solid var(--rule); padding: 8px 0 8px 20px; margin: 24px 0; }
.note p:last-child { margin-bottom: 0; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-block: 24px; }
.comparison>div { border-top: 1px solid var(--gold); padding-top: 12px; }
.comparison h3 { margin: 0 0 10px; }
.comparison p { font-size: 16px; }
.table-wrap { overflow-x: auto; margin: 22px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-weight: 500; color: var(--muted); }
.numeric td { font-variant-numeric: tabular-nums; }
details { border-bottom: 1px solid var(--line); }
summary { padding: 16px 0; min-height: 52px; cursor: pointer; font-size: 16px; }
summary::marker { color: var(--gold); }
.detail-body { padding: 0 0 18px; font-size: 16px; }
.detail-body>:last-child { margin-bottom: 0; }
.practice { margin-top: 24px; }
.practice h3 { margin-top: 0; }
.practice details { margin-bottom: 26px; }
.source-list { font-size: 14px; overflow-wrap: anywhere; color: var(--muted); }
.next-page { border-top: 1px solid var(--line); padding-block: 28px 36px; display: flex; justify-content: space-between; gap: 24px; }
.next-page a { display: block; min-height: 60px; text-decoration: none; line-height: 1.8; }
.next-page small { display: block; font-size: 12px; color: var(--muted); }
.page-footer { padding: 24px 0 44px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: var(--muted); }
.page-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media(max-width: 820px) {
  body { font-size: 16px; line-height: 1.9; }
  .hero { padding-top: 30px; }
  h1 { font-size: 44px; }
  .english { font-size: 17px; }
  .lead { font-size: 20px; }
  .series-nav { margin-bottom: 24px; }
  .series-nav a { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 9px; font-size: 12px; }
  .reading-layout { display: block; }
  .contents { position: static; border-bottom: 1px solid var(--line); margin-bottom: 32px; padding-bottom: 20px; }
  .contents div { display: flex; flex-wrap: wrap; gap: 0 20px; }
  .contents a { font-size: 13px; }
  .instrument-head, .controls { padding: 16px; }
  .instrument-head h2 { font-size: 17px; }
  canvas { height: 300px; }
  figcaption { padding-inline: 16px; }
  .legend { gap: 10px 14px; font-size: 11px; }
  .slider { grid-template-columns: 1fr; gap: 0; }
  .readout { padding: 14px 16px; gap: 8px; }
  .readout output { font-size: 19px; }
  .readout span { font-size: 11px; }
  .observation { padding: 14px 16px; }
  .comparison { grid-template-columns: 1fr; gap: 14px; }
  .equation { padding: 16px; }
  .steps>li { padding-left: 32px; }
  .steps .math { font-size: 21px; }
  .next-page { flex-wrap: wrap; }
  .page-footer { display: block; }
}
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: white; color: black; }
  .site-header, .series-nav, .instrument, .contents, .next-page, .page-footer { display: none; }
  main { width: 100%; }
  .reading-layout { display: block; }
  .equation { background: #f5f5f5; }
}
