:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-muted: #f0f3f6;
  --ink: #18222d;
  --muted: #647180;
  --faint: #8a96a3;
  --border: #dbe2e8;
  --border-strong: #c4cfd8;
  --accent: #0b6f70;
  --accent-strong: #075456;
  --accent-soft: #e0f1f0;
  --warm: #d47736;
  --warm-soft: #fff0e5;
  --shadow: 0 12px 28px rgba(24, 34, 45, 0.06);
  --radius: 14px;
  --max: 1120px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12181e;
  --surface: #1a222a;
  --surface-muted: #202b34;
  --ink: #edf3f6;
  --muted: #a8b5be;
  --faint: #7d8c97;
  --border: #33424e;
  --border-strong: #4b5d69;
  --accent: #60c5bf;
  --accent-strong: #91e2da;
  --accent-soft: #1c3d3d;
  --warm: #f2a56e;
  --warm-soft: #3b2b21;
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-strong); text-underline-offset: 0.16em; }
a:hover { color: var(--accent); }

button, input, select { font: inherit; }
button, select { cursor: pointer; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.55rem 0.8rem;
  color: #fff;
  background: var(--accent-strong);
  border-radius: 0.45rem;
}

.skip-link:focus { top: 1rem; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.header-inner, .main-shell, .footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.2rem;
}

