﻿/* ==========================================================================
   Froggy Insights — Editorial Naturalist Field Guide & Amphibian Toolkit
   Bespoke CSS Design System (No Frameworks, Zero Bloat, WCAG AA+ Contrast)
   ========================================================================== */

:root {
  --bg: #F6F4EC;
  --bg-elevated: #FDFCF8;
  --bg-tint: #ECE9DC;
  --bg-deep: #13251B;
  --bg-deep-2: #1B3426;
  --ink: #14241B;
  --ink-2: #384D40;
  --ink-muted: #586B5F;
  --accent: #226442;
  --accent-hover: #194D32;
  --accent-soft: #DFEFE5;
  --amber: #A64319;
  --amber-hover: #8A3413;
  --amber-soft: #F9EAE2;
  --line: #DCD7C7;
  --line-strong: #C2BAA4;
  --shadow-sm: 0 1px 2px rgba(20, 36, 27, 0.05);
  --shadow-md: 0 8px 24px rgba(20, 36, 27, 0.07);
  --shadow-lg: 0 20px 48px rgba(19, 37, 27, 0.14);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1200px;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-deep);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: var(--radius-sm);
}

/* Container & Utilities */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4.5rem 0;
}

.section--tint {
  background: var(--bg-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--deep {
  background: var(--bg-deep);
  color: #F4F2EA;
}

.section--deep a {
  color: #A8DEC0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section--deep .eyebrow {
  color: #93D2AF;
}

.eyebrow--amber {
  color: var(--amber);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.section--deep h1,
.section--deep h2,
.section--deep h3 {
  color: #F8F6EE;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

.lead {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 62ch;
}

.section--deep .lead {
  color: #D2DDD6;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Site Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 236, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--bg-deep);
  color: #9BE0B8;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-sub {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  border-left: 1px solid var(--line-strong);
  padding-left: 0.65rem;
}

@media (min-width: 960px) {
  .brand-sub { display: inline-block; }
}

.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 820px) {
  .main-nav { display: flex; }
}

.nav-link {
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.93rem;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  cursor: pointer;
}

@media (min-width: 820px) {
  .nav-toggle { display: none; }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 0.75rem 1.25rem 1.25rem;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #FFFFFF;
}

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

.btn--secondary:hover {
  background: var(--bg-tint);
  color: var(--ink);
}

.btn--amber {
  background: var(--amber);
  color: #FFFFFF;
}

.btn--amber:hover {
  background: var(--amber-hover);
  color: #FFFFFF;
}

.btn--sm {
  padding: 0.48rem 0.85rem;
  font-size: 0.84rem;
}

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: var(--bg-tint);
  color: var(--ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--bg-tint);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.badge--green {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: #BFE0CC;
}

.badge--amber {
  background: var(--amber-soft);
  color: #9A3B14;
  border-color: #EFC7B5;
}

/* ==========================================================================
   Editorial Hero
   ========================================================================== */

.hero {
  padding: 3.25rem 0 4rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #F6F4EC 0%, #EFECE1 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
  }
}

.hero-title {
  margin-bottom: 1rem;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.hero-figure {
  margin: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-2);
  background: var(--bg-elevated);
}

.hero-caption code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
}

/* ==========================================================================
   Section Headers & Grids
   ========================================================================== */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--ink-2);
  max-width: 60ch;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 760px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1020px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   Cards (Editorial & Tool Cards)
   ========================================================================== */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

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

.tool-card-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 0.65rem;
}

.tool-card h3 {
  margin-bottom: 0.5rem;
}

.tool-card p {
  margin: 0 0 1.25rem;
  color: var(--ink-2);
  font-size: 0.94rem;
  flex-grow: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* ==========================================================================
   Frog Call & Species Identifier UI
   ========================================================================== */

.filter-bar {
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 700px) {
  .filter-grid {
    grid-template-columns: 1.5fr repeat(4, 1fr);
  }
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.field input[type="text"],
.field input[type="search"],
.field input[type="number"],
.field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 100, 66, 0.14);
}

.filter-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.14s ease;
}

.pill-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill-btn.is-active {
  background: var(--bg-deep);
  border-color: var(--bg-deep);
  color: #F8F6EE;
}

/* Species Card */
.species-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.species-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.species-card.is-playing {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(196, 85, 38, 0.22);
}

