/* The Box Score — shared styles for the report (index.html) and dashboard (dashboard.html).
   Look: vintage baseball history, cream paper, classic serif type, Fenway-green scoreboard.
   Every text color was checked against WCAG AA (at least 4.5:1) on the background it sits on. */

:root {
  --paper: #f2ebdc;        /* page */
  --card: #f8f4ea;         /* raised surfaces */
  --card-2: #efe7d6;       /* table heads, inputs */
  --ink: #1e1a15;          /* 14.6:1 on paper */
  --ink-2: #463e34;        /* 8.9:1 */
  --muted: #5f5547;        /* 6.2:1 — the lightest text color used anywhere */
  --rule: #d8ccb4;
  --grid: #e4dac6;
  --brick: #8f2a20;        /* 7.0:1 — accent, used sparingly */
  --brick-dark: #6f1f17;
  --slate: #2f3e52;        /* chart series 1 */
  --board: #1f3a2b;        /* scoreboard green */
  --plate: #274834;
  --plate-ink: #f3eee2;    /* 8.8:1 on plate */
  --board-ink: #e6dcc6;    /* 9.1:1 on board */

  /* chart series (dashboard breakdowns) */
  --cat-1: #2f3e52;
  --cat-2: #9a3324;
  --cat-3: #b07d1c;
  --cat-4: #4f8a6e;
  --cat-other: #8a8173;

  --serif-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --plate-font: "Barlow Condensed", "Inter", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --nav-h: 60px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain over the whole page, photos included, so images look printed on the paper */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.28  0 0 0 0 0.2  0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: var(--brick); text-underline-offset: 3px; }
a:hover { color: var(--brick-dark); }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; border-radius: 2px; }
.nowrap { white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- Navigation (shared) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner { display: flex; align-items: center; gap: 28px; min-height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; display: block; }
.brand span { font-family: var(--serif); font-size: 20px; white-space: nowrap; }
.nav a.link { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; padding: 4px 0; }
.nav a.link:hover { color: var(--ink); }
.nav a.link.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brick); }

