/* ============================================================
   COMPONENTS · Pascal Design System
   Static extraction of the design-system component styles. Each
   block is copied verbatim from the corresponding component's CSS
   (components/<group>/<Name>.jsx), so a future /design-sync diffs
   cleanly. The .jsx files inject this same CSS at runtime in the
   React preview; the static site links it here instead.
   Class names are canonical (pds-*) — do not rename.
   ============================================================ */

/* ---- core/Eyebrow ---- */
.pds-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}
.pds-eyebrow--accent { color: var(--accent); }

/* ---- core/TextLink ---- */
.pds-link {
  color: var(--primary);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: var(--transition-color);
}
.pds-link:hover { color: var(--primary-hover); text-decoration: underline; }
.pds-link:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.pds-link--subtle { color: var(--text); }
.pds-link--subtle:hover { color: var(--primary); }
.pds-link .ph { font-size: .82em; line-height: 0; vertical-align: baseline; margin-left: 2px; }

/* ---- core/Divider ---- */
.pds-divider { border: 0; border-top: 1px solid var(--border); margin: var(--space-3) 0; }
.pds-divider--dotted { border-top-style: dotted; }
.pds-divider--strong { border-top-color: var(--border-strong); }
.pds-dividerlabel {
  display: flex; align-items: center; gap: 14px;
  margin: var(--space-4) 0;
  color: var(--text-faint);
}
.pds-dividerlabel::before, .pds-dividerlabel::after {
  content: ""; flex: 1; border-top: 1px solid var(--border);
}
.pds-dividerlabel__text {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.pds-dividerlabel--fleuron { color: var(--accent); }
.pds-dividerlabel--fleuron .pds-dividerlabel__text { font-family: var(--font-serif); font-size: 18px; letter-spacing: 0; text-transform: none; }

/* ---- core/Badge ---- */
.pds-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px; line-height: 1;
  letter-spacing: .03em;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-sunken);
  color: var(--text-muted);
  white-space: nowrap;
}
.pds-badge .ph { font-size: 12px; line-height: 0; }
.pds-badge--accent  { color: var(--accent); border-color: var(--accent-tint); background: transparent; }
.pds-badge--success { color: var(--status-success); border-color: color-mix(in oklab, var(--status-success) 40%, transparent); background: transparent; }
.pds-badge--warning { color: var(--status-warning); border-color: color-mix(in oklab, var(--status-warning) 40%, transparent); background: transparent; }
.pds-badge--error   { color: var(--status-error);   border-color: color-mix(in oklab, var(--status-error) 40%, transparent);   background: transparent; }
.pds-badge--info    { color: var(--status-info);    border-color: var(--border); background: transparent; }
.pds-badge--solid   { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

/* ---- core/Card ---- */
.pds-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  color: var(--text);
}
.pds-card--sunken { background: var(--surface-sunken); }
.pds-card--flush { padding: 0; }
.pds-card--pad-lg { padding: var(--space-4); }
.pds-card--interactive { transition: border-color var(--dur-quick) var(--ease); cursor: pointer; text-decoration: none; display: block; }
.pds-card--interactive:hover { border-color: var(--text-faint); text-decoration: none; }
.pds-card--interactive:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }

/* ---- editorial/WorkEntry ---- */
.pds-work { display: grid; gap: 0; }
.pds-entry {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: var(--space-3); align-items: baseline;
  padding: var(--space-2) 0 calc(var(--space-2) + 4px);
  border-bottom: 1px solid var(--border);
}
.pds-entry:first-child { border-top: 1px solid var(--border); }
.pds-entry__num { font-family: var(--font-mono); font-size: .74rem; color: var(--accent); }
.pds-entry__title { font-family: var(--font-serif); font-weight: 700; font-size: var(--text-h3); color: var(--text); text-decoration: none; transition: var(--transition-color); }
.pds-entry__title:hover { color: var(--primary); text-decoration: none; }
.pds-entry__desc { margin: 6px 0 0; color: var(--text-muted); font-size: .95rem; max-width: 50ch; }
.pds-entry__meta { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 560px) {
  .pds-entry { grid-template-columns: auto 1fr; gap: var(--space-2); }
  .pds-entry__meta { grid-column: 2; margin-top: 4px; }
}

