/* ==========================================================================
   Aquascape Studio — design system
   Deep-water blue base, aquatic plant green as the primary, coral as accent.
   Dark by design: this is the specified theme, not a preference toggle.

   Sections
     01 tokens            08 cards              15 tool detail
     02 reset             09 notices            16 calculators
     03 typography        10 footer             17 studio / 3D
     04 layout            11 page hero          18 tank database
     05 buttons           12 home               19 blog
     06 tags & badges     13 tools list         20 content pages
     07 header            14 studio hub         21 utilities
   ========================================================================== */

/* ========================================================== 01 · TOKENS */
:root {
  /* deep water — the base */
  --deep-950: #03090E;
  --deep-900: #050F17;
  --deep-850: #081825;
  --deep-800: #0A1E2C;
  --deep-700: #0E2A3C;
  --deep-600: #13384E;
  --deep-500: #1A4862;
  --deep-400: #255A78;
  --deep-300: #356E8C;

  /* aquatic plant green — the primary */
  --plant-800: #134840;
  --plant-700: #1A5C54;
  --plant-600: #228076;
  --plant-500: #2A9D8F;
  --plant-400: #4AB8A8;
  --plant-300: #78D0C0;
  --plant-200: #A8E0D8;
  --plant-100: #D0F0EA;

  /* coral — the accent */
  --coral-800: #6E2E1E;
  --coral-700: #8A3A28;
  --coral-500: #E76F51;
  --coral-400: #EE8A70;
  --coral-300: #F4A890;
  --coral-200: #F9C8B8;
  --coral-100: #FCE4DC;

  /* sand — substrate */
  --sand-700: #F4E8D0;
  --sand-600: #E8D8B8;
  --sand-500: #D4C09C;
  --sand-400: #B8A480;
  --sand-300: #8C7860;

  /* water highlights */
  --aqua-400: #A8DADC;
  --aqua-300: #C4E4E6;
  --aqua-200: #E0F0F2;
  --aqua-100: #F0F8F8;

  /* neutrals */
  --text: #E8EFF2;
  --text-2: #A8B8C0;
  --text-3: #7A8C98;
  --border: #1A4862;
  --border-strong: #255A78;

  /* semantic */
  --ok: #4AB8A8;
  --warn: #F0C75E;
  --danger: #E76F51;
  --info: #4A9CC8;

  /* surfaces */
  --surface: var(--deep-700);
  --surface-2: var(--deep-600);
  --surface-deep: var(--deep-850);
  --bg: var(--deep-800);

  /* radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* shadows — black overlay on a dark base */
  --sh-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-sm: 0 2px 8px rgba(0, 0, 0, .40);
  --sh-md: 0 8px 22px rgba(0, 0, 0, .45);
  --sh-lg: 0 18px 48px rgba(0, 0, 0, .55);
  --glow-water: 0 0 18px rgba(168, 218, 220, .25);
  --glow-plant: 0 0 18px rgba(42, 157, 143, .30);
  --glow-coral: 0 0 18px rgba(231, 111, 81, .28);

  /* motion */
  --t-fast: .18s ease;
  --t-med: .32s ease;
  --t-slow: .6s ease-in-out;

  /* type */
  --font-head: "Comfortaa", "Quicksand", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, Menlo, ui-monospace, monospace;

  /* layout */
  --header-h: 64px;
  --header-h-sm: 52px;
  --container: 1200px;
  --container-narrow: 820px;
  --container-wide: 1360px;
  --gutter: 24px;
}

/* =========================================================== 02 · RESET */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Underwater light-dapple wash over the whole content area. Fixed so it does
   not scroll with content; very low opacity so it reads as texture. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 18% 8%, rgba(168, 218, 220, .10), transparent 60%),
    radial-gradient(ellipse 50% 45% at 82% 22%, rgba(42, 157, 143, .08), transparent 62%),
    radial-gradient(ellipse 70% 35% at 50% 96%, rgba(231, 111, 81, .05), transparent 60%);
  animation: dapple 34s ease-in-out infinite alternate;
}
@keyframes dapple {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-1.5%, 1.2%, 0) scale(1.04); }
}

main { position: relative; z-index: 1; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--plant-400); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--coral-400); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

:focus-visible {
  outline: 3px solid var(--plant-500);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(42, 157, 143, .35);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 400;
  background: var(--plant-500);
  color: var(--deep-900);
  padding: 12px 20px;
  border-radius: 0 0 var(--r-xs) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ====================================================== 03 · TYPOGRAPHY */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.005em;
  color: var(--text);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.18rem, 2vw, 1.4rem); }
h4 { font-size: 1.08rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.14rem);
  line-height: 1.7;
  color: var(--text-2);
  max-width: 68ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--plant-500);
  margin-bottom: 12px;
}
.eyebrow::before { content: "◦"; font-size: 1.1em; line-height: 1; }

.prose a { color: var(--plant-400); text-decoration: underline; text-decoration-color: var(--aqua-400); text-underline-offset: 3px; }
.prose a:hover { color: var(--coral-400); text-decoration-color: var(--coral-400); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: .86rem; }
.center { text-align: center; }

/* Parameter marker — pH, GH, KH, temperature, NO3 */
.param {
  font-family: var(--font-mono);
  font-size: .82rem;
  background: var(--deep-850);
  border: 1px solid var(--plant-700);
  color: var(--plant-300);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ========================================================== 04 · LAYOUT */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--container-narrow); }
.container-wide { max-width: var(--container-wide); }

section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-tight { padding: 44px 0 64px; }
.section-head { margin-bottom: 32px; max-width: 76ch; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.section-foot { margin-top: 32px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

.stack > * + * { margin-top: 16px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.divider { height: 1px; background: var(--border); border: 0; margin: 40px 0; }

/* ========================================================= 05 · BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1.5px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast),
              box-shadow var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--plant-500); color: var(--deep-900); }
.btn-primary:hover { background: var(--plant-400); color: var(--deep-900); box-shadow: var(--glow-plant); }

.btn-coral { background: var(--coral-500); color: var(--deep-900); }
.btn-coral:hover { background: var(--coral-400); color: var(--deep-900); box-shadow: var(--glow-coral); }

.btn-outline { border-color: var(--plant-600); color: var(--plant-300); background: transparent; }
.btn-outline:hover { background: rgba(42, 157, 143, .14); border-color: var(--plant-400); color: var(--plant-200); }

.btn-ghost { background: var(--deep-600); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--deep-500); color: var(--text); border-color: var(--border-strong); }

.btn-sm { padding: 8px 16px; font-size: .86rem; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg { padding: 15px 32px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { box-shadow: none; }

/* CTA with rising bubbles */
.btn-bubble { position: relative; overflow: hidden; isolation: isolate; }
.btn-bubble::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 18% 110%, rgba(255, 255, 255, .45) 0 2px, transparent 3px),
    radial-gradient(circle at 46% 120%, rgba(255, 255, 255, .35) 0 3px, transparent 4px),
    radial-gradient(circle at 74% 105%, rgba(255, 255, 255, .40) 0 2px, transparent 3px);
  background-size: 100% 200%;
  animation: bubbleRise 3.6s linear infinite;
  opacity: .7;
}
@keyframes bubbleRise {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 -200%, 0 -200%, 0 -200%; }
}

