:root {
  color-scheme: dark;
  --bg: #0F2236;
  --panel: #16304B;
  --tint: #469DDD;
  --ink: #EEF3F8;
  --head: #FFFFFF;
  --muted: #B9C6D3;
  --line: #24415F;
  --accent: #469DDD;
  --accent-ink: #A9D6F7;
  --up: #8BE3AE;
  --down: #FFB0A6;
  --bench: #8FA3B8;
  --c1: #469DDD;
  --c2: #A9D6F7;
  --c3: #2E4E70;
  --sans: "Aptos", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Aptos Display", "Aptos", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 0; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }
.sample { background: var(--accent); color: var(--ink); font-size: 13px; text-align: center; padding: 8px 16px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--head); text-decoration: none; padding: 10px 0; }
.nav { display: flex; flex-wrap: wrap; gap: 0 4px; margin-right: -12px; }
.nav a { padding: 10px 12px; text-decoration: none; font-size: 14px; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* hero */
.hero { padding: 120px 0 104px; background: var(--tint); box-shadow: 0 0 0 100vmax var(--tint); clip-path: inset(0 -100vmax); color: #fff; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 8vw, 96px); line-height: 1; letter-spacing: -0.02em; margin: 0 0 28px; max-width: 900px; }
.hero p { font-size: clamp(17px, 2vw, 20px); color: #fff; max-width: 620px; margin: 0; }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: #fff; margin-top: 36px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; display: inline-block; box-shadow: 0 0 0 4px rgba(255,255,255,.3); }

/* numbered sections */
.block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 24px 48px; padding: 72px 0; border-bottom: 1px solid var(--line); }
.block > .label { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.02em; padding-top: 8px; }
.block > .label b { color: var(--accent-ink); font-weight: 500; }
.block h2 { font-family: var(--display); font-weight: 700; color: var(--head); font-size: clamp(30px, 4.5vw, 46px); letter-spacing: -0.015em; line-height: 1.05; margin: 0 0 24px; }
.block .prose p { font-size: 18px; line-height: 1.7; margin: 0 0 16px; max-width: 680px; }
@media (max-width: 760px) { .block { grid-template-columns: minmax(0, 1fr); padding: 56px 0; } }

/* principles */
.principles { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.principles li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 16px; padding: 22px 0; border-top: 1px solid var(--line); counter-increment: p; }
.principles li:first-child { border-top: 0; padding-top: 0; }
.principles li::before { content: counter(p, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 5px; }
.principles h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.principles p { margin: 0; color: var(--muted); font-size: 16px; max-width: 620px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { padding: 18px 18px; background: var(--panel); display: flex; flex-direction: column; gap: 2px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-family: var(--mono); font-size: 30px; letter-spacing: -0.02em; }
.stat .s { font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* allocation */
.alloc { margin: 8px 0 36px; }
.alloc-bar { display: flex; height: 10px; background: var(--panel); }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.swatch { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 8px; }

/* tables */
.sub { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin: 40px 0 10px; }
.sub:first-child { margin-top: 0; }
.sub h3 { font-size: 15px; font-weight: 600; margin: 0; }
.sub span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.table-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 16px 12px 0; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
thead th { font-size: 12px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; font-family: var(--mono); padding-right: 0; padding-left: 16px; }
.empty { color: var(--muted); padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.monthly th, .monthly td { text-align: right; font-family: var(--mono); font-size: 13px; padding: 10px 0 10px 12px; }
.monthly th:first-child, .monthly td:first-child { text-align: left; padding-left: 0; }
.note { font-size: 13px; color: var(--muted); margin: 12px 0 0; max-width: 680px; }

/* chart */
.chart { margin-top: 36px; }
.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 16px; height: 2px; margin-right: 8px; vertical-align: middle; }
.chart-empty { background: var(--panel); color: var(--muted); padding: 40px 24px; color: var(--muted); font-size: 15px; }

/* writing */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.posts li { border-bottom: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 24px; padding: 20px 0; text-decoration: none; }
.posts a:hover h3 { color: var(--accent-ink); }
.posts .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 4px; }
.posts h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
.posts p { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .posts a { grid-template-columns: 1fr; } }

.more { display: inline-block; margin-top: 20px; font-size: 14px; padding: 6px 0; }

/* article */
.article { max-width: 700px; padding: 72px 0 24px; }
.article .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 32px 0 12px; }
.article h1 { font-family: var(--display); font-weight: 700; color: var(--head); font-size: clamp(34px, 5.5vw, 56px); line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 18px; }
.article .lead { font-size: 20px; color: var(--muted); margin: 0 0 36px; }
.article .body { font-size: 18px; line-height: 1.75; }
.article .body h2 { font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; margin: 44px 0 10px; }
.article .body h3 { font-size: 19px; margin: 32px 0 8px; }
.article .body p, .article .body ul, .article .body ol { margin: 0 0 18px; }
.article .body blockquote { margin: 0 0 18px; padding-left: 18px; border-left: 2px solid var(--accent); color: var(--muted); }
.article .body img { max-width: 100%; }
.article .body table { margin-bottom: 18px; }

/* closing */
.closing { padding: 88px 0; }
.closing h2 { font-family: var(--display); font-weight: 700; font-size: clamp(38px, 6vw, 64px); letter-spacing: -0.02em; margin: 0 0 16px; }
.closing p { color: var(--muted); font-size: 18px; margin: 0; max-width: 560px; }
.subscribe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; max-width: 520px; }
.subscribe input { flex: 1 1 220px; min-height: 46px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.subscribe button { min-height: 46px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--accent); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 24px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 12px; color: var(--muted); }
.site-footer p { margin: 0; max-width: 640px; }

a { text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); }
a:hover { color: var(--accent-ink); }
.closing h2, .closing p { color: #fff; }
.closing { background: var(--tint); box-shadow: 0 0 0 100vmax var(--tint); clip-path: inset(0 -100vmax); padding: 80px 0; margin-top: 0; }
.site-footer { border-top: 0; background: #0B1A2A; box-shadow: 0 0 0 100vmax #0B1A2A; clip-path: inset(0 -100vmax); }
.block h2, .principles h3, .posts h3, .sub h3 { color: var(--head); }
.principles h3 { font-weight: 700; }

.contact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; background: #fff; color: var(--accent-ink); font-size: 15px; font-weight: 600; text-decoration: none; font-weight: 500; font-size: 15px; }
.btn:hover { color: var(--head); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid #fff; }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.12); }
@media (max-width: 480px) { .btn span { word-break: break-all; } }

.site-header { background: color-mix(in srgb, #0F2236 92%, transparent); border-bottom-color: #24415F; }
.brand { color: #fff; }
.nav a { color: #E6E6E5; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
a { color: #fff; text-decoration-color: var(--accent); }
a:hover { color: var(--accent-ink); }
.posts a:hover h3 { color: var(--accent-ink); }
.closing .btn { color: #2C7DBF; }
.hero { border-bottom: 0; }
.closing .btn-ghost { color: #fff; }

/* cookie banner + footer links */
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.foot-links a { color: var(--muted); }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto; background: #16304B; border: 1px solid #469DDD; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.consent p { margin: 0; font-size: 14px; color: var(--ink); flex: 1 1 280px; }
.consent a { color: var(--accent-ink); }
.consent-btns { display: flex; gap: 8px; }
.consent .btn { min-height: 40px; padding: 0 16px; font-size: 14px; border: 1px solid #fff; cursor: pointer; font-family: inherit; color: #2C7DBF; }
.consent .btn-ghost { color: #fff; }
