@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/font/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/font/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --stock: #e4e7ee;
  --stock-2: #d7dbe4;
  --plate: #f7f8fb;
  --recess: #ced3de;
  --ink: #0a0c11;
  --ink-2: #4b5364;
  --ink-3: #5b6373;
  --bevel-hi: #ffffff;
  --bevel-lo: #b0b7c5;
  --rule: #c4cad6;
  --rule-soft: #dbdfe8;
  --focus: #1f3fd8;
  --sel: #c9d4ff;

  --seat-w: 100%;
  --strip-gap: 2px;
  --r: 3px;
  --r-lg: 5px;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.34rem + 0.8vw, 2.05rem);
  --step-3: clamp(2rem, 1.66rem + 1.7vw, 3.2rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.4vw, 5rem);

  --sp-1: 0.375rem;
  --sp-2: 0.75rem;
  --sp-3: 1.25rem;
  --sp-4: 2rem;
  --sp-5: 3.25rem;
  --sp-6: 5rem;
  --sp-7: 7.5rem;

  --ease: cubic-bezier(0.16, 0.84, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --stock: #0d1016;
    --stock-2: #10141b;
    --plate: #171b24;
    --recess: #080a0e;
    --ink: #edf0f6;
    --ink-2: #98a1b3;
    --ink-3: #7d8798;
    --bevel-hi: #2d3542;
    --bevel-lo: #04060a;
    --rule: #262d3a;
    --rule-soft: #1c222c;
    --focus: #7d9bff;
    --sel: #24346b;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --stock: #0d1016;
  --stock-2: #10141b;
  --plate: #171b24;
  --recess: #080a0e;
  --ink: #edf0f6;
  --ink-2: #98a1b3;
  --ink-3: #7d8798;
  --bevel-hi: #2d3542;
  --bevel-lo: #04060a;
  --rule: #262d3a;
  --rule-soft: #1c222c;
  --focus: #7d9bff;
  --sel: #24346b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

/* Any display rule beats the UA's [hidden] rule, and this codebase toggles .hidden on
   flex and grid containers. Without this, hiding a control silently does nothing. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--stock);
  color: var(--ink);
  font-family: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  font-size: var(--step-0);
  font-weight: 420;
  line-height: 1.62;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--sel); color: var(--ink); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--stock-2); }
::-webkit-scrollbar-thumb { background: var(--rule); border: 3px solid var(--stock-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }
* { scrollbar-color: var(--rule) var(--stock-2); scrollbar-width: thin; }

:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); font-stretch: 124%; }
h2 { font-size: var(--step-3); font-stretch: 120%; }
h3 { font-size: var(--step-1); font-stretch: 112%; letter-spacing: -0.02em; }

p { margin: 0 0 var(--sp-2); }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-color: currentColor; }

.wrap { width: min(100% - 2rem, 1220px); margin-inline: auto; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--sp-6); margin-bottom: var(--sp-3); }
.prose h3 { margin-top: var(--sp-4); margin-bottom: var(--sp-2); }
.prose p { margin-bottom: var(--sp-2); color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose.doc h2 {
  font-size: var(--step-1);
  font-stretch: 112%;
  letter-spacing: -0.02em;
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule-soft);
}
.prose.doc > :first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose code { font-family: inherit; font-weight: 650; font-size: 0.94em; color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 2px; padding: 0 5px; }
.prose ul { margin: 0 0 var(--sp-2); padding-left: 1.1rem; color: var(--ink-2); }
.prose li { margin-bottom: var(--sp-1); }
.prose li::marker { color: var(--ink-3); }

.label {
  font-size: 0.6875rem;
  font-weight: 650;
  font-stretch: 78%;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1;
}

.bevel {
  background: var(--plate);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 var(--bevel-hi),
    inset 0 -1px 0 var(--bevel-lo),
    inset 1px 0 0 color-mix(in srgb, var(--bevel-hi) 55%, transparent),
    inset -1px 0 0 color-mix(in srgb, var(--bevel-lo) 55%, transparent),
    0 1px 2px rgb(0 0 0 / 0.10),
    0 8px 24px -12px rgb(0 0 0 / 0.28);
}

.recess {
  background: var(--recess);
  border-radius: var(--r);
  box-shadow:
    inset 0 1px 3px rgb(0 0 0 / 0.24),
    inset 0 -1px 0 color-mix(in srgb, var(--bevel-hi) 70%, transparent);
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-3) 0 var(--sp-2);
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
  font-size: 1.28rem;
  font-weight: 900;
  font-stretch: 118%;
  letter-spacing: -0.045em;
  text-decoration: none;
}
.wordmark i { font-style: normal; color: var(--ink-3); font-weight: 500; font-stretch: 88%; }

/* Under 620px the nav becomes a recessed rail on its own row: the same milled well the mode
   switch sits in, with the current page seated as the raised segment. Above it, the rail
   flattens back to plain links and the current page drops out of the row. */
.masthead nav {
  display: flex;
  order: 3;
  width: 100%;
  gap: 2px;
  margin-top: var(--sp-1);
  padding: 2px;
  background: var(--recess);
  border-radius: var(--r);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.18), inset 0 -1px 0 color-mix(in srgb, var(--bevel-hi) 70%, transparent);
  overflow-x: auto;
  scrollbar-width: none;
}
.masthead nav::-webkit-scrollbar { display: none; }
.masthead nav a {
  flex: 1 0 auto;
  padding: 7px clamp(6px, 2.2vw, 14px);
  border-radius: 2px;
  text-align: center;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  white-space: nowrap;
}
.masthead nav a[aria-current='page'] {
  background: var(--plate);
  color: var(--ink);
  box-shadow: inset 0 1px 0 var(--bevel-hi), inset 0 -1px 0 var(--bevel-lo);
}
.masthead nav a:hover { color: var(--ink); }
@media (min-width: 620px) {
  .masthead nav {
    order: 0;
    width: auto;
    gap: var(--sp-3);
    margin-top: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
  }
  .masthead nav a { flex: none; padding: 0; color: var(--ink-2); }
  .masthead nav a[aria-current='page'] { display: none; }
}