/* =================================================== 06 · TAGS & BADGES */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  background: rgba(42, 157, 143, .16);
  color: var(--plant-300);
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag-plant { background: rgba(42, 157, 143, .18); color: var(--plant-300); border-color: rgba(42, 157, 143, .32); }
.tag-coral { background: rgba(231, 111, 81, .18); color: var(--coral-300); border-color: rgba(231, 111, 81, .32); }
.tag-aqua { background: rgba(168, 218, 220, .14); color: var(--aqua-300); border-color: rgba(168, 218, 220, .26); }
.tag-sand { background: rgba(212, 192, 156, .16); color: var(--sand-600); border-color: rgba(212, 192, 156, .28); }
.tag-outline { background: transparent; color: var(--text-2); border-color: var(--border-strong); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--deep-600);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .86rem;
  font-weight: 600;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.chip:hover { background: var(--deep-500); color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--plant-500);
  color: var(--deep-900);
  border-color: var(--plant-400);
  font-weight: 700;
}

.badge-3d {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--plant-500);
  color: var(--deep-900);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-3d svg { width: 13px; height: 13px; }

.livestock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--coral-500);
  color: var(--deep-900);
  font-size: .7rem;
  font-weight: 800;
}
.livestock-badge svg { width: 13px; height: 13px; }

.water-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  background: rgba(74, 184, 168, .18);
  color: var(--ok);
  border: 1px solid rgba(74, 184, 168, .34);
}
.water-badge.is-warn { background: rgba(240, 199, 94, .16); color: var(--warn); border-color: rgba(240, 199, 94, .34); }
.water-badge.is-bad { background: rgba(231, 111, 81, .16); color: var(--danger); border-color: rgba(231, 111, 81, .34); }

.cycle-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .03em;
  background: rgba(74, 184, 168, .18);
  color: var(--ok);
  border: 1px solid rgba(74, 184, 168, .34);
}
.cycle-badge.is-new { background: rgba(231, 111, 81, .18); color: var(--danger); border-color: rgba(231, 111, 81, .34); }
.cycle-badge.is-cycling { background: rgba(240, 199, 94, .16); color: var(--warn); border-color: rgba(240, 199, 94, .34); }
.cycle-badge.is-mature { background: rgba(168, 218, 220, .16); color: var(--aqua-300); border-color: rgba(168, 218, 220, .3); }

/* Water quality indicator strip */
.water-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--r-xs);
  background: var(--deep-850);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-2);
}
.water-indicator .wi-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.water-indicator.is-warn .wi-dot { background: var(--warn); }
.water-indicator.is-bad .wi-dot { background: var(--danger); }

/* ========================================================== 07 · HEADER */
/* The only site with a centred logo: three nav items left, three right,
   logo dead centre. Nothing else is allowed in the left slot. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--deep-800);
  border-bottom: 1px solid var(--plant-700);
  transition: height var(--t-med), background var(--t-med);
}
.site-header .hd-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  transition: height var(--t-med);
}
.site-header.is-scrolled { background: rgba(10, 30, 44, .96); backdrop-filter: blur(10px); }
.site-header.is-scrolled .hd-inner { height: var(--header-h-sm); }

.hd-nav { display: flex; align-items: center; gap: 2px; }
.hd-nav-left { justify-content: flex-end; }
.hd-nav-right { justify-content: flex-start; }

.hd-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: .86rem;
  font-weight: 500;
  color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.hd-link:hover { background: rgba(42, 157, 143, .12); color: var(--plant-300); }
.hd-link[aria-current="page"] { color: var(--plant-400); background: rgba(42, 157, 143, .10); font-weight: 700; }
.hd-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  transform: translateX(-50%);
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--plant-500);
}
.hd-link .caret { width: 12px; height: 12px; transition: transform var(--t-fast); }
.hd-item.is-open .caret { transform: rotate(180deg); }

/* centred logo */
.hd-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  transition: transform var(--t-med);
}
.hd-logo:hover { transform: translateY(-1px); }
.hd-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--plant-500);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: var(--glow-plant);
  transition: width var(--t-med), height var(--t-med);
}
.hd-logo-mark svg { width: 22px; height: 22px; }
.hd-logo-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--aqua-200);
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: opacity var(--t-med), max-width var(--t-med);
}
.site-header.is-scrolled .hd-logo-mark { width: 30px; height: 30px; }
.site-header.is-scrolled .hd-logo-name { opacity: 0; max-width: 0; overflow: hidden; }

/* right cluster: search + hamburger */
.hd-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.hd-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.hd-icon-btn:hover { background: rgba(42, 157, 143, .14); color: var(--plant-300); border-color: var(--border); }
.hd-icon-btn svg { width: 19px; height: 19px; }

/* dropdown */
.hd-item { position: relative; }
.hd-drop {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 300px;
  background: var(--deep-700);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
}
.hd-item.is-open .hd-drop { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.hd-drop a {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--r-xs);
  color: var(--text);
  font-size: .88rem;
  font-weight: 600;
  transition: background var(--t-fast), color var(--t-fast);
}
.hd-drop a:hover { background: rgba(42, 157, 143, .16); color: var(--plant-200); }
.hd-drop .dd-ico {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(42, 157, 143, .2);
  display: grid; place-items: center; flex: none; margin-top: 2px;
}
.hd-drop .dd-ico svg { width: 12px; height: 12px; color: var(--plant-300); }
.hd-drop .dd-desc { display: block; font-size: .76rem; font-weight: 400; color: var(--text-2); line-height: 1.45; margin-top: 2px; }
.hd-drop .dd-sep { height: 1px; background: var(--border); margin: 8px 4px; }
.hd-drop .dd-all { color: var(--plant-400); font-weight: 700; }

/* hamburger + mobile drawer */
.hd-burger { display: none; }
.hd-drawer {
  display: none;
  background: var(--deep-700);
  border-top: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-med);
}
.hd-drawer.is-open { max-height: 78vh; overflow-y: auto; }
.hd-drawer .dw-inner { padding: 12px 0 20px; }
.hd-drawer a {
  display: block;
  padding: 11px 4px;
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid rgba(26, 72, 98, .5);
}
.hd-drawer a:hover { color: var(--plant-300); }
.dw-group { border-bottom: 1px solid rgba(26, 72, 98, .5); }
.dw-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 11px 4px; color: var(--text); font-weight: 600; text-align: left;
}
.dw-toggle svg { width: 15px; height: 15px; transition: transform var(--t-fast); }
.dw-group.is-open .dw-toggle svg { transform: rotate(180deg); }
.dw-panel { max-height: 0; overflow: hidden; transition: max-height var(--t-med); }
.dw-group.is-open .dw-panel { max-height: 420px; }
.dw-panel a { padding-left: 16px; font-weight: 500; color: var(--text-2); border-bottom: 0; }
.dw-panel .dd-desc { display: block; font-size: .76rem; color: var(--text-3); }

