/* -----------------------------------------------------------------------------
 * File: main.css
 * Purpose: Layout primitives + component library for the AURA Platform
 *          platform presentation. Consumes css/tokens.css custom properties
 *          exclusively — no hardcoded hex/px values for anything token-covered.
 * Read: ../STYLE-GUIDE.md for copy-paste snippets per component.
 * -------------------------------------------------------------------------- */

/* ============================= Reset & base ============================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--sp-6));
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  background: var(--c-bg-primary);
  background-image:
    radial-gradient(ellipse 1200px 600px at 15% -10%, rgba(28, 195, 176, 0.08), transparent 60%),
    radial-gradient(ellipse 900px 500px at 100% 20%, rgba(28, 195, 176, 0.05), transparent 55%);
  background-attachment: fixed;
  color: var(--c-text-primary);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-hover); }
a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: var(--r-sm); }

button { font: inherit; color: inherit; }
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

::selection { background: var(--c-accent-soft); color: var(--c-text-primary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: var(--r-sm); }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-muted); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: var(--lh-head);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { max-width: var(--measure); }
p + p { margin-top: var(--sp-4); }

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

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

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--sp-4);
  background: var(--c-accent);
  color: var(--c-bg-deep);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm);
  font-weight: 600;
  z-index: 2000;
  transition: top var(--dur-fast) var(--ease-standard);
}
.skip-link:focus { top: var(--sp-4); }

/* ============================== Containers =============================== */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--sp-8);
}

.chapter-content {
  width: 100%;
  max-width: var(--chapter-max);
  margin-inline: auto;
  padding-inline: var(--sp-8);
}

@media (max-width: 640px) {
  .container, .chapter-content { padding-inline: var(--sp-4); }
}

/* =============================== Header =================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(10, 23, 38, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.brand-lockup .rci-logo {
  height: 28px;
  width: 28px;
  border-radius: var(--r-sm);
  opacity: 0.92;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-head);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-accent);
  white-space: nowrap;
}

.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--c-border);
  flex-shrink: 0;
}

.brand-subtitle {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .brand-subtitle { display: none; }
}

/* ================================ Buttons ================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-bg-tertiary);
  color: var(--c-text-primary);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
}
.btn:hover { border-color: var(--c-accent); background: var(--c-bg-card); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-bg-deep);
}
.btn-primary:hover { background: var(--c-accent-hover); border-color: var(--c-accent-hover); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn .icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ================================== Nav ==================================== */
.chapter-nav {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  width: var(--nav-width);
  flex-shrink: 0;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: var(--sp-8) var(--sp-4) var(--sp-8) 0;
}

.chapter-nav ol {
  list-style: none;
  border-left: 1px solid var(--c-border);
}

.chapter-nav li { position: relative; }

.chapter-nav a {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  color: var(--c-text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              background var(--dur-fast) var(--ease-standard);
}

.chapter-nav a:hover { color: var(--c-text-primary); background: var(--c-bg-secondary); }

.chapter-nav a .num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  flex-shrink: 0;
}

.chapter-nav a.is-active {
  color: var(--c-text-primary);
  border-left-color: var(--c-accent);
  background: var(--c-accent-soft);
}
.chapter-nav a.is-active .num { color: var(--c-accent); }

.layout-shell {
  display: flex;
  align-items: flex-start;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--sp-8);
  gap: var(--sp-8);
}

.layout-main {
  min-width: 0;
  flex: 1;
  padding-block: var(--sp-8) var(--sp-32);
}

@media (max-width: 900px) {
  /* Stack nav above content. align-items:stretch (overriding the desktop
     flex-start) makes both children fill the 100% width of the column;
     without it, .layout-main sizes to its min-content and drags a wide
     diagram's intrinsic width up into a horizontal page overflow. */
  .layout-shell { flex-direction: column; align-items: stretch; padding-inline: var(--sp-4); }
  .layout-main { width: 100%; }
  .chapter-nav {
    position: static;
    width: 100%;
    max-height: none;
    padding: var(--sp-4) 0;
    overflow-y: visible;
  }
  .chapter-nav ol {
    display: flex;
    flex-wrap: wrap;
    border-left: none;
    gap: var(--sp-2);
  }
  .chapter-nav a {
    border-left: none;
    border: 1px solid var(--c-border);
    border-radius: var(--r-pill);
    padding: var(--sp-2) var(--sp-4);
  }
  .chapter-nav a.is-active { border-color: var(--c-accent); }
  .layout-main { padding-block: var(--sp-6) var(--sp-24); }
}

/* ================================ Chapters ================================= */
.chapter {
  scroll-margin-top: calc(var(--header-height) + var(--sp-6));
  padding-block: var(--sp-24) var(--sp-16);
  border-bottom: 1px solid var(--c-border-soft);
}

