@font-face { font-family: 'Libre Bodoni'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/libre-bodoni-400.woff2') format('woff2'); }
@font-face { font-family: 'Libre Bodoni'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/libre-bodoni-600.woff2') format('woff2'); }
@font-face { font-family: 'Libre Bodoni'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/libre-bodoni-700.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/public-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/public-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/public-sans-600.woff2') format('woff2'); }

/* FinHurst 本地字体（Exo display + DM Sans body——Google Fonts 本地化） */
@font-face { font-family: 'Exo'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/exo-400.woff2') format('woff2'); }
@font-face { font-family: 'Exo'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/exo-600.woff2') format('woff2'); }
@font-face { font-family: 'Exo'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/exo-700.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/dm-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/dm-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/dm-sans-700.woff2') format('woff2'); }

/* ═══════════════════════════════════════════
   ScalyPal Design System v3 — 2026 Biophilic Edition
   Inspired by: Terracotta, Jungle Canopy, Bone White
   
   TABLE OF CONTENTS:
   ───────────────────────────────────────────
   Line   6: CSS Reset & Variables
   Line  90: Typography
   Line 108: Layout (container, grid)
   Line 113: Buttons
   Line 146: Badges & Difficulty Bar
   Line 185: Floating Navigation
   Line 260: Hero Section (Home)
   Line 350: Species Bento Grid
   Line 520: Article Cards & Lists
   Line 680: Article Detail Page
   Line 920: Category Cards
   Line 1050: Tool Pages (shared)
   Line 1250: Tool: Temp/Humidity
   Line 1500: Tool: Feeding Calc
   Line 1750: Tool: Calcium Dosage
   Line 2000: Footer & Utility
   Line 2100: Responsive (Tablet/Mobile)
   Line 2350: Animation Keyframes
   ═══════════════════════════════════════════ */

/* === CSS Reset & Variables === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1A1C1E;
  background: #F9F8F6;
  overflow-x: hidden;
}

:root {
  /* === 2026 Biophilic Palette === */
  --color-aqua:          #0E7490;
  --color-aqua-dark:     #155E75;
  --color-aqua-glow:      rgba(14,116,144,0.25);
  --color-terracotta-50:   #FDF0ED;

  --color-reef:          #164E63;
  --color-reef-light:    #155E75;
  --color-reef-glow:      rgba(22,78,99,0.20);
  --color-jungle-50:       #E8F0EC;

  --color-sand:          #E8D5B7;
  --color-sand-dark:     #D4B896;
  --color-fin:           #3B82F6;
  --color-amethyst-50:     #F3F0FC;

  --color-bone:          #F0F7FA;
  --color-bone-dark:     #E2F0F5;
  --color-obsidian:        #1A1C1E;
  --color-obsidian-light:  #2A2D30;
  --color-obsidian-soft:   #3A3D40;

  --white:   #FFFFFF;
  --gray-50: #F5F4F1;
  --gray-100:#EBEAE6;
  --gray-200:#D9D7D0;
  --gray-300:#B8B5AC;
  --gray-400:#9A968C;
  --gray-500:#6B675E;
  --gray-700:#3D3A34;
  --gray-900:#1A1A16;

  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-muted:     var(--gray-400);
  --bg-page:        var(--color-bone);
  --bg-surface:     var(--white);
  --border-light:   var(--gray-100);
  --border-medium:  var(--gray-200);

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

  /* Radius */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px; --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.07);
  --shadow-glow-terra: 0 0 28px var(--color-terracotta-glow);
  --shadow-glow-jungle: 0 0 28px var(--color-jungle-glow);

  /* Easing */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Glass */
  --glass-bg:    rgba(255,255,255,0.70);
  --glass-border:rgba(255,255,255,0.50);
  --glass-blur:  18px;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
p + p { margin-top: var(--s-4); }

a { color: var(--color-reef); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--color-reef-light); }

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

/* === Layout === */
.container, .content-container {
  max-width: 1280px; margin: 0 auto; padding: 0 var(--s-6);
}

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.65rem 1.4rem; border-radius: var(--r-md);
  font-family: inherit; font-size: 0.875rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all 0.25s var(--ease-out);
  border: none; line-height: 1; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-aqua); color: white;
  box-shadow: 0 2px 12px var(--color-terracotta-glow);
}
.btn-primary:hover { background: var(--color-aqua-dark); color: white; }

.btn-jungle {
  background: var(--color-reef); color: white;
  box-shadow: 0 2px 12px var(--color-jungle-glow);
}
.btn-jungle:hover { background: var(--color-reef-light); color: white; }

.btn-ghost {
  background: transparent; color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-50); border-color: var(--gray-300); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.75rem; }
.btn-lg { padding: 0.8rem 1.8rem; font-size: 1rem; border-radius: var(--r-lg); }

/* === Badges === */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.8rem; border-radius: var(--r-full);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-green { background: var(--color-jungle-50); color: var(--color-reef); }
.badge-terra { background: var(--color-terracotta-50); color: var(--color-aqua); }
.badge-ame { background: var(--color-amethyst-50); color: var(--color-fin); }
.badge-amber { background: #FFF3E0; color: #E65100; }
.badge-sand { background: var(--color-sand); color: var(--gray-700); }

/* UGC Trust Badges */
.badge-vet { background: #E8F5E9; color: #2E7D32; }
.badge-keeper { background: var(--gray-100); color: var(--text-secondary); }
.badge-verified { background: #E3F2FD; color: #1565C0; }
/* Glowing featured badge */
.badge-featured {
  background: linear-gradient(135deg, var(--color-aqua), #E8947E);
  color: white; font-weight: 700;
  box-shadow: 0 2px 12px rgba(212,116,92,0.35);
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(212,116,92,0.35); }
  50% { box-shadow: 0 2px 20px rgba(212,116,92,0.55); }
}

/* === Difficulty Bar === */
.difficulty-bar {
  display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-3);
}
.difficulty-bar .label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); min-width: 5em; }
.difficulty-bar .track {
  flex: 1; height: 6px; background: var(--gray-100); border-radius: var(--r-full);
  overflow: hidden;
}
.difficulty-bar .fill {
  height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--color-reef), var(--color-aqua));
  transition: width 0.6s var(--ease-out);
}

/* ═══════════════════════════════════════════
   FLOATING PILL NAVIGATION
   ═══════════════════════════════════════════ */
.floating-nav {
  position: fixed;
  top: var(--s-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex; align-items: center; gap: 2px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-full);
  padding: 5px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06), 0 0 0 0.5px rgba(0,0,0,0.04);
  transition: all 0.35s var(--ease-out);
}
.floating-nav.scrolled {
  padding: 4px;
  top: var(--s-3);
  box-shadow: 0 4px 28px rgba(0,0,0,0.10);
}

.floating-nav .nav-pill {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: var(--r-full);
  font-size: 0.8rem; font-weight: 550;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
  position: relative;
}
.floating-nav .nav-pill svg { width: 16px; height: 16px; flex-shrink: 0; }
.floating-nav .nav-pill:hover {
  background: var(--gray-50);
  color: var(--text-primary);
  text-decoration: none;
}
.floating-nav .nav-pill.active {
  background: var(--color-jungle-50);
  color: var(--color-reef);
  font-weight: 650;
}

.floating-nav .nav-sep {
  width: 1px; height: 20px;
  background: var(--border-light);
  margin: 0 2px;
}

.floating-nav .search-pill {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  border: none;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s var(--ease-out);
  color: var(--text-secondary);
  margin-left: 4px;
}
.floating-nav .search-pill:hover {
  background: var(--gray-50);
  color: var(--text-primary);
}

/* mobile nav */
.mobile-nav {
  display: none;
}
.mobile-nav a[style] {
  text-decoration: none; flex-shrink: 0;
}

/* Mobile bottom tab bar (app-style) — hidden on desktop */
.mobile-tabbar {
  display: none;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  padding: 7px 4px 5px;
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item:hover { color: var(--color-reef); text-decoration: none; }
.tab-item.active { color: var(--color-reef); }
.tab-item:active { transform: scale(0.92); }

/* ═══════════════════════════════════════════
   HERO — Image-text fusion layout
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  background: linear-gradient(170deg, #143D30 0%, #0E2A20 30%, #141416 65%, #141416 100%);
  padding: var(--s-8) 0 var(--s-6);
  color: white;
  overflow: hidden;
  min-height: 90vh;
  display: flex; align-items: center;
}
/* Subtle warm glow behind text area */
.hero::after {
  content: '';
  position: absolute;
  top: 10%; left: 0;
  width: 45%; height: 70%;
  background: radial-gradient(ellipse at 30% 45%, rgba(212,116,92,0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative; z-index: 3;
  width: 100%;
  max-width: 1280px; margin: 0 auto; padding: 0 var(--s-6);
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--s-6);
  align-items: center;
}
.hero-text {
  position: relative; z-index: 4;
  padding: var(--s-6) 0 var(--s-10);
}

/* Badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.25rem 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-full);
  font-size: 0.7rem; font-weight: 500;
  color: rgba(255,255,255,0.65);
  margin-bottom: var(--s-6);
}
.hero-badge .pulse { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* Title */
.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 800; line-height: 1.06; letter-spacing: -0.04em;
  color: white; margin-bottom: var(--s-4);
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-aqua), #F0A090);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 0.95rem; line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 400px;
}
.hero-actions {
  display: flex; align-items: center; gap: var(--s-4);
  margin-top: var(--s-6);
}

/* Stats capsules */
.hero-stats {
  display: flex; gap: var(--s-3);
  margin-top: var(--s-8); padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.hero-stat-capsule {
  display: flex; flex-direction: column;
  padding: 0.4rem 0.85rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--r-md);
  transition: all 0.25s var(--ease-out);
}
.hero-stat-capsule:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
}
.hero-stat-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.2rem; font-weight: 700; color: white; line-height: 1.1; }
.hero-stat-label { font-size: 0.58rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 2px; }

/* ══════ Photo — fused edges via gradient masks ══════ */
.hero-photo-wrap {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: flex-end;
  animation: heroReveal 1s var(--ease-out) both;
  margin-right: calc(var(--s-6) * -1);
}
@keyframes heroReveal {
  from { opacity: 0; transform: scale(1.03) translateX(6px); }
  to   { opacity: 1; transform: scale(1) translateX(0); }
}
.hero-photo {
  width: 105%;
  aspect-ratio: 4 / 5;
  max-height: 620px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--r-xl);
  display: block;
  /* Fusion: left edge dissolves into dark bg, bottom softly fades */
  -webkit-mask-image:
    linear-gradient(to left, black 78%, transparent 100%),
    linear-gradient(to bottom, black 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to left, black 78%, transparent 100%),
    linear-gradient(to bottom, black 88%, transparent 100%);
  mask-composite: intersect;
}
/* Warm accent glow behind photo */
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 5% -2% 10% 8%;
  background: radial-gradient(ellipse at 70% 40%, rgba(212,116,92,0.12) 0%, transparent 55%);
  pointer-events: none;
  z-index: -1;
}

/* Species tag — bottom center bridge */
.hero-species-tag {
  position: absolute;
  bottom: var(--s-3);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0.35rem 0.85rem;
  background: rgba(20,20,22,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--r-full);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  white-space: nowrap;
  animation: heroReveal 1s 0.25s var(--ease-out) both;
}
.hero-species-tag .tag-icon { font-size: 1.1rem; line-height: 1; }
.hero-species-tag .tag-name { font-size: 0.75rem; font-weight: 650; color: white; }
.hero-species-tag .tag-divider { width: 1px; height: 12px; background: rgba(255,255,255,0.10); }
.hero-species-tag .tag-spec { font-size: 0.62rem; color: rgba(255,255,255,0.45); }
.hero-species-tag .tag-diff {
  padding: 0.12rem 0.45rem;
  border-radius: var(--r-full);
  font-size: 0.55rem; font-weight: 600;
  text-transform: uppercase;
  background: rgba(74,222,128,0.15); color: #4ADE80;
}

/* Responsive */
@media (max-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }
  .hero-photo-wrap {
    order: -1;
    margin-right: 0;
    justify-content: center;
  }
  .hero-photo {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 300px;
    border-radius: var(--r-xl);
    -webkit-mask-image: none;
    mask-image: none;
    object-position: center 60%;
  }
  .hero-text { padding: 0 var(--s-2); }
  .hero-badge { margin-bottom: var(--s-3); }
  .hero h1 { font-size: clamp(1.6rem, 6.2vw, 2.1rem); line-height: 1.15; }
  .hero p { font-size: 0.92rem; max-width: 34em; }
  .hero-actions { gap: var(--s-3); margin-top: var(--s-4); }
  .hero-actions .btn { padding: 0.65rem 1rem; font-size: 0.88rem; }
  .hero-stats { margin-top: var(--s-5); padding-top: var(--s-3); gap: var(--s-3); }
  .hero-stat-capsule { padding: 0.35rem 0.7rem; }
  .hero-species-tag { position: relative; bottom: auto; left: auto; transform: none; margin: var(--s-5) auto 0; }
}

/* ═══════════════════════════════════════════
   BENTO GRID — SPECIES
   ═══════════════════════════════════════════ */
.section { padding: var(--s-16) 0; }
.section-header { text-align: center; margin-bottom: var(--s-12); }
.section-header h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: var(--s-3); }
.section-header p { color: var(--text-secondary); font-size: 1.125rem; max-width: 600px; margin: 0 auto; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: var(--s-6);
  max-width: 1200px;
  margin: 0 auto;
}

.bento-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s var(--ease-spring);
  text-decoration: none; color: inherit;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
}
.bento-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 48px rgba(0,0,0,0.10);
  border-color: var(--gray-200);
  text-decoration: none; color: inherit;
  z-index: 10;
}

/* Card sizes */
.bento-card.featured {
  grid-column: span 2;
  grid-row: span 2;
}
.bento-card.tall {
  grid-row: span 2;
}
.bento-card.wide {
  grid-column: span 2;
}

/* Card internals */
.bento-card-inner {
  display: flex; flex-direction: column;
  align-items: flex-start;
  height: 100%; padding: var(--s-5);
  position: relative; z-index: 2;
}
.bento-card.featured .bento-card-inner { padding: var(--s-8); }

.bento-card-bg {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0.50; transition: opacity 0.4s var(--ease-out);
}
.bento-card:hover .bento-card-bg { opacity: 0.75; }
/* Text readability overlay */
.bento-card::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.08) 50%, transparent 85%);
  pointer-events: none; border-radius: inherit;
}

/* Species thumbnail (replaces emoji icon) */
.bento-thumb {
  width: 56px; height: 56px; border-radius: var(--r-md);
  object-fit: cover; margin-bottom: var(--s-3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  display: block;
}
.bento-card.featured .bento-thumb { width: 72px; height: 72px; border-radius: var(--r-lg); }
.bento-card:hover .bento-thumb { transform: scale(1.05); transition: transform 0.2s; }

.bento-card-icon {
  font-size: 3rem; margin-bottom: var(--s-3);
  transition: transform 0.35s var(--ease-spring);
  display: inline-block;
}
.bento-card:hover .bento-card-icon { transform: scale(1.08) rotate(-3deg); }
.bento-card.featured .bento-card-icon { font-size: 4.5rem; }

.bento-card h4 {
  font-size: 1rem; margin-bottom: var(--s-1);
}
.bento-card.featured h4 { font-size: 1.5rem; }

.bento-card p {
  font-size: 0.8rem; color: var(--text-secondary);
  line-height: 1.5;
  width: 100%;
}
.bento-card.featured p { font-size: 0.9rem; }

.bento-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; width: 100%;
}

