:root {
  --bg: #f6f7fa;
  --card: #ffffff;
  --ink: #14181f;
  --muted: #667085;
  --line: #e5e8ee;
  --accent: #1f4fd8;
  --accent-soft: #e9effc;
  --up: #15803d;
  --down: #b42318;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; margin: 8px 0 12px; }
h2 { font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; margin: 40px 0 8px; }
h3 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 16px 0 8px; }
.lead { font-size: 17px; color: var(--muted); max-width: 780px; margin: 0 0 16px; }
.note { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.muted { color: var(--muted); }
.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }
.flat { color: var(--muted); }
blockquote { margin: 12px 0; padding: 12px 16px; background: var(--card); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; font-size: 15px; }

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px; padding: 0 20px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.top nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { color: var(--ink); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.top nav a:hover { background: var(--accent-soft); text-decoration: none; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 20px 20px 56px; }
.foot { max-width: 1140px; margin: 0 auto; padding: 20px 20px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.hero { padding: 28px 0 4px; }
.hero h1 { font-size: 42px; max-width: 780px; }
.links { margin: 12px 0 0; font-size: 15px; }
.search { display: flex; gap: 8px; max-width: 600px; margin-top: 20px; }
.search-box { position: relative; flex: 1; min-width: 0; }
.search input { width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #cfd4dc; border-radius: 10px; }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.search button { padding: 12px 20px; font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 10px; cursor: pointer; }
.search button:hover { background: #1843b8; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(20, 24, 31, 0.14); }
.suggest button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 14px; font: inherit; font-size: 15px; text-align: left; color: var(--ink); background: #fff; border: 0; cursor: pointer; }
.suggest button:hover { background: var(--accent-soft); }
.suggest button span { color: var(--muted); font-size: 13px; }

.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 4px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }

.chart { display: block; width: 100%; height: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 8px; }
.ax { font-size: 11px; fill: #667085; font-family: inherit; }
.ax.strong { fill: #14181f; font-weight: 600; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover td { background: #f7f9fd; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* the comparison table reads better with values under left-aligned area names */
.grid.compare th:first-child { width: 34%; white-space: nowrap; }
.grid.compare td.num { text-align: left; }
th[data-k] { cursor: pointer; user-select: none; }
th[data-k]:hover { color: var(--ink); }

.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.controls label, .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.controls select, .controls input, .field input { padding: 9px 10px; font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #cfd4dc; border-radius: 8px; }
.field { max-width: 420px; margin-top: 16px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 12px; font-size: 14px; }
.btn { padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid #cfd4dc; border-radius: 8px; cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: default; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.pager-links { display: flex; justify-content: space-between; margin-top: 32px; font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; font-size: 14px; font-weight: 600; background: var(--accent-soft); color: var(--accent); border-radius: 999px; }
.chip button { width: 22px; height: 22px; font: inherit; font-size: 16px; line-height: 1; color: var(--accent); background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.chip button:hover { background: rgba(31, 79, 216, 0.15); }
.pick-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.pick-list:empty { display: none; }
.pick-list button { width: 100%; padding: 8px 10px; font: inherit; font-size: 14px; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.pick-list button:hover { background: var(--accent-soft); border-color: var(--accent); }

.soft h2 { margin-top: 0; }
.soft p { margin: 0; }

/* plain statements that summarise a page: the first thing a reader or an answer engine sees */
.takeaways { margin: 12px 0 16px; padding: 12px 18px 12px 36px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.takeaways li { margin: 6px 0; padding-left: 4px; }
.takeaways li::marker { color: var(--accent); }
.faq h3 { font-size: 16px; color: var(--ink); margin: 18px 0 4px; }
.faq p { margin: 0 0 8px; }
.cite { font-size: 14px; color: var(--muted); margin-top: 36px; }
.cite p { margin: 0 0 6px; }
.cite.card { margin-top: 16px; }

details.more summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--accent); padding: 8px 0; }
details.more .table-wrap { margin-top: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.pill { display: inline-block; padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.pill:hover { background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }
ul.plain { padding-left: 20px; }

@media (max-width: 640px) {
  h1, .hero h1 { font-size: 28px; }
  .lead { font-size: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 16px; }
  .kpi-value { font-size: 20px; }
  .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .wrap { padding: 16px 14px 40px; }
  .top { padding: 0 12px; }
  .brand { font-size: 15px; }
  .top nav a { padding: 6px 8px; font-size: 13px; }
}