.theme-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  padding: 6px;
  cursor: pointer;
  line-height: 0;
  border-radius: 4px;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { width: 17px; height: 17px; }

/* ---------- the plate ---------- */

.plate {
  position: relative;
  padding: var(--sp-3);
  margin-top: var(--sp-2);
}

.plate-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule);
}

.plate-title { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.plate-title h1 { font-size: var(--step-2); font-stretch: 124%; }
.plate-title .count { font-size: var(--step--1); color: var(--ink-3); font-weight: 600; }

.mode-switch {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: var(--r);
  background: var(--recess);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.2);
}
.mode-switch button {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  font-stretch: 80%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 2px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.mode-switch button[aria-pressed='true'] {
  background: var(--plate);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--bevel-hi) inset, 0 1px 2px rgb(0 0 0 / 0.18);
}

/* ---------- seats ---------- */

.seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
}

.seat {
  position: relative;
  min-height: 168px;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: var(--recess);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.24), inset 0 -1px 0 color-mix(in srgb, var(--bevel-hi) 70%, transparent);
  overflow: hidden;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s var(--ease);
}
.seat:hover { box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.24), inset 0 0 0 1.5px var(--ink-3); }

.seat.is-empty { align-items: center; justify-content: center; gap: 0.5rem; color: var(--ink-3); }
.seat.is-empty .plus {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}
.icn { width: 15px; height: 15px; display: block; }
.seat.is-empty .icn { width: 16px; height: 16px; }
.seat.is-empty .seat-n { font-size: 0.6875rem; font-weight: 700; font-stretch: 80%; letter-spacing: 0.12em; text-transform: uppercase; }
.seat.is-lead {
  color: var(--ink);
  background: var(--plate);
  box-shadow: inset 0 0 0 1.5px var(--ink), 0 1px 2px rgb(0 0 0 / 0.12);
}
.seat.is-lead:hover { box-shadow: inset 0 0 0 2px var(--ink), 0 1px 2px rgb(0 0 0 / 0.16); }
.seat.is-lead .plus { border-width: 2px; }

