:root {
  --paper: #f3f0e8;
  --paper-2: #fffdf8;
  --ink: #142430;
  --panel: #173843;
  --teal: #0f766e;
  --copper: #b85c38;
  --marker: #b7d36b;
  --rule: rgba(20, 36, 48, .18);
  --muted: #526169;
  --max: 76rem;
  --measure: 47rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}
body[data-menu-open] { overflow: hidden; }
a { color: #086a65; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: #7b351f; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--copper); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 100; padding: .75rem 1rem; background: var(--paper-2); color: var(--ink); border: 2px solid var(--ink); }
.skip-link:focus { top: 1rem; }
.utility-bar { background: var(--ink); color: #fff; font-size: .78rem; letter-spacing: .035em; }
.utility-bar__inner, .site-header__inner, .footer__inner { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }
.utility-bar__inner { min-height: 2.35rem; display: flex; align-items: center; gap: .75rem 1.25rem; flex-wrap: wrap; }
.utility-bar__inner span:first-child { color: var(--ink); background: var(--marker); font-weight: 800; padding: .05rem .38rem; }
.site-header { background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px); }
.site-header__inner { min-height: 5.1rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; font: 700 1.2rem/1.05 Georgia, serif; letter-spacing: -.02em; }
.brand__mark { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; background: var(--panel); color: var(--marker); border-radius: 5px; font-family: Consolas, monospace; font-size: .86rem; }
.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.nav__list a { display: block; padding: .65rem .7rem; color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 650; }
.nav__list a[aria-current="page"] { background: #dfe9df; box-shadow: inset 0 -3px var(--teal); }
.menu-button { display: none; margin-left: auto; min-width: 3rem; min-height: 3rem; background: transparent; color: var(--ink); border: 1px solid var(--ink); font-weight: 750; }
.page-shell { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }
.breadcrumbs { padding: 1rem 0 .4rem; font-size: .82rem; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: .35rem; color: #899399; }
.hero { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(19rem, .97fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem); border-bottom: 1px solid var(--rule); }
.hero--text { grid-template-columns: minmax(0, var(--measure)); }
.eyebrow { margin: 0 0 1rem; color: var(--teal); font: 750 .78rem/1.3 Consolas, monospace; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.09; letter-spacing: -.025em; text-wrap: balance; }
h1 { margin: 0; max-width: 17ch; font-size: clamp(2.45rem, 6vw, 5.7rem); }
.article-page h1 { font-size: clamp(2.35rem, 5vw, 4.8rem); }
.lead { max-width: 44rem; margin: 1.35rem 0 0; font-size: clamp(1.08rem, 2vw, 1.3rem); line-height: 1.55; color: #33454f; }
.meta-strip { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; }
.meta-strip span { border: 1px solid var(--rule); background: var(--paper-2); padding: .32rem .55rem; font: 650 .73rem/1.3 Consolas, monospace; }
.figure-card { margin: 0; background: var(--panel); padding: .65rem; border-radius: 7px; box-shadow: 1.1rem 1.1rem 0 rgba(15, 118, 110, .14); }
.figure-card img { width: 100%; border-radius: 3px; }
.figure-card figcaption { padding: .65rem .35rem .15rem; color: #dce7e3; font-size: .76rem; line-height: 1.45; }
.diagnostic { margin: 2rem 0 0; }
.diagnostic__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.diagnostic a { min-height: 8.8rem; display: flex; flex-direction: column; justify-content: space-between; padding: 1rem; background: var(--paper-2); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.diagnostic a:hover { border-color: var(--teal); transform: translateY(-2px); }
.diagnostic strong { font-family: Georgia, serif; font-size: 1.12rem; }
.diagnostic small { color: var(--muted); }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(12rem, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; padding: clamp(2.5rem, 6vw, 5rem) 0 5rem; }
.article-body { min-width: 0; }
.article-body > :first-child { margin-top: 0; }
.article-body h2 { margin: 3.6rem 0 1rem; font-size: clamp(1.75rem, 3vw, 2.55rem); }
.article-body h3 { margin: 2.3rem 0 .6rem; font-size: clamp(1.25rem, 2vw, 1.65rem); }
.article-body p, .article-body ul, .article-body ol { max-width: var(--measure); }
.article-body li + li { margin-top: .45rem; }
.article-body blockquote { margin: 2rem 0; padding: 1.2rem 1.35rem; background: #e0ebe5; border-left: .38rem solid var(--teal); font-family: Georgia, serif; font-size: 1.05rem; }
.article-body blockquote p { margin: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.5rem 0 2.2rem; border: 1px solid var(--rule); background: var(--paper-2); }
table { width: 100%; min-width: 42rem; border-collapse: collapse; font-size: .9rem; line-height: 1.45; }
th, td { padding: .78rem .82rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); }
th { background: var(--panel); color: #fff; font-weight: 750; }
tbody tr:nth-child(even) { background: #f1f5f0; }
.supporting-figure { margin: 3.2rem 0; padding: .75rem; background: #e6e2d8; border: 1px solid var(--rule); }
.supporting-figure img { width: 100%; }
.supporting-figure figcaption { padding: .6rem .2rem 0; color: var(--muted); font-size: .8rem; }
.article-aside { position: sticky; top: 7.2rem; border-top: 4px solid var(--copper); background: var(--paper-2); padding: 1rem; font-size: .86rem; }
.article-aside h2 { margin: 0 0 .6rem; font: 700 1rem/1.25 Georgia, serif; }
.article-aside ul { margin: .6rem 0 0; padding-left: 1.1rem; }
.article-aside .status { color: #4f2e22; font-family: Consolas, monospace; font-size: .74rem; }
.trust-band { border-block: 1px solid var(--rule); background: #dfe9df; }
.trust-band__inner { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: 1.3rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; font-size: .82rem; }
.trust-band strong { display: block; font: 700 .94rem/1.2 Georgia, serif; margin-bottom: .15rem; }
.site-footer { background: var(--ink); color: #d9e1e3; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 3.5rem 0; }
.site-footer h2 { color: #fff; margin: 0 0 .8rem; font-size: 1.08rem; }
.site-footer p { max-width: 38rem; font-size: .88rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: .45rem; }
.site-footer a { color: #d8efe9; }
.not-found { min-height: 62vh; display: grid; align-content: center; max-width: 45rem; padding-block: 4rem; }
.not-found h1 { font-size: clamp(4rem, 15vw, 9rem); }

@media (max-width: 980px) {
  .menu-button { display: inline-block; }
  .nav { display: none; position: fixed; inset: 7.45rem 0 0; background: var(--paper-2); padding: 1rem; overflow: auto; }
  .nav[data-open] { display: block; }
  .nav__list { display: block; }
  .nav__list a { min-height: 3.3rem; display: flex; align-items: center; border-bottom: 1px solid var(--rule); font-size: 1.08rem; }
  .hero { grid-template-columns: 1fr; }
  .figure-card { max-width: 50rem; }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}

@media (max-width: 760px) {
  .utility-bar__inner span:last-child { display: none; }
  .site-header__inner { min-height: 4.45rem; }
  .nav { inset-block-start: 6.8rem; }
  h1 { font-size: clamp(2.3rem, 12vw, 3.9rem); }
  .diagnostic__grid, .trust-band__inner, .footer__inner { grid-template-columns: 1fr; }
  .diagnostic a { min-height: 6.6rem; }
  .article-layout { padding-top: 2rem; }
  .article-body h2 { margin-top: 3rem; }
}

@media (max-width: 420px) {
  .utility-bar__inner, .site-header__inner, .footer__inner, .page-shell, .trust-band__inner { width: min(calc(100% - 1.25rem), var(--max)); }
  .brand__mark { width: 2rem; height: 2rem; }
  .figure-card { box-shadow: .55rem .55rem 0 rgba(15, 118, 110, .14); }
  .hero { padding-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