/* search overlay */
.search-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(3, 9, 14, .92);
  backdrop-filter: blur(6px);
  display: none;
  padding-top: 12vh;
}
.search-layer.is-open { display: block; }
.search-layer .sl-inner { max-width: 680px; margin: 0 auto; padding: 0 var(--gutter); }
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--deep-700);
  border: 1.5px solid var(--plant-600);
  border-radius: var(--r-pill);
  padding: 14px 22px;
  box-shadow: var(--sh-lg), var(--glow-plant);
}
.search-box svg { width: 20px; height: 20px; color: var(--plant-400); flex: none; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: var(--text);
}
.search-box input::placeholder { color: var(--text-3); }
.search-results { margin-top: 18px; max-height: 56vh; overflow-y: auto; }
.sr-item {
  display: block;
  padding: 13px 18px;
  border-radius: var(--r-sm);
  background: var(--deep-700);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.sr-item:hover { border-color: var(--plant-600); background: var(--deep-600); color: var(--text); }
.sr-item .sr-kind { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--plant-500); }
.sr-item .sr-title { font-weight: 700; margin-top: 2px; }
.sr-item .sr-desc { font-size: .84rem; color: var(--text-2); }
.sr-empty { padding: 20px; text-align: center; color: var(--text-2); }

/* =========================================================== 08 · CARDS */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--deep-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--plant-600); }

.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--deep-850); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med); }
.card:hover .card-media img { transform: scale(1.05); }

.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-size: 1.08rem; font-weight: 600; margin: 0; font-family: var(--font-head); }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--plant-400); }
.card-text { font-size: .9rem; color: var(--text-2); margin: 0; line-height: 1.6; flex: 1; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 12px; margin-top: auto;
  border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--text-2);
}
.cat-arrow { color: var(--plant-500); font-size: 1.05rem; transition: transform var(--t-fast); }
.card:hover .cat-arrow { transform: translateX(4px); }

/* category card — no image, round icon */
.cat-card .cat-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(42, 157, 143, .16);
  border: 1px solid rgba(42, 157, 143, .3);
  display: grid; place-items: center;
  margin-bottom: 4px;
  box-shadow: var(--glow-plant);
}
.cat-card .cat-icon svg { width: 24px; height: 24px; color: var(--plant-400); }
.cat-count { font-family: var(--font-mono); font-size: .78rem; color: var(--text-2); }

/* tool card — dark, contained line art */
.tool-card .card-media { background: var(--deep-850); aspect-ratio: 4 / 3; }
.tool-card .card-media img { object-fit: contain; padding: 8px; }

/* blog card */
.blog-card .card-media { aspect-ratio: 16 / 9; }
.blog-meta { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--text-2); flex-wrap: wrap; }
.blog-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }

/* calc card */
.calc-card .calc-mini {
  display: flex; justify-content: space-between; gap: 10px;
  font-family: var(--font-mono); font-size: .74rem; color: var(--text-2);
  background: var(--deep-850); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 8px 12px;
}

/* studio card — deepest, with a live-preview slot */
.studio-card { background: var(--deep-850); border-color: var(--plant-700); }
.studio-card:hover { border-color: var(--plant-400); box-shadow: var(--sh-lg), var(--glow-plant); }
.studio-card .card-media { aspect-ratio: 4 / 3; background: var(--deep-950); }
.studio-card .card-media img { object-fit: contain; padding: 8px; }

/* tank card */
.tank-card .tk-thumb {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--deep-850); border: 1px solid var(--border-strong);
  display: grid; place-items: center; flex: none;
}
.tank-card .tk-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.tank-card .tk-row { display: flex; align-items: center; gap: 16px; }
.tank-card .tk-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ========================================================= 09 · NOTICES */
.notice {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--deep-700);
  font-size: .9rem;
  line-height: 1.62;
  margin: 20px 0;
}
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 3px; }
.notice strong { display: block; margin-bottom: 3px; font-family: var(--font-head); font-size: .95rem; }
.notice-safety { background: #2E1A14; border-color: var(--coral-700); color: var(--coral-300); }
.notice-safety svg { color: var(--coral-500); }
.notice-safety strong { color: var(--coral-200); }
.notice-info { background: var(--deep-700); border-color: var(--border-strong); color: var(--aqua-400); }
.notice-info svg { color: var(--info); }
.notice-info strong { color: var(--aqua-300); }
.notice-warn { background: #2E2410; border-color: #8A6A00; color: var(--warn); }
.notice-warn svg { color: var(--warn); }
.notice-warn strong { color: #F7DFA0; }
.notice-neutral { background: var(--deep-700); border-color: var(--border); color: var(--text-2); }
.notice-neutral svg { color: var(--plant-400); }
.notice-neutral strong { color: var(--text); }

/* inline tip box — left rule, no icon */
.tip-box {
  padding: 14px 18px;
  border-left: 4px solid var(--plant-500);
  background: rgba(42, 157, 143, .08);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  margin: 20px 0;
  font-size: .92rem;
  line-height: 1.65;
}
.tip-box strong { display: block; margin-bottom: 3px; font-family: var(--font-head); color: var(--plant-300); }
.tip-box.is-warn { border-left-color: var(--coral-500); background: rgba(231, 111, 81, .09); }
.tip-box.is-warn strong { color: var(--coral-300); }
.tip-box.is-note { border-left-color: var(--aqua-400); background: rgba(168, 218, 220, .07); }
.tip-box.is-note strong { color: var(--aqua-300); }
.tip-box.is-ok { border-left-color: var(--ok); background: rgba(74, 184, 168, .09); }
.tip-box.is-ok strong { color: var(--ok); }

/* legal note — monospace, deliberately unglamorous */
.legal-note {
  font-family: var(--font-mono);
  font-size: .84rem;
  line-height: 1.7;
  color: var(--text-2);
  background: var(--deep-850);
  border-left: 4px solid var(--plant-500);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  padding: 16px 18px;
  margin: 28px 0 0;
}
.legal-note strong { color: var(--plant-300); }

/* safety strip for electrical / water pages */
.safety-strip {
  background: #2A1712;
  border-top: 1px solid var(--coral-700);
  border-bottom: 1px solid var(--coral-700);
  padding: 10px 0;
}
.safety-strip .ss-inner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: .8rem; color: var(--coral-300);
}
.safety-strip .ss-title {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--coral-200); flex: none;
}
.safety-strip .ss-title svg { width: 16px; height: 16px; }
.safety-strip .ss-items { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.safety-strip .ss-items span { display: inline-flex; align-items: center; gap: 6px; }
.safety-strip .ss-items svg { width: 14px; height: 14px; color: var(--coral-500); }

.empty-state {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-2);
}
.empty-state svg { width: 36px; height: 36px; color: var(--text-3); margin: 0 auto 12px; }

/* ========================================================= 10 · FOOTER */
.site-footer { background: var(--deep-900); border-top: 1px solid var(--plant-800); margin-top: 64px; }
.ft-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 56px 0 40px;
}
.ft-brand .ft-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ft-brand .ft-logo-mark {
  width: 34px; height: 34px; border-radius: 50%; background: var(--plant-500);
  display: grid; place-items: center; flex: none;
}
.ft-brand .ft-logo-mark svg { width: 20px; height: 20px; }
.ft-brand .ft-logo-name { font-family: var(--font-head); font-size: 1.02rem; font-weight: 700; color: var(--aqua-200); }
.ft-brand p { font-size: .86rem; color: var(--text-2); line-height: 1.65; max-width: 34ch; }
.ft-icons { display: flex; gap: 10px; margin-top: 16px; }
.ft-icons span {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(42, 157, 143, .14); border: 1px solid var(--border);
}
.ft-icons svg { width: 15px; height: 15px; color: var(--plant-400); }
.ft-version { font-family: var(--font-mono); font-size: .72rem; color: var(--text-3); margin-top: 14px; }

