/* ==========================================================================
   SLOP INDEX — HOST DESIGN SYSTEM
   Swiss Archival Specimen Index
   Deliberately avoids both 2024 dark-violet slop AND 2026 Astra 6.2 slop
   (no Georgia, no cream paper, no film grain, no chartreuse, no italic accent).
   ========================================================================== */
:root {
  color-scheme: light;
  --bg-page: #ffffff;
  --bg-subtle: #f5f5f3;
  --bg-stage: #f0f0ed;
  --bg-toolbar: rgba(255, 255, 255, 0.96);
  --ink-primary: #111110;
  --ink-secondary: #4a4a46;
  --ink-muted: #767670;
  --rule-light: #e4e4df;
  --rule-strong: #111110;
  --accent: #d63318;
  --accent-soft: #fdf0ed;
  --accent-ink: #a8240e;

  --font-sans: "Helvetica Neue", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, monospace;

  --max-w: 1360px;
  --gutter: clamp(16px, 3vw, 40px);
  --radius-xs: 2px;
  --transition: 160ms cubic-bezier(0.2, 0, 0, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-page: #111110;
  --bg-subtle: #191917;
  --bg-stage: #1d1d1b;
  --bg-toolbar: rgba(17, 17, 16, 0.94);
  --ink-primary: #f2f2ee;
  --ink-secondary: #b8b8b0;
  --ink-muted: #8a8a82;
  --rule-light: #2b2b28;
  --rule-strong: #e8e8e2;
  --accent: #e5482b;
  --accent-soft: #2a1814;
  --accent-ink: #ff8066;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   MASTHEAD
   ========================================================================== */
.masthead {
  border-bottom: 2px solid var(--rule-strong);
  background: var(--bg-page);
}

.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-light);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  gap: 16px;
  flex-wrap: wrap;
}

.masthead-top-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.live-count {
  color: var(--ink-primary);
  font-weight: 600;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-secondary);
}

.sync-dot {
  width: 6px;
  height: 6px;
  background: var(--ink-muted);
  display: inline-block;
}

.sync-dot.is-live {
  background: #1a8a42;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--rule-light);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
  border-color: var(--rule-strong);
  background: var(--ink-primary);
  color: var(--bg-page);
}

.masthead-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 32px;
  padding: clamp(28px, 4.5vw, 56px) 0 clamp(24px, 3.5vw, 44px);
  align-items: end;
}

.site-title {
  margin: 0;
  font-size: clamp(2.4rem, 5.4vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.94;
  color: var(--ink-primary);
}

.site-title-sub {
  display: block;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.masthead-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 1px solid var(--rule-light);
  padding-left: 28px;
}

.masthead-intro p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.masthead-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--rule-strong);
  background: var(--bg-page);
  color: var(--ink-primary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.btn:hover {
  background: var(--ink-primary);
  color: var(--bg-page);
}

.btn-accent {
  background: var(--ink-primary);
  color: var(--bg-page);
}

.btn-accent:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-subtle {
  border-color: var(--rule-light);
  color: var(--ink-secondary);
}

.btn-subtle:hover {
  border-color: var(--rule-strong);
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

/* ==========================================================================
   PARADIGM FIELD NOTE (ASTRA 6.2 BRIEFING)
   ========================================================================== */
.paradigm-brief {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--rule-light);
}

.paradigm-brief-inner {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 24px;
  padding: 20px 0;
  align-items: start;
}

.paradigm-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.paradigm-label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.paradigm-copy {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  max-width: 74ch;
}

.paradigm-copy strong {
  color: var(--ink-primary);
  font-weight: 600;
}

.paradigm-metrics {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  border-left: 1px solid var(--rule-light);
  padding-left: 24px;
}

.paradigm-metric-val {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.2;
}

/* ==========================================================================
   STICKY FILTER, SORT & TAXONOMY BAR
   ========================================================================== */
.toolbar-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-toolbar);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-strong);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.filter-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-right: 4px;
}

