/* ============================================================
   AUDTHEIA — SHARED DESIGN SYSTEM
   website/assets/style.css
   Session 2 — Custom properties, reset, base, typography,
               navigation, footer, layout utilities, responsive
   ============================================================ */

/* ── 1. CUSTOM PROPERTIES ─────────────────────────────────── */
:root {
  /* Color — Backgrounds */
  --color-bg:             #07090f;
  --color-surface:        #0b0f1c;
  --color-surface-2:      #0f1627;
  --color-border:         #182038;
  --color-border-subtle:  #0d1629;

  /* Color — Accents */
  --color-teal:           #00c9a7;
  --color-teal-dim:       #00a88c;
  --color-blue:           #38bdf8;
  --color-glow-teal:      rgba(0, 201, 167, 0.12);
  --color-glow-blue:      rgba(56, 189, 248, 0.08);

  /* Color — Text */
  --color-text:           #ddeaf2;
  --color-text-2:         #7fafc8;
  --color-text-muted:     #3d6278;

  /* Typography — Families */
  --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --font-mono:  'IBM Plex Mono', 'Courier New', Courier, monospace;
  --font-sans:  'IBM Plex Sans', system-ui, -apple-system, sans-serif;

  /* Typography — Scale */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */
  --text-6xl:  3.75rem;    /* 60px */

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Layout */
  --container-max: 1200px;
  --container-pad: var(--space-6);
  --nav-height:    64px;
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ── 2. RESET ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

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

ul, ol {
  list-style: none;
}

/* ── 3. BASE ──────────────────────────────────────────────── */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 4. TYPOGRAPHY ────────────────────────────────────────── */

/* Narrative headings — IBM Plex Serif */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

/* Sub-headings and labels — IBM Plex Sans */
h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  color: var(--color-text-2);
  max-width: 68ch;
}

/* Data elements — IBM Plex Mono */
/* Applied to: species names, confidence scores, coordinates,
   observation IDs, any numeric or scientific data display */
code,
.mono,
.data-label,
.species-name,
.confidence,
.coordinate {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--color-teal);
  letter-spacing: 0.01em;
}

/* Utility classes */
.text-accent  { color: var(--color-teal); }
.text-blue    { color: var(--color-blue); }
.text-muted   { color: var(--color-text-muted); }
.text-2       { color: var(--color-text-2); }
.font-serif   { font-family: var(--font-serif); }
.font-mono    { font-family: var(--font-mono); }

/* ── 5. NAVIGATION ────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(7, 9, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base),
              background var(--transition-base);
}

.site-nav.scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(7, 9, 15, 0.97);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-teal);
  letter-spacing: 0.06em;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 0.75;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-2);
  letter-spacing: 0.03em;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

/* Mobile hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text-2);
  transition: transform var(--transition-fast),
              opacity var(--transition-fast);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── 6. FOOTER ────────────────────────────────────────────── */
.site-footer {
  margin-top: var(--space-32);
  padding: var(--space-12) var(--container-pad);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-teal);
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-text-2);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* ── 7. LAYOUT UTILITIES ──────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--space-24) 0;
}

.section-sm {
  padding: var(--space-16) 0;
}

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
}

/* Flex helpers */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-4        { gap: var(--space-4); }
.gap-6        { gap: var(--space-6); }
.gap-8        { gap: var(--space-8); }

/* Margin helpers */
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

/* Placeholder label — Session 2 shell only.
   These blocks are replaced entirely in Session 3. */
.placeholder-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  padding: var(--space-16) var(--space-8);
  text-align: center;
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
}

/* ── 8. RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(7, 9, 15, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-base),
                opacity var(--transition-base);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    display: block;
    padding: var(--space-4) var(--container-pad);
    width: 100%;
    font-size: var(--text-base);
  }

  .nav-links a::after {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 480px) {
  :root {
    --container-pad: var(--space-4);
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}

/* ── 9. BUTTONS ────────────────────────────────────────────────────────── */
/* Shared component — used across all pages                                */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.btn-primary {
  background: var(--color-teal);
  color: var(--color-bg);
  border-color: var(--color-teal);
}

.btn-primary:hover {
  background: var(--color-teal-dim);
  border-color: var(--color-teal-dim);
  color: var(--color-bg);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-2);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

/* ── 10. SECTION UTILITIES ─────────────────────────────────────────────── */
/* Reusable label and intro text shared across all page sections           */

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-intro {
  color: var(--color-text-2);
  font-size: var(--text-lg);
  max-width: 72ch;
  margin-top: var(--space-4);
  line-height: 1.7;
}

/* ── 11. HERO ──────────────────────────────────────────────────────────── */

/* Keyframe definitions */
@keyframes audtheia-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes audtheia-glowPulse {
  0%, 100% { opacity: 0.85; }
  50%       { opacity: 0.4;  }
}

/* Hero section */
.hero {
  position: relative;
  padding-top: calc(var(--nav-height) + var(--space-20));
  padding-bottom: var(--space-20);
  min-height: 100vh;
  display: flex;
  align-items: center;
  /* Subtle scientific grid — uses color-border-subtle (#0d1629) against
     the near-black background (#07090f). Almost invisible; adds depth. */
  background-image:
    linear-gradient(var(--color-border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border-subtle) 1px, transparent 1px);
  background-size: var(--space-8) var(--space-8);
}

/* Teal gradient line at the bottom of the hero — like a sonar sweep */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-teal) 50%,
    transparent 100%
  );
  opacity: 0.18;
  pointer-events: none;
}

/* Two-column grid: text left, GIF right */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

/* Text column — stacked flex with gap */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Staggered entrance — each element fades up in sequence */
.hero-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: audtheia-fadeInUp 0.5s ease both;
  animation-delay: 0.1s;
}

.hero-headline {
  font-size: var(--text-5xl);
  line-height: 1.14;
  color: var(--color-text);
  animation: audtheia-fadeInUp 0.6s ease both;
  animation-delay: 0.25s;
}

.hero-body {
  font-size: var(--text-lg);
  line-height: 1.75;
  color: var(--color-text-2);
  max-width: 54ch;
  animation: audtheia-fadeInUp 0.6s ease both;
  animation-delay: 0.4s;
}

/* Four-column stat row */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  animation: audtheia-fadeInUp 0.6s ease both;
  animation-delay: 0.55s;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-teal);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* CTA button group */
.hero-ctas {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
  animation: audtheia-fadeInUp 0.6s ease both;
  animation-delay: 0.7s;
}

/* GIF column — slides in slightly slower */
.hero-media {
  animation: audtheia-fadeInUp 0.8s ease both;
  animation-delay: 0.2s;
}

/* Detection GIF frame */
.gif-frame {
  display: flex;
  flex-direction: column;
}

.gif-wrap {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  background: var(--color-surface);
  /* Bioluminescent teal glow — marine monitoring aesthetic */
  box-shadow:
    0 0 0 1px var(--color-border-subtle),
    0 0 60px var(--color-glow-teal),
    0 0 120px rgba(0, 201, 167, 0.04);
}

/* Pulsing teal top bar — active monitoring / recording indicator */
.gif-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-teal);
  opacity: 0.85;
  z-index: 1;
  pointer-events: none;
  animation: audtheia-glowPulse 3s ease-in-out infinite;
}

.gif-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.gif-caption {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.gif-caption .mono {
  font-size: var(--text-xs);
}

.gif-caption-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* ── 12. ARCHITECTURE ──────────────────────────────────────────────────── */

/* Pipeline flow diagram */
.pipeline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-12) 0;
  overflow-x: auto;
  padding: var(--space-6) 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  flex-shrink: 0;
  min-width: 130px;
  transition: border-color var(--transition-fast);
}

.pipeline-node:hover {
  border-color: var(--color-teal);
}

/* Input/output nodes use a dashed border to distinguish from platform nodes */
.pipeline-node--io {
  background: transparent;
  border-style: dashed;
  border-color: var(--color-border);
}

.pipeline-node-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.08em;
}

.pipeline-node-name {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.pipeline-node-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.pipeline-connector {
  font-size: var(--text-xl);
  color: var(--color-teal);
  opacity: 0.35;
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
}

/* Platform detail cards — 4-column grid, collapsing responsively */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.platform-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color var(--transition-fast);
}

.platform-card:hover {
  border-color: var(--color-teal);
}

.platform-card-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.platform-index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

/* Platform name inherits serif from h3 base rule */
.platform-name {
  font-size: var(--text-2xl);
  line-height: 1;
  margin: 0;
}

/* Model ID / endpoint display — styled as a code block */
.platform-id {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  white-space: nowrap;
}

/* Override base code color — these IDs are metadata, not interactive data */
.platform-id code {
  font-family: inherit;
  font-size: inherit;
  color: var(--color-text-muted);
}

/* Body paragraph inside card — override base max-width */
.platform-card > p {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.65;
  max-width: none;
}

/* Specification list */
.platform-specs {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.platform-specs li {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  padding-left: var(--space-4);
  position: relative;
  line-height: 1.5;
}

.platform-specs li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-teal);
  opacity: 0.45;
}

/* code elements in specs inherit teal from base rule — correct */
.platform-specs code {
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}

/* Tag row — pushed to bottom of card by flex + margin-top: auto */
.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.platform-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* ── 13. INSTITUTIONS ──────────────────────────────────────────────────── */

/* Flex-wrap layout — items grow to fill available width */
.institution-grid {
  display: flex;
  flex-wrap: wrap;
  margin-top: var(--space-10);
}

.institution-item {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-border);
  transition: border-top-color var(--transition-fast),
              background var(--transition-fast);
}

.institution-item:hover {
  border-top-color: var(--color-teal);
  background: rgba(0, 201, 167, 0.025);
}

.institution-name {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

.institution-full {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
  display: block;
}

/* ── 14. PUBLICATION ───────────────────────────────────────────────────── */

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.pub-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.pub-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.doi-link {
  display: inline-block;
  transition: opacity var(--transition-fast);
}

.doi-link:hover {
  opacity: 0.72;
}

.doi-badge {
  height: 20px;
  width: auto;
  display: inline-block;
}

.pub-doi-string {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  margin-top: auto;
}

/* Manuscript topic — serif italic, non-hyperlinked */
.pub-manuscript-topic {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 400;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.35;
}

.pub-journal {
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  display: block;
  margin-top: auto;
}

/* Override base max-width inside pub cards */
.pub-desc {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.65;
  max-width: none;
}

/* GitHub repository link */
.github-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
  word-break: break-all;
}

.github-link:hover {
  color: var(--color-teal);
}

.github-link svg {
  flex-shrink: 0;
}

/* ── 15. RESPONSIVE — LANDING PAGE ────────────────────────────────────── */

@media (max-width: 900px) {
  /* Collapse to single column, GIF moves above text */
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-12));
    padding-bottom: var(--space-12);
    align-items: flex-start;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .hero-media {
    order: -1; /* GIF appears above text column on narrow layouts */
  }

  .hero-headline {
    font-size: var(--text-4xl);
  }

  /* Collapse stats to 2x2 */
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero-headline {
    font-size: var(--text-3xl);
  }

  /* Stack CTAs vertically on small screens */
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    justify-content: center;
    text-align: center;
  }

  /* Keep institutions in 2 columns on small screens */
  .institution-item {
    flex: 1 1 140px;
  }

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

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

/* Respect user motion preferences — disable all landing page animations */
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow,
  .hero-headline,
  .hero-body,
  .hero-stats,
  .hero-ctas,
  .hero-media {
    animation: none;
  }

  .gif-wrap::before {
    animation: none;
    opacity: 0.85;
  }
}


/* ── PATCH: Edit 5 — Pipeline node sub-text legibility ────────────────── */
/* Override the default --color-text-muted with --color-text-2, which is   */
/* readable against the dark node background without being overly bright.  */

.pipeline-node-sub {
  color: var(--color-text-2);
}

/* ── PATCH: Edit 6 — Platform ID: replace scrollbar with ellipsis ──────── */
/* Removes the horizontal scrollbar. Full text is accessible via the        */
/* native browser tooltip triggered by the title attribute on each element. */

.platform-id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── PATCH: Edit 11 — Institution items as anchor elements ─────────────── */
/* The .institution-item elements are now <a> tags. Reset link decoration   */
/* so they inherit the existing hover and border styles without underlines.  */

a.institution-item {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-border);
  transition: border-top-color var(--transition-fast),
              background var(--transition-fast);
}

a.institution-item:hover {
  border-top-color: var(--color-teal);
  background: rgba(0, 201, 167, 0.025);
}


/* ── PATCH 2a: Platform ID — override previous patch, enable expand toggle ── */
/* The previous patch set text-overflow on the .platform-id container.       */
/* This patch restructures it to use an inner wrapper so the toggle button   */
/* stays visible outside the scrollable area.                                */

.platform-id {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  /* Reset text-overflow from previous patch — now handled by .platform-id-inner */
  text-overflow: initial;
  white-space: initial;
}

/* Inner wrapper injected by landing.js around each <code> element */
.platform-id-inner {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  transition: overflow 0s;
}

.platform-id-inner code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Inherit font/color from .platform-id code base rule */
}

/* Expanded state — switch inner wrapper to scrollable */
.platform-id.expanded .platform-id-inner {
  overflow-x: auto;
  /* Hide scrollbar visually — scrolled via user drag */
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.platform-id.expanded .platform-id-inner code {
  overflow: initial;
  text-overflow: initial;
}

/* Toggle button — injected by landing.js */
.platform-id-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-teal);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1;
  cursor: pointer;
  padding: 0 var(--space-2);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.platform-id:hover .platform-id-toggle,
.platform-id.expanded .platform-id-toggle {
  opacity: 1;
}

/* ── PATCH 2b: Platform scroll carousel ────────────────────────────────── */

.psc-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-10);
}

/* Track — overflow hidden so no native scrollbar appears; JS scrolls it */
.psc-track {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  flex: 1;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbar across browsers */
  scrollbar-width: none;
}

.psc-track::-webkit-scrollbar {
  display: none;
}

/* Individual platform card */
.psc-card {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: border-color var(--transition-fast);
}

.psc-card:hover {
  border-color: var(--color-teal);
}

/* Badge — API key / Account / Free */
.psc-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.07em;
}

.psc-badge--key     { color: var(--color-teal); }
.psc-badge--account { color: var(--color-teal); }
.psc-badge--free    { color: var(--color-text-muted); }

/* Platform name — serif */
.psc-name {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

/* Description — sans, grows to fill remaining card height */
.psc-desc {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.55;
  flex: 1;
}

/* Link — pushed to bottom of card */
.psc-link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  margin-top: auto;
  transition: color var(--transition-fast);
}

.psc-link:hover {
  color: var(--color-teal);
}

/* Arrow buttons — left / right scroll controls */
.psc-arrow {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-2);
  font-size: var(--text-base);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.psc-arrow:hover {
  border-color: var(--color-teal);
  color: var(--color-teal);
}

/* Native [hidden] attribute support */
.psc-arrow[hidden] {
  display: none;
}

/* ── PATCH 2c: Responsive — carousel on small screens ──────────────────── */

@media (max-width: 600px) {
  .psc-card {
    flex: 0 0 180px;
  }
}


/* ── 16. DEMO PAGE ─────────────────────────────────────────────────────── */

/* Page-level heading override — tool pages are more restrained than hero  */
.demo-heading {
  font-size: var(--text-4xl);
  line-height: 1.18;
}

/* Intro block — limits line width for readability                          */
.demo-intro {
  margin-bottom: var(--space-10);
}

.demo-intro .section-intro {
  margin-top: var(--space-4);
}

/* Demo content — narrower max-width than the container, keeps tool focused */
.demo-content {
  max-width: 800px;
}

/* ── Drop zone ────────────────────────────────────────────────────────── */

.demo-drop-zone {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-16) var(--space-8);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  cursor: pointer;
  text-align: center;
  user-select: none;
  transition:
    border-color var(--transition-base),
    background  var(--transition-base),
    box-shadow  var(--transition-base);
}

.demo-drop-zone:hover,
.demo-drop-zone:focus-visible {
  border-color: var(--color-teal);
  background: var(--color-glow-teal);
  outline: none;
}

.demo-drop-zone.drag-over {
  border-color: var(--color-teal);
  background: var(--color-glow-teal);
  box-shadow: 0 0 0 1px var(--color-teal) inset;
}

.demo-drop-icon {
  color: var(--color-teal);
  opacity: 0.45;
  transition: opacity var(--transition-fast);
}

.demo-drop-zone:hover .demo-drop-icon,
.demo-drop-zone:focus-visible .demo-drop-icon,
.demo-drop-zone.drag-over .demo-drop-icon {
  opacity: 1;
}

.demo-drop-headline {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
}