/* ---- editorial/NoteList ---- */
.pds-notes { list-style: none; margin: 0; padding: 0; }
.pds-notes li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dotted var(--border);
}
.pds-notes li:last-child { border-bottom: 0; }
.pds-notes a { color: var(--text); font-size: 1.05rem; text-decoration: none; transition: var(--transition-color); }
.pds-notes a:hover { color: var(--primary); text-decoration: none; }
.pds-notes time { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); white-space: nowrap; }

/* ---- editorial/Gloss ---- */
.pds-gloss {
  font-family: var(--font-serif-text);
  font-style: italic;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}
.pds-gloss__lemma {
  color: var(--text); font-style: normal;
  font-feature-settings: "smcp"; letter-spacing: .03em;
}
.pds-gloss__lang { font-style: normal; color: var(--text-faint); }
.pds-gloss--margin { max-width: 200px; }

/* ---- editorial/Footnote & Apparatus ---- */
.pds-fn { font-size: .62em; line-height: 0; vertical-align: super; }
.pds-fn a { color: var(--accent); text-decoration: none; padding: 0 1px; }
.pds-fn a:hover { text-decoration: underline; text-underline-offset: 2px; }

.pds-apparatus {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
  font-size: var(--text-small);
  color: var(--text-muted);
  line-height: 1.55;
}
.pds-apparatus__title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: var(--space-1);
}
.pds-apparatus__item { margin-bottom: 6px; display: flex; gap: 8px; }
.pds-apparatus__item:last-child { margin-bottom: 0; }
.pds-apparatus__ref { font-family: var(--font-mono); color: var(--accent); flex: none; }

/* ---- forms/Switch ---- */
.pds-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-serif-text); font-size: var(--text-body); color: var(--text); }
.pds-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.pds-switch__track {
  position: relative; flex: none;
  width: 38px; height: 22px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.pds-switch__knob {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: 0 1px 1px rgba(37,32,32,.18);
  transition: transform var(--dur) var(--ease-out);
}
.pds-switch:hover .pds-switch__track { border-color: var(--text-muted); }
.pds-switch input:checked + .pds-switch__track { background: var(--primary); border-color: var(--primary); }
.pds-switch input:checked + .pds-switch__track .pds-switch__knob { transform: translateX(16px); }
.pds-switch input:focus-visible + .pds-switch__track { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.pds-switch--disabled { opacity: .55; cursor: not-allowed; }

/* ---- forms/ThemeToggle ---- */
.pds-toggle {
  position: relative; display: inline-block; overflow: hidden;
  width: 46px; height: 22px; padding: 0;
  border-radius: var(--radius-pill);
  background: var(--border);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}
.pds-toggle:hover { border-color: var(--text-muted); }
.pds-toggle:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
/* Each glyph owns a 22px box sharing the knob's rest centres; flex does the
   centring — no baseline arithmetic, so knob and glyph stay concentric. */
.pds-toggle .ph {
  position: absolute; top: 0; z-index: 1;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
  color: var(--text-muted);
  transition: var(--transition-color);
}
.pds-toggle .ph-sun { left: 0; }
.pds-toggle .ph-moon { left: 24px; }
/* Measured in Phosphor.woff2: the moon's ink sits ~0.28px up-right of its box
   centre (the sun's is exact) — cancel it so both read concentric. */
.pds-toggle .ph-moon::before { display: block; transform: translate(-0.25px, 0.25px); }
.pds-toggle:hover .ph { color: var(--text); }
/* The knob leaves a deliberate 1px ring of the track field on every side.
   Vertical size comes from the symmetric top/bottom constraints (no fixed
   height): at fractional display scaling a fixed height dumps the whole
   rounding error on the bottom edge; paired insets distribute it. No drop
   shadow — a downward shadow would darken the bottom ring and re-create the
   asymmetry. */
.pds-toggle__knob {
  position: absolute; top: 1px; bottom: 1px; left: 1px;
  width: 20px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  transition: transform var(--dur) var(--ease-out);
}
/* Dark = checked = knob on the moon side. Statically-rendered pages omit
   aria-checked until their behaviour script runs, so the pre-paint position
   comes from the root theme attribute; an explicit "false" opts out of it. */
:root[data-theme="dark"] .pds-toggle:not([aria-checked="false"]) .pds-toggle__knob,
.pds-toggle[aria-checked="true"] .pds-toggle__knob { transform: translateX(24px); }
