
@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 landing page 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. */
  --landing-skeleton-font: 'Redacted', var(--font-primary, sans-serif);

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

/**
 * Two shapes: the disclosure stack this block has always drawn, and the
 * `[unfolded]` description list the landing design asks for — every answer
 * visible, question and answer side by side across a hairline-ruled row.
 *
 * Both are set in the design's language: hairlines rather than boxes, a display
 * face for the questions, muted body copy for the answers.
 */
landing-accordion {
  --accordion-muted: color-mix(in srgb, var(--background), var(--text) 65%);
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: clamp(28px, 4vh, 44px) 28px 0;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  landing-accordion {
    padding: 24px 20px 0;
  }
}

landing-accordion [items] {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
}

/* ---------------- UNFOLDED ---------------- */

landing-accordion [pairs] {
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* The rule goes on the top of every row rather than the bottom of all but the
   last, so the list opens against a line the way the sections above it do. */
landing-accordion [pair] {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
  gap: 20px 40px;
  border-top: 1px solid var(--light);
  padding: 22px 0;
}

@media (max-width: 720px) {
  landing-accordion [pair] {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

landing-accordion [pairs] [question] {
  margin: 0;
  font-size: 1.09375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.022em;
  text-wrap: pretty;
  color: var(--text);
}

landing-accordion [pairs] [answer] {
  margin: 0;
  padding: 0;
  max-width: none;
  font-size: 0.9375rem;
  line-height: 1.55;
  text-wrap: pretty;
  color: var(--accordion-muted);
}

landing-accordion [answer] code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--text);
}

/* ---------------- DISCLOSURE ---------------- */

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

landing-accordion [item] [question] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  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. */
landing-accordion [question]::-webkit-details-marker {
  display: none;
}

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

landing-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. */
landing-accordion [sign]::before,
landing-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);
}

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

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

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

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

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

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

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

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

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

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

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

/* The unfolded shape has no `[label]` and no `<p>` — the pair is the markup —
   so it needs its own two rules to wireframe rather than coming out blank. */
landing-accordion[skeleton] [pairs] [question] {
  color: var(--landing-skeleton-heading);
}

landing-accordion[skeleton] [pairs] [answer] {
  color: var(--landing-skeleton-copy);
}

landing-accordion[skeleton] [pair]:nth-child(2n + 1) [question]:empty::before {
  content: 'A question about how the thing works';
}

landing-accordion[skeleton] [pair]:nth-child(2n + 2) [question]:empty::before {
  content: 'A shorter question';
}

landing-accordion[skeleton] [pairs] [answer]:empty::before {
  content: 'Two lines of answer copy beside the question, stopping short of the second line\'s right edge.';
}

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

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

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

landing-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. */
landing-accordion[skeleton] [item]:nth-child(4n + 1) [label]:empty::before {
  content: 'A question about how the thing works';
}

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

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

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