/* ─────────────────────────────────────────────────────────────────────────────
   showcase.css — page chrome for the showcase document.

   Layout geometry only. Every colour, type size, radius, shadow and duration is
   a token, so this page re-themes with the rest of the system instead of
   drifting away from it. Where a translucent or blended surface is needed,
   color-mix() blends tokens rather than introducing a literal colour.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Shell ─────────────────────────────────────────────────────────────────── */

body {
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-family-base);
  margin: 0;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  body { scroll-behavior: auto; }
}

.sc-skip {
  position: absolute;
  left: -9999px;
}
.sc-skip:focus {
  left: var(--space-4);
  top: var(--space-4);
  z-index: var(--z-toast);
  background: var(--surface-card);
  color: var(--text-heading);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ── Top bar ───────────────────────────────────────────────────────────────── */

.sc-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--surface-page-translucent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.sc-topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-height);
  padding: 0 var(--space-5);
  max-width: 1560px;
  margin: 0 auto;
}

.sc-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.sc-brand img { height: 26px; display: block; }
/* The wordmark ships in fixed colours: swap the file per theme rather than tint it.
   Only the dark theme has a dark page — the contrast theme is white, so it keeps
   the purple mark. */
.sc-brand .on-light { display: block; }
.sc-brand .on-dark { display: none; }
[data-theme='dark'] .sc-brand .on-light { display: none; }
[data-theme='dark'] .sc-brand .on-dark { display: block; }

.sc-brand-label {
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: var(--space-3);
  border-left: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.sc-topbar-spacer { flex: 1 1 auto; }

/* Theme switch — the control that proves the semantic layer works. */
.sc-themes {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}
.sc-themes button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}
.sc-themes button:hover { color: var(--text-heading); }
.sc-themes button[aria-pressed='true'] {
  background: var(--surface-card);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.sc-version {
  font-size: var(--text-caption);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Two-column shell: sticky index + content ──────────────────────────────── */

.sc-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: var(--space-7);
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 var(--space-5);
  align-items: start;
}

.sc-index {
  position: sticky;
  top: calc(var(--header-height) + var(--space-5));
  max-height: calc(100vh - var(--header-height) - var(--space-7));
  overflow-y: auto;
  padding: var(--space-6) 0 var(--space-8);
}
.sc-index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: sc-index;
}
.sc-index a {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  padding: 9px var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}
.sc-index a::before {
  counter-increment: sc-index;
  content: counter(sc-index, decimal-leading-zero);
  font-size: var(--text-caption);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  opacity: 0.65;
}
.sc-index a:hover {
  background: var(--surface-sunken);
  color: var(--text-heading);
}
.sc-index a[aria-current='true'] {
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  border-left-color: var(--color-primary);
  background: var(--surface-primary-tint);
}
.sc-index a[aria-current='true']::before { color: var(--color-primary); opacity: 1; }

.sc-index-title {
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
  padding-left: var(--space-3);
}

.sc-main { min-width: 0; padding-bottom: var(--section-y); }

/* Narrow screens: the index becomes a horizontal strip under the bar. */
.sc-index-mobile { display: none; }

@media (max-width: 1100px) {
  .sc-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sc-index { display: none; }
  .sc-index-mobile {
    display: block;
    position: sticky;
    top: var(--header-height);
    z-index: var(--z-raised);
    background: var(--surface-page-translucent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
  }
  .sc-index-mobile ol {
    list-style: none;
    display: flex;
    gap: var(--space-2);
    margin: 0;
    padding: var(--space-3) var(--space-5);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .sc-index-mobile ol::-webkit-scrollbar { display: none; }
  .sc-index-mobile a {
    white-space: nowrap;
    font-size: var(--text-body-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: var(--surface-sunken);
  }
  .sc-index-mobile a[aria-current='true'] {
    background: var(--color-primary);
    color: var(--text-on-primary);
  }
}

@media (max-width: 700px) {
  .sc-topbar-inner { padding: var(--space-3) var(--space-4); flex-wrap: wrap; }
  .sc-brand-label { display: none; }
  .sc-version { display: none; }
  .sc-shell { padding: 0 var(--space-4); }
  .sc-index-mobile ol { padding: var(--space-3) var(--space-4); }
}

/* ── Sections ──────────────────────────────────────────────────────────────── */

.sc-section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--border-subtle);
  scroll-margin-top: calc(var(--header-height) + var(--space-5));
}
.sc-section:first-of-type { border-top: 0; }

.sc-eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 var(--space-3);
}

.sc-section h2 {
  font-size: var(--text-h1);
  margin: 0 0 var(--space-4);
  max-width: 20ch;
}

