/* GranaryIQ — Digital Knowledge Vault / Organizational Library */

:root {
  --bg: #F8F6F1;
  --ink: #1F2937;
  --primary: #0F766E;
  --primary-hover: #0d655e;
  --secondary: #C08457;
  --rating: #2563EB;
  --risk: #DC2626;
  --line: #DDD6C8;
  --muted: #64748B;
  --bg-soft: #F3F0E8;
  --primary-soft: rgba(15, 118, 110, 0.1);
  --secondary-soft: rgba(192, 132, 87, 0.12);
  --announce-bg: #5EEAD4;
  --announce-ink: #ECFDF5;
  --announce-gradient: linear-gradient(135deg, #0D9488 0%, #14B8A6 42%, #5EEAD4 100%);
  --header-gradient: linear-gradient(180deg, #99F6E4 0%, #CCFBF1 32%, #E6FFFA 68%, #F0FDFA 100%);
  --header-line: rgba(15, 118, 110, 0.35);
  --header-shadow: 0 1px 0 rgba(15, 118, 110, 0.16), 0 10px 28px rgba(15, 118, 110, 0.12);

  --display: "Source Serif 4", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --container-max: 1160px;
  --gutter: clamp(16px, 4vw, 28px);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(31, 41, 55, 0.04);
  --shadow: 0 2px 8px rgba(31, 41, 55, 0.06), 0 12px 32px rgba(31, 41, 55, 0.05);
  --shadow-lg: 0 8px 24px rgba(31, 41, 55, 0.08), 0 24px 48px rgba(31, 41, 55, 0.06);

  --announce-h: 38px;
  --header-h: 64px;
  --site-top-h: calc(var(--announce-h) + var(--header-h));
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { padding-left: 1.25rem; }
[hidden] { display: none !important; }

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

p { color: var(--muted); }

/* ── Base ── */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--site-top-h);
}

.site-shell main { flex: 1; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible,
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.text-accent { color: var(--primary); }

.muted { color: var(--muted); }

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 58ch;
}

.text-link {
  font-weight: 600;
  color: var(--primary);
}

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

/* ── Announce bar + header ── */
.announce-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 var(--gutter);
  background: var(--announce-gradient);
  border-bottom: 1px solid rgba(15, 118, 110, 0.4);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--announce-ink);
}

.announce-bar a {
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
}

.announce-bar a:hover { text-decoration: underline; }

.site-header {
  position: fixed;
  top: var(--announce-h);
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-gradient);
  border-bottom: 1px solid var(--header-line);
  box-shadow: var(--header-shadow);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  flex-shrink: 0;
  text-decoration: none;
  min-width: 0;
}

.brand:hover { color: var(--ink); opacity: 0.88; }

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
}

.logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-main {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
  padding: 6px 7px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--primary-soft);
  border-color: rgba(15, 118, 110, 0.18);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header-actions .nav-link { font-size: 0.78rem; padding: 6px 8px; }

.header-actions .btn-sm {
  font-size: 0.75rem;
  padding: 6px 10px;
}

/* ── Buttons ── */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: #c9c0b0;
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding: 8px 14px;
}

.btn-ghost:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 8px 14px;
}

.btn-lg {
  font-size: 0.9375rem;
  padding: 14px 26px;
}

.btn-full { width: 100%; }

/* ── Home hero (split layout) ── */
.home-hero {
  padding: 56px 0 48px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.hero-split {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.hero-copy {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.hero-copy .eyebrow {
  margin-inline: auto;
}

.hero-copy .btn-row {
  margin-top: 28px;
  justify-content: center;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--ink);
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 54ch;
  margin-inline: auto;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  justify-content: center;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 90px;
}

.hero-stat strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.hero-stat span {
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-vault { min-width: 0; width: 100%; }

/* Home hero — compact granary hub */
.home-hero .granary-hub {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(0, 0.85fr);
  gap: 14px;
  padding: 14px 16px;
}

.home-hero .vault-frame-tab {
  padding: 10px 16px;
  font-size: 0.8125rem;
}

.home-hero .vault-tab-meta {
  font-size: 0.75rem;
}

.home-hero .vault-panel-head {
  padding: 7px 11px;
  font-size: 0.75rem;
}

.home-hero .vault-panel-body {
  padding: 10px 11px;
}

.home-hero .doc-stream {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.home-hero .shelf-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 5px 8px;
  font-size: 0.75rem;
}

.home-hero .shelf-item span {
  font-size: 0.62rem;
}

.home-hero .shelf-more {
  grid-column: 1 / -1;
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  text-align: center;
}

.home-hero .engine-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.home-hero .engine-chip {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}

.home-hero .engine-chip-accent {
  background: var(--primary-soft);
  border-color: rgba(15, 118, 110, 0.2);
  color: var(--primary);
}

.home-hero .engine-pulse {
  margin-top: 8px;
  padding-top: 8px;
  font-size: 0.62rem;
}

.home-hero .ledger-row {
  padding: 5px 0;
}

.home-hero .ledger-row span {
  font-size: 0.62rem;
}

.home-hero .ledger-row strong {
  font-size: 0.8125rem;
}

.home-hero .health-score-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.home-hero .health-score-inline span {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.home-hero .health-score-inline strong {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--rating);
}

/* ── Vault frame ── */
.vault-frame {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.vault-frame-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}

.vault-tab-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.vault-frame-tab strong {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
}

.vault-tab-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-left: auto;
}

/* ── Granary hub ── */
.granary-hub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 12px;
  padding: 20px;
}

.hub-col {
  min-width: 0;
}

/* ── Vault panels ── */
.vault-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.vault-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.vault-panel-body {
  padding: 14px;
  font-size: 0.875rem;
}

.vault-panel-accent {
  border-color: rgba(15, 118, 110, 0.28);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.04) 0%, var(--bg) 40%);
}

