/* GENERATED by scripts/sync-design.mjs from design/tokens.css + design/fonts/fonts.css + design/interactive/components.css. Never edit by hand:
   edit the design/ source and re-run `node scripts/sync-design.mjs`. */
/* GENERATED by design/render.mjs from design/tokens.json. Never edit by hand.
   Semantic tokens only in app code; primitives exist here for the semantics to
   reference (audit.mjs enforces). Theme: system preference by default; an explicit
   choice stamps data-theme="light|dark" on <html> (shared key: designSpecTheme). */
:root {
  --color-primitive-parchment-0: #FFFFFF;
  --color-primitive-parchment-1: #FDFAF2;
  --color-primitive-parchment-2: #F8F3E9;
  --color-primitive-parchment-3: #F1EADB;
  --color-primitive-parchment-4: #E8DECA;
  --color-primitive-parchment-5: #E3D9C6;
  --color-primitive-parchment-6: #A99E86;
  --color-primitive-parchment-7: #8B8066;
  --color-primitive-parchment-8: #6E6353;
  --color-primitive-parchment-9: #52493C;
  --color-primitive-parchment-10: #3A342A;
  --color-primitive-parchment-11: #241E16;
  --color-primitive-parchment-12: #191510;
  --color-primitive-oxblood-1: #F4E8E0;
  --color-primitive-oxblood-2: #E5CCC2;
  --color-primitive-oxblood-3: #C99384;
  --color-primitive-oxblood-7: #7E332B;
  --color-primitive-oxblood-8: #632119;
  --color-primitive-ember-4: #CE8560;
  --color-primitive-ember-6: #9E4E2E;
  --color-primitive-ember-7: #833C20;
  --color-primitive-night-page: #211B14;
  --color-primitive-night-card: #292217;
  --color-primitive-night-sunken: #15110B;
  --color-primitive-night-ink: #EFE6D6;
  --color-primitive-night-soft: #CDC1AB;
  --color-primitive-night-muted: #A79B84;
  --color-primitive-green-1: #E9F0E9;
  --color-primitive-green-6: #3E7D54;
  --color-primitive-green-7: #2C5F3E;
  --color-primitive-gold-1: #F5ECD2;
  --color-primitive-gold-3: #E9C15B;
  --color-primitive-gold-6: #8A6A14;
  --color-primitive-gold-7: #6B5310;
  --color-primitive-red-1: #FBEAE6;
  --color-primitive-red-6: #B3372F;
  --color-primitive-red-7: #93261F;
  --color-surface-page: #F8F3E9;
  --color-surface-card: #FDFAF2;
  --color-surface-subtle: #F1EADB;
  --color-surface-sunken: #E8DECA;
  --color-surface-scrim: rgba(36,30,22,.48);
  --color-text-primary: #241E16;
  --color-text-secondary: #52493C;
  --color-text-subtle: #6E6353;
  --color-text-disabled: #A99E86;
  --color-text-inverse: #FFFFFF;
  --color-text-brand: #7E332B;
  --color-text-action: #7E332B;
  --color-border-subtle: #E3D9C6;
  --color-border-control: #8B8066;
  --color-border-strong: #3A342A;
  --color-border-focus: #7E332B;
  --color-action-primary: #7E332B;
  --color-action-primary-hover: #632119;
  --color-action-primary-text: #FFFFFF;
  --color-action-secondary: #FDFAF2;
  --color-action-secondary-hover: #241E16;
  --color-action-secondary-text: #241E16;
  --color-action-hover-wash: rgba(110,99,83,.10);
  --color-action-pressed-wash: rgba(110,99,83,.18);
  --color-action-destructive: #FDFAF2;
  --color-action-destructive-text: #B3372F;
  --color-state-selected-bg: #F4E8E0;
  --color-state-selected-border: #7E332B;
  --color-state-selected-text: #632119;
  --color-state-modified: #8A6A14;
  --color-state-modified-bg: #F5ECD2;
  --color-state-modified-text: #6B5310;
  --color-feedback-error: #B3372F;
  --color-feedback-error-bg: #FBEAE6;
  --color-feedback-warning: #6B5310;
  --color-feedback-warning-bg: #F5ECD2;
  --color-feedback-success: #2C5F3E;
  --color-feedback-success-bg: #E9F0E9;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Fira Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-size-caption: 13px;
  --font-size-small: 14px;
  --font-size-body: 17px;
  --font-size-reading: 18px;
  --font-size-title: 19px;
  --font-size-heading: 22px;
  --font-size-display: 30px;
  --line-height-tight: 1.15;
  --line-height-snug: 1.35;
  --line-height-body: 1.6;
  --line-height-reading: 1.72;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --letter-spacing-normal: 0;
  --letter-spacing-caps: 0.04em;
  --letter-spacing-wide: 0.1em;
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --radius-chip: 4px;
  --radius-control: 4px;
  --radius-surface: 4px;
  --radius-pill: 999px;
  --border-width-hairline: 1px;
  --border-width-marker: 2px;
  --border-width-focus: 2px;
  --size-target-min: 24px;
  --size-control-sm: 36px;
  --size-control-md: 48px;
  --size-control-lg: 52px;
  --size-row-min: 48px;
  --size-icon-sm: 16px;
  --size-icon-md: 20px;
  --size-icon-lg: 24px;
  --size-measure-read: 66ch;
  --size-wrap: 1120px;
  --size-focus-offset: 2px;
  --shadow-raised: 0 1px 2px 0 rgba(36,30,22,.05);
  --shadow-panel: 0 2px 8px 0 rgba(36,30,22,.07);
  --shadow-overlay: 0 12px 32px 0 rgba(36,30,22,.16);
  --duration-instant: 80ms;
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 240ms;
  --easing-standard: 0.2, 0, 0, 1;
  --easing-enter: 0.2, 0.7, 0.3, 1;
  --easing-exit: 0.4, 0, 1, 1;
  --breakpoint-compact: 640px;
  --breakpoint-regular: 1024px;
  --breakpoint-wide: 1440px;
  --z-stage: 0;
  --z-rail: 10;
  --z-header: 20;
  --z-popover: 30;
  --z-modal: 40;
  --z-toast: 50;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --color-surface-page: #211B14;
  --color-surface-card: #292217;
  --color-surface-subtle: rgba(255,255,255,.05);
  --color-surface-sunken: #15110B;
  --color-surface-scrim: rgba(0,0,0,.55);
  --color-text-primary: #EFE6D6;
  --color-text-secondary: #CDC1AB;
  --color-text-subtle: #A79B84;
  --color-text-disabled: #7A6E5D;
  --color-text-brand: #CE8560;
  --color-text-action: #CE8560;
  --color-border-subtle: rgba(255,255,255,.09);
  --color-border-control: rgba(255,255,255,.40);
  --color-border-strong: rgba(255,255,255,.55);
  --color-border-focus: #CE8560;
  --color-action-primary: #9E4E2E;
  --color-action-primary-hover: #833C20;
  --color-action-primary-text: #FFF6EC;
  --color-action-secondary: #292217;
  --color-action-secondary-hover: #CDC1AB;
  --color-action-secondary-text: #EFE6D6;
  --color-action-hover-wash: rgba(255,255,255,.055);
  --color-action-pressed-wash: rgba(255,255,255,.09);
  --color-action-destructive: #292217;
  --color-action-destructive-text: #FF6B5E;
  --color-state-selected-bg: rgba(206,133,96,.16);
  --color-state-selected-border: #CE8560;
  --color-state-selected-text: #EFE6D6;
  --color-state-modified: #E9C15B;
  --color-state-modified-bg: rgba(233,193,91,.15);
  --color-state-modified-text: #E9C15B;
  --color-feedback-error: #FF6B5E;
  --color-feedback-error-bg: rgba(255,107,94,.14);
  --color-feedback-warning: #E9C15B;
  --color-feedback-warning-bg: rgba(233,193,91,.15);
  --color-feedback-success: #7FC796;
  --color-feedback-success-bg: rgba(127,199,150,.15);
  }
}
[data-theme="dark"] {
  --color-surface-page: #211B14;
  --color-surface-card: #292217;
  --color-surface-subtle: rgba(255,255,255,.05);
  --color-surface-sunken: #15110B;
  --color-surface-scrim: rgba(0,0,0,.55);
  --color-text-primary: #EFE6D6;
  --color-text-secondary: #CDC1AB;
  --color-text-subtle: #A79B84;
  --color-text-disabled: #7A6E5D;
  --color-text-brand: #CE8560;
  --color-text-action: #CE8560;
  --color-border-subtle: rgba(255,255,255,.09);
  --color-border-control: rgba(255,255,255,.40);
  --color-border-strong: rgba(255,255,255,.55);
  --color-border-focus: #CE8560;
  --color-action-primary: #9E4E2E;
  --color-action-primary-hover: #833C20;
  --color-action-primary-text: #FFF6EC;
  --color-action-secondary: #292217;
  --color-action-secondary-hover: #CDC1AB;
  --color-action-secondary-text: #EFE6D6;
  --color-action-hover-wash: rgba(255,255,255,.055);
  --color-action-pressed-wash: rgba(255,255,255,.09);
  --color-action-destructive: #292217;
  --color-action-destructive-text: #FF6B5E;
  --color-state-selected-bg: rgba(206,133,96,.16);
  --color-state-selected-border: #CE8560;
  --color-state-selected-text: #EFE6D6;
  --color-state-modified: #E9C15B;
  --color-state-modified-bg: rgba(233,193,91,.15);
  --color-state-modified-text: #E9C15B;
  --color-feedback-error: #FF6B5E;
  --color-feedback-error-bg: rgba(255,107,94,.14);
  --color-feedback-warning: #E9C15B;
  --color-feedback-warning-bg: rgba(233,193,91,.15);
  --color-feedback-success: #7FC796;
  --color-feedback-success-bg: rgba(127,199,150,.15);
}