.sc-lead {
  font-size: var(--text-body-lg);
  color: var(--text-muted);
  max-width: var(--container-prose);
  line-height: var(--line-height-body);
  margin: 0 0 var(--space-7);
}

.sc-sub {
  font-size: var(--text-h4);
  font-weight: var(--font-weight-bold);
  color: var(--text-heading);
  margin: var(--space-8) 0 var(--space-4);
}
.sc-sub:first-child { margin-top: 0; }

.sc-hint {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  max-width: var(--container-prose);
  line-height: var(--line-height-body);
  margin: 0 0 var(--space-5);
}

/* ── Panels and grids ──────────────────────────────────────────────────────── */

.sc-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.sc-grid { display: grid; gap: var(--grid-gutter); }
.sc-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.sc-grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.sc-grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.sc-hero {
  padding: var(--section-y) 0 var(--section-y-sm);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-8);
  align-items: center;
}
.sc-hero h1 {
  font-size: var(--text-display-2);
  margin: 0 0 var(--space-5);
  max-width: 16ch;
}
.sc-hero-motif { display: flex; justify-content: center; }
@media (max-width: 900px) {
  .sc-hero { grid-template-columns: minmax(0, 1fr); }
  .sc-hero-motif { display: none; }
}

.sc-slogan {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface-primary-tint);
  color: var(--color-primary);
  border-radius: var(--radius-pill);
  padding: 8px var(--space-4);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-5);
}

/* ── Number band ───────────────────────────────────────────────────────────── */

.sc-numbers {
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: var(--space-6);
  text-align: center;
}
.sc-numbers .n {
  font-size: var(--text-h1);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-on-primary);
  line-height: var(--line-height-tight);
  font-variant-numeric: tabular-nums;
}
.sc-numbers .l {
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-on-primary) 78%, transparent);
  margin-top: var(--space-2);
}

/* ── Before / after ────────────────────────────────────────────────────────── */

.sc-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: var(--grid-gutter); }
.sc-compare-col { display: flex; flex-direction: column; gap: var(--space-3); }
.sc-compare-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}
.sc-compare-label.is-good { color: var(--color-primary); }
.sc-compare-frame {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-card);
  height: 420px;
}
.sc-compare-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--color-white); }
.sc-compare-body { height: 100%; overflow: auto; padding: var(--space-5); box-sizing: border-box; }

/* ── Swatches ──────────────────────────────────────────────────────────────── */

.sc-family { margin-bottom: var(--space-6); }
.sc-family-name {
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
}
/* auto-fill, not auto-fit: a family with a single colour (cream, indigo, black)
   keeps a normal-sized swatch instead of stretching across the whole row. */
.sc-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: var(--space-4); }

.sc-swatch {
  appearance: none;
  text-align: left;
  font: inherit;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-card);
  cursor: pointer;
  display: block;
  width: 100%;
  transition: transform var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.sc-swatch:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sc-swatch .chip { height: 84px; display: block; }
.sc-swatch .meta { padding: var(--space-3) var(--space-4) var(--space-4); }
.sc-swatch .tok {
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  color: var(--text-heading);
  display: block;
  word-break: break-all;
}
.sc-swatch .val {
  font-size: var(--text-caption);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-top: 4px;
}
.sc-swatch .cmyk {
  font-size: var(--text-caption);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-top: 2px;
  opacity: 0.85;
}

/* ── Token table (semantic values, recomputed per theme) ───────────────────── */

.sc-table { width: 100%; border-collapse: collapse; font-size: var(--text-body-sm); }
.sc-table th {
  text-align: left;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-default);
}
.sc-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
  vertical-align: middle;
}
.sc-table tr:last-child td { border-bottom: 0; }
.sc-table .mono { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.sc-dot {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  display: inline-block;
  vertical-align: middle;
}

/* ── Type specimens ────────────────────────────────────────────────────────── */

.sc-type-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: baseline;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.sc-type-row:last-child { border-bottom: 0; }
.sc-type-meta { font-size: var(--text-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sc-type-meta b { display: block; color: var(--text-heading); font-size: var(--text-body-sm); }
.sc-type-sample { color: var(--text-heading); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .sc-type-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
}

/* ── Spacing / radius / shadow specimens ───────────────────────────────────── */

.sc-space-row { display: flex; align-items: center; gap: var(--space-4); padding: 7px 0; }
.sc-space-bar { background: var(--color-primary); height: 14px; border-radius: var(--radius-sm); flex-shrink: 0; }
.sc-space-name { font-size: var(--text-caption); color: var(--text-muted); width: 92px; flex-shrink: 0; font-variant-numeric: tabular-nums; }

.sc-specimen {
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-caption);
  color: var(--text-muted);
}
.sc-shadow-box {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-caption);
  color: var(--text-muted);
}

/* ── Component gallery ─────────────────────────────────────────────────────── */

.sc-gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-end;
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  /* Deliberately not sticky: search plus eight group chips stands ~290px tall, which would
     sit on top of a third of the viewport for the whole length of a 36-card gallery. */
}
.sc-gallery-search { flex: 1 1 260px; max-width: 340px; }
.sc-gallery-count {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  padding-bottom: var(--space-3);
  white-space: nowrap;
}