.ft-col h4 {
  font-family: var(--font-body);
  font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--plant-500); margin: 0 0 14px;
}
.ft-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ft-col a { font-size: .86rem; color: var(--text-2); }
.ft-col a:hover { color: var(--plant-400); }

.ft-sub { margin-top: 20px; }
.ft-sub label { display: block; font-size: .78rem; color: var(--text-2); margin-bottom: 8px; }
.ft-sub-row { display: flex; gap: 8px; }
.ft-sub input {
  flex: 1; min-width: 0;
  background: var(--deep-800); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 10px 16px; font-size: .86rem; color: var(--text);
}
.ft-sub input::placeholder { color: var(--text-3); }
.ft-sub input:focus { outline: none; border-color: var(--plant-500); box-shadow: var(--glow-plant); }
.ft-sub .fs-msg { font-size: .78rem; margin-top: 8px; min-height: 1.2em; }
.ft-sub .fs-msg.is-ok { color: var(--ok); }
.ft-sub .fs-msg.is-err { color: var(--danger); }

.ft-safety {
  display: flex; gap: 14px;
  padding: 20px 22px;
  border: 1px solid var(--plant-700);
  border-radius: var(--r-md);
  background: rgba(42, 157, 143, .06);
  margin-bottom: 24px;
}
.ft-safety .fs-ico { flex: none; }
.ft-safety .fs-ico svg { width: 26px; height: 26px; color: var(--plant-400); }
.ft-safety h4 { font-family: var(--font-head); font-size: .96rem; color: var(--plant-300); margin: 0 0 6px; }
.ft-safety p { font-size: .84rem; color: var(--text-2); margin: 0 0 8px; line-height: 1.65; }
.ft-safety ul { margin: 0; padding-left: 18px; font-size: .82rem; color: var(--text-2); line-height: 1.7; }

.ft-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 0 28px;
  border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--text-2);
}
.ft-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }
.ft-bottom a { color: var(--text-2); }
.ft-bottom a:hover { color: var(--plant-400); }
.ft-animal {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: rgba(231, 111, 81, .14); border: 1px solid rgba(231, 111, 81, .3);
  color: var(--coral-300); font-size: .72rem; font-weight: 800; letter-spacing: .05em;
}
.ft-animal svg { width: 13px; height: 13px; }

/* ======================================================= 11 · PAGE HERO */
.page-hero {
  position: relative;
  background: var(--deep-850);
  border-bottom: 3px solid var(--plant-500);
  padding: 48px 0 40px;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 12% 0%, rgba(168, 218, 220, .12), transparent 62%),
    radial-gradient(ellipse 40% 55% at 88% 100%, rgba(42, 157, 143, .10), transparent 60%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lead { max-width: 72ch; }

.breadcrumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 16px;
}
.breadcrumbs a { color: var(--text-2); }
.breadcrumbs a:hover { color: var(--plant-400); }
.breadcrumbs .sep { color: var(--text-3); }
.breadcrumbs [aria-current] { color: var(--plant-500); }

/* =========================================================== 12 · HOME */
.hero {
  position: relative;
  min-height: 480px;
  background: var(--deep-950);
  overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 32px;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide .hs-media { position: relative; height: 100%; display: flex; align-items: center; }
.hero-slide .hs-media img { width: 100%; height: auto; border-radius: var(--r-md); border: 1px solid var(--border-strong); }
.hero-slide .hs-body { padding: 40px 0; }

.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, #050F17 0%, rgba(10, 30, 44, .88) 46%, rgba(42, 157, 143, .20) 100%);
}
.hero .container { position: relative; z-index: 3; }
.hero-inner { min-height: 480px; display: flex; flex-direction: column; justify-content: center; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: var(--r-pill);
  background: rgba(42, 157, 143, .18);
  border: 1px solid rgba(42, 157, 143, .38);
  color: var(--plant-300);
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 18px;
  align-self: flex-start;
}
.hero h1 { font-size: clamp(1.95rem, 4.2vw, 2.9rem); margin-bottom: 16px; max-width: 20ch; }
.hero p { max-width: 56ch; color: var(--text-2); font-size: 1.02rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.hero-nav { display: flex; align-items: center; gap: 16px; margin-top: 34px; }
.hero-dots { display: flex; align-items: center; gap: 10px; }
.hero-dot {
  width: 10px; height: 10px; border-radius: var(--r-pill);
  background: rgba(232, 239, 242, .3);
  transition: width var(--t-med), background var(--t-med), box-shadow var(--t-med);
}
.hero-dot[aria-current="true"] { width: 44px; background: var(--plant-500); box-shadow: var(--glow-plant); }
.hero-arrows { display: flex; gap: 8px; }
.hero-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: rgba(10, 30, 44, .6);
  display: grid; place-items: center; color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.hero-arrow:hover { background: rgba(42, 157, 143, .2); color: var(--plant-300); border-color: var(--plant-500); }
.hero-arrow svg { width: 16px; height: 16px; }

/* rising bubbles in the hero */
.hero-bubbles { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-bubbles i {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  border: 1px solid rgba(168, 218, 220, .35);
  background: radial-gradient(circle at 35% 30%, rgba(168, 218, 220, .30), transparent 65%);
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .8; }
  88% { opacity: .6; }
  100% { transform: translateY(-540px) translateX(24px); opacity: 0; }
}

/* trust bar */
.trust-bar { background: var(--deep-850); border-bottom: 1px solid var(--border); padding: 36px 0; }
.trust-item { display: flex; gap: 14px; }
.trust-item .ti-ico {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: rgba(42, 157, 143, .14); border: 1px solid rgba(42, 157, 143, .3);
  display: grid; place-items: center;
}
.trust-item .ti-ico svg { width: 20px; height: 20px; color: var(--plant-400); }
.trust-item h3 { font-size: .96rem; color: var(--aqua-300); margin: 0 0 4px; }
.trust-item p { font-size: .84rem; color: var(--text-2); margin: 0; line-height: 1.62; }

/* four-step flow */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step-card { position: relative; }
.step-card .sc-media { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); background: var(--deep-850); }
.step-card .sc-media img { width: 100%; height: 100%; object-fit: cover; }
.step-card .sc-num {
  position: absolute; top: 12px; left: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--plant-500); color: var(--deep-900);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: .92rem;
  box-shadow: var(--glow-plant);
}
.step-card .sc-label { display: block; margin: 14px 0 6px; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--plant-500); }
.step-card h3 { font-size: 1.06rem; margin-bottom: 6px; }
.step-card p { font-size: .88rem; color: var(--text-2); margin: 0; }