.chip {
  appearance: none;
  border: 1px solid var(--rule-light);
  background: var(--bg-page);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 9px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--ink-primary);
  color: var(--ink-primary);
}

.chip.is-active {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: var(--bg-page);
}

.chip.is-active[data-model="Astra 6.2"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sort-select {
  appearance: none;
  padding: 6px 26px 6px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  border: 1px solid var(--rule-light);
  border-radius: var(--radius-xs);
  background: var(--bg-subtle) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234a4a46' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: var(--ink-primary);
  cursor: pointer;
  outline: none;
}

:root[data-theme="dark"] .sort-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23b8b8b0' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}

.sort-select:focus {
  border-color: var(--ink-primary);
  background-color: var(--bg-page);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 195px;
  padding: 6px 10px 6px 26px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  border: 1px solid var(--rule-light);
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  outline: none;
  transition: border-color var(--transition), background var(--transition), width var(--transition);
}

.search-input:focus {
  border-color: var(--ink-primary);
  background: var(--bg-page);
  width: 235px;
}

.search-icon {
  position: absolute;
  left: 9px;
  color: var(--ink-muted);
  pointer-events: none;
  font-size: 12px;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--rule-light);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.view-btn {
  appearance: none;
  border: 0;
  background: var(--bg-page);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all var(--transition);
}

.view-btn + .view-btn {
  border-left: 1px solid var(--rule-light);
}

.view-btn.is-active {
  background: var(--ink-primary);
  color: var(--bg-page);
}

/* ==========================================================================
   CATALOG STATUS BAR
   ========================================================================== */
.catalog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-light);
  gap: 12px;
  flex-wrap: wrap;
}

.catalog-meta strong {
  color: var(--ink-primary);
}

/* ==========================================================================
   SPECIMEN SPREADS
   ========================================================================== */
.specimen-list {
  display: flex;
  flex-direction: column;
}

.specimen-row {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr);
  gap: clamp(24px, 3.5vw, 52px);
  padding: clamp(32px, 4vw, 52px) 0;
  border-bottom: 1px solid var(--rule-light);
  align-items: start;
}

.specimen-row:last-child {
  border-bottom: 2px solid var(--rule-strong);
}

.specimen-doc {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.specimen-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-light);
}

.specimen-id-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.specimen-id {
  font-weight: 700;
  color: var(--ink-primary);
  letter-spacing: 0.04em;
}

.specimen-id.is-astra {
  color: var(--accent);
}

.rank-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--rule-light);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
}

.rank-tag.is-top {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.specimen-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink-primary);
}

.specimen-summary {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-primary);
  font-weight: 500;
  line-height: 1.45;
}

.specimen-anatomy {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.model-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--rule-light);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  border-radius: var(--radius-xs);
}

.model-tag.primary-astra {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.tell-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-light);
}

.tell-item {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.45;
}

.tell-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding-top: 2px;
}

.tell-val {
  color: var(--ink-secondary);
}

.tell-val code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-subtle);
  padding: 1px 5px;
  border: 1px solid var(--rule-light);
  border-radius: 2px;
  color: var(--ink-primary);
}

/* ==========================================================================
   LIVE SPECIMEN STAGE & DUAL RATING BAR
   ========================================================================== */
.specimen-stage-wrap {
  border: 1px solid var(--rule-strong);
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stage-chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--rule-light);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  gap: 12px;
}

.stage-chrome-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-indicator {
  width: 6px;
  height: 6px;
  background: var(--ink-primary);
  display: inline-block;
}

.stage-indicator.astra {
  background: var(--accent);
}

.stage-tabs {
  display: inline-flex;
  gap: 4px;
}

.stage-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 2px 7px;
  cursor: pointer;
  border-radius: 2px;
}

.stage-tab:hover {
  color: var(--ink-primary);
}

