/* Token Price Index: a commodities exchange board. Split-flap tiles for the posted prices,
   signage type for the labels, an exchange-floor tape for the moves. Cheaper is green, dearer red.
   The board itself is a physical black panel in both themes; the room around it changes. */

@font-face {
  font-family: 'Martian Mono';
  src: url('fonts/martian-mono-latin-var.woff2') format('woff2');
  font-weight: 400 700;
  font-stretch: 75% 112.5%;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('fonts/barlow-condensed-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('fonts/barlow-condensed-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ground: #e4e1d9;
  --ground-2: #d8d4ca;
  --ink: #141519;
  --ink-2: #4d4f56;
  --panel: #141518;
  --panel-2: #1d1f23;
  --flap: #26282d;
  --flap-top: #2d3035;
  --flap-ink: #f0efea;
  --hinge: #08090a;
  --amber: #f2b230;
  --amber-ink: #8a5a00;
  --down: #13804a;
  --up: #c4352c;
  --mixed: #8a5a00;
  --down-board: #3ddc84;
  --up-board: #ff6a5c;
  --hover: rgba(20, 21, 25, 0.06);
  --sans: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --num: 'Martian Mono', ui-monospace, Menlo, Consolas, monospace;
  --margin: clamp(16px, 3.2vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ground: #0e0f11;
    --ground-2: #17181b;
    --ink: #ecebe5;
    --ink-2: #a3a39c;
    --panel: #050506;
    --panel-2: #121316;
    --amber-ink: #f2b230;
    --down: #3ddc84;
    --up: #ff6a5c;
    --mixed: #f2b230;
    --hover: rgba(236, 235, 229, 0.06);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --ground: #0e0f11;
  --ground-2: #17181b;
  --ink: #ecebe5;
  --ink-2: #a3a39c;
  --panel: #050506;
  --panel-2: #121316;
  --amber-ink: #f2b230;
  --down: #3ddc84;
  --up: #ff6a5c;
  --mixed: #f2b230;
  --hover: rgba(236, 235, 229, 0.06);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 500 1.1875rem/1.45 var(--sans);
  overflow-x: hidden;
}
main,
.topbar,
.asof,
.foot {
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--margin);
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 140ms var(--ease), text-decoration-color 140ms var(--ease);
}
a:hover {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--amber);
}
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}
code {
  font-family: var(--num);
  font-size: 0.8em;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 10;
  background: var(--amber);
  color: #141519;
  padding: 8px 12px;
}
.skip:focus {
  top: 8px;
}

/* Top bar ------------------------------------------------------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 32px;
  padding-top: 20px;
  padding-bottom: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 700 1.625rem/1 var(--sans);
  letter-spacing: 0.01em;
}
.wordmark b {
  color: var(--amber-ink);
}
.mark {
  width: 34px;
  height: 34px;
}
.mk-tile {
  fill: var(--flap);
}
.mk-hinge {
  stroke: var(--ground);
  stroke-width: 1.5;
}
.mk-arrow {
  fill: none;
  stroke: var(--down-board);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar nav {
  margin-left: auto;
}
.topbar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.topbar nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1875rem;
  padding: 4px 0;
  border-bottom: 3px solid transparent;
}
.topbar nav a:hover {
  border-bottom-color: var(--amber);
}
.topbar nav a[aria-current='page'] {
  border-bottom-color: var(--ink);
}
.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: var(--flap);
  color: var(--flap-ink);
  cursor: pointer;
  transition: transform 160ms var(--ease);
}
.theme-toggle:hover {
  transform: rotate(180deg);
}
.theme-toggle:active {
  transform: rotate(180deg) scale(0.92);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.theme-toggle .half {
  fill: currentColor;
}
.asof {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

/* Split-flap tiles --------------------------------------------------------------------------- */
.flaps {
  display: inline-flex;
  gap: 0.08em;
  font-family: var(--num);
  font-weight: 600;
  font-stretch: 87.5%;
  white-space: nowrap;
  vertical-align: middle;
}
.flap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 0.92em;
  height: 1.42em;
  border-radius: 0.12em;
  background: var(--flap);
  color: var(--flap-ink);
  line-height: 1;
  transform-origin: 50% 50%;
}
/* The upper leaf is a shade lighter; the hinge splits the two leaves. */
.flap::before {
  content: '';
  position: absolute;
  inset: 0 0 50% 0;
  border-radius: 0.12em 0.12em 0 0;
  background: var(--flap-top);
}
.flap::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 1px);
  height: 2px;
  background: var(--hinge);
}
.flap {
  isolation: isolate;
}
.flap::before {
  z-index: -1;
}
.flap-blank {
  color: transparent;
}