.species-head {
  padding: 1.15rem 1.25rem 0.85rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.species-name {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.species-latin {
  font-style: italic;
  font-size: 0.84rem;
  color: var(--ink-muted);
  display: block;
}

.species-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(20, 36, 27, 0.14);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.species-audio-bar {
  margin: 0 1.25rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.play-call-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.play-call-btn:hover {
  background: var(--accent-hover);
}

.species-card.is-playing .play-call-btn {
  background: var(--amber);
}

.call-meta {
  flex: 1;
  min-width: 0;
}

.call-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  display: block;
}

.call-desc {
  font-size: 0.8rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.waveform-canvas {
  width: 68px;
  height: 28px;
  flex-shrink: 0;
}

.species-body {
  padding: 0.9rem 1.25rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.species-summary {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.55;
  flex: 1;
}

.species-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.species-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

/* Specimen Detail Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 37, 27, 0.58);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.modal-panel {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

@media (min-width: 600px) {
  .spec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.spec-cell {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.spec-cell dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.spec-cell dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

/* ==========================================================================
   Interactive Calculator Workbenches
   ========================================================================== */

.workbench {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 900px) {
  .workbench {
    grid-template-columns: 0.95fr 1.05fr;
  }
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.panel--sticky {
  position: sticky;
  top: 88px;
}

.control-group {
  margin-bottom: 1.35rem;
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.control-value {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.35rem;
  background: var(--bg);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
}

.segmented button {
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.14s ease;
}

.segmented button.is-active {
  background: var(--bg-deep);
  color: #F8F6EE;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 520px) {
  .kpi-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.kpi-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.kpi-box--highlight {
  background: var(--bg-deep);
  border-color: var(--bg-deep);
  color: #F8F6EE;
}

.kpi-box--highlight .kpi-label {
  color: #A5C9B4;
}

.kpi-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.kpi-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

.kpi-sub {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.2rem;
  opacity: 0.85;
}

.blueprint-frame {
  background: #102018;
  border-radius: var(--radius-md);
  padding: 0;
  margin-bottom: 1.25rem;
  color: #CDE6D8;
  border: 1px solid #244233;
  overflow: hidden;
  position: relative;
}

.viewer-3d-shell {
  position: relative;
  width: 100%;
  background: #16241C;
}

.viewer-3d-canvas-wrap {
  width: 100%;
  height: 380px;
  cursor: grab;
}

.viewer-3d-canvas-wrap:active {
  cursor: grabbing;
}

.viewer-3d-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.viewer-3d-hud-top {
  position: absolute;
  top: 0.7rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
}

.v3d-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #E7F4EC;
  background: rgba(16, 30, 23, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(147, 210, 175, 0.28);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.v3d-controls {
  display: inline-flex;
  gap: 0.3rem;
  pointer-events: auto;
}

.v3d-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 5px;
  border: 1px solid rgba(147, 210, 175, 0.28);
  background: rgba(16, 30, 23, 0.78);
  backdrop-filter: blur(6px);
  color: #C7DCD0;
  cursor: pointer;
  transition: all 0.14s ease;
}

.v3d-btn:hover {
  color: #FFFFFF;
  border-color: #93D2AF;
}

.v3d-btn.is-active {
  background: var(--accent);
  border-color: #6DC394;
  color: #FFFFFF;
}

.viewer-3d-hud-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: #101C15;
  border-top: 1px solid #223B2D;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #95B4A3;
}

.callout {
  padding: 0.9rem 1.05rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.9rem;
  margin: 1rem 0;
}

.callout--warn {
  border-left-color: var(--amber);
  background: var(--amber-soft);
  color: #5C2108;
}

/* Cost Checklist Table */
.checklist-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checklist-price {
  width: 82px;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.35rem 0.5rem !important;
}

/* Weekly Feeding Calendar */
.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.day-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  min-height: 122px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.day-card--feed {
  background: var(--bg-elevated);
  border-color: #B4D7C2;
}

.day-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.day-card--feed .day-name {
  color: var(--accent);
}

.day-dust {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.dust-ca { background: var(--accent-soft); color: var(--accent-hover); }
.dust-d3 { background: var(--amber-soft); color: #9A3B14; }
.dust-multi { background: #E7E3F5; color: #43327A; }
.dust-rest { background: var(--bg-tint); color: var(--ink-muted); }

/* ==========================================================================
   Guides Directory & Editorial Article Page
   ========================================================================== */

.guide-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.15s ease;
}

.guide-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}

.guide-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-deep-2);
  overflow: hidden;
  position: relative;
}

.guide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-card-body {
  padding: 1.2rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.guide-card-body h3 {
  font-size: 1.12rem;
  line-height: 1.3;
  margin: 0.4rem 0 0.55rem;
}

.guide-card-body p {
  margin: 0 0 1rem;
  font-size: 0.89rem;
  color: var(--ink-2);
  flex: 1;
}

.guide-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Magazine Editorial Article Layout & Rich Prose Components
   ========================================================================== */

.read-progress {
  position: fixed;
  top: 68px;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--amber) 100%);
  z-index: 120;
  transition: width 0.08s linear;
}

.article-header {
  padding: 2.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #F1EFE5 0%, #EAE6D7 100%);
}

.article-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .article-hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.75rem;
  }
}

.article-deck {
  font-size: 1.08rem;
  line-height: 1.62;
  color: var(--ink-2);
  margin: 0.85rem 0 1.25rem;
  max-width: 58ch;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.article-hero-figure {
  margin: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.article-hero-figure figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-bottom: 0.85rem;
}

.breadcrumbs a {
  color: var(--ink-2);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding: 2.75rem 0 4rem;
  align-items: start;
}

@media (min-width: 980px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 3rem;
  }
}

.article-main-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.65rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 700px) {
  .article-main-card {
    padding: 2.5rem 2.75rem;
  }
}

.takeaways-box {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
}

.takeaways-box h2 {
  font-family: var(--font-mono) !important;
  font-size: 0.76rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent) !important;
  margin: 0 0 0.75rem !important;
  padding: 0 !important;
  border: none !important;
}

