/* ==========================================================================
   The market pages (/huurmarkt/, its cities, its method page). Built on the site tokens
   (tokens.css) and the pilot page system (seo-pilot.css): this file adds the figure
   tiles, the charts, the tables and the notes the approved draft
   (docs/design/2026-10-19-market-pages-draft/) uses. Charts are drawn by
   market-charts.js; every chart also has a server-rendered table.
   ========================================================================== */

.market-page {
  --market-compare: #858f95; /* the national bars beside a city: 3.3:1 on white, as WCAG asks of a graphic */
  --market-grid: var(--line);
}

.market-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- hero ---------- */
.market-hero {
  border-bottom: 1px solid var(--line);
}

.market-hero__content {
  max-width: 760px;
  padding-block: var(--s-8) var(--s-7);
}

.market-hero h1 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--display);
  font-size: var(--t-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.market-deck {
  max-width: 60ch;
  margin: var(--s-5) 0 0;
  color: var(--ink-soft);
  font-size: var(--t-20);
  line-height: 1.5;
}

/* The coverage note under the deck: quiet, but on every page with figures, before the first figure. */
.market-coverage {
  max-width: 60ch;
  margin: var(--s-4) 0 0;
  border-left: 3px solid var(--brand);
  padding: var(--s-2) 0 var(--s-2) var(--s-4);
  color: var(--ink-soft);
  font-size: var(--t-15);
  line-height: 1.5;
}

.market-crumbs {
  padding-top: var(--s-5);
  color: var(--ink-muted);
  font-size: var(--t-13);
}

.market-crumbs a {
  color: var(--ink-muted);
}

.market-crumbs a:hover {
  color: var(--brand-deep);
}

.market-preview {
  margin: 0;
  padding: var(--s-3) var(--pad-inline);
  background: var(--graphite);
  color: var(--on-dark);
  font-size: var(--t-13);
  text-align: center;
}

/* ---------- headline tiles ---------- */
.market-proof {
  background: var(--graphite);
  color: var(--on-dark);
}

.market-proof__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.market-proof__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.market-proof__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.market-proof__grid--1 { grid-template-columns: minmax(0, 1fr); }

.market-tile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--on-dark-line);
  padding: var(--s-6) var(--s-5);
}

.market-tile:last-child {
  border-right: 1px solid var(--on-dark-line);
}

.market-tile__label {
  color: var(--on-dark-muted);
  font-family: var(--mono);
  font-size: var(--t-11);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.market-tile__value {
  margin-top: var(--s-3);
  color: var(--on-dark);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.market-tile__delta {
  margin-top: var(--s-1);
  color: var(--brand-on-dark);
  font-size: var(--t-15);
  font-weight: 600;
}

.market-tile__sub {
  margin-top: var(--s-1);
  color: var(--on-dark-soft);
  font-size: var(--t-15);
  line-height: 1.45;
}

.market-sample {
  margin: 0;
  border-top: 1px solid var(--on-dark-line);
  padding: var(--s-3) 0 var(--s-5);
  color: var(--on-dark-soft);
  font-size: var(--t-15);
}

/* ---------- blocks ---------- */
.market-block {
  padding-top: var(--pad-block);
}

.market-blocks {
  padding-bottom: var(--pad-block);
}

.market-block__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--s-7);
  align-items: start;
}