.seat.is-filled { background: var(--plate); box-shadow: inset 0 1px 0 var(--bevel-hi), inset 0 -1px 0 var(--bevel-lo), 0 1px 2px rgb(0 0 0 / 0.12); }

.seat-field {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
}
.seat-field::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--t1);
}
.seat-field.dual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--t2);
  clip-path: polygon(62% 0, 100% 0, 100% 100%, 38% 100%);
}
.seat-name {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 800;
  font-stretch: 104%;
  letter-spacing: -0.015em;
  color: var(--field-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.16);
}
.seat-tag {
  position: relative;
  z-index: 1;
  flex: none;
  margin-left: 5px;
  padding: 1.5px 4px;
  border-radius: 2px;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--field-ink);
  background: color-mix(in srgb, #000 22%, transparent);
  white-space: nowrap;
}

.seat-body { flex: 1; display: grid; place-items: center; padding: 4px; min-height: 0; }
.seat-body img { width: 76px; height: 76px; object-fit: contain; image-rendering: auto; }

.seat-strip {
  display: flex;
  gap: 1px;
  padding: 5px 6px;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.6875rem;
  font-weight: 650;
  color: var(--ink-2);
  justify-content: space-between;
  align-items: center;
}
.seat-strip b { color: var(--ink-2); font-weight: 700; }

.seat-remove {
  position: absolute;
  top: 34px; right: 4px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--plate) 80%, transparent);
  color: var(--ink-3);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.seat.is-filled:hover .seat-remove, .seat-remove:focus-visible { opacity: 1; }
.seat-remove:hover { color: var(--ink); background: var(--plate); }

/* ---------- the strip ---------- */

.strip-wrap { margin-top: var(--sp-3); }

.strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-1);
  flex-wrap: wrap;
}
.strip-head h2 { font-size: 0.8125rem; font-weight: 800; font-stretch: 78%; letter-spacing: 0.12em; text-transform: uppercase; }
.strip-legend { display: flex; gap: var(--sp-2); font-size: 0.6875rem; color: var(--ink-3); font-weight: 600; flex-wrap: wrap; }
.strip-legend span { display: inline-flex; align-items: center; gap: 5px; }
.strip-legend i { width: 12px; height: 14px; border-radius: 2px; display: inline-block; flex: none; }
.strip-legend .lg-open { background: var(--plate); box-shadow: inset 0 0 0 1.5px var(--ink); }
.strip-legend .lg-quad { background: var(--plate); box-shadow: inset 0 0 0 1.5px var(--ink); background-image: linear-gradient(to top, var(--ink-2) 100%, transparent 0); }
.strip-legend .lg-fill { background: var(--plate); background-image: linear-gradient(to top, var(--ink-3) 45%, transparent 45%); box-shadow: inset 0 0 0 1px var(--rule); }

.strip {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: var(--strip-gap);
  padding: var(--strip-gap);
  border-radius: var(--r);
  background: var(--recess);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.22);
}
@media (min-width: 700px) {
  .strip { grid-template-columns: repeat(18, minmax(0, 1fr)); }
}

.col {
  --fill: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 2px;
  overflow: hidden;
  background: var(--plate);
}

.col-type {
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.5625rem;
  font-weight: 800;
  font-stretch: 74%;
  letter-spacing: 0.05em;
  color: var(--col-ink);
  background: var(--col-c);
}

.col-body {
  position: relative;
  height: 44px;
  display: grid;
  place-items: center;
}
.col-body::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 100%;
  transform: scaleY(var(--fill));
  transform-origin: bottom;
  background: var(--col-c);
  opacity: var(--fill-a, 0.9);
  transition: transform 0.42s var(--ease);
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .col-body::before { transition: none; }
}

.col-mark {
  position: relative;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink-2);
}
.col[data-covered='1'] .col-mark { color: var(--col-ink); text-shadow: none; }
.col[data-state='quad'] { box-shadow: inset 0 0 0 1.5px var(--ink); }
.col[data-state='hole'] { box-shadow: inset 0 0 0 1.5px var(--ink); }

