
@font-face {
  font-family: 'Redacted';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/assets/fonts/Redacted/Redacted-Regular.woff2') format('woff2');
}

/**
 * Shared skeleton tokens for the market content blocks.
 *
 * Every block concatenates this with its own `style.css` into
 * `makeElement({ style })` — via `./skeleton.ts`, which also prepends the
 * Redacted @font-face — so a block carries everything `[skeleton]` needs and
 * nothing has to be linked globally for the mode to work.
 *
 * The values are the wireframe's grey ramp expressed against `--text` /
 * `--background` rather than the flat hexes it was drawn with, so a skeleton
 * follows the site into dark mode instead of staying a light-mode artifact.
 */
:root {
  /* Redacted has no italic or bold cut — the fallback keeps metrics sane if the
     woff2 is missing, in which case a skeleton degrades to plain grey text. */
  --market-skeleton-font: 'Redacted', var(--font-primary, sans-serif);

  --market-skeleton-heading: color-mix(in srgb, var(--background), var(--text) 70%);
  --market-skeleton-copy: color-mix(in srgb, var(--background), var(--text) 30%);
  --market-skeleton-kicker: color-mix(in srgb, var(--background), var(--text) 24%);
  --market-skeleton-media: color-mix(in srgb, var(--background), var(--text) 38%);
  --market-skeleton-rule: color-mix(in srgb, var(--background), var(--text) 12%);
  --market-skeleton-surface: color-mix(in srgb, var(--background), var(--text) 2%);
}

market-comparison-table {
  --comparison-columns: 3;
  --comparison-muted: color-mix(in srgb, var(--background), var(--text) 62%);
  --comparison-rule: color-mix(in srgb, var(--background), var(--text) 9%);
  --comparison-off: color-mix(in srgb, var(--background), var(--text) 16%);
  position: relative;
  display: block;
  width: 100%;
  padding: 44px;
  box-sizing: border-box;
  /* A table has a floor width below which it stops being readable, so it
     scrolls inside the block rather than forcing the whole page sideways. */
  overflow-x: auto;
}

@media (max-width: 640px) {
  market-comparison-table {
    padding: 32px 20px;
  }
}

market-comparison-table [comparison] {
  width: 100%;
  min-width: 40rem;
  max-width: var(--max-page-width, 1400px);
  margin: 0 auto;
  border-collapse: collapse;
  text-align: left;
}

market-comparison-table [caption] {
  padding-bottom: 20px;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: left;
  color: var(--text);
}

market-comparison-table [caption]:empty {
  display: none;
}

market-comparison-table thead th {
  padding: 0 0 16px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--text);
}

market-comparison-table tbody th,
market-comparison-table tbody td {
  padding: 18px 0;
  border-bottom: 1px solid var(--comparison-rule);
  vertical-align: middle;
}

market-comparison-table [label] {
  width: 40%;
  padding-right: 24px;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--comparison-muted);
}

market-comparison-table tbody td {
  width: calc(60% / var(--comparison-columns));
  padding-right: 24px;
  font-size: 0.9375rem;
  color: var(--text);
}

market-comparison-table [mark] {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--comparison-off);
}

market-comparison-table [mark][on] {
  background: var(--text);
}

/* The word behind the disc. Off-screen rather than `display: none`, which
   would take it out of the accessibility tree along with the pixels. */
market-comparison-table [said] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------------- SKELETON ---------------- */

market-comparison-table[skeleton],
market-comparison-table[skeleton] * {
  font-family: var(--market-skeleton-font);
  font-weight: 400;
  letter-spacing: normal;
}

market-comparison-table[skeleton] {
  background: var(--market-skeleton-surface);
  pointer-events: none;
  user-select: none;
}

market-comparison-table[skeleton] :is([caption], thead th, [label]):empty {
  display: revert;
}

market-comparison-table[skeleton] thead th {
  color: var(--market-skeleton-heading);
  border-bottom-color: var(--market-skeleton-heading);
}

market-comparison-table[skeleton] [caption] {
  color: var(--market-skeleton-heading);
}

market-comparison-table[skeleton] [caption]:empty::before {
  content: 'How the plans compare';
}

market-comparison-table[skeleton] [label] {
  color: var(--market-skeleton-copy);
}

/* A cell holding a written value ("2 weeks") rather than a tick redacts to the
   same tone as the row labels. Left on `--text` it draws near-black, and the
   one row that happens to use words dominates a table of grey. */
market-comparison-table[skeleton] tbody td {
  color: var(--market-skeleton-copy);
}

market-comparison-table[skeleton] [mark] {
  background: var(--market-skeleton-rule);
}

market-comparison-table[skeleton] [mark][on] {
  background: var(--market-skeleton-heading);
}

market-comparison-table[skeleton] thead th:nth-child(3n + 2):empty::before {
  content: 'Standard';
}

market-comparison-table[skeleton] thead th:nth-child(3n + 3):empty::before {
  content: 'Plus';
}

market-comparison-table[skeleton] thead th:nth-child(3n + 4):empty::before {
  content: 'Trade';
}

market-comparison-table[skeleton] tr:nth-child(3n + 1) [label]:empty::before {
  content: 'What this row compares';
}

market-comparison-table[skeleton] tr:nth-child(3n + 2) [label]:empty::before {
  content: 'A shorter row';
}

market-comparison-table[skeleton] tr:nth-child(3n + 3) [label]:empty::before {
  content: 'A row with a longer label on it';
}