.demo-drop-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
}

/* ── Preview section ──────────────────────────────────────────────────── */

.demo-preview-section {
  margin-top: var(--space-8);
}

/* Wrapper that stacks the image and canvas overlay */
.demo-image-frame {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  /* teal glow echoes the hero GIF frame */
  box-shadow:
    0 0 0 1px var(--color-border-subtle),
    0 0 40px rgba(0, 201, 167, 0.07);
  /* Remove inline-block gap under the img */
  line-height: 0;
}

.demo-preview-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Canvas lives in the same stacking context — pointer-events: none so the
   user can still interact with elements below it.
   Width and height are set exclusively by syncCanvas() in demo.js —
   no CSS dimensions here to avoid conflicting with the bitmap attributes.  */
#demo-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* ── Action buttons ───────────────────────────────────────────────────── */

.demo-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

/* ── Status messages ──────────────────────────────────────────────────── */

.demo-status {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-2);
}

.demo-status a {
  color: var(--color-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition-fast);
}

.demo-status a:hover {
  opacity: 0.75;
}

/* Loading — neutral, spinner-aligned                                       */
.demo-status--loading {
  align-items: center;
  border-color: var(--color-border);
  color: var(--color-text-2);
}

/* Error — warm red tint                                                    */
.demo-status--error {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.05);
  color: #f87171;
}

.demo-status--error a {
  color: #f87171;
}

/* Info — cool blue tint                                                    */
.demo-status--info {
  border-color: rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.04);
  color: var(--color-text-2);
}

.demo-status-text {
  flex: 1;
}

/* ── Spinner ──────────────────────────────────────────────────────────── */

.demo-spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-teal);
  border-radius: 50%;
  animation: demo-spin 0.65s linear infinite;
}

@keyframes demo-spin {
  to { transform: rotate(360deg); }
}

/* ── Results section ──────────────────────────────────────────────────── */

.demo-results-section {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.demo-results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.demo-results-count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.demo-results-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Each detection row: index | species name | confidence                    */
.demo-result-item {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}

.demo-result-item:hover {
  border-color: var(--color-teal);
}

.demo-result-index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Scientific name rendered in serif italic — matches Audtheia's data tone  */
.demo-result-species {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-base);
  color: var(--color-text);
}

.demo-result-confidence {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-teal);
  letter-spacing: 0.02em;
}

/* ── Info callout ─────────────────────────────────────────────────────── */

.demo-callout {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding: var(--space-5);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.demo-callout-marker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-teal);
  flex-shrink: 0;
  opacity: 0.45;
  margin-top: 5px;
}

.demo-callout-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.7;
  letter-spacing: 0.01em;
  max-width: none;
}

.demo-callout-text a {
  color: var(--color-text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.demo-callout-text a:hover {
  color: var(--color-teal);
}

/* ── Responsive — Demo page ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .demo-heading {
    font-size: var(--text-3xl);
  }

  .demo-drop-zone {
    padding: var(--space-12) var(--space-6);
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .demo-drop-zone {
    padding: var(--space-10) var(--space-4);
    min-height: 180px;
    gap: var(--space-3);
  }

  .demo-drop-headline {
    font-size: var(--text-base);
  }

  /* Stack action buttons vertically on very small screens */
  .demo-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-actions .btn {
    justify-content: center;
    text-align: center;
  }

  /* Result rows: 2-column on narrow screens — index + species on line 1,
     confidence on line 2 beneath species                                   */
  .demo-result-item {
    grid-template-columns: 2rem 1fr;
    grid-template-rows: auto auto;
    row-gap: var(--space-1);
  }

  .demo-result-confidence {
    grid-column: 2;
  }
}

/* Respect reduced-motion preference — disable spinner animation             */
@media (prefers-reduced-motion: reduce) {
  .demo-spinner {
    animation: none;
    border-top-color: var(--color-teal);
    opacity: 0.6;
  }
}


/* ── 17. DASHBOARD PAGE ────────────────────────────────────────────────── */

/* ── Page layout ──────────────────────────────────────────────────────── */

/* First section accounts for the fixed nav height */
.dash-settings-section {
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-16);
}

.dash-data-section {
  padding-top: var(--space-16);
}

.dash-section-intro {
  max-width: 720px;
  margin-bottom: var(--space-10);
}

.dash-section-heading {
  margin-top: var(--space-3);
}

/* Full-width rule that visually divides Settings from Dashboard */
.dash-separator {
  height: 1px;
  background: var(--color-border);
  max-width: calc(var(--container-max) - (var(--container-pad) * 2));
  margin: 0 auto;
}

/* ── Privacy notice ───────────────────────────────────────────────────── */

.settings-privacy {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  max-width: 720px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-teal);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
}

.settings-privacy-icon {
  flex-shrink: 0;
  color: var(--color-teal);
  opacity: 0.7;
  margin-top: 1px;
}

.settings-privacy p {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-2);
  line-height: 1.75;
  letter-spacing: 0.01em;
  max-width: none;
}

/* ── Settings form ────────────────────────────────────────────────────── */

.settings-form {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

/* Grouped credential block */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.settings-group-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* Individual field row */
.settings-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.settings-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-2);
  letter-spacing: 0.06em;
}

.settings-input {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text);
  width: 100%;
  transition:
    border-color var(--transition-fast),
    box-shadow   var(--transition-fast);
  /* Prevent browser from overriding colors on autofill */
  -webkit-text-fill-color: var(--color-text);
}

.settings-input:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px var(--color-glow-teal);
}

.settings-input::placeholder {
  color: var(--color-text-muted);
  -webkit-text-fill-color: var(--color-text-muted);
}

/* Counteract browser autofill background injection */
.settings-input:-webkit-autofill,
.settings-input:-webkit-autofill:hover,
.settings-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--color-bg) inset;
  -webkit-text-fill-color: var(--color-text);
  transition: background-color 5000s ease-in-out 0s;
}

.settings-hint {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

/* code inside hint inherits mono; override teal color to stay muted */
.settings-hint code {
  font-family: inherit;
  font-size: inherit;
  color: var(--color-text-2);
}

/* ── Settings actions ─────────────────────────────────────────────────── */

.settings-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

/* ── Settings confirmation message ───────────────────────────────────── */

.settings-msg {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.settings-msg--success {
  background: rgba(0, 201, 167, 0.07);
  border: 1px solid rgba(0, 201, 167, 0.25);
  color: var(--color-teal);
}

.settings-msg--error {
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #f87171;
}

/* ── No-credentials state ─────────────────────────────────────────────── */

.dash-no-creds {
  padding: var(--space-20) 0;
  display: flex;
  justify-content: flex-start;
}

.dash-no-creds-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-10) var(--space-12);
  max-width: 500px;
}

.dash-no-creds-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dash-no-creds-inner p {
  font-size: var(--text-base);
  color: var(--color-text-2);
  max-width: none;
  line-height: 1.65;
}

/* ── Loading skeletons ────────────────────────────────────────────────── */

@keyframes dash-pulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.9;  }
}

.dash-skeleton {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 180px;
  animation: dash-pulse 1.7s ease-in-out infinite;
}

.dash-skeleton-line {
  height: 11px;
  background: var(--color-border);
  border-radius: 2px;
}

.dash-skeleton-line--mid   { width: 65%; }
.dash-skeleton-line--short { width: 38%; }

/* ── Inline error + empty states ──────────────────────────────────────── */

.dash-inline-error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  background: rgba(248, 113, 113, 0.05);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: #f87171;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.dash-inline-error-icon {
  flex-shrink: 0;
  font-size: var(--text-base);
  line-height: 1.3;
}

.dash-empty {
  padding: var(--space-16) var(--space-8);
  text-align: center;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.dash-empty-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* Truncation notice — shown when a table has more than 1,000 records */
.dash-truncation-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  padding: var(--space-5) 0;
  text-align: center;
  border-top: 1px solid var(--color-border-subtle);
  margin-top: var(--space-6);
  max-width: none;
}

/* ── Dashboard tabs ───────────────────────────────────────────────────── */

.dash-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-10);
  overflow-x: auto;
  scrollbar-width: none;
}

.dash-tabs::-webkit-scrollbar { display: none; }

.dash-tab {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-6);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
  transition:
    color        var(--transition-fast),
    border-color var(--transition-fast);
}

.dash-tab:hover {
  color: var(--color-text-2);
}

.dash-tab.active {
  color: var(--color-teal);
  border-bottom-color: var(--color-teal);
}

/* ── Load more button area ────────────────────────────────────────────── */

.dash-load-more {
  display: flex;
  justify-content: center;
  padding: var(--space-10) 0;
  margin-top: var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
}

/* ── Field value type classes ─────────────────────────────────────────── */

/* Used by renderFieldValue() for specific data types */
.field-null {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.field-num {
  font-family: var(--font-mono);
  color: var(--color-teal);
}

.field-bool--true  {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
}

.field-bool--false {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.field-link {
  color: var(--color-teal);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
  transition: opacity var(--transition-fast);
}

.field-link:hover { opacity: 0.72; }

.field-obj {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  word-break: break-all;
}

.field-sep {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

/* ── Species Observation cards ────────────────────────────────────────── */

/* Responsive card grid — min 340px per card, collapses to 1 col on mobile */
.obs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-6);
}

.obs-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  transition: border-color var(--transition-fast);
}

.obs-card:hover {
  border-color: var(--color-teal);
}

.obs-card-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* Airtable record ID */
.obs-record-id {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* Species name — serif italic, data-forward heading */
.obs-species-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.25;
}

/* Two-column field grid within each card */
.obs-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-4);
}

.obs-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.obs-field-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.obs-field-value {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.45;
  word-break: break-word;
}

/* ── Expand toggle ────────────────────────────────────────────────────── */

.obs-expand-wrap {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.obs-expand-section {
  padding-top: var(--space-3);
}

.obs-expand-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color var(--transition-fast);
}

.obs-expand-toggle:hover {
  color: var(--color-teal);
}

.obs-expand-toggle svg {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.obs-expand-toggle--open svg {
  transform: rotate(180deg);
}

/* Text label inside the expand toggle — inherits font/color from the button */
.obs-expand-label {
  line-height: 1;
}

/* ── Environmental Mapping cards ──────────────────────────────────────── */

/* Mapping cards stack vertically — each card is wide */
.map-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.map-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  transition: border-color var(--transition-fast);
}

.map-card:hover {
  border-color: var(--color-teal);
}

.map-card-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* Three satellite image columns */
.map-img-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.map-img-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.map-img-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.07em;
}

/* Images from pre-generated Mapbox URLs stored in Airtable */
.map-img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  object-fit: cover;
  transition: opacity var(--transition-fast);
}

.map-img:hover { opacity: 0.82; }

.map-img-placeholder {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.map-img-na {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: var(--space-8) var(--space-4);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Metadata grid below the satellite images */
.map-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3) var(--space-6);
}

/* ── Daily Reports ────────────────────────────────────────────────────── */

.reports-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  transition: border-color var(--transition-fast);
}

.report-row:hover { border-color: var(--color-teal); }

.report-row-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.report-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--color-text);
  line-height: 1.3;
}

.report-date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.report-download {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.report-no-url {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* ── Responsive — Dashboard ───────────────────────────────────────────── */

@media (max-width: 900px) {
  .map-img-row {
    gap: var(--space-4);
  }
}

@media (max-width: 768px) {
  .dash-settings-section {
    padding-top: calc(var(--nav-height) + var(--space-10));
  }

  .dash-no-creds-inner {
    padding: var(--space-8);
    max-width: none;
  }

  .settings-group {
    padding: var(--space-5);
  }

  /* Collapse species cards to single column */
  .obs-grid {
    grid-template-columns: 1fr;
  }

  /* Collapse field grid to single column on small screens */
  .obs-field-grid {
    grid-template-columns: 1fr;
  }

  /* Stack satellite images vertically */
  .map-img-row {
    grid-template-columns: 1fr;
  }

  .map-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .dash-tab {
    padding: var(--space-3) var(--space-4);
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .map-meta-grid {
    grid-template-columns: 1fr;
  }

  /* Stack report rows vertically on very narrow screens */
  .report-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-actions .btn {
    justify-content: center;
    text-align: center;
  }
}

/* Disable skeleton pulse for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dash-skeleton {
    animation: none;
    opacity: 0.55;
  }
}

/* ── PATCH 17A: Dashboard UI refinements ──────────────────────────────── */

/* ── Subtle atmospheric teal glow on the data section background ──────── */
.dash-data-section {
  background: radial-gradient(
    ellipse at 55% 0%,
    rgba(0, 201, 167, 0.045) 0%,
    transparent 55%
  );
}

/* ── Settings form — 2-column side-by-side on desktop ────────────────── */
/* The two groups (Credentials + Table IDs) sit next to each other.       */
/* Save button and confirmation message span the full width below them.   */
@media (min-width: 769px) {
  .settings-privacy {
    max-width: 960px;
  }

  .settings-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 960px;
    gap: var(--space-6);
    align-items: start;
  }

  .settings-actions,
  .settings-msg {
    grid-column: 1 / -1;
  }
}

/* ── Card visual depth — subtle shadow + enhanced hover glow ──────────── */
.obs-card {
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.obs-card:hover {
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 201, 167, 0.2);
}

/* ── Card header: record ID and observation time on the same line ─────── */
.obs-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

/* Formatted observation time — top-right of card header */
.obs-time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ── Stat chips row ───────────────────────────────────────────────────── */
/* Four key values displayed as a compact horizontal block below the       */
/* species name. The dark bg against the card creates a clear visual step. */

.obs-stats-row {
  display: flex;
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.obs-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--color-border-subtle);
  min-width: 0;
}

.obs-stat:last-child {
  border-right: none;
}

.obs-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.obs-stat-value {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Numeric stat value — teal monospace, slightly larger for emphasis */
.obs-stat-num {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--color-teal);
  font-weight: 500;
}

/* Null / missing stat value */
.obs-stat-null {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

/* ── Expand section — single-column definition list ──────────────────── */
/* Replaces the 2-column .obs-field-grid inside species cards.             */
/* A key:value list reads far better for long-text fields like taxonomy    */
/* strings and rarity reasoning paragraphs.                                */

.obs-expand-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.obs-expand-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-4);
  align-items: baseline;
}

.obs-expand-key {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.5;
  word-break: break-word;
}

.obs-expand-val {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.7;
  word-break: break-word;
  margin: 0; /* reset browser <dd> default margin */
}

/* Reset browser defaults on dl/dt/dd within the list */
.obs-expand-list dt,
.obs-expand-list dd {
  margin: 0;
  padding: 0;
}

/* ── Responsive — new species card components ─────────────────────────── */