.stage-tab.is-active {
  background: var(--bg-page);
  border-color: var(--rule-light);
  color: var(--ink-primary);
  font-weight: 600;
}

.stage-viewport {
  position: relative;
  min-height: 280px;
  background: var(--bg-stage);
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}

.stage-code {
  display: none;
  margin: 0;
  padding: 18px;
  background: #141413;
  color: #e8e8e3;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  overflow-x: auto;
  min-height: 280px;
  white-space: pre;
}

.stage-code.is-visible {
  display: block;
}

.stage-viewport.is-hidden {
  display: none;
}

/* Dual Rating Bar (Seen in the Wild + 1–5 Slop Intensity Slider) */
.rating-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--bg-page);
  border-top: 1px solid var(--rule-strong);
  flex-wrap: wrap;
}

.sighting-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid var(--rule-light);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.sighting-btn:hover {
  border-color: var(--rule-strong);
  background: var(--bg-page);
}

.sighting-btn.is-voted {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: var(--bg-page);
}

.sighting-arrow {
  font-size: 10px;
  line-height: 1;
}

.sighting-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.intensity-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
  justify-content: flex-end;
}

.intensity-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  white-space: nowrap;
}

.intensity-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slop-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 112px;
  height: 4px;
  background: var(--rule-light);
  outline: none;
  cursor: pointer;
}

.slop-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  background: var(--ink-primary);
  border: 2px solid var(--bg-page);
  box-shadow: 0 0 0 1px var(--ink-primary);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.slop-slider.has-rated::-webkit-slider-thumb {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.slop-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  background: var(--ink-primary);
  border: 2px solid var(--bg-page);
  border-radius: 0;
  box-shadow: 0 0 0 1px var(--ink-primary);
  cursor: pointer;
}

.slop-slider.has-rated::-moz-range-thumb {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.score-readout {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-left: 8px;
  border-left: 1px solid var(--rule-light);
}

.score-avg {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-primary);
}

.score-avg.is-high {
  color: var(--accent);
}

.score-meta {
  font-size: 10.5px;
  color: var(--ink-muted);
}

/* ==========================================================================
   COMPACT INDEX TABLE VIEW (LEADERBOARD)
   ========================================================================== */
.index-table-wrap {
  display: none;
  width: 100%;
  overflow-x: auto;
  border-bottom: 2px solid var(--rule-strong);
}

.index-table-wrap.is-visible {
  display: block;
}

.specimen-list.is-hidden {
  display: none;
}

.index-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.index-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--bg-subtle);
  white-space: nowrap;
}

.index-table td {
  padding: 14px;
  border-bottom: 1px solid var(--rule-light);
  vertical-align: top;
}

.index-table tr:hover td {
  background: var(--bg-subtle);
}

.index-jump {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty-state {
  display: none;
  padding: 64px 20px;
  text-align: center;
  border-bottom: 1px solid var(--rule-light);
}

.empty-state.is-visible {
  display: block;
}

.empty-state p {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0 0 16px;
}

/* ==========================================================================
   CURATOR MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 16, 0.55);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

:root[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-page);
  border: 2px solid var(--rule-strong);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.modal-close {
  appearance: none;
  border: 1px solid var(--rule-light);
  background: transparent;
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 9px;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--ink-primary);
  color: var(--bg-page);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: 13.5px;
  padding: 8px 10px;
  border: 1px solid var(--rule-light);
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.form-field textarea {
  min-height: 72px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--ink-primary);
  background: var(--bg-page);
}

.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--rule-light);
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer {
  padding: 28px 0 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* ==========================================================================
   ISOLATED SPECIMEN DEMOS
   ========================================================================== */
.demo-grain {
  position: relative;
  width: 100%;
  padding: 28px;
  background: #f5f2ea;
  color: #1f241c;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  font-family: Georgia, "Times New Roman", serif;
}

.demo-grain-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-size: 180px 180px;
}