.col-pips {
  position: relative;
  display: flex;
  gap: 1.5px;
  height: 12px;
  align-items: center;
  justify-content: center;
}
.col-pips i {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-3);
  display: block;
}
.col-pips i[data-on='1'] { background: var(--ink); }

.col-note {
  position: relative;
  height: 15px;
  display: grid;
  place-items: center;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  border-top: 1px solid var(--rule-soft);
}

/* ---------- verdict ---------- */

.verdict {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
  display: grid;
  gap: var(--sp-2);
}
.verdict-line { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; font-size: var(--step--1); }
.verdict-line .label { flex: none; width: 84px; padding-top: 2px; }
.verdict-line p { margin: 0; color: var(--ink-2); }
.verdict-line b { color: var(--ink); font-weight: 700; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--chip-ink);
  background: var(--chip-c);
}

/* ---------- picker ---------- */

.picker-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--recess) 76%, transparent);
  backdrop-filter: blur(3px);
  z-index: 40;
  display: grid;
  align-items: end;
  justify-items: center;
}
@media (min-width: 700px) { .picker-backdrop { align-items: center; } }

.picker {
  width: min(100%, 560px);
  max-height: min(86vh, 660px);
  display: flex;
  flex-direction: column;
  padding: var(--sp-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
@media (min-width: 700px) { .picker { border-radius: var(--r-lg); } }

.picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: var(--r);
  background: var(--recess);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.2);
}
.picker-search input {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 11px 0;
  min-width: 0;
}
.picker-search input:focus { outline: none; }
.picker-search input::placeholder { color: var(--ink-3); }

.picker-filters { display: flex; gap: 6px; margin-top: var(--sp-2); flex-wrap: wrap; }
.picker-filters button {
  appearance: none; border: 0; cursor: pointer;
  background: var(--recess); color: var(--ink-3);
  font: inherit; font-size: 0.6875rem; font-weight: 650;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 2px;
}
.picker-filters button[aria-pressed='true'] { background: var(--ink); color: var(--plate); }

.picker-list {
  flex: 1;
  overflow-y: auto;
  margin-top: var(--sp-2);
  border-radius: var(--r);
  background: var(--recess);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.2);
  padding: 3px;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 5px 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.pick-row:hover, .pick-row[data-active='1'] { background: var(--plate); }