/* Stat chips: 2×2 grid on small screens */
@media (max-width: 480px) {
  .obs-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .obs-stat {
    border-right: none;
    border-bottom: 1px solid var(--color-border-subtle);
  }

  /* Right column chips get a left border */
  .obs-stat:nth-child(even) {
    border-left: 1px solid var(--color-border-subtle);
  }

  /* Remove bottom border from the last row (chips 3 and 4) */
  .obs-stat:nth-last-child(-n+2) {
    border-bottom: none;
  }

  /* Expand list: stack key above value on very narrow screens */
  .obs-expand-item {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
}

/* Restore settings form to single column on mobile */
@media (max-width: 768px) {
  .settings-form {
    display: flex;
    flex-direction: column;
    max-width: 720px;
    gap: var(--space-8);
  }

  .settings-privacy {
    max-width: 720px;
  }
}

/* ── PATCH 17B: Dashboard UI pass 2 ───────────────────────────────────── */

/* ── Fix 1: Settings groups equal height ──────────────────────────────── */
/* align-items: start (previous patch) made each group its own height.     */
/* stretch forces both columns to match the taller one.                    */
@media (min-width: 769px) {
  .settings-form {
    align-items: stretch;
  }
}

/* ── Fix 2: Hint text legibility ──────────────────────────────────────── */
/* Previous color was --color-text-muted (#3d6278), nearly invisible       */
/* against the dark surface. Raised to --color-text-2 and larger size.    */
.settings-hint {
  color: var(--color-text-2);
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* Inline code in hints: teal to highlight values users need to type/copy */
.settings-hint code {
  color: var(--color-teal);
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* Bold text in hints (e.g. "Builder Hub") — slightly brighter */
.settings-hint strong {
  color: var(--color-text);
  font-weight: 500;
}

/* ── Fix 3: Dashboard mobile section gap ─────────────────────────────── */
@media (max-width: 768px) {
  .dash-settings-section {
    padding-bottom: var(--space-8);
  }

  .dash-data-section {
    padding-top: var(--space-8);
  }
}

/* ── Fix 4: Home page pipeline gap on mobile ─────────────────────────── */
/* The architecture section pipeline had var(--space-12) vertical margin   */
/* which creates a large empty gap on narrow screens.                      */
@media (max-width: 768px) {
  .pipeline {
    margin: var(--space-6) 0;
    padding: var(--space-3) 0;
  }
}

/* ── Species Observations — full-width horizontal list rows ───────────── */
/*
 * Replaces the previous card grid (.obs-grid) entirely.
 * Each observation is a full-width row with:
 *   left:   species name + date/ID
 *   center: 4 stat chips (Rarity, Abundance, Invasive, Count)
 *   right:  expand/collapse chevron
 * Clicking any part of the header toggles the detail section inline.
 * A Collapse button at the bottom of the detail lets users close
 * without scrolling back up to the header.
 */

.obs-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ── Row container ────────────────────────────────────────────────────── */
.obs-row {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  transition:
    border-color var(--transition-fast),
    box-shadow   var(--transition-fast);
}

.obs-row:hover {
  border-color: rgba(0, 201, 167, 0.35);
}

/* Teal border + enhanced shadow when row is open */
.obs-row--open {
  border-color: var(--color-teal);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 201, 167, 0.12);
}

/* ── Clickable row header ─────────────────────────────────────────────── */
.obs-row-header {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-6);
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.obs-row-header:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: -2px;
  border-radius: var(--radius-md);
}

/* Left: species name + date and record ID below */
.obs-row-info {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* Species name is the primary heading — slightly smaller than card context */
.obs-row .obs-species-name {
  font-size: var(--text-lg);
  line-height: 1.3;
  overflow-wrap: anywhere;
  margin: 0;
}

/* Date and record ID in a small muted row below the name */
.obs-row-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Center: stat chips — reuses obs-stats-row base layout */
/* flex-shrink: 0 keeps chips from being squeezed by a long name */
.obs-row-stats {
  flex-shrink: 0;
}

/* Compact chip sizing for the list context — more padding would waste space */
.obs-row .obs-stat {
  padding: var(--space-2) var(--space-4);
  min-width: 72px;
}

/* No truncation in the list — the full row width gives chips room to breathe */
.obs-row .obs-stat-value {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.obs-row .obs-stat-label {
  white-space: nowrap;
}

/* Chevron — rotates 180° when the row is open */
.obs-row-chevron {
  flex-shrink: 0;
  color: var(--color-teal);
  opacity: 0.45;
  transition:
    transform var(--transition-fast),
    opacity   var(--transition-fast);
}

.obs-row--open .obs-row-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* ── Expand body ──────────────────────────────────────────────────────── */
.obs-row-body {
  border-top: 1px solid var(--color-border-subtle);
  padding: var(--space-6) var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  /* Slightly darker tint than the card — creates clear visual separation */
  background: rgba(7, 9, 15, 0.35);
}

/* ── Collapse button (bottom of body) ────────────────────────────────── */
.obs-row-collapse-wrap {
  display: flex;
  justify-content: flex-start;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.obs-row-collapse-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color var(--transition-fast);
}

.obs-row-collapse-btn:hover {
  color: var(--color-teal);
}

/* ── Responsive — obs-row ─────────────────────────────────────────────── */

/* On tablet/mobile: stat chips wrap below the name */
@media (max-width: 768px) {
  .obs-row-header {
    flex-wrap: wrap;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-4);
  }

  /* Chevron stays right of the name, stats go full-width below */
  .obs-row-info {
    flex: 1 1 auto;
  }

  .obs-row-stats {
    flex: 1 1 100%;
    order: 3;
  }

  .obs-row-chevron {
    order: 2;
    align-self: flex-start;
    margin-top: var(--space-1);
  }

  .obs-row-body {
    padding: var(--space-4);
  }
}

/* Very narrow: 2x2 stat chip grid to avoid horizontal overflow */
@media (max-width: 480px) {
  .obs-row .obs-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  /* Reset flex borders, use grid borders */
  .obs-row .obs-stat {
    border-right: none;
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .obs-row .obs-stat:nth-child(even) {
    border-left: 1px solid var(--color-border-subtle);
  }

  .obs-row .obs-stat:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

/* ── PATCH 17C: Row visibility + stat label truncation ─────────────────── */

/* Fix 1: Rows starting open
 *
 * CSS display: flex on .obs-row-body overrides the HTML [hidden] attribute's
 * implicit display: none. The [hidden] attribute only works when no CSS
 * display property is set on the element. Adding !important restores the
 * correct behavior so rows start collapsed.
 *
 * The same rule is applied to other JS-controlled hidden elements as a
 * safeguard against any future display property conflicts.
 */
.obs-row-body[hidden],
.obs-expand-section[hidden],
#dash-no-creds[hidden],
#dash-content[hidden],
#species-load-more[hidden],
.dash-panel[hidden] {
  display: none !important;
}

/* Fix 2: Stat label truncation (ABUNDA... / INVASI...)
 *
 * The chips currently use flex: 1 which divides the container evenly and
 * makes each chip narrower than the longest label. Switching to
 * flex: 0 0 auto lets each chip size to its own content width so
 * "ABUNDANCE" and "INVASIVE" display in full without ellipsis.
 */
.obs-row .obs-stat {
  flex: 0 0 auto;
}

.obs-row .obs-stat-label {
  overflow: visible;
  text-overflow: clip;
}

/* ── SECTION 18: SETUP PAGE ─────────────────────────────────── */

/* 18.1 — Hero ───────────────────────────────────────────────── */

.setup-hero {
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-12);
}

.setup-hero h1 {
  font-size: var(--text-5xl);
  max-width: 20ch;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

/* 18.2 — Pipeline Overview ──────────────────────────────────── */

.setup-pipeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: var(--space-10);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.setup-pipeline-step {
  flex: 1;
  min-width: 148px;
}

.setup-pipeline-node {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  position: relative;
}

.setup-pipeline-node::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-teal);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0.5;
}

.setup-pipeline-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: var(--space-1);
}

.setup-pipeline-name {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  display: block;
  margin-bottom: var(--space-2);
}

.setup-pipeline-desc {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.setup-pipeline-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 26px;
  flex-shrink: 0;
  width: 36px;
  color: var(--color-border);
}

.setup-pipeline-connector svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 18.3 — Page Layout ────────────────────────────────────────── */

.setup-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  align-items: start;
}

/* 18.4 — Sidebar ────────────────────────────────────────────── */

.setup-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
  padding: 0 var(--space-6) var(--space-8) 0;
  max-height: calc(100vh - var(--nav-height) - var(--space-16));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.setup-sidebar::-webkit-scrollbar {
  width: 4px;
}

.setup-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.setup-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.setup-sidebar-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
}

.setup-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.setup-progress-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: background var(--transition-fast),
              border-color var(--transition-fast);
  text-decoration: none;
}

.setup-progress-item:hover {
  background: var(--color-surface);
  border-left-color: var(--color-border);
}

.setup-progress-item.is-active {
  background: var(--color-glow-teal);
  border-left-color: var(--color-teal);
}

.progress-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  min-width: 20px;
  transition: color var(--transition-fast);
}

.setup-progress-item.is-active .progress-number {
  color: var(--color-teal);
}

.progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
  margin-left: 7px;
  transition: background var(--transition-fast);
}

.setup-progress-item.is-active .progress-dot {
  background: var(--color-teal);
}

.progress-text {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  transition: color var(--transition-fast);
}

.setup-progress-item.is-active .progress-text {
  color: var(--color-text);
}

.setup-progress-divider {
  height: 1px;
  background: var(--color-border-subtle);
  margin: var(--space-2) var(--space-3);
}

/* 18.5 — Main Content ───────────────────────────────────────── */

.setup-content {
  padding: var(--space-8) 0 var(--space-32) var(--space-8);
  min-width: 0;
}

/* 18.6 — Prerequisites ──────────────────────────────────────── */

.setup-prereqs {
  margin-bottom: var(--space-10);
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
}

.setup-prereqs > h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.setup-prereqs > p {
  margin-bottom: var(--space-6);
}

.prereq-group {
  margin-bottom: var(--space-6);
}

.prereq-group-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.prereq-group-desc {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  margin-bottom: var(--space-3);
  max-width: 68ch;
}

.prereq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.prereq-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.6;
}

.prereq-item::before {
  content: '\2014';
  font-family: var(--font-mono);
  color: var(--color-teal);
  flex-shrink: 0;
}

/* 18.7 — Credentials Checklist Table ────────────────────────── */

.cred-checklist {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.cred-checklist-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.cred-table-wrap {
  overflow-x: auto;
}

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

.cred-table th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.cred-table td {
  font-family: var(--font-sans);
  color: var(--color-text-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: top;
  line-height: 1.5;
}

.cred-table tr:last-child td {
  border-bottom: none;
}

.cred-table td:first-child {
  font-weight: 500;
  color: var(--color-text);
}

.cred-table td a,
.setup-doc-links a,
.setup-section-body a,
.trouble-answer a,
.setup-help a:not(.btn) {
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cred-table td a:hover,
.setup-doc-links a:hover,
.setup-section-body a:not(.btn):hover,
.trouble-answer a:hover,
.setup-help a:not(.btn):hover {
  color: var(--color-teal);
}

/* 18.8 — Platform Sections (collapsible) ────────────────────── */

.setup-section {
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
}

.setup-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  gap: var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.setup-section-header:hover {
  background: var(--color-surface-2);
}

.setup-section-meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}

.setup-section-num {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  color: var(--color-teal);
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.65;
}

.setup-section-title-group {
  min-width: 0;
}

.setup-section-title-group h2 {
  font-size: var(--text-xl);
  margin: 0;
}

.setup-section-title-group p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: var(--space-1) 0 0;
  max-width: none;
}

.setup-section-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  flex-shrink: 0;
  transition: color var(--transition-fast),
              border-color var(--transition-fast),
              background var(--transition-fast);
  cursor: pointer;
}

.setup-section-toggle:hover {
  color: var(--color-text-2);
  border-color: var(--color-text-muted);
  background: var(--color-surface-2);
}

.toggle-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
}

.toggle-icon svg {
  width: 12px;
  height: 12px;
}

.setup-section-toggle[aria-expanded="false"] .toggle-icon {
  transform: rotate(180deg);
}

.setup-section-body {
  padding: var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-border);
}

.setup-section-body.is-collapsed {
  display: none !important;
}

.setup-section-intro {
  font-size: var(--text-base);
  color: var(--color-text-2);
  max-width: 72ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

/* 18.9 — Steps ──────────────────────────────────────────────── */

.setup-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.setup-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.setup-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  flex-shrink: 0;
  margin-top: 3px;
}

.setup-step-content {
  min-width: 0;
}

.setup-step-content h4 {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.setup-step-content p,
.setup-step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  max-width: 72ch;
  margin-bottom: var(--space-3);
  line-height: 1.6;
}

.setup-step-content p:last-child,
.setup-step-desc:last-child {
  margin-bottom: 0;
}

.setup-step-content ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
  margin-bottom: var(--space-3);
  padding-left: var(--space-4);
}

.setup-step-content li {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  list-style: disc;
  list-style-position: outside;
  line-height: 1.6;
}

.setup-step-content li::marker {
  color: var(--color-teal);
}

.setup-step-table {
  margin-top: var(--space-3);
}

/* 18.10 — Code Blocks ───────────────────────────────────────── */

.code-block {
  margin: var(--space-4) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.code-block-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: color var(--transition-fast),
              border-color var(--transition-fast),
              background var(--transition-fast);
}

.copy-btn:hover {
  color: var(--color-teal);
  border-color: var(--color-teal);
  background: var(--color-glow-teal);
}

.copy-btn.copied {
  color: var(--color-teal);
  border-color: var(--color-teal);
  background: var(--color-glow-teal);
  cursor: default;
}

.code-block-body {
  padding: var(--space-4) var(--space-5);
  overflow-x: auto;
}

.code-block-body pre {
  margin: 0;
}

.code-block-body code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.7;
  white-space: pre;
}

/* Inline code within setup content */
.setup-step-content code,
.setup-section-intro code,
.setup-note code,
.setup-section-body > p code,
.trouble-answer code,
.setup-prereqs code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--color-teal);
  background: var(--color-glow-teal);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

/* 18.11 — Notes / Callouts ──────────────────────────────────── */

.setup-note {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
  color: var(--color-text-2);
}

.setup-note p {
  max-width: none;
  font-size: inherit;
  margin: 0;
  color: inherit;
  line-height: 1.6;
}

.setup-note p + p {
  margin-top: var(--space-2);
}

.setup-note--info {
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.04);
}

.setup-note--warn {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.04);
}

.setup-note-icon {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  flex-shrink: 0;
  padding-top: 2px;
  letter-spacing: 0.06em;
}

.setup-note--info .setup-note-icon {
  color: var(--color-blue);
}

.setup-note--warn .setup-note-icon {
  color: #f59e0b;
}

/* 18.12 — Option Cards ──────────────────────────────────────── */

.option-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.option-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  background: var(--color-glow-teal);
  border: 1px solid rgba(0, 201, 167, 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.option-body h5 {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.option-body p {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  max-width: none;
  margin: 0;
  line-height: 1.6;
}

/* 18.13 — Schema Tables ─────────────────────────────────────── */

.schema-wrap {
  margin: var(--space-6) 0 0;
}

.schema-category {
  margin-bottom: var(--space-5);
}

.schema-category h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--color-teal);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border-subtle);
}

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

.schema-table th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.schema-table td {
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-2);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: top;
  line-height: 1.5;
}

.schema-table tr:last-child td {
  border-bottom: none;
}

.schema-table td:first-child {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text);
  white-space: nowrap;
}

.schema-table td:nth-child(2) {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* 18.14 — Sub-sections within platform sections ─────────────── */

.setup-subsection {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border-subtle);
}

.setup-subsection h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.setup-doc-links {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  margin-top: var(--space-4);
}

.setup-footnote {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  margin-top: var(--space-4);
  max-width: 68ch;
  line-height: 1.6;
}

/* 18.15 — Troubleshooting ───────────────────────────────────── */

.setup-troubleshoot {
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
  margin-top: var(--space-10);
}

.setup-troubleshoot > h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}

.trouble-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.trouble-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.trouble-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  gap: var(--space-4);
  text-align: left;
  transition: background var(--transition-fast);
}

.trouble-question:hover {
  background: var(--color-surface-2);
}

.trouble-question-icon {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  flex-shrink: 0;
  line-height: 1;
  transition: transform var(--transition-base), color var(--transition-fast);
}

.trouble-item.is-open .trouble-question-icon {
  transform: rotate(45deg);
  color: var(--color-teal);
}

.trouble-answer {
  display: none;
  padding: var(--space-5) var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-2);
}

.trouble-answer.is-open {
  display: block;
}

.trouble-answer p {
  max-width: 72ch;
  font-size: inherit;
  color: inherit;
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.trouble-answer p:last-child {
  margin-bottom: 0;
}

.trouble-answer ol {
  padding-left: var(--space-5);
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.trouble-answer li {
  list-style: decimal;
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.6;
}

/* 18.16 — Getting Help ──────────────────────────────────────── */

.setup-help {
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
  margin-top: var(--space-10);
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.setup-help > h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.setup-help > p {
  margin-bottom: var(--space-4);
  max-width: 68ch;
}

.help-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

.setup-help-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-6);
  margin-bottom: 0;
}

/* 18.17 — Responsive: ≤960px ────────────────────────────────── */

@media (max-width: 960px) {
  .setup-layout {
    grid-template-columns: 1fr;
  }

  .setup-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 0 0 var(--space-6) 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-8);
  }

  .setup-progress {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .setup-progress-item {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: var(--space-1) var(--space-2);
  }

  .setup-progress-item:hover {
    background: var(--color-surface);
    border-left-color: transparent;
    border-bottom-color: var(--color-border);
  }

  .setup-progress-item.is-active {
    background: var(--color-glow-teal);
    border-left-color: transparent;
    border-bottom-color: var(--color-teal);
  }

  .setup-progress-divider {
    display: none;
  }

  .setup-content {
    padding: 0 0 var(--space-16) 0;
  }
}

/* 18.18 — Responsive: ≤640px ────────────────────────────────── */

@media (max-width: 640px) {
  .setup-hero h1 {
    font-size: var(--text-4xl);
  }

  .setup-pipeline {
    flex-direction: column;
    align-items: stretch;
  }

  .setup-pipeline-connector {
    width: auto;
    padding: var(--space-1) 0;
    justify-content: center;
    transform: rotate(90deg);
    height: 24px;
  }

  .setup-section-header {
    padding: var(--space-4);
  }

  .setup-section-num {
    font-size: var(--text-xl);
  }

  .setup-section-body {
    padding: var(--space-6) var(--space-4);
  }

  .setup-step {
    grid-template-columns: 28px 1fr;
    gap: var(--space-3);
  }

  .setup-help {
    padding: var(--space-6) var(--space-4);
  }

  .cred-table th,
  .cred-table td {
    font-size: var(--text-xs);
    padding: var(--space-2);
  }

  .schema-table th,
  .schema-table td {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
  }

  .option-item {
    flex-direction: column;
    gap: var(--space-2);
  }
}