.bento-card-decoration {
  position: absolute;
  right: var(--s-5); bottom: var(--s-5);
  font-size: 5rem; opacity: 0.12; pointer-events: none;
  transition: all 0.35s var(--ease-spring);
}
.bento-card:hover .bento-card-decoration { transform: scale(1.1); opacity: 0.18; }
.bento-card.featured .bento-card-decoration { font-size: 8rem; right: var(--s-8); bottom: var(--s-8); }

/* Color themes for bento cards */
.bento-card.theme-terra .bento-card-bg { background: linear-gradient(135deg, #FDF0ED, #F9F8F6); }
.bento-card.theme-terra:hover { border-color: #F0C4B8; }
.bento-card.theme-jungle .bento-card-bg { background: linear-gradient(135deg, #E8F0EC, #F9F8F6); }
.bento-card.theme-jungle:hover { border-color: #B8D4C8; }
.bento-card.theme-desert .bento-card-bg { background: linear-gradient(135deg, #F5EFE5, #F9F8F6); }
.bento-card.theme-desert:hover { border-color: #E0D5C0; }
.bento-card.theme-ame .bento-card-bg { background: linear-gradient(135deg, #F3F0FC, #F9F8F6); }
.bento-card.theme-ame:hover { border-color: #D4CCF0; }

.bento-card.view-all {
  border: 2px dashed var(--gray-200);
  background: var(--gray-50);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.bento-card.view-all:hover { border-color: var(--color-reef); background: var(--color-jungle-50); }
.view-all-icon {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-4);
}

/* ═══════════════════════════════════════════
   (unused — overridden by articles section)
   ═══════════════════════════════════════════ */

.difficulty-dots { display: flex; align-items: center; gap: 3px; }
.difficulty-dots .dot { width: 8px; height: 8px; border-radius: 50%; }
.difficulty-dots .dot.filled.green { background: #27AE60; }
.difficulty-dots .dot.filled.amber { background: #F39C12; }
.difficulty-dots .dot.filled.red { background: #E74C3C; }
.difficulty-dots .dot.empty { background: var(--gray-200); }
.difficulty-label { font-size: 0.65rem; color: var(--text-muted); margin-left: var(--s-1); text-transform: uppercase; letter-spacing: 0.04em; }

.species-bottom-cta { text-align: center; margin-top: var(--s-8); }

/* Hide hero species tag on homepage */
.home-page .hero-species-tag { display: none; }

/* ═══════════════════════════════════════════
   CATEGORIES PAGE
   ═══════════════════════════════════════════ */
.cats-hero { position: relative; padding: var(--s-4) 0 var(--s-10); background: var(--white); border-bottom: 1px solid var(--border-light); overflow: hidden; }
.cats-hero-bg { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, var(--gray-200) 1px, transparent 1px); background-size: 20px 20px; opacity: 0.3; }
.cats-hero-stats { display: flex; gap: var(--s-6); flex-wrap: wrap; }
.cats-stat { text-align: center; min-width: 60px; }
.cats-stat-num { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--color-reef); }
.cats-stat-label { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.category-group { margin-bottom: var(--s-10); scroll-margin-top: 100px; }

/* === Sticky Sub-Nav — underline tab bar (distinct from main pill nav) === */
.sub-nav {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 150;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.3s var(--ease-out);
  padding: 0 var(--s-6);
}
.sub-nav.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sub-nav-inner {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 0.45rem var(--s-6);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.sub-nav-pill {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.sub-nav-pill:hover {
  color: var(--text-primary);
  text-decoration: none;
}
.sub-nav-pill.active {
  color: var(--color-reef);
  font-weight: 650;
  border-bottom-color: var(--color-reef);
}

.sub-nav-num {
  font-size: 0.6rem;
  font-weight: 500;
  opacity: 0.55;
}
.sub-nav-pill.active .sub-nav-num {
  opacity: 1;
  color: var(--color-reef);
}
/* === Species Cards — 2026 Immersive Edition === */
/* Bento 2.0: 3-col desktop, 2-col tablet, 1-col mobile */
.species-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
@media (max-width: 960px) {
  .species-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .species-card-grid { grid-template-columns: 1fr; }
  .species-item.featured { grid-column: span 1; }
}

.species-item {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  background: var(--color-obsidian);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.35s var(--ease-out);
}
.species-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(0,0,0,0.30);
  border-color: rgba(255,255,255,0.15);
  text-decoration: none;
  color: white;
}

/* Featured star species — horizontal wide card */
.species-item.featured {
  grid-column: span 2;
  min-height: 380px;
}
.species-item.featured .species-item-info h4 {
  font-size: 1.4rem;
}
.species-item.featured .species-item-info p {
  font-size: 0.85rem;
  -webkit-line-clamp: 3;
  max-width: 75%;
}
.species-item.featured .species-item-diff-badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.8rem;
}
.species-item.featured .species-item-specs {
  justify-content: flex-start;
  gap: var(--s-5);
}
.species-item.featured .spec-item {
  font-size: 0.72rem;
}

/* Full-bleed background image */
.species-item-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.6s var(--ease-out);
}
.species-item:hover .species-item-bg {
  transform: scale(1.06);
}

/* Bottom-to-top gradient scrim for text readability */
.species-item::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.03) 100%);
  pointer-events: none;
  transition: opacity 0.35s;
}
.species-item:hover::after {
  opacity: 0.92;
}

/* Content overlay */
.species-item-content {
  position: relative;
  z-index: 2;
  padding: var(--s-5) var(--s-6);
}

/* Difficulty badge pill */
.species-item-diff-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--r-full);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s-3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
}
.species-item-diff-badge.beginner { background: rgba(74,222,128,0.20); color: #4ADE80; border-color: rgba(74,222,128,0.30); }
.species-item-diff-badge.intermediate { background: rgba(251,191,36,0.20); color: #FBBF24; border-color: rgba(251,191,36,0.30); }
.species-item-diff-badge.advanced { background: rgba(248,113,113,0.20); color: #F87171; border-color: rgba(248,113,113,0.30); }

/* Text */
.species-item-info h4 {
  font-size: 1.15rem;
  color: white;
  margin-bottom: var(--s-2);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.species-item-info p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Hover spec sheet — fades in, description fades out */
.species-item-desc {
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.species-item:hover .species-item-desc {
  opacity: 0;
  transform: translateY(-4px);
}

.species-item-specs {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 var(--s-6) var(--s-5);
  display: flex;
  justify-content: space-between;
  gap: var(--s-2);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.35s var(--ease-out);
  pointer-events: none;
  z-index: 3;
}
.species-item:hover .species-item-specs {
  opacity: 1;
  transform: translateY(0);
}

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.80);
  text-align: center;
  min-width: 0;
}
.spec-item .spec-icon {
  font-size: 0.85rem;
  margin-bottom: 1px;
}

/* Keep difficulty bar always visible */
.species-item .difficulty-bar {
  margin-top: var(--s-3);
  transition: opacity 0.25s var(--ease-out);
}
.species-item:hover .difficulty-bar {
  opacity: 0;
}
.species-item .difficulty-bar .label {
  color: rgba(255,255,255,0.45);
  font-size: 0.65rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.species-item .difficulty-bar .track {
  background: rgba(255,255,255,0.10);
}
.species-item .difficulty-bar .fill {
  background: linear-gradient(90deg, #4ADE80, #FBBF24, #F87171);
  box-shadow: 0 0 8px rgba(255,255,255,0.10);
}

/* Hover arrow */
.species-item-arrow {
  position: absolute;
  bottom: var(--s-5);
  right: var(--s-5);
  z-index: 3;
  color: rgba(255,255,255,0.7);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s var(--ease-out);
}
.species-item:hover .species-item-arrow {
  opacity: 1;
  transform: translateX(0);
  color: white;
}

/* ═══════════════════════════════════════════
   ARTICLES PAGE — 3-col real-photo cards
   ═══════════════════════════════════════════ */
.arts-hero { position: relative; padding: var(--s-4) 0 var(--s-8); background: var(--white); border-bottom: 1px solid var(--border-light); overflow: hidden; }
.arts-hero-bg { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, var(--gray-200) 1px, transparent 1px); background-size: 20px 20px; opacity: 0.3; }

/* Search — full width */
.arts-search-wrap { position: relative; width: 100%; max-width: 100%; }
.arts-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.arts-search-input {
  width: 100%; padding: 0.6rem 0.9rem 0.6rem 2.4rem;
  border: 1.5px solid var(--border-medium); border-radius: var(--r-md);
  background: var(--white); font-family: inherit; font-size: 0.85rem;
  color: var(--text-primary); outline: none;
  transition: border-color 0.2s;
}
.arts-search-input:focus { border-color: var(--color-reef); box-shadow: 0 0 0 3px rgba(27,77,62,0.06); }
.arts-search-input::placeholder { color: var(--text-muted); }

/* Filter bar */
.filter-bar-wrap { position: sticky; top: 72px; z-index: 50; background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); border-bottom: 1px solid var(--border-light); padding: var(--s-2) 0; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.filter-pills { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.filter-pill {
  display: flex; align-items: center; gap: 4px;
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border-medium);
  background: var(--bg-surface);
  font-size: 0.76rem; font-weight: 550;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
  font-family: inherit;
  white-space: nowrap;
}
.filter-pill:hover { border-color: var(--color-reef); color: var(--color-reef); background: var(--color-jungle-50); }
.filter-pill.active { background: var(--color-reef); color: white; border-color: var(--color-reef); }

/* Species filter pills on homepage — centered with bottom margin */
#speciesFilters {
  justify-content: center;
  margin-bottom: var(--s-8);
}

.toggle-label {
  display: flex; align-items: center; gap: var(--s-2);
  cursor: pointer;
  font-size: 0.76rem; font-weight: 550;
  color: var(--text-secondary);
  user-select: none;
}
.toggle-label input { display: none; }
.toggle-track {
  width: 36px; height: 20px;
  border-radius: var(--r-full);
  background: var(--gray-200);
  transition: background 0.2s;
  position: relative;
}
.toggle-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  position: absolute; top: 2px; left: 2px;
  transition: transform 0.2s var(--ease-spring);
  box-shadow: var(--shadow-sm);
}
.toggle-label input:checked + .toggle-track { background: var(--color-reef); }
.toggle-label input:checked + .toggle-track .toggle-thumb { transform: translateX(16px); }

/* Article grid — 3 columns */
.arts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
@media (max-width: 960px) { .arts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .arts-grid { grid-template-columns: 1fr; } }

/* Article card */
.arts-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--ease-out);
}
.arts-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-200);
  text-decoration: none;
  color: inherit;
}
.arts-card.hidden { display: none; }

/* Card image — real photo with fallback emoji */
.arts-card-img {
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: var(--gray-100);
}
.arts-card-img-fallback {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  opacity: 0.3;
  pointer-events: none;
}

/* Card body */
.arts-card-body {
  padding: var(--s-4) var(--s-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.arts-card-top {
  display: flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.arts-card-cat {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.5rem;
  border-radius: var(--r-full);
  background: var(--color-jungle-50);
  color: var(--color-reef);
}
.arts-card-diff {
  margin-left: auto;
  padding: 0.1rem 0.45rem;
  border-radius: var(--r-full);
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.arts-card-diff.easy { background: rgba(74,222,128,0.12); color: #2E7D32; }
.arts-card-diff.moderate { background: rgba(251,191,36,0.12); color: #B8860B; }
.arts-card-diff.hard { background: rgba(248,113,113,0.12); color: #C62828; }

.arts-card-body h4 {
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
  margin-bottom: var(--s-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.arts-card-body p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.arts-card-meta {
  display: flex; align-items: center; gap: var(--s-1);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border-light);
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 450;
}

/* ═══════════════════════════════════════════
   FEEDING CALCULATOR — Dashboard Edition
   ═══════════════════════════════════════════ */
.feed-dashboard { max-width: 1000px; margin: 0 auto; }
.feed-header { margin-bottom: var(--s-6); }

/* Stage tabs */
.feed-stage-tabs {
  display: flex; gap: 0;
  border: 1px solid var(--border-medium);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-6);
}
.stage-tab {
  flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:0.55rem 0.4rem;
  border:none; background:var(--bg-surface);
  cursor:pointer; font-family:inherit; font-size:0.7rem; font-weight:550;
  color:var(--text-secondary);
  transition:all 0.2s var(--ease-out);
  border-right:1px solid var(--border-medium);
}
.stage-tab:last-child { border-right:none; }
.stage-tab:hover { background:var(--gray-50); color:var(--text-primary); }
.stage-tab.active { background:var(--color-reef); color:white; }
.stage-tab .stage-emoji { font-size:1.1rem; }

/* Output bento cards */
.feed-bento-card {
  background: var(--gray-50);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--s-4);
  transition: box-shadow 0.2s;
}
.feed-bento-card:hover { box-shadow: var(--shadow-sm); }
.feed-card-header {
  display:flex; align-items:center; gap:var(--s-2);
  padding:var(--s-3) var(--s-4);
  font-size:0.7rem; font-weight:700;
  color:var(--text-primary);
  border-bottom:1px solid var(--border-light);
  background:var(--white);
}
.feed-card-body { padding:var(--s-4); }

/* Feeder card */
.feeder-card .feed-card-body { display:flex; align-items:center; gap:var(--s-5); }
.feeder-visual { display:flex; flex-direction:column; align-items:center; gap:var(--s-2); }
.feeder-emoji { font-size:2rem; }
#feederRing canvas { width: 60px; height: 60px; }
.feeder-info { flex: 1; }
.feeder-size-label {
  font-size:0.6rem; text-transform:uppercase; letter-spacing:0.07em;
  color:var(--text-muted); margin-bottom:var(--s-1);
}
.feeder-size-value {
  font-family:'JetBrains Mono',monospace; font-size:0.95rem; font-weight:700;
  color:var(--color-reef); line-height:1.4;
}
.feeder-detail { font-size:0.75rem; color:var(--text-secondary); margin-top:var(--s-1); }

/* Schedule */
.schedule-display { text-align:center; margin-bottom:var(--s-2); }
.schedule-freq {
  font-family:'JetBrains Mono',monospace; font-size:1.2rem; font-weight:700;
  color:var(--color-fin);
}
.schedule-label { font-size:0.6rem; text-transform:uppercase; letter-spacing:0.07em; color:var(--text-muted); margin-top:2px; }
.schedule-gutload {
  font-size:0.72rem; color:var(--text-secondary); text-align:center;
  padding:var(--s-2); background:var(--white); border-radius:var(--r-sm);
}

/* Feeders chips */
.feeders-chips { display:flex; flex-wrap:wrap; gap:var(--s-2); }
.feeder-chip {
  padding:0.3rem 0.6rem; background:var(--color-jungle-50);
  color:var(--color-reef); border-radius:var(--r-full);
  font-size:0.7rem; font-weight:550;
}

/* Notes */
.feed-notes-card {
  background:rgba(251,191,36,0.05);
  border:1px solid rgba(251,191,36,0.12);
  border-radius:var(--r-lg);
  overflow:hidden;
  margin-bottom: var(--s-4);
}
.feed-note-item {
  padding:var(--s-2) var(--s-4);
  font-size:0.72rem; color:var(--text-secondary);
  line-height:1.5;
  border-bottom:1px solid rgba(251,191,36,0.06);
}
.feed-note-item:last-child { border-bottom:none; }
.feeder-visual { display:flex; flex-direction:column; align-items:center; gap:var(--s-2); }
.feeder-emoji { font-size:2.5rem; }
#feederRing canvas { width:70px; height:70px; }
.feeder-info { flex:1; }
.feeder-size-label { font-size:0.65rem; text-transform:uppercase; letter-spacing:0.07em; color:var(--text-muted); margin-bottom:var(--s-1); }
.feeder-size-value { font-family:'JetBrains Mono',monospace; font-size:1.1rem; font-weight:700; color:var(--color-reef); line-height:1.4; }
.feeder-detail { font-size:0.8rem; color:var(--text-secondary); margin-top:var(--s-1); }
.schedule-display { text-align:center; margin-bottom:var(--s-3); }
.schedule-freq { font-family:'JetBrains Mono',monospace; font-size:1.4rem; font-weight:700; color:var(--color-fin); }
.schedule-label { font-size:0.65rem; text-transform:uppercase; letter-spacing:0.07em; color:var(--text-muted); margin-top:2px; }
.schedule-gutload { font-size:0.75rem; color:var(--text-secondary); text-align:center; padding:var(--s-2); background:var(--white); border-radius:var(--r-sm); }
.feeders-chips { display:flex; flex-wrap:wrap; gap:var(--s-2); }
.feeder-chip { padding:0.35rem 0.7rem; background:var(--color-jungle-50); color:var(--color-reef); border-radius:var(--r-full); font-size:0.72rem; font-weight:550; }
.feed-notes-card { background:rgba(251,191,36,0.06); border:1px solid rgba(251,191,36,0.2); border-radius:var(--r-lg); overflow:hidden; }
.feed-notes-header { padding:var(--s-3) var(--s-5); font-size:0.75rem; font-weight:700; color:var(--amber-600); border-bottom:1px solid rgba(251,191,36,0.15); }
.feed-note-item { padding:var(--s-3) var(--s-5); font-size:0.78rem; color:var(--text-secondary); line-height:1.5; border-bottom:1px solid rgba(251,191,36,0.08); }
.feed-note-item:last-child { border-bottom:none; }

/* Calcium dose cards */
/* ═══════════════════════════════════════════
   CALCIUM DOSAGE — Optimized Selector
   ═══════════════════════════════════════════ */

.calc-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--s-8); align-items: start; }
.calc-sidebar { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.calc-main { min-height: 400px; }

.calc-section { margin-top: var(--s-6); }
.calc-section-title {
  font-size: 0.85rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: var(--s-4); display: flex; align-items: center; gap: var(--s-2);
}

/* Search */
.calc-search-wrap {
  position: relative;
  margin-bottom: var(--s-3);
}
.calc-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.calc-search-input {
  width: 100%;
  padding: 0.45rem 0.6rem 0.45rem 2rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--r-md);
  background: var(--white);
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}
.calc-search-input:focus { border-color: var(--color-fin); box-shadow: 0 0 0 3px rgba(139,111,207,0.08); }
.calc-search-input::placeholder { color: var(--text-muted); }

/* Filter pills */
.calc-filter-pills {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: var(--s-3);
}
.cfp {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border-light);
  border-radius: var(--r-full);
  background: var(--white);
  font-family: inherit;
  font-size: 0.65rem; font-weight: 550;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
  white-space: nowrap;
}
.cfp:hover { border-color: var(--color-fin); color: var(--color-fin); background: var(--color-amethyst-50); }
.cfp.active { background: var(--color-fin); color: white; border-color: var(--color-fin); }

/* Species grid */
.calc-species-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
}
.calc-species-card {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 0.38rem 0.5rem;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
  font-family: 'Inter', sans-serif; font-size: 0.73rem; font-weight: 500;
  color: var(--text-secondary); text-align: left;
  position: relative;
}
.calc-species-card::before {
  content: '';
  position: absolute;
  left: 0; top: 15%; bottom: 15%;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: transparent;
  transition: background 0.15s;
}
.calc-species-card:hover {
  background: var(--gray-50);
  color: var(--text-primary);
}
.calc-species-card.active {
  background: var(--color-amethyst-50);
  color: var(--color-fin);
  font-weight: 650;
  border-color: rgba(139,111,207,0.2);
  box-shadow: 0 2px 8px rgba(139,111,207,0.08);
}
.calc-species-card.active::before {
  background: var(--color-fin);
}
.calc-species-card.hidden { display: none; }
.csc-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
}
.csc-img img { width: 100%; height: 100%; object-fit: cover; }
.csc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Placeholder */
.calc-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--s-16) var(--s-8); text-align: center;
  background: var(--white);
  border: 2px dashed var(--border-medium);
  border-radius: var(--r-lg);
  min-height: 400px;
}
.calc-placeholder-icon { font-size: 3rem; margin-bottom: var(--s-4); opacity: 0.4; }
.calc-placeholder h3 { color: var(--text-secondary); margin-bottom: var(--s-2); }
.calc-placeholder p { color: var(--text-muted); max-width: 360px; font-size: 0.85rem; }

/* Dosage cards — colored top-border */
.calc-dose-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.calc-dose-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: var(--s-5) var(--s-4);
  text-align: center;
  transition: all 0.2s var(--ease-out);
}
.calc-dose-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.calc-dose-card.dose-ca { border-top: 3px solid #2E7D32; }
.calc-dose-card.dose-d3 { border-top: 3px solid #E65100; }
.calc-dose-card.dose-multi { border-top: 3px solid #6D3B9E; }
.calc-dose-icon { font-size: 1.5rem; margin-bottom: var(--s-2); }
.calc-dose-label {
  font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  margin-bottom: var(--s-2);
}
.calc-dose-value {
  font-size: 0.82rem; font-weight: 650;
  color: var(--text-primary); line-height: 1.5;
}
.calc-dose-sub { font-size: 0.62rem; color: var(--text-muted); margin-top: var(--s-1); }

/* Weekly schedule */
.calc-weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.weekly-day {
  padding: var(--s-3) var(--s-2);
  border-radius: var(--r-sm);
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
}
.wd-label {
  font-size: 0.55rem;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.wd-value { font-size: 0.65rem; font-weight: 700; line-height: 1.3; }

/* Product list */
.calc-product-list { display: flex; flex-direction: column; gap: var(--s-2); }
.calc-product-item {
  padding: var(--s-3) var(--s-4);
  background: var(--gray-50);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  font-size: 0.8rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: var(--s-2);
}
.calc-product-item:hover { background: var(--white); }
.cpi-bullet { color: var(--color-fin); font-weight: 700; flex-shrink: 0; }

@media (max-width:768px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-sidebar { position: static; max-height: none; }
  .calc-species-grid { grid-template-columns: repeat(3, 1fr); }
  .calc-dose-row { grid-template-columns: 1fr; }
  .calc-weekly-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width:768px) {
  .calc-dose-row { grid-template-columns: 1fr; }
  .calc-weekly-grid { grid-template-columns: repeat(4, 1fr); }
}



/* === SCROLL REVEAL + MAGNETIC === */
.reveal { opacity:0; transform:translateY(28px); transition:opacity 0.7s var(--ease-out),transform 0.7s var(--ease-out); }
.reveal.visible { opacity:1; transform:translateY(0); }
.reveal:nth-child(2) { transition-delay:0.06s; }
.reveal:nth-child(3) { transition-delay:0.12s; }
.reveal:nth-child(4) { transition-delay:0.18s; }
.reveal:nth-child(5) { transition-delay:0.24s; }
.reveal:nth-child(6) { transition-delay:0.30s; }
.btn-magnetic { transition:transform 0.15s var(--ease-out); will-change:transform; }

/* ═══════════════════════════════════════════
   TOOLS PAGE — BENTO + APP PORTAL
   ═══════════════════════════════════════════ */
.tools-hero {
  position: relative;
  padding: 100px 0 var(--s-8);
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}
.tools-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, var(--gray-200) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.35;
}
.tools-hero-content {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-8); position: relative; z-index: 1;
}
.tools-hero-text h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: var(--s-3); }
.tools-hero-text p { color: var(--text-secondary); max-width: 500px; font-size: 1.05rem; }
.tools-hero-deco {
  width: 120px; height: 120px; flex-shrink: 0;
  border-radius: var(--r-xl);
  background: conic-gradient(from 0deg, var(--color-jungle-50), var(--color-terracotta-50), var(--color-amethyst-50), var(--color-jungle-50));
  opacity: 0.5;
  animation: rotateSlow 20s linear infinite;
}
@keyframes rotateSlow { to { transform: rotate(360deg); } }

/* Category heading */
.category-heading {
  display: flex; align-items: flex-start; gap: var(--s-4);
  margin-bottom: var(--s-6);
}
.category-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Bento grid for tools */
.tools-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  margin-bottom: var(--s-8);
}

/* Tool bento card */
.tool-bento-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: all 0.3s var(--ease-out);
}
.tool-bento-card:hover {
  text-decoration: none; color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
  border-color: var(--gray-200);
}
.tool-bento-card.featured {
  grid-column: span 2;
  flex-direction: row;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tool-bento-card.featured .tool-bento-bg {
  min-width: 240px; min-height: auto;
  width: 240px; border-radius: 0;
  background-size: cover !important;
  background-position: center !important;
  opacity: 1 !important;
  flex-shrink: 0;
}
.tool-bento-card.featured .tool-bento-body {
  border-radius: 0;
}
.tool-bento-card.featured:hover {
  border-color: var(--color-aqua);
  box-shadow: 0 0 0 2px var(--color-terracotta-glow), 0 16px 40px rgba(0,0,0,0.08);
}

/* BG area */
.tool-bento-bg {
  background: linear-gradient(135deg, var(--gray-50), var(--gray-25));
  background-size: cover !important;
  background-position: center !important;
  display: flex; align-items: center; justify-content: center;
  min-height: 140px; position: relative; overflow: hidden;
  position: relative;
}
/* Overlay for readability when bg image is present */
.tool-bento-bg::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.2);
  pointer-events: none;
}
.tool-bento-card.featured .tool-bento-bg {
  min-width: 240px; min-height: auto;
  width: 240px; border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.tool-bento-card.featured .tool-bento-bg::after {
  background: rgba(255,255,255,0.15);
}

/* Skeleton preview — fake UI elements in the background */
.tool-skeleton-preview {
  padding: var(--s-5); width: 100%;
  display: flex; flex-direction: column; gap: var(--s-3);
  opacity: 0.5;
}
.tool-skeleton-preview.small { padding: var(--s-4); gap: var(--s-2); }
.sk-row { display: flex; align-items: center; gap: var(--s-2); }
.sk-bar { height: 10px; border-radius: var(--r-full); background: var(--gray-200); }
.sk-bar.w30 { width: 30%; } .sk-bar.w40 { width: 40%; } .sk-bar.w50 { width: 50%; }
.sk-bar.w60 { width: 60%; } .sk-bar.w70 { width: 70%; } .sk-bar.w80 { width: 80%; }
.sk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-200); }
.sk-gauge {
  font-size: 3rem; text-align: center;
  filter: grayscale(0.6); opacity: 0.6;
}

/* Body content */
.tool-bento-body {
  padding: var(--s-5); flex: 1;
  display: flex; flex-direction: column;
  gap: var(--s-2);
}
.tool-bento-body h4 { font-size: 1rem; margin: 0; }
.tool-bento-body p {
  font-size: 0.8rem; color: var(--text-secondary);
  line-height: 1.5; flex: 1; margin: 0;
}

/* Tool icon */
.tool-bento-icon { margin-bottom: var(--s-1); }

/* Status pill */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.15rem 0.6rem;
  border-radius: var(--r-full);
  font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.status-pill.active {
  background: var(--color-jungle-50); color: var(--color-reef);
}
.status-pill.active::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-reef);
  animation: pulse 2s infinite;
}