/* 3D studio preview band */
.studio-band {
  position: relative;
  background: var(--deep-950);
  border-top: 1px solid var(--plant-800);
  border-bottom: 1px solid var(--plant-800);
  padding: 64px 0;
  overflow: hidden;
}
.studio-band .sb-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; }
.studio-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  border: 1px solid var(--plant-700);
  background: var(--deep-900);
  overflow: hidden;
  box-shadow: var(--sh-lg), var(--glow-plant);
}
.studio-stage canvas { display: block; width: 100%; height: 100%; }
.studio-stage .ss-fallback { position: absolute; inset: 0; }
.studio-stage .ss-fallback img { width: 100%; height: 100%; object-fit: cover; }
.studio-stage .ss-hint {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: rgba(3, 9, 14, .78); border: 1px solid var(--border-strong);
  font-size: .74rem; color: var(--text-2); font-family: var(--font-mono);
}
.studio-band h2 { margin-bottom: 12px; }
.studio-band .sb-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.sb-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--deep-700); border: 1px solid var(--border);
  color: var(--text); font-size: .86rem; font-weight: 600;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.sb-link:hover { border-color: var(--plant-500); background: var(--deep-600); color: var(--text); transform: translateX(3px); }
.sb-link svg { width: 17px; height: 17px; color: var(--plant-400); flex: none; }

/* CTA band */
.cta-band {
  position: relative;
  background: var(--plant-600);
  border-radius: var(--r-lg);
  padding: 48px 44px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 32px;
  align-items: center;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 26px);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: var(--deep-950); margin-bottom: 10px; }
.cta-band p { color: rgba(3, 9, 14, .82); margin: 0; max-width: 62ch; font-size: .96rem; }
.cta-band .btn-primary { background: var(--deep-900); color: var(--aqua-200); }
.cta-band .btn-primary:hover { background: var(--deep-800); color: var(--plant-300); box-shadow: var(--sh-md); }

/* ====================================================== 13 · TOOLS LIST */
.filter-bar {
  background: var(--deep-700);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--plant-500); }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--deep-850);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 10px 13px;
  font-size: .9rem;
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--plant-500); box-shadow: var(--glow-plant);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--plant-400) 50%), linear-gradient(135deg, var(--plant-400) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.result-count { font-size: .84rem; color: var(--text-2); margin-bottom: 18px; font-family: var(--font-mono); }
.result-count strong { color: var(--plant-400); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.pagination button, .pagination a {
  min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: var(--r-xs);
  background: var(--deep-700); border: 1px solid var(--border);
  color: var(--text-2); font-size: .88rem; font-weight: 700;
  display: grid; place-items: center;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.pagination button:hover, .pagination a:hover { background: var(--deep-600); color: var(--text); border-color: var(--border-strong); }
.pagination [aria-current="page"] { background: var(--plant-500); color: var(--deep-900); border-color: var(--plant-400); }
.pagination button:disabled { opacity: .35; cursor: not-allowed; }

/* ======================================================= 14 · STUDIO HUB */
.studio-note {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px 22px; border-radius: var(--r-md);
  background: rgba(42, 157, 143, .07);
  border: 1px solid var(--plant-700);
  margin-bottom: 32px;
}
.studio-note svg { width: 24px; height: 24px; color: var(--plant-400); flex: none; margin-top: 2px; }
.studio-note p { margin: 0; font-size: .92rem; color: var(--text-2); }
.studio-note strong { color: var(--plant-300); }

.studio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.studio-feature { display: flex; flex-direction: column; gap: 14px; }
.studio-feature .sf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.studio-feature .sf-list li { display: flex; gap: 9px; font-size: .86rem; color: var(--text-2); }
.studio-feature .sf-list svg { width: 15px; height: 15px; color: var(--plant-400); flex: none; margin-top: 5px; }
.perf-note {
  margin-top: 36px; padding: 18px 20px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-md);
  font-size: .86rem; color: var(--text-2);
}
.perf-note strong { color: var(--aqua-300); }

/* ===================================================== 15 · TOOL DETAIL */
.split-wide { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 40px; align-items: start; }
.split-side { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 44px; align-items: start; }

.exhibit {
  position: relative;
  background: var(--deep-850);
  border: 1px solid var(--plant-700);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-md), var(--glow-plant);
}
.exhibit img, .exhibit canvas { width: 100%; height: auto; display: block; }
.exhibit .ex-tag {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
}

.td-thumbs {
  display: grid;
  /* minmax(0,1fr) — a plain 1fr floors each track at the img min-content width
     and blows the grid out of its column. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.td-thumbs button {
  padding: 0; border-radius: var(--r-xs); overflow: hidden;
  border: 1.5px solid var(--border); background: var(--deep-850);
  min-width: 0; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.td-thumbs button img { width: 100%; max-width: 100%; height: auto; display: block; }
.td-thumbs button:hover { border-color: var(--plant-600); }
.td-thumbs button[aria-pressed="true"] { border-color: var(--plant-400); box-shadow: var(--glow-plant); }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .86rem; }
.spec-table caption {
  text-align: left; font-size: .72rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--plant-500); padding-bottom: 8px;
}
.spec-table th, .spec-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.spec-table th { color: var(--text-2); font-weight: 600; width: 46%; font-family: var(--font-mono); font-size: .8rem; }
.spec-table td { color: var(--text); font-family: var(--font-mono); font-size: .8rem; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

.param-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .86rem; background: var(--deep-850); border-radius: var(--r-xs); overflow: hidden; }
.param-table caption { text-align: left; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--coral-400); padding-bottom: 8px; }
.param-table th, .param-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.param-table th { color: var(--text-2); font-weight: 600; width: 52%; }
.param-table td { color: var(--plant-300); font-family: var(--font-mono); font-weight: 700; }
.param-table tr:last-child th, .param-table tr:last-child td { border-bottom: 0; }

.stage-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--r-pill);
  background: rgba(42, 157, 143, .14); border: 1px solid var(--plant-700);
  font-size: .82rem; color: var(--plant-300); font-weight: 700;
}
.stage-pill svg { width: 15px; height: 15px; }

.compat-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.compat-list .chip { cursor: default; }
.compat-list .chip:hover { background: var(--deep-600); color: var(--text-2); border-color: var(--border); }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.related-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--r-sm);
  background: var(--deep-700); border: 1px solid var(--border);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.related-item:hover { border-color: var(--plant-600); background: var(--deep-600); }
.related-item img { width: 52px; height: 52px; border-radius: var(--r-xs); object-fit: contain; background: var(--deep-850); flex: none; }
.related-item .ri-name { font-size: .88rem; font-weight: 700; color: var(--text); }
.related-item .ri-cat { font-size: .74rem; color: var(--text-2); }

/* ====================================================== 16 · CALCULATORS */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.calc-form { background: var(--deep-700); border: 1px solid var(--border); border-radius: var(--r-md); padding: 26px; }
.calc-form .cf-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.calc-form .cf-row label {
  font-family: var(--font-mono); font-size: .8rem; font-weight: 700;
  color: var(--plant-300); letter-spacing: .02em;
}
.calc-form .cf-row input, .calc-form .cf-row select {
  background: var(--deep-850); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 11px 14px; font-family: var(--font-mono);
  font-size: .95rem; color: var(--text);
}
.calc-form .cf-row input:focus, .calc-form .cf-row select:focus {
  outline: none; border-color: var(--plant-500); box-shadow: var(--glow-plant);
}
.calc-form .cf-hint { font-size: .76rem; color: var(--text-3); }
.calc-form .cf-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.calc-result {
  background: var(--deep-850);
  border: 1px solid var(--plant-700);
  border-radius: var(--r-md);
  padding: 30px 26px;
  box-shadow: var(--sh-md), var(--glow-plant);
}
.calc-result .cr-label { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--plant-500); }
.calc-result .cr-big {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--plant-300);
  margin: 8px 0 4px;
  text-shadow: 0 0 24px rgba(42, 157, 143, .35);
}
.calc-result .cr-unit { font-size: .9rem; color: var(--text-2); margin-bottom: 22px; }
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.calc-cell {
  background: var(--deep-800); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 13px 15px;
}
.calc-cell .cc-k { font-size: .74rem; color: var(--text-2); margin-bottom: 4px; }
.calc-cell .cc-v { font-family: var(--font-mono); font-size: 1.08rem; font-weight: 700; color: var(--aqua-300); }