.pick-row img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.pick-row .nm { flex: 1; font-weight: 650; font-size: 0.875rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .tt { display: flex; gap: 3px; flex: none; }
.pick-row .bst { font-size: 0.6875rem; color: var(--ink-3); font-weight: 650; flex: none; width: 30px; text-align: right; }

.tt-dot { width: 9px; height: 9px; border-radius: 2px; display: block; }

.foil {
  position: relative;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 0.6875rem;
  font-weight: 750;
  color: var(--ink);
  background:
    linear-gradient(102deg,
      color-mix(in srgb, #d4a3ff 42%, var(--plate)) 0%,
      color-mix(in srgb, #9fd8ff 42%, var(--plate)) 26%,
      color-mix(in srgb, #ffe6a3 42%, var(--plate)) 52%,
      color-mix(in srgb, #a8f0d0 42%, var(--plate)) 74%,
      color-mix(in srgb, #ffb8d9 42%, var(--plate)) 100%);
  background-size: 220% 100%;
  background-position: 0 0;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bevel-lo) 40%, transparent);
}
.foil.is-lit { animation: foil 1.1s var(--ease) 1 both; }
@keyframes foil { from { background-position: 0 0; } to { background-position: 120% 0; } }
@media (prefers-reduced-motion: reduce) { .foil.is-lit { animation: none; } }

/* ---------- content sections ---------- */

.band { padding: var(--sp-6) 0; border-top: 1px solid var(--rule); }
.band:first-of-type { border-top: 0; }
.band-inner { display: grid; gap: var(--sp-4); }
@media (min-width: 900px) {
  .band-inner.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--sp-5); align-items: start; }
}

.figure { padding: var(--sp-2); }
.figure figcaption { margin-top: var(--sp-2); font-size: var(--step--1); color: var(--ink-3); }
.figure img { display: block; width: 100%; height: auto; border-radius: var(--r); }

.matrix-scroll { overflow-x: auto; border-radius: var(--r); }
table.matrix { border-collapse: separate; border-spacing: 1px; font-size: 0.75rem; min-width: 660px; width: 100%; }
table.matrix th, table.matrix td { padding: 0; text-align: center; }
table.matrix thead th { height: 24px; }
table.matrix thead th:first-child { width: 34px; }
table.matrix tbody th { width: 34px; text-align: right; padding-right: 6px; font-weight: 800; font-size: 0.625rem; font-stretch: 74%; letter-spacing: 0.05em; color: var(--ink-2); }
table.matrix td { height: 24px; border-radius: 1px; font-weight: 750; color: var(--ink-3); background: var(--plate); }
table.matrix td[data-m='2'] { background: color-mix(in srgb, var(--ink) 82%, transparent); color: var(--plate); }
table.matrix td[data-m='0.5'] { background: color-mix(in srgb, var(--ink) 14%, transparent); color: var(--ink-2); }
table.matrix td[data-m='0'] { background: color-mix(in srgb, var(--ink) 34%, transparent); color: var(--plate); }
table.matrix .th-type {
  display: grid;
  place-items: center;
  width: 100%;
  height: 24px;
  border-radius: 1px;
  font-size: 0.625rem;
  font-weight: 800;
  font-stretch: 74%;
  letter-spacing: 0.03em;
}

.core-list { display: grid; gap: 1px; background: var(--rule-soft); border-radius: var(--r); overflow: hidden; }
.core-row { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-2); align-items: center; padding: 10px 12px; background: var(--plate); }
.core-row .pair { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 0.875rem; }
.core-row .num { font-size: 0.6875rem; color: var(--ink-3); font-weight: 650; }

.meta-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.meta-table th { text-align: left; font-weight: 650; color: var(--ink-3); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.meta-table td { padding: 7px 0; border-bottom: 1px solid var(--rule-soft); color: var(--ink-2); }
.meta-table td:first-child { color: var(--ink); font-weight: 650; }
.meta-table td:last-child { text-align: right; }
/* Spec rows carry sentences rather than figures, so two columns squeezed onto a phone leave the
   value wrapping against a ragged right edge. Stack them instead. */
@media (max-width: 559px) {
  .meta-table.spec tr { display: grid; gap: 1px; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); }
  .meta-table.spec td { padding: 0; border-bottom: 0; }
  .meta-table.spec td:last-child { text-align: left; }
}

details.faq { border-bottom: 1px solid var(--rule-soft); }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: var(--step-0); list-style: none; display: flex; justify-content: space-between; gap: var(--sp-2); align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .icn { flex: none; color: var(--ink-3); }
details.faq summary .icn:last-child { display: none; }
details.faq[open] summary .icn:first-of-type { display: none; }
details.faq[open] summary .icn:last-child { display: block; }
details.faq summary:hover .icn { color: var(--ink); }
details.faq p { color: var(--ink-2); font-size: var(--step--1); padding-bottom: 14px; max-width: 62ch; }

footer.site { padding: var(--sp-5) 0 var(--sp-4); border-top: 1px solid var(--rule); color: var(--ink-3); font-size: var(--step--1); }
footer.site p { max-width: 62ch; }

.foot-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-4); }
.foot-col .label { display: block; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--rule-soft); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-col a { display: inline-block; padding: 3px 0; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.foot-col a:hover { color: var(--ink); }
.foot-note { grid-column: 1 / -1; margin-top: var(--sp-2); }
.foot-note p:last-child { margin-bottom: 0; }
@media (min-width: 760px) {
  .foot-top { grid-template-columns: 10.5rem 10.5rem minmax(0, 1fr); gap: var(--sp-5); }
  .foot-note { grid-column: auto; margin-top: 0; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- breakpoints ---------- */

@media (max-width: 559px) {
  .plate { padding: var(--sp-2); }
  .plate-head { padding-bottom: var(--sp-2); margin-bottom: var(--sp-2); }
  .seat { min-height: 128px; }
  .seat-body img { width: 60px; height: 60px; }
  .seat-field { height: 26px; }
  .seat-name { font-size: 0.72rem; }
  .seats { gap: var(--sp-1); }
  .col-body { height: 38px; }
  .col-mark { font-size: 0.75rem; }
  .band { padding: var(--sp-5) 0; }
}
@media (min-width: 560px) {
  .seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .seats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .seat { min-height: 196px; }
  .seat-body img { width: 92px; height: 92px; }
  .col-body { height: 76px; }
  .col-type { height: 24px; font-size: 0.5625rem; }
  .plate { padding: var(--sp-4); }
}
@media (min-width: 1100px) {
  .col-mark { font-size: 0.9375rem; }
}

/* ---------- competitive mode ---------- */

.plate[data-mode='competitive'] .seats { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.plate[data-mode='competitive'] .seat { min-height: 0; }
.plate[data-mode='competitive'] .seat.is-filled {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  grid-template-areas: 'field field' 'body set' 'strip strip';
  align-items: start;
}
.plate[data-mode='competitive'] .seat-field { grid-area: field; }
.plate[data-mode='competitive'] .seat-body { grid-area: body; padding: 10px; }
.plate[data-mode='competitive'] .seat-strip { grid-area: strip; }
.plate[data-mode='competitive'] .seat-set { grid-area: set; }
.plate[data-mode='competitive'] .seat.is-empty { min-height: 84px; flex-direction: row; gap: 10px; }
.plate[data-loading] .seats { opacity: 0.55; }

.seat-set {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 10px 12px 12px 0;
  align-content: start;
}

.fld { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fld > span {
  font-size: 0.625rem;
  font-weight: 700;
  font-stretch: 78%;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.fld select, .fld textarea {
  appearance: none;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--recess);
  border: 0;
  border-radius: 2px;
  padding: 6px 8px;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.18);
}
.fld select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: right 11px center, right 6px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 22px;
}
.fld select:disabled { color: var(--ink-3); }
.fld textarea { resize: vertical; line-height: 1.45; font-size: 0.78rem; }

.evs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.ev { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev > span {
  font-size: 0.5625rem;
  font-weight: 800;
  font-stretch: 74%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
.ev input {
  appearance: textfield;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  background: var(--recess);
  border: 0;
  border-radius: 2px;
  padding: 5px 2px;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.18);
}
.ev input::-webkit-outer-spin-button, .ev input::-webkit-inner-spin-button { appearance: none; margin: 0; }

.ev-total {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  font-size: 0.6875rem;
  font-weight: 650;
  color: var(--ink-3);
}
.ev-total.is-over { color: var(--ink); font-weight: 750; }

.legality {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 88%;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.legality::before {
  content: '';
  width: 9px; height: 9px;
  flex: none;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.legality[data-legal='1']::before { background: currentColor; }
.legality[data-legal='0'] { color: var(--ink); }

.paste-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
}
.paste-actions { display: flex; gap: 6px; }
.paste-actions button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: 2px;
  color: var(--plate);
  background: var(--ink);
}
.paste-actions button:hover { background: var(--ink-2); }
.paste-note { grid-column: 1 / -1; margin: 0; min-height: 1.1em; font-size: 0.75rem; color: var(--ink-3); font-weight: 600; }

.picker-empty { padding: 18px; color: var(--ink-3); font-size: 0.875rem; margin: 0; }

@media (min-width: 900px) {
  .plate[data-mode='competitive'] .seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 559px) {
  .plate[data-mode='competitive'] .seat.is-filled {
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .seat-set { grid-template-columns: minmax(0, 1fr); padding: 8px 10px 10px 0; }
  .evs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .paste-bar { grid-template-columns: minmax(0, 1fr); }
}

/* competitive: the strip is the read this mode needs most, so it leads and sticks */
.plate[data-mode='competitive'] { display: flex; flex-direction: column; }
.plate[data-mode='competitive'] > .plate-head { order: 0; }
.plate[data-mode='competitive'] > .strip-wrap {
  order: 1;
  position: sticky;
  top: 0;
  z-index: 5;
  margin-top: 0;
  padding: 8px 0 10px;
  background: var(--plate);
  box-shadow: 0 10px 16px -14px rgb(0 0 0 / 0.55);
}
.plate[data-mode='competitive'] > .verdict { order: 2; margin-top: var(--sp-2); padding-top: var(--sp-2); }
.plate[data-mode='competitive'] > .paste-bar { order: 3; }
.plate[data-mode='competitive'] > .seats { order: 4; margin-top: var(--sp-3); }

.plate[data-mode='competitive'] .col-body { height: 30px; }
.plate[data-mode='competitive'] .col-type { height: 18px; }
.plate[data-mode='competitive'] .col-note { height: 13px; }
.plate[data-mode='competitive'] .col-mark { font-size: 0.8125rem; }

/* the sticky band on a phone would eat a quarter of the viewport; leading is enough there */
@media (max-width: 699px) {
  .plate[data-mode='competitive'] > .strip-wrap { position: static; box-shadow: none; }
}

/* the matrix scrolls sideways on a phone; the attacking-type column has to stay readable */
.matrix-scroll { position: relative; }
table.matrix tbody th,
table.matrix thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--stock);
}

/* ---------- type calculator ---------- */

.tc-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: var(--sp-3);
}
@media (min-width: 560px) { .tc-picker { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 900px) { .tc-picker { grid-template-columns: repeat(9, minmax(0, 1fr)); } }

.tbtn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 800;
  font-stretch: 80%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 4px;
  border-radius: 2px;
  color: var(--ink-3);
  background: var(--recess);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.18);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.tbtn:hover { color: var(--ink); }
.tbtn[aria-pressed='true'] {
  background: var(--c);
  color: var(--ci);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), inset 0 -1px 0 rgb(0 0 0 / 0.22);
}

.tc-clear {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 8px 13px;
  border-radius: 2px;
  color: var(--plate);
  background: var(--ink);
}

.tc-board {
  border-radius: var(--r);
  background: var(--recess);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.22);
  padding: 3px;
}
.tc-h {
  font-size: 0.75rem;
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 11px 12px 7px;
}
.tc-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 9px 12px;
  background: var(--plate);
  border-radius: 2px;
  margin-bottom: 2px;
}
@media (min-width: 760px) { .tc-row { grid-template-columns: 46px minmax(0, 1fr) 132px; } }
.tc-row .label { padding-top: 3px; font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--ink); }
.tc-cells { display: flex; flex-wrap: wrap; gap: 4px; }
.tc-none { font-size: 0.8125rem; color: var(--ink-3); font-weight: 600; }
.tc-note { font-size: 0.6875rem; color: var(--ink-3); font-weight: 600; text-align: right; display: none; }
@media (min-width: 760px) { .tc-note { display: block; } }
.tc-empty { margin: 0; padding: 22px 14px; color: var(--ink-3); background: var(--plate); border-radius: 2px; }