.sc-demos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: var(--grid-gutter); }

.sc-demo {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sc-demo-head {
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}
.sc-demo-name {
  font-size: var(--text-h4);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-heading);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.sc-demo-group {
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--surface-primary-tint);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}
.sc-demo-desc {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  line-height: var(--line-height-body);
  margin: var(--space-3) 0 0;
}
.sc-demo-stage {
  padding: var(--space-6) var(--space-5);
  background: var(--surface-sunken);
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}
.sc-demo-stage.is-block { display: block; }
.sc-demo-details { border-top: 1px solid var(--border-subtle); }
.sc-demo-details summary {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.sc-demo-details summary::-webkit-details-marker { display: none; }
.sc-demo-details summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
  transition: transform var(--duration-fast) var(--ease-standard);
}
.sc-demo-details[open] summary::after { transform: rotate(-135deg); }
.sc-demo-details summary:hover { color: var(--text-heading); }
/* The prop table and the import snippet are the widest things on the page at phone widths;
   they scroll inside this box rather than pushing the document sideways. */
.sc-demo-details .body { padding: 0 var(--space-5) var(--space-5); overflow-x: auto; }

.sc-code {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
  font-size: var(--text-caption);
  line-height: var(--line-height-body);
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

.sc-props { width: 100%; border-collapse: collapse; font-size: var(--text-caption); margin-bottom: var(--space-4); }
.sc-props th {
  text-align: left;
  color: var(--text-muted);
  font-weight: var(--font-weight-bold);
  padding: 6px var(--space-3) 6px 0;
  border-bottom: 1px solid var(--border-default);
}
.sc-props td {
  padding: 6px var(--space-3) 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  color: var(--text-body);
}
.sc-props code {
  font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
  font-size: 0.95em;
  color: var(--color-primary);
}
.sc-props .req { color: var(--danger); font-weight: var(--font-weight-bold); }

.sc-empty {
  padding: var(--space-8);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-body-sm);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
}

/* ── Theme comparison ──────────────────────────────────────────────────────── */

.sc-theme-preview {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-page);
}
.sc-theme-preview .head {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-card);
}
.sc-theme-preview .body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }

/* ── Artefact frames ───────────────────────────────────────────────────────── */

.sc-artefact { display: flex; flex-direction: column; gap: var(--space-4); }
.sc-artefact-head { display: flex; align-items: flex-start; gap: var(--space-3); justify-content: space-between; }
.sc-artefact-title { font-size: var(--text-h4); font-weight: var(--font-weight-extrabold); color: var(--text-heading); margin: 0; }
.sc-artefact-desc { font-size: var(--text-body-sm); color: var(--text-muted); margin: var(--space-2) 0 0; line-height: var(--line-height-body); }

.sc-viewport {
  position: relative;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  overflow: hidden;
}
.sc-viewport .chrome {
  height: 30px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 var(--space-4);
}
.sc-viewport .chrome i {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  display: block;
}
.sc-viewport .stage { position: relative; overflow: hidden; }
.sc-viewport iframe {
  border: 0;
  display: block;
  transform-origin: 0 0;
  background: var(--color-white);
  pointer-events: none;
}
.sc-viewport.is-paper .stage { background: var(--surface-sunken); padding: var(--space-4); }
.sc-viewport.is-paper iframe { box-shadow: var(--shadow-md); margin: 0 auto; }

.sc-open {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-5);
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--color-ink) 55%, transparent),
    transparent 45%
  );
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-standard);
  text-decoration: none;
}
.sc-viewport:hover .sc-open,
.sc-open:focus-visible { opacity: 1; }
.sc-open span {
  background: var(--color-white);
  color: var(--color-primary);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-semibold);
  padding: 10px var(--space-5);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* ── Contrast checks ───────────────────────────────────────────────────────── */