.gauge { margin-top: 22px; }
.gauge .gg-head { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-2); margin-bottom: 7px; }
.gauge .gg-track { height: 9px; border-radius: var(--r-pill); background: var(--deep-800); border: 1px solid var(--border); overflow: hidden; }
.gauge .gg-fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--plant-600), var(--plant-300)); transition: width var(--t-med); }
.gauge.is-warn .gg-fill { background: linear-gradient(90deg, #8A6A00, var(--warn)); }
.gauge.is-bad .gg-fill { background: linear-gradient(90deg, var(--coral-700), var(--coral-400)); }

.formula {
  margin-top: 22px; padding: 14px 16px;
  background: var(--deep-800); border-left: 3px solid var(--aqua-400);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  font-family: var(--font-mono); font-size: .8rem; color: var(--text-2); line-height: 1.75;
}
.formula strong { color: var(--aqua-300); }

/* ======================================================= 17 · STUDIO / 3D */
.studio-shell { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.studio-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--deep-700); border: 1px solid var(--border);
  margin-bottom: 14px;
}
.studio-toolbar .st-group { display: flex; align-items: center; gap: 6px; }
.studio-toolbar .st-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.studio-toolbar .st-label { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--plant-500); margin-right: 2px; }
.st-btn {
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--deep-850); border: 1px solid var(--border);
  color: var(--text-2); font-size: .8rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.st-btn:hover { background: var(--deep-600); color: var(--text); border-color: var(--border-strong); }
.st-btn.is-active { background: var(--plant-500); color: var(--deep-900); border-color: var(--plant-400); }
.st-btn svg { width: 14px; height: 14px; }

.studio-canvas-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  border: 1px solid var(--plant-700);
  background: radial-gradient(ellipse at 50% 30%, var(--deep-600), var(--deep-950) 75%);
  overflow: hidden;
  box-shadow: var(--sh-lg);
  cursor: grab;
}
.studio-canvas-wrap:active { cursor: grabbing; }
.studio-canvas-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; }
/* The chemistry chart is a 2D plot, not an orbitable scene — no grab cursor. */
.studio-canvas-wrap.is-2d, .studio-canvas-wrap.is-2d:active { cursor: default; }
.studio-canvas-wrap .sc-overlay {
  position: absolute; left: 14px; bottom: 14px; z-index: 3;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: rgba(3, 9, 14, .8); border: 1px solid var(--border-strong);
  font-family: var(--font-mono); font-size: .74rem; color: var(--text-2);
  pointer-events: none;
}
.studio-canvas-wrap .sc-hud {
  position: absolute; right: 14px; top: 14px; z-index: 3;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: rgba(3, 9, 14, .82); border: 1px solid var(--border-strong);
  font-family: var(--font-mono); font-size: .76rem; color: var(--text-2);
  line-height: 1.7; pointer-events: none; min-width: 150px;
}
.studio-canvas-wrap .sc-hud b { color: var(--plant-300); font-weight: 700; }

.studio-fallback { position: absolute; inset: 0; z-index: 4; display: none; background: var(--deep-900); }
.studio-fallback.is-shown { display: grid; place-items: center; }
.studio-fallback img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.studio-fallback .sf-body {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 28px; text-align: center;
}
.studio-fallback .sf-body h3 { margin: 0; }
.studio-fallback .sf-body p { color: var(--text-2); font-size: .9rem; max-width: 46ch; margin: 0; }