/* Hover action */
.tool-hover-action {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 0.8rem; font-weight: 600;
  color: var(--color-aqua);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.25s var(--ease-out);
  margin-top: var(--s-2);
}
.tool-bento-card:hover .tool-hover-action {
  opacity: 1; transform: translateX(0);
}

/* Coming Soon state */
.tool-bento-card.coming-soon {
  cursor: not-allowed;
  position: relative;
}
.tool-bento-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-light);
}
.coming-soon-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.50);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.coming-soon-badge {
  padding: 0.5rem 1rem;
  background: var(--white);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
}

/* Existing tools-grid override */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--s-6);
  max-width: 1280px; margin: 0 auto;
}
.tool-card {
  display: flex; gap: var(--s-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: all 0.3s var(--ease-out);
  cursor: pointer; text-decoration: none; color: inherit;
}
.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--gray-200);
  text-decoration: none; color: inherit;
}
.tool-card-icon {
  width: 56px; height: 56px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tool-card-icon svg { width: 28px; height: 28px; }
.tool-card-icon.terra { background: var(--color-terracotta-50); color: var(--color-aqua); }
.tool-card-icon.jungle { background: var(--color-jungle-50); color: var(--color-reef); }
.tool-card-icon.ame { background: var(--color-amethyst-50); color: var(--color-fin); }

/* === TRUST SECTION === */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-6);
  max-width: 1280px; margin: 0 auto;
}
.trust-card {
  text-align: center; padding: var(--s-10) var(--s-6);
  position: relative;
  border-radius: var(--r-lg);
  transition: all 0.3s var(--ease-out);
  background: transparent;
  border: none;
}
.trust-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--r-lg);
  opacity: 0; transition: opacity 0.4s var(--ease-out);
  pointer-events: none; z-index: -1;
}
.trust-card:nth-child(1)::before { background: radial-gradient(ellipse at center, rgba(27,77,62,0.06) 0%, transparent 70%); }
.trust-card:nth-child(2)::before { background: radial-gradient(ellipse at center, rgba(212,116,92,0.06) 0%, transparent 70%); }
.trust-card:nth-child(3)::before { background: radial-gradient(ellipse at center, rgba(139,111,207,0.06) 0%, transparent 70%); }
.trust-card:nth-child(4)::before { background: radial-gradient(ellipse at center, rgba(27,77,62,0.06) 0%, transparent 70%); }
.trust-card:hover::before { opacity: 1; }
.trust-card .trust-icon { margin-bottom: var(--s-4); display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: var(--r-lg); }
.trust-card:nth-child(1) .trust-icon { background: var(--color-jungle-50); }
.trust-card:nth-child(2) .trust-icon { background: var(--color-terracotta-50); }
.trust-card:nth-child(3) .trust-icon { background: var(--color-amethyst-50); }
.trust-card:nth-child(4) .trust-icon { background: var(--color-jungle-50); }
.trust-card h4 { margin-bottom: var(--s-3); }
.trust-card p { color: var(--text-secondary); font-size: 0.875rem; line-height: var(--leading-relaxed); max-width: 280px; margin: 0 auto; }

/* === ARTICLE DETAIL === */
.reading-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 300; background: transparent; }
.reading-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--color-reef), var(--color-aqua)); transition: width 0.15s linear; border-radius: 0 2px 2px 0; }
.back-to-top { position: fixed; bottom: var(--s-6); right: var(--s-6); width: 44px; height: 44px; border-radius: var(--r-full); background: var(--bg-surface); border: 1px solid var(--border-light); box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transform: translateY(12px); transition: all 0.3s var(--ease-out); z-index: 100; color: var(--text-secondary); pointer-events: none; }
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--color-reef); color: white; border-color: var(--color-reef); box-shadow: var(--shadow-lg); }
.article-header { margin-bottom: var(--s-6); }
.article-header-badges { display: flex; gap: var(--s-2); margin-bottom: var(--s-3); }
.article-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); line-height: 1.15; }