.demo-grain-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 36, 28, 0.14);
  font-family: var(--font-mono);
  font-size: 11px;
}

.demo-grain-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border: 1px solid #1f241c;
  background: #1f241c;
  color: #f5f2ea;
  cursor: pointer;
}

.demo-grain-toast {
  font-size: 11px;
  color: #8c2f1b;
  font-family: var(--font-mono);
  min-height: 16px;
}

.demo-editorial {
  width: 100%;
  padding: 32px 28px;
  background: #f7f4ec;
  color: #1c1d19;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.demo-editorial-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: Georgia, serif;
  font-size: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(28, 29, 25, 0.12);
}

.demo-editorial-h {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.demo-editorial-h em {
  font-style: italic;
  color: #5f7a2c;
  transition: color 180ms ease;
}

.demo-editorial-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #5a5b52;
}

.demo-editorial-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #1c1d19;
  background: transparent;
  color: #1c1d19;
  font-family: Georgia, serif;
  font-size: 12px;
  cursor: pointer;
}

.demo-editorial-btn:hover {
  background: #1c1d19;
  color: #f7f4ec;
}

.demo-chartreuse {
  width: 100%;
  padding: 24px;
  background: #171c16;
  color: #edf1e6;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.demo-ch-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.demo-ch-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: #c8e636;
  color: #161b12;
  border: none;
  cursor: pointer;
}

.demo-ch-pill.outline {
  background: rgba(200, 230, 54, 0.12);
  color: #c8e636;
  border: 1px solid rgba(200, 230, 54, 0.35);
}

.demo-ch-card {
  background: #20271e;
  border: 1px solid rgba(200, 230, 54, 0.28);
  border-radius: 10px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.demo-ch-meter {
  height: 8px;
  background: #2d362a;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.demo-ch-fill {
  height: 100%;
  width: 78%;
  background: linear-gradient(90deg, #9ec424, #d8f24e);
  transition: width 260ms ease;
}

.demo-bento-editorial {
  width: 100%;
  padding: 22px;
  background: #f6f4ee;
  color: #1d1e1b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.demo-be-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #d4d0c5;
  border-left: 1px solid #d4d0c5;
}

.demo-be-cell {
  padding: 14px;
  border-right: 1px solid #d4d0c5;
  border-bottom: 1px solid #d4d0c5;
  background: #faf8f3;
  cursor: pointer;
  transition: background 150ms ease;
}

.demo-be-cell:hover {
  background: #f0ede2;
}

.demo-be-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #6b7d34;
  margin-bottom: 10px;
  display: block;
}

.demo-be-cell h4 {
  margin: 0 0 6px;
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 400;
}

.demo-be-cell p {
  margin: 0;
  font-size: 11.5px;
  color: #636259;
  line-height: 1.4;
}

.demo-purple {
  position: relative;
  width: 100%;
  padding: 30px 24px;
  background: #090913;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  overflow: hidden;
}

.demo-purple-orb {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45), rgba(59, 130, 246, 0.15) 55%, transparent 72%);
  top: -60px;
  filter: blur(18px);
  pointer-events: none;
}

.demo-purple-h {
  position: relative;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.demo-purple-grad {
  background: linear-gradient(90deg, #a855f7, #ec4899, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.demo-purple-cta {
  position: relative;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.65);
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.55);
  cursor: pointer;
}

.demo-pill-stage {
  width: 100%;
  padding: 32px 24px;
  background: #0f172a;
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.demo-biscuit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.demo-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: slop-pulse 1.6s infinite;
}

@keyframes slop-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.demo-cards {
  width: 100%;
  padding: 22px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-content: center;
}

.demo-feature-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.demo-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.demo-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 16px;
  margin-bottom: 12px;
}

.demo-feature-card h4 {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: #0f172a;
}

.demo-feature-card p {
  margin: 0;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
}