/* ---------- nature chart ---------- */

.nt-filters { display: flex; gap: 10px; }
.nt-filters .fld { min-width: 128px; }

.nt-wrap { overflow-x: auto; border-radius: var(--r); }
table.nt-grid { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 540px; }
table.nt-grid th { padding: 0; }
.nt-h {
  display: block;
  font-size: 0.6875rem;
  font-weight: 800;
  font-stretch: 76%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 6px 4px;
  white-space: nowrap;
}
table.nt-grid tbody th { text-align: right; }
table.nt-grid td { padding: 0; }
.nt-cell {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--plate);
  padding: 12px 6px;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 var(--bevel-hi), inset 0 -1px 0 var(--bevel-lo);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nt-cell:hover { background: var(--stock-2); }
.nt-cell[data-selected='1'] { background: var(--ink); color: var(--plate); box-shadow: none; }
td[data-dim='1'] { opacity: 0.26; }
.nt-neutral {
  text-align: center;
  color: var(--ink-3);
  background: var(--recess);
  border-radius: 2px;
  font-weight: 700;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.18);
}
.nt-neutral-note { margin: var(--sp-2) 0 0; font-size: var(--step--1); color: var(--ink-2); }
.nt-neutral-note strong { color: var(--ink); }

/* ---------- random generator ---------- */