/* Self-hosted faces, subsetted to latin with ALL layout features kept.
   CRITICAL: Fira Sans's true small caps live in GSUB smcp/c2sc. Any re-subsetting
   MUST pass --layout-features='*' (or +=smcp,c2sc) or the SC glyphs are silently
   dropped and font-variant-caps falls back to synthesized fakes. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(Fraunces-var.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(Fraunces-Italic-var.woff2) format('woff2');
}
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(FiraSans-Regular.woff2) format('woff2');
}
@font-face {
  font-family: 'Fira Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(FiraSans-Italic.woff2) format('woff2');
}
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(FiraSans-Medium.woff2) format('woff2');
}
@font-face {
  font-family: 'Fira Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(FiraSans-SemiBold.woff2) format('woff2');
}

/* design/interactive/components.css: the REFERENCE IMPLEMENTATION of every component
   in the spec. Inlined into styleguide.html so the examples are real, working controls;
   written so the app (Hono JSX, CSS-in-TS strings) can adopt it wholesale. Semantic
   tokens only; audit.mjs rules. Class prefix sm- (Shepherd's Message).
   Native elements first: details/summary, radio, checkbox, range; components.js only
   where HTML alone cannot.

   Cursor doctrine (audit.mjs enforces per family): clicked things take `pointer`
   (buttons, selects, checks, radios, chips, summaries, range); a text field keeps its
   caret; disabled goes back to `default`. */

/* ---------- box model ---------- */
.sm-demo, .sm-demo *, [class*="sm-"], [class*="sm-"] * { box-sizing: border-box; }

/* ---------- focus: one ring everywhere ----------
   Ring sits OUTSIDE a focus-offset gap so it survives on fills of its own colour. */
[class*="sm-"]:focus-visible, .sm-demo :focus-visible {
  outline: var(--border-width-focus) solid var(--color-border-focus);
  outline-offset: var(--size-focus-offset);
}

/* ---------- type utilities ---------- */
/* True small caps: Fira Sans smcp/c2sc. NEVER apply to the display face. */
.sm-sc { font-variant-caps: small-caps; letter-spacing: var(--letter-spacing-caps); }
/* Letterspaced-uppercase micro-label (TRANSCRIPT, ABOUT THIS RECORDING). */
.sm-microlabel { font-family: var(--font-body); font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold); letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase; color: var(--color-text-subtle); }

/* ---------- buttons ---------- */
.sm-btn {
  font-family: var(--font-body); font-size: var(--font-size-body); font-weight: var(--font-weight-semibold);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: var(--size-control-md); padding: 0 var(--space-md);
  border-radius: var(--radius-control); cursor: pointer;
  border: var(--border-width-hairline) solid transparent;
  background: none; color: var(--color-text-primary);
  transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast), transform var(--duration-fast);
}
.sm-btn:active { transform: translateY(1px); } /* the press, Phase 1 motion */
.sm-btn:disabled { cursor: default; pointer-events: none; color: var(--color-text-disabled);
  border-color: var(--color-border-subtle); background: var(--color-surface-subtle); }
/* In flight: NO spinner exists in this system (motion.md: nothing loops). A busy
   button keeps its fill and width, refuses input, and its LABEL says what is
   happening ("Publish" → "Publishing…"). Reserve width with min-width if the
   progressive verb runs longer. */
.sm-btn[aria-busy="true"] { cursor: default; pointer-events: none; }
.sm-btn svg { flex: none; }

.sm-btn--primary { background: var(--color-action-primary); color: var(--color-action-primary-text);
  border-color: var(--color-action-primary-hover); }
.sm-btn--primary:hover { background: var(--color-action-primary-hover); }
.sm-btn--lg { min-height: var(--size-control-lg); font-size: var(--font-size-title); padding: 0 var(--space-lg); }
.sm-btn--sm { min-height: var(--size-control-sm); font-size: var(--font-size-small); padding: 0 var(--space-sm); }

/* Quiet: cream fill, ink label, control edge at rest (the edge IS the affordance:
   Principle 3, buttons look like buttons); hover washes and strengthens the edge. */
.sm-btn--quiet { background: var(--color-action-secondary); color: var(--color-action-secondary-text);
  border-color: var(--color-border-control); font-weight: var(--font-weight-medium); }
.sm-btn--quiet:hover { border-color: var(--color-action-secondary-hover); background: var(--color-action-hover-wash); }

/* Link-button: for inline acts inside prose/metadata only. */
.sm-btn--link { color: var(--color-text-action); min-height: var(--size-target-min); padding: 0 var(--space-2xs);
  font-weight: var(--font-weight-medium); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--color-border-subtle); }
.sm-btn--link:hover { text-decoration-color: currentColor; }

/* Destructive: outlined; never a red fill (red reports, it does not do identity). */
.sm-btn--destructive { background: var(--color-action-destructive); color: var(--color-action-destructive-text);
  border-color: var(--color-action-destructive-text); }
.sm-btn--destructive:hover { background: var(--color-feedback-error-bg); }

/* ---------- fields ---------- */
.sm-field { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-2xs);
  font-family: var(--font-body); max-width: 480px; }
