/* 
 * Google Stitch MCP Design Theme: Calcutta Archival Folio
 * Track B: High-Legibility Archival Execution for Abhijeet Chakraborty (DIN: 03604488)
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400;1,8..60,500&display=swap');

:root {
  color-scheme: light;

  /* Archival Warm Paper Surfaces */
  --bg-surface: #FFF8EF;
  --bg-surface-low: #FAF3E7;
  --bg-surface-container: #F4EDE1;
  --bg-surface-high: #EEE7DC;
  --bg-surface-highest: #E8E2D6;
  
  /* High-Contrast Archival Inks (WCAG AA/AAA Verified) */
  --ink-primary: #14110E;
  --ink-secondary: #2C3E58;
  --ink-tertiary: #943D24; /* Deep Terracotta Red Ochre */
  --ink-indigo: #1D2D47;   /* Deep Mineral Indigo */
  --ink-muted: #4A4238;    /* Warm Sepia-Charcoal (7.4:1 Contrast) */

  /* Rules & Hairlines */
  --rule-sepia: #C8B8A2;
  --rule-outline: #6B625A;
  --rule-variant: #C4B9AE;

  /* Custom Scrollbar Tokens */
  --scrollbar-thumb: #8C5843;
  --scrollbar-track: #EFE7DA;

  /* High-Legibility Archival Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-w: 1280px;
}

@media (prefers-contrast: more) {
  :root {
    --scrollbar-thumb: #000000;
    --scrollbar-track: #FFFFFF;
    --ink-primary: #000000;
    --ink-muted: #1F1B17;
    --rule-variant: #7A7067;
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  font-family: var(--font-body);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Legacy fallback for WebKit/Blink browsers */
@supports not (scrollbar-color: auto) {
  html::-webkit-scrollbar,
  .cmdk-results::-webkit-scrollbar,
  .statutory-table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  html::-webkit-scrollbar-thumb,
  .cmdk-results::-webkit-scrollbar-thumb,
  .statutory-table-wrap::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
  }
  html::-webkit-scrollbar-track,
  .cmdk-results::-webkit-scrollbar-track,
  .statutory-table-wrap::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

body {
  font-size: 1.0625rem;
  line-height: 1.72;
  background: var(--bg-surface);
  color: var(--ink-primary);
  text-align: start;
}

h1, h2, h3, h4 {
  text-wrap: balance;
}

p, blockquote, li {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

::selection {
  background-color: var(--ink-tertiary);
  color: var(--bg-surface);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* Archival Gazette Runner */
.gazette-runner {
  width: 100%;
  background: var(--bg-surface-high);
  border-bottom: 1px solid var(--rule-variant);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.45rem 1.5rem;
}

.gazette-runner-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gazette-runner-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gazette-pip {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--ink-tertiary);
  flex-shrink: 0;
}

.gazette-runner-right {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.gazette-state-tag {
  color: var(--ink-tertiary);
  font-weight: 700;
}

/* Stitch Top Nav */
.stitch-header {
  background: rgba(255, 248, 239, 0.94);
  border-bottom: 1px solid var(--rule-outline);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(10px);
}

.stitch-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stitch-brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-primary);
}

.stitch-nav-links {
  display: flex;
  align-items: center;
  gap: 1.65rem;
}

.stitch-nav-link {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-transform: uppercase;
  transition: color 0.15s ease;
  padding-bottom: 2px;
}

.stitch-nav-link:hover, .stitch-nav-link.active {
  color: var(--ink-primary);
  border-bottom: 2px solid var(--ink-tertiary);
}

.stitch-cmdk-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-primary);
  border: 1px solid var(--rule-outline);
  padding: 0.35rem 0.65rem;
  background: var(--bg-surface-container);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.stitch-cmdk-btn:hover {
  background: var(--bg-surface-high);
  border-color: var(--ink-primary);
}

.stitch-kbd {
  background: var(--bg-surface-highest);
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
}

/* Floating A/B Switcher Pill (Bottom-Right Non-Colliding) */
.ab-switcher-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1050;
  background: var(--bg-surface-container);
  border: 1.5px solid var(--ink-indigo);
  border-radius: 9999px;
  padding: 0.4rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: 0 8px 24px rgba(20, 17, 14, 0.22);
}