.article-cover {
  margin-bottom: var(--s-6);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.article-cover img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  display: block;
}
.share-btn { display: inline-flex; align-items: center; gap: var(--s-1); background: none; border: 1px solid var(--border-medium); border-radius: var(--r-full); padding: 0.25rem 0.7rem; font-size: 0.75rem; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; font-family: inherit; }
.share-btn:hover { background: var(--gray-50); color: var(--color-reef); border-color: var(--color-reef); }
.toc-list a.toc-active { color: var(--color-reef); font-weight: 600; }
.article-related { margin-top: var(--s-12); padding-top: var(--s-8); }
.article-related h3 { margin-bottom: var(--s-2); }

/* === ARTICLE LAYOUT — 2026 Three-Column Docs === */
.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: var(--s-10); align-items: start;
  padding-top: var(--s-8); padding-bottom: var(--s-16);
}
/* Prevent grid blowout: wide imgs/tables inside a column must not force the track wider */
.article-layout > * { min-width: 0; }
.article-layout > * > * { min-width: 0; }

/* Left: Sticky TOC tree */
.article-toc-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: var(--s-2);
}
.article-toc-title {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: var(--s-3);
}
.article-toc-tree {
  list-style: none;
  padding: 0;
  border-left: 1.5px solid var(--border-light);
}
.article-toc-tree li { padding: 0; }
.article-toc-tree a {
  display: block;
  padding: 0.35rem var(--s-4);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1.5px;
  transition: all 0.2s;
  line-height: 1.4;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.article-toc-tree a:hover {
  color: var(--text-primary);
  background: var(--gray-50);
}
.article-toc-tree a.toc-active {
  color: var(--color-reef);
  font-weight: 600;
  border-left-color: var(--color-reef);
  background: var(--color-jungle-50);
}

/* Center: Article content */
.article-content > .toc { display: none; }

/* Right: Quick Facts + Toolbar */
.article-info-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.article-meta {
  display: flex; align-items: center; gap: var(--s-3);
  color: var(--text-secondary); font-size: 0.875rem;
  margin: var(--s-4) 0; flex-wrap: wrap;
}
.article-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-300); }

/* Author byline */
.article-author-byline {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  margin-top: var(--s-2);
  background: var(--gray-50);
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
}
.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-jungle-100);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  color: var(--color-reef);
  flex-shrink: 0;
}
.author-info { display: flex; flex-direction: column; gap: 2px; }
.author-name {
  font-weight: 600; font-size: 0.925rem;
  color: var(--text-primary); text-decoration: none;
}
.author-name:hover { color: var(--color-reef); text-decoration: underline; }
.author-bio {
  font-size: 0.8rem; color: var(--text-muted);
  line-height: 1.4;
}

/* Keeper experience callout ("From the Keeper" note) */
.keeper-note {
  background: linear-gradient(135deg, #f0f7f4 0%, #e8f5e9 100%);
  border-left: 4px solid var(--color-reef);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  margin: var(--s-5) 0;
}
.keeper-note-header {
  font-weight: 700;
  font-size: 0.925rem;
  color: var(--color-jungle-dark,#1B4D3E);
  margin-bottom: var(--s-2);
}
.keeper-note p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* Priority callout ("First Things First" per species) */
.priority-callout {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  margin: var(--s-5) 0;
  border-radius: var(--r-md);
  border-left: 4px solid;
  font-size: 0.9rem;
  line-height: 1.6;
}
.priority-callout p { margin: var(--s-1) 0 0; font-size: 0.875rem; }
.priority-callout a { font-weight: 600; white-space: nowrap; }
.priority-emoji { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.priority-heat { background: #fff3e0; border-color: #e65100; }
.priority-heat a { color: #e65100; }
.priority-uvb { background: #fffde7; border-color: #f9a825; }
.priority-uvb a { color: #f57f17; }
.priority-humidity { background: #e3f2fd; border-color: #1565c0; }
.priority-humidity a { color: #1565c0; }
.priority-diet { background: #f3e5f5; border-color: #7b1fa2; }
.priority-diet a { color: #7b1fa2; }
.priority-security { background: #fce4ec; border-color: #c62828; }
.priority-security a { color: #c62828; }

/* In-content article images */
.article-figure {
  margin: var(--s-6) 0;
  text-align: center;
}
.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.article-figure figcaption {
  margin-top: var(--s-2);
  font-size: 0.825rem;
  color: var(--text-muted);
  font-style: italic;
}

/* TOC card (used only for mobile inline fallback) */
.toc {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: var(--s-6);
}
.toc-header {
  padding: var(--s-3) var(--s-5);
  background: var(--gray-50);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.07em; font-weight: 600; color: var(--text-secondary);
}
.toc-list { list-style: none; padding: var(--s-3) var(--s-5); counter-reset: toc; }
.toc-list li { padding: 0.3rem 0; counter-increment: toc; }
.toc-list a {
  color: var(--text-secondary); font-size: 0.875rem;
  display: flex; align-items: baseline; gap: var(--s-2);
}
.toc-list a:hover { color: var(--color-reef); text-decoration: none; }
.toc-list a::before {
  content: counter(toc); color: var(--color-reef); font-weight: 700;
  font-size: 0.7rem; min-width: 1.2em; text-align: right;
}
.toc-list a.toc-active { color: var(--color-reef); font-weight: 600; }

/* Info card (Quick Facts) */
.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: var(--s-5);
}
.info-card-header {
  padding: var(--s-3) var(--s-5);
  background: var(--gray-50);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.07em; font-weight: 600; color: var(--text-secondary);
}
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: var(--text-secondary); font-size: 0.8rem; }
.info-row .info-value { color: var(--text-primary); font-weight: 600; text-align: right; }

/* Related Tools card (sidebar cross-link) */
.related-tools-card { margin-top: var(--s-5); }
.info-tool-link {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0.45rem 0.6rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.info-tool-link:hover {
  background: var(--color-jungle-50);
  color: var(--color-reef);
}
.info-tool-icon { font-size: 1rem; flex-shrink: 0; width: 22px; text-align: center; }
.info-tool-text { flex: 1; }
.info-card-divider {
  height: 1px; background: var(--border-light);
  margin: var(--s-2) 0;
}
.info-tool-highlight {
  color: var(--color-reef); font-weight: 600;
  background: var(--color-jungle-50);
  border-radius: var(--r-sm);
}
.info-tool-highlight:hover {
  background: var(--color-reef);
  color: white;
}

/* Article toolbar */
.article-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-5);
}
.article-tool-btn {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  font-family: inherit;
  text-decoration: none;
}
.article-tool-btn:hover {
  background: var(--gray-50);
  color: var(--text-primary);
  border-color: var(--gray-200);
  text-decoration: none;
}
.article-tool-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Article body */
.article-body { line-height: 1.75; }
.article-body h2 {
  margin-top: var(--s-10); margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 2px solid var(--border-light);
  font-size: 1.5rem;
}
.article-body h3 { margin-top: var(--s-8); margin-bottom: var(--s-3); }
.article-body p + p { margin-top: var(--s-4); }
.article-body ul, .article-body ol { margin: var(--s-4) 0; padding-left: var(--s-6); }
.article-body li { margin-bottom: var(--s-2); }
.article-body table {
  width: 100%; border-collapse: collapse;
  margin: var(--s-6) 0; font-size: 0.875rem;
  border: 1px solid var(--border-light);
  border-radius: var(--r-md); overflow: hidden;
}
.article-body th, .article-body td { padding: var(--s-3) var(--s-4); text-align: left; }
.article-body th {
  background: var(--gray-50); font-weight: 600;
  color: var(--text-primary); border-bottom: 1px solid var(--border-medium);
}
.article-body td { border-bottom: 1px solid var(--border-light); }
.article-body tr:last-child td { border-bottom: none; }
.article-body blockquote {
  border-left: 3px solid var(--color-reef);
  background: var(--color-jungle-50);
  padding: var(--s-4) var(--s-5);
  margin: var(--s-6) 0;
  color: var(--color-reef);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.875rem;
}
.article-body code {
  font-family: 'JetBrains Mono', monospace; font-size: 0.9em;
  background: var(--gray-50); padding: 0.15em 0.4em;
  border-radius: 3px; color: var(--color-reef);
}
.references {
  margin-top: var(--s-10); padding-top: var(--s-6);
  border-top: 2px solid var(--border-light);
}
.references h3 { margin-bottom: var(--s-4); }
.references ol { font-size: 0.875rem; color: var(--text-secondary); padding-left: var(--s-6); }

/* === TOOL CONTAINER === */
.tool-container {
  max-width: 860px; margin: var(--s-8) auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: var(--s-10);
  box-shadow: var(--shadow-sm);
}
.tool-header { text-align: center; margin-bottom: var(--s-8); }
.tool-header .tool-icon { margin-bottom: var(--s-4); display: inline-block; }
.tool-header h2 { margin-bottom: var(--s-3); }

.tool-select {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--r-md);
  font-family: inherit; font-size: 1rem;
  color: var(--text-primary); background: var(--white);
  cursor: pointer; transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B675E' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  padding-right: 2.75rem;
}
.tool-select:focus { outline: none; border-color: var(--color-reef); box-shadow: 0 0 0 3px rgba(27,77,62,0.08); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-4); margin: var(--s-6) 0;
}
.metric-card {
  background: var(--gray-50);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: var(--s-5); text-align: center;
  transition: all 0.2s;
}
.metric-card:hover { box-shadow: var(--shadow-sm); }
.metric-card .metric-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted);
  margin-bottom: var(--s-2);
}
.metric-card .metric-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem; font-weight: 700;
  color: var(--color-reef);
}
.metric-card .metric-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: var(--s-1); }
.metric-card.warm { border-left: 3px solid var(--color-aqua); }
.metric-card.cool { border-left: 3px solid #5B9BD5; }
.metric-card.hot { border-left: 3px solid #E74C3C; }
.metric-card.night { border-left: 3px solid var(--color-fin); }

.highlight-box {
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-md);
  margin: var(--s-5) 0;
  font-size: 0.875rem; line-height: 1.7;
}
.highlight-box h4 { margin-bottom: var(--s-2); }
.highlight-green { background: var(--color-jungle-50); border: 1px solid rgba(27,77,62,0.12); }
.highlight-amber { background: var(--color-terracotta-50); border: 1px solid rgba(212,116,92,0.12); }
.highlight-gray { background: var(--gray-50); border: 1px solid var(--border-light); }

/* Weekly grid */
.weekly-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; margin: var(--s-4) 0;
}
.weekly-day {
  padding: var(--s-3) var(--s-2);
  border-radius: var(--r-sm);
  font-size: 0.75rem; font-weight: 600;
  text-align: center;
}
.weekly-day-label { font-size: 0.6rem; opacity: 0.65; }

/* === BREADCRUMB === */
.breadcrumb {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 0.875rem; color: var(--text-muted);
  margin-bottom: var(--s-4); padding-top: var(--s-10);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--color-reef); }

/* === FOOTER === */
.site-footer {
  position: relative;
  background: var(--white);
  color: var(--text-secondary);
  padding: var(--s-12) 0 var(--s-6);
  border-top: 1px solid var(--border-light);
}
.footer-grid {
  max-width: 1280px; margin: 0 auto; padding: 0 var(--s-6);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-10);
}
.footer-brand h4 { color: var(--text-primary); font-size: 1.125rem; margin-bottom: var(--s-3); }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; color: var(--text-secondary); }
.footer-col h5 {
  color: var(--text-primary); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.09em;
  margin-bottom: var(--s-4); font-weight: 700;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--s-2); }
.footer-col a { color: var(--text-secondary); font-size: 0.875rem; transition: color 0.15s; }
.footer-col a:hover { color: var(--color-reef); text-decoration: none; }
.footer-bottom {
  max-width: 1280px; margin: var(--s-8) auto 0;
  padding: var(--s-5) var(--s-6) 0;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: var(--s-4);
  font-size: 0.75rem; color: var(--text-muted);
}
.footer-address { line-height: 1.6; }
.footer-address p { margin: 0; }
.footer-address strong { color: var(--text-primary); }
.footer-legal { text-align: right; align-self: flex-end; }
@media (max-width: 640px) {
  .footer-bottom { flex-direction: column; text-align: center; align-items: center; }
  .footer-legal { text-align: center; }
}

/* === SVG ICONS === */
.icon-sm { width: 16px; height: 16px; flex-shrink: 0; }
.icon-md { width: 20px; height: 20px; flex-shrink: 0; }
.icon-lg { width: 24px; height: 24px; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   TEMP & HUMIDITY DASHBOARD — Polished Edition
   ═══════════════════════════════════════════ */
.dashboard { max-width: 1000px; margin: 0 auto; }
.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--s-6); }
.dashboard-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.3rem 0.8rem;
  background: var(--color-terracotta-50);
  color: var(--color-aqua);
  border-radius: var(--r-full);
  font-size: 0.72rem; font-weight: 600;
}

/* Species chips */
.species-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.95rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--r-full);
  background: var(--bg-surface);
  font-size: 0.78rem; font-weight: 550;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
  flex-shrink: 0;
}
.chip:hover {
  border-color: var(--color-reef);
  color: var(--color-reef);
  background: var(--color-jungle-50);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.chip.selected {
  background: var(--color-reef);
  color: white;
  border-color: var(--color-reef);
  font-weight: 650;
  box-shadow: 0 2px 12px rgba(27,77,62,0.20);
}
.chip-emoji { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.chip-img {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Dashboard panel */
.dashboard-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-height: 400px;
}
.panel-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--s-16) var(--s-6); text-align: center; color: var(--text-muted);
}
.panel-placeholder h4 { color: var(--text-secondary); margin-bottom: var(--s-2); }
.panel-placeholder p { font-size: 0.85rem; max-width: 320px; }
.panel-content { padding: var(--s-8); }

/* Panel sections */
.panel-section { margin-bottom: var(--s-8); }
.panel-section:last-child { margin-bottom: 0; }
.panel-title {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border-light);
}
.panel-title svg { color: var(--color-aqua); flex-shrink: 0; }