.market-block h2 {
  max-width: 22ch;
  margin: 0;
  font-family: var(--display);
  font-size: var(--t-section);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.market-block p {
  max-width: 62ch;
  color: var(--ink-soft);
}

.market-figure {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: var(--s-5);
  background: var(--paper);
}

.market-figure + .market-figure {
  margin-top: var(--s-4);
}

.market-figure h3 {
  margin: 0 0 2px;
  font-size: var(--t-15);
}

.market-figure__cap {
  margin: 0 0 var(--s-4);
  color: var(--ink-muted);
  font-size: var(--t-13);
}

.market-figure__foot {
  margin: var(--s-3) 0 0;
  color: var(--ink-muted);
  font-size: var(--t-13);
}

.market-canvas {
  position: relative;
}

.market-canvas svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.market-canvas svg:focus:not(:focus-visible),
.market-canvas [tabindex]:focus:not(:focus-visible) {
  outline: none;
}

.market-canvas svg[tabindex] {
  touch-action: pan-y;
}

.market-canvas svg[tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: 4px;
}

.market-canvas .m-bar:focus-visible {
  stroke: var(--ink);
  stroke-width: 2px;
}

.market-canvas .m-grid { stroke: var(--market-grid); stroke-width: 1; }
.market-canvas .m-bar { fill: var(--brand); }
.market-canvas .m-bar--compare { fill: var(--market-compare); }
/* Social housing and the free sector keep the colours of their rent classes in the class chart. */
.market-canvas .m-bar--social { fill: var(--market-class-low); }
.market-canvas .m-bar--free { fill: var(--market-class-high); }
.market-canvas .m-bar.is-active { stroke: var(--ink); stroke-width: 2px; } /* an outline, not a fade: a faded fill drops under 3:1 */
.market-canvas .m-area { fill: var(--brand); fill-opacity: 0.1; }
.market-canvas .m-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.market-canvas .m-line--rebuilt { stroke-dasharray: 5 4; }
.market-canvas .m-dot { fill: var(--brand); stroke: var(--paper); stroke-width: 2; }
.market-canvas .m-cross { stroke: var(--line-strong); stroke-width: 1; }
.market-canvas .m-label { fill: var(--ink); font-size: 14px; }
.market-canvas .m-label--strong { font-weight: 600; }
.market-canvas .m-label--muted { fill: var(--ink-muted); font-size: 13px; }
.market-canvas .m-axis { fill: var(--ink-muted); font-size: 12px; }

.market-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-3);
  color: var(--ink-soft);
  font-size: var(--t-13);
}

.market-legend span::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 3px;
  background: var(--c, var(--brand));
  vertical-align: -1px;
}

.market-legend .is-compare {
  --c: var(--market-compare);
}

.market-legend .is-social { --c: var(--market-class-low); }
.market-legend .is-free { --c: var(--market-class-high); }

/* The rent classes: one bar in three parts. Each fill reaches 3:1 on white (WCAG asks it of a graphic);
   the share inside the light part is ink, inside the darker parts white. */