.ab-gateway-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-tertiary);
  letter-spacing: 0.03em;
}

.ab-gateway-link:hover {
  color: var(--ink-primary);
  text-decoration: underline;
}

.ab-divider {
  color: var(--rule-outline);
  font-size: 0.75rem;
}

.ab-options {
  display: flex;
  gap: 0.3rem;
}

.ab-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  color: var(--ink-muted);
  transition: all 0.2s ease;
}

.ab-btn.active {
  background: var(--ink-indigo);
  color: #FFFFFF;
  font-weight: 700;
}

.ab-btn:not(.active):hover {
  color: var(--ink-primary);
}

/* Archival Reference Strip */
.folio-ref-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
}

.folio-ref-strip {
  border-top: 1px solid var(--rule-outline);
  border-bottom: 1px solid var(--rule-outline);
  padding: 0.65rem 1rem;
  background: var(--bg-surface-low);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

.folio-ref-left {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.stamp-badge {
  background: var(--ink-tertiary);
  color: var(--bg-surface);
  font-family: var(--font-mono);
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Stitch Hero Section */
.stitch-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: start;
}

.folio-volume-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--rule-outline);
  padding: 0.4rem 0.85rem;
  background: var(--bg-surface-container);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 1.35rem;
}

.pip-terracotta {
  width: 8px;
  height: 8px;
  background: var(--ink-tertiary);
}

.stitch-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.85rem, 1.6rem + 4.2vw, 4.5rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
  margin-bottom: 1.25rem;
}

.stitch-hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-muted);
  line-height: 1.55;
  border-left: 3px solid var(--ink-tertiary);
  padding-left: 1.15rem;
  margin-bottom: 1.75rem;
  max-width: 66ch;
}

.stitch-hero-prose {
  font-size: 1.125rem;
  line-height: 1.78;
  color: var(--ink-primary);
  text-align: start;
  max-width: 70ch;
  margin-bottom: 2.25rem;
}

.stitch-hero-prose p + p {
  margin-top: 1.15rem;
}

/* Metric Census Badges */
.census-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-outline);
}

.census-card {
  background: var(--bg-surface-container);
  padding: 0.9rem;
  border: 1px solid var(--rule-variant);
}

.census-lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.census-val {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.15;
  margin: 0.25rem 0;
}

.census-val-indigo {
  color: var(--ink-indigo);
}

.census-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Founder Portrait & Plate */
.plate-frame-outer {
  border: 2px solid var(--rule-outline);
  padding: 0.5rem;
  background: var(--bg-surface-low);
  box-shadow: 0 6px 18px rgba(20, 17, 14, 0.06);
}

.plate-frame-inner {
  border: 1px solid var(--rule-variant);
  padding: 1.35rem;
  background: var(--bg-surface);
}

.plate-meta-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-variant);
  padding-bottom: 0.55rem;
  margin-bottom: 1rem;
}

.plate-portrait-box {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--bg-surface-high);
  border: 1px solid var(--rule-variant);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.plate-portrait-monogram {
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.plate-stamp-overlay {
  position: absolute;
  bottom: 14px;
  right: 14px;
  border: 2px solid var(--ink-indigo);
  padding: 0.4rem 0.8rem;
  background: rgba(255, 248, 239, 0.96);
  color: var(--ink-indigo);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  transform: rotate(-2deg);
  text-align: center;
  line-height: 1.3;
}

.plate-caption-block {
  margin-top: 1.25rem;
}

.plate-founder-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 0.3rem;
}

.plate-founder-role {
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.55;
}

.plate-ledger-rows {
  border-top: 1px solid var(--rule-variant);
  padding-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.75;
}

.plate-ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.plate-ledger-val {
  color: var(--ink-primary);
  font-weight: 600;
  text-align: right;
}

.plate-ledger-highlight {
  color: var(--ink-tertiary);
  font-weight: 700;
}

.gazette-pullquote-box {
  margin-top: 1.5rem;
  background: var(--bg-surface-container);
  border: 1px solid var(--rule-variant);
  border-left: 4px solid var(--ink-primary);
  padding: 1.35rem;
  font-style: italic;
  color: var(--ink-primary);
  font-size: 1rem;
  line-height: 1.65;
}