.sm-field > label { font-size: var(--font-size-body); font-weight: var(--font-weight-medium);
  color: var(--color-text-primary); }
.sm-field > .hint { font-size: var(--font-size-small); color: var(--color-text-subtle); }

/* Text wells keep the caret: writing `pointer` on one is the opposite mistake. */
.sm-well {
  min-height: var(--size-control-md); padding: 0 var(--space-sm); width: 100%;
  background: var(--color-surface-card); color: var(--color-text-primary);
  border: var(--border-width-hairline) solid var(--color-border-control);
  border-radius: var(--radius-control);
  font-family: var(--font-body); font-size: var(--font-size-body);
  transition: border-color var(--duration-fast), background var(--duration-fast);
}
textarea.sm-well { min-height: calc(var(--size-control-md) * 2); padding: var(--space-xs) var(--space-sm);
  line-height: var(--line-height-body); resize: vertical; }
.sm-well::placeholder { color: var(--color-text-subtle); }
.sm-well:hover { border-color: var(--color-border-strong); }
.sm-well:focus { border-color: var(--color-border-focus); outline: none; }
.sm-well[aria-invalid="true"] { border-color: var(--color-feedback-error);
  box-shadow: inset 0 0 0 1px var(--color-feedback-error); } /* 2px edge without geometry change */
.sm-well:disabled { color: var(--color-text-disabled); border-color: var(--color-border-subtle);
  background: var(--color-surface-subtle); }

/* Validation message: rendered below in flow; it may NEVER move the control it
   describes; rows align to control tops. */
.sm-msg { display: flex; gap: var(--space-2xs); align-items: baseline;
  font-family: var(--font-body); font-size: var(--font-size-small); color: var(--color-feedback-error); }

/* ---------- select ---------- */
/* A select is CLICKED, not typed into: it carries the button pointer.
   The popup is OURS, not the OS's: `appearance: base-select` + ::picker(select)
   restyles the real <select>'s option list with the system's selection grammar,
   keeping native keyboard/AT semantics and zero JS. Browsers without base-select
   fall back to the custom-styled closed control + their native popup. */
.sm-selectw { position: relative; display: inline-flex; width: 100%; }
.sm-select {
  appearance: none; -webkit-appearance: none;
  min-height: var(--size-control-md); width: 100%; padding: 0 44px 0 var(--space-sm);
  background: var(--color-surface-card); color: var(--color-text-primary);
  border: var(--border-width-hairline) solid var(--color-border-control);
  border-radius: var(--radius-control); cursor: pointer;
  font-family: var(--font-body); font-size: var(--font-size-body);
  transition: border-color var(--duration-fast);
}
.sm-select:hover { border-color: var(--color-border-strong); }
.sm-select:focus { border-color: var(--color-border-focus); outline: none; }
.sm-select:disabled { cursor: default; color: var(--color-text-disabled);
  border-color: var(--color-border-subtle); background: var(--color-surface-subtle); }
/* Chevron: stroke SVG (iconography.md: 1.5px, currentColor), never a text glyph. */
.sm-selectw .car { position: absolute; right: var(--space-xs); top: 50%; margin-top: -12px;
  width: 24px; height: 24px; display: grid; place-items: center;
  color: var(--color-text-subtle); pointer-events: none;
  transition: transform var(--duration-base); }
.sm-selectw .sm-select:disabled ~ .car { color: var(--color-text-disabled); }
@supports selector(::picker(select)) {
  .sm-select, ::picker(select) { appearance: base-select; }
  .sm-select { display: inline-flex; align-items: center; }
  .sm-select::picker-icon { display: none; } /* our chevron, not the UA's */
  .sm-selectw .sm-select:open ~ .car { transform: rotate(180deg); }
  ::picker(select) { background: var(--color-surface-card);
    border: var(--border-width-hairline) solid var(--color-border-subtle);
    border-radius: var(--radius-control); box-shadow: var(--shadow-overlay);
    padding: var(--space-2xs); margin-top: var(--space-3xs);
    /* entrance: fade + settle (Phase 1 motion) */
    opacity: 0; transform: translateY(6px);
    transition: opacity var(--duration-base), transform var(--duration-base) var(--easing-enter),
      display var(--duration-base) allow-discrete, overlay var(--duration-base) allow-discrete; }
  .sm-select:open::picker(select) { opacity: 1; transform: none; }
  @starting-style { .sm-select:open::picker(select) { opacity: 0; transform: translateY(6px); } }
  .sm-selectw option { display: flex; align-items: center; gap: var(--space-xs);
    cursor: pointer; min-height: var(--size-control-md);
    padding: var(--space-2xs) var(--space-sm); line-height: var(--line-height-snug);
    border-radius: var(--radius-chip); font-family: var(--font-body);
    font-size: var(--font-size-body); color: var(--color-text-primary); }
  .sm-selectw option:hover, .sm-selectw option:focus-visible { background: var(--color-action-hover-wash); }
  .sm-selectw option:checked { background: var(--color-state-selected-bg); color: var(--color-state-selected-text); }
  .sm-selectw option::checkmark { color: var(--color-state-selected-border); }
}

/* ---------- checkbox & radio rows ---------- */
.sm-checkrow, .sm-radiorow { display: flex; align-items: flex-start; gap: var(--space-sm);
  min-height: var(--size-row-min); padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-control); cursor: pointer;
  font-family: var(--font-body); font-size: var(--font-size-body); color: var(--color-text-primary);
  transition: background var(--duration-fast); }
.sm-checkrow:hover, .sm-radiorow:hover { background: var(--color-action-hover-wash); }
.sm-checkrow input, .sm-radiorow input { appearance: none; -webkit-appearance: none; margin: 2px 0 0; flex: none;
  width: 22px; height: 22px;
  border: var(--border-width-hairline) solid var(--color-border-control);
  background: var(--color-surface-card); display: grid; place-items: center; cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast); }
.sm-checkrow input { border-radius: var(--radius-chip); }
.sm-radiorow input { border-radius: var(--radius-pill); }
.sm-checkrow input:checked, .sm-checkrow input:indeterminate,
.sm-radiorow input:checked { background: var(--color-action-primary); border-color: var(--color-action-primary); }
.sm-checkrow input:checked::before { content: ""; width: 14px; height: 14px;
  background: var(--color-action-primary-text);
  clip-path: polygon(18% 46%, 8% 58%, 40% 86%, 92% 24%, 81% 15%, 39% 65%); }
.sm-checkrow input:indeterminate::before { content: ""; width: 12px; height: 2px;
  background: var(--color-action-primary-text); }
.sm-radiorow input:checked::before { content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-action-primary-text); }
.sm-checkrow input:disabled, .sm-radiorow input:disabled { cursor: default;
  border-color: var(--color-border-subtle); background: var(--color-surface-subtle); }
.sm-checkrow .lbl, .sm-radiorow .lbl { display: block; }
.sm-checkrow .hint, .sm-radiorow .hint { display: block; color: var(--color-text-subtle);
  font-size: var(--font-size-small); }

/* ---------- segmented choice ---------- */
.sm-seg { display: inline-flex; background: var(--color-surface-sunken);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  border-radius: var(--radius-control); padding: var(--space-3xs); }
.sm-seg label { position: relative; display: inline-flex; }
.sm-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sm-seg input:disabled { cursor: default; }
.sm-seg span { display: inline-flex; align-items: center; min-height: calc(var(--size-control-md) - 2 * var(--space-3xs) - 2px);
  padding: 0 var(--space-md); border-radius: var(--radius-chip);
  font-family: var(--font-body); font-size: var(--font-size-body); color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium); /* constant: selection may never change geometry */
  border: var(--border-width-hairline) solid transparent;
  transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast); }