.panel { background: var(--deep-700); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { font-size: .96rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel h3 svg { width: 17px; height: 17px; color: var(--plant-400); }

.ctrl { margin-bottom: 16px; }
.ctrl:last-child { margin-bottom: 0; }
.ctrl .ct-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.ctrl .ct-name { font-size: .84rem; color: var(--text); font-weight: 600; }
.ctrl .ct-val { font-family: var(--font-mono); font-size: .82rem; color: var(--plant-300); font-weight: 700; }
.ctrl input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; border-radius: var(--r-pill);
  background: var(--deep-500); outline: none;
}
.ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--plant-400); border: 2px solid var(--deep-900);
  box-shadow: var(--glow-plant); cursor: pointer;
}
.ctrl input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--plant-400); border: 2px solid var(--deep-900); cursor: pointer;
}
.ctrl select, .ctrl input[type="number"] {
  width: 100%; background: var(--deep-850); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 9px 12px; font-size: .86rem; color: var(--text);
}
.ctrl select:focus, .ctrl input[type="number"]:focus { outline: none; border-color: var(--plant-500); }
.ctrl .ct-range { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-3); margin-top: 4px; }

.readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.readout .ro {
  background: var(--deep-850); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 10px 12px;
}
.readout .ro-k { font-size: .7rem; color: var(--text-2); margin-bottom: 3px; }
.readout .ro-v { font-family: var(--font-mono); font-size: .98rem; font-weight: 700; color: var(--plant-300); }
.readout .ro.is-warn .ro-v { color: var(--warn); }
.readout .ro.is-bad .ro-v { color: var(--danger); }

.studio-hint {
  margin-top: 14px; padding: 14px 18px;
  background: var(--deep-700); border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm); font-size: .84rem; color: var(--text-2);
}
.studio-hint kbd {
  font-family: var(--font-mono); font-size: .76rem;
  background: var(--deep-850); border: 1px solid var(--border-strong);
  border-radius: 5px; padding: 1px 6px; color: var(--aqua-300);
}

/* ==================================================== 18 · TANK DATABASE */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--deep-700); }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 780px; }
.data-table caption { text-align: left; padding: 16px 18px 0; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--plant-500); }
.data-table th, .data-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table thead th {
  background: var(--deep-850); color: var(--plant-300);
  font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
.data-table thead th button { display: inline-flex; align-items: center; gap: 5px; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.data-table thead th button svg { width: 12px; height: 12px; opacity: .5; }
.data-table thead th[aria-sort] button svg { opacity: 1; color: var(--plant-400); }
.data-table tbody tr { transition: background var(--t-fast); }
.data-table tbody tr:hover { background: rgba(42, 157, 143, .06); }
.data-table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.data-table .tk-name { font-weight: 700; color: var(--text); }
.data-table tr.is-open { background: rgba(42, 157, 143, .09); }
.tk-detail td { background: var(--deep-850); }
.tk-detail .tk-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.tk-detail .tk-cell { font-size: .82rem; }
.tk-detail .tk-cell b { display: block; color: var(--plant-500); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; }
.tk-detail p { margin: 12px 0 0; font-size: .86rem; color: var(--text-2); }

.compare-tray {
  position: sticky; bottom: 0; z-index: 5;
  margin-top: 16px; padding: 14px 18px;
  background: var(--deep-850); border: 1px solid var(--plant-700);
  border-radius: var(--r-md);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  box-shadow: var(--sh-lg);
}
.compare-tray .ct-list { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.compare-tray .ct-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: rgba(42, 157, 143, .16); border: 1px solid var(--plant-700);
  font-size: .8rem; color: var(--plant-300);
}
.compare-tray .ct-item button { color: var(--coral-400); font-weight: 800; line-height: 1; }
.compare-table-wrap { margin-top: 20px; }

/* =========================================================== 19 · BLOG */
.featured-post {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
  background: var(--deep-700); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; margin-bottom: 36px;
}
.featured-post .fp-media { height: 100%; min-height: 280px; overflow: hidden; }
.featured-post .fp-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-post .fp-body { padding: 32px 32px 32px 0; }
.featured-post h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }

.post-hero { background: var(--deep-850); border-bottom: 3px solid var(--plant-500); padding: 44px 0 36px; position: relative; overflow: hidden; }
.post-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 46% 60% at 10% 0%, rgba(168, 218, 220, .12), transparent 62%);
  pointer-events: none;
}
.post-hero .container { position: relative; z-index: 1; }
.post-hero h1 { max-width: 26ch; }
.post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .84rem; color: var(--text-2); margin-top: 14px; }
.post-meta .pm-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(42, 157, 143, .2); border: 1px solid var(--plant-700);
  display: grid; place-items: center; color: var(--plant-300);
  font-family: var(--font-head); font-weight: 700; font-size: .84rem;
}

.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 250;
  background: linear-gradient(90deg, var(--plant-600), var(--plant-300));
  width: 0; box-shadow: var(--glow-plant);
}

.post-body { max-width: 100%; }
.post-body h2 { margin-top: 44px; padding-top: 8px; }
.post-body h2:first-child { margin-top: 0; }
.post-body h3 { margin-top: 30px; color: var(--aqua-300); }
.post-body ul, .post-body ol { margin: 0 0 1.2em; padding-left: 22px; }
.post-body li { margin-bottom: 9px; line-height: 1.7; }
.post-body li::marker { color: var(--plant-500); }
.post-body figure { margin: 28px 0; }
.post-body figure img { border-radius: var(--r-md); border: 1px solid var(--border); width: 100%; }
.post-body figcaption { font-size: .82rem; color: var(--text-2); margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--plant-700); }
.post-body blockquote {
  margin: 26px 0; padding: 18px 24px;
  border-left: 4px solid var(--coral-500);
  background: rgba(231, 111, 81, .07);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 1.04rem; color: var(--text); font-style: italic;
}
.post-body blockquote cite { display: block; margin-top: 10px; font-size: .82rem; font-style: normal; color: var(--text-2); }

/* data table inside an article */
.post-table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: .86rem; }
.post-table caption { text-align: left; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--plant-500); padding-bottom: 9px; }
.post-table th, .post-table td { padding: 11px 14px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.post-table thead th { background: var(--deep-850); color: var(--plant-300); font-weight: 700; font-size: .78rem; letter-spacing: .04em; }
.post-table tbody tr:nth-child(even) { background: rgba(19, 56, 78, .35); }
.post-table td { color: var(--text-2); }
.post-table td:first-child { color: var(--text); font-weight: 600; }

/* numbered step block */
.step-block {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.step-block:last-child { border-bottom: 0; }
.step-block .sb-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(42, 157, 143, .16); border: 1.5px solid var(--plant-600);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--plant-300);
}
.step-block h4 { margin: 6px 0 6px; font-size: 1rem; color: var(--aqua-300); }
.step-block p { margin: 0; font-size: .92rem; color: var(--text-2); }

/* table of contents */
.toc {
  background: var(--deep-700); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px; margin-bottom: 24px;
}
.toc h4 { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--plant-500); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: flex; flex-direction: column; gap: 8px; }
.toc li { counter-increment: toc; }
.toc a { font-size: .86rem; color: var(--text-2); display: flex; gap: 9px; line-height: 1.5; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: .74rem; color: var(--plant-600); flex: none; padding-top: 2px; }
.toc a:hover { color: var(--plant-300); }
.toc a.is-active { color: var(--plant-300); font-weight: 700; }

