:root {
  --paper: #f4f0e7;
  --paper-2: #ebe4d6;
  --ink: #1c1915;
  --muted: #5e584e;
  --line: #d9d0c1;
  --gilt: #8a5a22;
  --gilt-soft: #e7d3b0;
  --uk: #1a3654;
  --us: #8c3b2f;
  --ea: #1d5c4d;
  --boe: #4e4274;
  --pension: #8a5a22;
  --banks: #3d6b8a;
  --otherf: #6e6840;
  --overseas: #1d5c4d;
  --rest: #8a8175;
  --box-concept: #eceaf3;
  --box-concept-line: #d3cbe4;
  --box-gov: #e6eef6;
  --box-gov-line: #c3d3e4;
  --box-fisc: #f6edd9;
  --box-fisc-line: #e0ceaa;
  --box-buyer: #e6f2ec;
  --box-buyer-line: #c2dbd0;
  --box-corp: #f8ebe7;
  --box-corp-line: #e4c8c0;
  --box-people: #f8f1e4;
  --box-people-line: #e0c9a4;
  --shadow: 0 1px 0 rgba(28, 25, 21, 0.04);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.55;
}
a { color: var(--gilt); }
a:hover { color: var(--ink); }
button, input, select {
  font: inherit;
  color: inherit;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.25rem;
  padding: 1rem 1.25rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 231, 0.94);
  position: sticky;
  top: 0;
  z-index: 4;
}
.brand {
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--gilt); }
nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.85rem; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
nav a[aria-current="page"], nav a:hover { color: var(--ink); }
.nav-group, .nav-also {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  max-width: 100%;
}
.nav-group { position: relative; gap: 0.05rem 0.15rem; }
.nav-sub { display: inline-flex; align-items: baseline; gap: 0.05rem 0.15rem; }
.nav-also {
  gap: 0.15rem 0.7rem;
  margin-left: 0.1rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
}
.nav-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gilt);
}
nav a.sub { font-size: 0.8rem; }
nav a.sub::before {
  content: "·";
  color: var(--gilt);
  margin: 0 0.28rem 0 0.1rem;
}
@media (hover: hover) and (pointer: fine) {
  .nav-sub {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    z-index: 6;
    flex-direction: column;
    align-items: stretch;
    gap: 0.05rem;
    min-width: max-content;
    padding: 0.35rem 0.15rem 0.4rem;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(28, 25, 21, 0.08);
  }
  .nav-group:hover > .nav-sub,
  .nav-group:focus-within > .nav-sub {
    display: flex;
  }
  .nav-sub a.sub { padding: 0.12rem 0.7rem; white-space: nowrap; }
  .nav-group:hover > .nav-sub a.sub::before,
  .nav-group:focus-within > .nav-sub a.sub::before {
    content: none;
    margin: 0;
  }
  .nav-group:has(.nav-sub a[aria-current="page"]) > a { color: var(--ink); }
}