/* ── SECTION 18: SETUP PAGE ─────────────────────────────────── */

/* 18.1 — Hero ───────────────────────────────────────────────── */

.setup-hero {
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-12);
}

.setup-hero h1 {
  font-size: var(--text-5xl);
  max-width: 20ch;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

/* 18.2 — Pipeline Overview ──────────────────────────────────── */

.setup-pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: var(--space-10);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.setup-pipeline-step {
  flex: 1;
  min-width: 148px;
  display: flex;
  flex-direction: column;
}

.setup-pipeline-node {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.setup-pipeline-node::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-teal);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0.5;
}

.setup-pipeline-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: var(--space-1);
}

.setup-pipeline-name {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  display: block;
  margin-bottom: var(--space-2);
}

.setup-pipeline-desc {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-text-2);
  line-height: 1.5;
}

.setup-pipeline-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  color: var(--color-border);
}

.setup-pipeline-connector svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 18.3 — Page Layout ────────────────────────────────────────── */

.setup-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  align-items: start;
}

/* 18.4 — Sidebar ────────────────────────────────────────────── */

.setup-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
  padding: 0 var(--space-6) var(--space-8) 0;
  max-height: calc(100vh - var(--nav-height) - var(--space-16));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.setup-sidebar::-webkit-scrollbar {
  width: 4px;
}

.setup-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.setup-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.setup-sidebar-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--color-text-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
}

.setup-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.setup-progress-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: background var(--transition-fast),
              border-color var(--transition-fast);
  text-decoration: none;
}

.setup-progress-item:hover {
  background: var(--color-surface);
  border-left-color: var(--color-border);
}

.setup-progress-item.is-active {
  background: var(--color-glow-teal);
  border-left-color: var(--color-teal);
}

.progress-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-2);
  min-width: 20px;
  transition: color var(--transition-fast);
}

.setup-progress-item.is-active .progress-number {
  color: var(--color-teal);
}

.progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
  margin-left: 7px;
  transition: background var(--transition-fast);
}

.setup-progress-item.is-active .progress-dot {
  background: var(--color-teal);
}

.progress-text {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  transition: color var(--transition-fast);
}

.setup-progress-item.is-active .progress-text {
  color: var(--color-text);
}

.setup-progress-divider {
  height: 1px;
  background: var(--color-border-subtle);
  margin: var(--space-2) var(--space-3);
}

/* 18.5 — Main Content ───────────────────────────────────────── */

.setup-content {
  padding: var(--space-8) 0 var(--space-32) var(--space-8);
  min-width: 0;
}

/* 18.6 — Prerequisites ──────────────────────────────────────── */

.setup-prereqs {
  margin-bottom: var(--space-10);
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
}

.setup-prereqs > h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.setup-prereqs > p {
  margin-bottom: var(--space-6);
}

.prereq-group {
  margin-bottom: var(--space-6);
}

.prereq-group-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.prereq-group-desc {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  margin-bottom: var(--space-3);
  max-width: 68ch;
}

.prereq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.prereq-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.6;
}

.prereq-item::before {
  content: '\2014';
  font-family: var(--font-mono);
  color: var(--color-teal);
  flex-shrink: 0;
}

/* 18.7 — Credentials Checklist Table ────────────────────────── */

.cred-checklist {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.cred-checklist-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.cred-table-wrap {
  overflow-x: auto;
}

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

.cred-table th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--color-text-2);
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.cred-table td {
  font-family: var(--font-sans);
  color: var(--color-text-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: top;
  line-height: 1.5;
}

.cred-table tr:last-child td {
  border-bottom: none;
}

.cred-table td:first-child {
  font-weight: 500;
  color: var(--color-text);
}

.cred-table td a,
.setup-doc-links a,
.setup-section-body a,
.trouble-answer a,
.setup-help a:not(.btn) {
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cred-table td a:hover,
.setup-doc-links a:hover,
.setup-section-body a:not(.btn):hover,
.trouble-answer a:hover,
.setup-help a:not(.btn):hover {
  color: var(--color-teal);
}

/* 18.8 — Platform Sections (collapsible) ────────────────────── */

.setup-section {
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
}

.setup-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  gap: var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.setup-section-header:hover {
  background: var(--color-surface-2);
}

.setup-section-meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}

.setup-section-num {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  color: var(--color-teal);
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.65;
}

.setup-section-title-group {
  min-width: 0;
}

.setup-section-title-group h2 {
  font-size: var(--text-xl);
  margin: 0;
}

.setup-section-title-group p {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  margin: var(--space-1) 0 0;
  max-width: none;
}

.setup-section-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  flex-shrink: 0;
  transition: color var(--transition-fast),
              border-color var(--transition-fast),
              background var(--transition-fast);
  cursor: pointer;
}

.setup-section-toggle:hover {
  color: var(--color-text-2);
  border-color: var(--color-text-muted);
  background: var(--color-surface-2);
}

.toggle-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
}

.toggle-icon svg {
  width: 12px;
  height: 12px;
}

.setup-section-toggle[aria-expanded="false"] .toggle-icon {
  transform: rotate(180deg);
}

.setup-section-body {
  padding: var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-border);
}

.setup-section-body.is-collapsed {
  display: none !important;
}

.setup-section-intro {
  font-size: var(--text-base);
  color: var(--color-text-2);
  max-width: 72ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

/* 18.9 — Steps ──────────────────────────────────────────────── */

.setup-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.setup-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.setup-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  flex-shrink: 0;
  margin-top: 3px;
}

.setup-step-content {
  min-width: 0;
}

.setup-step-content h4 {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.setup-step-content p,
.setup-step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  max-width: 72ch;
  margin-bottom: var(--space-3);
  line-height: 1.6;
}

.setup-step-content p:last-child,
.setup-step-desc:last-child {
  margin-bottom: 0;
}

.setup-step-content ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
  margin-bottom: var(--space-3);
  padding-left: var(--space-4);
}

.setup-step-content li {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  list-style: disc;
  list-style-position: outside;
  line-height: 1.6;
}

.setup-step-content li::marker {
  color: var(--color-teal);
}

.setup-step-table {
  margin-top: var(--space-3);
}

/* 18.10 — Code Blocks ───────────────────────────────────────── */

.code-block {
  margin: var(--space-4) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.code-block-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-2);
  letter-spacing: 0.06em;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-2);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: color var(--transition-fast),
              border-color var(--transition-fast),
              background var(--transition-fast);
}

.copy-btn:hover {
  color: var(--color-teal);
  border-color: var(--color-teal);
  background: var(--color-glow-teal);
}

.copy-btn.copied {
  color: var(--color-teal);
  border-color: var(--color-teal);
  background: var(--color-glow-teal);
  cursor: default;
}

.code-block-body {
  padding: var(--space-4) var(--space-5);
  overflow-x: auto;
}

.code-block-body pre {
  margin: 0;
}

.code-block-body code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.7;
  white-space: pre;
}

/* Inline code within setup content */
.setup-step-content code,
.setup-section-intro code,
.setup-note code,
.setup-section-body > p code,
.trouble-answer code,
.setup-prereqs code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--color-teal);
  background: var(--color-glow-teal);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

/* 18.11 — Notes / Callouts ──────────────────────────────────── */

.setup-note {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
  color: var(--color-text-2);
}

.setup-note p {
  max-width: none;
  font-size: inherit;
  margin: 0;
  color: inherit;
  line-height: 1.6;
}

.setup-note p + p {
  margin-top: var(--space-2);
}

.setup-note--info {
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.04);
}

.setup-note--warn {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.04);
}

.setup-note-icon {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  flex-shrink: 0;
  padding-top: 2px;
  letter-spacing: 0.06em;
}

.setup-note--info .setup-note-icon {
  color: var(--color-blue);
}

.setup-note--warn .setup-note-icon {
  color: #f59e0b;
}

/* 18.12 — Option Cards ──────────────────────────────────────── */

.option-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.option-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-teal);
  background: var(--color-glow-teal);
  border: 1px solid rgba(0, 201, 167, 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.option-body h5 {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.option-body p {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  max-width: none;
  margin: 0;
  line-height: 1.6;
}

/* 18.13 — Schema Tables ─────────────────────────────────────── */

.schema-wrap {
  margin: var(--space-6) 0 0;
}

.schema-category {
  margin-bottom: var(--space-5);
}

.schema-category h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--color-teal);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border-subtle);
}

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

.schema-table th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-2);
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.schema-table td {
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-2);
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: top;
  line-height: 1.5;
}

.schema-table tr:last-child td {
  border-bottom: none;
}

.schema-table td:first-child {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text);
  white-space: nowrap;
}

.schema-table td:nth-child(2) {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-2);
  white-space: nowrap;
}

/* 18.14 — Sub-sections within platform sections ─────────────── */

.setup-subsection {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border-subtle);
}

.setup-subsection h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.setup-doc-links {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  margin-top: var(--space-4);
}

.setup-footnote {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  margin-top: var(--space-4);
  max-width: 68ch;
  line-height: 1.6;
}

/* 18.15 — Troubleshooting ───────────────────────────────────── */

.setup-troubleshoot {
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
  margin-top: var(--space-10);
}

.setup-troubleshoot > h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}

.trouble-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.trouble-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.trouble-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  gap: var(--space-4);
  text-align: left;
  transition: background var(--transition-fast);
}

.trouble-question:hover {
  background: var(--color-surface-2);
}

.trouble-question-icon {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  color: var(--color-text-2);
  flex-shrink: 0;
  line-height: 1;
  transition: transform var(--transition-base), color var(--transition-fast);
}

.trouble-item.is-open .trouble-question-icon {
  transform: rotate(45deg);
  color: var(--color-teal);
}

.trouble-answer {
  display: none;
  padding: var(--space-5) var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-2);
}

.trouble-answer.is-open {
  display: block;
}