/* Temperature gauges */
.temp-gauge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-4);
}
.temp-gauge-widget {
  background: var(--gray-50);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: var(--s-5) var(--s-4);
  text-align: center;
  transition: all 0.2s var(--ease-out);
}
.temp-gauge-widget:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.temp-gauge-widget .gauge-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--s-3);
}
.temp-gauge-widget .gauge-range {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem; font-weight: 700;
  margin-bottom: var(--s-1);
}
.temp-gauge-widget .gauge-celsius { font-size: 0.72rem; color: var(--text-muted); }
.temp-gauge-widget .gauge-bar-track {
  height: 5px;
  background: var(--gray-100);
  border-radius: var(--r-full);
  margin-top: var(--s-3);
  position: relative; overflow: hidden;
}
.temp-gauge-widget .gauge-bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  position: absolute;
  transition: width 0.6s var(--ease-out);
}
/* Color themes per zone */
.temp-gauge-widget.bask { border-top: 3px solid #E74C3C; }
.temp-gauge-widget.bask .gauge-range { color: #C0392B; }
.temp-gauge-widget.bask .gauge-bar-fill { background: linear-gradient(90deg, #E74C3C, #F1948A); }
.temp-gauge-widget.warm { border-top: 3px solid var(--color-aqua); }
.temp-gauge-widget.warm .gauge-range { color: var(--color-aqua); }
.temp-gauge-widget.warm .gauge-bar-fill { background: linear-gradient(90deg, var(--color-aqua), #E8947E); }
.temp-gauge-widget.cool { border-top: 3px solid #5B9BD5; }
.temp-gauge-widget.cool .gauge-range { color: #2980B9; }
.temp-gauge-widget.cool .gauge-bar-fill { background: linear-gradient(90deg, #5B9BD5, #85C1E9); }
.temp-gauge-widget.night { border-top: 3px solid var(--color-fin); }
.temp-gauge-widget.night .gauge-range { color: var(--color-fin); }
.temp-gauge-widget.night .gauge-bar-fill { background: linear-gradient(90deg, var(--color-fin), #C4B5FD); }

/* Humidity meter */
.humidity-meter-widget {
  display: flex; align-items: center; gap: var(--s-6);
  background: var(--gray-50);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: var(--s-6);
  transition: all 0.2s var(--ease-out);
}
.humidity-meter-widget:hover { box-shadow: var(--shadow-sm); }
.humidity-meter-widget .humidity-ring { width: 90px; height: 90px; flex-shrink: 0; }
.humidity-meter-widget .humidity-info h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem; font-weight: 700;
  color: #2980B9;
}
.humidity-meter-widget .humidity-info p {
  font-size: 0.8rem; color: var(--text-secondary);
  margin-top: var(--s-1); line-height: 1.5;
}

/* Tips list */
.tips-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-3);
}
.tip-item {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4);
  background: var(--gray-50);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-secondary);
  transition: all 0.15s var(--ease-out);
}
.tip-item:hover { background: var(--white); box-shadow: var(--shadow-sm); }
.tip-item .tip-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-terracotta-50);
  color: var(--color-aqua);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700;
  flex-shrink: 0;
}

/* === RESPONSIVE === */
@media (max-width: 800px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
    gap: var(--s-4);
  }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-canvas-wrap { display: none; }
  .hero { min-height: auto; padding: var(--s-8) 0 var(--s-6); }
  .hero h1 { font-size: 2rem; }
  .hero-stats { flex-wrap: wrap; gap: var(--s-4); }
}
@media (max-width: 768px) {
  .floating-nav { display: none; }
  .mobile-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--s-3) var(--s-4);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    position: sticky; top: 0; z-index: 100;
  }
  /* Bottom tab bar */
  .mobile-tabbar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 150;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
  }
  .mobile-tabbar .tab-item { flex: 1; }
  body { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
  .site-footer { margin-bottom: 0; }
  .tools-grid { grid-template-columns: 1fr; }
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 160px;
  }
  .bento-card.featured { grid-column: span 1; grid-row: span 2; }
  .bento-card.wide { grid-column: span 1; }
  .bento-card.tall { grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  .tool-container { padding: var(--s-6); }

  /* Article layout → single column */
  .article-layout {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }
  .article-toc-sidebar { display: none; }
  .article-info-sidebar { position: static; max-height: none; }
  .article-content > .toc { display: block; }

  /* Article toolbar → horizontal on tablet */
  .article-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--s-2);
  }
  .article-tool-btn {
    padding: 0.5rem 0.9rem; font-size: 0.8rem; min-height: 40px;
  }

  /* Article cover → shorter on mobile */
  .article-cover img { max-height: 260px; }

  /* Tables → scrollable on mobile */
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Sitemap → single column */
  .sitemap-grid { grid-template-columns: 1fr; }

  /* Search → full-width */
  .search-modal {
    margin: 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: 85vh; display: flex; flex-direction: column;
  }
  .search-overlay { align-items: flex-end; padding-top: 0; }
  .search-results { max-height: 55vh; }

  /* Breadcrumb */
  .breadcrumb { font-size: 0.8rem; padding-top: var(--s-8); }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }

  /* Container padding */
  .container { padding: 0 var(--s-4); }

  /* Article header */
  .article-header h1 { font-size: 1.5rem; }
  .article-header-badges { flex-wrap: wrap; }
  .article-meta { font-size: 0.8rem; }

  /* Article body */
  .article-body h2 { font-size: 1.25rem; margin-top: var(--s-8); }
  .article-body h3 { font-size: 1.05rem; }
  .article-body { font-size: 0.95rem; }

  /* Cover image */
  .article-cover img { max-height: 200px; }
  .article-cover { border-radius: 12px; }

  /* Related articles grid */
  .article-related .arts-grid { grid-template-columns: 1fr; }

  /* Info sidebar → compact on phone */
  .info-row { padding: var(--s-2) var(--s-4); }

  /* Article toolbar → compact */
  .article-tool-btn { padding: 0.4rem 0.7rem; font-size: 0.75rem; }

  /* Mobile nav logo */
  .mobile-nav a[style] { font-size: 1rem !important; }

  /* Footer */
  .footer-bottom { flex-direction: column; text-align: center; align-items: center; }
  .footer-legal { text-align: center; }

  /* Sitemap */
  .sitemap-section { padding: var(--s-4); }
  .sitemap-section h2 { font-size: 0.9rem; }
  .sitemap-section li { font-size: 0.8rem; padding: 0.35rem 0; }

  /* Breadcrumb */
  .breadcrumb { padding-top: var(--s-6); font-size: 0.75rem; }

  /* Back to top button */
  .back-to-top { bottom: var(--s-4); right: var(--s-4); width: 40px; height: 40px; }

  /* Reading progress */
  .reading-progress { height: 2px; }

  /* Share button */
  .share-btn { padding: 0.3rem 0.6rem; }
}

/* ═══════════════════════════════════════════
   Search Overlay
   ═══════════════════════════════════════════ */
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 15vh;
  animation: fadeIn 0.15s var(--ease-out);
}
.search-overlay.open { display: flex; }

.search-modal {
  width: 100%; max-width: 600px; margin: 0 var(--s-4);
  background: var(--bg-surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: slideUp 0.2s var(--ease-out);
}

.search-input-wrap {
  display: flex; align-items: center; padding: var(--s-4);
  border-bottom: 1px solid var(--border-light);
  gap: var(--s-3);
}

.search-input {
  flex: 1; border: none; background: transparent;
  font-family: 'Inter', sans-serif; font-size: 1.125rem;
  color: var(--text-primary); outline: none;
  padding: var(--s-2) 0;
}
.search-input::placeholder { color: var(--text-muted); }

.search-icon { font-size: 1.25rem; opacity: 0.5; }

.search-close {
  background: var(--gray-100); border: none; border-radius: var(--r-sm);
  width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 1rem;
  color: var(--text-secondary); transition: all 0.15s;
}
.search-close:hover { background: var(--gray-200); color: var(--text-primary); }

.search-results { max-height: 60vh; overflow-y: auto; padding: var(--s-2); }

.search-hint {
  padding: var(--s-8); text-align: center;
  color: var(--text-muted); font-size: 0.875rem;
}

.search-result-item {
  display: block; padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm); text-decoration: none;
  transition: background 0.1s;
}
.search-result-item:hover { background: var(--gray-50); text-decoration: none; }

.search-result-title {
  font-weight: 600; font-size: 0.9375rem; color: var(--text-primary);
  display: flex; align-items: center; gap: var(--s-2);
}

.search-result-desc {
  font-size: 0.8125rem; color: var(--text-secondary);
  margin-top: var(--s-1);
}

.search-result-title mark {
  background: var(--color-terracotta-50); color: var(--color-aqua);
  border-radius: 2px; padding: 0 2px;
}

.badge-sm { font-size: 0.6875rem; padding: 0.1rem 0.5rem; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Sitemap Page */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-6);
  margin-top: var(--s-8);
}
.sitemap-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
}
.sitemap-section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--color-border);
}
.sitemap-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sitemap-section li {
  padding: 0.3rem 0;
  font-size: 0.875rem;
  line-height: 1.4;
}
.sitemap-section li a {
  color: var(--color-reef);
  text-decoration: none;
  transition: color 0.2s;
}
.sitemap-section li a:hover {
  color: var(--color-aqua);
  text-decoration: underline;
}

/* Keeper Profile */
.keeper-profile {
  max-width: 720px;
  margin: 0 auto;
}
.keeper-header {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin-bottom: var(--s-8);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--border-light);
}
.keeper-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-jungle-50);
}
.keeper-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.keeper-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-reef);
}
.keeper-info h1 {
  font-size: 1.5rem;
  margin-bottom: var(--s-2);
}
.keeper-badges {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.keeper-joined {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.keeper-score {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-reef);
  background: var(--color-jungle-50);
  padding: 0.15rem 0.6rem;
  border-radius: var(--r-full);
}
.keeper-bio {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}
.keeper-activity h2 {
  font-size: 1.1rem;
  margin-bottom: var(--s-4);
}
.keeper-comments {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.keeper-comment-item {
  padding: var(--s-3);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  transition: background 0.15s;
}
.keeper-comment-item:hover {
  background: var(--gray-50);
}
.keeper-comment-link {
  text-decoration: none;
  color: inherit;
}
.keeper-comment-article {
  font-size: 0.75rem;
  color: var(--color-reef);
  font-weight: 600;
}
.keeper-comment-text {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin: var(--s-1) 0;
  line-height: 1.5;
}
.keeper-comment-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}
@media (max-width: 480px) {
  .keeper-header {
    flex-direction: column;
    text-align: center;
  }
  .keeper-badges {
    justify-content: center;
  }
}

/* Benchmark Reports */
.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-4);
}
.benchmark-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}
.benchmark-card h3 {
  font-size: 1rem;
  margin-bottom: var(--s-2);
}
.benchmark-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-3);
}
.bench-stat {
  text-align: center;
  padding: var(--s-3);
  background: var(--gray-50);
  border-radius: var(--r-sm);
}
.bench-stat-val {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-reef);
}
.bench-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 480px) {
  .benchmark-grid { grid-template-columns: 1fr; }
  .benchmark-stats { grid-template-columns: 1fr 1fr; }
}

/* Setup Upload */
.setup-upload-area {
  border: 2px dashed var(--border-medium);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.setup-upload-area:hover {
  border-color: var(--color-reef);
  background: var(--color-jungle-50);
}
.setup-upload-area p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Setup Gallery */
.setups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-5);
}
.setup-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.setup-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  text-decoration: none;
}
.setup-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-100);
}
.setup-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.setup-card:hover .setup-card-img img {
  transform: scale(1.03);
}
.setup-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}
.setup-card-body {
  padding: var(--s-4);
}
.setup-card-body h3 {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
  line-height: 1.3;
}
.setup-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}
@media (max-width: 600px) {
  .setups-grid { grid-template-columns: 1fr; }
}

/* Q&A Section */
.qa-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}
.qa-header h1 { flex: 1; }
.qa-header p { color: var(--text-secondary); flex-basis: 100%; }
.qa-ask-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-5);
}
.qa-filters { margin: var(--s-4) 0; }
.qa-list { display: flex; flex-direction: column; gap: 1px; }
.qa-item {
  display: flex;
  gap: var(--s-5);
  padding: var(--s-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  margin-bottom: var(--s-2);
  transition: background 0.15s;
}
.qa-item:hover { background: var(--gray-50); }
.qa-item-stats {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 80px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.qa-item-stats strong { display: block; font-size: 1.1rem; color: var(--text-primary); }
.qa-item-main { flex: 1; min-width: 0; }
.qa-item-title {
  font-weight: 650;
  font-size: 1rem;
  color: var(--color-reef);
  text-decoration: none;
  display: block;
  margin-bottom: var(--s-2);
}
.qa-item-title:hover { color: var(--color-aqua); }
.qa-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.qa-body {
  font-size: 0.95rem;
  line-height: 1.7;
  margin: var(--s-4) 0 var(--s-6);
  padding: var(--s-4);
  background: var(--gray-50);
  border-radius: var(--r-md);
}
.qa-answers { display: flex; flex-direction: column; gap: var(--s-4); }
.qa-answer {
  padding: var(--s-4);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
}
.qa-answer-accepted {
  border-color: var(--color-reef);
  background: var(--color-jungle-50);
}
.qa-answer-body { font-size: 0.9rem; line-height: 1.65; }
.qa-answer-meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
  font-size: 0.75rem;
  color: var(--text-muted);
}
@media (max-width: 480px) {
  .qa-item { flex-direction: column; gap: var(--s-2); }
  .qa-item-stats { flex-direction: row; gap: var(--s-4); }
}

/* UGC Modules (species page) */
.article-ugc-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  margin: var(--s-10) 0;
  padding-top: var(--s-6);
  border-top: 2px solid var(--border-light);
}
.ugc-module h3 {
  font-size: 1rem;
  margin-bottom: var(--s-3);
}
.ugc-module-content {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.ugc-item {
  display: block;
  padding: var(--s-3);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background 0.15s;
}
.ugc-item:hover { background: var(--gray-50); text-decoration: none; }
.ugc-item-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.ugc-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.setups-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}
.ugc-setup-item {
  text-decoration: none;
  color: inherit;
}
.ugc-setup-item:hover { text-decoration: none; }
.ugc-setup-thumb {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--gray-100);
  margin-bottom: 4px;
}
.ugc-setup-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ugc-setup-title {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 768px) {
  .article-ugc-modules { grid-template-columns: 1fr; }
  .setups-mini-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Comments Section */
.comments-section {
  margin-top: var(--s-10);
  padding-top: var(--s-8);
  border-top: 2px solid var(--border-light);
}
.comments-title {
  font-size: 1.25rem;
  margin-bottom: var(--s-5);
}

/* Comment form */
.comment-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.comment-form-fields {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.comment-form-row {
  display: flex;
  gap: var(--s-3);
}
.comment-input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.comment-input:focus {
  border-color: var(--color-reef);
  box-shadow: 0 0 0 3px var(--color-jungle-50);
}
.comment-textarea {
  width: 100%;
  min-height: 90px;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.comment-textarea:focus {
  border-color: var(--color-reef);
  box-shadow: 0 0 0 3px var(--color-jungle-50);
}
.comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--s-3);
}
.comment-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.comment-form-reply-to {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: var(--s-2) var(--s-3);
  background: var(--gray-50);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.comment-cancel-reply {
  background: none;
  border: none;
  color: var(--color-aqua);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: inherit;
  text-decoration: underline;
}

/* Comment cards */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.comment-card {
  padding: var(--s-4);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  transition: border-color 0.2s;
}
.comment-card.is-pinned {
  border-color: var(--color-jungle-50);
  background: linear-gradient(135deg, var(--color-jungle-50), var(--bg-surface));
}
.comment-card.is-reply {
  margin-left: var(--s-8);
  border-left: 3px solid var(--color-jungle-50);
}
.comment-card-header {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-2);
}
.comment-author {
  font-weight: 650;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.comment-pin-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.5rem;
  background: var(--color-jungle-50);
  color: var(--color-reef);
  border-radius: var(--r-full);
  font-weight: 600;
}
.comment-pending-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.5rem;
  background: #FFF3E0;
  color: #E65100;
  border-radius: var(--r-full);
}
.comment-body {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-primary);
  word-break: break-word;
}
.comment-actions {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-2);
}
.comment-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: inherit;
  padding: 2px 4px;
  border-radius: var(--r-sm);
  transition: all 0.15s;
}
.comment-like-btn:hover {
  color: var(--color-aqua);
}
.comment-like-btn.liked {
  color: var(--color-aqua);
}
.comment-like-btn .heart {
  transition: transform 0.2s;
}
.comment-like-btn:active .heart {
  transform: scale(1.3);
}
.comment-reply-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: inherit;
  padding: 2px 4px;
  border-radius: var(--r-sm);
  transition: color 0.15s;
}
.comment-reply-btn:hover {
  color: var(--color-reef);
}