.sm-seg label:hover input:not(:checked) + span { background: var(--color-action-hover-wash); }
.sm-seg input:checked + span { background: var(--color-surface-card); color: var(--color-text-primary);
  border-color: var(--color-state-selected-border); }
.sm-seg input:focus-visible + span { outline: var(--border-width-focus) solid var(--color-border-focus);
  outline-offset: var(--size-focus-offset); }

/* ---------- scripture cite ---------- */
/* A navigation chip, not a filter: real <a>, small-caps label, bordered like a control
   because it is one. */
.sm-cite { display: inline-flex; align-items: center; min-height: var(--size-control-sm);
  padding: 0 var(--space-sm); margin: 0 var(--space-2xs) var(--space-2xs) 0;
  font-family: var(--font-body); font-size: var(--font-size-small); font-weight: var(--font-weight-semibold);
  font-variant-caps: small-caps; letter-spacing: var(--letter-spacing-caps);
  color: var(--color-text-primary); background: var(--color-surface-card);
  border: var(--border-width-hairline) solid var(--color-border-control);
  border-radius: var(--radius-chip); text-decoration: none; cursor: pointer;
  transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast); }
.sm-cite:hover { color: var(--color-text-action); border-color: var(--color-state-selected-border);
  background: var(--color-state-selected-bg); }

/* ---------- filter chip (selectable) ---------- */
.sm-chips { display: flex; gap: var(--space-xs); align-items: center; flex-wrap: wrap; }
.sm-chip { position: relative; display: inline-flex; }
.sm-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sm-chip input:disabled { cursor: default; }
.sm-chip span { min-height: var(--size-control-sm); display: inline-flex; align-items: center;
  padding: 0 var(--space-md); border-radius: var(--radius-pill);
  border: var(--border-width-hairline) solid var(--color-border-control);
  color: var(--color-text-secondary); background: var(--color-surface-card);
  font-family: var(--font-body); font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium); /* constant: see .sm-seg */
  transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast); }
.sm-chip:hover input:not(:checked) + span { background: var(--color-action-hover-wash); }
.sm-chip input:checked + span { background: var(--color-state-selected-bg);
  border-color: var(--color-state-selected-border); color: var(--color-state-selected-text); }
.sm-chip input:focus-visible + span { outline: var(--border-width-focus) solid var(--color-border-focus);
  outline-offset: var(--size-focus-offset); }

/* ---------- card ---------- */
.sm-card { background: var(--color-surface-card);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  border-radius: var(--radius-surface); box-shadow: var(--shadow-raised);
  padding: var(--space-lg); font-family: var(--font-body); }
.sm-card > h3 { font-family: var(--font-display); font-weight: var(--font-weight-medium);
  font-size: var(--font-size-title); color: var(--color-text-primary); margin: 0 0 var(--space-2xs); }

/* ---------- record block (colophon) ---------- */
.sm-record { background: var(--color-surface-card);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  border-radius: var(--radius-surface); max-width: 480px; font-family: var(--font-body); }
/* The record's apparatus is TRUE small caps (the reason Fira Sans is here):
   title row and labels both; only the values run in normal case. */
.sm-record > .ct { font-size: var(--font-size-body); font-weight: var(--font-weight-semibold);
  font-variant-caps: small-caps; letter-spacing: var(--letter-spacing-caps); color: var(--color-text-brand);
  padding: var(--space-xs) var(--space-sm);
  border-bottom: var(--border-width-hairline) solid var(--color-border-subtle); }
.sm-record dl { display: grid; grid-template-columns: 130px 1fr; gap: var(--space-2xs) var(--space-sm);
  margin: 0; padding: var(--space-sm); font-size: var(--font-size-small); }
.sm-record dt { color: var(--color-text-subtle); font-weight: var(--font-weight-regular);
  font-variant-caps: small-caps; letter-spacing: var(--letter-spacing-caps); font-size: var(--font-size-body); }
.sm-record dd { margin: 0; color: var(--color-text-primary); }
.sm-record dd a { color: var(--color-text-action); text-underline-offset: 3px;
  text-decoration-color: var(--color-border-subtle); }
.sm-record dd a:hover { text-decoration-color: currentColor; }

/* ---------- table (B1 · ruled catalog) ---------- */
/* Wide tables scroll inside their own container; the page never scrolls sideways. */
.sm-tablewrap { overflow-x: auto; }
.sm-table { width: 100%; border-collapse: collapse; font-family: var(--font-body);
  font-size: var(--font-size-body); color: var(--color-text-primary); }
.sm-table th { text-align: left; font-size: var(--font-size-body); font-weight: var(--font-weight-medium);
  font-variant-caps: small-caps; letter-spacing: var(--letter-spacing-caps); color: var(--color-text-subtle);
  padding: var(--space-2xs) var(--space-sm) var(--space-xs);
  border-bottom: var(--border-width-marker) solid var(--color-border-strong); }
.sm-table td { padding: var(--space-sm); vertical-align: middle;
  border-bottom: var(--border-width-hairline) solid var(--color-border-subtle); }
.sm-table tbody tr { transition: background var(--duration-fast); }
.sm-table tbody tr:hover { background: var(--color-action-hover-wash); }
.sm-table .title { font-family: var(--font-display); font-size: var(--font-size-title);
  font-weight: var(--font-weight-medium); }
.sm-table .num { font-variant-numeric: tabular-nums; color: var(--color-text-secondary); white-space: nowrap; }
/* Operator-console density; never tenant-facing (spacing.md). */
.sm-table--dense { font-size: var(--font-size-small); }
.sm-table--dense td { padding: var(--space-2xs) var(--space-xs); }
.sm-table--dense .title { font-family: var(--font-body); font-size: var(--font-size-body); font-weight: var(--font-weight-medium); }

/* ---------- status chip ---------- */
.sm-status { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 28px;
  padding: 0 var(--space-xs); border-radius: var(--radius-chip);
  border: var(--border-width-hairline) solid; white-space: nowrap;
  font-family: var(--font-body); font-size: var(--font-size-small); font-weight: var(--font-weight-semibold);
  font-variant-caps: small-caps; letter-spacing: var(--letter-spacing-caps); }
.sm-status--draft { color: var(--color-text-subtle); border-color: var(--color-border-subtle); background: var(--color-surface-page); }
.sm-status--processing { color: var(--color-feedback-warning); border-color: var(--color-state-modified); background: var(--color-feedback-warning-bg); }
.sm-status--review { color: var(--color-state-selected-text); border-color: var(--color-state-selected-border); background: var(--color-state-selected-bg); }
.sm-status--published { color: var(--color-feedback-success); border-color: var(--color-feedback-success); background: var(--color-feedback-success-bg); }
.sm-status--error { color: var(--color-feedback-error); border-color: var(--color-feedback-error); background: var(--color-feedback-error-bg); }

/* ---------- tabs (T1 · underline) ---------- */
/* The baseline rule is an INSET SHADOW on the strip, not a border the links overlap
   with negative margins: the -1px overlap made the strip 1px taller than itself and
   summoned a scrollbar. overflow-y is pinned shut; only x may ever scroll. */
.sm-tabs { display: flex; gap: var(--space-lg); font-family: var(--font-body); font-size: var(--font-size-body);
  box-shadow: inset 0 calc(-1 * var(--border-width-hairline)) 0 var(--color-border-subtle);
  overflow-x: auto; overflow-y: hidden; }
