/* Shared styles for every page except the homepage (which inlines the same system).
   Dark "band" (header + page head) over a blueprint grid, light reading area, dark footer. */
@font-face { font-family: "Archivo"; src: url(/assets/fonts/archivo-latin.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "Geist"; src: url(/assets/fonts/geist-latin.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/assets/fonts/geist-mono-latin.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
    /* Light reading area. The old names (--primary, --secondary, ...) are kept because page-level styles use them. */
    --primary: #0b1220;
    --secondary: #3452d1;
    --text: #39445a;
    --muted: #5a6680;
    --light-bg: #eef2f9;
    --border: #dfe5f0;
    --white: #ffffff;
    --page: #f4f6fb;
    /* Dark band and footer */
    --ink: #06090f;
    --band-text: #c3cde0;
    --band-muted: #8a97b0;
    --band-bright: #f2f5fc;
    --ice: #a9c1ff;
    --hair-dark: rgba(170, 190, 230, .14);
    --grid: rgba(150, 172, 214, .075);
    --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --body: "Geist", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); line-height: 1.7; color: var(--text); background: var(--page); font-size: 16px; overflow-x: hidden; }
a { color: var(--secondary); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; text-wrap: balance; font-weight: 600; }

/* Dark band: header + page head */
.band { position: relative; overflow: hidden; background: var(--ink); color: var(--band-text); }
.band a:focus-visible { outline-color: var(--ice); }
.grid-bg { position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 96px 96px; background-position: center top;
    -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 20%, #000 30%, transparent 85%); mask-image: radial-gradient(ellipse 80% 90% at 50% 20%, #000 30%, transparent 85%); }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; position: relative; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; position: relative; z-index: 2; }
.brand { font-family: var(--display); font-weight: 700; letter-spacing: .16em; color: var(--band-bright); text-decoration: none; font-size: 15px; }
.top nav { display: flex; gap: 22px; align-items: center; font-size: 14px; }
.top nav a { color: var(--band-muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--band-bright); }
.top nav a.pill { border: 1px solid rgba(170, 190, 230, .16); border-radius: 999px; padding: 8px 16px; color: var(--band-bright); background: rgba(255, 255, 255, .03); }
.top nav .opt { display: none; }
@media (min-width: 820px) { .top nav .opt { display: inline; } }

.page-head { position: relative; padding: 36px 20px 64px; }
.page-head-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.page-head h1 { font-size: clamp(34px, 6.4vw, 62px); line-height: 1.04; background: linear-gradient(180deg, #f6f8ff 25%, #9fb8ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .05em; }
.page-head p { color: #b9c5dc; font-size: clamp(16px, 2vw, 19px); max-width: 60ch; }
.page-head .meta { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--band-muted); margin-top: 4px; }
.page-head .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ice); border: 1px solid rgba(169, 193, 255, .35); border-radius: 999px; padding: 3px 10px; width: fit-content; background: transparent; margin: 0; }
.page-head a { color: var(--ice); }

/* Light reading area */
.content { max-width: 780px; margin: 0 auto; padding: 56px 20px 72px; }
.content h2 { color: var(--primary); font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; margin: 48px 0 14px; }
.content h3 { color: var(--primary); font-size: 20px; line-height: 1.25; margin: 28px 0 8px; letter-spacing: -.01em; }
.content > h2:first-child, .content > h3:first-child { margin-top: 0; }
.content p { margin-bottom: 16px; }
.content ul, .content ol { margin: 0 0 18px 22px; }
.content li { margin-bottom: 8px; }
.content blockquote { border: 1px solid var(--border); background: var(--white); padding: 16px 20px; margin: 24px 0; border-radius: 14px; }
.content strong { color: var(--primary); }

.tag { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--secondary); margin-bottom: 8px; width: fit-content; }
.meta { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.disclosure { font-size: 14px; color: var(--muted); background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 24px; }

.table-wrap { overflow-x: auto; margin: 20px 0 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); }
table { width: 100%; border-collapse: collapse; min-width: 520px; background: var(--white); }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: 15px; }
th { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--light-bg); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; color: var(--primary); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; background: var(--primary); color: var(--white); padding: 10px 20px; border-radius: 999px; text-decoration: none; font-weight: 500; border: 1px solid var(--primary); margin: 4px 8px 4px 0; }
.btn:hover { background: #1c2742; }
.btn.secondary { background: var(--white); color: var(--primary); border-color: var(--border); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 24px; }
.card { border: 1px solid var(--border); border-radius: 18px; padding: 24px; background: var(--white); display: flex; flex-direction: column; }
.card h2, .card h3 { color: var(--primary); font-size: 21px; line-height: 1.2; margin: 0 0 8px; }
.card p { font-size: 15px; margin-bottom: 12px; }
.card .card-foot { margin-top: auto; }
.card a.title-link { color: var(--primary); text-decoration: none; }
.card a.title-link:hover { color: var(--secondary); }

.cta-box { border: 1px solid var(--border); border-radius: 18px; background: var(--white); padding: 24px; margin: 32px 0; }
.cta-box h3 { margin-top: 0; }

.diagram { margin: 32px 0; }
.diagram svg { display: block; width: 100%; height: auto; font-family: var(--body); }
.diagram figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; text-align: center; }
.lead { font-size: 18px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 28px; }
.author-box { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 16px; font-size: 15px; }

/* Footer (same as the homepage) */
footer { background: var(--ink); border-top: 1px solid var(--hair-dark); padding-block: 48px 32px; font-size: 14px; color: var(--band-muted); }
footer .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (min-width: 820px) { footer .cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
footer .co { grid-column: 1 / -1; }
@media (min-width: 820px) { footer .co { grid-column: auto; } }
footer ul { list-style: none; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
footer li { margin: 0; }
footer a { color: var(--band-muted); text-decoration: none; }
footer a:hover { color: var(--band-bright); }
footer .h { color: var(--band-bright); font-weight: 500; }
footer .big { font-family: var(--display); font-size: clamp(30px, 8.5vw, 112px); color: transparent; -webkit-text-stroke: 1px rgba(169, 193, 255, .22); letter-spacing: .04em; line-height: 1; margin-top: 40px; font-weight: 700; white-space: nowrap; overflow: hidden; }
footer .legal { margin-top: 18px; font-size: 12px; }
