:root { color-scheme: dark; --bg: #0c151b; --ink: #edf1ed; --muted: #b1beb9; --accent: #9dbdad; --rule: #34434a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', sans-serif; font-size: 17px; line-height: 1.75; }
a { color: var(--accent); text-underline-offset: 4px; overflow-wrap: anywhere; }
a:hover { color: #c6dfd3; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 12px; background: var(--bg); z-index: 5; }
.skip-link:focus { top: 12px; }
.topbar, main, footer { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--rule); padding: 22px 0; }
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; font-weight: 650; }
.brand span { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 24px; }
.top-actions a, .top-actions button { display: inline-flex; align-items: center; min-height: 44px; }
#langBtn { color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; background: transparent; padding: 4px 14px; cursor: pointer; }
.language-note { color: var(--muted); font-size: 14px; }
.reading-header { max-width: 970px; padding: 52px 0 38px; }
.eyebrow { color: var(--accent); font: 12px/1.6 Consolas, monospace; text-transform: uppercase; letter-spacing: .1em; }
h1 { font-family: Georgia, 'Microsoft JhengHei', serif; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.2; letter-spacing: -.025em; margin: 18px 0 24px; overflow-wrap: anywhere; }
.source-link { font-size: 14px; display: inline-flex; align-items: center; min-height: 44px; }
.reading-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 54px; align-items: start; }
.contents { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding: 8px 8px 16px 0; }
.contents summary { cursor: pointer; min-height: 44px; padding-top: 12px; }
.contents ol { list-style: none; padding: 0; margin: 12px 0; }
.contents a { display: block; padding: 8px 2px; font-size: 14px; line-height: 1.5; color: var(--muted); text-decoration: none; }
.contents a:hover { color: var(--accent); }
article { min-width: 0; }
.provenance { border-left: 2px solid var(--accent); padding: 4px 20px; background: #152329; font-size: 14px; color: var(--muted); margin-block: 40px; }
.provenance a { display: inline-block; white-space: nowrap; }
blockquote { margin: 10px 0; }
blockquote p { margin: 10px 0; }
.source-body > h2 { border-top: 1px solid var(--rule); padding-top: 32px; margin-top: 44px; font-size: 1.65rem; line-height: 1.3; letter-spacing: -.025em; }
.source-body > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
h3 { margin-top: 30px; font-size: 1.15rem; line-height: 1.5; }
p { margin: 16px 0; }
li { margin-block: 10px; }
ul, ol { padding-left: 24px; }
strong { color: var(--ink); }
code { font-family: Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }
pre { overflow-x: auto; padding: 16px; background: #152329; }
.table-evidence { margin: 24px 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 4px; }
.table-evidence::before { content: attr(data-scroll-hint); display: block; padding: 10px 0; color: var(--muted); font-size: 13px; }
table { border-collapse: collapse; width: 100%; min-width: 780px; font-size: 14px; line-height: 1.7; }
th, td { min-width: 145px; padding: 18px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { color: var(--accent); background: #152329; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #101d24; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; padding: 32px 0 44px; margin-top: 64px; border-top: 1px solid var(--rule); }
footer a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 900px) {
  .topbar, main, footer { width: calc(100% - 40px); }
  .reading-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .contents { position: static; max-height: none; border-block: 1px solid var(--rule); }
  .contents ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .contents a { min-height: 44px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .topbar { gap: 10px; padding-block: 16px; }
  .brand { font-size: 14px; gap: 6px; }
  .top-actions { gap: 12px; font-size: 13px; }
  .language-note { font-size: 12px; }
  .reading-header { padding-block: 32px 24px; }
  .contents ol { grid-template-columns: 1fr; }
  .provenance { padding-inline: 14px; }
}
@media print {
  :root { color-scheme: light; --bg: white; --ink: black; --muted: #333; --accent: #713000; --rule: #aaa; }
  .topbar, .contents, footer, .skip-link { display: none; }
  main { width: 100%; }
  .reading-layout { display: block; }
  .provenance, th, tbody tr:nth-child(even) { background: white; }
  strong { color: black; }
  table { min-width: 0; font-size: 9px; }
  th, td { min-width: 0; padding: 6px; }
}
