:root {
  --navy: #10233a;
  --teal: #f2a33a;
  --paper: #f8f8f3;
  --ink: #18222b;
  --muted: #47545c;
  --green: #0b5f87;
  --line: #d3dde4;
  --soft: #eef3f6;
  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: #f8c27a; }
.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; }
.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, .route-link { 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); }
.guide-terms { color: var(--muted); }
.route-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 1.5rem; }
.route-link { display: flex; gap: .65rem; align-items: center; text-decoration: none; }
.route-link[rel="next"] { justify-content: space-between; background: var(--soft); }
.route-link:hover strong { text-decoration: underline; }
.route-link small, .route-link strong { display: block; }
.reading-page { max-width: 45rem; padding-block: 2.15rem 4rem; }
.glossary { margin: 0; }
.glossary dd + dt { border-top: 1px solid var(--line); padding-top: .8rem; }
.glossary dd a { display: block; width: fit-content; }
.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; }
}
@media (max-width: 500px) {
  .route-nav { grid-template-columns: 1fr; }
}
.ref-box { margin-block: 0 3rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: .8rem; background: white; }
.ref-box h2 { font-size: 1.35rem; }
.ref-box p { color: var(--muted); font-size: .95rem; margin-top: .55rem; }
.ref-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem; margin-top: 1rem; }
.ref-card { display: grid; gap: .2rem; padding: .9rem 1rem; border-radius: .55rem; background: var(--navy); color: white; text-decoration: none; }
.ref-card span { color: #cbdadf; font-size: .9rem; }
.ref-card b { color: var(--teal); }
.ref-card:hover strong { text-decoration: underline; }
.ref-fine { font-size: .82rem !important; }
.dateline { color: var(--muted); font-size: .88rem; margin-top: .8rem; }
.ref-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 1rem auto 0; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: .7rem; background: white; font-size: .92rem; color: var(--muted); }
.ref-strip a { display: inline-flex; gap: .35rem; align-items: center; padding: .38rem .75rem; border-radius: .45rem; background: var(--navy); color: white; text-decoration: none; font-weight: 600; }
.ref-strip a b { color: var(--teal); }
.ref-strip a:hover { text-decoration: underline; }
.ref-strip small { flex-basis: 100%; font-size: .78rem; }
.code-card { display: grid; gap: .55rem; justify-items: start; margin: 1.25rem 0; padding: 1.2rem 1.25rem; border-radius: .8rem; background: var(--navy); color: white; }
.code-label { color: #cbdadf; font-size: .9rem; }
.code-value { font-size: clamp(2rem, 7vw, 2.8rem); letter-spacing: .08em; color: var(--teal); line-height: 1; }
.code-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.code-copy, .code-open { padding: .55rem .95rem; border-radius: .5rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.code-copy { border: 1px solid var(--teal); background: transparent; color: var(--teal); }
.code-open { background: var(--teal); color: var(--navy); }
.code-card small { color: #cbdadf; font-size: .78rem; }
.ref-inline:empty { display: none; }
.inline-cta { display: grid; gap: .5rem; margin: 1.75rem 0; padding: 1.1rem 1.2rem; border-left: 4px solid var(--teal); border-radius: .6rem; background: var(--soft); }
.inline-cta strong { font-size: 1.08rem; color: var(--ink); }
.inline-cta p { margin: 0; color: var(--muted); font-size: .95rem; }
.inline-cta-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.inline-cta-btns a { display: grid; gap: .1rem; padding: .6rem 1rem; border-radius: .5rem; background: var(--navy); color: white; font-weight: 700; text-decoration: none; }
.inline-cta-btns a small { color: var(--teal); font-weight: 500; font-size: .78rem; }
.inline-cta-btns a:hover { text-decoration: underline; }
.inline-cta > small { color: var(--muted); font-size: .78rem; }
.risk-bar { background: #fff4e0; border-bottom: 1px solid #f0d3a2; color: #4a3200; font-size: .9rem; }
.risk-bar .wrap { padding-block: .55rem; }
.risk-bar strong { font-weight: 750; }
.risk-inline { border: 2px solid #e2a33f; background: #fff8ec; border-radius: .55rem; padding: .7rem .9rem; font-weight: 650; color: #4a3200; margin-block: .9rem; font-size: .95rem; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem; margin-block: 1rem; }
.price-card { background: white; border: 1px solid var(--line); border-radius: .6rem; padding: .9rem 1rem; }
.price-card span { display: block; color: var(--muted); font-size: .85rem; }
.price-card strong { font-size: 1.45rem; letter-spacing: -.02em; }
.price-card small { color: var(--muted); }
.up { color: #0a7a3f; } .down { color: #b3261e; }
.calc { background: white; border: 1px solid var(--line); border-radius: .7rem; padding: 1rem 1.1rem; margin-block: 1rem; }
.calc label { display: block; font-weight: 650; margin-top: .6rem; }
.calc input { width: 100%; max-width: 18rem; font: inherit; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: .4rem; }
.calc output { display: block; margin-top: .8rem; font-weight: 700; }