.sm-tabs a { display: inline-flex; align-items: center; min-height: var(--size-control-md);
  color: var(--color-text-secondary); text-decoration: none; cursor: pointer; white-space: nowrap;
  font-weight: var(--font-weight-medium); /* constant: selection never changes geometry */
  border-bottom: var(--border-width-marker) solid transparent;
  transition: color var(--duration-fast); }
.sm-tabs a:hover { color: var(--color-text-primary); }
.sm-tabs a[aria-current] { color: var(--color-text-brand); border-bottom-color: var(--color-state-selected-border); }

/* ---------- site header ---------- */
/* One row, never an accidental wrap: the brand yields (min-width 0, two-line clamp),
   the nav and Menu button never shrink. Under breakpoint.compact the nav row hides
   and the Menu button takes over (see .sm-menu below). */
.sm-siteheader { position: relative; display: flex; justify-content: space-between;
  align-items: baseline; gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface-card);
  border-bottom: var(--border-width-hairline) solid var(--color-border-strong);
  font-family: var(--font-body); }
/* Long church names (the deliberate rule, Phase 3): title size, at most TWO lines,
   ellipsis past that. The wordmark's size never varies between tenants; the full
   name always appears whole on the landing page and footer. */
.sm-siteheader .brand { font-family: var(--font-display); font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-title); line-height: var(--line-height-snug);
  color: var(--color-text-primary); text-decoration: none; cursor: pointer;
  flex: 1 1 auto; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sm-siteheader > nav { display: flex; gap: var(--space-lg); flex: none; }
.sm-siteheader > nav a { display: inline-flex; align-items: center; min-height: var(--size-target-min);
  color: var(--color-text-primary); text-decoration: none; cursor: pointer;
  font-weight: var(--font-weight-medium); font-size: var(--font-size-body);
  border-bottom: var(--border-width-marker) solid transparent; padding-bottom: var(--space-3xs);
  transition: color var(--duration-fast); }
.sm-siteheader > nav a:hover { color: var(--color-text-action); }
.sm-siteheader > nav a[aria-current] { color: var(--color-text-brand); border-bottom-color: var(--color-state-selected-border); }

/* Compact navigation (M2, chosen Phase 3): a bordered "Menu" button (word + icon,
   never a bare glyph) opening a full-width panel of 48px nav rows. Native details;
   no JS. Hidden above breakpoint.compact, where the nav row shows instead. */
.sm-menu { display: none; flex: none; }
.sm-menu > summary { list-style: none; }
.sm-menu > summary::-webkit-details-marker { display: none; }
.sm-menu > summary .sm-menubtn { display: inline-flex; align-items: center; gap: var(--space-2xs);
  min-height: 44px; padding: 0 var(--space-sm); cursor: pointer;
  background: var(--color-surface-card); color: var(--color-text-primary);
  border: var(--border-width-hairline) solid var(--color-border-control);
  border-radius: var(--radius-control);
  font-family: var(--font-body); font-size: var(--font-size-body); font-weight: var(--font-weight-medium);
  transition: background var(--duration-fast), border-color var(--duration-fast); }
.sm-menu > summary:hover .sm-menubtn { background: var(--color-action-hover-wash);
  border-color: var(--color-border-strong); }
.sm-menu[open] > summary .sm-menubtn { background: var(--color-surface-subtle);
  border-color: var(--color-border-strong); }
.sm-menu .panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  background: var(--color-surface-card);
  border-bottom: var(--border-width-hairline) solid var(--color-border-strong);
  box-shadow: var(--shadow-panel); padding: var(--space-2xs) 0 var(--space-xs); }
.sm-menu[open] .panel { opacity: 1; transform: none;
  transition: opacity var(--duration-base), transform var(--duration-base) var(--easing-enter); }
@starting-style { .sm-menu[open] .panel { opacity: 0; transform: translateY(6px); } }
.sm-menu .panel a { display: flex; align-items: center; min-height: var(--size-control-md);
  padding: 0 var(--space-md); text-decoration: none; cursor: pointer;
  color: var(--color-text-primary); font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  border-left: var(--border-width-marker) solid transparent;
  transition: background var(--duration-fast); }
.sm-menu .panel a:hover { background: var(--color-action-hover-wash); }
.sm-menu .panel a[aria-current] { color: var(--color-text-brand);
  border-left-color: var(--color-state-selected-border);
  background: var(--color-state-selected-bg); }
@media (max-width: 640px) {
  .sm-siteheader > nav { display: none; }
  .sm-menu { display: block; }
}

/* ---------- pagination ---------- */
.sm-pagination { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap;
  font-family: var(--font-body); font-size: var(--font-size-small); }
.sm-pagination .count { color: var(--color-text-subtle); margin-right: auto; }
.sm-page { display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--size-control-sm); min-height: var(--size-control-sm); padding: 0 var(--space-xs);
  background: var(--color-surface-card); color: var(--color-text-primary);
  border: var(--border-width-hairline) solid var(--color-border-control);
  border-radius: var(--radius-control); cursor: pointer;
  font-family: var(--font-body); font-size: var(--font-size-small); font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums; text-decoration: none;
  transition: background var(--duration-fast), border-color var(--duration-fast); }
.sm-page:hover { background: var(--color-action-hover-wash); border-color: var(--color-border-strong); }
.sm-page[aria-current] { background: var(--color-state-selected-bg);
  border-color: var(--color-state-selected-border); color: var(--color-state-selected-text); }
.sm-page:disabled, .sm-page[aria-disabled="true"] { cursor: default; pointer-events: none;
  color: var(--color-text-disabled); border-color: var(--color-border-subtle); }

/* ---------- disclosure (native details) ---------- */
/* Full width ALWAYS: without this a details sizes to its widest content, so opening
   a body wider than the title reflowed the whole row (geometry rule violation). */
details.sm-x { width: 100%; }
details.sm-x > summary { list-style: none; cursor: pointer; }
details.sm-x > summary::-webkit-details-marker { display: none; }
.sm-xrow { display: flex; align-items: center; gap: var(--space-xs);
  min-height: var(--size-row-min); padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-control); font-family: var(--font-body); font-size: var(--font-size-body);
  color: var(--color-text-primary); font-weight: var(--font-weight-medium);
  transition: background var(--duration-fast); }
.sm-xrow:hover { background: var(--color-action-hover-wash); }
details.sm-x[open] > summary .sm-xrow { background: var(--color-surface-subtle); }
.sm-xrow .car { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center;
  color: var(--color-text-subtle); transition: transform var(--duration-base); }
details.sm-x[open] > summary .sm-xrow .car { transform: rotate(180deg); }
.sm-xbody { padding: var(--space-xs) var(--space-sm) var(--space-sm); font-family: var(--font-body);
  font-size: var(--font-size-body); color: var(--color-text-secondary); }

/* ---------- dialog ---------- */
/* Real behaviour only: opened via showModal() (components.js wires [data-open-dialog]),
   closed by its own form[method=dialog] buttons or Esc. Never rendered pre-opened:
   a non-modal open dialog is absolutely positioned by the UA and squats on the page. */
dialog.sm-dialog { background: var(--color-surface-card); color: var(--color-text-primary);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  border-radius: var(--radius-surface); box-shadow: var(--shadow-overlay);
  padding: var(--space-lg); max-width: 480px; font-family: var(--font-body); }
dialog.sm-dialog::backdrop { background: var(--color-surface-scrim); }
.sm-dialog .title { font-family: var(--font-display); font-size: var(--font-size-title);
  font-weight: var(--font-weight-medium); color: var(--color-text-primary); margin: 0 0 var(--space-2xs); }