.demo-metrics {
  width: 100%;
  padding: 26px 22px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.demo-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  text-align: center;
}

.demo-metric-box {
  padding: 14px 8px;
  border-radius: 10px;
  background: #f1f5f9;
}

.demo-metric-num {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #4f46e5;
  letter-spacing: -0.03em;
}

.demo-metric-lbl {
  font-size: 11px;
  color: #64748b;
}

.demo-nested {
  width: 100%;
  padding: 22px;
  background: linear-gradient(135deg, #1e1b4b, #312e81 55%, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-doll-1 {
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.demo-doll-2 {
  padding: 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.demo-doll-3 {
  padding: 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(165, 180, 252, 0.25);
  color: #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.demo-gemini {
  width: 100%;
  padding: 22px;
  background: #f8fafd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-gm-card {
  width: 100%;
  padding: 20px;
  background: #edf2fa;
  border-radius: 28px;
  color: #1f1f1f;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-radius 200ms ease;
}

.demo-gm-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.demo-gm-spark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #9b72cb, #d96570);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.demo-gm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.demo-gm-chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: #d3e3fd;
  color: #041e49;
  font-size: 11.5px;
  font-weight: 500;
}

.demo-gm-btn {
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  background: #0b57d0;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.demo-terracotta {
  width: 100%;
  padding: 26px;
  background: #faf9f5;
  color: #3d3929;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.demo-tc-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #9a8f7a;
}

.demo-tc-title {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.25;
  color: #2b281d;
}

.demo-tc-body {
  margin: 0;
  font-size: 12.5px;
  color: #6b6454;
}

.demo-tc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.demo-tc-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: #d97757;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.demo-tc-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #b45d40;
}

.demo-shadcn {
  width: 100%;
  padding: 18px;
  background: #ffffff;
  color: #09090b;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: stretch;
}

.demo-sh-side {
  border-right: 1px solid #e4e4e7;
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-sh-brand {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px 10px;
}

.demo-sh-nav {
  font-size: 11.5px;
  color: #71717a;
  padding: 6px 8px;
  border-radius: 6px;
}

.demo-sh-nav.active {
  background: #f4f4f5;
  color: #09090b;
  font-weight: 600;
}

.demo-sh-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.demo-sh-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.demo-sh-card {
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-sh-lbl {
  font-size: 11px;
  color: #71717a;
}

.demo-sh-val {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.demo-sh-delta {
  font-size: 10.5px;
  color: #71717a;
}

.demo-sh-btn {
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #18181b;
  background: #18181b;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.demo-hud {
  width: 100%;
  padding: 20px;
  background: #030712;
  color: #67e8f9;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
}

.demo-hud-frame {
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.05);
  box-shadow: inset 0 0 18px rgba(6, 182, 212, 0.12);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-hud-top,
.demo-hud-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
}

.demo-hud-live {
  color: #34d399;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}

.demo-hud-body {
  font-size: 12px;
  color: #e0f2fe;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px dashed rgba(6, 182, 212, 0.35);
  border-bottom: 1px dashed rgba(6, 182, 212, 0.35);
}

.demo-hud-btn {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid #22d3ee;
  color: #22d3ee;
  font-family: var(--font-mono);
  font-size: 10.5px;
  cursor: pointer;
}

.demo-bento-soup {
  width: 100%;
  padding: 20px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.demo-bs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.demo-bs-tile {
  padding: 16px;
  border-radius: 16px;
  font-size: 13.5px;
  color: #1e293b;
  border: 1px solid rgba(99, 102, 241, 0.18);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-bs-tile.wide {
  grid-column: span 2;
  background: linear-gradient(135deg, #e0f2fe, #f3e8ff);
}

.demo-bs-tile.pink {
  background: linear-gradient(135deg, #fce7f3, #ffedd5);
}

.demo-bs-tile.mint {
  background: linear-gradient(135deg, #dcfce7, #e0f2fe);
}

.demo-bs-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #6366f1;
}

.demo-bs-btn {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.demo-testimonial {
  width: 100%;
  padding: 22px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-tm-card {
  width: 100%;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-tm-stars {
  color: #f59e0b;
  font-size: 15px;
  letter-spacing: 2px;
}

.demo-tm-quote {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.45;
  font-weight: 500;
}

.demo-tm-author {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 12.5px;
  color: #0f172a;
}

.demo-tm-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.demo-tm-role {
  font-size: 11px;
  color: #64748b;
}

.demo-tm-btn {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   EDITORIAL CHRONICLE (PAST PARADIGMS PAGE)
   ========================================================================== */
.masthead-nav-link {
  color: var(--ink-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}

.masthead-nav-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.paradigm-more-link {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.era-timeline {
  display: flex;
  flex-direction: column;
}

.era-entry {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(36px, 4.5vw, 56px) 0;
  border-bottom: 1px solid var(--rule-light);
  align-items: start;
}

.era-entry:last-child {
  border-bottom: 2px solid var(--rule-strong);
}

.era-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 24px;
}

.era-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-primary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-strong);
}

.era-num.is-current {
  color: var(--accent);
  border-color: var(--accent);
}

.era-years {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.era-models {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.era-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 78ch;
}

.era-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink-primary);
}

.era-lead {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1.5;
}

.era-prose {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.68;
}

.era-prose code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--rule-light);
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--ink-primary);
}

.era-plate {
  border: 1px solid var(--rule-strong);
  background: var(--bg-page);
  margin-top: 4px;
}

.era-plate-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--rule-light);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.era-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.era-swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-secondary);
  border-right: 1px solid var(--rule-light);
}

.era-swatch:last-child {
  border-right: none;
}

.era-swatch code {
  color: var(--ink-primary);
  font-weight: 600;
}

.era-chip {
  width: 16px;
  height: 16px;
  border: 1px solid var(--rule-light);
  flex-shrink: 0;
  display: inline-block;
}

.era-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.era-links-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.era-spec-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-primary);
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid var(--rule-light);
  background: var(--bg-subtle);
  border-radius: var(--radius-xs);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.era-spec-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pendulum-section {
  padding: clamp(36px, 5vw, 60px) 0;
  border-bottom: 2px solid var(--rule-strong);
}

.pendulum-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.pendulum-header h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  letter-spacing: -0.025em;
  color: var(--ink-primary);
}

.pendulum-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule-light);
}