.rp-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px) { .rp-filters { grid-template-columns: 100px 1fr 1fr auto auto; align-items: end; } }

.fld.chk { flex-direction: row; align-items: center; gap: 8px; }
.fld.chk input { width: 17px; height: 17px; accent-color: var(--ink); flex: none; }
.fld.chk span {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-2);
}

.rp-roll {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 800;
  font-stretch: 80%;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 11px 26px;
  border-radius: 2px;
  color: var(--plate);
  background: var(--ink);
}
.rp-roll:hover { background: var(--ink-2); }
.rp-roll:active { transform: translateY(1px); }

.rp-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 30px 16px;
  text-align: center;
  color: var(--ink-3);
  background: var(--recess);
  border-radius: var(--r);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.2);
}
.rp-empty strong { color: var(--ink); }

.rp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
}
.rp-send, .rp-copy {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 10px 15px;
  border-radius: 2px;
  text-decoration: none;
}
.rp-send { color: var(--plate); background: var(--ink); }
.rp-copy { color: var(--ink); background: var(--recess); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.16); }
.rp-note { margin: 0; font-size: 0.75rem; color: var(--ink-3); font-weight: 600; }

/* ---------- damage calculator ---------- */

.dc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
@media (min-width: 860px) { .dc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.dc-side {
  border-radius: var(--r);
  background: var(--recess);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.2);
  padding: 3px;
}
.dc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
}
.dc-pick {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 2px;
  color: var(--plate);
  background: var(--ink);
}
.dc-mon { background: var(--plate); border-radius: 2px; overflow: hidden; }
.dc-mon-body { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 10px; align-items: start; }
.dc-mon-body img { width: 72px; height: 72px; object-fit: contain; }
.dc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.dc-mon .evs { padding: 0 10px 10px; }
.dc-moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; padding: 0 10px 12px; }
.dc-empty { margin: 0; padding: 26px 14px; text-align: center; color: var(--ink-3); background: var(--plate); border-radius: 2px; }

