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

@media (max-width: 1200px) {
  market-accordion {
    padding: 44px 80px;
  }
}

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

market-accordion [items] {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
}

market-accordion [item] {
  border-bottom: 1px solid var(--accordion-rule);
}

market-accordion [question] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

/* Safari draws its own disclosure triangle through `::-webkit-details-marker`
   and ignores `list-style: none` on the summary. */
market-accordion [question]::-webkit-details-marker {
  display: none;
}

market-accordion [question]:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

market-accordion [sign] {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}

/* Two bars, one rotated away when the panel opens — a plus that becomes a
   minus. Drawn rather than typed so it cannot be redacted along with the copy
   in skeleton mode, where it is the only thing marking the rows as openable. */
market-accordion [sign]::before,
market-accordion [sign]::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto 0;
  height: 2px;
  margin-top: -1px;
  background: var(--accordion-muted);
  transition: transform 200ms var(--ease-out-quad, ease);
}

market-accordion [sign]::after {
  transform: rotate(90deg);
}

market-accordion [item][open] [sign]::after {
  transform: rotate(0deg);
}

@media (prefers-reduced-motion: reduce) {
  market-accordion [sign]::before,
  market-accordion [sign]::after {
    transition: none;
  }
}

market-accordion [answer] {
  padding: 0 0 22px;
  max-width: 48rem;
}

market-accordion [answer] p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--accordion-muted);
}

market-accordion [answer] p:empty {
  display: none;
}

market-accordion [label]:empty {
  display: none;
}

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

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

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

market-accordion[skeleton] :is([label], [answer] p):empty {
  display: revert;
}

market-accordion[skeleton] [label] {
  color: var(--market-skeleton-heading);
}

market-accordion[skeleton] [answer] p {
  color: var(--market-skeleton-copy);
}

market-accordion[skeleton] [sign]::before,
market-accordion[skeleton] [sign]::after {
  background: var(--market-skeleton-media);
}

market-accordion[skeleton] [answer] p:empty::before {
  content: 'Three lines of answer copy under the open question, running most of the way across before stopping short on the third.';
}

/* Four questions of visibly different lengths — a stack of identical bars would
   read as a loading state rather than as a list of different questions. */
market-accordion[skeleton] [item]:nth-child(4n + 1) [label]:empty::before {
  content: 'A question about how the thing works';
}

market-accordion[skeleton] [item]:nth-child(4n + 2) [label]:empty::before {
  content: 'A shorter question';
}

market-accordion[skeleton] [item]:nth-child(4n + 3) [label]:empty::before {
  content: 'A question that runs a fair bit longer than the rest';
}

market-accordion[skeleton] [item]:nth-child(4n + 4) [label]:empty::before {
  content: 'One more question here';
}