.market-page {
  --market-class-low: var(--brand-numeral, #5c9380);
  --market-class-mid: var(--brand);
  --market-class-high: #123b2d;
}

.market-canvas .m-seg--low { fill: var(--market-class-low); }
.market-canvas .m-seg--mid { fill: var(--market-class-mid); }
.market-canvas .m-seg--high { fill: var(--market-class-high); }
.market-canvas .m-seg.is-active { stroke: var(--ink); stroke-width: 2px; }
.market-canvas .m-seg:focus-visible { stroke: var(--ink); stroke-width: 2px; }
.market-canvas .m-seg-label { fill: #ffffff; font-size: 14px; font-weight: 600; pointer-events: none; }
.market-canvas .m-seg-label--low { fill: var(--ink); }

.market-legend--stack {
  flex-direction: column;
  gap: var(--s-2);
}

.market-legend--stack strong {
  color: var(--ink);
  font-weight: 600;
}

.market-legend .m-key--low { --c: var(--market-class-low); }
.market-legend .m-key--mid { --c: var(--market-class-mid); }
.market-legend .m-key--high { --c: var(--market-class-high); }

/* The other stacked bars: the new listings per type of website and per type of home. Four colours in the
   order of the parts (the light one carries ink, the rest white, each 4.5:1 for its share) and the grey of
   the rest of the whole, which carries ink too. Every fill reaches 3:1 on white. */
.market-page {
  --market-part-4: #9a5b13;
}

.market-canvas .m-seg--allocation,
.market-canvas .m-seg--room { fill: var(--market-class-low); }
.market-canvas .m-seg--corporation,
.market-canvas .m-seg--studio { fill: var(--market-class-mid); }
.market-canvas .m-seg--direct,
.market-canvas .m-seg--apartment { fill: var(--market-class-high); }
.market-canvas .m-seg--platform,
.market-canvas .m-seg--house { fill: var(--market-part-4); }
.market-canvas .m-seg--rest { fill: var(--market-compare); }
.market-canvas .m-seg-label--allocation,
.market-canvas .m-seg-label--room,
.market-canvas .m-seg-label--rest { fill: var(--ink); }

.market-legend .m-key--allocation,
.market-legend .m-key--room { --c: var(--market-class-low); }
.market-legend .m-key--corporation,
.market-legend .m-key--studio { --c: var(--market-class-mid); }
.market-legend .m-key--direct,
.market-legend .m-key--apartment { --c: var(--market-class-high); }
.market-legend .m-key--platform,
.market-legend .m-key--house { --c: var(--market-part-4); }
.market-legend .m-key--rest { --c: var(--market-compare); }

/* ---------- the one-site marker ----------
   A value that comes mostly from one website shows with its marker in words beside it, and its bar,
   column or part is hatched in its own colour with an outline in that colour (the outline keeps 3:1). */
.market-canvas .m-hatch-bg { fill: var(--paper); }
.market-canvas .m-hatch { stroke: var(--brand); stroke-width: 3; }
.market-canvas .m-hatch--social,
.market-canvas .m-hatch--low { stroke: var(--market-class-low); }
.market-canvas .m-hatch--mid { stroke: var(--market-class-mid); }
.market-canvas .m-hatch--free,
.market-canvas .m-hatch--high { stroke: var(--market-class-high); }
.market-canvas .m-hatch--room { stroke: var(--market-class-low); }
.market-canvas .m-hatch--studio { stroke: var(--market-class-mid); }
.market-canvas .m-hatch--apartment { stroke: var(--market-class-high); }
.market-canvas .m-hatch--house { stroke: var(--market-part-4); }
.market-canvas .m-marked { stroke: var(--brand); stroke-width: 1.5px; }
.market-canvas .m-bar--social.m-marked,
.market-canvas .m-seg--low.m-marked { stroke: var(--market-class-low); }
.market-canvas .m-seg--mid.m-marked { stroke: var(--market-class-mid); }
.market-canvas .m-bar--free.m-marked,
.market-canvas .m-seg--high.m-marked { stroke: var(--market-class-high); }
.market-canvas .m-seg--room.m-marked { stroke: var(--market-class-low); }
.market-canvas .m-seg--studio.m-marked { stroke: var(--market-class-mid); }
.market-canvas .m-seg--apartment.m-marked { stroke: var(--market-class-high); }
.market-canvas .m-seg--house.m-marked { stroke: var(--market-part-4); }
.market-canvas .m-bar.is-active,
.market-canvas .m-seg.is-active { stroke: var(--ink); stroke-width: 2px; }

.market-legend .is-marked::before {
  background: repeating-linear-gradient(45deg, var(--c, var(--ink-muted)) 0 2px, var(--paper) 2px 5px);
  box-shadow: inset 0 0 0 1.5px var(--c, var(--ink-muted));
}

.market-legend:not(.market-legend--stack) .is-marked {
  --c: var(--ink-muted);
}

.market-legend .m-key-mark {
  color: var(--ink-muted);
}

.market-legend .m-key-mark::before {
  content: none;
}

/* The marker under a value in a table: muted, and it wraps inside its cell, so it never widens a table. */
.market-mark {
  display: block;
  color: var(--ink-muted);
  font-size: var(--t-13);
  font-weight: 400;
  line-height: 1.3;
  white-space: normal;
}

.market-table .market-mark {
  max-width: 14em;
  margin-left: auto;
}

/* The quieter lines of a tile: the middle half under a rent, the count per 10,000 inhabitants. */
.market-tile__more {
  margin-top: var(--s-1);
  color: var(--on-dark-soft);
  font-size: var(--t-13);
  line-height: 1.4;
}

/* The one plain sentence of a block (the largest home type). */
.market-lead {
  color: var(--ink);
  font-size: var(--t-17);
  font-weight: 600;
}

.market-lead .market-mark {
  margin-top: var(--s-1);
}

/* The middle half under a median in a size table: only on a phone, where its own column is folded away. */
.market-range-inline {
  display: none;
}

.market-tile__mark {
  margin-top: var(--s-1);
  color: var(--on-dark-soft);
  font-size: var(--t-13);
  line-height: 1.4;
}

/* The one line under a block with a marked figure, linking to the method page. */
.market-block .market-marked-note,
.market-marked-note {
  margin: var(--s-4) 0 0;
  color: var(--ink-muted);
  font-size: var(--t-13);
}

.market-marked-note a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.market-marked-note a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.market-proof .market-marked-note {
  margin: 0;
  padding: 0 0 var(--s-5);
  color: var(--on-dark-soft);
}

.market-proof .market-sample + .market-marked-note {
  margin-top: calc(-1 * var(--s-3));
}

.market-proof .market-marked-note a {
  color: var(--on-dark);
}

/* The CBS credit (its licence, CC BY 4.0, asks for it) wherever a figure per 10,000 inhabitants shows, linking
   to the method page. Under the tiles it sits on the dark band, like the marked note. */
.market-credit {
  margin: var(--s-3) 0 0;
  color: var(--ink-muted);
  font-size: var(--t-13);
}

.market-credit a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.market-credit a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* The invitation to cite the figures: a plain line under the method block and on the method page. */
.market-cite {
  margin: var(--s-4) 0 0;
  color: var(--ink-muted);
  font-size: var(--t-13);
}

.market-proof .market-credit {
  margin: 0;
  padding: 0 0 var(--s-5);
  color: var(--on-dark-soft);
}

.market-proof .market-sample + .market-credit,
.market-proof .market-credit + .market-marked-note {
  margin-top: calc(-1 * var(--s-3));
}

.market-proof .market-credit a {
  color: var(--on-dark);
}

/* The legal limits under the class chart and on the method page: short rows that wrap on a phone. */
.market-limits {
  margin-top: var(--s-4);
}

.market-prose .market-limits {
  margin-bottom: var(--s-4);
}

.market-table.market-table--compact {
  font-size: var(--t-13);
}

/* The rent by size: a compact table per sector, under its own heading. */
.market-size + .market-size {
  margin-top: var(--s-5);
}

.market-size h3 {
  margin: 0 0 var(--s-2);
  font-size: var(--t-15);
}

.market-size .market-small {
  margin: var(--s-2) 0 0;
}

/* The city table's sector columns have long heads: they wrap, so the table stays narrow. */
.market-table--cities thead th {
  min-width: 7.5em;
  white-space: normal;
}

.market-table.market-table--compact th,
.market-table.market-table--compact td {
  padding: 8px 12px;
  white-space: normal;
}

.market-tip {
  position: absolute;
  z-index: 5;
  border-radius: var(--r-s);
  padding: 6px 10px;
  background: var(--graphite);
  color: var(--on-dark);
  font-size: var(--t-13);
  width: max-content;
  max-width: min(260px, calc(100vw - 32px));
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -110%);
  transition: opacity 120ms var(--ease);
}

.market-tip strong {
  display: block;
  font-size: var(--t-15);
}

.market-tip.is-on {
  opacity: 1;
}

/* Without the script the table is the figure; with it, the table folds away under the chart. */
.market-tableview {
  margin-top: var(--s-3);
  color: var(--ink-muted);
  font-size: var(--t-13);
}

.market-scroll {
  overflow-x: auto;
}

.market-scroll:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.market-tableview summary {
  display: none;
  cursor: pointer;
}

.market-figure--drawn .market-tableview summary {
  display: list-item;
}

.market-tableview summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ---------- tables ---------- */
.market-tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--paper);
}