.vault-panel-accent .vault-panel-head {
  background: var(--primary-soft);
  border-bottom-color: rgba(15, 118, 110, 0.15);
}

.vault-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.vault-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ── Vault tags ── */
.vault-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.vault-risk {
  color: var(--risk);
  background: rgba(220, 38, 38, 0.1);
}

.vault-warn {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.vault-positive {
  color: #047857;
  background: rgba(15, 118, 110, 0.12);
}

.vault-neutral {
  color: var(--muted);
  background: var(--bg-soft);
}

.vault-score {
  color: var(--rating);
  background: rgba(37, 99, 235, 0.1);
}

/* ── Document stream / shelf ── */
.doc-stream {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shelf-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.shelf-item strong {
  font-weight: 600;
  color: var(--ink);
}

.shelf-item span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-align: right;
}

.shelf-sop { border-left: 3px solid var(--primary); }
.shelf-notes { border-left: 3px solid var(--secondary); }
.shelf-training { border-left: 3px solid #047857; }
.shelf-spec { border-left: 3px solid var(--rating); }
.shelf-playbook { border-left: 3px solid #b45309; }
.shelf-wiki { border-left: 3px solid #6b7280; }

/* ── AI engine ── */
.ai-engine {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.engine-step {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
}

.engine-step:last-child { border-bottom: none; }

.engine-step span {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.engine-step strong {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.8125rem;
}

.engine-pulse {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(192, 132, 87, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(192, 132, 87, 0); }
}

/* ── Inventory ledger ── */
.inventory-ledger {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
}

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

.ledger-row span {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.ledger-row strong {
  font-weight: 700;
  color: var(--ink);
}

.ledger-warn strong { color: #b45309; }
.ledger-risk strong { color: var(--risk); }
.ledger-score strong { color: var(--rating); }

/* ── Vault pipeline ── */
.vault-pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pipeline-step {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pipeline-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
}

.pipeline-step strong {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.pipeline-step p {
  font-size: 0.8125rem;
  margin: 0;
}

/* ── Product flow ── */
.product-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0;
}

.flow-col { min-width: 0; }

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 1.1rem;
  align-self: center;
}

.feature-frame {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.doc-stack,
.analysis-lane,
.intel-preview {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.doc-row,
.analysis-step,
.intel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
}

.doc-row:last-child,
.analysis-step:last-child,
.intel-row:last-child { border-bottom: none; }

.doc-row span,
.analysis-step span,
.intel-row span {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.doc-row strong,
.analysis-step strong,
.intel-row strong {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* ── Page layouts ── */
.page-hero {
  padding: 48px 0 40px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.page-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 52ch;
}

.page-showcase {
  padding: 40px 0 56px;
  background: var(--bg);
}

.page-showcase.is-alt {
  background: var(--bg-soft);
}

.page-body {
  padding: 56px 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb span:not(:last-child) { color: var(--line); }

.section {
  padding: 56px 0;
}

.section.is-alt,
.section.alt,
.is-alt {
  padding: 56px 0;
  background: var(--bg-soft);
}

.section.tight,
.section.is-alt.tight {
  padding: 40px 0;
}

.section-head {
  margin-bottom: 36px;
  max-width: 640px;
}

.section-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 10px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.25;
}

.section-head p {
  margin-top: 12px;
  font-size: 1rem;
}

.section-inline-title {
  font-family: var(--display);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.section-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 56ch;
}

/* ── Pain list ── */
.pain-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.pain-item {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pain-item .kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

.pain-item h3 {
  font-family: var(--display);
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.pain-item p {
  font-size: 0.875rem;
  margin: 0;
}

/* ── Capabilities ── */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cap-card {
  padding: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}

.cap-card:hover {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}

.cap-card h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.cap-card p {
  font-size: 0.875rem;
  margin: 0;
}

/* ── Teams ── */
.team-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.team-chip:hover {
  background: var(--primary-soft);
  border-color: rgba(15, 118, 110, 0.3);
  color: var(--primary);
  text-decoration: none;
}

.team-vault {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.team-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}

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

.team-row span {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  flex-shrink: 0;
}

.team-row strong {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* ── Case study ── */
.case-study { margin-top: 0; }

.case-study-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.case-study-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.case-study-stat strong {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
}

.case-study-stat span {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── Source strip ── */
.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.source-strip span {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.capture-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.capture-strip span {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.integration-hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 24px;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.hub-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hub-sources span {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 6px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.hub-arrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--secondary);
}

.hub-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 28px;
  background: var(--primary-soft);
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: var(--radius);
}

.hub-center strong {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
}

.hub-center span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── CTAs ── */
.sub-cta,
.home-cta {
  text-align: center;
  padding: 36px 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.sub-cta h3,
.home-cta h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.sub-cta p,
.home-cta p {
  font-size: 1rem;
  margin-bottom: 0;
}

.sub-cta .btn-row,
.home-cta .btn-row {
  justify-content: center;
  margin-top: 20px;
}

.spec-callout {
  padding: 24px 28px;
  background: var(--primary-soft);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.65;
}

.spec-callout strong { color: var(--primary); }

/* ── Knowledge inventory ── */
.knowledge-inventory-grid {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.inventory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.inventory-head strong {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}

.inventory-head span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.inventory-rows {
  display: flex;
  flex-direction: column;
}

.inventory-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

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

.inv-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.inv-title strong {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.inv-count {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  flex-shrink: 0;
}

.inv-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

.inv-meta span:not(.vault-tag):not(.inv-source) {
  font-family: var(--mono);
  font-size: 0.66rem;
}

.inv-source {
  font-family: var(--mono);
  font-size: 0.66rem;
  padding: 2px 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}

/* ── Knowledge health ── */
.knowledge-health-score,
.health-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.health-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.health-score-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: var(--primary-soft);
  flex-shrink: 0;
}

.health-score-ring strong {
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}

.health-score-ring span {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 4px;
}

.health-summary {
  font-size: 0.9375rem;
  max-width: 48ch;
  margin: 0;
}

.health-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.health-metric {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.health-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}

.health-value {
  display: block;
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.health-metric p {
  font-size: 0.75rem;
  margin: 0;
}

.health-warn { border-color: rgba(245, 158, 11, 0.3); }
.health-risk { border-color: rgba(220, 38, 38, 0.25); }
.health-positive { border-color: rgba(15, 118, 110, 0.3); }

.health-risks .vault-panel { margin-top: 0; }

.risk-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.risk-row strong {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.risk-row p {
  font-size: 0.8125rem;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.risk-risk { border-left: 3px solid var(--risk); padding-left: 12px; }
.risk-warn { border-left: 3px solid #f59e0b; padding-left: 12px; }

/* ── Topic map / graph ── */
.topic-map,
.topic-graph {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.map-center {
  text-align: center;
  padding: 20px;
  background: var(--primary-soft);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius);
}

.map-center span {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.map-center em {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-style: normal;
  color: var(--muted);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.topic-node {
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.topic-node strong {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.node-count {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.topic-node p {
  font-size: 0.8125rem;
  margin: 0;
}

.node-center { border-color: rgba(15, 118, 110, 0.35); background: var(--primary-soft); }
.node-product { border-color: rgba(37, 99, 235, 0.25); }
.node-eng { border-color: rgba(100, 116, 139, 0.35); }
.node-cs { border-color: rgba(192, 132, 87, 0.35); }
.node-security { border-color: rgba(220, 38, 38, 0.2); }
.node-sales { border-color: rgba(192, 132, 87, 0.25); }
.node-ops { border-color: rgba(15, 118, 110, 0.25); }
.node-hr { border-color: var(--line); }

/* ── Duplicate detection ── */
.duplicate-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.dup-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.dup-pair strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.dup-arrow {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.875rem;
}

.dup-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

.dup-match {
  font-family: var(--mono);
  font-weight: 600;
  color: #b45309;
}

/* ── Knowledge gaps ── */
.gap-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.gap-row strong {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.gap-row p {
  font-size: 0.8125rem;
  margin: 0;
}

.gap-high { border-left: 3px solid var(--risk); padding-left: 12px; }
.gap-medium { border-left: 3px solid #f59e0b; padding-left: 12px; }
.gap-low { border-left: 3px solid var(--line); padding-left: 12px; }

/* ── Expert map ── */
.expert-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.expert-card {
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.expert-card strong {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.expert-domain {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.expert-card p {
  font-size: 0.8125rem;
  margin: 0 0 10px;
}

/* ── Content freshness ── */
.freshness-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.freshness-row strong {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
  margin-bottom: 2px;
}

.freshness-team {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.freshness-row p {
  font-size: 0.8125rem;
  margin: 0;
}

.freshness-age {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #b45309;
  flex-shrink: 0;
}

/* ── Executive report ── */
.report-block {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.report-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.report-block p {
  font-size: 0.875rem;
  margin: 0;
}

/* ── Integrations ── */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.int-card {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.int-card h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.int-card p {
  font-size: 0.875rem;
  margin-bottom: 14px;
}

/* ── Security ── */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.security-card {
  padding: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.security-card h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.security-card p {
  font-size: 0.875rem;
  margin: 0;
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.plan-card {
  position: relative;
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.plan-card h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.plan-card > p:not(.plan-price):not(.plan-note) {
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.plan-featured {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 35%);
}

.plan-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.plan-price {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
}

.plan-price span {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
}

.plan-note {
  margin: -12px 0 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--secondary);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.plan-features li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 0.875rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.plan-features li:last-child { border-bottom: none; }

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.75rem;
}

/* ── About ── */
.about-vault-hero {
  padding: 48px 0 40px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.about-vault-intro {
  max-width: 640px;
}

.about-index-section {
  padding: 56px 0;
}

/* Archive index shelf — 2×2 grid, NOT zigzag timeline */
.vault-index-shelf {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-sm);
}

.index-shelf-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--secondary);
}

.index-shelf-rail span {
  display: block;
  height: 6px;
  background: linear-gradient(180deg, var(--secondary) 0%, rgba(192, 132, 87, 0.45) 100%);
  border-radius: 3px 3px 0 0;
}

.index-shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.index-shelf-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.index-shelf-tab {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: linear-gradient(90deg, var(--secondary) 0%, #a8724a 100%);
  padding: 6px 14px;
}

.index-shelf-body {
  padding: 18px 20px 22px;
  border-top: 3px solid var(--primary-soft);
}

.index-shelf-body h2 {
  font-family: var(--display);
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.index-shelf-body p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  color: var(--muted);
}

.index-shelf-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 40px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.index-shelf-metrics div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.index-shelf-metrics strong {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
}

.index-shelf-metrics span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.vault-origin {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.origin-card {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.origin-card p {
  font-size: 0.9rem;
  margin: 0;
}

.about-vault-footer {
  padding: 56px 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.vault-cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.vault-cta-panel h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.vault-cta-panel p {
  font-size: 0.9rem;
  margin: 0;
}

.vault-principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.principle-entry {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.principle-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.principle-entry h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.principle-entry p {
  font-size: 0.9rem;
  margin: 0;
}

/* ── Auth ── */
.auth-page {
  overflow: hidden;
}

.auth-vault {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-vault-visual {
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  background: linear-gradient(145deg, #0a5c55 0%, var(--primary) 45%, #148a80 100%);
  color: #fff;
}

.auth-vault-brand {
  color: #fff;
  margin-bottom: 48px;
}

.auth-vault-brand:hover { color: #fff; opacity: 0.9; }

.auth-vault-brand .brand-text span {
  color: rgba(255, 255, 255, 0.7);
}

.auth-vault-brand .logo-mark {
  background: transparent;
  border: none;
  box-shadow: none;
}

.auth-vault-copy h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: #fff;
  margin-bottom: 16px;
}

.auth-vault-copy .lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  max-width: 36ch;
}

.auth-vault-shelf {
  margin-top: 32px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.auth-shelf-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-shelf-row:last-child { border-bottom: none; }

.auth-shelf-row span {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

.auth-shelf-row strong {
  color: #fff;
  font-weight: 600;
}

.auth-vault-catalog {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.auth-catalog-preview {
  flex: 1;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.auth-catalog-preview .catalog-tab {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  font-size: 0.65rem;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.9);
  border: none;
}

.auth-catalog-preview strong {
  display: block;
  color: #fff;
  font-weight: 700;
  margin-bottom: 2px;
}

.auth-catalog-preview span:last-child {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
}

.auth-vault-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.auth-vault-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-vault-stat strong {
  font-family: var(--display);
  font-size: 1.25rem;
  color: #fff;
}

.auth-vault-stat span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.auth-vault-foot {
  margin-top: auto;
  padding-top: 32px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
}

.auth-vault-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter);
  background: var(--bg);
}

.auth-vault-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-vault-wrap h2 {
  font-family: var(--display);
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.auth-vault-card {
  margin-top: 28px;
  padding: 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.auth-footer-note {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}

.footer-top .brand { margin-bottom: 0; }

.footer-tagline {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 36ch;
  margin-top: 12px;
}

.footer-cta { margin-top: 16px; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.footer-col h5 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  padding: 4px 0;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--primary);
  text-decoration: none;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── Forms ── */
.form,
.site-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group,
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label,
.form-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.form-group input,
.form-field input,
.form-field select {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.9375rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-divider {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
  position: relative;
  margin: 4px 0;
}

.form-divider::before,
.form-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--line);
}

.form-divider::before { left: 0; }
.form-divider::after { right: 0; }

.form-success {
  font-size: 0.875rem;
  color: #047857;
  text-align: center;
  padding: 8px;
  background: var(--secondary-soft);
  border-radius: var(--radius-sm);
}

/* ── UI alerts ── */
.ui-alert {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  border: 1px solid var(--line);
}

.ui-alert strong {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--ink);
}

.ui-alert-ok {
  background: var(--secondary-soft);
  border-color: rgba(192, 132, 87, 0.3);
}

.ui-alert-info {
  background: var(--primary-soft);
  border-color: rgba(15, 118, 110, 0.2);
}

.ui-alert-warn {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

/* ── Modals ── */
body.modal-open { overflow: hidden; }

.site-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.site-modal[hidden] { display: none !important; }

.site-modal:not([hidden]) { display: flex; }

.site-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 41, 55, 0.4);
}

.site-modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.site-modal-wide { max-width: 640px; }

.site-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.site-modal-close:hover {
  background: var(--line);
  color: var(--ink);
}

.site-modal-panel h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 8px;
  padding-right: 32px;
}

.site-modal-lead {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.demo-lifecycle {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.lifecycle-step {
  padding: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lifecycle-step span {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 6px;
}

.lifecycle-step strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.lifecycle-step p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}

.demo-workspace {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 8px;
  padding: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.demo-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}

.demo-cell {
  padding: 10px 12px;
  font-size: 0.8125rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.demo-tag {
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
}

.demo-arrow {
  display: flex;
  align-items: center;
  color: var(--muted);
  align-self: center;
}

.demo-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-timeline span {
  padding: 8px 12px;
  font-size: 0.8125rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.compare-col {
  padding: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compare-col h3 {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.compare-col p {
  font-size: 0.8125rem;
  margin: 0;
}

/* ── Demo running state ── */
.is-running {
  opacity: 0.6;
  pointer-events: none;
}

/* ── Responsive: 1180px ── */
@media (max-width: 1280px) {
  .brand-text span { display: none; }
}

@media (max-width: 1180px) {
  .granary-hub {
    grid-template-columns: 1fr 1fr;
  }

  .hub-ledger-col {
    grid-column: 1 / -1;
  }

  .health-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .vault-pipeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Responsive: 960px ── */
@media (max-width: 960px) {
  .hero-split {
    gap: 28px;
  }

  .home-hero .doc-stream {
    grid-template-columns: 1fr;
  }

  .granary-hub,
  .product-flow,
  .demo-workspace {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .flow-arrow,
  .demo-arrow {
    display: none;
  }

  .vault-principles,
  .vault-origin,
  .pricing-grid,
  .integration-grid,
  .cap-grid,
  .expert-map,
  .case-study-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pain-list,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .vault-pipeline {
    grid-template-columns: 1fr;
  }

  .demo-lifecycle {
    grid-template-columns: repeat(2, 1fr);
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .index-shelf-grid {
    grid-template-columns: 1fr;
  }

  .index-shelf-rail {
    grid-template-columns: repeat(2, 1fr);
  }

  .auth-vault {
    grid-template-columns: 1fr;
  }

  .auth-vault-visual {
    padding: 32px var(--gutter);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-main { display: none; }
  .header-actions .nav-link { display: none; }
}

@media (max-width: 600px) {
  .vault-principles,
  .vault-origin,
  .pricing-grid,
  .integration-grid,
  .cap-grid,
  .expert-map,
  .case-study-grid,
  .health-metrics,
  .demo-lifecycle {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .vault-tab-meta {
    margin-left: 0;
  }
}