.trouble-answer p {
  max-width: 72ch;
  font-size: inherit;
  color: inherit;
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.trouble-answer p:last-child {
  margin-bottom: 0;
}

.trouble-answer ol {
  padding-left: var(--space-5);
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.trouble-answer li {
  list-style: decimal;
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.6;
}

/* 18.16 — Getting Help ──────────────────────────────────────── */

.setup-help {
  scroll-margin-top: calc(var(--nav-height) + var(--space-8));
  margin-top: var(--space-10);
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.setup-help > h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.setup-help > p {
  margin-bottom: var(--space-4);
  max-width: 68ch;
}

.help-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

.setup-help-meta {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  margin-top: var(--space-6);
  margin-bottom: 0;
}

/* 18.17 — Responsive: ≤960px ────────────────────────────────── */

@media (max-width: 960px) {
  .setup-layout {
    grid-template-columns: 1fr;
  }

  .setup-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 0 0 var(--space-6) 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-8);
  }

  .setup-progress {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .setup-progress-item {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: var(--space-1) var(--space-2);
  }

  .setup-progress-item:hover {
    background: var(--color-surface);
    border-left-color: transparent;
    border-bottom-color: var(--color-border);
  }

  .setup-progress-item.is-active {
    background: var(--color-glow-teal);
    border-left-color: transparent;
    border-bottom-color: var(--color-teal);
  }

  .setup-progress-divider {
    display: none;
  }

  .setup-content {
    padding: 0 0 var(--space-16) 0;
  }
}

/* 18.18 — Responsive: ≤640px ────────────────────────────────── */

@media (max-width: 640px) {
  .setup-hero h1 {
    font-size: var(--text-4xl);
  }

  .setup-pipeline {
    flex-direction: column;
    align-items: stretch;
  }

  .setup-pipeline-connector {
    width: auto;
    padding: var(--space-1) 0;
    justify-content: center;
    transform: rotate(90deg);
    height: 24px;
  }

  .setup-section-header {
    padding: var(--space-4);
  }

  .setup-section-num {
    font-size: var(--text-xl);
  }

  .setup-section-body {
    padding: var(--space-6) var(--space-4);
  }

  .setup-step {
    grid-template-columns: 28px 1fr;
    gap: var(--space-3);
  }

  .setup-help {
    padding: var(--space-6) var(--space-4);
  }

  .cred-table th,
  .cred-table td {
    font-size: var(--text-xs);
    padding: var(--space-2);
  }

  .schema-table th,
  .schema-table td {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
  }

  .option-item {
    flex-direction: column;
    gap: var(--space-2);
  }
}
/* =============================================================
   SECTION 19 — Theme Toggle · Light Theme · About Page
   Appended by Session 7 — do not edit earlier sections
   ============================================================= */


/* ----------------------------------------------------------
   19.1  Theme transition
   Applied momentarily on toggle to smooth all colour changes.
   The !important overrides any component-level transition: none.
   ---------------------------------------------------------- */

html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition:
    background-color 0.3s ease,
    color            0.3s ease,
    border-color     0.3s ease,
    fill             0.3s ease,
    stroke           0.3s ease !important;
}


/* ----------------------------------------------------------
   19.2  Light theme variable overrides
   Toggled via html.theme-light (set by nav.js / localStorage).
   Palette: "Close to Nature" — warm, terrestrial, readable.
   ---------------------------------------------------------- */

html.theme-light {
  --color-bg:           #F7F9FB;
  --color-surface:      #FFFFFF;
  --color-surface-2:    #EDF1F5;
  --color-border:       #D4DCE4;
  --color-border-subtle:#E4EAF0;
  --color-teal:         #31708E;
  --color-blue:         #5085A5;
  --color-glow-teal:    rgba(49, 112, 142, 0.08);
  --color-text:         #1C2B35;
  --color-text-2:       #3D5A6C;
  --color-text-muted:   #687864;
}


/* ----------------------------------------------------------
   19.3  Theme toggle button
   Injected dynamically by nav.js into .nav-inner.
   ---------------------------------------------------------- */

.theme-toggle {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           36px;
  height:          36px;
  border:          1px solid var(--color-border);
  border-radius:   var(--radius-md);
  background:      transparent;
  color:           var(--color-text-2);
  cursor:          pointer;
  flex-shrink:     0;
  transition:
    color            var(--transition-fast),
    border-color     var(--transition-fast),
    background-color var(--transition-fast);
}

.theme-toggle:hover {
  color:            var(--color-teal);
  border-color:     var(--color-teal);
  background-color: var(--color-glow-teal);
}

.theme-toggle:focus-visible {
  outline:        2px solid var(--color-teal);
  outline-offset: 2px;
}

.theme-toggle .theme-icon {
  display:    block;
  transition: transform var(--transition-base);
}

/* Flip icon when light mode is active — filled half moves to right */
html.theme-light .theme-toggle .theme-icon {
  transform: scaleX(-1);
}

/* Desktop: appears to the right of nav-links via CSS order */
@media (min-width: 641px) {
  .theme-toggle {
    order:       10;
    margin-left: var(--space-3);
  }
}

/* Mobile: always visible, small right margin before hamburger */
@media (max-width: 640px) {
  .theme-toggle {
    margin-right: var(--space-2);
  }
}


/* ----------------------------------------------------------
   19.4  About page — shared layout utilities
   ---------------------------------------------------------- */

.about-inner {
  max-width: var(--container-max);
  margin:    0 auto;
  padding:   0 var(--container-pad);
}


/* ----------------------------------------------------------
   19.5  About hero
   ---------------------------------------------------------- */

.about-hero {
  padding-top:    calc(var(--nav-height) + var(--space-20));
  padding-bottom: var(--space-20);
  border-bottom:  1px solid var(--color-border);
}

.about-hero h1 {
  font-family:    var(--font-serif);
  font-size:      clamp(var(--text-4xl), 6vw, var(--text-5xl));
  font-weight:    600;
  color:          var(--color-text);
  margin:         var(--space-4) 0 var(--space-6);
  letter-spacing: -0.02em;
  line-height:    1.1;
}

.about-hero-lead {
  font-size:   var(--text-lg);
  color:       var(--color-text-2);
  max-width:   760px;
  line-height: 1.75;
  margin:      0;
}


/* ----------------------------------------------------------
   19.6  About content sections
   ---------------------------------------------------------- */

.about-section {
  padding:       var(--space-20) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

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

.about-section-header {
  margin-bottom: var(--space-10);
}

.about-section-header h2 {
  font-family:    var(--font-serif);
  font-size:      var(--text-3xl);
  font-weight:    600;
  color:          var(--color-text);
  margin:         var(--space-3) 0 var(--space-4);
  letter-spacing: -0.01em;
  line-height:    1.25;
}

.about-section-header p {
  color:       var(--color-text-2);
  font-size:   var(--text-base);
  line-height: 1.75;
  max-width:   720px;
  margin:      0;
}

.about-section-header p + p {
  margin-top: var(--space-4);
}


/* ----------------------------------------------------------
   19.7  System components grid (4 cards)
   ---------------------------------------------------------- */

.about-components {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:                   var(--space-6);
}

.about-component-card {
  background:     var(--color-surface);
  border:         1px solid var(--color-border);
  border-radius:  var(--radius-lg);
  padding:        var(--space-8);
  display:        flex;
  flex-direction: column;
  gap:            var(--space-4);
  transition:     border-color var(--transition-base);
}

.about-component-card:hover {
  border-color: var(--color-teal);
}

.about-component-num {
  font-family:    var(--font-mono);
  font-size:      var(--text-xs);
  color:          var(--color-teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-component-card h3 {
  font-family:  var(--font-serif);
  font-size:    var(--text-xl);
  color:        var(--color-text);
  margin:       0;
  font-weight:  600;
  line-height:  1.25;
}

.about-component-card p {
  color:       var(--color-text-2);
  font-size:   var(--text-sm);
  line-height: 1.75;
  margin:      0;
  flex:        1;
}

.about-component-tags {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--space-2);
  margin-top:  auto;
  padding-top: var(--space-2);
}

.about-tag {
  font-family:   var(--font-mono);
  font-size:     var(--text-xs);
  color:         var(--color-text-muted);
  background:    var(--color-surface-2);
  border:        1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding:       var(--space-1) var(--space-2);
  line-height:   1.4;
}


/* ----------------------------------------------------------
   19.8  Ecosystem cards
   ---------------------------------------------------------- */

.about-ecosystem-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap:                   var(--space-4);
  margin-bottom:         var(--space-8);
}

.about-ecosystem-card {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding:       var(--space-6);
}

.about-ecosystem-card h3 {
  font-family:  var(--font-sans);
  font-size:    var(--text-base);
  font-weight:  600;
  color:        var(--color-text);
  margin:       0 0 var(--space-2);
}

.about-ecosystem-card p {
  font-size:   var(--text-sm);
  color:       var(--color-text-muted);
  line-height: 1.65;
  margin:      0;
}

.about-ecosystem-note {
  font-size:   var(--text-sm);
  color:       var(--color-text-muted);
  line-height: 1.7;
  max-width:   680px;
}


/* ----------------------------------------------------------
   19.9  FAIR compliance grid
   ---------------------------------------------------------- */

.about-fair-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:                   var(--space-6);
}

.about-fair-card {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding:       var(--space-6) var(--space-8);
  transition:    border-color var(--transition-base);
}

.about-fair-card:hover {
  border-color: var(--color-teal);
}

.about-fair-letter {
  font-family:    var(--font-mono);
  font-size:      var(--text-3xl);
  font-weight:    600;
  color:          var(--color-teal);
  line-height:    1;
  margin-bottom:  var(--space-3);
  opacity:        0.9;
}

.about-fair-card h3 {
  font-family:  var(--font-sans);
  font-size:    var(--text-base);
  font-weight:  600;
  color:        var(--color-text);
  margin:       0 0 var(--space-3);
}

.about-fair-card p {
  font-size:   var(--text-sm);
  color:       var(--color-text-2);
  line-height: 1.7;
  margin:      0;
}


/* ----------------------------------------------------------
   19.10  Data quality block
   ---------------------------------------------------------- */

.about-quality-block {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding:       var(--space-8);
  max-width:     800px;
}

.about-quality-block p {
  color:       var(--color-text-2);
  font-size:   var(--text-base);
  line-height: 1.75;
  margin:      0 0 var(--space-4);
}

.about-quality-formula {
  font-family:   var(--font-mono);
  font-size:     var(--text-sm);
  color:         var(--color-teal);
  background:    var(--color-surface-2);
  border:        1px solid var(--color-border-subtle);
  border-left:   3px solid var(--color-teal);
  border-radius: var(--radius-md);
  padding:       var(--space-4) var(--space-6);
  margin:        var(--space-4) 0;
  line-height:   2;
  white-space:   pre-wrap;
}

.about-quality-threshold {
  font-family:  var(--font-mono);
  font-size:    var(--text-sm);
  color:        var(--color-text-muted);
  margin:       var(--space-3) 0 0;
  line-height:  1.6;
}

.about-quality-threshold strong {
  color: var(--color-teal);
}


/* ----------------------------------------------------------
   19.11  Technology stack list
   ---------------------------------------------------------- */

.about-stack-list {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:                   var(--space-3);
  list-style:            none;
  padding:               0;
  margin:                0;
}

.about-stack-item {
  display:       flex;
  align-items:   baseline;
  gap:           var(--space-3);
  padding:       var(--space-3) var(--space-4);
  background:    var(--color-surface);
  border:        1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  transition:    border-color var(--transition-fast);
}

.about-stack-item:hover {
  border-color: var(--color-border);
}

.about-stack-tech {
  font-family:  var(--font-mono);
  font-size:    var(--text-sm);
  color:        var(--color-teal);
  white-space:  nowrap;
  flex-shrink:  0;
  line-height:  1.5;
}

.about-stack-desc {
  font-size:   var(--text-sm);
  color:       var(--color-text-muted);
  line-height: 1.55;
}


/* ----------------------------------------------------------
   19.12  Citation block
   ---------------------------------------------------------- */

.about-citation-block {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-left:   3px solid var(--color-teal);
  border-radius: var(--radius-lg);
  padding:       var(--space-8);
  max-width:     820px;
}

.about-citation-text {
  font-family:  var(--font-mono);
  font-size:    var(--text-sm);
  color:        var(--color-text-2);
  line-height:  1.9;
  margin:       0 0 var(--space-6);
  white-space:  pre-wrap;
  word-break:   break-all;
}

.about-citation-text a {
  color:           var(--color-teal);
  text-decoration: none;
}

.about-citation-text a:hover {
  text-decoration: underline;
}

.about-doi-badge {
  display:     block;
  margin-top:  var(--space-4);
}

.about-doi-badge img {
  height: 20px;
  width:  auto;
}


/* ----------------------------------------------------------
   19.13  Quick links row
   ---------------------------------------------------------- */

.about-links-row {
  display:   flex;
  flex-wrap: wrap;
  gap:       var(--space-4);
}

.about-link-card {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-2);
  background:     var(--color-surface);
  border:         1px solid var(--color-border);
  border-radius:  var(--radius-lg);
  padding:        var(--space-5) var(--space-8);
  text-decoration:none;
  color:          var(--color-text);
  transition:
    border-color     var(--transition-fast),
    background-color var(--transition-fast);
  min-width: 180px;
}

.about-link-card:hover {
  border-color:     var(--color-teal);
  background-color: var(--color-glow-teal);
}