.takeaways-box ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.takeaways-box li {
  margin-bottom: 0.4rem;
}

.prose {
  max-width: 68ch;
  font-size: 1.04rem;
  line-height: 1.8;
  color: var(--ink);
}

.prose > p:first-of-type::first-letter {
  font-family: var(--font-serif);
  float: left;
  font-size: 3.3rem;
  line-height: 0.85;
  font-weight: 700;
  color: var(--accent);
  padding-right: 0.55rem;
  padding-top: 0.2rem;
}

.prose h2 {
  font-size: clamp(1.42rem, 2.3vw, 1.72rem);
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.prose h3 {
  font-size: 1.22rem;
  margin-top: 1.75rem;
  margin-bottom: 0.55rem;
  color: var(--bg-deep-2);
}

.prose p {
  margin: 0 0 1.25rem;
  color: #1F3127;
}

.prose ul, .prose ol {
  margin: 0 0 1.45rem;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.5rem;
  color: #1F3127;
}

.prose li::marker {
  color: var(--accent);
  font-weight: 700;
}

.prose blockquote {
  margin: 1.75rem 0;
  padding: 1.15rem 1.35rem;
  background: var(--bg);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
}

/* Crisp Styled Data Tables inside Articles */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--bg-elevated);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.91rem;
  min-width: 420px;
}

.prose thead th,
.prose tr:first-child th {
  background: var(--bg-deep);
  color: #F4F2EA;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #244031;
}

.prose td {
  padding: 0.78rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: top;
}

.prose tbody tr:nth-child(even) {
  background: var(--bg);
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

/* Rich In-Article Editorial Figures */
.article-figure {
  margin: 2.1rem 0;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0;
  border: none;
  border-radius: 0;
}

.article-figure figcaption {
  padding: 0.75rem 1.05rem;
  font-size: 0.83rem;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
}

.article-figure figcaption strong {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* Embedded Mid-Article Interactive Tool Promo */
.mid-tool-banner {
  margin: 2.25rem 0;
  padding: 1.35rem 1.5rem;
  background: var(--bg-deep);
  color: #F4F2EA;
  border-radius: var(--radius-md);
  border: 1px solid #254634;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mid-tool-banner h3 {
  color: #FFFFFF !important;
  margin: 0.2rem 0 0.25rem !important;
  font-size: 1.15rem !important;
}

.mid-tool-banner p {
  margin: 0 !important;
  font-size: 0.88rem !important;
  color: #C7D7CE !important;
}

/* Interactive FAQ Accordion */
.faq-list {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0 1.75rem;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.15rem 1rem;
}

.faq-item summary {
  padding: 0.85rem 0;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: '−';
  color: var(--amber);
}

.faq-answer {
  padding: 0 0 0.95rem;
  font-size: 0.94rem;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.prose .article-figure img {
  margin: 0;
  border: none;
  border-radius: 0;
}

.prose > img,
.prose p > img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  border: 1px solid var(--line);
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #101C15;
  box-shadow: var(--shadow-sm);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 980px) {
  .sidebar-stack {
    position: sticky;
    top: 88px;
  }
}

.toc-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.toc-box h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  margin-bottom: 0.25rem;
}

.toc-list a {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--ink-2);
  display: block;
  padding: 0.3rem 0.55rem;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all 0.14s ease;
}

