
@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-steps {
  --steps-columns: 4;
  --steps-muted: color-mix(in srgb, var(--background), var(--text) 62%);
  --steps-rule: color-mix(in srgb, var(--background), var(--text) 14%);
  position: relative;
  display: block;
  width: 100%;
  padding: 48px;
  box-sizing: border-box;
}

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

market-steps [steps] {
  display: grid;
  grid-template-columns: repeat(var(--steps-columns), minmax(0, 1fr));
  align-items: start;
  gap: 28px;
  width: 100%;
  max-width: var(--max-page-width, 1400px);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

@media (max-width: 1024px) {
  market-steps [steps] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 36px;
  }
}

@media (max-width: 640px) {
  market-steps [steps] {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
  }
}

market-steps [step] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

market-steps [marker] {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

market-steps [number] {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  background: var(--text);
  color: var(--background);
}

market-steps [rule] {
  flex: 1;
  height: 2px;
  background: var(--steps-rule);
}

/* Only a connected step draws the rule, so the sequence does not trail off the
   end of the row into nothing. */
market-steps [step]:not([connected]) [rule] {
  display: none;
}

/* At one column the sequence runs down the page, and a rule pointing right no
   longer means "next". */
@media (max-width: 640px) {
  market-steps [rule] {
    display: none;
  }
}

market-steps [title-text] {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

market-steps [copy] {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--steps-muted);
}

market-steps :is([title-text], [copy]):empty {
  display: none;
}

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

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

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

market-steps[skeleton] :is([title-text], [copy]):empty {
  display: revert;
}

/* The number goes with the rest of the copy: a wireframe that still counted
   1-2-3-4 in the site's own face would be the one legible thing on the page. */
market-steps[skeleton] [number] {
  background: var(--market-skeleton-heading);
  color: var(--background);
}

market-steps[skeleton] [title-text] {
  color: var(--market-skeleton-heading);
}

market-steps[skeleton] [copy] {
  color: var(--market-skeleton-copy);
}

market-steps[skeleton] [step]:nth-child(2n + 1) [title-text]:empty::before {
  content: 'Step title';
}

market-steps[skeleton] [step]:nth-child(2n + 2) [title-text]:empty::before {
  content: 'A longer step title';
}

market-steps[skeleton] [step]:nth-child(2n + 1) [copy]:empty::before {
  content: 'Two lines saying what happens at this step.';
}

market-steps[skeleton] [step]:nth-child(2n + 2) [copy]:empty::before {
  content: 'Two lines about this step, a little shorter.';
}