/* Load more */
.comments-load-more {
  text-align: center;
  margin-top: var(--s-5);
}

/* Empty state */
.comments-empty {
  text-align: center;
  padding: var(--s-8);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 768px) {
  .comment-form-row {
    flex-direction: column;
  }
  .comment-card.is-reply {
    margin-left: var(--s-4);
  }
}

/* Dark mode */

/* ═══════════════════════════════════════════
   TOOL: Species Match Quiz
   Scoped under .quiz-tool
   ═══════════════════════════════════════════ */

.quiz-tool {
  --quiz-jungle: var(--color-reef);
  --quiz-jungle-light: var(--color-reef-light);
  --quiz-terra: var(--color-aqua);
  --quiz-terra-dark: var(--color-aqua-dark);
}

/* Brand bar */
.quiz-brand {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-8);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: 1.1rem;
  color: var(--color-reef);
}
.quiz-brand-icon {
  width: 36px; height: 36px;
  background: var(--color-jungle-50);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

/* Progress bar */
.quiz-progress-wrap {
  margin-bottom: var(--s-8);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.quiz-progress-wrap.visible { opacity: 1; transform: translateY(0); }
.quiz-progress-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-3);
}
.quiz-progress-step {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.quiz-progress-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem; font-weight: 500;
  color: var(--color-reef);
  letter-spacing: 0.02em;
}
.quiz-progress-track {
  height: 6px; background: var(--gray-200);
  border-radius: var(--r-full); overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-aqua), var(--color-reef));
  border-radius: var(--r-full);
  transition: width 0.5s var(--ease-out);
  width: 0%;
}

/* Screen transitions */
.quiz-screen {
  display: none; flex: 1;
  animation: quizScreenIn 0.6s var(--ease-out) both;
}
.quiz-screen.active { display: flex; flex-direction: column; }
@keyframes quizScreenIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Welcome screen */
.quiz-welcome-content {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; text-align: center;
  padding: var(--s-12) 0;
}
.quiz-welcome-illustration {
  margin-bottom: var(--s-8); position: relative;
  display: inline-block; margin-left: auto; margin-right: auto;
}
.quiz-welcome-silhouettes {
  display: flex; gap: var(--s-2);
  justify-content: center; align-items: flex-end;
}
.quiz-welcome-silhouette {
  width: 48px; opacity: 0.12;
  transition: opacity 0.5s var(--ease-out);
}
.quiz-welcome-silhouette:nth-child(2) { width: 64px; opacity: 0.2; }
.quiz-welcome-silhouette:nth-child(3) { width: 72px; opacity: 0.28; }
.quiz-welcome-silhouette:nth-child(4) { width: 56px; opacity: 0.2; }
.quiz-welcome-silhouette:nth-child(5) { width: 40px; opacity: 0.12; }
.quiz-welcome-silhouette svg { width: 100%; height: auto; }

.quiz-welcome-tag {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: #FFF3E0; color: #E65100;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem; font-weight: 600;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-full);
  margin-bottom: var(--s-5);
}
.quiz-welcome-tag-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #E65100;
  animation: quizPulseDot 2s ease-in-out infinite;
}
@keyframes quizPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.quiz-welcome-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800; line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: var(--s-4);
  letter-spacing: -0.02em;
}
.quiz-welcome-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-aqua), var(--color-reef));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.quiz-welcome-subtitle {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 440px; margin: 0 auto var(--s-10);
  line-height: 1.6;
}
.quiz-welcome-meta {
  display: flex; gap: var(--s-6);
  justify-content: center; margin-bottom: var(--s-10);
}
.quiz-welcome-meta-item {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 0.85rem; color: var(--text-secondary);
}
.quiz-welcome-meta-icon { font-size: 1.1rem; }

/* Button tweaks for quiz */
.quiz-btn-icon-right svg {
  transition: transform 0.2s var(--ease-out);
}
.quiz-btn-icon-right:hover svg { transform: translateX(3px); }

/* Question screen */
.quiz-question-wrap {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; padding: var(--s-6) 0;
}
.quiz-question-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem; font-weight: 500;
  color: var(--color-aqua);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: var(--s-4);
}
.quiz-question-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 700; line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: var(--s-8);
  letter-spacing: -0.01em;
}
.quiz-question-hint {
  font-size: 0.85rem; color: var(--text-muted);
  margin-top: var(--s-2); font-weight: 400;
}

/* Option cards */
.quiz-options-grid {
  display: flex; flex-direction: column; gap: var(--s-3);
}
.quiz-option-card {
  position: relative; display: flex; align-items: center; gap: var(--s-5);
  padding: var(--s-5) var(--s-6);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--r-xl);
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  user-select: none;
}
.quiz-option-card:hover {
  border-color: var(--color-reef-light);
  background: var(--color-jungle-50);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}
.quiz-option-card:active { transform: scale(0.985); }
.quiz-option-card.selected {
  border-color: var(--color-reef);
  background: var(--color-jungle-50);
  box-shadow: 0 0 0 4px rgba(27,77,62,0.12);
}

.quiz-option-emoji {
  font-size: 2rem; flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-50);
  border-radius: var(--r-lg);
  transition: background 0.2s;
}
.quiz-option-card:hover .quiz-option-emoji,
.quiz-option-card.selected .quiz-option-emoji {
  background: var(--color-jungle-50);
}
.quiz-option-body { flex: 1; min-width: 0; }
.quiz-option-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600; font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--s-1);
}
.quiz-option-desc {
  font-size: 0.85rem; color: var(--text-secondary);
  line-height: 1.4;
}
.quiz-option-check {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.quiz-option-card.selected .quiz-option-check {
  border-color: var(--color-reef);
  background: var(--color-reef);
}
.quiz-option-check svg {
  width: 14px; height: 14px;
  opacity: 0; transform: scale(0.5);
  transition: all 0.2s;
  color: white;
}
.quiz-option-card.selected .quiz-option-check svg {
  opacity: 1; transform: scale(1);
}

/* Question nav */
.quiz-question-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: var(--s-6); padding-top: var(--s-4);
}
.quiz-btn-back {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary);
  background: none; border: none;
  cursor: pointer;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  transition: all 0.2s;
}
.quiz-btn-back:hover { color: var(--text-primary); background: var(--gray-50); }
.quiz-btn-continue {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600; font-size: 0.95rem;
  padding: var(--s-3) var(--s-6);
  border-radius: var(--r-full);
  border: none;
  background: var(--color-reef);
  color: white;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  display: inline-flex; align-items: center; gap: var(--s-2);
  opacity: 0.4; pointer-events: none;
}
.quiz-btn-continue.enabled {
  opacity: 1; pointer-events: auto;
  box-shadow: 0 2px 12px rgba(27,77,62,0.2);
}
.quiz-btn-continue.enabled:hover {
  background: var(--color-reef-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(27,77,62,0.3);
}
.quiz-btn-continue.enabled:active { transform: translateY(0); }
.quiz-btn-continue svg { transition: transform 0.2s; }
.quiz-btn-continue.enabled:hover svg { transform: translateX(3px); }

/* Calculating screen */
.quiz-calculating-content {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: var(--s-8); padding: var(--s-12) 0;
}
.quiz-calc-spinner { position: relative; width: 80px; height: 80px; }
.quiz-calc-ring {
  width: 80px; height: 80px; border-radius: 50%;
  border: 3px solid var(--gray-200);
  border-top-color: var(--color-reef);
  border-right-color: var(--color-aqua);
  animation: quizSpin 1.2s linear infinite;
}
@keyframes quizSpin { to { transform: rotate(360deg); } }
.quiz-calc-emoji {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  animation: quizBounceEmoji 0.6s var(--ease-spring) infinite alternate;
}
@keyframes quizBounceEmoji {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}
.quiz-calc-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.2rem; font-weight: 600;
  color: var(--text-primary);
}
.quiz-calc-sub { font-size: 0.9rem; color: var(--text-secondary); }
.quiz-calc-facts {
  margin-top: var(--s-4);
  font-size: 0.85rem; color: var(--text-muted);
  max-width: 360px; line-height: 1.5;
}
.quiz-calc-fact {
  opacity: 0;
  animation: quizFactReveal 2.5s ease-in-out infinite;
}
.quiz-calc-fact:nth-child(1) { animation-delay: 0s; }
.quiz-calc-fact:nth-child(2) { animation-delay: 0.8s; }
.quiz-calc-fact:nth-child(3) { animation-delay: 1.6s; }
@keyframes quizFactReveal {
  0%, 100% { opacity: 0; transform: translateY(8px); }
  20%, 80% { opacity: 1; transform: translateY(0); }
}

/* Results screen */
.quiz-results-header {
  text-align: center; margin-bottom: var(--s-8);
}
.quiz-results-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800; color: var(--text-primary);
  margin-bottom: var(--s-3);
  letter-spacing: -0.02em;
}
.quiz-results-sub {
  color: var(--text-secondary); font-size: 1rem;
  max-width: 420px; margin: 0 auto;
}

/* Match card */
.quiz-match-card {
  position: relative;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--r-2xl, 1.5rem);
  overflow: hidden;
  margin-bottom: var(--s-5);
  transition: all 0.35s var(--ease-out);
}
.quiz-match-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.quiz-match-card-top {
  position: relative;
  padding: var(--s-8) var(--s-8) var(--s-6);
  background: linear-gradient(135deg, var(--color-jungle-50), var(--color-terracotta-50));
}
.quiz-match-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: var(--color-reef);
  color: white;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.85rem;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-full);
  margin-bottom: var(--s-5);
}
.quiz-match-emoji {
  font-size: 3.5rem; margin-bottom: var(--s-4); display: block;
}
.quiz-match-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.8rem; font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
  letter-spacing: -0.01em;
}
.quiz-match-latin {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; color: var(--text-muted);
  font-style: italic; margin-bottom: var(--s-5);
}
.quiz-match-score-ring {
  position: absolute; top: var(--s-8); right: var(--s-8);
  width: 72px; height: 72px;
}
.quiz-match-score-bg { fill: none; stroke: var(--gray-200); stroke-width: 6; }
.quiz-match-score-fill {
  fill: none; stroke: var(--color-reef); stroke-width: 6;
  stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: center;
  transition: stroke-dashoffset 1s var(--ease-out);
}
.quiz-match-score-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: 1.3rem;
  fill: var(--color-reef);
  text-anchor: middle; dominant-baseline: central;
}
.quiz-match-card-body { padding: var(--s-6) var(--s-8) var(--s-8); }
.quiz-match-why {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: var(--s-3);
}
.quiz-match-reason {
  font-size: 0.95rem; color: var(--text-primary);
  line-height: 1.6; margin-bottom: var(--s-6);
}
.quiz-match-specs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3); margin-bottom: var(--s-6);
}
.quiz-match-spec {
  background: var(--gray-50);
  border-radius: var(--r-lg);
  padding: var(--s-4); text-align: center;
}
.quiz-match-spec-icon { font-size: 1.3rem; margin-bottom: var(--s-2); }
.quiz-match-spec-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: var(--s-1);
}
.quiz-match-spec-label {
  font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.quiz-match-actions {
  display: flex; gap: var(--s-3); flex-wrap: wrap;
}
.quiz-match-actions .btn { flex: 1; min-width: 140px; }

/* Runner-up cards */
.quiz-runners-up-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 1.1rem;
  color: var(--text-primary);
  margin: var(--s-8) 0 var(--s-4);
}
.quiz-runner-cards {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
}
.quiz-runner-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-xl);
  padding: var(--s-5);
  text-decoration: none; color: inherit;
  transition: all 0.2s;
  display: flex; gap: var(--s-4); align-items: flex-start;
}
.quiz-runner-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.quiz-runner-emoji { font-size: 2rem; flex-shrink: 0; }
.quiz-runner-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: var(--s-1);
}
.quiz-runner-match {
  font-size: 0.8rem; color: var(--color-reef); font-weight: 600;
}
.quiz-runner-desc {
  font-size: 0.8rem; color: var(--text-muted);
  margin-top: var(--s-2); line-height: 1.4;
}

/* Results footer */
.quiz-results-footer {
  display: flex; gap: var(--s-4); justify-content: center;
  margin-top: var(--s-8); padding-top: var(--s-8);
  border-top: 1px solid var(--gray-200);
}

/* Responsive */
@media (max-width: 640px) {
  .quiz-option-card { padding: var(--s-4); gap: var(--s-4); }
  .quiz-option-emoji { width: 40px; height: 40px; font-size: 1.5rem; }
  .quiz-match-specs { grid-template-columns: repeat(2, 1fr); }
  .quiz-match-card-top { padding: var(--s-6) var(--s-5) var(--s-5); }
  .quiz-match-card-body { padding: var(--s-5); }
  .quiz-match-score-ring { top: var(--s-6); right: var(--s-5); width: 56px; height: 56px; }
  .quiz-runner-cards { grid-template-columns: 1fr; }
  .quiz-match-actions { flex-direction: column; }
  .quiz-match-actions .btn { width: 100%; }
  .quiz-welcome-meta { flex-direction: column; gap: var(--s-3); align-items: center; }
  .quiz-question-nav {
    position: sticky; bottom: 0;
    background: var(--bg-page);
    padding: var(--s-4) 0; margin-top: auto;
  }
}
@media (max-width: 380px) {
  .quiz-match-score-ring {
    position: relative; top: auto; right: auto;
    margin: 0 auto var(--s-4);
  }
  .quiz-match-card-top { text-align: center; }
}

/* ═══════════════════════════════════════════
   ACCESSIBILITY — keyboard focus & print
   ═══════════════════════════════════════════ */
