/*
 * The palette, light/dark scheme and typefaces come from the `theme` in
 * paths/index.md: PathMX's synthwave preset, as in PathMX Labs, with its quieter
 * navy. Geist Mono replaces the preset's mono for the course's instrument
 * labels. Everything the course adds is a token here; the style guide
 * (resources/style-guide.page.md) shows them all.
 */
:root {
  --pmx-font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pmx-document-measure: 70ch;
  --pmx-prose-leading: 1.65;

  --csc-radius-sm: 6px;
  --csc-radius-md: 10px;
  --csc-radius-lg: 16px;
  --csc-radius-pill: 999px;

  --csc-space-1: 0.25rem;
  --csc-space-2: 0.5rem;
  --csc-space-3: 0.75rem;
  --csc-space-4: 1rem;
  --csc-space-5: 1.5rem;
  --csc-space-6: 2.5rem;

  --csc-surface-raised: color-mix(in oklch, var(--pmx-color-fg) 4%, var(--pmx-color-surface));
  --csc-tint: color-mix(in oklch, var(--pmx-color-accent) 12%, transparent);
  --csc-shadow-sm: 0 1px 2px color-mix(in oklch, var(--pmx-color-fg) 10%, transparent);
  --csc-shadow-md: 0 12px 32px color-mix(in oklch, var(--pmx-color-fg) 14%, transparent);
}

/* One frame per code block: not again on the pre inside it, beside the copy button. */
.pmx-prose :where(.pmx-code-block, pre:not(.pmx-code-block pre)) {
  border: 1px solid var(--pmx-color-border);
  border-inline-start: 3px solid var(--pmx-color-accent);
}

/* A prompt to paste into an agent (```prompt) wraps like prose, so it reads on a
   phone. ```text keeps its lines, for diagrams and file trees. */
.pmx-prose code.language-prompt {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.pmx-toc {
  --pmx-toc-font-size: 0.85rem;
  --pmx-toc-link-color: var(--pmx-color-muted);
}

/* Instrument labels: small, uppercase monospace. */
:where(.site-brand, .site-footer, .pmx-prose thead th) {
  font-family: var(--pmx-font-mono);
  text-transform: uppercase;
}

/* Synthwave styles every th as a column label; a row header stays a cell. */
.pmx-prose tbody th {
  color: inherit;
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
}

/* Player 0.7.7 paints a slide table's full-width box, leaving a slab beside its
   cells. The next PathMX release paints the cells instead; remove this then. */
.pmx-document[data-pmx-play="presentation"] {
  & table {
    background: none;
  }

  & :is(th, td) {
    background: var(--pmx-slide-surface);
  }

  & tr > :first-child {
    background:
      linear-gradient(var(--pmx-slide-surface), var(--pmx-slide-surface)),
      var(--pmx-slide-bg);
  }
}