.chapter:last-of-type { border-bottom: none; }

.chapter-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--c-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.chapter-eyebrow .rule {
  width: var(--sp-8);
  height: 1px;
  background: var(--c-accent);
}

.chapter-title {
  font-size: var(--fs-4xl);
  margin-bottom: var(--sp-4);
}

.chapter-dek {
  font-size: var(--fs-md);
  color: var(--c-text-secondary);
  max-width: var(--measure);
  margin-bottom: var(--sp-12);
}

.section-title {
  font-size: var(--fs-2xl);
  margin-block: var(--sp-16) var(--sp-6);
}

.section-title:first-child { margin-top: 0; }

.subsection-title {
  font-size: var(--fs-lg);
  margin-block: var(--sp-8) var(--sp-4);
  color: var(--c-text-primary);
}

/* ================================== Hero =================================== */
.hero {
  /* Bleed: the backdrop grows past the text column on both sides while the
     text keeps its column position (padding in = margin out). */
  --hero-bleed: clamp(24px, 3vw, 64px);
  position: relative;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--sp-24, 96px) var(--sp-12, 48px);
  padding-inline: var(--hero-bleed);
  margin-inline: calc(-1 * var(--hero-bleed));
  overflow: hidden;
  border-bottom: 1px solid var(--c-border-soft);
  border-radius: var(--r-lg, 16px);
}

.hero-footnote {
  margin-top: var(--sp-4, 16px);
}

@media (max-width: 900px) {
  .hero { --hero-bleed: var(--sp-4, 16px); }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 1400px 800px at 50% -20%, rgba(28, 195, 176, 0.16), transparent 60%),
    linear-gradient(180deg, var(--c-bg-deep) 0%, var(--c-bg-primary) 70%);
}

.hero::after {
  /* subtle depth-line texture, evokes a subsurface/well-log grid */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 63px,
    var(--c-border-soft) 64px
  );
  mask-image: linear-gradient(180deg, transparent, black 30%, black 70%, transparent);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--c-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-6);
}

.hero-title {
  font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
  max-width: 18ch;
  margin-bottom: var(--sp-6);
}

.hero-title .accent { color: var(--c-accent); }

.hero-dek {
  font-size: var(--fs-md);
  color: var(--c-text-secondary);
  max-width: 62ch;
  margin-bottom: var(--sp-12);
}

/* =============================== Stat cards ================================ */
.stat-grid {
  display: grid;
  /* min(220px, 100%) lets a column shrink below 220px on narrow viewports
     instead of forcing a ~4×220px min-content floor that overflows mobile. */
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: var(--sp-6);
}

.stat-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-accent);
  box-shadow: var(--shadow-glow);
}

.stat-number {
  font-family: var(--font-head);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--c-accent);
  display: flex;
  align-items: baseline;
  gap: var(--sp-1);
}

.stat-number .unit {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--c-text-secondary);
}

.stat-label {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  line-height: 1.4;
}

/* ============================= Feature rows ================================ */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
  padding-block: var(--sp-16);
}

.feature-row.is-reversed .feature-row-media { order: 2; }
.feature-row.is-reversed .feature-row-copy { order: 1; }

/* min-width:0 lets the grid tracks shrink below their content's min-content
   width (a long inline <code> token otherwise pins the column wider than a
   narrow viewport); overflow-wrap breaks those tokens instead of overflowing. */
.feature-row-copy,
.feature-row-media { min-width: 0; }
.feature-row-copy { overflow-wrap: break-word; }

.feature-row-copy h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-4); }
.feature-row-copy p { color: var(--c-text-secondary); }
.feature-row-copy ul { margin-top: var(--sp-4); padding-left: var(--sp-6); color: var(--c-text-secondary); }
.feature-row-copy li { margin-bottom: var(--sp-2); }
.feature-row-copy li::marker { color: var(--c-accent); }

.feature-row-media {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 800px) {
  .feature-row { grid-template-columns: 1fr; gap: var(--sp-8); }
  .feature-row.is-reversed .feature-row-media,
  .feature-row.is-reversed .feature-row-copy { order: initial; }
}

/* ============================== Diagram panel ==============================
   Flat, technical-drawing register (not a soft "AI slide" card): solid fill,
   no drop shadow, no background gradient. Diagram content itself carries the
   visual weight — the panel is a neutral frame. */
.diagram-panel {
  background: var(--c-depth-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  overflow-x: auto;
}

.diagram-panel-title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-4);
}

.diagram-panel svg { margin-inline: auto; }