:focus-visible {
  outline: 3px solid var(--color-aqua);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .floating-nav, .mobile-nav, .site-footer, .back-to-top, .reading-progress,
  .article-toolbar, .article-toc-sidebar, .article-info-sidebar,
  .article-cta, .article-ugc-modules, .article-related, .search-modal,
  .search-overlay, .comments-section, .hero-species-tag, .breadcrumb {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  .article-layout { display: block; }
  .article-content { max-width: 100%; }
  .article-cover img { max-height: none; }
  a { color: #000; text-decoration: underline; }
  .article-body { font-size: 11pt; line-height: 1.6; }
  .article-body a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* ═══════════════════════════════════════════
   TOOL PAGES — mobile collapse fix (round 15)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .tools-bento { grid-template-columns: 1fr; }
  .tool-bento-card.featured {
    grid-column: span 1;
    flex-direction: column;
  }
  .tool-bento-card.featured .tool-bento-bg {
    width: 100%; min-width: 0; min-height: 170px;
    border-radius: 0;
  }
  .calc-species-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-weekly-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calc-species-card { min-width: 0; }
}
@media (max-width: 480px) {
  .calc-dose-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   QUIZ + CALC — narrow screen fixes (round 15)
   ═══════════════════════════════════════════ */
.quiz-welcome-silhouettes {
  width: min(312px, 100%);
}
.quiz-welcome-silhouette { width: auto; flex: 1 1 0; }
.quiz-welcome-silhouette:nth-child(2) { flex-grow: 1.34; }
.quiz-welcome-silhouette:nth-child(3) { flex-grow: 1.5; }
.quiz-welcome-silhouette:nth-child(4) { flex-grow: 1.17; }
.quiz-welcome-silhouette:nth-child(5) { flex-grow: 0.84; }

@media (max-width: 480px) {
  .csc-name {
    white-space: normal;
    overflow: visible;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .calc-species-card { align-items: center; }
}

/* FinHurst 紧凑鱼档案卡（方案 A——11 项指标不滚动） */
.article-info-sidebar .info-card { padding: 10px 12px; }
.article-info-sidebar .info-card-header { font-size: 0.8rem; padding-bottom: 6px; margin-bottom: 6px; }
.article-info-sidebar .info-row { padding: 4px 0; gap: 6px; }
.article-info-sidebar .info-label { font-size: 0.72rem; min-width: 92px; }
.article-info-sidebar .info-value { font-size: 0.78rem; line-height: 1.3; }
.article-info-sidebar .article-related { margin-top: 12px; }
.article-info-sidebar .related-item { padding: 6px 0; }
.article-info-sidebar .btn { margin-top: 10px; }

/* ═══ FinHurst 模板类补齐（ScalyPal 风格统一）═══ */
/* 区块 header */
.section-header { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.section-kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; color: var(--color-aqua); text-transform: uppercase; }
.section-header h2 { font-size: 1.7rem; font-weight: 800; margin: 0; }

/* 筛选行 */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-pill { border: 1.5px solid var(--border-medium); background: var(--color-bone); padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all .2s; }
.filter-pill:hover { border-color: var(--color-aqua); color: var(--color-aqua); }
.filter-pill.active { background: var(--color-aqua); color: #fff; border-color: var(--color-aqua); }

/* bento 物种卡 */
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.bento-card { background: var(--color-bone); border: 1px solid var(--border-light); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: all .25s; text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.bento-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(14,116,144,0.12); border-color: var(--color-aqua); }
.bento-lg { grid-column: span 2; }
.bento-cta { background: linear-gradient(135deg, var(--color-aqua), var(--color-reef)); color: #fff; justify-content: center; align-items: flex-start; }
.bento-cta h3 { color: #fff; }
.bento-cta p { color: rgba(255,255,255,0.85); }
.bento-thumb { font-size: 2.2rem; line-height: 1; }
.bento-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.bento-card p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* 文章卡（Trending/Latest） */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.article-card { background: var(--color-bone); border: 1px solid var(--border-light); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; transition: all .25s; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(14,116,144,0.12); border-color: var(--color-aqua); }
.article-card h3 { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.4; }
.article-card p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-head { display: flex; justify-content: space-between; align-items: center; }
.article-reads { font-size: 0.75rem; color: var(--text-secondary); }
.article-meta { font-size: 0.78rem; color: var(--text-secondary); margin-top: auto; }
.empty-note { color: var(--text-secondary); font-style: italic; grid-column: 1 / -1; }

/* 工具卡 */
.tool-card { background: var(--color-bone); border: 1px solid var(--border-light); border-radius: var(--r-lg); padding: 20px; text-decoration: none; color: inherit; transition: all .25s; display: flex; flex-direction: column; gap: 6px; }
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(14,116,144,0.12); border-color: var(--color-aqua); }
.tool-icon { font-size: 1.6rem; }
.tool-card h3 { font-size: 0.98rem; font-weight: 700; margin: 0; }
.tool-card p { font-size: 0.8rem; color: var(--text-secondary); margin: 0; }

/* 分类页/列表页卡片 */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--color-bone); border: 1px solid var(--border-light); border-radius: var(--r-lg); padding: 18px; text-decoration: none; color: inherit; transition: all .25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(14,116,144,0.12); border-color: var(--color-aqua); }
.card h3 { font-size: 0.98rem; font-weight: 700; margin: 0 0 6px; }
.card p { font-size: 0.82rem; color: var(--text-secondary); margin: 0; }
.cat-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.cat-emoji { font-size: 2.4rem; }
.cat-header h1 { margin: 0; font-size: 1.9rem; }
.cat-header p { margin: 0; color: var(--text-secondary); }

/* 工具页表单 */
.tool-page h1 { font-size: 1.7rem; }
.tool-form label { font-size: 0.85rem; font-weight: 600; }
.tool-form input, .tool-form select { font-size: 0.9rem; }
.tool-placeholder { color: var(--text-secondary); }

/* 列表页排序 */
.sort-bar { display: flex; gap: 12px; margin-bottom: 20px; }
.sort-bar a { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); text-decoration: none; }
.sort-bar a:hover { color: var(--color-aqua); }

/* related */
.related-item { display: block; padding: 8px 0; border-bottom: 1px solid var(--border-light); text-decoration: none; }
.related-title { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); line-height: 1.35; }
.related-meta { font-size: 0.72rem; color: var(--text-secondary); margin-top: 2px; }

/* 响应式 */
@media (max-width: 1024px) {
  .bento-grid, .article-grid, .card-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-lg { grid-column: span 1; }
}
@media (max-width: 640px) {
  .bento-grid, .article-grid, .card-grid { grid-template-columns: 1fr; }
}

/* ═══ FinHurst Header（ScalyPal 风格 + 自适应）═══ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 247, 250, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-left { display: flex; align-items: center; gap: 18px; flex: 1; min-width: 0; }
.logo {
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--color-reef);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo:hover { color: var(--color-aqua); }
.nav-sep { width: 1px; height: 22px; background: var(--border-medium); }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-right { margin-left: 18px; }
.nav-links a {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--color-aqua); border-bottom-color: var(--color-aqua); }

/* Footer 补全 */
.site-footer { border-top: 1px solid var(--border-light); background: var(--color-bone-dark); margin-top: 40px; padding: 32px 0 16px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h5 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 6px; }
.footer-col a { font-size: 0.85rem; color: var(--text-primary); text-decoration: none; }
.footer-col a:hover { color: var(--color-aqua); }
.footer-tagline { font-size: 0.82rem; color: var(--text-secondary); max-width: 280px; line-height: 1.5; }
.footer-bottom { border-top: 1px solid var(--border-light); margin-top: 24px; padding-top: 14px; font-size: 0.78rem; color: var(--text-secondary); }

/* 全站自适应（移动端） */
@media (max-width: 768px) {
  .site-header .container { height: 56px; padding: 0 14px; }
  .nav-left { gap: 10px; flex: none; }
  .logo { font-size: 1.05rem; }
  .nav-sep { display: none; }
  .nav-links { gap: 12px; overflow-x: visible; -webkit-overflow-scrolling: touch; }
  .nav-links a { font-size: 0.8rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .hero { min-height: auto; padding: 40px 0 28px; }
  .hero h1 { font-size: 2rem; }
  .section-header h2 { font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 0.76rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ═══ /fish 物种 Hub（cat-grid）═══ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cat-card {
  background: var(--color-bone);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all .25s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(14,116,144,0.12); border-color: var(--color-aqua); }
.cat-card .cat-emoji { font-size: 2.4rem; line-height: 1; }
.cat-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.cat-card p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }
@media (max-width: 1024px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cat-grid { grid-template-columns: 1fr; } }

/* 右栏跟随页面滚动（长内容唔触发独立滚动条） */
.article-info-sidebar {
  position: static !important;
  max-height: none !important;
  overflow: visible !important;
}



/* ═══ References 学术引用块 ═══ */
.article-references {
  margin-top: 40px;
  padding: 28px 34px;
  background: var(--color-bone);
  border-left: 4px solid var(--color-aqua);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.article-references .article-toc-title {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-aqua);
  font-weight: 700;
  margin-bottom: 16px;
}
.ref-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ref-item {
  position: relative;
  padding-left: 26px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-primary);
}
.ref-item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-aqua);
}
@media (max-width: 640px) {
  .article-references { padding: 20px 18px; }
  .ref-item { font-size: 0.88rem; }
}

/* 物种卡配图（4:3） */
.cat-img { display: block; border-radius: var(--r-md); overflow: hidden; margin-bottom: 4px; }
.cat-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

/* ═══ 品种档案页 ═══ */
.breed-page { max-width: 860px; }
.breed-hero { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-lg); margin: 10px 0 26px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-item { background: var(--color-bone); border: 1px solid var(--border-light); border-radius: var(--r-md); padding: 14px 16px; }
.profile-label { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-aqua); margin-bottom: 4px; }
.profile-value { font-size: 0.9rem; color: var(--text-primary); line-height: 1.45; }
@media (max-width: 640px) { .profile-grid { grid-template-columns: 1fr; } }

/* 面包屑 */
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--text-secondary); margin: 0 0 4px;
}
.breadcrumb a { color: var(--color-aqua); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.bc-sep { color: var(--text-secondary); opacity: 0.6; }
.bc-current { color: var(--text-primary); }

/* ═══ /fish 科分类大图卡片（任务2 布局）═══ */
.family-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 42px; }
.family-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden; text-decoration: none;
  aspect-ratio: 16 / 10; display: block; box-shadow: 0 4px 20px rgba(14,116,144,0.10);
  transition: all .3s;
}
.family-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(14,116,144,0.22); }
.family-img { position: absolute; inset: 0; }
.family-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.family-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 30px 32px; background: linear-gradient(180deg, rgba(9,26,30,0) 25%, rgba(9,26,30,0.85) 100%);
  color: #fff;
}
.family-emoji { font-size: 1.8rem; margin-bottom: 8px; }
.family-name { font-size: 1.5rem; font-weight: 800; line-height: 1.25; }
.family-desc { font-size: 0.9rem; opacity: 0.92; margin-top: 8px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.family-badge {
  position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,0.92); color: var(--color-reef);
  font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: 0.04em;
}
@media (max-width: 768px) { .family-grid { grid-template-columns: 1fr; } .family-name { font-size: 1.05rem; } }

/* 搜索条（/fish 头部 + /search）——还原适中版 */
.hero-search {
  display: flex; gap: 10px; width: 100%; max-width: 100%; margin: 24px 0 48px;
}
.hero-search input {
  flex: 1; padding: 13px 18px; font-size: 0.95rem; border: 1px solid #cbd5e1;
  border-radius: var(--r-sm); background: var(--color-bone); outline: none; transition: border-color .2s;
}
.hero-search input::placeholder { color: var(--text-secondary); opacity: 0.75; }
.hero-search input:focus { border-color: var(--color-aqua); }
.hero-search .btn { padding: 13px 26px; font-size: 0.92rem; white-space: nowrap; border-radius: var(--r-sm); }
@media (max-width: 640px) { .hero-search { flex-direction: column; } .hero-search .btn { justify-content: center; } }

/* ═══ /topics 主题卡（重写——大卡 + 文章数）═══ */
.topic-grid { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.topic-card {
  display: flex; align-items: center; gap: 24px;
  background: var(--color-bone); border: 1px solid var(--border-light);
  border-radius: var(--r-lg); padding: 26px 30px; text-decoration: none; color: inherit;
  transition: all .25s;
}
.topic-card:hover { transform: translateX(8px); box-shadow: 0 10px 32px rgba(14,116,144,0.14); border-color: var(--color-aqua); }
.topic-icon { font-size: 2.4rem; flex-shrink: 0; }
.topic-body { flex: 1; min-width: 0; }
.topic-body h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 6px; }
.topic-body p { font-size: 0.92rem; color: var(--text-secondary); margin: 0; line-height: 1.55; }
.topic-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topic-count { font-size: 1.6rem; font-weight: 800; color: var(--color-aqua); }
.topic-count-label { font-size: 0.72rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; max-width: 46px; line-height: 1.2; }
.topic-arrow { font-size: 1.4rem; color: var(--color-aqua); }
@media (max-width: 640px) {
  .topic-card { flex-wrap: wrap; gap: 14px; padding: 20px; }
  .topic-meta { width: 100%; justify-content: flex-start; }
}

/* ═══ FinHurst 字体系统（taste-skill 重做）═══ */
body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
h1, h2, h3, h4, h5, .logo, .family-name, .topic-body h3, .article-card h3, .bento-card h3, .cat-card h3, .tool-card h3, .arts-card h3, .hero h1, .family-name {
  font-family: 'Exo', 'DM Sans', sans-serif;
  letter-spacing: -0.01em;
}

/* hero 数据条（taste-skill：大数字 + 小标签） */
.hero-stats { display: flex; gap: 34px; margin: 26px 0 10px; }
.hero-stat { text-align: left; }
.hero-stat-num { display: block; font-family: 'Exo', sans-serif; font-size: 2.2rem; font-weight: 700; color: #fff; line-height: 1; }
.hero-stat-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.65); margin-top: 4px; }
@media (max-width: 640px) { .hero-stats { gap: 22px; } .hero-stat-num { font-size: 1.7rem; } }

/* ═══ taste-skill 细节打磨 ═══ */
.cat-card, .article-card, .tool-card, .family-card, .topic-card, .arts-card, .bento-card, .card {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
a, button, .filter-pill { cursor: pointer; }
a:focus-visible, button:focus-visible, .filter-pill:focus-visible, input:focus-visible {
  outline: 2px solid var(--color-aqua); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ═══ /articles Swiss Editorial 排版（taste-skill + ui-ux-pro-max）═══ */
.arts-hero { padding: 34px 0 10px; }
.arts-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.arts-eyebrow { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--color-aqua); margin-bottom: 10px; }
.arts-hero h1 { font-family: 'Libre Bodoni', serif; font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 600; margin: 0; line-height: 1.05; letter-spacing: -0.01em; }
.arts-hero-right { text-align: right; padding-bottom: 6px; }
.arts-count-num { font-family: 'Libre Bodoni', serif; font-size: 2.6rem; font-weight: 700; color: var(--color-aqua); line-height: 1; display: block; }
.arts-count-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-secondary); }
.arts-intro { color: var(--text-secondary); font-size: 1rem; max-width: 560px; margin: 16px 0 0; line-height: 1.6; }
.arts-rule { display: none; }

/* 筛选（Swiss 标签行） */
.arts-filterbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border-light); padding: 18px 0 14px; margin-bottom: 28px; }
.arts-filter {
  font-family: 'Public Sans', sans-serif; font-size: 0.8rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary);
  background: none; border: none; padding: 7px 12px; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .18s;
}
.arts-filter:hover { color: var(--color-aqua); }
.arts-filter.active { color: var(--color-reef); border-bottom-color: var(--color-aqua); font-weight: 600; }
.arts-searchwrap { margin-left: auto; }
.arts-search {
  font-family: 'Public Sans', sans-serif; font-size: 0.85rem; padding: 9px 14px;
  border: 1px solid #cbd5e1; border-radius: 4px; background: var(--color-bone); outline: none; width: 220px;
}
.arts-search:focus { border-color: var(--color-aqua); }