.side-sticky { position: sticky; top: calc(var(--header-h) + 20px); }

.author-box {
  background: var(--deep-700); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px; margin-top: 24px;
}
.author-box .ab-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.author-box .ab-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(42, 157, 143, .2); border: 1px solid var(--plant-700);
  display: grid; place-items: center; color: var(--plant-300);
  font-family: var(--font-head); font-weight: 700;
}
.author-box .ab-name { font-weight: 700; font-size: .92rem; }
.author-box .ab-role { font-size: .76rem; color: var(--text-2); }
.author-box p { font-size: .84rem; color: var(--text-2); margin: 0; line-height: 1.65; }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.post-nav a {
  padding: 18px; border-radius: var(--r-md);
  background: var(--deep-700); border: 1px solid var(--border);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.post-nav a:hover { border-color: var(--plant-600); background: var(--deep-600); }
.post-nav .pn-dir { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--plant-500); }
.post-nav .pn-title { font-weight: 700; color: var(--text); margin-top: 5px; font-size: .92rem; }
.post-nav .pn-next { text-align: right; }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 180;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--plant-500); color: var(--deep-900);
  display: grid; place-items: center;
  box-shadow: var(--sh-md), var(--glow-plant);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--t-med), transform var(--t-med), visibility var(--t-med);
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 19px; height: 19px; }

/* =================================================== 20 · CONTENT PAGES */
.info-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
.prose-block { margin-bottom: 40px; }
.prose-block h2 { margin-bottom: 14px; }
.prose-block p { color: var(--text-2); max-width: 74ch; }

.fact-card {
  background: var(--deep-700); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 22px;
}
.fact-card h4 { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--plant-500); margin: 0 0 14px; }
.fact-card dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fact-card .fc-row { display: flex; justify-content: space-between; gap: 14px; font-size: .84rem; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.fact-card .fc-row:last-child { border-bottom: 0; padding-bottom: 0; }
.fact-card dt { color: var(--text-2); }
.fact-card dd { margin: 0; color: var(--plant-300); font-weight: 700; text-align: right; }

.form-card {
  background: var(--deep-700); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 28px;
}
.form-card .fc-field { margin-bottom: 18px; }
.form-card .fc-field label { display: block; font-size: .8rem; font-weight: 700; color: var(--plant-300); margin-bottom: 7px; }
.form-card .fc-field label .req { color: var(--coral-500); }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; background: var(--deep-850); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 11px 14px; font-size: .92rem; color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: none; border-color: var(--plant-500); box-shadow: var(--glow-plant);
}
.form-card textarea { min-height: 140px; resize: vertical; }
.form-card .fc-error { font-size: .78rem; color: var(--danger); margin-top: 6px; min-height: 1.1em; }
.form-card .fc-field.has-error input, .form-card .fc-field.has-error textarea, .form-card .fc-field.has-error select { border-color: var(--danger); }
.form-card .fc-status {
  margin-top: 16px; padding: 13px 16px; border-radius: var(--r-xs);
  font-size: .88rem; display: none;
}
.form-card .fc-status.is-shown { display: block; }
.form-card .fc-status.is-ok { background: rgba(74, 184, 168, .12); border: 1px solid rgba(74, 184, 168, .34); color: var(--ok); }
.form-card .fc-status.is-err { background: rgba(231, 111, 81, .12); border: 1px solid rgba(231, 111, 81, .34); color: var(--coral-300); }

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

/* ============================================== 22 · RESPONSIVE BREAKS */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-bar .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
  .ft-col:last-child { grid-column: 1 / -1; }
  .studio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .hd-link { padding: 6px 10px; font-size: .82rem; }
  .split-wide { grid-template-columns: 320px minmax(0, 1fr); gap: 28px; }
  .split-side { grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; }
  .studio-shell { grid-template-columns: minmax(0, 1fr) 290px; }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }

  /* Centred logo survives; both nav groups collapse into the drawer.
     Do not reintroduce order: or flex:1 1 100% here — it breaks the
     three-slot layout the header depends on. */
  .hd-nav-left, .hd-nav-right { display: none; }
  .hd-burger { display: grid; }
  .hd-drawer { display: block; }
  .hd-logo { position: absolute; left: 50%; transform: translateX(-50%); }
  .hd-logo:hover { transform: translateX(-50%) translateY(-1px); }

  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-wide { grid-template-columns: minmax(0, 1fr); }
  .split-side { grid-template-columns: minmax(0, 1fr); }
  .info-grid { grid-template-columns: minmax(0, 1fr); }
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .studio-shell { grid-template-columns: minmax(0, 1fr); }
  .studio-band .sb-grid { grid-template-columns: minmax(0, 1fr); }
  .featured-post { grid-template-columns: minmax(0, 1fr); }
  .featured-post .fp-media { min-height: 220px; }
  .featured-post .fp-body { padding: 24px; }
  .cta-band { grid-template-columns: minmax(0, 1fr); padding: 36px 28px; }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-slide { grid-template-columns: minmax(0, 1fr); }
  .hero-slide .hs-media { display: none; }
  .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-col:last-child { grid-column: auto; }
  .toc { position: static; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  section { padding: 44px 0; }
  .section-sm { padding: 32px 0; }
  .section-tight { padding: 32px 0 44px; }

  .grid-2, .grid-3, .grid-4, .grid-auto { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .trust-bar .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .ft-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-bar { grid-template-columns: minmax(0, 1fr); }
  .studio-band .sb-links { grid-template-columns: minmax(0, 1fr); }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav .pn-next { text-align: left; }
  .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .readout { grid-template-columns: minmax(0, 1fr); }

  .hero, .hero-inner { min-height: 460px; }
  .hero h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .hero-cta .btn { width: 100%; }
  .hero-nav { flex-direction: column; align-items: flex-start; gap: 12px; }

  .td-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-block { grid-template-columns: 40px minmax(0, 1fr); gap: 13px; }
  .step-block .sb-num { width: 40px; height: 40px; font-size: 1rem; }
  .cta-band { padding: 28px 20px; }
  .card-body { padding: 16px; }
  .studio-toolbar { gap: 8px; }
  .studio-toolbar .st-label { display: none; }
  .to-top { right: 14px; bottom: 14px; }
  .compare-tray { flex-direction: column; align-items: stretch; }
  .water-indicator { font-size: .72rem; }
}

/* ============================================ 23 · MOTION & PRINT */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  body::before { animation: none; }
  .hero-bubbles, .btn-bubble::after { display: none; }
  .hero-slide { transition: none; }
}

@media print {
  body { background: #fff; color: #000; }
  body::before, .site-header, .site-footer, .to-top, .read-progress, .hero-bubbles { display: none; }
  .card, .notice, .tip-box, .panel { border-color: #999; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
}
