:root {
  color-scheme: light;
  --ink: #17232f;
  --muted: #66727d;
  --paper: #fffdf8;
  --ground: #e8e2d6;
  --navy: #071c2c;
  --teal: #0d7882;
  --gold: #b98532;
  --pale: #f4efe5;
  --rule: #d8cfbf;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 17px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Charter, Georgia, "Times New Roman", serif;
  line-height: 1.68;
}
body > * { max-width: 960px; margin-left: auto; margin-right: auto; }
body { padding: 2.4rem max(1rem, calc((100vw - 960px) / 2)); }
h1, h2, h3, h4, #TOC {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}
h1 { font-size: clamp(2.5rem, 7vw, 5.4rem); line-height: .96; letter-spacing: -.055em; color: var(--navy); margin: .5rem 0 1rem; }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.15; margin-top: 3.5rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); color: var(--navy); }
h3 { font-size: 1.18rem; margin-top: 2.25rem; color: var(--teal); }
p, li { max-width: 78ch; }
a { color: var(--teal); text-decoration-thickness: .08em; text-underline-offset: .16em; }
strong { color: #102b3d; }
img { width: 100%; height: auto; display: block; margin: 1.8rem auto .8rem; border-radius: 12px; box-shadow: 0 15px 40px rgba(7,28,44,.16); }
img + em, img + p > em { color: var(--muted); }
blockquote { margin: 1.7rem 0; padding: .85rem 1.2rem; border-left: 5px solid var(--gold); background: var(--pale); }
table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .89rem; }
th, td { padding: .7rem .6rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
th { background: var(--navy); color: white; }
tr:nth-child(even) td { background: rgba(244,239,229,.72); }
#TOC { background: var(--navy); color: white; padding: 1rem 1.4rem; border-radius: 12px; margin: 1.5rem auto 2rem; }
#TOC a { color: #d7f2ef; }
#TOC ul { padding-left: 1.2rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
ol li, ul li { margin-bottom: .3rem; }
body > p:last-child { color: var(--muted); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .88rem; }
@media (max-width: 700px) {
  html { font-size: 16px; }
  body { padding: 1rem .85rem 2.5rem; }
  h1 { margin-top: .25rem; }
  img { border-radius: 7px; margin-top: 1.2rem; }
  table { display: block; overflow-x: auto; }
  #TOC { padding: .8rem 1rem; }
}
@media print {
  body { background: white; padding: 0; }
  #TOC { background: white; color: var(--ink); border: 1px solid var(--rule); }
  #TOC a, a { color: inherit; }
  img { box-shadow: none; break-inside: avoid; }
  h2, h3, table, blockquote { break-inside: avoid; }
}
