:root {
  --ink: var(--mf-ink, #262626);
  --muted: var(--mf-muted, #808080);
  --accent: var(--mf-blue, #4472C4);
  --line: var(--mf-gridline, #D9D9D9);
  --panel: #fafafa;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--mf-bg, #fff); color: var(--ink); font-family: var(--mf-font, Literata, Georgia, serif); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 16px 80px; }
a { color: var(--accent); }
.crumb { font-size: 14px; margin: 0 0 22px; }
h1 { font-size: 34px; line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 22px; margin: 38px 0 6px; }
.sub { color: var(--muted); font-size: 17px; margin: 0 0 22px; max-width: 820px; line-height: 1.5; }
.note { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; max-width: 880px; }
.note.fine { font-size: 12.5px; }
.note p { margin: 0 0 10px; }
.hint { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 13px; margin-left: 6px; }

/* hero */
.hero { border: 1px solid var(--line); border-left: 5px solid var(--accent); background: var(--panel); border-radius: 6px; padding: 20px 22px; margin: 0 0 8px; }
.hero .kicker { text-transform: uppercase; letter-spacing: .09em; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.hero .lede { font-size: 19px; line-height: 1.45; margin: 0 0 14px; max-width: 920px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 6px; background: #fff; min-height: 96px; padding: 10px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.tile .k { font-size: 12px; color: var(--muted); line-height: 1.3; }
.tile .v { font-size: 26px; font-weight: 700; line-height: 1.2; margin: 2px 0; }
.tile .s { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.tile.lead { border-color: var(--ink); border-width: 2px; }

/* controls: every button in a group the same fixed width */
.ctl-row { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: flex-end; margin: 6px 0 10px; }
.ctl label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.ctl.grow { flex: 1 1 280px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #ccc; border-radius: 6px; overflow: hidden; }
.seg button { font-family: inherit; font-size: 13.5px; width: 160px; height: 36px; border: 0; border-right: 1px solid #ddd; background: #fff;
  color: var(--ink); cursor: pointer; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }
input[type="range"] { width: 100%; height: 32px; accent-color: var(--accent); }

/* tables: every column centered, headers and values alike */
.tablewrap { overflow-x: auto; margin: 0 0 8px; }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; }
table.t th, table.t td { text-align: center; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.t th.wrapcol, table.t td.wrapcol { white-space: normal; }
table.t th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
table.t tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
table.t tr.lead td { font-weight: 700; }
table.t tr.memo td { font-style: italic; border-top: 1px solid var(--line); }
table.t td.muted { color: var(--muted); font-size: 12.5px; }
.pos { color: var(--ink); }
.moved { font-size: 15px; line-height: 1.5; margin: 4px 0 10px; max-width: 880px; }
details { margin: 10px 0 0; }
details summary { cursor: pointer; font-size: 14px; color: var(--accent); }
.swatch { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }

@media (max-width: 600px) {
  h1 { font-size: 28px; }
  .hero .lede { font-size: 17px; }
  .seg button { width: 116px; font-size: 12px; padding: 0 3px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.lead { grid-column: span 2; }
  .tile .v { font-size: 22px; }
  .hide-sm { display: none; }
  table.t { font-size: 13px; }
  table.t th, table.t td { padding: 6px 3px; }
}