/* ---------- Report hero: the baseball as a product shot ---------- */
.hero { position: relative; height: 280vh; }
.hero .stage {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 24px;
}
.hero .copy { position: relative; min-height: 380px; }
.step {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  pointer-events: none;
}
.step.on { opacity: 1; transform: none; pointer-events: auto; }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--muted); margin: 0 0 18px; }
.hero h1 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(52px, 7.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}
.hero .sub { font-family: var(--serif); font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; color: var(--ink-2); margin: 0 0 22px; max-width: 24em; }
.byline { font-size: 15px; color: var(--muted); margin: 0; }
.big-stat {
  font-family: var(--serif-display);
  font-size: clamp(64px, 9vw, 128px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-variant-numeric: lining-nums;
}
.big-stat.red { color: var(--brick); }
.stat-line { font-family: var(--serif); font-size: clamp(20px, 1.9vw, 26px); line-height: 1.4; color: var(--ink-2); margin: 0; max-width: 20em; }

.ball-wrap { position: relative; height: min(78vh, 640px); }
.ball-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ball-fallback {
  /* shown only if WebGL is unavailable */
  position: absolute; left: 50%; top: 48%;
  width: min(56%, 360px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #fbf7ee, #e0d0ae 55%, #9d8a68 100%);
  transition: opacity 0.6s var(--ease);
}
.ball-shadow {
  position: absolute; left: 50%; bottom: 7%;
  width: 46%; height: 7%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(60, 44, 25, 0.34), rgba(60, 44, 25, 0));
  filter: blur(4px);
}
.scroll-cue {
  position: absolute; left: 24px; bottom: 28px;
  font-size: 14px; color: var(--muted);
  display: flex; align-items: center; gap: 12px;
  transition: opacity 0.6s var(--ease);
}
.scroll-cue::before { content: ""; width: 40px; height: 1px; background: var(--muted); }

/* ---------- Lead paragraph (the report summary) ---------- */
.lead {
  font-family: var(--serif);
  font-size: clamp(21px, 2.1vw, 27px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 32em;
  margin: 48px 0 88px;
}
.lead .dropcap {
  float: left;
  font-family: var(--serif-display);
  font-size: 3.4em;
  line-height: 0.85;
  padding: 0.06em 0.1em 0 0;
  color: var(--brick);
}

/* ---------- Scoreboard (hand-operated, Fenway / Wrigley style) ---------- */
.board {
  background: var(--board);
  border-radius: 6px;
  padding: 28px 28px 32px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 60px -30px rgba(30, 26, 21, 0.55);
  position: relative;
}
.board::before {
  /* painted pinstripe border */
  content: ""; position: absolute; inset: 10px;
  border: 1px solid rgba(230, 220, 198, 0.28);
  border-radius: 3px; pointer-events: none;
}
.board-head {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px;
  color: var(--board-ink);
  margin: 0 4px 22px;
}
.board-head h2 { font-family: var(--plate-font); font-weight: 600; font-size: 26px; letter-spacing: 0.06em; margin: 0; color: var(--plate-ink); }
.board-head p { font-size: 15px; margin: 0; }
.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.plate-card {
  /* the whole card is a button: flips to the method on click / Enter / Space */
  font: inherit; color: inherit; text-align: left;
  border: 0; padding: 0; background: none; cursor: pointer;
  perspective: 1200px;
  min-height: 188px;
}
.plate-inner {
  display: block; position: relative; height: 100%; min-height: 188px;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
}
.plate-card.flipped .plate-inner { transform: rotateY(180deg); }
.side {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 4px;
  display: flex; flex-direction: column;
}
.side.front, .plate {
  /* the front sits in normal flow, so the card grows to fit its number and label */
  position: relative;
  min-height: inherit;
  background: var(--plate);
  padding: 20px 20px 16px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  display: flex; flex-direction: column;
}
.side.back {
  transform: rotateY(180deg);
  background: var(--card);
  padding: 18px 20px;
  box-shadow: inset 0 0 0 1px var(--rule), inset 0 0 0 5px var(--card), inset 0 0 0 6px rgba(143, 42, 32, 0.55);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}
.side.back strong { display: block; font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--ink); margin-bottom: 6px; }

/* Number plates: sized to their card with container units so no value can overflow */
.plate-num {
  container-type: inline-size;
  display: block;
  flex-shrink: 0;         /* never squeezed shorter than the digits */
  overflow: hidden;       /* the slide-in happens inside this window */
}
.plate-num span {
  display: block;
  font-family: var(--plate-font);
  font-weight: 600;
  font-size: min(64px, 20cqi);
  line-height: 1.05;
  color: var(--plate-ink);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  transform: translateY(-105%);
  transition: transform 0.9s var(--ease);
}
.board.in .plate-num span { transform: none; }
.plate-label { display: block; color: var(--board-ink); font-size: 15px; line-height: 1.4; margin-top: 10px; }
.plate-how {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: auto; padding-top: 12px;
  font-size: 14px; font-weight: 500; color: var(--plate-ink);
  text-decoration: underline; text-decoration-color: rgba(243, 238, 226, 0.45); text-underline-offset: 3px;
}
.plate-card:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; border-radius: 6px; }

.cta-row { margin: 40px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  font-weight: 500; font-size: 16px; text-decoration: none;
  padding: 13px 22px; border-radius: 999px;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.button:hover { background: #3a3129; color: var(--paper); transform: translateY(-1px); }
.cta-note { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Parts ---------- */
.part { margin: 128px 0 40px; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; align-items: baseline; }
.part .num { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--brick); white-space: nowrap; }
.part h2 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(38px, 4.6vw, 60px); line-height: 1.05; margin: 0; }
.part::after { content: ""; grid-column: 1 / -1; height: 1px; background: var(--ink); opacity: 0.85; }

/* Full-width photograph opening a part */
.banner { margin: 0 0 72px; }
.banner .frame {
  position: relative; overflow: hidden;
  aspect-ratio: 21 / 10;
  border-radius: 2px;
  box-shadow: 0 30px 60px -36px rgba(30, 26, 21, 0.6);
}
.banner img { width: 100%; height: 112%; object-fit: cover; display: block; transform: translateY(var(--drift, -6%)); will-change: transform; }

/* ---------- Findings ---------- */
.finding { margin: 0 0 104px; }
.finding .text { max-width: 720px; }
.finding .label { font-size: 15px; font-weight: 500; color: var(--muted); margin: 0 0 10px; }
.finding h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.9vw, 40px); line-height: 1.15; margin: 0 0 20px; letter-spacing: -0.005em; }
.finding p { color: var(--ink-2); margin: 0 0 16px; }
.finding p strong { color: var(--ink); font-weight: 600; }
.finding.with-photo { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 56px; align-items: start; }