/* Sharpness baseline for every inline SVG diagram sitewide: small bold text
   (10.5–14px) at sub-1.0 CSS scale (viewBox wider than its rendered panel)
   reads visibly softer than equivalent HTML text — optimizeLegibility hints
   the renderer to favor kerning/hinting quality over raw paint speed, which
   measurably sharpens small glyphs at these sizes. Applied globally rather
   than per-diagram since every chapter's SVGs share the same failure mode. */
.diagram-panel svg text {
  text-rendering: optimizeLegibility;
}

/* Diagram node color conventions — apply as classes on <rect>/<g> in inline SVG */
.node-source rect, .node-source { fill: var(--c-depth-3); stroke: var(--c-text-muted); }
.node-transform rect, .node-transform { fill: var(--c-accent-soft); stroke: var(--c-accent); }
.node-destination rect, .node-destination { fill: var(--c-bg-card); stroke: var(--c-accent); stroke-width: 2; }
.diagram-edge { stroke: var(--c-text-muted); stroke-width: 1.5; fill: none; }
.diagram-edge.is-live { stroke: var(--c-accent); stroke-width: 2; }
.diagram-label { fill: var(--c-text-secondary); font-family: var(--font-mono); font-size: 12px; }

/* ================================ Flow steps ================================ */
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}

.flow-step {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
}

.flow-step .step-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: var(--r-pill);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  flex-shrink: 0;
}

.flow-arrow {
  color: var(--c-text-muted);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .flow-steps { flex-direction: column; align-items: stretch; }
  .flow-arrow { transform: rotate(90deg); align-self: center; }
}

/* ================================ Status pills ============================== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: var(--r-pill);
  background: currentColor;
  flex-shrink: 0;
}

.pill-live { background: rgba(52, 211, 153, 0.14); color: var(--c-success); border-color: rgba(52, 211, 153, 0.35); }
.pill-qa { background: rgba(116, 192, 252, 0.14); color: var(--c-info); border-color: rgba(116, 192, 252, 0.35); }
.pill-prod { background: var(--c-accent-soft); color: var(--c-accent); border-color: rgba(45, 212, 191, 0.35); }
.pill-inert { background: rgba(107, 130, 148, 0.16); color: var(--c-text-muted); border-color: var(--c-border); }
.pill-warning { background: rgba(251, 191, 36, 0.14); color: var(--c-warning); border-color: rgba(251, 191, 36, 0.35); }
.pill-danger { background: rgba(248, 113, 113, 0.14); color: var(--c-danger); border-color: rgba(248, 113, 113, 0.35); }

/* ================================== Badges =================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  background: var(--c-bg-tertiary);
  color: var(--c-text-secondary);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  border: 1px solid var(--c-border);
}

/* =================================== Tables ================================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

thead th {
  background: var(--c-bg-secondary);
  color: var(--c-text-primary);
  text-align: left;
  font-weight: 600;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}

tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-border-soft);
  color: var(--c-text-secondary);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-of-type(odd) { background: rgba(255, 255, 255, 0.015); }
tbody tr:hover { background: var(--c-bg-tertiary); }
tbody td:first-child, thead th:first-child { color: var(--c-text-primary); font-weight: 500; }

/* ================================= Footnotes ================================= */
.footnote {
  margin-top: var(--sp-8);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border-soft);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
}

.footnote .marker {
  font-family: var(--font-mono);
  color: var(--c-accent);
  flex-shrink: 0;
}

/* =============================== Callout / note =============================== */
.callout {
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  background: var(--c-bg-card);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-6);
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
}

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

/* ================================ Site footer ================================= */
.site-footer {
  border-top: 1px solid var(--c-border-soft);
  padding-block: var(--sp-12);
  text-align: center;
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
}


/* ============================== Glyph kit ================================= */
/* System/concept icons — see assets/glyphs/USAGE.md. Sized via width/height
   so <use> instances don't inherit a stray intrinsic size; colored via
   currentColor (outline) + var(--c-accent) (baked into the sprite's accent
   elements, flips automatically with the print theme). */
.glyph {
  width: 1.5em;
  height: 1.5em;
  display: inline-block;
  vertical-align: -0.3em;
  flex-shrink: 0;
}
.glyph.is-sm { width: 20px; height: 20px; }
.glyph.is-md { width: 32px; height: 32px; }
.glyph.is-lg { width: 48px; height: 48px; }
.glyph.is-xl { width: 96px; height: 96px; }

.glyph-node {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  background: var(--c-bg-card);
  border: 1.5px solid var(--c-border);
  flex-shrink: 0;
}
.glyph-node .glyph { width: 32px; height: 32px; }
.glyph-node.is-sm { width: 48px; height: 48px; }
.glyph-node.is-sm .glyph { width: 24px; height: 24px; }