/* Hero ------------------------------------------------------------------------------------------ */
.hero {
  padding: 40px 0 28px;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: end;
}
.hero-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.18em 0.5em;
  font-size: clamp(2.25rem, 0.6rem + 3.4vw, 4.25rem);
  line-height: 1;
}
.f-hero .flap {
  width: 0.86em;
}
.hero-lede {
  margin: 0;
  max-width: 36ch;
  font-size: 1.375rem;
  line-height: 1.35;
}

/* The board ------------------------------------------------------------------------------------- */
.board {
  position: relative;
  background: var(--panel);
  color: var(--flap-ink);
  border-radius: 10px;
  padding: 22px clamp(14px, 2.4vw, 36px) 26px;
}
/* Four bolts hold the board to the wall. */
.board::before,
.board::after {
  content: '';
  position: absolute;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3c42;
}
.board::before {
  left: 10px;
}
.board::after {
  right: 10px;
}
.board-title {
  margin: 0 0 14px;
  font: 700 1.375rem/1.2 var(--sans);
  color: var(--amber);
}
.board-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 1rem;
}
.board-table thead th {
  font: 700 1.0625rem/1 var(--sans);
  color: #a9a8a0;
  text-align: left;
  padding: 0 0 4px;
}
.board-table th,
.board-table td {
  padding: 0 0.6em 0 0;
  text-align: left;
}
.board-table .num {
  text-align: right;
}
.board-table th a {
  text-decoration: none;
  display: inline-block;
  border-radius: 4px;
  transition: transform 140ms var(--ease);
}
.board-table th a:hover {
  transform: translateY(-2px);
}
.board-table th a:hover .flap {
  color: var(--amber);
}
.mv-cell {
  white-space: nowrap;
}
.mv-cell .arrow {
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.35em;
  vertical-align: middle;
}
.f-down .flap {
  color: var(--down-board);
}
.f-up .flap {
  color: var(--up-board);
}
.f-mixed .flap,
.f-date .flap {
  color: var(--amber);
}
.board .arrow-down {
  fill: var(--down-board);
}
.board .arrow-up {
  fill: var(--up-board);
}
.board .arrow-mixed {
  fill: var(--amber);
}

/* The tape: a single line of moves running right to left under the board. */
.tape {
  margin: 10px 0 0;
  background: var(--panel-2);
  border-radius: 6px;
  overflow: hidden;
  color: var(--flap-ink);
}
.tape-track {
  display: flex;
  width: max-content;
}
.tape-run {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 10px 20px;
  white-space: nowrap;
  font-family: var(--num);
  font-size: 0.875rem;
}
.tk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tk a {
  text-decoration: none;
}
.tk a:hover {
  text-decoration: underline;
}
.tk .arrow {
  width: 12px;
  height: 12px;
}
.tk-down .tk-p,
.tk-down .arrow {
  color: var(--down-board);
  fill: var(--down-board);
}
.tk-up .tk-p,
.tk-up .arrow {
  color: var(--up-board);
  fill: var(--up-board);
}
.tk-mixed .tk-p,
.tk-mixed .arrow {
  color: var(--amber);
  fill: var(--amber);
}