.pendulum-card {
  padding: 22px;
  border-right: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pendulum-num {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}

.pendulum-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.pendulum-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .masthead-main { grid-template-columns: 1fr; gap: 20px; }
  .masthead-intro { border-left: none; border-top: 1px solid var(--rule-light); padding-left: 0; padding-top: 18px; }
  .paradigm-brief-inner { grid-template-columns: 1fr; gap: 14px; }
  .paradigm-metrics { border-left: none; padding-left: 0; border-top: 1px solid var(--rule-light); padding-top: 12px; }
  .specimen-row, .era-entry { grid-template-columns: 1fr; }
  .era-rail { position: static; }
  .pendulum-grid { grid-template-columns: 1fr; }
  .era-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .era-swatch { border-bottom: 1px solid var(--rule-light); }
}

@media (max-width: 640px) {
  .demo-cards, .demo-be-grid, .demo-shadcn, .demo-sh-kpis { grid-template-columns: 1fr; }
  .demo-sh-side { border-right: none; border-bottom: 1px solid #e4e4e7; padding-right: 0; padding-bottom: 8px; }
  .demo-metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .era-swatches { grid-template-columns: 1fr; }
  .era-swatch { border-right: none; }
  .form-grid { grid-template-columns: 1fr; }
  .search-input, .search-input:focus { width: 100%; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .intensity-control { justify-content: space-between; }
}