.quote-attribution {
  text-align: right;
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  color: var(--ink-muted);
}

/* 10-Brand Master Dossier Section */
.dossier-section {
  background: var(--bg-surface-low);
  border-top: 2px solid var(--rule-outline);
  border-bottom: 2px solid var(--rule-outline);
  padding: 5rem 1.5rem;
}

.dossier-inner,
.stitch-section-container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.stitch-section-padded {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.dossier-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--rule-outline);
  padding-bottom: 1.25rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.stitch-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 0.35rem;
}

.dossier-section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 1.4rem + 2vw, 2.65rem);
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.15;
}

.dossier-section-sub {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  margin-top: 0.35rem;
}

.dossier-status-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-primary);
  border: 1px solid var(--rule-outline);
  padding: 0.5rem 0.85rem;
  background: var(--bg-surface);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule-outline);
  padding: 1.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  border-color: var(--ink-primary);
  box-shadow: 0 6px 20px rgba(20, 17, 14, 0.08);
}

.bento-card.flagship {
  background: var(--bg-surface-container);
  border: 2px solid var(--ink-primary);
}

.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }
.bento-col-8 { grid-column: span 8; }
.bento-col-12 { grid-column: span 12; }

.bento-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--rule-variant);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.bento-seq {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-tertiary);
}

.bento-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-primary);
  background: var(--bg-surface-high);
  border: 1px solid var(--rule-variant);
  padding: 0.2rem 0.5rem;
}

.bento-card-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-primary);
  margin-bottom: 0.4rem;
}

.bento-sector-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-indigo);
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.bento-card-desc {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.68;
  margin-bottom: 1.35rem;
}

.bento-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 1.15rem;
}

.bento-pill {
  background: var(--bg-surface-container);
  border: 1px solid var(--rule-variant);
  color: var(--ink-primary);
  padding: 0.25rem 0.55rem;
}

.bento-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--rule-variant);
  padding-top: 0.85rem;
}

.bento-status-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.bento-dossier-cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.bento-dossier-cta:hover {
  color: var(--ink-tertiary);
  text-decoration: underline;
}

/* Axioms / Operating System Grid */
.axioms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.axiom-card {
  background: var(--bg-surface-container);
  border: 1px solid var(--rule-outline);
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.axiom-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-tertiary);
  margin-bottom: 0.5rem;
}

.axiom-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 0.75rem;
}

.axiom-desc {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.68;
}

.axiom-footer-metric {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule-variant);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-primary);
}

/* Statutory Verification Section & Table */
.verifications-section {
  background: var(--bg-surface-high);
  border-top: 2px solid var(--rule-outline);
  border-bottom: 2px solid var(--rule-outline);
  padding: 5rem 1.5rem;
}

.verifications-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.statutory-table-wrap {
  --scrollbar-thumb: #943D24;
  --scrollbar-track: #FAF3E7;
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--rule-outline);
  padding: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.statutory-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.statutory-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-primary);
  border-bottom: 2px solid var(--rule-outline);
  padding: 0.85rem 1rem;
  text-align: left;
}

.statutory-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--rule-variant);
  color: var(--ink-primary);
}

.statutory-table tr:hover td {
  background: var(--bg-surface-low);
}

.statutory-brand-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-surface-high);
  border: 1px solid var(--rule-outline);
  padding: 0.2rem 0.5rem;
  margin-right: 0.35rem;
  margin-bottom: 0.25rem;
}

.verifications-cta-row {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Stitch Buttons */
.btn-stitch-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--ink-primary);
  color: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.85rem 1.65rem;
  border: 1px solid var(--ink-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-stitch-primary:hover {
  background: var(--ink-indigo);
  border-color: var(--ink-indigo);
}

.btn-stitch-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.85rem 1.65rem;
  border: 1px solid var(--ink-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-stitch-secondary:hover {
  background: var(--bg-surface-container);
}

/* Stitch Subpages (Venture Dossier, Journal, Media Kit) */
.stitch-subpage-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 7rem;
}

.stitch-journal-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem 8rem;
}

