:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #5d6874;
  --rule: #d9e0e5;
  --accent: #24546d;
  --soft: #f4f7f8;
  font-family: Aptos, "Aptos Display", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.25rem; }
body { margin: 0; min-width: 320px; background: #fff; font-size: 1rem; line-height: 1.72; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: #13384b; }
a:focus-visible, summary:focus-visible { outline: 2px solid #5688a0; outline-offset: 3px; }

.skip-link { position: absolute; top: -4rem; left: 1rem; z-index: 5; padding: .65rem .9rem; background: #fff; }
.skip-link:focus { top: 1rem; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: min(1200px, calc(100% - 3rem)); margin: 0 auto; padding: 1.45rem 0; border-bottom: 1px solid var(--rule); }
.back-link { font-size: .95rem; font-weight: 600; text-decoration: none; }
.back-link span { margin-right: .4rem; }
.site-name { color: var(--ink); font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-decoration: none; }

.page-layout { display: grid; grid-template-columns: minmax(210px, 245px) minmax(0, 820px); align-items: start; gap: clamp(2rem, 5vw, 5.25rem); width: min(1200px, calc(100% - 3rem)); margin: 2.25rem auto 6rem; }
.contents { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }
.contents summary { display: flex; justify-content: space-between; gap: .8rem; padding: .9rem 1rem; color: var(--ink); font-size: .9rem; font-weight: 700; cursor: pointer; list-style: none; }
.contents summary::-webkit-details-marker { display: none; }
.contents summary::after { content: "+"; color: var(--muted); font-size: 1.15rem; line-height: 1; }
.contents[open] summary::after { content: "−"; }
.contents summary span { margin-left: auto; color: var(--muted); font-size: .75rem; font-weight: 500; }
.contents nav { padding: 0 .9rem .85rem; }
.contents ol { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.contents a { display: block; padding: .35rem .15rem; font-size: .82rem; line-height: 1.45; text-decoration: none; }
.contents a:hover { text-decoration: underline; }

.module-article { min-width: 0; max-width: 820px; }
.module-kicker { margin: 0 0 .65rem; color: var(--accent); font-size: .76rem; font-weight: 700; letter-spacing: .16em; }
.module-kicker span { padding: 0 .45rem; color: #8c969e; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 790px; margin-bottom: .65rem; font-size: clamp(2.1rem, 4.5vw, 3.35rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.12; }
.revised-date { margin: .15rem 0 3.2rem; color: var(--muted); font-size: .82rem; }
.module-article h2 { margin: 3rem 0 1rem; padding-top: .35rem; color: #183b51; font-size: clamp(1.55rem, 2.8vw, 2.05rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.25; scroll-margin-top: 1rem; }
.module-article h2:first-of-type { margin-top: 0; }
.module-article h3 { margin: 2rem 0 .55rem; color: #203d50; font-size: clamp(1.18rem, 2vw, 1.4rem); font-weight: 650; line-height: 1.35; }
.module-article p { margin: 0 0 1.15rem; max-width: 78ch; white-space: pre-wrap; }
.module-article p.source-web-paragraph { line-height: 1.78; }
.module-article .source-caption { margin: -.4rem 0 1.55rem; color: var(--muted); font-size: .9rem; }
.module-article .source-list { margin: .2rem 0 1.5rem; padding-left: 1.45rem; }
.module-article .source-list li { margin: 0 0 .65rem; padding-left: .2rem; }
.key-interpretation { margin: 1.5rem 0 2rem; padding: 1rem 1.2rem 1rem 1.35rem; border-left: 3px solid #6291a6; background: var(--soft); }
.key-interpretation > strong { display: block; margin-bottom: .25rem; color: var(--accent); font-size: .77rem; letter-spacing: .1em; }
.key-interpretation p { margin: 0; }

.module-figure { margin: 2rem 0 2.25rem; text-align: center; }
.module-figure img { display: block; width: 100%; height: auto; max-height: 760px; margin: 0 auto; object-fit: contain; border-radius: 3px; }
.module-figure figcaption { margin: .75rem auto 0; max-width: 78ch; color: #46525e; font-size: .91rem; line-height: 1.55; text-align: left; }
.module-figure figcaption::first-letter { font-weight: 700; }
.table-scroll { max-width: 100%; margin: 1.5rem 0 2rem; overflow-x: auto; border: 1px solid var(--rule); border-radius: 6px; }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.55; }
.table-scroll th, .table-scroll td { min-width: 130px; padding: .75rem .85rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.table-scroll th { background: #f1f5f7; color: #203d50; font-weight: 700; }
.table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll th:last-child, .table-scroll td:last-child { border-right: 0; }
#references { scroll-margin-top: 1rem; }
.back-to-top { display: inline-block; margin-top: 2.5rem; padding-top: .75rem; border-top: 1px solid var(--rule); font-size: .9rem; text-decoration: none; }

@media (max-width: 800px) {
  .site-header, .page-layout { width: min(100% - 2rem, 720px); }
  .page-layout { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; margin-top: 1.5rem; }
  .contents { position: static; max-height: none; }
  .module-article { width: 100%; }
  .revised-date { margin-bottom: 2.25rem; }
  .module-article h2 { margin-top: 2.5rem; }
}

@media (max-width: 520px) {
  body { font-size: .98rem; line-height: 1.68; }
  .site-header { width: calc(100% - 2rem); padding: 1rem 0; }
  .back-link { font-size: .85rem; }
  .site-name { max-width: 10rem; font-size: .65rem; letter-spacing: .11em; text-align: right; }
  .page-layout { width: calc(100% - 2rem); margin-top: 1.25rem; }
  h1 { font-size: clamp(1.9rem, 9vw, 2.5rem); }
  .module-article h2 { font-size: 1.55rem; }
  .module-article h3 { font-size: 1.18rem; }
  .module-figure { margin: 1.5rem 0 1.8rem; }
  .module-figure figcaption { font-size: .85rem; }
  .key-interpretation { padding: .85rem .9rem .9rem 1rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