.market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-15);
}

.market-tableview .market-table {
  margin-top: var(--s-2);
  font-size: var(--t-13);
}

.market-table th,
.market-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.market-tableview .market-table th,
.market-tableview .market-table td {
  padding: 6px 10px;
}

.market-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.market-table thead th {
  background: var(--paper-2);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: var(--t-11);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.market-table tbody th {
  color: var(--ink);
  font-weight: 600;
}

.market-table tbody tr:last-child > * {
  border-bottom: 0;
}

.market-table tbody tr:hover {
  background: var(--paper-2);
}

.market-table a {
  color: var(--brand-deep);
  font-weight: 600;
}

.market-thin {
  color: var(--ink-muted);
  font-size: var(--t-13);
}

/* A held-back value ("vooral één website") may wrap inside its cell, so it never widens a table on a phone. */
.market-table .market-thin {
  display: inline-block;
  white-space: normal;
  line-height: 1.3;
}

.market-small {
  color: var(--ink-muted);
  font-size: var(--t-13);
}

/* ---------- chips, notes, empty states ---------- */
.market-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
}

.market-chips a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  padding: 6px 16px;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--t-15);
  text-decoration: none;
}

.market-chips a:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
}

.market-chips a:focus-visible,
.market-table a:focus-visible,
.market-crumbs a:focus-visible,
.market-prose a:focus-visible,
.market-changes a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.market-empty {
  margin-top: var(--s-4);
  border-radius: var(--r-m);
  padding: var(--s-5);
  background: var(--paper-2);
  color: var(--ink-soft);
}

.market-empty p {
  margin: 0;
}

.market-empty p + p {
  margin-top: var(--s-3);
}

.market-method {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
}

.market-method li {
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: var(--s-4) var(--s-5);
  color: var(--ink-soft);
  font-size: var(--t-15);
}

.market-method li strong {
  display: block;
  color: var(--ink);
  font-size: var(--t-17);
}