.stitch-masthead {
  border-bottom: 2px solid var(--rule-outline);
  padding-bottom: 2.25rem;
  margin-bottom: 3.5rem;
}

.stitch-dossier-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stitch-back-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-indigo);
}

.stitch-back-link:hover {
  text-decoration: underline;
}

.stitch-prev-next {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
}

.stitch-prev-next a:hover {
  color: var(--ink-tertiary);
  text-decoration: underline;
}

.stitch-plate-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.stitch-era-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.stitch-page-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 1.5rem + 3.5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--ink-primary);
  margin-bottom: 0.65rem;
}

.stitch-sector-banner {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-indigo);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.stitch-page-lead {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink-muted);
  max-width: 68ch;
  line-height: 1.55;
}

.stitch-dossier-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
}

.stitch-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.stitch-content-block {
  margin-bottom: 3rem;
}

.stitch-block-h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink-primary);
  border-bottom: 1px solid var(--rule-outline);
  padding-bottom: 0.55rem;
  margin-bottom: 1.15rem;
}

.stitch-prose-primary {
  font-size: 1.125rem;
  line-height: 1.78;
  color: var(--ink-primary);
  margin-bottom: 1.15rem;
  max-width: 70ch;
}

.stitch-prose-secondary {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: 70ch;
}

.stitch-cap-list {
  list-style: none;
  padding: 0;
}

.stitch-cap-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule-variant);
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  font-size: 1.05rem;
  color: var(--ink-primary);
}

.stitch-cap-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-tertiary);
  flex-shrink: 0;
}

.stitch-audit-box {
  background: var(--bg-surface-container);
  border: 1px solid var(--rule-outline);
  padding: 1.65rem;
}

.stitch-audit-text {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-primary);
  line-height: 1.65;
}

/* Thinking Layer & Dilemma Box in Track B */
.stitch-marginalia-box {
  background: var(--bg-surface-container);
  border: 1px solid var(--rule-outline);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.stitch-marginalia-quote {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-primary);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.stitch-marginalia-item {
  margin-bottom: 1.15rem;
}

.stitch-marginalia-item:last-child {
  margin-bottom: 0;
}

.stitch-marginalia-lbl {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-tertiary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.stitch-marginalia-val {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

.stitch-dilemma-box {
  border: 2px solid var(--ink-primary);
  padding: 2rem;
  background: var(--bg-surface);
}

.stitch-dilemma-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 0.75rem;
}

.stitch-dilemma-context {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.68;
  margin-bottom: 1.5rem;
}

.stitch-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.stitch-dilemma-box .option-btn {
  text-align: left;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule-outline);
  background: var(--bg-surface-low);
  cursor: pointer;
  transition: all 0.15s ease;
}

.stitch-dilemma-box .option-btn:hover,
.stitch-dilemma-box .option-btn.selected {
  border-color: var(--ink-primary);
  background: var(--bg-surface-container);
}

.stitch-opt-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-tertiary);
  margin-right: 0.4rem;
}

.stitch-opt-desc {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin-top: 0.3rem;
  line-height: 1.55;
}

.stitch-dilemma-box .dilemma-reveal {
  display: none;
  background: var(--bg-surface-container);
  border: 1px solid var(--ink-primary);
  padding: 1.35rem;
}

.stitch-dilemma-box .dilemma-reveal.is-active {
  display: block;
}

.stitch-reveal-rationale {
  font-size: 1rem;
  color: var(--ink-primary);
  margin-top: 0.35rem;
  line-height: 1.65;
}

.stitch-reveal-outcome {
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-indigo);
  font-weight: 700;
  line-height: 1.55;
}

/* Gazette Journal Stream */
.stitch-article {
  margin-bottom: 4.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--rule-outline);
}

.stitch-article-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stitch-article-venture {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-indigo);
  margin-left: 0.5rem;
}

.stitch-article-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.stitch-article-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 1.3rem + 2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink-primary);
  margin-bottom: 1.15rem;
}

.stitch-article-lead {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--ink-tertiary);
  padding-left: 1.15rem;
  max-width: 68ch;
}