.toc-list a:hover,
.toc-list a.is-active {
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 600;
}

.related-section {
  padding: 3.5rem 0 4rem;
  background: var(--bg-tint);
  border-top: 1px solid var(--line);
}

/* Clean AdSense Container (Zero Layout Shift) */
.ad-slot-wrap {
  margin: 2rem 0;
  padding: 0.75rem;
  background: var(--bg-tint);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  text-align: center;
  min-height: 110px;
}

.ad-slot-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--bg-deep);
  color: #D2DDD6;
  padding: 3.75rem 0 2.25rem;
  border-top: 1px solid #244031;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #253F31;
}

@media (min-width: 780px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  color: #F8F6EE;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93D2AF;
  margin-bottom: 0.9rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #D6E1DA;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: #9EB4A7;
}

/* ==========================================================================
   Quiz Styling
   ========================================================================== */

.quiz-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
  width: 100%;
  padding: 1rem 1.15rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.14s ease;
}

.quiz-option:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.quiz-option.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(34, 100, 66, 0.2);
}

.quiz-option strong {
  font-size: 0.98rem;
  color: var(--ink);
}

.quiz-option span {
  font-size: 0.84rem;
  color: var(--ink-2);
}

/* Print Styles */
@media print {
  .site-header, .site-footer, .no-print, .ad-slot-wrap {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .panel {
    border: 1px solid #999;
    box-shadow: none;
  }
}


/* ==========================================================================
   QA PASS — 2026-11-29
   Fixes from the design review. Appended so the originals stay readable.
   ========================================================================== */

/* --- 1. Contain intrinsic width. Without this, .prose table {min-width:420px}
       propagates up and gives 26 article pages a horizontal scrollbar on
       phones (measured: 78–199px of overflow at a 390px viewport). --------- */
.article-layout,
.article-main-card,
.prose,
.prose figure,
.prose .table-wrap {
  min-width: 0;
}

/* --- 2. Reading measure. Figures, tables and callouts stay full width. --- */
.prose > p,
.prose > ul,
.prose > ol,
.prose > dl,
.prose > blockquote,
.prose > h2,
.prose > h3,
.prose > h4,
.prose > h5 {
  max-width: 72ch;
}

/* --- 3. Prose links must read as links, not as coloured words --- */
.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: rgba(34, 100, 66, 0.38);
}
.prose a:hover {
  text-decoration-color: currentColor;
}
.prose a.btn {
  text-decoration: none;
}

/* --- 4. Editorial takeaway list (replaces 8 legacy neon inline colours) --- */
.takeaway-list {
  list-style: disc;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.95rem 1.15rem 0.95rem 2rem;
  margin: 1.5rem 0;
  max-width: 72ch;
}
.takeaway-list li {
  margin-bottom: 0.4rem;
}
.takeaway-list li:last-child {
  margin-bottom: 0;
}

/* --- 5. Sidebar atlas CTA as a component (was 4 inline styles × 35 pages) -- */
.panel--atlas {
  background: var(--bg-deep);
  border-color: #244233;
  color: #F4F2EA;
}
.panel--atlas .eyebrow {
  color: #93D2AF;
}
.panel--atlas h3 {
  color: #F8F6EE;
  font-size: 1.15rem;
}
.panel--atlas p {
  color: #C8D7CE;
  font-size: 0.86rem;
  margin: 0 0 1rem;
}
.panel--atlas .btn {
  width: 100%;
  justify-content: center;
}

/* --- 6. Footer as a component (was 3 inline styles × 49 pages) ----------- */
.footer-mark {
  background: #1F3D2D;
}
.footer-blurb {
  margin: 0 0 1rem;
  max-width: 34ch;
  font-size: 0.9rem;
  line-height: 1.6;
}
.footer-email {
  font-size: 0.75rem;
  color: #8AB39C;
}