/* 列表（editorial 网格） */
.arts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px; }
.arts-item { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.arts-thumb { position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 4/3; background: var(--color-bone-dark); }
.arts-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.arts-item:hover .arts-thumb img { transform: scale(1.05); }
.arts-thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.arts-cat {
  position: absolute; top: 12px; left: 12px; background: rgba(9,26,30,0.82); color: #fff;
  font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 5px 10px; border-radius: 3px;
}
.arts-body { padding: 12px 2px 0; }
.arts-body h3 { font-family: 'Libre Bodoni', serif; font-size: 1.18rem; font-weight: 600; line-height: 1.3; margin: 0 0 6px; }
.arts-item:hover .arts-body h3 { color: var(--color-aqua); }
.arts-meta { font-family: 'Public Sans', sans-serif; font-size: 0.76rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }

/* 分页（Swiss 精致——aqua 系） */
.arts-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--border-light); }
.pg-btn {
  font-family: 'Public Sans', sans-serif; font-size: 0.88rem; font-weight: 500;
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #d6dee6; background: #ffffff; border-radius: 6px;
  text-decoration: none; transition: all .18s; color: #334155;
}
.pg-btn:hover { border-color: var(--color-aqua); color: var(--color-aqua); box-shadow: 0 2px 8px rgba(14,116,144,0.12); }
.pg-btn.active { background: var(--color-aqua); border-color: var(--color-aqua); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(14,116,144,0.25); }
.pg-btn[rel="prev"], .pg-btn[rel="next"] { font-size: 1.05rem; }

@media (max-width: 1024px) { .arts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .arts-grid { grid-template-columns: 1fr; } .arts-searchwrap { width: 100%; margin-left: 0; margin-top: 10px; } .arts-search { width: 100%; } }

/* ═══ 背景改纯白（老板要求）═══ */
html, body { background: #ffffff !important; }
.site-header { background: rgba(255,255,255,0.94) !important; }
.article-card, .bento-card, .cat-card, .tool-card, .arts-item, .topic-card, .card, .family-card, .profile-item, .info-card, .article-references, .tool-form {
  background: #ffffff !important;
}
.arts-thumb { background: #f1f5f9 !important; }
.footer-grid, .site-footer { background: #f8fafc !important; }

/* /search 区块 */
.search-section { margin: 60px 0 16px; }
.search-section + .search-section { margin-top: 96px; }

/* /tools 工具瓦片（渐变块——唔用图） */
.tool-tile { display: flex; align-items: center; justify-content: center; font-size: 3.4rem; width: 100%; height: 100%; }
.t1 { background: linear-gradient(135deg, #0E7490, #164E63); }
.t2 { background: linear-gradient(135deg, #0369A1, #1E3A5F); }
.t3 { background: linear-gradient(135deg, #0F766E, #134E4A); }
.t4 { background: linear-gradient(135deg, #2563EB, #1E3A8A); }
.t5 { background: linear-gradient(135deg, #7C3AED, #4C1D95); }

/* ═══ 工具页（Swiss——输入左 + 结果右）═══ */
.tool-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 28px 0; }
.tool-panel { display: flex; flex-direction: column; gap: 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 26px; }
.tool-field label { display: block; font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #475569; margin-bottom: 7px; }
.tool-field input, .tool-field select {
  width: 100%; padding: 13px 15px; font-size: 1rem; font-family: 'Public Sans', sans-serif;
  border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; outline: none; transition: border-color .2s;
}
.tool-field input:focus, .tool-field select:focus { border-color: var(--color-aqua); box-shadow: 0 0 0 3px rgba(14,116,144,0.1); }
.tool-result {
  background: linear-gradient(160deg, #0B3A4A, #0E7490); border-radius: 12px; padding: 34px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff;
}
.tool-result-num { font-family: 'Libre Bodoni', serif; font-size: 4.2rem; font-weight: 700; line-height: 1; }
.tool-result-unit { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.16em; opacity: 0.85; margin-top: 6px; }
.tool-result-sub { font-size: 0.88rem; opacity: 0.75; margin-top: 14px; }
.tool-note { max-width: 640px; }
.tool-note h2 { font-family: 'Libre Bodoni', serif; font-size: 1.5rem; margin: 28px 0 10px; }
.tool-note p { color: var(--text-secondary); line-height: 1.65; }
@media (max-width: 768px) { .tool-layout { grid-template-columns: 1fr; } }

/* ═══ 表格线条（老板要求——唔可以无线）═══ */
table { border-collapse: collapse; width: 100%; margin: 14px 0; }
th, td { border: 1px solid #d6dee6; padding: 10px 14px; text-align: left; font-size: 0.92rem; }
th { background: #f1f5f9; font-weight: 600; color: #334155; }
tr:nth-child(even) td { background: #fafbfc; }

/* sitemap 链接列表 */
.sitemap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 20px; max-width: 900px; }
.sitemap-list a { color: var(--color-aqua); text-decoration: none; font-size: 0.95rem; padding: 6px 0; border-bottom: 1px dashed var(--border-light); transition: color .15s; }
.sitemap-list a:hover { color: var(--color-reef); }

/* ═══ /about 丰富版 ═══ */
.about-block { max-width: 860px; margin: 40px 0; }
.about-block h2 { font-family: 'Libre Bodoni', serif; font-size: 1.6rem; margin-bottom: 14px; }
.about-block p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 12px; max-width: 720px; }
.about-stats { display: flex; gap: 40px; margin: 36px 0; padding: 28px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); flex-wrap: wrap; }
.about-stat-num { display: block; font-family: 'Libre Bodoni', serif; font-size: 2.6rem; font-weight: 700; color: var(--color-aqua); line-height: 1; }
.about-stat-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin-top: 6px; display: block; }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.about-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 22px; }
.about-card h3 { font-family: 'Exo', sans-serif; font-size: 1.02rem; margin-bottom: 8px; }
.about-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.about-list { list-style: none; padding: 0; max-width: 720px; }
.about-list li { padding: 10px 0; border-bottom: 1px dashed var(--border-light); color: var(--text-secondary); line-height: 1.6; }
.about-faq details { border-bottom: 1px solid var(--border-light); padding: 14px 0; max-width: 720px; }
.about-faq summary { font-weight: 600; cursor: pointer; color: var(--text-primary); }
.about-faq details p { margin: 10px 0 0; color: var(--text-secondary); line-height: 1.6; }
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } .about-stats { gap: 24px; } }

/* ═══ 首页全宽 banner（hero 覆盖 header + 底部渐变）═══ */
.home-page { overflow-x: hidden; }
.home-page .site-header { background: rgba(255,255,255,0.94) !important; position: sticky; top: 0; left: 0; right: 0; z-index: 100; }
.home-page .site-header .nav-pill, .home-page .site-header .nav-link { color: var(--text-primary); }
.home-page .site-header a.logo { color: var(--text-primary); }
.home-hero {
  position: relative; width: 100vw; min-height: 92vh;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  background: url('/images/hero-banner.webp') center/cover no-repeat;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 40px;
}
.home-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,25,35,0.45) 0%, rgba(6,25,35,0.25) 40%, rgba(6,25,35,0.62) 100%);
}
.home-hero::after { display: none; }
.home-hero .hero-inner { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 84px 24px 90px; }
.home-hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); color: #fff; line-height: 1.08; text-shadow: 0 2px 24px rgba(0,0,0,0.35); }
.home-hero p { color: rgba(255,255,255,0.92); }
.home-hero .hero-badge { background: rgba(255,255,255,0.16); color: #fff; border: 1px solid rgba(255,255,255,0.28); backdrop-filter: blur(6px); }
.home-hero .hero-stat-num { color: #fff; }
.home-hero .hero-stat-label { color: rgba(255,255,255,0.7); }
.home-hero .btn-primary { background: #fff; color: var(--color-reef); }
.home-hero .btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
@media (max-width: 768px) { .home-hero { min-height: 70vh; } }

/* footer 地址 */
.footer-address { margin-top: 10px; color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; }

/* footer-bottom 左右布局——版权跟地址最后一行平齐 */
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; }
.footer-bottom p:last-child { align-self: flex-end; padding-bottom: 0; line-height: 1.6; }

/* ═══ /tools 左图右文案列表（ScalyPal tool-bento 风格）═══ */
.tools-bento { display: flex; flex-direction: column; gap: 18px; margin-top: 30px; }
.tool-bento-card {
  display: flex; flex-direction: row; align-items: stretch; min-height: 170px; overflow: hidden; border-radius: var(--r-lg);
  border: 1px solid var(--border-light); background: #fff; text-decoration: none; color: inherit;
  transition: all .25s;
}
.tool-bento-card:hover { box-shadow: 0 12px 36px rgba(14,116,144,0.16); transform: translateY(-3px); border-color: var(--color-aqua); }
.tool-bento-bg { flex: 0 0 260px; background-size: cover; background-position: center; }
.tool-bento-body { flex: 1; padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; }
.tool-bento-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.badge-terra { background: var(--color-aqua); color: #fff; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 5px 12px; border-radius: 999px; }
.status-pill { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 999px; }
.status-pill.active { background: #d1fae5; color: #065f46; }
.status-pill.quiz { background: #ede9fe; color: #5b21b6; }
.tool-bento-title { font-family: 'Libre Bodoni', serif; font-size: 1.35rem; font-weight: 600; margin-bottom: 6px; }
.tool-bento-desc { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; margin-bottom: 10px; }
.tool-hover-action { color: var(--color-aqua); font-weight: 600; font-size: 0.85rem; opacity: 0; transform: translateX(-6px); transition: all .25s; }
.tool-bento-card:hover .tool-hover-action { opacity: 1; transform: translateX(0); }
@media (max-width: 768px) {
  .tool-bento-card { flex-direction: column; }
  .tool-bento-bg { flex: 0 0 140px; }
}

/* ═══ /topics 新风格：图上 + 白卡信息下（图文卡片网格）═══ */
.topic-grid-new { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-top: 30px; }
.topic-card-new {
  background: #fff; border: 1px solid var(--border-light); border-radius: var(--r-lg);
  overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: all .25s;
}
.topic-card-new:hover { box-shadow: 0 14px 40px rgba(14,116,144,0.16); transform: translateY(-4px); border-color: var(--color-aqua); }
.topic-card-img { position: relative; aspect-ratio: 16/8; overflow: hidden; }
.topic-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.topic-card-new:hover .topic-card-img img { transform: scale(1.06); }
.topic-card-emoji {
  position: absolute; top: 14px; left: 14px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.92); border-radius: 12px; font-size: 1.4rem; box-shadow: 0 4px 14px rgba(0,0,0,0.14);
}
.topic-card-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; background: linear-gradient(135deg, #0E7490, #164E63); }
.topic-card-info { padding: 22px 24px 20px; display: flex; flex-direction: column; flex: 1; }
.topic-card-info h3 { font-family: 'Libre Bodoni', serif; font-size: 1.3rem; font-weight: 600; margin: 0 0 8px; }
.topic-card-info p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin: 0 0 14px; flex: 1; }
.topic-card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border-light); padding-top: 12px; }
.topic-card-count { font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--color-aqua); }
.topic-card-arrow { font-size: 1.2rem; color: var(--color-aqua); transition: transform .2s; }
.topic-card-new:hover .topic-card-arrow { transform: translateX(6px); }
@media (max-width: 768px) { .topic-grid-new { grid-template-columns: 1fr; } }

/* ═══ Google 风格卡片（随意/圆润/彩色）═══ */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin: 26px 0; }
.g-card {
  background: #fff; border-radius: 24px; padding: 26px; text-decoration: none; color: inherit;
  box-shadow: 0 1px 3px rgba(60,64,67,0.12), 0 4px 12px rgba(60,64,67,0.08);
  display: flex; flex-direction: column; transition: all .25s;
}
.g-card:hover { box-shadow: 0 4px 10px rgba(60,64,67,0.16), 0 10px 28px rgba(60,64,67,0.14); transform: translateY(-3px); }
.g-icon {
  width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; margin-bottom: 16px; background: color-mix(in srgb, var(--g-tint) 14%, #fff);
}
.g-card h3 { font-family: 'DM Sans', sans-serif; font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; color: #202124; }
.g-card p { color: #5f6368; font-size: 0.88rem; line-height: 1.55; margin: 0 0 16px; flex: 1; }
.g-foot { display: flex; align-items: center; justify-content: space-between; color: var(--g-tint); font-size: 0.8rem; font-weight: 600; }
.g-arrow { font-size: 1.15rem; transition: transform .2s; }
.g-card:hover .g-arrow { transform: translateX(5px); }
@media (max-width: 640px) { .g-grid { grid-template-columns: 1fr; } }

/* Google 卡加图 */
.g-card { overflow: hidden; padding: 0; }
.g-card-img { position: relative; aspect-ratio: 16/8; overflow: hidden; }
.g-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.g-card:hover .g-card-img img { transform: scale(1.06); }
.g-card-img-fb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: linear-gradient(135deg, var(--g-tint), #164E63); }
.g-card-body { padding: 22px 26px 24px; display: flex; flex-direction: column; flex: 1; }
.g-card-body .g-icon { margin-bottom: 14px; }
.g-card-body p { flex: 1; }

/* 文章页 Related Species */
.related-breed { display: flex; align-items: center; gap: 14px; padding: 14px; background: #f8fafc; border: 1px solid var(--border-light); border-radius: 10px; }
.related-breed img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; }
.related-breed a { color: var(--color-aqua); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.related-breed a:hover { color: var(--color-reef); }

/* ═══ 移动端汉堡菜单 ═══ */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--text-primary); border-radius: 2px; transition: all .25s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
@media (max-width: 860px) {
  .site-header { position: relative; }
  .nav-left { justify-content: flex-start; }
  .nav-toggle {
    display: flex; margin-left: 0 !important; z-index: 200;
    position: absolute; top: 50%; right: 14px; transform: translateY(-50%);
  }
  .nav-sep { display: none; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100dvh; height: 100vh; width: 280px; max-width: 80vw;
    background: #fff !important; box-shadow: -8px 0 30px rgba(0,0,0,0.14);
    flex-direction: column; padding: 90px 26px 30px; gap: 6px;
    transform: translateX(100%); transition: transform .28s ease; z-index: 150;
    overflow: visible; display: flex; align-items: stretch; margin: 0;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.05rem; padding: 13px 12px; border-radius: 10px; color: var(--text-primary); width: 100%; text-align: left; border-bottom: none; white-space: nowrap; overflow: visible; }
  .nav-links a:hover { background: #f1f5f9; }
  .nav-toggle.active span { background: var(--text-primary); }
}

/* ═══ 移动端补充：文章三栏 + 表格 ═══ */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-toc-sidebar { display: none; }
  .article-info-sidebar { display: none; }
}
@media (max-width: 768px) {
  .article-content { padding: 0; }
  .article-content img, .article-content table { max-width: 100%; }
  .tool-note table, .article-content table { display: block; overflow-x: auto; white-space: nowrap; }
  .tool-note h2 { font-size: 1.25rem; }
  .tool-result-num { font-size: 3rem; }
}

/* header 右侧用户区（Sign In 最右 + ｜ 分隔） */
.nav-right { display: flex; align-items: center; margin-left: auto; padding-left: 18px; }
.nav-signin { color: var(--text-primary); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.nav-signin:hover { color: var(--color-aqua); }
.nav-user { color: var(--color-aqua); font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.nav-user:hover { color: var(--color-reef); }
@media (max-width: 860px) {
  .nav-right { padding-left: 10px; }
  .nav-signin, .nav-user { font-size: 0.85rem; }
}

/* nav active（当前页面下划线标记） */
.nav-links a.active { color: var(--color-aqua); border-bottom: 2px solid var(--color-aqua); padding-bottom: 2px; }
