:root {
  --navy: #0e1621;
  --teal: #00c8aa;
  --paper: #f8f8f3;
  --ink: #18222b;
  --muted: #47545c;
  --green: #075e50;
  --line: #d4ded7;
  --soft: #e9f0ea;
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; line-height: 1.6; }
a { color: var(--green); text-underline-offset: .19em; overflow-wrap: anywhere; }
a:focus-visible, summary:focus-visible { outline: 3px solid #bb6400; outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.wrap { width: min(1160px, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; inset: .75rem auto auto .75rem; z-index: 3; padding: .75rem; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }
.masthead { background: var(--navy); color: white; border-bottom: 1px solid #ffffff26; }
.masthead-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .45rem; flex: 0 0 auto; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -.045em; }
.brand img { display: block; border-radius: .45rem; }
.masthead .brand b { color: var(--teal); }
.masthead nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .2rem clamp(.75rem, 3vw, 2rem); }
.masthead nav a { color: #e8f3f4; font-size: .92rem; font-weight: 600; text-decoration: none; padding-block: .4rem; }
.masthead nav a:hover { text-decoration: underline; }
.hero { background: var(--navy); color: #f4f8f8; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1rem, 5vw, 5rem); align-items: center; padding-block: clamp(3.5rem, 8vw, 7rem); }
.hero h1 { font-size: clamp(3rem, 6.2vw, 6.1rem); line-height: .99; font-weight: 780; letter-spacing: -.07em; }
.hero h1 em { color: var(--teal); font-weight: 650; font-style: normal; }
.hero-copy p { color: #cbdadf; font-size: clamp(1.05rem, 2vw, 1.23rem); max-width: 39ch; margin-block: 1.45rem 1.85rem; }
.button { display: inline-flex; gap: 1.25rem; align-items: center; background: var(--teal); color: var(--navy); padding: .75rem 1.1rem; border-radius: .4rem; text-decoration: none; font-weight: 750; }
.button:hover { background: #7be7d6; }
.chain { margin: 0; align-self: center; padding: clamp(1rem, 3vw, 2rem); border: 1px solid #344c51; border-radius: .9rem; background-color: #13242c; background-image: radial-gradient(#405457 1px, transparent 1px); background-size: 16px 16px; }
.chain figcaption { font-weight: 720; margin-bottom: 1.75rem; }
.chain p { color: #d0e4e4; font-size: .9rem; margin-top: 1.5rem; }
.chain-track { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .3rem; }
.block { display: grid; align-content: center; min-height: 91px; padding: .45rem; text-align: center; border: 1px solid #5db2a0; border-radius: .4rem; background: #183632; }
.block span { font-weight: 740; }
.block small { color: #b1dbd3; line-height: 1.25; margin-top: .35rem; }
.connector { color: var(--teal); font-size: 1.2rem; }
.guides, .context { padding-block: clamp(2.6rem, 6vw, 5rem); }
.library { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(1.35rem, 5vw, 4.5rem); margin-top: 1.6rem; }
.featured { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: .85rem; overflow: hidden; background: white; color: var(--ink); text-decoration: none; }
.featured-symbol { display: grid; place-items: center; min-height: 8rem; flex: 1; background: radial-gradient(ellipse at 50% 30%, #20524d, #11252d 78%); color: var(--teal); font-size: 5.2rem; }
.featured-copy { padding: 1.35rem; }
.featured h3 { font-size: clamp(1.55rem, 3vw, 2.25rem); margin-block: .4rem .6rem; }
.featured p, .guide-row p, .context p { color: var(--muted); }
.read { display: inline-block; font-weight: 750; color: var(--green); margin-top: 1rem; }
.topic { color: var(--green); font-size: .78rem; font-weight: 760; letter-spacing: .095em; text-transform: uppercase; }
.guide-list { padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.guide-row { display: flex; align-items: center; justify-content: space-between; gap: .9rem; border-bottom: 1px solid var(--line); padding: .9rem .2rem; color: var(--ink); text-decoration: none; }
.guide-row h3 { font-size: clamp(1.18rem, 2.6vw, 1.55rem); margin-block: .25rem .35rem; }
.guide-row p { font-size: .96rem; }
.arrow { color: var(--green); font-size: 1.25rem; padding-inline: .3rem; }
.guide-row:hover h3, .featured:hover h3 { text-decoration: underline; text-underline-offset: .13em; text-decoration-thickness: 1px; }
.context { background: var(--soft); }
.context h2 + p { margin-top: .65rem; }
.context-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; margin-top: 1.4rem; }
.context-grid section { background: var(--paper); border-radius: .6rem; border: 1px solid var(--line); padding: 1.25rem; }
.context-grid h3 { font-size: 1.4rem; }
.context-grid p { margin-block: .55rem .75rem; }
.context-grid a { font-weight: 650; }
.context-grid ul { margin: 0; padding-left: 1.25rem; }
.footer { border-top: 1px solid var(--line); }
.footer .brand b { color: var(--green); }
.footer p { color: var(--muted); font-size: .88rem; }
.article-head { padding-block: 2.4rem 3.25rem; background: var(--soft); }
.back { display: inline-block; font-weight: 650; margin-bottom: 1.5rem; }
.article-head h1 { margin-block: .55rem .8rem; font-size: clamp(2.35rem, 6vw, 4.7rem); max-width: 23ch; }
.intro { color: var(--muted); font-size: 1.16rem; max-width: 62ch; }
.article-grid { display: grid; grid-template-columns: minmax(11rem, .75fr) minmax(0, 45rem); justify-content: start; align-items: start; gap: clamp(1.5rem, 5vw, 5rem); padding-block: 2.15rem 4rem; }
.toc { position: sticky; top: 1.25rem; border-left: 2px solid var(--line); padding-left: 1rem; }
.toc h2 { font-size: 1.05rem; }
.toc ul { padding-left: 0; margin: .7rem 0 0; list-style: none; }
.toc li + li { margin-top: .5rem; }
.toc a { font-size: .95rem; }
.prose { font-size: 1.075rem; }
.prose h2 { font-size: clamp(1.45rem, 4vw, 2rem); margin-block: 2.1rem .75rem; }
.prose > h2:first-child { margin-top: 0; }
.prose p + p { margin-top: .9rem; }
.prose ol, .prose ul { padding-left: 1.45rem; }
.prose li + li { margin-top: .3rem; }
.prose .note { background: var(--soft); border-left: 3px solid #328474; border-radius: .15rem .45rem .45rem .15rem; padding: .85rem 1rem; margin-block: 1.3rem; }
.prose details, .next { border-radius: .5rem; border: 1px solid var(--line); padding: .85rem 1rem; background: white; }
.prose summary { cursor: pointer; color: var(--green); font-weight: 700; }
.prose details[open] p { margin-top: .65rem; }
.prose .sources { margin-top: 2rem; border-top: 1px solid var(--line); }
.next { margin-top: 1.5rem; display: flex; gap: 1rem; justify-content: space-between; align-items: center; text-decoration: none; }
.next:hover strong { text-decoration: underline; }
.next small, .next strong { display: block; }
.table-wrap { margin-block: 1rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
caption { text-align: left; font-weight: 690; margin-bottom: .5rem; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
th { background: var(--soft); }
.equation { display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--soft); padding: .8rem; margin-block: 1rem; border-radius: .45rem; }
.equation strong { display: block; }
.equation span { font-size: .9rem; }
.definition-list dt { font-weight: 720; }
.definition-list dd { margin: .2rem 0 .8rem; }
.not-found { padding-block: 4rem; }
.not-found p { margin-block: .75rem 1.1rem; }
@media (max-width: 760px) {
  .wrap { width: min(100% - 2rem, 560px); }
  .hero-grid, .library, .context-grid, .article-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 2rem; }
  .featured-symbol { min-height: 7rem; }
  .toc { position: static; }
  .article-grid { gap: 1.8rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: .8rem; gap: .25rem; }
}
@media (max-width: 375px) {
  .desktop-break { display: none; }
  .masthead-inner { gap: .45rem; }
  .masthead nav a { font-size: .81rem; }
  .brand { font-size: 1.05rem; gap: .2rem; }
  .brand img { width: 32px; height: 32px; }
  .block { padding: .22rem; }
  .block span { font-size: .83rem; }
}