.sc-contrast-sample {
  border-radius: var(--radius-sm);
  padding: 6px var(--space-3);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-semibold);
  border: 1px solid var(--border-subtle);
  display: inline-block;
  white-space: nowrap;
}
.sc-ratio { font-variant-numeric: tabular-nums; font-weight: var(--font-weight-bold); color: var(--text-heading); }
.sc-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  white-space: nowrap;
}
.sc-verdict.pass { background: var(--success-surface); color: var(--success); }
.sc-verdict.fail { background: var(--danger-surface); color: var(--danger); }

/* ── Callouts and lists ────────────────────────────────────────────────────── */

.sc-callout {
  border-left: 3px solid var(--color-primary);
  background: var(--surface-primary-tint);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-5);
  font-size: var(--text-body-sm);
  line-height: var(--line-height-body);
  color: var(--text-body);
}
.sc-callout.is-warn { border-left-color: var(--warning); background: var(--warning-surface); }
.sc-callout strong { color: var(--text-heading); }

.sc-list { margin: 0; padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.sc-list li { font-size: var(--text-body-sm); line-height: var(--line-height-body); color: var(--text-body); }
.sc-list li b { color: var(--text-heading); }

.sc-never { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sc-never li {
  font-size: var(--text-body-sm);
  color: var(--danger);
  background: var(--danger-surface);
  border-radius: var(--radius-pill);
  padding: 6px var(--space-4);
}

/* ── Logo / motif specimens ────────────────────────────────────────────────── */

.sc-logo-cell {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  text-align: center;
}
.sc-logo-cell.on-purple { background: var(--color-primary); border-color: var(--color-primary); }
.sc-logo-cell.on-purple .cap { color: color-mix(in srgb, var(--text-on-primary) 80%, transparent); }
.sc-logo-cell img { max-width: 100%; display: block; }
.sc-logo-cell .cap { font-size: var(--text-caption); color: var(--text-muted); }
.sc-logo-cell .cap b { display: block; color: var(--text-heading); font-size: var(--text-body-sm); }
.sc-logo-cell.on-purple .cap b { color: var(--text-on-primary); }

/* Clearspace: a dashed X-margin drawn around the mark. */
.sc-clearspace {
  display: inline-block;
  outline: 1px dashed var(--color-primary);
  outline-offset: 0;
  padding: var(--space-5);
  background: var(--surface-card);
  position: relative;
}
.sc-clearspace img { display: block; height: 44px; }
.sc-clearspace::after {
  content: 'X';
  position: absolute;
  top: 2px;
  left: 6px;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

/* Hue alternation for the motif. Same shape as the theme switch in the top bar, so the two
   read as the same kind of control. */
.sc-hue-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}
.sc-hue-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}
.sc-hue-switch button:hover { color: var(--text-heading); }
.sc-hue-switch button[aria-pressed='true'] {
  background: var(--surface-card);
  color: var(--text-heading);
  box-shadow: var(--shadow-sm);
}
.sc-hue-switch .dot {
  width: 11px;
  height: 11px;
  border-radius: var(--radius-pill);
  display: block;
  flex-shrink: 0;
}

.sc-motif-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}
.sc-motif-cell .cap { font-size: var(--text-caption); color: var(--text-muted); text-align: center; }
.sc-motif-cell .cap b { display: block; color: var(--text-heading); font-size: var(--text-body-sm); }

.sc-pattern {
  height: 132px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-size: cover;
  background-position: center;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

.sc-footer {
  background: var(--color-ink);
  color: var(--gray-300);
  padding: var(--section-y-sm) 0;
  margin-top: var(--section-y);
}
.sc-footer-inner { max-width: 1560px; margin: 0 auto; padding: 0 var(--space-5); }
.sc-footer img { height: 30px; display: block; margin-bottom: var(--space-5); }
.sc-footer p { font-size: var(--text-body-sm); line-height: var(--line-height-body); max-width: var(--container-prose); margin: 0 0 var(--space-3); }
.sc-footer .note {
  border-top: 1px solid var(--border-on-ink);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  font-size: var(--text-caption);
  /* gray-400 (5.61:1 on ink), matching Footer.jsx — gray-500 sits at 3.53:1. */
  color: var(--gray-400);
}

/* ── Copy feedback ─────────────────────────────────────────────────────────── */

.sc-toast-host {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}
.sc-toast-host > * { pointer-events: auto; }

/* ── Print: the showcase doubles as a leave-behind PDF ─────────────────────── */

@media print {
  .sc-topbar,
  .sc-index,
  .sc-index-mobile,
  .sc-gallery-controls,
  .sc-toast-host,
  .sc-open { display: none !important; }
  .sc-shell { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .sc-section { break-inside: avoid-page; padding: var(--space-7) 0; }
  .sc-demo, .sc-panel, .sc-artefact { break-inside: avoid; }
  .sc-demo-details { display: none; }
}
