
@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-media-rows {
  --media-rows-muted: color-mix(in srgb, var(--background), var(--text) 62%);
  --media-rows-radius: 10px;
  position: relative;
  display: block;
  width: 100%;
  padding: 44px;
  box-sizing: border-box;
}

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

market-media-rows [rows] {
  display: flex;
  flex-direction: column;
  gap: 44px;
  width: 100%;
  max-width: var(--max-page-width, 1400px);
  margin: 0 auto;
}

market-media-rows [row] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

/* Swapped with `order` rather than by building the row the other way round, so
   the copy always precedes the media in the DOM — which is the reading order a
   screen reader gets, and the stacking order below. */
market-media-rows [row][flipped] [media] {
  order: 2;
}

@media (max-width: 900px) {
  market-media-rows [rows] {
    gap: 36px;
  }

  market-media-rows [row] {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  market-media-rows [row][flipped] [media] {
    order: 0;
  }
}

market-media-rows [media] {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: var(--media-rows-radius);
  background: color-mix(in srgb, var(--background), var(--text) 8%);
}

market-media-rows [media] :is(img, video) {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

market-media-rows [content] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

market-media-rows [kicker] {
  margin: 0;
  font-size: clamp(0.75rem, 1vw, 0.8125rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--media-rows-muted);
}

market-media-rows [headline] {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

market-media-rows [copy] {
  margin: 4px 0 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--background), var(--text) 82%);
}

market-media-rows [link] {
  margin-top: 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

market-media-rows :is([kicker], [headline], [copy], [link]):empty {
  display: none;
}

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

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

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

market-media-rows[skeleton] :is([kicker], [headline], [copy], [link]):empty {
  display: revert;
}

market-media-rows[skeleton] [media] {
  background: var(--market-skeleton-media);
  border-radius: 0;
}

market-media-rows[skeleton] [media] :is(img, video) {
  display: none;
}

market-media-rows[skeleton] [kicker] {
  color: var(--market-skeleton-kicker);
}

market-media-rows[skeleton] [kicker]:empty::before {
  content: 'Chapter';
}

market-media-rows[skeleton] [headline] {
  color: var(--market-skeleton-heading);
}

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

market-media-rows[skeleton] [link] {
  color: var(--market-skeleton-heading);
  text-decoration: none;
}

market-media-rows[skeleton] [link]:empty::before {
  content: 'Read more';
}

/* Alternating filler as well as alternating sides — two rows of identical bars
   would read as one row repeated rather than as a sequence. */
market-media-rows[skeleton] [row]:nth-child(odd) [headline]:empty::before {
  content: 'A headline for this row';
}

market-media-rows[skeleton] [row]:nth-child(even) [headline]:empty::before {
  content: 'The next row along, titled';
}

market-media-rows[skeleton] [row]:nth-child(odd) [copy]:empty::before {
  content: 'Three lines of body copy beside the media, describing whatever this row is about before handing off to the link.';
}

market-media-rows[skeleton] [row]:nth-child(even) [copy]:empty::before {
  content: 'Three lines of body copy on the other side of the row, running a little shorter than the one above it.';
}