.about-link-card-label {
  font-family:    var(--font-mono);
  font-size:      var(--text-xs);
  color:          var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.about-link-card-title {
  font-family:  var(--font-sans);
  font-size:    var(--text-base);
  font-weight:  600;
  color:        var(--color-teal);
  line-height:  1.3;
}


/* ----------------------------------------------------------
   19.14  About the Author section
   Visually separated from content sections by a surface fill.
   ---------------------------------------------------------- */

.about-author-section {
  background:  var(--color-surface);
  border-top:  1px solid var(--color-border);
  padding:     var(--space-20) 0;
}

.about-author-content {
  max-width: 780px;
}

.about-author-content h2 {
  font-family:    var(--font-serif);
  font-size:      var(--text-3xl);
  font-weight:    600;
  color:          var(--color-text);
  margin:         var(--space-3) 0 var(--space-6);
  letter-spacing: -0.01em;
}

.about-author-content p {
  color:       var(--color-text-2);
  font-size:   var(--text-base);
  line-height: 1.8;
  margin:      0 0 var(--space-5);
}

.about-author-content p:last-of-type {
  margin-bottom: 0;
}

.about-collab-cta {
  display:        inline-flex;
  align-items:    center;
  gap:            var(--space-3);
  margin-top:     var(--space-8);
  padding:        var(--space-3) var(--space-6);
  background:     var(--color-surface-2);
  border:         1px solid var(--color-border);
  border-radius:  var(--radius-md);
  font-family:    var(--font-mono);
  font-size:      var(--text-sm);
  color:          var(--color-text-2);
  text-decoration:none;
  transition:
    border-color     var(--transition-fast),
    background-color var(--transition-fast),
    color            var(--transition-fast);
}

.about-collab-cta:hover {
  border-color:     var(--color-teal);
  background-color: var(--color-glow-teal);
  color:            var(--color-teal);
}

.about-collab-dot {
  display:       inline-block;
  width:         6px;
  height:        6px;
  border-radius: 50%;
  background:    var(--color-teal);
  flex-shrink:   0;
}
/* =============================================================
   SECTION 19 — POST-DEPLOY UPDATES (Session 7, Round 2)
   Append this entire file to website/assets/style.css
   PowerShell:
     Get-Content "$env:USERPROFILE\Downloads\style-section-19-updates.css" |
     Add-Content "C:\Users\17kaw\Documents\audtheia-environmental-monitoring\website\assets\style.css"

   These rules override earlier Section 19 declarations via CSS
   cascade order (later rules win). No earlier sections touched.
   ============================================================= */


/* ----------------------------------------------------------
   19.20  Forest light theme — full palette override
   Replaces the ocean palette from original Section 19.2.
   Palette: Close to Nature (earthy, forest, terrestrial).
   --color-teal is now olive green; text is dark forest.
   ---------------------------------------------------------- */

html.theme-light {
  --color-bg:           #EFF1ED;
  --color-surface:      #FAFAF9;
  --color-surface-2:    #E6E9E1;
  --color-border:       #CECFBA;
  --color-border-subtle:#DDDFC9;
  --color-teal:         #717744;
  --color-blue:         #5C6733;
  --color-glow-teal:    rgba(113, 119, 68, 0.09);
  --color-text:         #373D20;
  --color-text-2:       #4F5630;
  --color-text-muted:   #766153;
}


/* ----------------------------------------------------------
   19.21  Light theme — nav-specific colour reinforcements
   Ensures the nav logo and links read as forest green
   against the warm #EFF1ED banner background.
   ---------------------------------------------------------- */

html.theme-light .nav-logo {
  color: var(--color-teal);
}

html.theme-light .nav-links a {
  color: var(--color-text-2);
}

html.theme-light .nav-links a:hover,
html.theme-light .nav-links a.nav-active {
  color: var(--color-text);
}

html.theme-light .site-nav {
  border-color: var(--color-border-subtle);
}

html.theme-light .theme-toggle {
  border-color: var(--color-border);
  color: var(--color-text-2);
}

html.theme-light .theme-toggle:hover {
  border-color: var(--color-teal);
  background-color: var(--color-glow-teal);
  color: var(--color-teal);
}


/* ----------------------------------------------------------
   19.22  Hamburger button — smooth span transitions
   Allows the three bars to animate cleanly into an X
   when the mobile overlay opens. Additive only.
   ---------------------------------------------------------- */

.nav-toggle span {
  transition:
    transform 0.28s cubic-bezier(0.52, 0.02, 0.19, 1.02),
    opacity   0.2s ease;
}

.nav-toggle-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle-open span:nth-child(2) {
  opacity:   0;
  transform: scaleX(0);
}

.nav-toggle-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ----------------------------------------------------------
   19.23  Mobile nav overlay
   Full-screen navigation panel injected by nav.js.
   Appears only on screens ≤640px.
   ---------------------------------------------------------- */

.mobile-nav-overlay {
  position:   fixed;
  inset:      0;
  z-index:    997;
  background: var(--color-surface);
  display:    flex;
  flex-direction: column;
  align-items:    center;
  justify-content:center;
  padding:    0 var(--space-8);
  opacity:    0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mobile-nav-overlay.overlay-open {
  opacity:        1;
  pointer-events: all;
}

/* Prevent body scroll when overlay is open */
body.overlay-active {
  overflow: hidden;
}

/* Close (X) button — top-right corner */
.overlay-close-btn {
  position: absolute;
  top:      var(--space-5);
  right:    var(--space-5);
  width:    42px;
  height:   42px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  border:          1px solid var(--color-border);
  border-radius:   var(--radius-md);
  background:      transparent;
  color:           var(--color-text-2);
  cursor:          pointer;
  transition:
    color        var(--transition-fast),
    border-color var(--transition-fast);
}

.overlay-close-btn:hover {
  color:        var(--color-teal);
  border-color: var(--color-teal);
}

.overlay-close-btn:focus-visible {
  outline:        2px solid var(--color-teal);
  outline-offset: 2px;
}

/* Nav links — centered, large serif */
.overlay-links {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            var(--space-8);
  width:          100%;
  text-align:     center;
}

.overlay-links a {
  font-family:    var(--font-serif);
  font-size:      clamp(var(--text-2xl), 7vw, var(--text-4xl));
  font-weight:    400;
  color:          var(--color-text-2);
  text-decoration:none;
  letter-spacing: -0.02em;
  line-height:    1;
  opacity:        0;
  transform:      translateY(16px);
  transition:
    color     var(--transition-fast),
    opacity   0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-overlay.overlay-open .overlay-links a {
  opacity:   1;
  transform: translateY(0);
}

/* Staggered entrance — each link 50ms later */
.mobile-nav-overlay.overlay-open .overlay-links a:nth-child(1) { transition-delay: 0.07s; }
.mobile-nav-overlay.overlay-open .overlay-links a:nth-child(2) { transition-delay: 0.12s; }
.mobile-nav-overlay.overlay-open .overlay-links a:nth-child(3) { transition-delay: 0.17s; }
.mobile-nav-overlay.overlay-open .overlay-links a:nth-child(4) { transition-delay: 0.22s; }
.mobile-nav-overlay.overlay-open .overlay-links a:nth-child(5) { transition-delay: 0.27s; }

.overlay-links a:hover {
  color: var(--color-teal);
}

.overlay-links a.nav-active {
  color:       var(--color-teal);
  font-weight: 600;
}

/* Subtle brand mark at bottom */
.overlay-brand {
  position:       absolute;
  bottom:         var(--space-8);
  font-family:    var(--font-mono);
  font-size:      var(--text-xs);
  color:          var(--color-text-muted);
  letter-spacing: 0.18em;
  opacity:        0;
  transition:     opacity 0.5s ease 0.32s;
}

.mobile-nav-overlay.overlay-open .overlay-brand {
  opacity: 1;
}

/* Thin accent line above links */
.overlay-accent-line {
  width:            1px;
  height:           48px;
  background:       var(--color-border);
  margin-bottom:    var(--space-8);
  opacity:          0;
  transform:        scaleY(0);
  transform-origin: top;
  transition:
    opacity   0.3s ease 0.04s,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.04s;
}

.mobile-nav-overlay.overlay-open .overlay-accent-line {
  opacity:   1;
  transform: scaleY(1);
}

/* Never show on desktop */
@media (min-width: 641px) {
  .mobile-nav-overlay {
    display: none !important;
  }
}


/* ----------------------------------------------------------
   19.24  Architecture cards — 2-column grid (desktop)
   Changes the landing page platform cards from a cramped
   4-column layout to 2 wider columns.

   NOTE: Class name ".platforms" is the best available guess
   from the repo structure. If this rule does not apply,
   open DevTools on index.html, inspect the container that
   wraps the four cards (Roboflow, N8N, Airtable, Integrations)
   and replace ".platforms" below with the actual class name,
   then re-append only this updated rule.
   ---------------------------------------------------------- */

@media (min-width: 900px) {
  .platforms {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 641px) and (max-width: 899px) {
  .platforms {
    grid-template-columns: 1fr !important;
  }
}


/* ----------------------------------------------------------
   19.25  Global mobile overflow prevention
   Prevents any element (including wide architecture cards)
   from causing horizontal page scroll on narrow screens.
   ---------------------------------------------------------- */

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
    max-width:  100%;
  }

  /* Constrain any grid or flex container that might overflow */
  .platforms,
  .platform,
  .platform-card,
  .arch-grid,
  .arch-card,
  .landing-platforms,
  .system-grid,
  .system-card {
    min-width:  0 !important;
    max-width:  100% !important;
    width:      100% !important;
    box-sizing: border-box !important;
  }
}
/* =============================================================
   SECTION 19 — PATCH 2
   Append to website/assets/style.css
   ============================================================= */

/* ----------------------------------------------------------
   Nav links: lighter colour so they're readable against
   the nav's dark background in light mode. ONLY this changes.
   ---------------------------------------------------------- */
html.theme-light .nav-links a {
  color: #BCBD8B;
}

html.theme-light .nav-links a:hover {
  color: #EFF1ED;
}

html.theme-light .nav-links a.nav-active {
  color: #EFF1ED;
}


/* ----------------------------------------------------------
   Landing page architecture cards: 2-column grid on desktop.
   Covers every plausible class name the landing page might use.
   One of these will match; the rest are harmless no-ops.
   ---------------------------------------------------------- */
@media (min-width: 900px) {
  .platforms,
  .platform-grid,
  .platforms-grid,
  .platform-cards,
  .arch-platforms,
  .arch-grid,
  .arch-cards,
  .system-grid,
  .system-cards,
  .landing-platforms,
  .landing-grid,
  .landing-cards,
  .pipeline-platforms,
  .components-grid,
  .four-platforms {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
/* About page component cards: 2 columns on desktop, matches home page layout */
@media (min-width: 900px) {
  .about-components {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
/* =============================================================
   SECTION 20 — Light theme forest palette, page illustration,
   nav scroll fix, and moved inline styles
   Appended by Session 8 — do not edit earlier sections
   ============================================================= */


/* ----------------------------------------------------------
   20.1  Light theme — complete forest green palette
   Replaces the olive palette from Section 19 with a high-contrast
   forest green system confirmed in Session 8.
   ---------------------------------------------------------- */

html.theme-light {
  --color-bg:            #F7F9F5;
  --color-surface:       #FFFFFF;
  --color-surface-2:     #EEF2EB;
  --color-border:        #C8D0C4;
  --color-border-subtle: #DDE3D9;
  --color-teal:          #166534;
  --color-teal-dim:      #14532D;
  --color-blue:          #92400E;
  --color-glow-teal:     rgba(22, 101, 52, 0.09);
  --color-glow-blue:     rgba(146, 64, 14, 0.09);
  --color-text:          #0F1A0F;
  --color-text-2:        #374151;
  --color-text-muted:    #4B5563;
}


/* ----------------------------------------------------------
   20.2  Light theme — nav background
   White/near-white nav in light mode for clean contrast and
   consistent appearance with scientific reference sites.
   Overrides the hardcoded rgba dark background from Section 5.
   ---------------------------------------------------------- */

html.theme-light .site-nav {
  background:    rgba(247, 249, 245, 0.92);
  border-bottom-color: var(--color-border-subtle);
}

html.theme-light .site-nav.nav-scrolled {
  background:    rgba(247, 249, 245, 0.98);
  border-bottom-color: var(--color-border);
}

/* Also cover the old scrolled class for any residual rules */
html.theme-light .site-nav.scrolled {
  background:    rgba(247, 249, 245, 0.98);
  border-bottom-color: var(--color-border);
}

/* Nav links — readable against white nav surface */
html.theme-light .nav-links a {
  color: var(--color-text-2);
}

html.theme-light .nav-links a:hover,
html.theme-light .nav-links a.nav-active {
  color: var(--color-text);
}

/* Hamburger spans — dark in light mode */
html.theme-light .nav-toggle span {
  background: var(--color-text-2);
}

/* Mobile dropdown panel — light background in light mode */
html.theme-light .nav-links {
  background: rgba(247, 249, 245, 0.98);
}


/* ----------------------------------------------------------
   20.3  nav.js scroll-state class name fix
   nav.js toggles .nav-scrolled; earlier CSS targets .scrolled.
   This rule makes .nav-scrolled work in both themes.
   ---------------------------------------------------------- */

.site-nav.nav-scrolled {
  border-bottom-color: var(--color-border);
  background:          rgba(7, 9, 15, 0.97);
}


/* ----------------------------------------------------------
   20.4  About page components — enforce 2x2 grid on desktop
   Explicit Section 20 rule per deliverable spec.
   ---------------------------------------------------------- */

@media (min-width: 900px) {
  .about-components {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}


/* ----------------------------------------------------------
   20.5  Page illustration container
   Injected by nav.js immediately before <footer.site-footer>.
   Fixed height, full viewport width, overflow hidden.
   Both SVGs occupy the same space via absolute positioning.
   ---------------------------------------------------------- */

.page-illustration {
  position:       relative;
  width:          100%;
  height:         80px;
  overflow:       hidden;
  pointer-events: none;
  color:          var(--color-border);
}

.page-illustration svg {
  position:   absolute;
  inset:      0;
  width:      100%;
  height:     100%;
  transition: opacity var(--transition-base);
}

/* Dark mode: ocean visible, forest hidden */
.illus-ocean  { opacity: 1; }
.illus-forest { opacity: 0; }

/* Light mode: forest visible, ocean hidden */
html.theme-light .illus-ocean  { opacity: 0; }
html.theme-light .illus-forest { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .page-illustration svg { transition: none; }
}

@media (max-width: 640px) {
  .page-illustration { height: 56px; }
}


/* ----------------------------------------------------------
   20.6  Demo page top padding
   Moved from inline style on demo.html <section> element.
   Eliminates the only remaining inline style on that page.
   ---------------------------------------------------------- */

.demo-hero-section {
  padding-top: calc(var(--nav-height) + var(--space-16));
}


/* ----------------------------------------------------------
   20.7  Platform carousel favicon sizing
   Moved from inline <style> block on index.html.
   ---------------------------------------------------------- */

.psc-card img {
  width:         20px;
  height:        20px;
  border-radius: 4px;
  opacity:       0.8;
}


/* ----------------------------------------------------------
   20.8  Mobile pipeline spacing
   Moved from inline <style> block on index.html.
   ---------------------------------------------------------- */

@media (max-width: 768px) {
  .pipeline {
    margin:  var(--space-6) 0;
    padding: var(--space-4) 0;
  }
}
/* =============================================================
   STYLE.CSS — VISUAL REFINEMENTS PATCH
   Append after Section 20.
   Addresses: logo weight, nav surface contrast, btn-secondary
   solid background, and nav-links box on theme switch.
   ============================================================= */


/* ----------------------------------------------------------
   R1. Nav logo — slightly bolder for improved legibility
   ---------------------------------------------------------- */

.nav-logo {
  font-weight: 600;
}


/* ----------------------------------------------------------
   R2. Light mode nav — distinct sage surface
   Separates the nav bar visually from the #F7F9F5 page
   background, which was previously indistinguishable.
   ---------------------------------------------------------- */

html.theme-light .site-nav {
  background: rgba(218, 226, 214, 0.96);
}

html.theme-light .site-nav.nav-scrolled,
html.theme-light .site-nav.scrolled {
  background: rgba(212, 222, 208, 0.99);
  border-bottom-color: var(--color-border);
}


/* ----------------------------------------------------------
   R3. Secondary button — solid surface background
   Prevents the hero grid lines from bleeding through the
   button text area in both light and dark modes.
   ---------------------------------------------------------- */

.btn-secondary {
  background: var(--color-surface);
}

.btn-secondary:hover {
  background:   var(--color-surface-2);
  color:        var(--color-text);
  border-color: var(--color-text-muted);
}


/* ----------------------------------------------------------
   R4. Nav-links box fix on theme switch
   The Section 20 rule that gave .nav-links a light background
   was not scoped to mobile, causing a visible box to appear
   on desktop during theme transitions. This patch cancels it
   on desktop (where .nav-links has no background) and applies
   it correctly for mobile only, matching the existing breakpoint
   used by the mobile dropdown in Section 8.
   ---------------------------------------------------------- */

@media (min-width: 769px) {
  html.theme-light .nav-links {
    background: transparent !important;
  }
}

@media (max-width: 768px) {
  html.theme-light .nav-links {
    background: rgba(212, 222, 208, 0.98);
  }
}
/* =============================================================
   STYLE.CSS — SESSION 9 PATCH
   Append after Visual Refinements Patch.
   Addresses: hero stat labels, platform-id contrast,
   platform-tag readability, hero-text frosted background.
   ============================================================= */


/* ----------------------------------------------------------
   S9.1  Hero stat labels — larger, higher contrast
   "data points per observation" and similar labels were
   rendered at text-xs with color-text-muted, making them
   nearly invisible against the dot-grid background.
   Bumped to text-sm and shifted to color-text-2 so they
   read clearly in both themes without disrupting the stat
   value hierarchy.
   ---------------------------------------------------------- */

.stat-label {
  font-size: var(--text-sm);
  color:     var(--color-text-2);
  max-width: 10rem;
}


/* ----------------------------------------------------------
   S9.2  Hero text column — subtle frosted background
   A very light semi-transparent wash behind the text column
   lifts it off the dot-grid without hiding the grid effect.
   Dark mode: barely-there navy veil.
   Light mode: barely-there warm white veil.
   No hard edges — blends naturally via border-radius.
   ---------------------------------------------------------- */

.hero-text {
  position:      relative;
  padding:       var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  background:    rgba(7, 9, 15, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

html.theme-light .hero-text {
  background: rgba(247, 249, 245, 0.55);
}

@media (max-width: 768px) {
  .hero-text {
    padding: var(--space-5) var(--space-4);
  }
}


/* ----------------------------------------------------------
   S9.3  Platform ID tags — improved contrast
   The mono identifier strings (e.g. official-porifera-
   classifier-ju8er/12) were rendered in color-text-muted
   at text-xs. Lifted to color-text-2 so they are readable
   as actual reference data, not decorative metadata.
   ---------------------------------------------------------- */

.platform-id code {
  color:     var(--color-text-2);
  font-size: var(--text-sm);
}

.platform-id-inner code {
  color:     var(--color-text-2);
  font-size: var(--text-sm);
}


/* ----------------------------------------------------------
   S9.4  Platform tags — warmer, more legible typeface feel
   Switching from mono to sans gives the chips a friendlier,
   less robotic appearance. Color lifted from text-muted to
   a warm teal-adjacent tint that is clearly readable in both
   themes. Letter-spacing tightened slightly for sans legibility.
   ---------------------------------------------------------- */

.platform-tag {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    500;
  color:          var(--color-teal);
  letter-spacing: 0.01em;
  opacity:        0.85;
}

html.theme-light .platform-tag {
  opacity: 1;
}


/* ----------------------------------------------------------
   S9.5  GIF caption identifier — match platform-id contrast
   The classifier ID below the hero video had the same
   low-contrast problem. Lifted to color-text-2.
   ---------------------------------------------------------- */

.gif-caption .mono {
  color:     var(--color-text-2);
  font-size: var(--text-sm);
}

.gif-caption-sub {
  color: var(--color-text-2);
}


/* ----------------------------------------------------------
   S9.6  Schema tables on Setup page — readable category headers
   Section headers above each schema group were rendering as
   h4 with default spacing. Added a subtle left accent line
   to visually separate categories without adding bulk.
   ---------------------------------------------------------- */

.schema-category h4 {
  font-family:   var(--font-sans);
  font-size:     var(--text-sm);
  font-weight:   600;
  color:         var(--color-text-2);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding-left:  var(--space-3);
  border-left:   2px solid var(--color-teal);
  margin-bottom: var(--space-3);
}
/* =============================================================
   STYLE.CSS — SESSION 9 CORRECTION PATCH
   Append after Session 9 Patch.
   Fixes: section-label weight/contrast, hero-text background
   strength, pipeline node consistency, table header design,
   schema table header design — both dark (ocean) and light
   (forest) themes.
   ============================================================= */


/* ----------------------------------------------------------
   C1.  Section labels — IBM Plex Sans Bold, clearly visible
   All `.section-label` spans ("HOW IT WORKS", "SETUP GUIDE",
   "IN THIS GUIDE", "OPEN-SOURCE · FAIR DATA …", etc.) were
   rendered at text-xs mono with low opacity. Now rendered in
   IBM Plex Sans Bold at text-xs so they read as strong
   navigational anchors in both themes.
   ---------------------------------------------------------- */

.section-label {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          var(--color-teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Hero eyebrow ("OPEN-SOURCE · FAIR DATA · MARINE + TERRESTRIAL")
   same treatment as section-label */
.hero-eyebrow {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          var(--color-teal);
  letter-spacing: 0.12em;
}

/* Setup sidebar "IN THIS GUIDE" label */
.setup-sidebar-label {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          var(--color-teal);
  letter-spacing: 0.12em;
}


/* ----------------------------------------------------------
   C2.  Stat labels — heavier weight, clearly readable
   Already bumped to text-sm in S9 patch; adding font-weight
   600 so they read alongside the bold stat values.
   ---------------------------------------------------------- */

.stat-label {
  font-weight: 600;
  color:       var(--color-text);
}

html.theme-light .stat-label {
  color: var(--color-text);
}


/* ----------------------------------------------------------
   C3.  Hero text background — more visible frosted panel
   The S9 patch used rgba(7,9,15,0.28) which was imperceptible.
   Increased to a clear semi-transparent surface so the text
   column lifts off the dot grid. Rounded corners, no hard edge.
   Dark mode: deep navy panel, ocean-appropriate.
   Light mode: near-white with forest-green tint.
   ---------------------------------------------------------- */

.hero-text {
  background:              rgba(7, 9, 15, 0.62);
  backdrop-filter:         blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border:                  1px solid rgba(255, 255, 255, 0.04);
}

html.theme-light .hero-text {
  background:              rgba(247, 249, 245, 0.82);
  backdrop-filter:         blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border:                  1px solid rgba(22, 101, 52, 0.10);
}


/* ----------------------------------------------------------
   C4.  Pipeline nodes — consistent colour, readable labels
   The home-page pipeline (INPUT → Roboflow → … → OUTPUT)
   nodes all get the same dark header stripe treatment so
   they form one visual unit. Platform nodes get a teal top
   stripe; IO nodes (INPUT/OUTPUT) get a muted border stripe.
   Pipeline sub-labels lifted from color-text-muted to
   color-text-2 so "RF-DETR · custom classifier" is legible.
   ---------------------------------------------------------- */

/* All nodes — shared base: add visible top border accent */
.pipeline-node {
  border-top: 3px solid var(--color-teal);
  background: var(--color-surface);
}

.pipeline-node--io {
  border-top:   3px solid var(--color-border);
  border-style: solid !important; /* override dashed base */
  background:   transparent;
}

.pipeline-node-label {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          var(--color-teal);
  letter-spacing: 0.10em;
}

.pipeline-node-name {
  font-weight: 700;
  font-size:   var(--text-base);
  color:       var(--color-text);
}

.pipeline-node-sub {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    500;
  color:          var(--color-text-2);
  letter-spacing: 0;
}

/* Connector arrows — more visible */
.pipeline-connector {
  opacity: 0.7;
  color:   var(--color-teal);
}

/* Light-mode pipeline nodes */
html.theme-light .pipeline-node {
  background:  var(--color-surface);
  border-top:  3px solid var(--color-teal);
  box-shadow:  0 1px 4px rgba(22, 101, 52, 0.08);
}

html.theme-light .pipeline-node--io {
  background:  var(--color-surface-2);
  border-top:  3px solid var(--color-border);
}


/* ----------------------------------------------------------
   C5.  Setup-page pipeline nodes — same consistent treatment
   The setup page has its own .setup-pipeline-* classes.
   Apply the same bold-header card style.
   ---------------------------------------------------------- */

.setup-pipeline-node {
  border-top:  3px solid var(--color-teal);
  background:  var(--color-surface);
  box-shadow:  0 2px 8px rgba(0, 0, 0, 0.15);
}

.setup-pipeline-node::before {
  display: none; /* remove the old half-opacity pseudo stripe */
}

.setup-pipeline-num {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          var(--color-teal);
  letter-spacing: 0.10em;
}

.setup-pipeline-name {
  font-weight: 700;
  font-size:   var(--text-sm);
  color:       var(--color-text);
}

.setup-pipeline-desc {
  font-family: var(--font-sans);
  font-size:   var(--text-xs);
  font-weight: 500;
  color:       var(--color-text-2);
}

html.theme-light .setup-pipeline-node {
  background:  var(--color-surface);
  border-top:  3px solid var(--color-teal);
  box-shadow:  0 2px 8px rgba(22, 101, 52, 0.10);
}


/* ----------------------------------------------------------
   C6.  Credential tables — bold coloured header row
   Tables previously had a barely-visible mono header in
   color-text-muted. Now headers have a solid teal/forest
   background (dark mode) or solid forest-green (light mode),
   white text, full weight — like the example reference tables.
   Rows alternate subtle backgrounds for scanability.
   ---------------------------------------------------------- */

/* Wrapper: add border and radius so table looks card-like */
.cred-table-wrap {
  border:        1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow:      hidden; /* clips the th background to rounded corners */
}

.cred-table {
  border-collapse: collapse;
  border-radius:   var(--radius-md);
}

/* Header row: dark teal background, white bold text */
.cred-table thead {
  background: var(--color-teal);
}

.cred-table th {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding:        var(--space-3) var(--space-4);
  border-bottom:  none;
  white-space:    nowrap;
}

/* Body rows: alternating subtle tint */
.cred-table tbody tr:nth-child(even) {
  background: var(--color-surface-2);
}

.cred-table tbody tr:nth-child(odd) {
  background: var(--color-surface);
}

.cred-table td {
  padding:       var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  color:         var(--color-text-2);
  font-size:     var(--text-sm);
}

.cred-table td:first-child {
  font-weight: 600;
  color:       var(--color-text);
}

.cred-table tr:last-child td {
  border-bottom: none;
}

/* Light mode: forest green header */
html.theme-light .cred-table thead {
  background: var(--color-teal);
}

html.theme-light .cred-table th {
  color: #ffffff;
}

html.theme-light .cred-table tbody tr:nth-child(even) {
  background: var(--color-surface-2);
}

html.theme-light .cred-table tbody tr:nth-child(odd) {
  background: var(--color-surface);
}

html.theme-light .cred-table td {
  color:         var(--color-text-2);
  border-bottom-color: var(--color-border);
}

html.theme-light .cred-table td:first-child {
  color: var(--color-text);
}


/* ----------------------------------------------------------
   C7.  Schema tables — same bold-header treatment
   The 62-column Airtable schema tables get identical
   header styling to the credential tables for visual
   consistency throughout the Setup page.
   ---------------------------------------------------------- */

.schema-table-wrap,
.schema-wrap .cred-table-wrap {
  border:        1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow:      hidden;
  margin-bottom: var(--space-1);
}

.schema-table {
  border-collapse: collapse;
}

.schema-table thead {
  background: var(--color-teal);
}

.schema-table th {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding:        var(--space-3) var(--space-4);
  border-bottom:  none;
  white-space:    nowrap;
}

.schema-table tbody tr:nth-child(even) {
  background: var(--color-surface-2);
}

.schema-table tbody tr:nth-child(odd) {
  background: var(--color-surface);
}

.schema-table td {
  padding:       var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  color:         var(--color-text-2);
  font-size:     var(--text-sm);
}

.schema-table td:first-child {
  font-family: var(--font-mono);
  font-size:   var(--text-xs);
  font-weight: 600;
  color:       var(--color-text);
  white-space: nowrap;
}

.schema-table td:nth-child(2) {
  font-family: var(--font-mono);
  font-size:   var(--text-xs);
  font-weight: 500;
  color:       var(--color-teal);
  white-space: nowrap;
}

.schema-table tr:last-child td {
  border-bottom: none;
}

/* Light mode schema tables */
html.theme-light .schema-table thead {
  background: var(--color-teal);
}

html.theme-light .schema-table th {
  color: #ffffff;
}

html.theme-light .schema-table tbody tr:nth-child(even) {
  background: var(--color-surface-2);
}

html.theme-light .schema-table tbody tr:nth-child(odd) {
  background: var(--color-surface);
}

html.theme-light .schema-table td {
  color:              var(--color-text-2);
  border-bottom-color: var(--color-border);
}

html.theme-light .schema-table td:first-child {
  color: var(--color-text);
}

html.theme-light .schema-table td:nth-child(2) {
  color: var(--color-teal);
}


/* ----------------------------------------------------------
   C8.  Schema category headers — bolder, teal-accented
   Each category title above a schema group (e.g. "Taxonomic
   and Identification") gets full bold weight and stronger
   left accent so it clearly separates groups.
   ---------------------------------------------------------- */

.schema-category {
  margin-bottom: var(--space-6);
}

.schema-category h4 {
  font-family:    var(--font-sans);
  font-size:      var(--text-sm);
  font-weight:    700;
  color:          var(--color-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-left:   var(--space-3);
  border-left:    3px solid var(--color-teal);
  margin-bottom:  var(--space-3);
  line-height:    1.4;
}

html.theme-light .schema-category h4 {
  color:       var(--color-text);
  border-left-color: var(--color-teal);
}


/* ----------------------------------------------------------
   C9.  Platform-tag chips — add a light background surface
   Tags like "RF-DETR", "Multi-agent", "REST" get a subtle
   pill background so they register as badges, not just
   coloured text floating at the bottom of cards.
   ---------------------------------------------------------- */

.platform-tag {
  font-family:      var(--font-sans);
  font-size:        var(--text-xs);
  font-weight:      600;
  color:            var(--color-teal);
  letter-spacing:   0.03em;
  background:       rgba(0, 201, 167, 0.10);
  border:           1px solid rgba(0, 201, 167, 0.20);
  border-radius:    var(--radius-sm);
  padding:          2px var(--space-2);
  opacity:          1;
}

html.theme-light .platform-tag {
  background: rgba(22, 101, 52, 0.08);
  border:     1px solid rgba(22, 101, 52, 0.18);
  color:      var(--color-teal);
}


/* ----------------------------------------------------------
   C10.  Gif-caption and platform-id — bold, readable
   The classifier ID and caption sub-line get Sans Bold
   so they stand out as data labels rather than fine print.
   ---------------------------------------------------------- */

.gif-caption .mono {
  font-family: var(--font-mono);
  font-size:   var(--text-sm);
  font-weight: 500;
  color:       var(--color-text);
}

.gif-caption-sub {
  font-family: var(--font-sans);
  font-size:   var(--text-xs);
  font-weight: 600;
  color:       var(--color-text-2);
  letter-spacing: 0.03em;
}

.platform-id code {
  font-weight: 500;
  color:       var(--color-text);
}

.platform-id-inner code {
  font-weight: 500;
  color:       var(--color-text);
}
/* =============================================================
   STYLE.CSS — SESSION 9 FINAL POLISH PATCH
   Append after Session 9 Correction Patch.
   Covers: schema collapsible headers + animation, code-block-
   label bold, hero-text min-width, gif-wrap shadow, pub-eyebrow
   weight, footer-brand style, about-page full visual overhaul.
   ============================================================= */


/* ============================================================
   P1.  Schema category — collapsible header + table animation
   JS adds .schema-collapsible and .schema-open classes.
   The h4 becomes a clickable toggle row with a darker surface
   and a chevron indicator. The .cred-table-wrap animates
   open/closed via max-height transition.
   ============================================================ */

/* Collapsible h4 header row */
.schema-collapsible h4 {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         var(--space-3) var(--space-4);
  margin:          0;
  background:      var(--color-surface-2);
  border:          1px solid var(--color-border);
  border-radius:   var(--radius-md) var(--radius-md) 0 0;
  cursor:          pointer;
  user-select:     none;
  font-family:     var(--font-sans);
  font-size:       var(--text-xs);
  font-weight:     700;
  color:           var(--color-text);
  letter-spacing:  0.05em;
  text-transform:  uppercase;
  transition:      background var(--transition-fast),
                   border-color var(--transition-fast);
}

.schema-collapsible h4:hover {
  background:   var(--color-surface);
  border-color: var(--color-teal);
  color:        var(--color-teal);
}

/* When closed, round all corners */
.schema-collapsible:not(.schema-open) h4 {
  border-radius: var(--radius-md);
}

/* Chevron indicator */
.schema-chevron {
  display:        inline-block;
  width:          16px;
  height:         16px;
  flex-shrink:    0;
  margin-left:    var(--space-3);
  position:       relative;
  transition:     transform var(--transition-base);
}

.schema-chevron::before,
.schema-chevron::after {
  content:    '';
  position:   absolute;
  top:        50%;
  width:      7px;
  height:     1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--transition-base);
}

.schema-chevron::before {
  left:      2px;
  transform: translateY(-50%) rotate(-45deg);
}

.schema-chevron::after {
  right:     2px;
  transform: translateY(-50%) rotate(45deg);
}

/* Open state — chevron points up */
.schema-open .schema-chevron::before {
  transform: translateY(-50%) rotate(45deg);
}

.schema-open .schema-chevron::after {
  transform: translateY(-50%) rotate(-45deg);
}

/* Table wrapper — animated height */
.schema-collapsible .cred-table-wrap {
  max-height:     1200px;
  overflow:       hidden;
  transition:     max-height var(--transition-slow) ease,
                  opacity    var(--transition-base) ease;
  opacity:        1;
  border-top:     none;
  border-radius:  0 0 var(--radius-md) var(--radius-md);
}

/* Closed state */
.schema-collapsible:not(.schema-open) .cred-table-wrap {
  max-height: 0;
  opacity:    0;
}

/* Remove double-border between header and table */
.schema-collapsible .schema-table {
  border-radius: 0;
}

/* Light mode header surface */
html.theme-light .schema-collapsible h4 {
  background: #DDE8D8;
  border-color: var(--color-border);
  color: var(--color-text);
}

html.theme-light .schema-collapsible h4:hover {
  background:   #C8D8C0;
  border-color: var(--color-teal);
  color:        var(--color-teal);
}


/* ============================================================
   P2.  Code-block label — bold, visible title
   "URL FORMAT", "BASH", "CURL" etc. get Sans Bold weight
   so they read as section labels, not fine-print annotations.
   The caret symbols (^) in code are replaced by the new
   setup.html; this just ensures the label is styled correctly.
   ============================================================ */

.code-block-label {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          var(--color-text-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Remove any text-shadow that may cause blurry bold text */
.cred-table td,
.cred-table th,
.schema-table td,
.schema-table th,
.setup-step-content h4,
.setup-step-content strong,
code {
  text-shadow: none !important;
}


/* ============================================================
   P3.  Hero text column — wider, less narrow
   Current padding + backdrop creates a narrow white block.
   Reducing horizontal padding and increasing the column's
   natural width by removing the max-width cap allows the
   headline to break more naturally.
   ============================================================ */

.hero-text {
  padding:   var(--space-8) var(--space-8);
  min-width: 0;
}

/* Headline — force natural line breaks at semantic points */
.hero-headline {
  word-spacing:   0.04em;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  .hero-text {
    padding: var(--space-5) var(--space-5);
  }
}


/* ============================================================
   P4.  Hero video / gif-wrap — southeast drop shadow
   Adds a soft shadow offset toward bottom-right that gives
   the video frame a sense of depth and removes the blue tint
   by neutralising the glow-blue in light mode.
   ============================================================ */

.gif-wrap {
  box-shadow:
    0 0 0 1px var(--color-border-subtle),
    8px 12px 40px rgba(0, 0, 0, 0.45),
    16px 24px 60px rgba(0, 0, 0, 0.25);
}

html.theme-light .gif-wrap {
  box-shadow:
    0 0 0 1px var(--color-border),
    8px 12px 40px rgba(15, 26, 15, 0.22),
    16px 24px 60px rgba(15, 26, 15, 0.12);
}


/* ============================================================
   P5.  Publication cards — pub-eyebrow bold, pub-doi-string
   "ZENODO ARCHIVE", "SOURCE CODE", "ROBOFLOW UNIVERSE" labels
   get Sans Bold. The DOI string at card bottom gets lifted
   from muted to text-2.
   ============================================================ */

.pub-eyebrow {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  letter-spacing: 0.10em;
  color:          var(--color-teal);
}

.pub-doi-string {
  color:       var(--color-text-2);
  font-weight: 500;
}


/* ============================================================
   P6.  Footer brand — more distinctive than nav logo
   The nav logo uses .nav-logo (mono, 600 weight).
   The footer brand gets Serif italic for contrast and
   personality — same teal, slightly larger, italic weight.
   ============================================================ */

.footer-brand {
  font-family:    var(--font-serif);
  font-size:      var(--text-base);
  font-weight:    600;
  font-style:     italic;
  color:          var(--color-teal);
  letter-spacing: 0.04em;
}


/* ============================================================
   P7.  About page — full visual overhaul
   Every section gets richer treatment: gradient hero, teal
   accent lines on cards, bolder section labels, distinct
   component-num style, ecosystem cards with left border
   accents, FAIR cards with large letter backdrop, quality
   block refinement, link cards with hover fill, author
   section with stronger contrast.
   ============================================================ */

/* -- About hero — gradient accent background */
.about-hero {
  background:     linear-gradient(
                    160deg,
                    var(--color-bg) 60%,
                    rgba(0, 201, 167, 0.05) 100%
                  );
  padding-bottom: var(--space-24);
  position:       relative;
}

.about-hero::after {
  content:    '';
  position:   absolute;
  bottom:     0;
  left:       0;
  right:      0;
  height:     1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-teal),
    transparent
  );
  opacity: 0.35;
}

html.theme-light .about-hero {
  background: linear-gradient(
    160deg,
    var(--color-bg) 60%,
    rgba(22, 101, 52, 0.05) 100%
  );
}

/* Teal accent left-border on h1 */
.about-hero h1 {
  padding-left:  var(--space-5);
  border-left:   4px solid var(--color-teal);
  margin-left:   0;
}

.about-hero-lead {
  font-size:    var(--text-xl);
  font-weight:  400;
  color:        var(--color-text-2);
  padding-left: var(--space-5);
  border-left:  4px solid transparent; /* keeps alignment with h1 */
}


/* -- Section label on about page — stronger */
.about-section .section-label,
.about-hero .section-label,
.about-author-section .section-label {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          var(--color-teal);
  letter-spacing: 0.14em;
  margin-bottom:  var(--space-3);
}


/* -- Component cards — richer, with teal top stripe */
.about-component-card {
  border-top:     3px solid var(--color-teal);
  border-radius:  0 0 var(--radius-lg) var(--radius-lg);
  background:     var(--color-surface);
  box-shadow:     0 2px 12px rgba(0, 0, 0, 0.12);
  transition:     transform       var(--transition-base),
                  box-shadow      var(--transition-base),
                  border-color    var(--transition-base);
}

.about-component-card:hover {
  border-top-color: var(--color-blue);
  transform:        translateY(-3px);
  box-shadow:       0 8px 28px rgba(0, 201, 167, 0.15);
}

html.theme-light .about-component-card:hover {
  box-shadow: 0 8px 28px rgba(22, 101, 52, 0.14);
}

/* Component number badge */
.about-component-num {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          var(--color-teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Component tags — match platform-tag pill style */
.about-tag {
  font-family:   var(--font-sans);
  font-size:     var(--text-xs);
  font-weight:   600;
  color:         var(--color-teal);
  background:    rgba(0, 201, 167, 0.08);
  border:        1px solid rgba(0, 201, 167, 0.20);
  border-radius: var(--radius-sm);
  padding:       2px var(--space-2);
  letter-spacing: 0.02em;
}

html.theme-light .about-tag {
  background: rgba(22, 101, 52, 0.07);
  border:     1px solid rgba(22, 101, 52, 0.18);
  color:      var(--color-teal);
}


/* -- Ecosystem cards — left accent border, hover lift */
.about-ecosystem-card {
  border-left:  3px solid var(--color-border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition:   border-color  var(--transition-fast),
                box-shadow    var(--transition-fast),
                transform     var(--transition-fast);
}

.about-ecosystem-card:hover {
  border-left-color: var(--color-teal);
  transform:         translateY(-2px);
  box-shadow:        0 4px 16px rgba(0, 201, 167, 0.10);
}

html.theme-light .about-ecosystem-card:hover {
  box-shadow: 0 4px 16px rgba(22, 101, 52, 0.10);
}

.about-ecosystem-card h3 {
  font-family: var(--font-serif);
  font-size:   var(--text-lg);
  font-weight: 600;
  color:       var(--color-text);
  margin:      0 0 var(--space-2);
}

.about-ecosystem-card p {
  color: var(--color-text-2);
}


/* -- FAIR cards — large letter as visual backdrop + hover lift */
.about-fair-grid {
  gap: var(--space-5);
}

.about-fair-card {
  position:      relative;
  overflow:      hidden;
  border-top:    3px solid var(--color-teal);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding:       var(--space-8);
  transition:    transform   var(--transition-base),
                 box-shadow  var(--transition-base);
}

.about-fair-card:hover {
  transform:  translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 201, 167, 0.12);
}

html.theme-light .about-fair-card:hover {
  box-shadow: 0 8px 28px rgba(22, 101, 52, 0.12);
}

/* Large decorative letter behind card content */
.about-fair-letter {
  font-family:   var(--font-serif);
  font-size:     var(--text-6xl);
  font-weight:   600;
  color:         var(--color-teal);
  line-height:   1;
  margin-bottom: var(--space-4);
  opacity:       1;
}

.about-fair-card h3 {
  font-family:  var(--font-serif);
  font-size:    var(--text-lg);
  font-weight:  600;
  color:        var(--color-text);
  margin:       0 0 var(--space-3);
}


/* -- Link cards ("Get started") — more defined, hover fill */
.about-link-card {
  border-top:     3px solid var(--color-border);
  border-radius:  0 0 var(--radius-lg) var(--radius-lg);
  min-width:      200px;
  flex:           1;
  transition:     border-top-color var(--transition-fast),
                  transform        var(--transition-fast),
                  box-shadow       var(--transition-fast),
                  background-color var(--transition-fast);
}

.about-link-card:hover {
  border-top-color: var(--color-teal);
  background-color: var(--color-surface-2);
  transform:        translateY(-3px);
  box-shadow:       0 6px 20px rgba(0, 201, 167, 0.12);
}

html.theme-light .about-link-card:hover {
  box-shadow: 0 6px 20px rgba(22, 101, 52, 0.12);
}

.about-link-card-label {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  color:          var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.about-link-card-title {
  font-family:  var(--font-serif);
  font-size:    var(--text-lg);
  font-weight:  600;
  color:        var(--color-teal);
}


/* -- About section headers — stronger visual hierarchy */
.about-section-header h2 {
  font-size:    var(--text-4xl);
  padding-left: var(--space-4);
  border-left:  3px solid var(--color-teal);
}


/* -- Quality block — richer */
.about-quality-block {
  border-top: 3px solid var(--color-teal);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.about-quality-threshold {
  font-family: var(--font-sans);
  font-size:   var(--text-sm);
  color:       var(--color-text-2);
  font-weight: 500;
}

.about-quality-threshold strong {
  font-size: var(--text-base);
}


/* -- Author section — stronger contrast */
.about-author-section {
  border-top: 3px solid var(--color-teal);
}

.about-author-content h2 {
  font-size:    var(--text-4xl);
  padding-left: var(--space-4);
  border-left:  3px solid var(--color-teal);
}

.about-author-content p {
  font-size:   var(--text-base);
  color:       var(--color-text-2);
  line-height: 1.85;
}


/* -- Citation block — stronger left accent */
.about-citation-block {
  border-left-width: 4px;
  border-top:        2px solid var(--color-teal);
}


/* -- Collab CTA button on about author section */
.about-collab-cta {
  display:        inline-flex;
  align-items:    center;
  gap:            var(--space-2);
  margin-top:     var(--space-8);
  padding:        var(--space-3) var(--space-6);
  background:     var(--color-teal);
  color:          var(--color-bg) !important;
  font-family:    var(--font-sans);
  font-weight:    700;
  font-size:      var(--text-sm);
  letter-spacing: 0.04em;
  border-radius:  var(--radius-md);
  text-decoration:none;
  transition:     opacity var(--transition-fast),
                  transform var(--transition-fast);
}

.about-collab-cta:hover {
  opacity:   0.88;
  transform: translateY(-1px);
}

.about-collab-dot {
  width:         8px;
  height:        8px;
  border-radius: 50%;
  background:    rgba(255, 255, 255, 0.7);
  animation:     audtheia-glowPulse 2.5s ease-in-out infinite;
  flex-shrink:   0;
}
/* =============================================================
   STYLE.CSS — SESSION 9 FINAL PATCH
   Append after Session 9 Final Polish Patch.
   Covers: table-th word-wrap, theme transition simultaneity,
   hero panel + headline, full gif-frame shadow,
   classifier ID color, INPUT/OUTPUT node distinction,
   about-page alternating section backgrounds.
   ============================================================= */


/* ----------------------------------------------------------
   F1.  Credential table headers — allow word wrapping
   "CARTOGRAPHY MAPPER" was cut off because white-space: nowrap
   was set in the base rule and our correction patch did not
   override it. Allow wrapping with tighter padding.
   ---------------------------------------------------------- */

.cred-table th {
  white-space: normal;
  word-break:  break-word;
  padding:     var(--space-2) var(--space-3);
  line-height: 1.35;
  vertical-align: bottom;
}


/* ----------------------------------------------------------
   F2.  Theme transition — everything changes simultaneously
   The backdrop-filter on .hero-text creates a GPU compositing
   layer that repaints independently. Adding opacity to the
   global theme-transitioning rule and fading .hero-text
   slightly ensures the panel change is imperceptible.
   box-shadow added so the video shadow transitions in sync.
   ---------------------------------------------------------- */

html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition:
    background-color 0.3s ease,
    color            0.3s ease,
    border-color     0.3s ease,
    fill             0.3s ease,
    stroke           0.3s ease,
    opacity          0.3s ease,
    box-shadow       0.3s ease !important;
}

html.theme-transitioning .hero-text {
  opacity: 0.88;
}


/* ----------------------------------------------------------
   F3.  Hero headline — encourage natural four-line breaks
   Setting max-width to ~14ch on the headline element nudges
   the browser to break after "monitoring", "intersection",
   "vision", and "AI" without hardcoding <br> tags.
   Works responsively: max-width removed on narrow screens.
   The hero-text panel gets more horizontal padding so it
   does not look like a narrow white column.
   ---------------------------------------------------------- */

.hero-text {
  padding: var(--space-10) var(--space-10);
}

.hero-headline {
  max-width:    13ch;
  word-break:   normal;
  overflow-wrap: normal;
  line-height:   1.12;
}

@media (max-width: 960px) {
  .hero-headline { max-width: none; }
  .hero-text     { padding: var(--space-8) var(--space-8); }
}

@media (max-width: 768px) {
  .hero-text { padding: var(--space-6) var(--space-5); }
}


/* ----------------------------------------------------------
   F4.  Hero media — drop shadow on the entire gif-frame
   Previously shadow was on .gif-wrap (video only).
   CSS filter: drop-shadow() respects the composite shape
   of the entire .gif-frame (video + caption card together),
   so the shadow wraps the whole unit pointing southeast.
   .gif-wrap reverts to its original glow-only shadow.
   ---------------------------------------------------------- */

.gif-wrap {
  box-shadow:
    0 0 0 1px var(--color-border-subtle),
    0 0 60px var(--color-glow-teal),
    0 0 120px rgba(0, 201, 167, 0.04);
}

html.theme-light .gif-wrap {
  box-shadow: 0 0 0 1px var(--color-border);
}

.gif-frame {
  filter:     drop-shadow(10px 14px 40px rgba(0, 0, 0, 0.50))
              drop-shadow(4px  6px  16px rgba(0, 0, 0, 0.28));
  transition: filter 0.3s ease;
}

html.theme-light .gif-frame {
  filter: drop-shadow(10px 14px 36px rgba(15, 26, 15, 0.22))
          drop-shadow(4px  6px  14px rgba(15, 26, 15, 0.14));
}


/* ----------------------------------------------------------
   F5.  Classifier ID — teal color
   The "official-porifera-classifier-ju8er/12" mono string
   below the video gets the teal accent so it reads as live
   data, not decorative footer text.
   ---------------------------------------------------------- */

.gif-caption .mono {
  color:       var(--color-teal);
  font-family: var(--font-mono);
  font-size:   var(--text-sm);
  font-weight: 500;
}


/* ----------------------------------------------------------
   F6.  Pipeline INPUT / OUTPUT nodes — visually distinct
   IO nodes (INPUT / OUTPUT) now use color-blue (sky in dark,
   amber in light) with a dashed border and muted text,
   clearly bookending the platform nodes without blending in.
   ---------------------------------------------------------- */

.pipeline-node--io {
  background:  transparent;
  border:      2px dashed var(--color-blue) !important;
  border-top:  2px dashed var(--color-blue) !important;
  box-shadow:  none;
}

.pipeline-node--io .pipeline-node-label {
  color: var(--color-blue);
}

.pipeline-node--io .pipeline-node-name {
  color:      var(--color-text-2);
  font-weight: 600;
}

.pipeline-node--io .pipeline-node-sub {
  color: var(--color-text-muted);
}

html.theme-light .pipeline-node--io {
  background:  rgba(146, 64, 14, 0.04);
  border:      2px dashed var(--color-blue) !important;
  border-top:  2px dashed var(--color-blue) !important;
  box-shadow:  none;
}

html.theme-light .pipeline-node--io .pipeline-node-label {
  color: var(--color-blue);
}

html.theme-light .pipeline-node--io .pipeline-node-name {
  color: var(--color-text-2);
}


/* ----------------------------------------------------------
   F7.  About page — alternating section backgrounds
   about-section spans full viewport width naturally (no
   max-width on it). Even sections get a surface fill,
   odd sections get the page background with a faint gradient.
   This creates visual rhythm like the Dashboard reference.
   ---------------------------------------------------------- */

.about-section:nth-child(odd) {
  background: var(--color-bg);
}

.about-section:nth-child(even) {
  background: var(--color-surface);
}

/* Teal gradient accent on even sections — very subtle */
.about-section:nth-child(even)::after {
  content:    '';
  display:    block;
  height:     1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-teal) 50%,
    transparent 100%
  );
  opacity: 0.18;
  margin-top: var(--space-20);
}

html.theme-light .about-section:nth-child(odd) {
  background: var(--color-bg);
}

html.theme-light .about-section:nth-child(even) {
  background: var(--color-surface);
}
/* =============================================================
   STYLE.CSS — SESSION 9 FINAL FIX PATCH
   Append after all previous patches.
   Covers: IO node hover, hero column width, hero background-
   color transition fix (simultaneous theme switch), psc-badge
   and psc-link contrast/weight improvements.
   ============================================================= */


/* ----------------------------------------------------------
   G1.  Pipeline IO nodes — hover highlight
   INPUT and OUTPUT nodes had no hover state. Adding the same
   border-color change that platform nodes already have, but
   using color-blue (their accent color) instead of teal.
   ---------------------------------------------------------- */

.pipeline-node--io:hover {
  border-color: var(--color-blue) !important;
  background:   rgba(56, 189, 248, 0.06);
}

html.theme-light .pipeline-node--io:hover {
  background: rgba(146, 64, 14, 0.07);
}


/* ----------------------------------------------------------
   G2.  Hero layout — wider text column, more room for body
   The default 1fr 1fr grid gives equal space to text and video.
   Shifting to a slightly wider text column (1.15fr vs 0.85fr)
   gives the headline and body paragraph enough room to avoid
   awkward single-word line breaks, without touching HTML.
   ---------------------------------------------------------- */

.hero-inner {
  grid-template-columns: 1.15fr 0.85fr;
}

/* Headline — remove the hard 13ch cap from the previous patch
   and instead let the wider column do the work naturally.
   The headline will break at "monitoring", "intersection",
   "vision" / "AI" naturally at this column width. */
.hero-headline {
  max-width: none;
  font-size:  var(--text-5xl);
  line-height: 1.12;
}

/* Hero body — allow more characters per line at wider column */
.hero-body {
  max-width: 62ch;
}

/* Restore equal columns on tablet where both are squished */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* Stack on mobile */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}


/* ----------------------------------------------------------
   G3.  Theme transition simultaneity — definitive fix
   Root cause: the hero uses background-image (a CSS gradient
   using color variables). background-image cannot be
   interpolated/transitioned — it snaps instantly when the
   class changes. background-color CAN transition.

   Fix: add an explicit background-color to .hero that matches
   --color-bg. During theme-transitioning this color transitions
   smoothly and visually masks the instant background-image
   snap, since the image is semi-transparent and sits on top.

   This is the only reliable CSS-only solution to background-
   image transition mismatch without JS rewriting the gradient.
   ---------------------------------------------------------- */

.hero {
  background-color: var(--color-bg);
  transition: background-color 0.3s ease;
}

/* Extend the transition rule to cover all elements fully.
   Previous patches added opacity and box-shadow — this
   version also explicitly targets background-color on the
   elements that were visibly lagging: cards, sections, nav. */
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition:
    background-color 0.3s ease,
    background       0.3s ease,
    color            0.3s ease,
    border-color     0.3s ease,
    fill             0.3s ease,
    stroke           0.3s ease,
    opacity          0.3s ease,
    box-shadow       0.3s ease !important;
}

/* Hero text panel — match transition timing exactly */
html.theme-transitioning .hero-text {
  transition:
    background-color 0.3s ease,
    background       0.3s ease,
    border-color     0.3s ease,
    opacity          0.3s ease !important;
}

/* Force the hero background-color to transition on theme change */
html.theme-light .hero {
  background-color: var(--color-bg);
}


/* ----------------------------------------------------------
   G4.  Platform carousel — psc-badge bolder, psc-link more
   visible and colored.
   The "API key", "Account", "Free tier" badge text was thin
   mono; switching to Sans Bold makes it read as a proper tag.
   The ".com →" link gets colored (teal/amber) and bold so
   it matches the richness of the zenodo DOI string.
   ---------------------------------------------------------- */

.psc-badge {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    700;
  letter-spacing: 0.06em;
  padding:        2px var(--space-2);
  border-radius:  var(--radius-sm);
  border:         1px solid currentColor;
  display:        inline-block;
  opacity:        0.85;
}

.psc-badge--key {
  color:      var(--color-teal);
  background: rgba(0, 201, 167, 0.08);
}

.psc-badge--account {
  color:      var(--color-teal);
  background: rgba(0, 201, 167, 0.08);
}

.psc-badge--free {
  color:      var(--color-text-2);
  background: transparent;
  opacity:    0.7;
}

html.theme-light .psc-badge--key,
html.theme-light .psc-badge--account {
  color:      var(--color-teal);
  background: rgba(22, 101, 52, 0.07);
}

/* Link — colored (teal in dark mode, amber in light) + bold */
.psc-link {
  font-family:    var(--font-mono);
  font-size:      var(--text-xs);
  font-weight:    600;
  color:          var(--color-teal);
  letter-spacing: 0.02em;
  border:         1px solid var(--color-border-subtle);
  border-radius:  var(--radius-sm);
  padding:        var(--space-1) var(--space-2);
  transition:     color        var(--transition-fast),
                  border-color var(--transition-fast),
                  background   var(--transition-fast);
}

.psc-link:hover {
  color:        var(--color-text);
  border-color: var(--color-teal);
  background:   var(--color-glow-teal);
}

html.theme-light .psc-link {
  color: var(--color-teal);
}

html.theme-light .psc-link:hover {
  color:      var(--color-text);
  background: rgba(22, 101, 52, 0.06);
}

/* psc-name — bolder for visual hierarchy */
.psc-name {
  font-weight: 700;
  color:       var(--color-text);
}

/* ─── Session 10 Patch ─────────────────────────────────────────────────────
   1. Platform carousel link color in light mode (warm amber/brown)
   2. Nav logo image layout
   ──────────────────────────────────────────────────────────────────────── */

html.theme-light .psc-link {
  color: #92400E;
}

.nav-logo {
  display:     flex;
  align-items: center;
  gap:         var(--space-2);
}

.nav-logo-img {
  height:  28px;
  width:   auto;
  display: block;
}

/* ─── Session 11 Patch ─────────────────────────────────────────────────────
   Hero headline — restore mobile font-size overrides.
   The S9e append set font-size: var(--text-5xl) unconditionally,
   overriding the earlier responsive rules. These re-establish them.
   ──────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .hero-headline {
    font-size: var(--text-4xl); /* 36px — tablet */
  }
}

@media (max-width: 600px) {
  .hero-headline {
    font-size: var(--text-3xl); /* 30px — mobile */
  }
}
/* =============================================================
   SECTION 21 — Dashboard settings legibility + illustration
   mobile scaling fix
   Appended by Session 12 — do not edit earlier sections
   ============================================================= */


/* ----------------------------------------------------------
   21.1  Settings panel — human-readable labels and hints
   Previous rules set IBM Plex Mono on both the field labels and
   the instructional hint text below each input. Mono is reserved
   for actual data values (species names, IDs, coordinates) per
   the site's type system; long-form instructional copy reads
   better in IBM Plex Sans, the site's body font. Hint color is
   also raised from --color-text-2 to --color-text for stronger
   contrast against the surface background in both themes. Inline
   <code> tokens inside hints keep IBM Plex Mono and the teal
   accent color (set in Section 17B) since those are literal
   values the user copies, not prose.
   ---------------------------------------------------------- */

.settings-label {
  font-family: var(--font-sans);
}

.settings-hint {
  font-family: var(--font-sans);
  color: var(--color-text);
}


/* ----------------------------------------------------------
   21.2  Page illustration — fix mobile squashing
   viewBox is 1440x80 (an 18:1 ratio). The previous fixed 56px
   height on screens 640px and under scaled the artwork's height
   far more than its width, visually compressing the coral/fern
   shapes sideways. Stepping the height down further — and adding
   a tighter breakpoint for actual phone widths — brings the two
   scale factors close enough together that the shapes read
   correctly again.
   ---------------------------------------------------------- */

@media (max-width: 640px) {
  .page-illustration { height: 42px; }
}

@media (max-width: 480px) {
  .page-illustration { height: 28px; }
}