.chart-card { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 22px 24px 18px; margin-top: 28px; }
.chart-card h4 { font-family: var(--sans); font-size: 16px; font-weight: 600; margin: 0 0 2px; color: var(--ink); }
.chart-card .note { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.chart-box { position: relative; height: 340px; }
.chart-box.tall { height: 420px; }
.chart-box.short { height: 220px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--ink-2); margin: 14px 0 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.legend i.line { height: 3px; width: 18px; vertical-align: 3px; border-radius: 2px; }

/* Photo beside a finding: duotone print on the page, museum caption */
.photo { margin: 0; position: sticky; top: calc(var(--nav-h) + 40px); }
.photo .frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 24px 48px -28px rgba(30, 26, 21, 0.6);
}
.photo img { width: 100%; height: 108%; object-fit: cover; display: block; transform: translateY(var(--drift, 0px)); will-change: transform; }
.frame::after {
  /* faint vignette like an old print */
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 90px rgba(42, 33, 25, 0.35);
  pointer-events: none;
}
figcaption { font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.5; color: var(--muted); margin-top: 14px; max-width: 60em; }

/* ---------- About the data ---------- */
.about { border-top: 1px solid var(--ink); padding-top: 48px; margin: 128px 0 40px; }
.about h2 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(34px, 3.8vw, 48px); line-height: 1.1; margin: 0 0 28px; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 56px; }
.about h3 { font-family: var(--serif); font-weight: 700; font-size: 19px; margin: 24px 0 8px; }
.about p, .about li { color: var(--ink-2); }
.about ul { padding-left: 1.1em; margin: 0; }
.about li { margin-bottom: 8px; }
.about li strong, .about p strong { color: var(--ink); font-weight: 600; }
.about code { font-size: 0.9em; background: var(--card-2); padding: 1px 6px; border-radius: 3px; color: var(--ink); }
.about .formulas { grid-column: 1 / -1; }

/* ---------- Footer (shared) ---------- */
footer { border-top: 1px solid var(--rule); margin-top: 96px; padding: 48px 0 64px; color: var(--muted); font-size: 15px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.crest { width: 150px; height: 150px; display: block; }  /* ring lettering renders at ~15px at this size */
footer p { margin: 0 0 6px; }
footer .title { font-family: var(--serif); font-size: 19px; color: var(--ink); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Tables (shared) ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 9px 7px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { white-space: normal; padding-left: 12px; min-width: 9em; }
table.data th:last-child, table.data td:last-child { padding-right: 12px; }
table.data th { text-align: left; font-weight: 600; color: var(--ink); background: var(--card-2); position: sticky; top: 0; z-index: 1; }
table.data td { color: var(--ink-2); }
table.data td.num, table.data th.num { text-align: right; }
table.data td.hl, table.data th.hl { background: #eadfc9; color: var(--ink); font-weight: 600; }
table.data tfoot td { font-weight: 600; color: var(--ink); border-top: 1px solid var(--ink); background: var(--card-2); position: sticky; bottom: 0; }

/* ---------- Dashboard ---------- */
.page-head { padding: 72px 0 40px; }
.page-head h1 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(46px, 6vw, 80px); line-height: 1; margin: 0 0 18px; letter-spacing: -0.01em; }
.page-head p { font-family: var(--serif); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 36em; margin: 0; }
.page-head code { font-family: var(--sans); font-size: 0.85em; background: var(--card-2); padding: 1px 6px; border-radius: 3px; color: var(--ink); }

.loading { padding: 64px 0; text-align: center; color: var(--ink-2); font-size: 16px; }
.loading .dot { display: block; width: 36px; height: 36px; margin: 0 auto 14px; border-radius: 50%; border: 2px solid var(--rule); border-top-color: var(--brick); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 20px 22px; margin-bottom: 20px; }
.panel h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; margin: 0 0 4px; color: var(--ink); }
.panel .note { font-size: 14px; color: var(--muted); margin: 0 0 12px; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px 20px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: span 2; }
.field label, .field .label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field select {
  font: inherit; font-size: 15px;
  padding: 10px 36px 10px 12px;
  border: 1px solid #c9bb9f; border-radius: 6px;
  background: #fbf8f1 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%231e1a15' stroke-width='1.6'/></svg>") no-repeat right 12px center;
  color: var(--ink);
  appearance: none; -webkit-appearance: none;
  width: 100%;
}
.field select:hover { border-color: var(--ink-2); }
.btn-reset {
  font: inherit; font-size: 15px; font-weight: 500;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn-reset:hover { background: var(--ink); color: var(--paper); }

.switches { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: end; }
.switches .field:first-child { min-width: 260px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--card-2); border: 1px solid var(--rule); border-radius: 999px; }
.seg button {
  font: inherit; font-size: 15px; font-weight: 500;
  background: transparent; color: var(--ink-2);
  border: 0; border-radius: 999px;
  padding: 7px 16px; cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--paper); }