.sm-dialog .body { font-size: var(--font-size-body); color: var(--color-text-secondary); margin: 0 0 var(--space-md); }
.sm-dialog .acts { display: flex; gap: var(--space-xs); justify-content: flex-end; }

/* ---------- banner (inline alert) ---------- */
/* Colour is never the only channel: every banner carries an icon and words. */
.sm-banner { display: flex; gap: var(--space-sm); align-items: flex-start;
  padding: var(--space-sm) var(--space-md); border-radius: var(--radius-control);
  border: var(--border-width-hairline) solid; font-family: var(--font-body); font-size: var(--font-size-body); }
.sm-banner .ico { flex: none; display: grid; place-items: center; margin-top: 2px; }
.sm-banner .msg { flex: 1; min-width: 0; }
.sm-banner .msg b { font-weight: var(--font-weight-semibold); }
/* Every inline link in the system has a rest→hover step. Banner links run in the
   banner's own ink, so the step is decoration THICKNESS (1px → 2px), visible on any
   wash, zero geometry change (text-decoration never affects layout). */
.sm-banner .msg a { color: inherit; font-weight: var(--font-weight-medium);
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: text-decoration-thickness var(--duration-fast); }
.sm-banner .msg a:hover { text-decoration-thickness: 2px; }
.sm-banner--error { color: var(--color-feedback-error); border-color: var(--color-feedback-error);
  background: var(--color-feedback-error-bg); }
.sm-banner--warning { color: var(--color-feedback-warning); border-color: var(--color-state-modified);
  background: var(--color-feedback-warning-bg); }
.sm-banner--success { color: var(--color-feedback-success); border-color: var(--color-feedback-success);
  background: var(--color-feedback-success-bg); }
.sm-banner--info { color: var(--color-text-secondary); border-color: var(--color-border-subtle);
  background: var(--color-surface-subtle); }

/* ---------- toast ---------- */
/* Transient confirmation only: errors are never toasts (they persist as banners). */
.sm-toast { display: flex; align-items: center; gap: var(--space-sm); max-width: 420px;
  background: var(--color-surface-card); color: var(--color-text-primary);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  border-radius: var(--radius-control); box-shadow: var(--shadow-overlay);
  padding: var(--space-sm) var(--space-md); font-family: var(--font-body); font-size: var(--font-size-body); }
.sm-toast .ico { flex: none; display: grid; place-items: center; color: var(--color-feedback-success); }
.sm-toast .msg { flex: 1; min-width: 0; }
.sm-toast .x { flex: none; width: var(--size-target-min); height: var(--size-target-min);
  display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0;
  color: var(--color-text-subtle); border-radius: var(--radius-chip);
  transition: background var(--duration-fast); }
.sm-toast .x:hover { background: var(--color-action-hover-wash); color: var(--color-text-primary); }

/* ---------- progress ---------- */
.sm-progress { font-family: var(--font-body); font-size: var(--font-size-small); max-width: 480px; }
.sm-progress .row { display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--space-sm); margin-bottom: var(--space-2xs); }
.sm-progress .lbl { color: var(--color-text-secondary); }
.sm-progress .pct { color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.sm-progress .track { height: 6px; border-radius: var(--radius-chip);
  background: var(--color-surface-sunken);
  border: var(--border-width-hairline) solid var(--color-border-subtle); overflow: hidden; }
.sm-progress .fill { display: block; height: 100%; background: var(--color-action-primary);
  border-radius: inherit; transition: width var(--duration-base) var(--easing-standard); }

/* ---------- skeleton (indeterminate loading) ---------- */
/* STATIC: nothing shimmers or pulses (motion.md: nothing loops). A visible "Loading…"
   line carries the state; the blocks only hold the layout steady. */
.sm-skeleton { display: flex; flex-direction: column; gap: var(--space-xs); }
.sm-skeleton i { display: block; height: var(--space-md); border-radius: var(--radius-chip);
  background: var(--color-surface-sunken); }
.sm-skeleton i.w60 { width: 60%; } .sm-skeleton i.w80 { width: 80%; } .sm-skeleton i.w40 { width: 40%; }
.sm-loadline { font-family: var(--font-body); font-size: var(--font-size-small);
  color: var(--color-text-subtle); margin-bottom: var(--space-xs); }

/* ---------- empty state ---------- */
/* Modesty flatters (Principle 4): a small archive must look dignified, not failed. */
.sm-empty { text-align: center; padding: var(--space-2xl) var(--space-lg);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  border-radius: var(--radius-surface); background: var(--color-surface-card);
  font-family: var(--font-body); }
.sm-empty .ico { color: var(--color-text-subtle); margin-bottom: var(--space-sm); }
.sm-empty .head { font-family: var(--font-display); font-weight: var(--font-weight-medium);
  font-size: var(--font-size-title); color: var(--color-text-primary); margin: 0 0 var(--space-2xs); }
.sm-empty .sub { font-size: var(--font-size-body); color: var(--color-text-secondary);
  max-width: 44ch; margin: 0 auto var(--space-md); }

/* ---------- transcript (P1 · margin timestamps, chosen Phase 2) ----------
   Flowing paragraphs. The seek target is the WHOLE ROW: the margin strip beside
   each paragraph (a real button, full paragraph height, not the small time label
   it carries) plus the paragraph itself, which the island wires for mouse and
   touch while the button stays the only tab stop.
   The prose keeps the text caret: this is the surface people select and copy
   from, and `pointer` here would deny it (components/transcript.md).
   GEOMETRY IS CONSTANT: every paragraph carries its wash padding and transparent
   bar at rest, so becoming current swaps colours only, zero text movement. */
.sm-transcript { font-family: var(--font-display); font-size: var(--font-size-reading);
  line-height: var(--line-height-reading); color: var(--color-text-primary); }
.sm-tp { display: grid; grid-template-columns: 76px minmax(0, var(--size-measure-read));
  gap: 0 var(--space-md); }
/* The strip is a full-height hit area but paints NOTHING itself: a tall washed
   column with a small top-aligned label read as broken. Feedback goes where the
   eye is, and it is keyed to the ROW, not the strip: hovering anywhere that
   seeks (strip or prose) outlines the time chip and washes the paragraph, so
   the surface never promises more than it answers. */
.sm-tp .seek { align-self: stretch; justify-self: stretch; margin: 0;
  display: flex; justify-content: flex-end; align-items: flex-start;
  padding: calc(var(--space-sm) + 3px) var(--space-2xs) var(--space-sm);
  background: none; border: 0; cursor: pointer; }
.sm-tp .seek .t { display: inline-flex; align-items: center; min-height: var(--size-target-min);
  padding: 0 var(--space-xs);
  font-family: var(--font-body); font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums;
  color: var(--color-text-brand);
  border: var(--border-width-hairline) solid transparent; border-radius: var(--radius-chip);
  transition: border-color var(--duration-fast), background var(--duration-fast); }
.sm-tp:hover .seek .t { border-color: var(--color-state-selected-border); }
.sm-tp:hover:not(.sm-tp--current) p { background: var(--color-action-hover-wash); }
/* The focus ring belongs on the chip, not around the whole tall strip. */
.sm-tp .seek:focus-visible { outline: none; }
.sm-tp .seek:focus-visible .t { outline: var(--border-width-focus) solid var(--color-border-focus);
  outline-offset: var(--size-focus-offset); }
.sm-tp p { margin: 0 0 var(--space-2xs);
  padding: var(--space-sm) var(--space-md);
  border-left: var(--border-width-marker) solid transparent;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  transition: background var(--duration-fast), border-color var(--duration-fast); }
.sm-tp--current p, .sm-tp:target p { background: var(--color-state-selected-bg);
  border-left-color: var(--color-state-selected-border); }
.sm-tp--current .seek .t, .sm-tp:target .seek .t {
  background: var(--color-state-selected-bg); border-color: var(--color-state-selected-border); }
/* Compact: there is no margin, so there is no apparatus (a reader's edition, not
   a study edition; SSM-78). The strips stay in the document for keyboard and
   screen-reader users, visually hidden and shown again on focus; only the
   current paragraph (or a deep-linked one) shows its time chip, above its wash,
   so the time appears where it means something. The paragraph is the tap
   target (the island seeks from it). Desktop keeps the margin timestamps. */
@media (max-width: 640px) {
  .sm-tp { display: block; position: relative; }
  .sm-tp .seek { position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; }
  .sm-tp--current .seek, .sm-tp:target .seek, .sm-tp .seek:focus-visible {
    position: static; width: auto; height: auto; overflow: visible; clip-path: none;
    display: inline-flex; padding: var(--space-3xs); margin-bottom: var(--space-3xs); }
  .sm-tp .seek .t { border-color: var(--color-border-control); }
}

/* ---------- audio player ---------- */
.sm-player { display: flex; align-items: center; gap: var(--space-sm);
  font-family: var(--font-body); }
.sm-player .play { flex: none; width: var(--size-control-md); height: var(--size-control-md);
  border-radius: var(--radius-pill); cursor: pointer;
  border: var(--border-width-hairline) solid var(--color-action-primary-hover);
  background: var(--color-action-primary); color: var(--color-action-primary-text);
  display: grid; place-items: center;
  transition: background var(--duration-fast), transform var(--duration-fast); }
.sm-player .play:hover { background: var(--color-action-primary-hover); }
.sm-player .play:active { transform: translateY(1px); }
.sm-player .time { flex: none; font-size: var(--font-size-small); color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums; }
/* The scrub is a REAL range input; components.js paints the played portion into
   --sm-scrub-fill. A range inherits `cursor: default`; it is dragged, so: pointer. */
input.sm-scrub { flex: 1; min-width: 0; appearance: none; -webkit-appearance: none;
  height: var(--size-target-min); background: transparent; cursor: pointer; margin: 0; }
input.sm-scrub:disabled { cursor: default; }
input.sm-scrub::-webkit-slider-runnable-track { height: 6px; border-radius: var(--radius-chip);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  background: linear-gradient(to right,
    var(--color-action-primary) 0 var(--sm-scrub-fill, 0%),
    var(--color-surface-sunken) var(--sm-scrub-fill, 0%) 100%); }
input.sm-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: var(--radius-pill); background: var(--color-action-primary);
  border: 2px solid var(--color-surface-card); margin-top: -6px; box-shadow: var(--shadow-raised); }