.status-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--c-bg-primary);
}
.status-dot-live { background: var(--c-success); }
.status-dot-qa { background: var(--c-info); }
.status-dot-pending { background: var(--c-warning); }
.status-dot-inert { background: var(--c-text-muted); }

@media print {
  .status-dot { border-color: #ffffff; }
}

/* ============================ Screenshot figure ============================ */
/* Shared component for embedding real product screenshots (assets/screens/)
   as evidentiary proof points inside chapter bodies. Token-driven, print-safe
   (bounded max-height so a large screenshot never blows page pagination). */
.screenshot-figure {
  margin-block: var(--sp-8);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-bg-card);
  padding: var(--sp-3);
  box-shadow: var(--shadow-sm);
}

.screenshot-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border-soft);
}

.screenshot-figure figcaption {
  margin-top: var(--sp-3);
  padding-inline: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  line-height: 1.5;
}

.screenshot-figure figcaption strong {
  color: var(--c-text-primary);
}

/* Two-up layout for a pair of related screenshots side by side */
.screenshot-figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}

@media (max-width: 800px) {
  .screenshot-figure-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  .screenshot-figure {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }
  .screenshot-figure img {
    max-height: 130mm;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    object-fit: contain;
  }
}

/* Full product name in the header lockup: "AURA Data Hub" */
.brand-wordmark-sub {
  font-weight: 400;
  color: var(--c-text-secondary);
  letter-spacing: 0.01em;
}

/* Customer logo chip in the dark header (white-background JPG asset) */
.brand-logo-chip {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius-sm, 4px);
  padding: 3px 8px;
}
.brand-logo-chip img { display: block; height: 26px; width: auto; }
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.site-footer .rci-logo { opacity: 0.85; }

/* PowerPoint-style chapter navigator: ‹ 03 / 08 › pinned bottom-left */
.chapter-arrows {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--c-bg-card) 88%, transparent);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.35));
  backdrop-filter: blur(6px);
}
.chapter-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--c-text-secondary);
  cursor: pointer;
}
.chapter-arrow svg { width: 18px; height: 18px; }
.chapter-arrow:hover:not(:disabled) { background: var(--c-bg-tertiary); color: var(--c-accent); }
.chapter-arrow:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.chapter-arrow:disabled { opacity: 0.3; cursor: default; }
.chapter-arrow-counter {
  min-width: 64px;
  text-align: center;
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--c-text-secondary);
  user-select: none;
}
@media print { .chapter-arrows { display: none !important; } }
@media (max-width: 640px) { .chapter-arrows { left: 12px; bottom: 12px; } }

/* ========================= Hero art (background) =========================
 * Anchored to the BOTTOM of the hero, under/behind the stat cards
 * (svg uses preserveAspectRatio="xMidYMid slice" to fill the band). */
.hero-art {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  z-index: -1;
  width: 100%;
  height: 52%;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art-seam {
    animation: hero-art-seam-breath 14s ease-in-out infinite;
  }
}

@keyframes hero-art-seam-breath {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art-seam { animation: none \!important; }
}

@media (max-width: 800px) {
  .hero-art { opacity: 0.35; }
}
@media (max-width: 480px) {
  .hero-art { display: none; }
}

@media print {
  .hero-art { display: none \!important; }
}

/* FARO optional-module asterisk */
.faro-asterisk {
  color: var(--c-warning);
  font-weight: 700;
  cursor: help;
}

/* SVG text must never inherit the node-group's border stroke —
   the .node-* group selectors set stroke for the rect, but SVG stroke
   inherits to <text>, painting every label with a colored outline
   (the "double-printed / fuzzy" text artifact). */
.diagram-panel svg text,
.glyph-diagram-node text {
  stroke: none;
}

/* ── Chapter 10: contact CTA ─────────────────────────────────────── */
.contact-cta {
  margin-top: var(--sp-12);
  padding: var(--sp-12) var(--sp-8);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  background: var(--c-bg-card);
  text-align: center;
}
.contact-cta h3 {
  font-size: 1.6rem;
  color: var(--c-text-primary);
  margin-bottom: var(--sp-3);
}
.contact-cta p {
  max-width: 58ch;
  margin: 0 auto var(--sp-8);
  color: var(--c-text-secondary);
}
.cta-buttons {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}
.cta-button {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: var(--c-accent);
  color: var(--c-bg-primary);
  border: 1px solid var(--c-accent);
  transition: background 0.15s ease, color 0.15s ease;
}
.cta-button:hover { background: var(--c-accent-hover); border-color: var(--c-accent-hover); }
.cta-button-secondary {
  background: transparent;
  color: var(--c-accent);
}
.cta-button-secondary:hover { background: var(--c-accent-soft); color: var(--c-accent); }