.view-note { color: var(--ink-2); font-size: 15px; margin: 4px 0 20px; }
.dash-board { margin-bottom: 20px; }
.dash-board .plates { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.dash-board .plate { min-height: 124px; padding: 16px 14px 14px; }
.dash-board .plate-num span { font-size: min(44px, 22cqi); transform: none; }

.chart-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; }
.chart-grid .span-2 { grid-column: 1 / -1; }
.chart-grid .chart-box { height: 320px; }
.table-scroll { max-height: 460px; overflow: auto; border: 1px solid var(--rule); border-radius: 4px; }

/* Narrow screens: each table row becomes a small card of labeled values, so no column is hidden */
@media (max-width: 1100px) {
  .table-scroll { border: 0; max-height: none; overflow: visible; }
  table.data, table.data tbody, table.data tfoot, table.data tr { display: block; }
  table.data thead { display: none; }
  table.data tr { border: 1px solid var(--rule); border-radius: 4px; margin-bottom: 12px; padding: 10px 14px; background: #fbf8f1;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 20px; }
  table.data tfoot tr { background: var(--card-2); border-color: var(--ink); }
  table.data td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 5px 0; background: none; position: static; }
  table.data td::before { content: attr(data-label); color: var(--muted); font-weight: 500; }
  table.data td:first-child { grid-column: 1 / -1; font-family: var(--serif); font-size: 18px; color: var(--ink); padding: 2px 0 6px; border-bottom: 1px solid var(--grid); margin-bottom: 4px; }
  table.data td:first-child::before { content: none; }
  table.data td.hl { background: #eadfc9; margin: 0 -6px; padding: 5px 6px; border-radius: 3px; }
  table.data tfoot td { position: static; border-top: 0; }
}

/* Grid children may shrink below their content width instead of widening the page */
.chart-grid > *, .filters > *, .plates > * { min-width: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .dash-board .plates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finding.with-photo { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .photo { position: relative; top: 0; max-width: 460px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --nav-h: 56px; }
  .nav-inner { gap: 18px; }
  .nav a.link.hide-sm { display: none; }
  .brand span { font-size: 18px; }
  .hero { height: 240vh; }
  .hero .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: 44% 56%; gap: 0; align-items: stretch; }
  .ball-wrap { height: 100%; order: -1; }
  .hero .copy { min-height: 0; }
  .step { justify-content: flex-start; padding-top: 8px; }
  .scroll-cue { display: none; }
  .board { padding: 22px 16px 24px; }
  .chart-box, .chart-box.tall { height: 380px; }
  .banner .frame { aspect-ratio: 16 / 10; }
  .part { margin-top: 96px; }
  .field.wide { grid-column: auto; }
  .dash-board .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .wrap { padding: 0 18px; }
  .nav-inner { gap: 14px; }
  .brand img { width: 30px; height: 30px; }
  .brand { gap: 8px; }
  .plates { grid-template-columns: minmax(0, 1fr); }
  .dash-board .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plate-card, .plate-inner { min-height: 168px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .step, .reveal, .plate-num span, .plate-inner { transition: none; }
  .reveal { opacity: 1; transform: none; }
  .plate-num span { transform: none; }
  .photo img, .banner img { transform: none; }
  .hero { height: 100vh; }
}