.stitch-article-body {
  font-size: 1.125rem;
  line-height: 1.82;
  color: var(--ink-primary);
  white-space: pre-line;
  margin-bottom: 1.75rem;
  text-align: start;
  max-width: 72ch;
}

.stitch-tag-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stitch-tag-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-primary);
  background: var(--bg-surface-high);
  border: 1px solid var(--rule-outline);
  padding: 0.25rem 0.6rem;
}

/* Media Kit & Inquiry Desk */
.stitch-col-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 1.5rem;
}

.stitch-bio-card {
  background: var(--bg-surface-container);
  border: 1px solid var(--rule-outline);
  padding: 1.65rem;
  margin-bottom: 1.5rem;
}

.stitch-bio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-tertiary);
  margin-bottom: 0.65rem;
}

.stitch-copy-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-indigo);
  background: var(--bg-surface);
  border: 1px solid var(--ink-indigo);
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}

.stitch-copy-btn:hover {
  background: var(--ink-indigo);
  color: var(--bg-surface);
}

.stitch-bio-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-primary);
}

.stitch-bio-long {
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--ink-primary);
  white-space: pre-line;
}

.stitch-factsheet-card {
  border: 2px solid var(--rule-outline);
  background: var(--bg-surface);
  padding: 1.65rem;
  margin-bottom: 2.5rem;
}

.stitch-fact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--rule-variant);
  padding: 0.6rem 0;
  font-size: 0.95rem;
}

.stitch-fact-row:last-child {
  border-bottom: none;
}

.stitch-fact-val-right {
  text-align: right;
  font-weight: 500;
}

.stitch-inquiry-card {
  background: var(--bg-surface-container);
  border: 2px solid var(--ink-primary);
  padding: 2rem;
}

.stitch-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.stitch-form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-primary);
  margin-bottom: 0.35rem;
}

.stitch-form-control {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rule-outline);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stitch-form-control:focus-visible {
  outline: none;
  border-color: var(--ink-indigo);
  box-shadow: 0 0 0 2px rgba(29, 45, 71, 0.2);
}

/* Command Palette Modal (Track B) */
.cmdk-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 14, 0.72);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

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

.stitch-cmdk-modal {
  width: 100%;
  max-width: 640px;
  background: var(--bg-surface);
  border: 2px solid var(--ink-primary);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.stitch-cmdk-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule-outline);
}

.stitch-cmdk-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-tertiary);
}

.cmdk-input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--ink-primary);
}

.cmdk-results {
  --scrollbar-thumb: #943D24;
  --scrollbar-track: #FAF3E7;
  max-height: 360px;
  overflow-y: auto;
  padding: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.cmdk-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--rule-variant);
  font-size: 1rem;
  color: var(--ink-primary);
  transition: background 0.15s ease;
}

.cmdk-item:hover {
  background: var(--bg-surface-container);
}

.cmdk-item-title {
  font-family: var(--font-serif);
  font-weight: 700;
}

.cmdk-item-sub {
  color: var(--ink-muted);
}

.cmdk-item-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-tertiary);
  flex-shrink: 0;
}

.cmdk-item-badge-indigo {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-indigo);
  flex-shrink: 0;
}

/* Stitch Footer */
.stitch-footer {
  border-top: 2px solid var(--rule-outline);
  background: var(--bg-surface-low);
  padding: 3rem 1.5rem;
}

.stitch-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.stitch-footer-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.stitch-footer-sub {
  margin-top: 0.25rem;
}

.stitch-footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Responsive Breakpoints */
@media (max-width: 1023px) {
  .hero-grid,
  .stitch-dossier-grid,
  .stitch-media-grid {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }
  .bento-col-4, .bento-col-6, .bento-col-8, .bento-col-12 {
    grid-column: span 12;
  }
  .axioms-grid {
    grid-template-columns: 1fr 1fr;
  }
  .census-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .axioms-grid,
  .census-grid {
    grid-template-columns: 1fr;
  }
  .stitch-nav-links .stitch-nav-link:not(.active) {
    display: none;
  }
  .ab-switcher-pill {
    bottom: 14px;
    right: 14px;
    padding: 0.35rem 0.65rem;
  }
}