/* Headline figures ------------------------------------------------------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  margin: 48px 0 0;
  background: var(--ground-2);
}
.stats > div {
  background: var(--ground);
  padding: 4px 24px 8px 0;
}
.stats > div + div {
  padding-left: 24px;
}
.stats dt {
  font-weight: 700;
  color: var(--ink-2);
}
.stats dd {
  margin: 4px 0 2px;
  font: 600 clamp(1.75rem, 1rem + 2vw, 2.75rem)/1.1 var(--num);
  font-variant-numeric: tabular-nums;
}
.stats p {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--ink-2);
}
.c-down {
  color: var(--down);
}

/* Sections and page heads ------------------------------------------------------------------------ */
.sec-title {
  margin: 0;
  font: 700 clamp(2rem, 1.4rem + 1.8vw, 3rem)/1.05 var(--sans);
}
.sec-lede {
  margin: 8px 0 0;
  color: var(--ink-2);
  max-width: 70ch;
}
main > section.board {
  margin-top: 8px;
}
.prices {
  margin-top: 120px;
}
.prices-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 8px 40px;
  margin-bottom: 20px;
}
.page-head {
  padding: 48px 0 32px;
}
.page-title {
  margin: 0;
  font: 700 clamp(2.75rem, 1.5rem + 4.4vw, 5.5rem)/0.95 var(--sans);
  letter-spacing: -0.01em;
}
.page-lede {
  margin: 16px 0 0;
  max-width: 62ch;
  font-size: 1.375rem;
  line-height: 1.35;
}
.window,
.prose > .sec-title,
main > section {
  margin-top: 96px;
}
.window:first-of-type {
  margin-top: 16px;
}
.prose p {
  max-width: 68ch;
}
.prose .sec-title {
  font-size: 2rem;
  margin: 48px 0 8px;
}
.empty {
  font-size: 1.25rem;
  color: var(--ink-2);
}

/* Tabs on the changes page: three counters, each a jump to its window. */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.tabs a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  background: var(--panel);
  color: var(--flap-ink);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  transition: transform 140ms var(--ease);
}
.tabs a:hover {
  transform: translateY(-2px);
}
.tabs a:active {
  transform: translateY(1px);
}
.tab-n {
  font: 600 1.5rem/1 var(--num);
  color: var(--amber);
  background: var(--flap);
  padding: 6px 8px;
  border-radius: 4px;
}