.brand {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.brand small {
  margin-left: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-left: auto;
}

.control {
  display: grid;
  gap: 0.18rem;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 650;
}

select, input {
  min-height: 2.45rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.55rem;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  background: var(--surface);
}

select { min-width: 12rem; }

.theme-toggle, .button {
  min-height: 2.45rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.55rem;
  color: var(--ink);
  background: var(--surface);
  font-weight: 650;
}

.theme-toggle:hover, .button:hover { border-color: var(--accent); }

.series-nav {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.series-nav-inner {
  display: flex;
  gap: 0.15rem;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.45rem 0;
}

.series-nav a {
  flex: 0 0 auto;
  padding: 0.42rem 0.7rem;
  color: var(--muted);
  border-radius: 0.45rem;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.series-nav a:hover, .series-nav a[aria-current="page"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.main-shell { padding: 2.4rem 0 4rem; }

.hero { max-width: 760px; margin-bottom: 1.6rem; }

h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.18; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.65rem); }
h3 { font-size: 1.02rem; }

.lede { max-width: 720px; margin: 0.8rem 0 0; color: var(--muted); font-size: 1.05rem; }

.as-of {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.1rem;
  padding: 0.45rem 0.65rem;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 0.5rem;
  font-size: 0.86rem;
  font-weight: 650;
}

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-header p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }
.eyebrow { margin: 0 0 0.35rem; color: var(--accent); font-size: 0.73rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 0.83rem; }

.metric { display: grid; gap: 0.15rem; }
.metric strong { font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -0.045em; }
.metric span { color: var(--muted); font-size: 0.84rem; }

.section { margin-top: 1rem; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 2.1rem 0 0.8rem; }
.section-title p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.chart-wrap { overflow-x: auto; padding-bottom: 0.25rem; }
.chart { width: 100%; min-width: 560px; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .gridline { stroke: var(--border); stroke-width: 1; }
.chart .low-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .standard-line { fill: none; stroke: var(--warm); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .low-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart .standard-dot { fill: var(--surface); stroke: var(--warm); stroke-width: 2; }

.legend { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.35rem; color: var(--muted); font-size: 0.82rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.38rem; }
.legend i { display: inline-block; width: 0.75rem; height: 0.2rem; border-radius: 99px; }
.legend .low { background: var(--accent); }
.legend .standard { background: var(--warm); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.7rem 0.55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 0.75rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
td strong { font-weight: 720; }
tbody tr:hover { background: var(--surface-muted); }

.table-toolbar { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 0.7rem; }
.table-toolbar input { flex: 1 1 14rem; }
.table-toolbar select { min-width: 11rem; }

.trend-up { color: #b45a2e; }
.trend-down { color: var(--accent-strong); }
.trend-flat { color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.field { display: grid; gap: 0.3rem; }
.field label { color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.field input { width: 100%; }
.field small { color: var(--faint); font-size: 0.74rem; }

.calc-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; margin-top: 1rem; }
.result { padding: 0.7rem; border-radius: 0.65rem; background: var(--surface-muted); }
.result span { display: block; color: var(--muted); font-size: 0.75rem; }
.result strong { display: block; margin-top: 0.2rem; font-size: 1.15rem; }

.callout { padding: 0.9rem 1rem; border-left: 3px solid var(--accent); border-radius: 0.4rem; background: var(--accent-soft); }
.callout p { margin: 0; font-size: 0.9rem; }

.notice { color: var(--muted); font-size: 0.84rem; }
.notice a { font-weight: 650; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: grid; gap: 0.65rem; padding: 1.6rem 0 2.2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.85rem; }
.footer-links a { font-size: 0.86rem; font-weight: 650; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 0.82rem; }

.page-copy { max-width: 780px; }
.page-copy h1 { margin-bottom: 0.8rem; }
.page-copy h2 { margin-top: 2rem; margin-bottom: 0.5rem; }
.page-copy p, .page-copy li { color: var(--muted); }
.page-copy ul { padding-left: 1.2rem; }

.error-page { min-height: 58vh; display: grid; place-items: center; text-align: center; }
.error-page p { max-width: 32rem; color: var(--muted); }

@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; padding: 0.7rem 0; }
  .header-controls { width: 100%; justify-content: space-between; margin-left: 0; }
  .header-controls .control { flex: 1 1 auto; }
  .header-controls select { width: 100%; min-width: 0; }
  .calc-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .header-controls { gap: 0.45rem; }
  .theme-toggle { padding-inline: 0.58rem; }
  .main-shell { padding-top: 1.7rem; }
  .card { padding: 0.95rem; }
  .form-grid { grid-template-columns: 1fr; }
  th, td { padding-inline: 0.4rem; }
}



/* Reference-system alignment: restrained serif headings, ruled navigation and data-led surfaces. */
:root {
  --bg: #fcfcfa;
  --surface: #fcfcfa;
  --surface-muted: #f5f5f1;
  --ink: #20201e;
  --muted: #6e706d;
  --faint: #94958f;
  --border: #d8d9d4;
  --border-strong: #bfc1ba;
  --accent: #327769;
  --accent-strong: #245b50;
  --accent-soft: #e8f0ec;
  --warm: #9a5f54;
  --warm-soft: #f4ebe8;
  --shadow: none;
  --radius: 0;
  --font: Arial, Helvetica, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

[data-theme="dark"] {
  --bg: #191a18;
  --surface: #191a18;
  --surface-muted: #20221f;
  --ink: #eeeeda;
  --muted: #b2b3a9;
  --faint: #888a82;
  --border: #4a4c46;
  --border-strong: #696b63;
  --accent: #79b8a3;
  --accent-strong: #a5d4c1;
  --accent-soft: #253b34;
  --warm: #d69a8e;
  --warm-soft: #3a2926;
}

body { background: var(--bg); color: var(--ink); font-size: 15px; }
a { color: var(--ink); }
a:hover { color: var(--accent-strong); }
.shell, .header-inner, .series-nav-inner, .main-shell, .footer-inner { width: min(calc(100% - 2rem), 1140px); margin-inline: auto; }
.site-header { border-bottom: 0; background: var(--bg); }
.header-inner { min-height: 3.55rem; padding: .55rem 0 .45rem; border-bottom: 1px solid var(--ink); }
.brand { color: var(--ink); font-family: var(--serif); font-size: 1.72rem; font-weight: 400; letter-spacing: -.04em; }
.brand small { margin-left: .35rem; color: var(--muted); font-family: var(--font); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.header-controls { display: flex; align-items: center; gap: .7rem; }
.header-controls select { width: auto; min-width: 8.5rem; }
.control { display: inline-flex; align-items: center; gap: .42rem; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.control select, .control input { min-height: 1.85rem; padding: .25rem 1.55rem .25rem .55rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .78rem; letter-spacing: 0; text-transform: none; }
.theme-toggle { min-height: 1.85rem; padding: .25rem .65rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.theme-toggle:hover { border-color: var(--ink); }
.series-nav { border-bottom: 1px solid var(--ink); background: var(--bg); }
.series-nav-inner { display: flex; flex-wrap: wrap; gap: .15rem 1.25rem; padding: .5rem 0 .58rem; }
.series-nav a { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.series-nav a:hover, .series-nav a[aria-current="page"] { color: var(--ink); background: transparent; border-radius: 0; }
.series-nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); }
.main-shell { padding-top: 2.35rem; padding-bottom: 4.2rem; }
.hero { padding: 0 0 1.55rem; }
.eyebrow { margin-bottom: .55rem; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.hero h1, .section-title h2, .page-copy h1, .page-copy h2, .card h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.025em; }
.hero h1 { max-width: 720px; margin: 0 0 .65rem; font-size: clamp(2.15rem, 4.6vw, 3rem); line-height: 1.05; }
.lede { max-width: 760px; margin-bottom: .65rem; color: var(--muted); font-size: 1rem; }
.as-of { display: inline; margin-top: .6rem; padding: 0; border: 0; border-radius: 0; color: var(--muted); background: transparent; font-size: .76rem; font-weight: 400; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.card { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.metric { min-height: 7rem; padding: 1rem 1.1rem 1rem 0; border-right: 1px solid var(--border); }
.metric + .metric { padding-left: 1.1rem; }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--muted); font-size: .76rem; }
.metric strong { display: block; margin: .35rem 0 .12rem; color: var(--ink); font-family: var(--serif); font-size: 1.75rem; font-weight: 400; letter-spacing: -.03em; }
.section { padding-top: 3rem; }
.section-title { align-items: end; margin-bottom: 1rem; padding-bottom: .65rem; border-bottom: 1px solid var(--border); }
.section-title h2 { margin-bottom: .1rem; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.08; }
.section-title > p { margin: 0; color: var(--muted); font-size: .8rem; }
.section > .card { padding: 0; }
.card-header { padding-bottom: .7rem; }
.card-header h3 { margin: 0 0 .25rem; font-family: var(--serif); font-size: 1.3rem; font-weight: 400; }
.card-header p { margin: 0; color: var(--muted); font-size: .82rem; }
.chart-wrap { padding: .7rem 0 .25rem; border-bottom: 1px solid var(--border); }
.chart { min-width: 580px; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .gridline { stroke: var(--border); stroke-width: 1; }
.chart .low-line { stroke: var(--accent); stroke-width: 2; }
.chart .standard-line { stroke: var(--warm); stroke-width: 2; }
.chart .low-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.chart .standard-dot { fill: var(--surface); stroke: var(--warm); stroke-width: 1.5; }
.legend { margin-top: .6rem; color: var(--muted); font-size: .76rem; }
.legend i { border-radius: 0; }
.table-toolbar { align-items: end; margin-bottom: .8rem; }
.table-toolbar input, .table-toolbar select { min-height: 2rem; border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--ink); }
.table-toolbar .control { display: grid; align-items: start; gap: .3rem; }
table { font-size: .84rem; }
th, td { padding: .68rem .45rem; border-bottom: 1px solid var(--border); }
th { font-size: .66rem; letter-spacing: .1em; }
td strong { font-weight: 600; }
tbody tr:hover { background: var(--surface-muted); }
.notice { color: var(--muted); font-size: .78rem; }
.form-grid { gap: .8rem; }
.field label { color: var(--muted); font-size: .74rem; font-weight: 700; }
.field input { min-height: 2.05rem; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--ink); }
.field small { color: var(--faint); font-size: .7rem; }
.callout { padding: .75rem .9rem; border-left: 2px solid var(--accent); border-radius: 0; background: var(--surface-muted); }
.callout p { font-size: .8rem; }
.calc-results { gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.result { padding: .7rem .65rem .7rem 0; border-radius: 0; border-right: 1px solid var(--border); background: transparent; }
.result + .result { padding-left: .65rem; }
.result:last-child { border-right: 0; }
.result span { font-size: .7rem; }
.result strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.site-footer { border-top: 1px solid var(--ink); background: var(--bg); }
.footer-inner { gap: .75rem; padding: 1.2rem 0 2rem; }
.footer-links { gap: .25rem 1rem; }
.footer-links a { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.footer-inner p { color: var(--muted); font-size: .76rem; }
.page-copy { max-width: 760px; }
.page-copy h1 { margin-bottom: .75rem; font-size: clamp(2.1rem, 4vw, 3rem); }
.page-copy h2 { margin-top: 2rem; font-size: 1.5rem; }
.page-copy p, .page-copy li { color: var(--muted); }
.button { display: inline-flex; align-items: center; padding: .4rem .65rem; border: 1px solid var(--border); border-radius: 999px; color: var(--ink); background: var(--surface); font-size: .72rem; text-decoration: none; }
.button:hover { border-color: var(--ink); }
.error-page { min-height: 58vh; }
@media (max-width: 820px) {
  .header-inner { align-items: flex-start; flex-wrap: wrap; padding: .7rem 0; }
  .header-controls { margin-left: auto; }
  .grid-3 { grid-template-columns: 1fr; }
  .metric, .metric + .metric { min-height: 0; padding: .75rem 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .metric:last-child { border-bottom: 0; }
  .section-title { align-items: start; flex-direction: column; gap: .35rem; }
}
@media (max-width: 520px) {
  .shell, .header-inner, .series-nav-inner, .main-shell, .footer-inner { width: min(calc(100% - 1.2rem), 1140px); }
  .header-controls { width: 100%; margin-left: 0; justify-content: space-between; }
  .header-controls .control { flex: 1 1 auto; justify-content: space-between; }
  .header-controls select { max-width: 13rem; }
  .series-nav-inner { gap: .2rem .8rem; }
  .hero h1 { font-size: 2.15rem; }
  .table-toolbar { align-items: stretch; }
  .table-toolbar .control { width: 100%; }
  .calc-results { grid-template-columns: repeat(2, 1fr); }
  .result:nth-child(2) { border-right: 0; }
  .result:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