main { max-width: 74rem; margin: 0 auto; padding: 2.2rem 1.25rem 4rem; }
h1, h2, h3 {
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin: 0.2rem 0 0.8rem; }
h2 { font-size: 1.7rem; margin: 2.4rem 0 0.6rem; }
h3 { font-size: 1.25rem; margin: 1.6rem 0 0.4rem; }
.kicker {
  margin: 0;
  color: var(--gilt);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dek { font-size: 1.2rem; color: var(--ink); }
.prose p, .note { color: var(--ink); }
.muted, .source, figcaption, .readout { color: var(--muted); }
.source, figcaption { font-size: 0.85rem; }
.figure {
  margin: 1.4rem 0 0.4rem;
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.8rem 0.8rem 0.4rem;
  box-shadow: var(--shadow);
}
.chart { width: 100%; min-height: 280px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart svg circle { cursor: pointer; }
.controls { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0.8rem 0; }
.controls button, .controls label.chip {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
}
.controls button[aria-pressed="true"], .controls label.chip:has(input:checked) {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.controls button:disabled {
  opacity: 0.4;
  cursor: default;
}
.controls input[type="range"] { width: min(100%, 18rem); accent-color: var(--gilt); }
.controls.see-controls { flex-direction: column; align-items: stretch; }
.controls.see-controls label { display: block; width: 100%; }
.controls.see-controls input[type="range"] { width: 100%; display: block; margin-top: 0.35rem; }
.controls input[type="date"], .controls select {
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.3rem 0.45rem;
}
.sentence {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.35;
}
.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.5rem; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1rem 0; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stat {
  background: #fbf8f2;
  border: 1px solid var(--line);
  padding: 0.8rem 0.9rem;
}
.stat b {
  display: block;
  font-family: Palatino, Georgia, serif;
  font-size: 1.7rem;
  font-variant-numeric: tabular-nums;
}
.stat span { color: var(--muted); font-size: 0.85rem; }
details {
  border-top: 1px solid var(--line);
  padding: 0.7rem 0;
}
summary { cursor: pointer; font-weight: 600; }
.formula { font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 0.28rem 0.4rem; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 1.25rem 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 74rem;
  margin: 0 auto;
}
footer p { margin: 0; }
a.note {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.12rem;
  text-decoration: none;
}
.footnotes { margin: 0.85rem 0 0; padding-left: 1.2rem; }
.footnotes li { margin: 0.35rem 0; }
.compare th, .compare td { text-align: left; vertical-align: top; }
.compare th { font-weight: 600; }
.table-wrap { overflow-x: auto; margin-top: 0.4rem; }
.see-saw, .basket { width: 100%; }
.qa h2 { margin-top: 2rem; }
.warn {
  background: var(--gilt-soft);
  padding: 0.7rem 0.9rem;
}

.gilt-anatomy { margin: 1.3rem 0 0.3rem; }
.gilt-strip, .gilt-calls {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  column-gap: 0.9rem;
}
.gilt-strip {
  background: #fbf8f2;
  border: 1.5px solid #1a3654;
  padding: 0.95rem 0 0.8rem;
  align-items: center;
}
.gilt-strip .tok {
  text-align: center;
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  padding: 0.12rem 0.45rem 0.18rem;
  justify-self: center;
}
.gilt-strip .tok.ukt { color: #1a3654; background: var(--box-gov); }
.gilt-strip .tok.cpn { color: #8a5a22; background: var(--box-fisc); }
.gilt-strip .tok.mat { color: #1c1915; background: var(--box-people); }
.gilt-calls { align-items: stretch; }
.gilt-calls .call { display: flex; flex-direction: column; min-width: 0; }
.gilt-calls .stem {
  display: block;
  width: 0;
  height: 1.15rem;
  margin: 0 auto;
  border-left: 1.5px dashed #5e584e;
}
.gilt-calls article {
  flex: 1;
  margin: 0;
  padding: 0.75rem 0.85rem 0.9rem;
  border: 1px solid var(--line);
}
.gilt-calls article.ukt { background: var(--box-gov); border-color: var(--box-gov-line); }
.gilt-calls article.cpn { background: var(--box-fisc); border-color: var(--box-fisc-line); }
.gilt-calls article.mat { background: var(--box-people); border-color: var(--box-people-line); }
.gilt-calls h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}
.gilt-calls p { margin: 0; }
.gilt-anatomy figcaption { margin-top: 0.75rem; }
.flow { font-weight: 600; }
.flow.out { color: #8a5a22; }
.flow.in { color: #1a3654; }
.gilt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.2rem 0 0.4rem; }
.certificate {
  background: #fbf8f2;
  border: 1px solid var(--line);
  padding: 1rem 1.1rem 0.7rem;
}
.certificate .kind {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gilt);
}
.certificate h2 { margin: 0.15rem 0 0.8rem; font-size: 1.35rem; }
.certificate .field {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 0.38rem 0;
  font-variant-numeric: tabular-nums;
}
.certificate .field span { color: var(--muted); }
dl.terms { margin: 0.4rem 0 0; }
dl.terms dt { font-weight: 600; margin-top: 0.85rem; }
dl.terms dd { margin: 0.15rem 0 0; }
.path { padding-left: 1.1rem; }

.meet svg { display: block; width: 100%; height: auto; }
.meet-narrow { display: none; }
.meet figcaption { color: var(--ink); font-size: 1rem; margin-top: 0.9rem; }
.meet-hub {
  border: 2px solid var(--uk);
  background: #fbf8f2;
  padding: 1.35rem 1rem;
}
.meet-hub h3 {
  margin: 0;
  text-align: center;
  font-size: 1.7rem;
}
.meet-narrow > .kicker { margin-top: 1rem; }
.meet-notes { display: grid; gap: 0.65rem; margin-top: 0.85rem; }
.meet-notes article {
  border: 1px solid var(--line);
  background: #fffcf7;
  padding: 0.65rem 0.75rem;
}
.meet-notes article.concept { background: var(--box-concept); border-color: var(--box-concept-line); }
.meet-notes article.gov { background: var(--box-gov); border-color: var(--box-gov-line); }
.meet-notes article.fisc { background: var(--box-fisc); border-color: var(--box-fisc-line); }
.meet-notes article.buyer { background: var(--box-buyer); border-color: var(--box-buyer-line); }
.meet-notes article.corp { background: var(--box-corp); border-color: var(--box-corp-line); }
.meet-notes article.people { background: var(--box-people); border-color: var(--box-people-line); }
.meet-notes h3 { font-size: 1.05rem; margin: 0 0 0.15rem; }
.meet-notes p { margin: 0; }
.path li { margin: 0.35rem 0; }
.further { margin: 1.5rem 0 0; }
.next {
  margin: 0.85rem 0 0;
  font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  font-size: 1.35rem;
}
.next a { text-decoration: none; }
.factor-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 0.2rem;
}
.factor-row article {
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.7rem 0.75rem 0.85rem;
  box-shadow: var(--shadow);
}
.factor-row h3 { margin: 0 0 0.3rem; font-size: 1.25rem; }
.factor-row p { margin: 0.45rem 0 0; font-size: 0.95rem; }
.curve-bands article.short { background: #e7f0f8; border-color: #c5d4e4; }
.curve-bands article.belly { background: #f8f1dc; border-color: #e4d7b4; }
.curve-bands article.long { background: #f8e8e2; border-color: #e4cdc4; }
.factor-row svg { display: block; width: 100%; height: auto; }
.split-bar {
  display: flex;
  width: 100%;
  height: 3.4rem;
  border: 1px solid var(--line);
}
.split-bar span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}
.split-bar b { color: #fbf8f2; font-size: 0.95rem; font-weight: 600; white-space: nowrap; }
.split-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.split-cards a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-top: 4px solid var(--slice, var(--line));
  padding: 0.7rem 0.75rem 0.85rem;
}
.split-cards a:hover { color: var(--ink); }
.split-cards h3 { margin: 0; font-size: 1.15rem; }
.split-cards .pts { margin: 0.3rem 0 0; color: var(--gilt); font-weight: 600; }
.split-cards p { margin: 0.4rem 0 0; font-size: 0.95rem; }
.venn figcaption { color: var(--ink); font-size: 1rem; margin-top: 0.9rem; }
.venn-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.venn-notes article {
  border: 1px solid var(--line);
  background: #fffcf7;
  padding: 0.7rem 0.8rem 0.8rem;
}
.venn-notes article.cpi { background: var(--box-gov); border-color: var(--box-gov-line); }
.venn-notes article.rpi { background: var(--box-fisc); border-color: var(--box-fisc-line); }
.venn-notes article.both { background: #fbf8f2; border-color: #1a3654; }
.venn-notes article.out { background: #efece4; border-color: var(--line); }
.venn-notes h3 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.venn-notes ul { margin: 0; padding-left: 1.15rem; }
.venn-notes li { margin: 0.18rem 0; }
.venn-notes p { margin: 0.45rem 0 0; }

@media (max-width: 800px) {
  body { font-size: 17px; }
  .grid-2, .stats, .stats.four, .gilt-pair, .gilt-calls { grid-template-columns: 1fr; }
  .gilt-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.75rem;
    padding: 0.85rem 0.6rem;
  }
  .gilt-strip .tok { white-space: nowrap; }
  .gilt-calls { margin-top: 0.85rem; }
  .gilt-calls .stem { display: none; }
  .gilt-calls .call + .call { margin-top: 0.7rem; }
  .top { position: static; }
  .meet svg.meet-wide { display: none; }
  .meet-narrow { display: block; }
  .venn-notes { grid-template-columns: 1fr; }
  .factor-row { grid-template-columns: 1fr; }
  .split-cards { grid-template-columns: 1fr; }
  .split-bar b { display: none; }
}
@media (min-width: 801px) and (max-width: 1100px) {
  .split-cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .venn-notes { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 560px) and (max-width: 800px) {
  .meet-notes { grid-template-columns: 1fr 1fr; }
  .meet-notes article.out { grid-column: 1 / -1; }
}