input.sm-scrub::-moz-range-track { height: 6px; border-radius: var(--radius-chip);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  background: var(--color-surface-sunken); }
input.sm-scrub::-moz-range-progress { height: 6px; border-radius: var(--radius-chip);
  background: var(--color-action-primary); }
input.sm-scrub::-moz-range-thumb { width: 16px; height: 16px; border-radius: var(--radius-pill);
  background: var(--color-action-primary); border: 2px solid var(--color-surface-card); }

/* ---------- wizard steps ---------- */
.sm-steps { display: flex; align-items: center; gap: var(--space-sm);
  font-family: var(--font-body); font-size: var(--font-size-small); }
.sm-steps .bar { flex: 1; height: 1px; background: var(--color-border-subtle); min-width: var(--space-md); }
.sm-step { display: inline-flex; align-items: center; gap: var(--space-xs);
  color: var(--color-text-subtle); white-space: nowrap;
  font-weight: var(--font-weight-medium); /* constant: state never changes geometry */ }
.sm-step .n { width: 28px; height: 28px; border-radius: var(--radius-pill); flex: none;
  display: grid; place-items: center; font-weight: var(--font-weight-semibold);
  background: var(--color-surface-card);
  border: var(--border-width-hairline) solid var(--color-border-control);
  color: var(--color-text-secondary); }
.sm-step--done { color: var(--color-text-secondary); }
.sm-step--done .n { background: var(--color-feedback-success-bg);
  border-color: var(--color-feedback-success); color: var(--color-feedback-success); }
.sm-step--current { color: var(--color-text-primary); }
.sm-step--current .n { background: var(--color-action-primary);
  border-color: var(--color-action-primary-hover); color: var(--color-action-primary-text); }

/* ---------- stat tile ---------- */
/* dataviz contract: label · value (sans semibold, PROPORTIONAL figures: tabular
   digits look loose at display sizes) · optional delta (direction × goodness,
   arrow + words, never colour alone). No serif hero numbers. */
.sm-stat { background: var(--color-surface-card);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  border-radius: var(--radius-surface); padding: var(--space-md) var(--space-lg);
  font-family: var(--font-body); min-width: 180px; }
.sm-stat .lbl { font-size: var(--font-size-small); color: var(--color-text-secondary);
  margin-bottom: var(--space-3xs); }
.sm-stat .val { font-size: var(--font-size-display); font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary); line-height: var(--line-height-tight); }
.sm-stat .delta { display: inline-flex; align-items: center; gap: var(--space-3xs);
  margin-top: var(--space-2xs); font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium); }
.sm-stat .delta.up-good { color: var(--color-feedback-success); }
.sm-stat .delta.down-bad { color: var(--color-feedback-error); }
.sm-stat .delta.flat { color: var(--color-text-subtle); }

/* ---------- page grammar (patterns/layout.md) ---------- */
/* Page head: title left, ONE thing right: the screen's primary act (dashboard) or a
   plain count (library). Baseline-aligned so the right slot's text sits on the title's
   line; wraps under compact. */
.sm-pagehead { display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-sm) var(--space-md); flex-wrap: wrap; font-family: var(--font-body); }
.sm-pagehead h1, .sm-pagehead .h1 { font-family: var(--font-display); font-weight: var(--font-weight-medium);
  font-size: var(--font-size-display); line-height: var(--line-height-tight);
  color: var(--color-text-primary); margin: 0; }
.sm-pagehead .count { color: var(--color-text-subtle); font-size: var(--font-size-small);
  font-variant-numeric: tabular-nums; }
/* Back link: names its destination ("← All sermons"), sits above the page title.
   Rest→hover step: hairline underline → currentColor (the system's link grammar). */
a.sm-back { display: inline-flex; align-items: center; gap: var(--space-2xs);
  min-height: var(--size-target-min); cursor: pointer;
  color: var(--color-text-action); font-family: var(--font-body);
  font-size: var(--font-size-small); font-weight: var(--font-weight-medium);
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--color-border-subtle);
  transition: text-decoration-color var(--duration-fast); }
a.sm-back:hover { text-decoration-color: currentColor; }
/* Colophon line: the page's quiet closing counts: a hairline, then plain figures. */
.sm-colophon { display: flex; gap: var(--space-lg); flex-wrap: wrap;
  border-top: var(--border-width-hairline) solid var(--color-border-subtle);
  padding-top: var(--space-md); font-family: var(--font-body);
  font-size: var(--font-size-small); color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums; }

/* ---------- form grammar (patterns/forms.md) ---------- */
.sm-form { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-md);
  max-width: 640px; font-family: var(--font-body); }