.dc-swap {
  appearance: none; border: 0; cursor: pointer; font: inherit;
  font-size: 0.6875rem; font-weight: 700; font-stretch: 80%;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 2px;
  color: var(--ink); background: var(--recess);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.16);
}

.dc-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
  align-items: end;
}
@media (min-width: 760px) { .dc-field { grid-template-columns: 1fr 1fr auto auto auto auto; } }

.dc-results { margin-top: var(--sp-3); }
.dc-out { border-radius: var(--r); background: var(--recess); box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.2); padding: 3px; }
.dc-out-head { margin: 0; padding: 10px 12px; font-size: var(--step--1); color: var(--ink-2); }
.dc-out-head strong { color: var(--ink); }
.dc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 2px;
  background: var(--plate);
  border-radius: 2px;
}
@media (min-width: 760px) { .dc-row { grid-template-columns: 150px minmax(90px, 1fr) 168px 150px; } }
.dc-move { font-weight: 700; font-size: 0.875rem; }
.dc-bar { display: block; height: 9px; border-radius: 2px; background: var(--recess); overflow: hidden; box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.2); }
.dc-bar i { display: block; height: 100%; background: var(--c); }
.dc-num { font-size: 0.8125rem; color: var(--ink-2); }
.dc-num b { color: var(--ink); font-weight: 750; }
.dc-verdict { font-size: 0.8125rem; font-weight: 750; color: var(--ink); }
@media (min-width: 760px) { .dc-verdict { text-align: right; } }

/* the defender panel has no move rows, so it must not stretch to match the attacker */
.dc-grid { align-items: start; }