/* ---------- method page ---------- */
/* The prose, and after the Check je huur box its end: the change list and the way back. */
.market-prose,
.market-changes {
  max-width: 760px;
  padding-bottom: var(--pad-block);
}

.market-prose h2,
.market-changes h2 {
  margin: var(--s-7) 0 var(--s-3);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
}

.market-prose p,
.market-prose li,
.market-changes p,
.market-changes li {
  max-width: 68ch;
  color: var(--ink-soft);
}

/* A link inside a sentence is told from the text by its underline, not by colour alone (WCAG 1.4.1). */
.market-prose p a,
.market-prose li a,
.market-changes p a,
.market-empty p a:not(.pilot-link) {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.market-changelog {
  margin: 0;
  padding: 0;
  list-style: none;
}

.market-changelog li {
  border-top: 1px solid var(--line);
  padding: var(--s-3) 0;
}

.market-changelog time {
  margin-right: var(--s-3);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: var(--t-13);
}

/* ---------- check je huur ---------- */
/* What a renter can do when a rent looks too high (seo/market/_huurcheck.html), on every city page and the
   method page. A real ordered list: the numbered circles are decoration drawn by a counter. */
.market-huurcheck {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--s-6);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: var(--s-6);
  background: var(--paper-2);
}

.market-block p.market-huurcheck__what {
  margin: 0 0 var(--s-3);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.market-huurcheck__steps {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: market-step;
}

.market-huurcheck__steps li {
  position: relative;
  min-width: 0;
  padding-left: 40px;
  color: var(--ink-soft);
  font-size: var(--t-15);
  line-height: 1.5;
  counter-increment: market-step;
}

.market-huurcheck__steps li::before {
  content: counter(market-step);
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.market-huurcheck__actions {
  margin-top: var(--s-5);
}

.market-huurcheck__actions .pilot-button span {
  margin-left: var(--s-2);
}

.market-block p.market-huurcheck__small {
  margin: var(--s-3) 0 0;
  color: var(--ink-muted);
}

/* The method page: the prose above already ends with the block spacing. */
.market-method-huurcheck .market-block {
  padding-top: 0;
}

@media (max-width: 860px) {
  .market-block__grid,
  .market-method {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-5);
  }

  .market-huurcheck {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-5);
    padding: var(--s-5);
  }

  .market-proof__grid--4,
  .market-proof__grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-tile:nth-child(2n) {
    border-right: 1px solid var(--on-dark-line);
  }
}

@media (max-width: 480px) {
  .market-proof__grid,
  .market-proof__grid--4,
  .market-proof__grid--3,
  .market-proof__grid--2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .market-tile {
    border-right: 1px solid var(--on-dark-line);
    border-bottom: 1px solid var(--on-dark-line);
  }

  .market-deck {
    font-size: var(--t-17);
  }

  .market-table th,
  .market-table td {
    padding: 10px 12px;
  }

  /* Four columns on a phone: the amounts never break, the heads wrap in plain type and the cells
     tighten, so a size table fits without scrolling sideways. */
  .market-table.market-table--sizes th,
  .market-table.market-table--sizes td {
    padding: 8px 6px;
  }

  .market-table.market-table--sizes th:first-child,
  .market-table.market-table--sizes td:first-child {
    padding-left: 10px;
  }

  .market-table.market-table--sizes th:last-child,
  .market-table.market-table--sizes td:last-child {
    padding-right: 10px;
  }

  .market-table.market-table--sizes td.num {
    white-space: nowrap;
  }

  /* Five columns do not fit a phone: the middle half moves under its median, as a quieter line that
     wraps between its two amounts (each amount keeps its euro sign), and its own column folds away. */
  .market-table.market-table--sizes .market-range {
    display: none;
  }

  .market-table.market-table--sizes .market-range-inline {
    display: block;
    color: var(--ink-muted);
    font-size: var(--t-11);
    white-space: normal;
  }

  .market-table.market-table--value th,
  .market-table.market-table--value td {
    padding: 8px 6px;
  }

  .market-table.market-table--value th:first-child,
  .market-table.market-table--value td:first-child {
    padding-left: 10px;
  }

  .market-table.market-table--value thead th {
    font-family: inherit;
    font-size: var(--t-11);
    font-weight: 600;
    letter-spacing: 0;
  }

  .market-table.market-table--sizes thead th {
    font-family: inherit;
    font-size: var(--t-11);
    font-weight: 600;
    letter-spacing: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-tip {
    transition: none;
  }
}