/* Two RELATED short fields may share a row at regular width; never three. */
.sm-form .pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
@media (max-width: 640px) { .sm-form .pair { grid-template-columns: 1fr; } }
/* Actions row: primary act first (reading order), quiet alternatives after. */
.sm-acts { display: flex; gap: var(--space-xs); align-items: center; flex-wrap: wrap;
  margin-top: var(--space-xs); }

/* ---------- library patterns (patterns/library.md) ---------- */
/* Catalog row: one sermon, one ruled row, the WHOLE row is one link (A/C, chosen
   Phase 3). Date in the margin, Fraunces title, speaker · series beneath, passage
   in true small caps on the right. Hover washes the row and inks the title. */
a.sm-catrow { display: grid; grid-template-columns: 110px 1fr auto;
  gap: var(--space-2xs) var(--space-md); align-items: baseline;
  padding: var(--space-md) var(--space-sm);
  border-bottom: var(--border-width-hairline) solid var(--color-border-subtle);
  text-decoration: none; color: var(--color-text-primary); cursor: pointer;
  font-family: var(--font-body); transition: background var(--duration-fast); }
a.sm-catrow:hover { background: var(--color-action-hover-wash); }
a.sm-catrow .date { font-size: var(--font-size-small); color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
a.sm-catrow .t { font-family: var(--font-display); font-size: var(--font-size-title);
  font-weight: var(--font-weight-medium); transition: color var(--duration-fast); }
a.sm-catrow:hover .t { color: var(--color-text-action); }
a.sm-catrow .meta { grid-column: 2; font-size: var(--font-size-small); color: var(--color-text-secondary); }
a.sm-catrow .pass { grid-row: 1 / span 2; grid-column: 3; align-self: center;
  font-size: var(--font-size-small); font-weight: var(--font-weight-semibold);
  font-variant-caps: small-caps; letter-spacing: var(--letter-spacing-caps);
  color: var(--color-text-brand); white-space: nowrap; }
/* Compact: the row stacks; date, title, meta, passage, all one column. */
@media (max-width: 640px) {
  a.sm-catrow { grid-template-columns: 1fr; gap: var(--space-3xs); }
  a.sm-catrow .meta { grid-column: 1; }
  a.sm-catrow .pass { grid-row: auto; grid-column: 1; align-self: start; }
}

/* Featured block: this Sunday's sermon on the landing page (C, chosen Phase 3). */
.sm-featured { background: var(--color-surface-card);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  border-radius: var(--radius-surface); box-shadow: var(--shadow-raised);
  padding: var(--space-xl) var(--space-xl) var(--space-lg); font-family: var(--font-body); }
.sm-featured .ft { font-family: var(--font-display); font-weight: var(--font-weight-medium);
  font-size: var(--font-size-display); line-height: var(--line-height-tight);
  color: var(--color-text-primary); margin: 0 0 var(--space-2xs); }
.sm-featured .deck { font-size: var(--font-size-body); color: var(--color-text-secondary);
  margin: 0 0 var(--space-md); }
.sm-featured .sm-player { margin-bottom: var(--space-sm); }
@media (max-width: 640px) { .sm-featured { padding: var(--space-lg) var(--space-md); } }

/* Pinned mini-player: holds the sermon page's bottom edge while reading (chosen
   Phase 3). Positioned, never animated; the sm-page-level exception in
   patterns/layout.md "What may stick". */
.sm-minibar { position: sticky; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: var(--space-sm);
  background: var(--color-surface-card);
  border-top: var(--border-width-hairline) solid var(--color-border-strong);
  padding: var(--space-xs) var(--space-lg); font-family: var(--font-body); }
.sm-minibar .sm-player { flex: 1 1 auto; min-width: 0; }
.sm-minibar .sm-player .play { width: var(--size-control-sm); height: var(--size-control-sm); }
/* The way back (components/transcript.md, Following): shown only while the sermon
   plays with the current paragraph off screen. A real bordered button, not a link:
   it is an act, and church staff read a borderless act as broken (button.md). */
.sm-minibar .follow { flex: none; }
.sm-minibar .who { font-size: var(--font-size-caption); color: var(--color-text-subtle);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
@media (max-width: 640px) { .sm-minibar { padding: var(--space-xs) var(--space-md); }
  .sm-minibar .who { display: none; }
  /* A 360px bar cannot hold the scrub, the time and Follow along at once. While
     the way back is offered it takes the time readout's place: the reader is
     elsewhere on the page, and the time returns the moment they follow. The
     scrub, the primary control, keeps its width. */
  .sm-minibar:has(.follow:not([hidden])) .time { display: none; } }

/* ---------- dashboard patterns (patterns/dashboard.md) ---------- */
/* Waiting-on-you row (D1, chosen Phase 3): title, one plain-language sentence, a
   status chip, ONE quiet act; never a button cluster (a pipeline flag surfaces
   here only when the tenant must decide). */
.sm-qrow { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap;
  background: var(--color-surface-card);
  border: var(--border-width-hairline) solid var(--color-border-subtle);
  border-radius: var(--radius-surface); padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body); }
.sm-qrow .grow { flex: 1; min-width: 240px; }
.sm-qrow .t { font-family: var(--font-display); font-size: var(--font-size-title);
  font-weight: var(--font-weight-medium); color: var(--color-text-primary); }
.sm-qrow .m { font-size: var(--font-size-small); color: var(--color-text-secondary); }

/* File drop-well: button-first (the volunteer clicks; dragging is a bonus). A label
   wrapping a hidden file input: the whole well is the target. Drag-over swaps to
   the selection colors; geometry never moves. */
.sm-dropwell { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm);
  padding: var(--space-xl) var(--space-lg); cursor: pointer; text-align: center;
  background: var(--color-surface-card); color: var(--color-text-secondary);
  border: var(--border-width-hairline) solid var(--color-border-control);
  border-radius: var(--radius-surface); font-family: var(--font-body);
  font-size: var(--font-size-body);
  transition: background var(--duration-fast), border-color var(--duration-fast); }
.sm-dropwell:hover { background: var(--color-action-hover-wash); border-color: var(--color-border-strong); }
.sm-dropwell.is-dragover { background: var(--color-state-selected-bg);
  border-color: var(--color-state-selected-border); }
.sm-dropwell .ico { color: var(--color-text-subtle); }
.sm-dropwell .kbtn { pointer-events: none; } /* the label opens the picker; the styled "button" is a span */
.sm-dropwell input[type="file"] { position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sm-dropwell:has(input:focus-visible) { outline: var(--border-width-focus) solid var(--color-border-focus);
  outline-offset: var(--size-focus-offset); }
.sm-dropwell .hint { font-size: var(--font-size-small); color: var(--color-text-subtle); }
.sm-dropwell .picked { font-size: var(--font-size-small); color: var(--color-text-primary);
  font-weight: var(--font-weight-medium); min-height: 1.4em; }

/* ---------- demo scaffolding (styleguide only) ---------- */
.sm-demo { font-family: var(--font-body); font-size: var(--font-size-body); background: var(--color-surface-page);
  padding: var(--space-md); border-radius: var(--radius-surface);
  border: var(--border-width-hairline) solid var(--color-border-subtle); }
.sm-demo--card { background: var(--color-surface-card); }
.sm-demo--sunken { background: var(--color-surface-sunken); }
.sm-demo .row { display: flex; gap: var(--space-sm); align-items: flex-start; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  [class*="sm-"], [class*="sm-"] * { transition: none !important; }
  .sm-btn:active { transform: none; }
}