/* --- 7. Species card: even rhythm in the play row ----------------------- */
.species-audio-bar {
  min-height: 4.1rem;
}
.call-label {
  line-height: 1.3;
  text-wrap: balance;
}

/* --- 8. Form focus: keep the visible ring instead of a 14% wash -------- */
.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
  box-shadow: none;
}

/* --- 9. Tap targets ---------------------------------------------------- */
.breadcrumbs a {
  padding: 0.3rem 0.1rem;
}

/* --- 10. Header and hero on small screens ------------------------------ */
.stat-label {
  min-height: 2.7em;
}

@media (max-width: 560px) {
  .hero-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .header-inner {
    gap: 0.5rem;
  }
  .brand {
    font-size: 1rem;
  }
  .brand-sub {
    display: none;
  }
  .brand > span:not(.brand-mark):not(.brand-sub) {
    white-space: nowrap;
  }
  .header-actions .btn--primary {
    padding: 0.42rem 0.68rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .hero-stats {
    gap: 0.75rem;
  }
  .stat-value {
    font-size: 1.2rem;
  }
  .stat-label {
    font-size: 0.72rem;
    min-height: 4.4em;
  }
}

@media (max-width: 430px) {
  .header-actions a.btn--primary {
    display: none;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- 11. Neutralise any leftover double video wrapper ------------------ */
.video-wrap .video-wrap {
  margin: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  aspect-ratio: auto;
}

/* --- 12. Respect reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .card--interactive:hover,
  .guide-card:hover {
    transform: none;
  }
}

/* --- 13. Print: the old block printed white on white ------------------- */
@media print {
  .site-header,
  .site-footer,
  .no-print,
  .ad-slot-wrap,
  .read-progress,
  .video-wrap,
  .sidebar-stack,
  .related-section,
  .tank-hud,
  .taxonomy-bar {
    display: none !important;
  }
  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .section--deep,
  .section--tint,
  .panel,
  .panel--atlas,
  .article-main-card,
  .kpi-box,
  .kpi-box--highlight,
  .play-call-btn,
  .btn,
  .btn--primary,
  .btn--secondary,
  .btn--amber,
  .badge,
  .callout,
  .takeaways-box,
  .takeaway-list,
  .faq-item,
  .blueprint-frame,
  table,
  th,
  td {
    background: #fff !important;
    color: #000 !important;
    border-color: #999 !important;
    box-shadow: none !important;
  }
  .prose a,
  a {
    color: #000 !important;
    text-decoration: underline;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
  h1,
  h2,
  h3,
  h4 {
    break-after: avoid;
  }
  figure,
  table,
  .callout,
  .card,
  .faq-item {
    break-inside: avoid;
  }
  .prose > p,
  .prose > ul,
  .prose > ol {
    max-width: none;
  }
}

/* ==========================================================================
   14. Terrarium viewer (assets/js/terrarium-3d.js)
   ========================================================================== */
#tc-blueprint.blueprint-frame {
  aspect-ratio: 6 / 5;
  min-height: 320px;
}

@media (max-width: 860px) {
  #tc-blueprint.blueprint-frame {
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 430px) {
  #tc-blueprint.blueprint-frame {
    aspect-ratio: 5 / 6;
  }
}

.blueprint-frame.tank-host--failed {
  aspect-ratio: auto;
  min-height: 0;
  padding: 0.75rem;
}

.tank-host {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.tank-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.tank-canvas:active {
  cursor: grabbing;
}

.tank-hud {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.8rem;
  pointer-events: none;
}

.tank-chip {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #CDE6D8;
  background: rgba(8, 15, 11, 0.74);
  border: 1px solid rgba(147, 210, 175, 0.26);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.tank-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  pointer-events: auto;
}

.tank-toggle {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #D2DDD6;
  background: rgba(8, 15, 11, 0.7);
  border: 1px solid rgba(147, 210, 175, 0.24);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tank-toggle:hover {
  background: rgba(32, 62, 46, 0.9);
  border-color: rgba(147, 210, 175, 0.5);
}

.tank-toggle.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tank-toggle:focus-visible {
  outline: 2px solid #E7B27A;
  outline-offset: 2px;
}

.tank-hint {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(210, 221, 214, 0.5);
  pointer-events: none;
}

.blueprint-fallback {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.blueprint-note {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9BB5A6;
  margin: 0.6rem 0 0;
}