/* Tables ------------------------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
}
.ptable,
.ctable,
.ntable,
.rtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.0625rem;
}
.ptable thead th,
.ctable thead th,
.ntable thead th,
.rtable thead th {
  text-align: left;
  font-weight: 700;
  color: var(--ink-2);
  padding: 8px 14px 8px 0;
  border-bottom: 3px solid var(--ink);
  white-space: nowrap;
}
.ptable td,
.ptable tbody th,
.ctable td,
.ctable tbody th,
.ntable td,
.ntable tbody th,
.rtable td,
.rtable tbody th {
  text-align: left;
  vertical-align: top;
  padding: 9px 14px 9px 0;
  font-weight: 500;
}
tbody tr:nth-child(odd) > * {
  background: transparent;
}
.ptable tbody tr,
.ctable tbody tr,
.ntable tbody tr,
.rtable tbody tr {
  transition: background-color 120ms var(--ease);
}
.ptable tbody tr:hover,
.ctable tbody tr:hover,
.ntable tbody tr:hover,
.rtable tbody tr:hover {
  background: var(--hover);
}
tbody th a {
  font-weight: 700;
  text-decoration: none;
}
tbody th a:hover {
  text-decoration: underline;
  text-decoration-color: var(--amber);
}
.mid {
  display: block;
  font: 400 0.75rem/1.3 var(--num);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
code.mid {
  display: inline;
  font-size: 0.85rem;
}
th.num,
td.num {
  text-align: right !important;
}
.num,
.px,
.date {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
}
.date {
  white-space: nowrap;
}
.px {
  white-space: nowrap;
}
.px-f {
  display: inline-block;
  min-width: 6ch;
  text-align: left;
}
.strong .px {
  font-weight: 700;
}
.free {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--down);
}
.nil {
  color: var(--ink-2);
}
.ptable thead button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.ptable thead button:hover {
  color: var(--ink);
  border-bottom-color: var(--amber);
}
.ptable thead button::after {
  content: '';
  display: inline-block;
  width: 0.6em;
}
.ptable th[aria-sort='ascending'] button,
.ptable th[aria-sort='descending'] button {
  color: var(--ink);
}
.ptable th[aria-sort='ascending'] button::after {
  content: ' \2191';
}
.ptable th[aria-sort='descending'] button::after {
  content: ' \2193';
}
.col-mod {
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.arrow {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}
.arrow-down {
  fill: var(--down);
}
.arrow-up {
  fill: var(--up);
}
.arrow-mixed,
.arrow-flat {
  fill: var(--mixed);
}
tr[hidden] {
  display: none;
}
.mv {
  white-space: nowrap;
}
.mv .was {
  color: var(--ink-2);
  text-decoration-thickness: 1px;
  margin-right: 4px;
}
.mv .pct {
  font-weight: 700;
  margin-left: 6px;
}
.mv-down .pct {
  color: var(--down);
}
.mv-up .pct {
  color: var(--up);
}
.rank {
  color: var(--ink-2);
}
.rtable tbody tr:first-child > * {
  background: var(--ground-2);
}

/* Controls -------------------------------------------------------------------------------------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px 20px;
  margin: 0 0 20px;
  padding: 16px;
  background: var(--ground-2);
  border-radius: 8px;
}
.ctl {
  display: grid;
  gap: 4px;
  font-weight: 700;
}
.ctl-q {
  flex: 1 1 260px;
}
.ctl input[type='search'],
.ctl select {
  font: 500 1.125rem/1.2 var(--sans);
  padding: 9px 10px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--ground);
  color: var(--ink);
}
.ctl input[type='search']:focus-visible,
.ctl select:focus-visible {
  outline-offset: 0;
}
.ctl-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}
.ctl-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--ink);
}
.ctl-status {
  flex-basis: 100%;
  margin: 0;
  color: var(--ink-2);
}

/* Cheapest for a job ------------------------------------------------------------------------------ */
.job {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.job-form {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 22px;
  padding: 22px;
  background: var(--panel);
  color: var(--flap-ink);
  border-radius: 10px;
}
.job-form .ctl select {
  background: var(--flap);
  color: var(--flap-ink);
}
.job-form .ctl-check input {
  accent-color: var(--amber);
}
.slider {
  display: grid;
  gap: 8px;
  font-weight: 700;
}
.slider-label output {
  font: 600 1.75rem/1 var(--num);
  color: var(--amber);
  display: block;
  margin-top: 6px;
}
.slider input {
  width: 100%;
  accent-color: var(--amber);
  min-height: 32px;
}
.slider-ends {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  color: #a9a8a0;
  font-size: 1rem;
}
.needs {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}
.needs legend {
  font-weight: 700;
  padding: 0;
  margin-bottom: 4px;
}
.job-formula {
  margin: 0 0 16px;
  font-size: 1.125rem;
  max-width: 70ch;
}
.job-count {
  color: var(--ink-2);
}

/* Model page ---------------------------------------------------------------------------------------- */
.quote {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 16px 48px;
  margin: 0;
  padding: 28px clamp(16px, 3vw, 36px);
  background: var(--panel);
  color: var(--flap-ink);
  border-radius: 10px;
}
.quote dt {
  font-weight: 700;
  color: #a9a8a0;
  margin-bottom: 10px;
}
.quote dd {
  margin: 0;
  font-size: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
}
.chart {
  margin: 20px 0 0;
  max-width: 900px;
}
.chart svg {
  width: 100%;
  height: auto;
  display: block;
  font-family: var(--num);
  font-size: 12px;
}
.chart .tick path {
  stroke: var(--ground-2);
  stroke-width: 2;
}
.chart text {
  fill: var(--ink-2);
}
.chart .line {
  fill: none;
  stroke-width: 3;
  stroke-linejoin: round;
}
.chart .line-in {
  stroke: var(--amber-ink);
}
.chart .line-out {
  stroke: var(--ink);
}
.chart .lbl-in {
  fill: var(--amber-ink);
  font-weight: 700;
}
.chart .lbl-out {
  fill: var(--ink);
  font-weight: 700;
}
.chart figcaption,
.chart-none {
  color: var(--ink-2);
  font-size: 1.0625rem;
  margin-top: 8px;
}
.events {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.events li {
  display: grid;
  grid-template-columns: 20px 9ch 1fr;
  gap: 10px;
  padding: 6px 0;
  align-items: baseline;
}
.ev-date {
  font-family: var(--num);
  font-size: 0.875rem;
  white-space: nowrap;
}
.facts {
  margin-top: 20px;
}

/* Footer: the name returns at full width, set as signage. ------------------------------------------- */
.foot {
  margin-top: 160px;
  padding-bottom: 40px;
}
.foot-name {
  margin: 0 0 24px;
  font: 700 clamp(3rem, 1rem + 8.6vw, 9.5rem)/0.9 var(--sans);
  letter-spacing: -0.02em;
  color: var(--ground-2);
  white-space: nowrap;
  overflow: hidden;
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px 40px;
  font-size: 1.0625rem;
}
.foot-grid p {
  margin: 0;
}

/* Motion: the board flips its tiles in on arrival; the tape runs. ------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .flips .flap {
    animation: flip 460ms var(--ease) both;
  }
  .tape-track {
    animation: tape 90s linear infinite;
  }
  .tape:hover .tape-track,
  .tape:focus-within .tape-track {
    animation-play-state: paused;
  }
  .hero-lede,
  .stats > div {
    animation: rise 520ms var(--ease) both;
  }
  .stats > div:nth-child(2) {
    animation-delay: 70ms;
  }
  .stats > div:nth-child(3) {
    animation-delay: 140ms;
  }
  .stats > div:nth-child(4) {
    animation-delay: 210ms;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tape {
    overflow-x: auto;
  }
}
@keyframes flip {
  0% {
    transform: perspective(300px) rotateX(-88deg);
    opacity: 0.2;
  }
  60% {
    transform: perspective(300px) rotateX(12deg);
    opacity: 1;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
@keyframes tape {
  to {
    transform: translateX(-50%);
  }
}
@keyframes rise {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* Narrow screens -------------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats > div:nth-child(3) {
    padding-left: 0;
  }
  .job {
    grid-template-columns: 1fr;
  }
  .job-form {
    position: static;
  }
  .col-mod,
  .col-prov {
    display: none;
  }
  .prices-head {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .topbar nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  .topbar .wordmark {
    flex: 1 1 0;
  }
  .hero-title {
    font-size: min(2.1rem, 8.4vw);
  }
  .prices {
    margin-top: 80px;
  }
  .ptable .mid {
    display: none;
  }
  .ptable .px-f,
  .rtable .px-f {
    min-width: 3ch;
  }
  .ptable,
  .rtable,
  .ctable,
  .ntable {
    font-size: 1rem;
  }
  .num,
  .px,
  .date {
    font-size: 0.8125rem;
  }
  .board-table td.num::before {
    content: attr(data-label);
    font: 700 0.9375rem/1 var(--sans);
    color: #a9a8a0;
    margin-right: 6px;
  }
  /* The board becomes two lines per model: the name, then the posted prices. */
  .board-table thead {
    display: none;
  }
  .board-table,
  .board-table tbody {
    display: block;
  }
  .board-table tr {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 6px 10px;
    padding: 8px 0;
    font-size: 0.8125rem;
  }
  .board-table tr > :first-child {
    grid-column: 1 / -1;
  }
  .board-table td.num {
    text-align: left !important;
  }
  .board-table .mv-cell {
    justify-self: end;
  }
  .ptable .col-chg {
    display: none;
  }
  .quote {
    grid-template-columns: 1fr;
  }
  .events li {
    grid-template-columns: 20px 1fr;
  }
  .ev-what {
    grid-column: 2;
  }
  .stats > div,
  .stats > div + div {
    padding: 4px 12px 8px 0;
  }
  .stats > div:nth-child(even) {
    padding-left: 12px;
  }
}

/* Column headings stay in the signage face even over number columns. */
thead th.num {
  font-family: var(--sans);
  font-size: 1.0625rem;
}
.job > * {
  min-width: 0;
}

/* Phones: each price change becomes a short card of three lines. */
@media (max-width: 640px) {
  .ctable thead {
    display: none;
  }
  .ctable,
  .ctable tbody {
    display: block;
  }
  .ctable tr {
    display: grid;
    grid-template-columns: 22px 1fr;
    padding: 10px 0;
  }
  .ctable td,
  .ctable tbody th {
    padding: 2px 0;
  }
  .ctable td.num {
    grid-column: 2;
    text-align: left !important;
  }
  .ctable td.num::before {
    content: attr(data-label);
    display: inline-block;
    width: 3ch;
    font: 700 0.9375rem/1 var(--sans);
    color: var(--ink-2);
  }
  .quote dd {
    font-size: 2rem;
  }
}

/* Board rows: names in full as plain signage, prices on quiet tiles. Split-flap tiles are kept
   for large type only (the title, the model page quote), where the hinge cannot cut a digit. */
.board-table tbody th {
  padding-right: 24px;
  vertical-align: middle;
}
.board-table td {
  vertical-align: middle;
}
.bd-name {
  display: inline-block;
  font: 700 clamp(1.25rem, 1rem + 0.8vw, 1.75rem)/1.1 var(--sans);
  color: var(--flap-ink);
  text-decoration: none;
}
.bd-name:hover {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.bd-id {
  display: block;
  margin-top: 2px;
  font: 400 0.8125rem/1.3 var(--num);
  color: #b4b3ab;
  overflow-wrap: anywhere;
}
.qtile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--panel-2);
  color: #ffffff;
  font: 600 clamp(1.0625rem, 0.9rem + 0.5vw, 1.375rem)/1.2 var(--num);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
:root .board .qtile {
  background: #23252a;
}
.bd-moves {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.q-move .arrow {
  width: 0.75em;
  height: 0.75em;
}
.q-side {
  font: 700 1rem/1 var(--sans);
  color: #c9c8c0;
}
.q-down {
  color: #5cf0a0;
}
.q-down .arrow {
  fill: #5cf0a0;
}
.q-up {
  color: #ff9187;
}
.q-up .arrow {
  fill: #ff9187;
}
.q-date {
  color: var(--amber);
}
@media (max-width: 640px) {
  .board-table tr {
    grid-template-columns: auto auto 1fr;
    align-items: center;
  }
  .board-table .mv-cell {
    justify-self: end;
  }
  .bd-moves {
    align-items: flex-end;
  }
  .qtile {
    font-size: 1rem;
    padding: 4px 8px;
  }
  .board-table td.num::before {
    font-size: 1rem;
    color: #c9c8c0;
  }
}
.bd-moves {
  align-items: stretch;
}
.q-move {
  justify-content: space-between;
}
@media (max-width: 640px) {
  .board-table td.num {
    white-space: nowrap;
  }
}
.q-move {
  min-width: 9.5em;
}
@media (max-width: 640px) {
  .q-move {
    min-width: 7.5em;
  }
}
@media (max-width: 380px) {
  .board-table tr {
    grid-template-columns: auto 1fr;
  }
  .board-table .mv-cell {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .bd-moves {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
