/* v4.css (2026-10-15, his review that morning): the main page's look and its one-scroll layout. Loaded last, only on
   <html class="v4"> (the two previews keep the v3 look from tank/v3frozen/).
   His words: "more Apple or UNS inspired: simplicity, fonts, colours. Very premium", and the bold black and white of
   the barbershop site. Black and white, one sans, big tight headings, hairlines; chum blue only for the live dot and
   links. Each chapter has one open section; the rest are light rows that open smoothly. */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root.v4 {
  --bg: #ffffff; --raise: #f5f5f7; --text: #1d1d1f; --strong: #000000; --grey: #6e6e73; --line: #e6e6e9; --line-strong: #d2d2d7;
  --bar-bg: rgb(255 255 255 / 92%); --chum: #248FD3; --chum-text: #1A74B0; --accent: #1A74B0;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: var(--display); --r: 14px; --barh: 56px; --striph: 0px; --car: .912; --gap: clamp(4.5rem, 12vw, 8.5rem);
}
@media (prefers-color-scheme: dark) {
  :root.v4:not([data-theme="light"]) { --bg: #000000; --raise: #0f0f10; --text: #e8e8ed; --strong: #ffffff; --grey: #8e8e93; --line: #1f1f22; --line-strong: #3a3a3e; --bar-bg: rgb(0 0 0 / 88%); --chum-text: #5AB0EA; --accent: #5AB0EA; }
}
:root.v4[data-theme="dark"] { --bg: #000000; --raise: #0f0f10; --text: #e8e8ed; --strong: #ffffff; --grey: #8e8e93; --line: #1f1f22; --line-strong: #3a3a3e; --bar-bg: rgb(0 0 0 / 88%); --chum-text: #5AB0EA; --accent: #5AB0EA; }

/* ------------------------------------------------------------------ the page */
html.v4 { overflow-x: clip; scroll-snap-type: y proximity; -webkit-text-size-adjust: 100%; }
html.v4 body { overflow-x: clip; background: var(--bg); color: var(--text); font-family: var(--sans); letter-spacing: -.011em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
html.v4 main, html.v4 .pages, html.v4 .chapter { max-width: 100%; }
html.v4 img, html.v4 video, html.v4 svg { max-width: 100%; }
html.v4 a { color: var(--chum-text); }
html.v4 .chapter { max-width: 68rem; padding: 0 var(--pad); counter-increment: ch; }
html.v4 .pages { counter-reset: ch; }
html.v4 .tag { border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--grey); font-weight: 500; letter-spacing: 0; text-transform: none; font-size: .75rem; padding: .1rem .55rem; }
html.v4 .label, html.v4 .lb-k { color: var(--grey); font-size: .6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
html.v4 h1, html.v4 h2, html.v4 h3, html.v4 .card-name, html.v4 .ename, html.v4 .js-chn, html.v4 .intro-title, html.v4 .ch-head h2 { font-family: var(--display); }

/* chapter titles: a small number, then the word, big and tight */
html.v4 .ch-head { padding: var(--gap) 0 2rem; scroll-snap-align: start; scroll-margin-top: calc(var(--barh) + var(--striph) - 2.5rem); }
html.v4 .ch-head::before { content: counter(ch, decimal-leading-zero); display: block; margin-bottom: .9rem; color: var(--grey); font-size: .75rem; font-weight: 600; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
html.v4 .ch-head h2 { font-size: clamp(3rem, 12vw, 6rem); font-weight: 700; letter-spacing: -.05em; line-height: .92; color: var(--strong); }
html.v4 .ch-head h2::before { display: none; }

/* the one open section of a chapter */
html.v4 .sub.is-main { margin: 0 0 2.5rem; padding: 0; border: 0; }
html.v4 .sub.is-main > .wrap > .head { margin: 0 0 1.5rem; padding: 0; }
html.v4 .sub.is-main > .wrap > .head h2 { font-size: clamp(1.5rem, 4.2vw, 2.125rem); font-weight: 600; letter-spacing: -.035em; color: var(--strong); }
html.v4 .sub .head > p, html.v4 .sub .head > p * { color: var(--grey); font-size: .9375rem; }

/* the rest: light rows that open */
html.v4.lay-b .card { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; transition: none; }
html.v4.lay-b .card:last-of-type { border-bottom: 1px solid var(--line); }
html.v4.lay-b .card.open { background: none; }
html.v4 .card-head { gap: 1rem; padding: 1.15rem 0; border-radius: 0; -webkit-tap-highlight-color: transparent; }
html.v4 .card-t { display: flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .85rem; }
html.v4 .card-name { font-size: 1.125rem; font-weight: 600; letter-spacing: -.02em; color: var(--strong); line-height: 1.25; }
html.v4 .card-sum { font-size: .875rem; color: var(--grey); }
html.v4 .card-chev { width: .8rem; height: .8rem; border: 0; border-radius: 0; color: var(--grey); transition: transform .35s var(--ease), color .2s; }
html.v4 .card-chev::before { left: 50%; top: 38%; width: .45rem; height: .45rem; border-width: 0 1.5px 1.5px 0; }
html.v4 .card.open .card-chev { transform: rotate(180deg); color: var(--strong); border: 0; }
html.v4 .card-head:hover .card-name { color: var(--strong); }
html.v4 .card-head:hover .card-chev { color: var(--strong); border: 0; }
html.v4 .card-head:focus-visible { outline: 2px solid var(--chum); outline-offset: 2px; }
html.v4 .card-body { display: grid !important; grid-template-rows: 0fr; padding: 0; animation: none !important; transition: grid-template-rows .5s var(--ease); }
html.v4 .card.open .card-body { grid-template-rows: 1fr; }
html.v4 .card-in { min-height: 0; overflow: hidden; }
html.v4 .card-in > :last-child { margin-bottom: 2.25rem; }
html.v4 .card .card-in > .head { display: none; margin: 0 0 1rem; }
html.v4 .card .card-in > .head:has(.tag), html.v4 .card .card-in > .head:has(p:not(:empty)) { display: flex; }
html.v4 .card .card-in > .head h2, html.v4 .card .card-in > .head h3 { display: none; }
html.v4 .card-pre { padding: 0 0 1.5rem; }
html.v4 .card-pre .mk-stage { max-width: 12.5rem; }
html.v4 .card-pre .mk-badge { display: none; }
html.v4 .card-pre .swim { margin: 0; }
html.v4 .card-pre #eco-drawn { max-width: 44rem; }

/* ------------------------------------------------------------------ the header and the chapter bar */
html.v4 .top { position: sticky; top: 0; z-index: 60; min-height: 3.5rem; gap: .5rem; padding: 0 var(--pad); background: var(--bar-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
html.v4 .brand-name { font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: -.03em; color: var(--strong); }
html.v4 .brand-day { color: var(--grey); font-size: .6875rem; letter-spacing: 0; }
html.v4 .themebtn, html.v4 .v3menu { width: 2.25rem; height: 2.25rem; border: 0 !important; border-radius: 50% !important; background: none; color: var(--strong); }
html.v4 .v3menu { padding: 0 .6rem; gap: 4px; }
html.v4 .themebtn:hover, html.v4 .v3menu:hover { background: var(--raise); }
html.v4.lay-b .chnav { display: none; }
@media (min-width: 48rem) {
  html.v4.lay-b .top .chnav { display: flex; position: absolute; left: 50%; top: 0; bottom: 0; transform: translateX(-50%); gap: .25rem; }
  html.v4 .top .chtab { min-height: 100%; padding: 0 .9rem; border-radius: 0; background: none !important; color: var(--grey); font-size: .8125rem; font-weight: 500; position: relative; }
  html.v4 .top .chtab .chi { display: none; }
  html.v4 .top .chtab[aria-current] { color: var(--strong); }
  html.v4 .top .chtab::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: -1px; height: 2px; background: var(--strong); transform: scaleX(0); transition: transform .35s var(--ease); }
  html.v4 .top .chtab[aria-current]::after { transform: scaleX(1); }
  .chstrip { display: none !important; }
}
.chstrip { position: fixed; left: 0; right: 0; top: var(--barh); z-index: 55; display: flex; justify-content: space-between; padding: 0 calc(var(--pad) - .55rem); height: 2.75rem; background: var(--bar-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); transform: translateY(-100%); opacity: 0; pointer-events: none; transition: transform .4s var(--ease), opacity .3s; }
html.strip-on .chstrip { transform: none; opacity: 1; pointer-events: auto; }
.chstrip .chtab { position: relative; flex: 0 1 auto; min-height: 100%; padding: 0 .55rem; border-radius: 0; background: none !important; color: var(--grey); font-size: .8125rem; font-weight: 500; letter-spacing: -.01em; }
.chstrip .chtab[aria-current] { color: var(--strong); }
.chstrip .chtab::after { content: ""; position: absolute; left: .55rem; right: .55rem; bottom: -1px; height: 2px; background: var(--strong); transform: scaleX(0); transition: transform .35s var(--ease); }
.chstrip .chtab[aria-current]::after { transform: scaleX(1); }
html.v4 .jumpsheet { border-radius: 18px; border-color: var(--line); }
html.v4 .js-chn { font-size: 1.125rem; font-weight: 600; letter-spacing: -.02em; }
html.v4 .js-chn .chi { color: var(--strong); }
html.v4 .js-sub:hover { border-color: var(--strong); }

/* ------------------------------------------------------------------ floating: the camera toggle, small; and the floating camera */
html.v4 .v3dock { right: max(1rem, env(safe-area-inset-right)); bottom: calc(1rem + env(safe-area-inset-bottom)); }
html.v4 .v3btn { height: 2.25rem; padding: 0 .85rem; gap: .4rem; border-color: var(--line-strong); font-size: .75rem; font-weight: 500; box-shadow: 0 4px 18px rgb(0 0 0 / 12%); }
html.v4 .v3btn svg { width: 1rem; height: 1rem; }
html.v4 .v3cam[aria-pressed="true"] { border-color: var(--line-strong); }
html.v4.site .view.dock { inset: auto max(1rem, env(safe-area-inset-right)) calc(3.85rem + env(safe-area-inset-bottom)) auto !important; width: 8.5rem !important; aspect-ratio: var(--car) !important; height: auto !important; border-radius: 12px; }
@media (min-width: 48rem) { html.v4.site .view.dock { width: 13rem !important; } }

/* ------------------------------------------------------------------ the cameras */
html.v4 .view { border-radius: var(--r); overflow: hidden; contain: paint; background: #000; }
html.v4 .tankside .viewslot { border-radius: var(--r); }
html.v4 .view .state { font-size: .8125rem; }
html.v4.site .intro-cam .tankside .viewslot, html.v4.cam-portrait.site .intro-cam .tankside .viewslot { width: min(100%, 36rem, calc((100vh - var(--barh) - 3rem) * var(--car)), calc((100dvh - var(--barh) - 3rem) * var(--car))) !important; max-width: 60rem; margin: 0 auto; }
html.v4 .intro-cam { padding: calc(var(--barh) + 1rem) var(--pad) 1.5rem; align-items: center; }
html.v4 .intro-cam .tankside { width: 100% !important; max-width: none; display: flex !important; flex-direction: column; align-items: center; }
html.v4 .sidecam { padding-top: 1rem; }
html.v4 .sidecam .viewslot-side { position: relative; width: 100%; max-width: 60rem; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000; }
html.v4 .view-side { position: absolute; inset: 0; }
html.v4 .view-side video, html.v4 .view-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html.v4 .view-side .state { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: rgb(255 255 255 / 70%); }
html.v4 .view-side.has-still .state { display: none; }

/* ------------------------------------------------------------------ the intro */
html.v4.lay-b .intro { height: 300vh; height: 300svh; scroll-snap-align: start; scroll-margin-top: var(--barh); }
.intro-end { position: absolute; left: 0; width: 1px; height: 1px; top: calc(100% - 100vh); top: calc(100% - 100svh); scroll-snap-align: start; pointer-events: none; }
html.v4 .intro-words { top: calc(var(--barh) + clamp(2.5rem, 9vh, 6rem)); }
html.v4 .intro-kicker { color: var(--grey); font-size: .75rem; font-weight: 600; letter-spacing: .2em; }
html.v4 .intro-title { font-size: clamp(3rem, 14vw, 7.5rem); font-weight: 700; letter-spacing: -.055em; line-height: .95; color: var(--strong); }
html.v4 .intro-sub { margin-top: 1rem; color: var(--grey); font-size: clamp(1rem, 2.8vw, 1.1875rem); letter-spacing: -.015em; }
html.v4 .intro-cue { color: var(--grey); letter-spacing: .2em; font-weight: 600; }
html.v4 .tank3d-wrap { place-items: start center; padding-top: 0; perspective: 1700px; perspective-origin: 50% 40%; }
.t4 { position: relative; width: 240px; aspect-ratio: 768 / 1679; transform-style: preserve-3d; will-change: transform; --D: 130px; transform-origin: 50% 40%; }
.t4l { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.t4-back { transform: translateZ(calc(var(--D) / -2)); }
.t4-light { transform: translateZ(calc(var(--D) * -.4)); }
.t4-light img { position: absolute; inset: 0; width: 100%; height: 100%; }
.t4-f1 { transform: translateZ(calc(var(--D) * -.28)); }
.t4-f2 { transform: translateZ(calc(var(--D) * -.04)); }
.t4-f3 { transform: translateZ(calc(var(--D) * .2)); }
.t4-front { transform: translateZ(calc(var(--D) / 2)); }
.t4p { position: absolute; display: block; }
.t4-bw { background: linear-gradient(rgb(150 196 214 / 30%), rgb(80 140 170 / 42%)); }
.t4-bs { background: linear-gradient(#3a2e25, #1c1713); }
.t4-fish { position: absolute; left: 0; top: 0; width: 5.2%; height: auto; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 15%)); will-change: transform; }
.t4-side { width: var(--D) !important; margin-left: calc(var(--D) / -2); backface-visibility: visible; }
.t4-l.t4-gside { transform: rotateY(-90deg); }
.t4-r.t4-gside { transform: rotateY(90deg); }
.t4-gside { background: linear-gradient(rgb(220 240 245 / 10%) 0 2.6%, rgb(140 190 210 / 32%) 2.6% 74%, #2a221c 74%); box-shadow: inset 0 0 0 1px rgb(150 200 210 / 70%); }
.t4-sside { background: linear-gradient(90deg, #121314, #232527); transform: rotateY(90deg); }
.t4-l.t4-sside { transform: rotateY(-90deg); }
.t4-top { height: var(--D) !important; margin-top: calc(var(--D) / -2); transform: rotateX(90deg); background: rgb(170 215 228 / 22%); }
.t4-gm { visibility: hidden; }
.t4 .t4-mock { margin: 0; overflow: visible; }
.t4 .t4-mock .mk-stage { max-width: none; margin: 0; }
.t4 .mk-p, .t4 .mk-door { pointer-events: none; }
html.intro-static .intro-cam { padding: 2rem var(--pad) 0; }

/* ------------------------------------------------------------------ sections arrive */
html.v4 .rv { opacity: 0; transform: translateY(22px); }
html.v4 .rv.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* ------------------------------------------------------------------ parts in the new look */
html.v4 .mk-col .mk-stage { max-width: 21rem; }
html.v4 .mk-say { text-align: center; color: var(--grey); }
html.v4 .setup2 { display: block; }
html.v4 .kgrp + .kgrp { margin-top: 2rem; }
html.v4 .khead h3 { font-size: .6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
html.v4 .kcard, html.v4 .vialcard, html.v4 .tc3, html.v4 .lookgrid .mode, html.v4 .modepick, html.v4 .dg-parts .dg-partcard { border-radius: 12px; border-color: var(--line); }
html.v4 #stock-list .epic, html.v4 #plants-list .epic { background: var(--raise); border-radius: 12px; }
html.v4 #stock-list .ename, html.v4 #plants-list .ename { font-weight: 600; letter-spacing: -.02em; }
html.v4 .about p { font-size: 1.125rem; line-height: 1.6; max-width: 40rem; }
html.v4 .about-sig { color: var(--grey); font-size: .9375rem !important; }
.feedrow { margin: 1.5rem 0 0; }
.feedlink { display: inline-flex; align-items: center; gap: .5rem; color: var(--chum-text); text-decoration: none; font-size: 1rem; font-weight: 500; letter-spacing: -.01em; }
.feedlink svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.feedlink svg circle { fill: currentColor; stroke: none; }
.feedlink i { font-style: normal; font-size: .8125rem; opacity: .7; }
.feedlink:hover span { text-decoration: underline; text-underline-offset: 3px; }
.feedlink[hidden] { display: none; }
html.v4 .sitefoot { margin-top: var(--gap); padding: 2rem 0 1rem; border-top: 1px solid var(--line); text-align: center; }
html.v4 .sitefoot .wrap { max-width: 68rem; margin: 0 auto; padding: 0 var(--pad); }
html.v4 .sitefoot p { margin: 0; color: var(--grey); font-size: .8125rem; }
html.v4 .foot-name { font-weight: 700; letter-spacing: -.02em; color: var(--strong); text-transform: none; }
html.v4 #credits .linklist { padding-left: 1.1rem; }
@media (prefers-reduced-motion: reduce) { html.v4 { scroll-snap-type: none; } html.v4 .card-body { transition: none; } }
html.v4 .chapter > .sub { scroll-margin-top: calc(var(--barh) + var(--striph) + .75rem); }
/* previews: the tank from the rim down (the light is not part of the story there) */
html.v4 .card-pre .mk { overflow: hidden; max-width: 12.5rem; margin: 0 auto; }
html.v4 .card-pre .mk-stage { margin-top: -6.9rem !important; }
html.v4 .card-pre .mk-light { display: none; }
html.v4.site .view.dock { width: 7rem !important; }
@media (min-width: 48rem) { html.v4.site .view.dock { width: 12rem !important; } }
html.v4.nosnap { scroll-snap-type: none; }
/* jump to top: a small round arrow left of the camera button, only after the intro */
html.v4 .v4top { width: 2.25rem; padding: 0; justify-content: center; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
html.v4.strip-on .v4top { opacity: 1; transform: none; pointer-events: auto; }
/* the mock-up's CO2 line: thin tubing up the back glass and over the rim */
.mk-co2tube { fill: none; stroke: rgb(70 78 84 / 70%); stroke-width: 5.6; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ 10/15 second pass: everything shows */
html.v4 .chapter > .sub.is-main + .sub.is-main, html.v4 .chapter > .sub.is-main + .sub.adminonly + .sub.is-main { padding-top: clamp(2.5rem, 6vw, 3.5rem); border-top: 1px solid var(--line); }
html.v4 .chapter > .sub.is-main { margin-bottom: clamp(2.5rem, 6vw, 3.5rem); }
html.v4 #sidecam.is-main { border-top: 0; padding-top: 1rem; }
html.v4 .card-pre { display: none; }

/* Setup: the gear, each a button that opens its panel */
html.v4 .kitlist { margin-top: 2.5rem; }
html.v4 button.kcard { font: inherit; color: inherit; text-align: left; background: none; cursor: pointer; width: 100%; }
html.v4 button.kcard:hover { border-color: var(--strong); }
html.v4 .kd-is { font-size: 1.0625rem; color: var(--strong); margin: .75rem 0 .5rem; }
html.v4 .kd-does { margin: 0 0 .75rem; }
html.v4 .kd-does .label { margin-right: .4rem; }

/* the filter's media, in order */
.mediaflow { margin-top: 2.5rem; }
.mf-row { position: relative; display: grid; gap: .5rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.mf-row::before { content: ""; position: absolute; left: 1.45rem; top: 1rem; bottom: 1rem; width: 2px; background: repeating-linear-gradient(var(--chum) 0 6px, transparent 6px 14px); background-size: 2px 14px; animation: mfflow 1s linear infinite; opacity: .55; }
@keyframes mfflow { to { background-position: 0 14px; } }
html.calm .mf-row::before { animation: none; }
.mf-st, .mf-end { position: relative; display: grid; grid-template-columns: 3rem 3.5rem minmax(0, 1fr); align-items: center; gap: .75rem; padding: .5rem 0; }
.mf-end { grid-template-columns: 3rem minmax(0, 1fr); }
.mf-n, .mf-tag { justify-self: center; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--strong); color: var(--strong); font-size: .75rem; font-weight: 600; z-index: 1; }
.mf-tag { width: auto; height: auto; padding: .2rem .55rem; border-radius: 999px; background: var(--strong); color: var(--bg); border: 0; }
.mf-small { color: var(--grey); font-size: .8125rem; }
.mf-pic { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 10px; background: var(--raise); overflow: hidden; }
.mf-pic img { max-width: 86%; max-height: 86%; object-fit: contain; }
.mf-tx { display: grid; gap: .1rem; }
.mf-tx b { color: var(--strong); font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; }
.mf-tx span { color: var(--grey); font-size: .8125rem; }
.mf-st.planned .mf-pic { opacity: .55; }
@media (min-width: 60rem) {
  .mf-row { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .75rem; }
  .mf-row::before { left: 1.5rem; right: 1.5rem; top: 2.1rem; bottom: auto; width: auto; height: 2px; background: repeating-linear-gradient(90deg, var(--chum) 0 6px, transparent 6px 14px); background-size: 14px 2px; animation-name: mfflowx; }
  @keyframes mfflowx { to { background-position: 14px 0; } }
  .mf-st, .mf-end { grid-template-columns: 1fr; justify-items: center; text-align: center; align-content: start; gap: .5rem; padding: 0; }
  .mf-n, .mf-tag { order: 0; }
  .mf-pic { width: 4.5rem; height: 4.5rem; }
}

/* Temperature: plainly live */
.tp2-live { display: flex; align-items: center; gap: .45rem; margin: .35rem 0 0; color: var(--text); font-size: .875rem; }
.tp2-live .ldot { width: .55rem; height: .55rem; border-radius: 50%; background: #ff3b30; animation: livepulse 2.4s ease-in-out infinite; }
.tp2-live.old .ldot { background: var(--grey); animation: none; }

/* Plan: the contribution grid */
.gh { --sq: clamp(.8rem, 2.6vw, 1.05rem); overflow-x: auto; scrollbar-width: none; padding-bottom: .25rem; }
.gh::-webkit-scrollbar { display: none; }
.gh-months, .gh-grid { display: grid; grid-template-columns: repeat(var(--weeks), var(--sq)); gap: 4px; }
.gh-months { margin-bottom: .35rem; height: 1rem; }
.gh-m { color: var(--grey); font-size: .6875rem; white-space: nowrap; overflow: visible; }
.gh-grid { grid-template-rows: repeat(7, var(--sq)); grid-auto-flow: column; }
.gh-d { width: var(--sq); height: var(--sq); padding: 0; border: 0; border-radius: 3px; background: color-mix(in srgb, var(--grey) 14%, transparent); cursor: pointer; }
.gh-d.done { background: var(--c); }
.gh-d.plan { background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--c); }
.gh-d.pre { opacity: .35; }
.gh-d.today { box-shadow: 0 0 0 1.5px var(--strong); }
.gh-d.sel { outline: 2px solid var(--strong); outline-offset: 1px; }
.gh-day { margin: .9rem 0 .5rem; color: var(--text); font-size: .9375rem; min-height: 1.4em; }

/* About: the Smart tank */
.smarttank { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.st-h { margin: 0 0 1.5rem; font-size: clamp(1.5rem, 4.2vw, 2.125rem); font-weight: 600; letter-spacing: -.035em; color: var(--strong); }
.st-cols { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .st-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.st-list { margin: .6rem 0 0; padding: 0; list-style: none; display: grid; gap: .7rem; }
.st-list li { display: grid; gap: .1rem; font-size: .875rem; color: var(--grey); }
.st-list b { color: var(--strong); font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; }
.st-hw li { color: var(--strong); font-size: .9375rem; }
.st-next { counter-reset: nx; }
.st-next li { position: relative; padding-left: 1.6rem; counter-increment: nx; }
.st-next li::before { content: counter(nx); position: absolute; left: 0; top: .1rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1.5px solid var(--strong); color: var(--strong); font-size: .6875rem; font-weight: 600; display: grid; place-items: center; }
.gh-d.k-stock.plan { box-shadow: none; background: color-mix(in srgb, var(--c) 22%, transparent); }
html.v4.site .view.dock { width: 5.75rem !important; }
@media (min-width: 48rem) { html.v4.site .view.dock { width: 9.5rem !important; } }
.mk-p.mk-flat img { transform: scaleY(.6); transform-origin: 50% 100%; }
.mk-p.mk-rot90 img { transform: rotate(90deg); }

/* ------------------------------------------------------------------ 10/15 third pass: Plan, buttons, the corner group */
html.v4 .cal2 { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 52rem) { html.v4 .cal2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; } }
html.v4 .cal-side { border: 0; padding: 0; margin: 0; }
html.v4 .cal-up .ev2s { display: grid; gap: 0; margin: .6rem 0 0; padding: 0; list-style: none; }
html.v4 .cal-up .ev2s::before, html.v4 .cal-up .ev2::before { display: none !important; }
html.v4 .ev2 { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .75rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--line); margin: 0; }
html.v4 .ev2:first-child { border-top: 0; }
.ev-ic { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: color-mix(in srgb, var(--c, var(--grey)) 16%, transparent); color: var(--c, var(--strong)); }
.ev-ic svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ev-tx { display: grid; gap: .1rem; min-width: 0; }
.ev-tx b { color: var(--strong); font-weight: 500; font-size: .9375rem; letter-spacing: -.01em; }
.ev-tx time { color: var(--grey); font-size: .8125rem; }
html.v4 .cal-key2 { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .5rem; color: var(--grey); font-size: .75rem; }

/* buttons: black and white pills, one style; blue only as a hairline accent */
html.v4 .act, html.v4 .pause, html.v4 .modepick .go, html.v4 .seg button, html.v4 .cal-arrow, html.v4 .ego, html.v4 .sheetlinks a, html.v4 .howtest a, html.v4 .wt-next, html.v4 .guide-next {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.5rem; padding: 0 1.1rem; border: 1px solid var(--line-strong) !important; border-radius: 999px !important; background: transparent !important; color: var(--strong) !important; font: 600 .75rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; box-shadow: none !important; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
html.v4 .act:hover, html.v4 .seg button:hover, html.v4 .sheetlinks a:hover, html.v4 .ego:hover, html.v4 .howtest a:hover { border-color: var(--strong) !important; }
html.v4 .pause, html.v4 .modepick .go, html.v4 .act.on, html.v4 .act[aria-pressed="true"], html.v4 .seg button[aria-pressed="true"], html.v4 .sheetlinks a:first-child { background: var(--strong) !important; color: var(--bg) !important; border-color: var(--strong) !important; }
html.v4 .mk-badge, html.v4 .tph-b { background: var(--strong) !important; color: var(--bg) !important; border: 2px solid var(--bg) !important; }
html.v4 .sheet-x { border-radius: 50% !important; background: var(--raise) !important; color: var(--strong) !important; border: 0 !important; }
html.v4 .lookgrid .mode.sel { border-color: var(--strong); box-shadow: inset 0 0 0 1px var(--strong); }

/* the fixed corner group: one capsule, bottom right; the floating camera sits right above it, same right edge */
html.v4 .v3dock { gap: 0; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bar-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 6px 24px rgb(0 0 0 / 18%); }
html.v4 .v3dock .v3btn { height: 2.25rem; border: 0 !important; border-radius: 999px; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--strong); }
html.v4 .v3dock .v3btn:hover { background: var(--raise); }
html.v4 .v4top { display: none; opacity: 1; transform: none; }
html.v4.strip-on .v4top { display: inline-flex; }
html.v4.strip-on .v4top + .v3cam:not([hidden]) { border-left: 1px solid var(--line) !important; border-radius: 0 999px 999px 0; }
html.v4:not(.strip-on) .v3dock:has(.v3cam[hidden]) { display: none; }
html.v4.site .view.dock { right: calc(max(1rem, env(safe-area-inset-right)) + 0px) !important; bottom: calc(1rem + 2.25rem + 6px + 2px + .6rem + env(safe-area-inset-bottom)) !important; inset: auto max(1rem, env(safe-area-inset-right)) calc(4.15rem + env(safe-area-inset-bottom)) auto !important; }
html.v4 .ev2, html.v4 .ev2.plan { border-left: 0 !important; background: none !important; padding-left: 0; padding-right: 0; }
html.v4 .cal-up { margin-top: 0; }
html.v4 .dp-arrow { border-radius: 50%; border-color: var(--line-strong); }
html.v4 .dp-day { border-radius: 12px; }
html.v4 .dp-day.on { border-color: var(--strong); background: var(--strong); }
html.v4 .dp-day.on b, html.v4 .dp-day.on span { color: var(--bg); }
html.v4 .dv-shot.on { border-color: var(--strong); color: var(--strong); }
html.v4 .wk.on { border-color: var(--strong); box-shadow: inset 0 3px 0 var(--strong); }
html.v4 .eopen:hover .ego, html.v4 .sheet .sheetlinks a:hover { border-color: var(--strong); color: inherit; }
@media (min-width: 40.01rem) { html.v4 .vials { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
html.v4 .ghkh-wait { border-style: dashed; }
html.v4 .tc3-wait { border-style: dashed; }
html.v4 .tc3-wait .tc3-dot { background: var(--grey); }
.tc3-waitsay { margin: .6rem 0 .5rem; color: var(--grey); font-size: .8125rem; }

/* Ecosystem: the loop over the picture */
html.v4 .swim { position: relative; overflow: visible; }
.eco-loop { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.eco-loop svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.el-ring { fill: none; stroke: rgb(255 255 255 / 70%); stroke-width: 1.5; stroke-dasharray: 2 6; animation: elring 2.4s linear infinite; }
@keyframes elring { to { stroke-dashoffset: -16; } }
html.calm .el-ring { animation: none; }
.el-node { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; padding: .3rem .65rem; border: 1px solid rgb(255 255 255 / 55%); border-radius: 999px; background: rgb(0 0 0 / 62%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font: 600 .6875rem/1.2 var(--sans); letter-spacing: .02em; white-space: nowrap; cursor: pointer; }
.el-node.on, .el-node:hover { background: #fff; color: #000; border-color: #fff; }
.el-say { margin: .9rem 0 0; min-height: 1.5em; color: var(--strong); font-size: .9375rem; text-align: center; }
@media (max-width: 30rem) { .el-node { font-size: .625rem; padding: .25rem .5rem; } }

/* ---- 10/15 fourth pass (his asks): every part opens its details, doors open on hover, the CO2 drawing redone,
   Home Assistant on the Pi, the feeding tube as clear glass, the filter centred and nothing overlapping */
.mk .mk-p.mk-hot { background: none; border-radius: 6px; transition: background-color .2s ease, box-shadow .2s ease; }
.mk .mk-p.mk-hot-bg { z-index: 2; }
.mk .mk-p.mk-hot-fg { z-index: 4; }
.mk-hot:hover, .mk-hot:focus-visible { background: rgb(255 255 255 / 7%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 28%); }
:root[data-theme="light"] .mk-hot:hover, :root[data-theme="light"] .mk-hot:focus-visible { background: rgb(0 0 0 / 5%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 22%); }
.mk-hot-bg::after { bottom: auto; top: .4rem; }
.t4 .mk-hot { display: none; }
.mk-gas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; overflow: visible; }
.mk-gasline { fill: none; stroke: rgb(214 222 228 / 55%); stroke-width: 5.6; stroke-linecap: round; stroke-linejoin: round; }
.mk-gasflow { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: .1 16; animation: mkgas 1.1s linear infinite; }
:root[data-theme="light"] .mk-gasline { stroke: rgb(70 80 90 / 55%); }
:root[data-theme="light"] .mk-gasflow { stroke: #248FD3; }
@keyframes mkgas { to { stroke-dashoffset: -16.1; } }
.mk-bcb { fill: rgb(255 255 255 / 90%); animation: mkbc 2s linear infinite; opacity: 0; }
@keyframes mkbc { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-62px); opacity: 0; } }
.mk-bub { fill: rgb(255 255 255 / 85%); stroke: rgb(255 255 255 / 40%); stroke-width: .6; opacity: 0; animation: mkbub 3.6s cubic-bezier(.35, .1, .6, 1) infinite; }
@keyframes mkbub { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: .95; } 80% { opacity: .8; } 100% { transform: translate(var(--dx, 0), -258px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mk-gasflow, .mk-bcb, .mk-bub { animation: none; } .mk-bub { opacity: .7; } }
html.v4 .mk-host .mk-co2fig .mk-stage { max-width: 25rem; margin: 0 auto; }
.dg-tap { cursor: pointer; }
.dg-key li.dg-tap:hover b { color: var(--chum, #248FD3); }
.dg-tap:focus-visible { outline: 2px solid var(--chum, #248FD3); outline-offset: 2px; }
.dg-parts .dg-partcard.dg-tap:hover { border-color: var(--strong); }
/* the filter's part cards: the photos stay inside their cards */
html.v4 .dg-parts .dg-partpic { overflow: hidden; }
html.v4 .dg-parts .dg-partpic img { max-height: 6.5rem !important; max-width: 100% !important; }
html.v4 #flow-tank .dg-parts { margin-bottom: 2rem; }
/* the filter cut-away centred on the filter itself */
html.v4 #filter-art { display: grid; justify-items: center; }
html.v4 #filter-art svg { width: 100%; max-width: 46rem; margin: 0 auto; }
html.v4 #filter-art .heaterfig { justify-self: center; }
/* Home Assistant on the Raspberry Pi card, top right */
.kpic { position: relative; }
.kha { position: absolute; top: .45rem; right: .45rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 8px; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 30%); }
.kha img { width: 78% !important; height: 78% !important; max-width: none !important; max-height: none !important; filter: none !important; }
/* About: the hardware names open their details */
.st-item { all: unset; cursor: pointer; color: var(--strong); font-size: .9375rem; }
.st-item:hover { color: var(--chum, #248FD3); }
.st-item:focus-visible { outline: 2px solid var(--chum, #248FD3); outline-offset: 2px; }
/* the feeding tube is clear glass: light on dark, darkened on the light theme */
:root[data-theme="light"] img[src*="gear/feedtube"] { filter: invert(.82) !important; }
.mk-co2fig .mk-k-drop img { filter: brightness(1.7) saturate(1.3) drop-shadow(0 0 6px rgb(120 220 90 / 35%)); }
.mk-co2fig .mk-k-diffuser img { filter: invert(1) hue-rotate(180deg) brightness(1.1); opacity: .9; }
.mk-p.mk-fit img { height: 100%; }

/* 10/15 load pass: the intro shows once, all at once (v4.js adds .t4-in when the fonts, the stock list and the pictures are in) */
html.v4.lay-b:not(.t4-in):not(.intro-static) .intro-stage { opacity: 0; }
/* the planted line under the wordmark keeps its space before the data arrives, so the name never moves */
html.v4 .brand-day { display: block; min-height: 1.2em; }
/* the corner buttons wait for the end of the intro (they used to flash on and off while loading) */
html.v4:not(.strip-on) .v3dock { display: none; }
/* the tube beside each chart's reading */
html.v4 .tc3-h .vial { margin-left: auto; width: .8rem; height: 2.1rem; }
html.v4 .tc3-h .vial + b { margin-left: 0; }

/* 10/15 symmetry pass: rows come out even at any width, titles break where they read well */
html.v4 :is(h1, h2, h3, h4, .ename, .card-name, .tc3-n, .vial-n, .kname, figcaption, .label, .mf-tx b, .dg-partcard b, .ev2 b) { text-wrap: balance; }
html.v4 :is(p, li, .esay) { text-wrap: pretty; }
/* fish and plants: 2 across on a phone; on a wider screen 4 across when the count splits into fours, else 3 */
@media (min-width: 48rem) {
  html.v4 #stock-list .entries.allfish:has(> .entry:nth-child(4n):last-child), html.v4 #plants-list.entries:has(> .entry:nth-child(4n):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html.v4 #plants-list.entries:has(> .entry:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 40rem; }
}
/* an odd last card in a two-across grid takes the whole row instead of sitting alone */
@media (max-width: 47.99rem) {
  html.v4 .lookgrid > :last-child:nth-child(odd), html.v4 #stock-list .entries.allfish > .entry:last-child:nth-child(odd), html.v4 .dg-parts > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* 10/15 evening: the month calendar back on top of Plan, the grid smaller under it */
/* 10/15 afternoon (his ask): Plan is the stocking timeline, full width; the dot grid under it fills the row, evenly spaced */
html.v4 #stocking .plangrid { display: block; }
html.v4 #stocking .gantt { border-top: 1px solid var(--line); }
html.v4 #stocking .g-row, html.v4 #stocking .g-axis { border-color: var(--line); }
html.v4 #stocking .g-track { border-radius: 999px; background: color-mix(in srgb, var(--grey) 12%, transparent); }
html.v4 #stocking .g-axis .g-track { border-radius: 0; background: none; }
html.v4 #stocking .g-bar { background: #248FD3; border-radius: 999px; }
html.v4 #stocking .g-soft { background: #248FD3; opacity: .25; border-radius: 999px; }
html.v4 #stocking .g-run { border-radius: 999px; }
html.v4 #stocking .g-fixed { background: #248FD3; }
html.v4 #stocking .g-now { background: var(--strong); border-radius: 2px; }
html.v4 #stocking .gantt .key .k-bar b, html.v4 #stocking .gantt .key .k-soft b { background: #248FD3; }
html.v4 #stocking .g-when .est { color: var(--grey); font-variant-numeric: tabular-nums; }
@media (min-width: 46rem) { html.v4 #stocking .plangrid .g-row, html.v4 #stocking .plangrid .g-axis { grid-template-columns: 12rem minmax(0, 1fr) !important; } }
html.v4 #cal { margin-top: clamp(2rem, 5vw, 3rem); }
@media (max-width: 45.99rem) {
  html.v4 #stocking .plangrid .g-row, html.v4 #stocking .plangrid .g-axis { grid-template-columns: minmax(0, 1fr) !important; gap: .45rem; padding: .85rem 0; }
  html.v4 #stocking .plangrid .g-label { grid-row: auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
  html.v4 #stocking .plangrid .g-axis .g-label { display: none; }
  html.v4 #stocking .plangrid .g-who { margin-top: 0; }
  html.v4 #stocking .plangrid .g-when { grid-column: 1; }
  html.v4 #stocking .g-track { height: 1.1rem; }
}

/* 10/15 late: Plan and its dot grid share the page's palette (chum blue and greys); a colour means one thing in the bars, the squares and the key */
html.v4 #cal .k-test, html.v4 #cal .cal-key2 .k-test { --c: var(--grey); }
html.v4 #cal .k-wc, html.v4 #cal .cal-key2 .k-wc { --c: var(--text); }
html.v4 #cal .k-plant, html.v4 #cal .cal-key2 .k-plant { --c: color-mix(in srgb, var(--chum) 45%, var(--text)); }
html.v4 #cal .k-feed, html.v4 #cal .cal-key2 .k-feed { --c: color-mix(in srgb, var(--grey) 40%, transparent); }
html.v4 #cal .k-stock, html.v4 #cal .cal-key2 .k-stock { --c: var(--chum); }
html.v4 #cal .k-ms, html.v4 #cal .cal-key2 .k-ms { --c: var(--chum); }
html.v4 #cal .cal-key2 .kk i { border-radius: 2px; }
html.v4 #cal .cal-key2 .k-stock i { background: color-mix(in srgb, var(--chum) 25%, transparent); }
@media (max-width: 45.99rem) { html.v4 #stocking .g-axis .g-track { font-size: .625rem; letter-spacing: .04em; } html.v4 #stocking .g-axis .g-track span { padding-left: .22rem; } }

/* 10/15 evening: the dot grid, readable. Weekday letters left, months on top; a day with two kinds of thing is split in
   halves, three or more in stacked bars; done solid, planned outlined (a stocking window is a tint, as in the timeline); today ringed, days ahead faint. */
html.v4 #cal .dg { --gap: clamp(2px, .5vw, 6px); display: grid; grid-template-columns: auto repeat(var(--weeks), minmax(0, 1fr)); grid-template-rows: auto; column-gap: var(--gap); row-gap: var(--gap); align-items: center; }
html.v4 #cal .dg-m { color: var(--grey); font-size: .75rem; white-space: nowrap; overflow: visible; min-width: 0; margin-bottom: .3rem; align-self: end; }
html.v4 #cal .dg-w { color: var(--grey); font-size: clamp(.5625rem, 1.6vw, .6875rem); line-height: 1; padding-right: .3rem; text-align: center; }
html.v4 #cal .dg-d { display: flex; flex-direction: column; gap: 1px; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: clamp(2px, .3vw, 4px); overflow: hidden; background: color-mix(in srgb, var(--grey) 16%, transparent); cursor: pointer; }
html.v4 #cal .dg-d.n1, html.v4 #cal .dg-d.n2, html.v4 #cal .dg-d.n3 { background: none; }
html.v4 #cal .dg-d.n2 { flex-direction: row; }
html.v4 #cal .dg-d i, html.v4 #cal .dg-list i { display: block; background: var(--c); }
html.v4 #cal .dg-d i { flex: 1 1 0; min-width: 0; min-height: 0; }
html.v4 #cal .dg-d i.plan, html.v4 #cal .dg-list i.plan { background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--c); }
html.v4 #cal .dg-d i.plan.k-stock, html.v4 #cal .dg-list i.plan.k-stock, html.v4 #cal .cal-key2 .k-stock i { background: color-mix(in srgb, var(--chum) 38%, transparent); box-shadow: none; }
html.v4 #cal .dg-d.fut, html.v4 #cal .dg-d.pre { opacity: .5; }
html.v4 #cal .dg-d.today { opacity: 1; box-shadow: 0 0 0 1.5px var(--strong); overflow: visible; }
html.v4 #cal .dg-d.today i:first-child { border-radius: inherit; }
html.v4 #cal .dg-d.sel { outline: 2px solid var(--chum); outline-offset: 2px; opacity: 1; }
html.v4 #cal .cal-key2 { margin-top: .9rem; }
html.v4 #cal .dg-day { margin-top: 1.1rem; }
html.v4 #cal .dg-date { color: var(--strong); font-size: .9375rem; font-weight: 600; margin: 0 0 .4rem; }
html.v4 #cal .dg-none { color: var(--grey); font-size: .9375rem; margin: 0; }
html.v4 #cal .dg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
html.v4 #cal .dg-list li { display: flex; align-items: baseline; gap: .55rem; color: var(--text); font-size: .9375rem; }
html.v4 #cal .dg-list i { flex: none; width: .6rem; height: .6rem; border-radius: 2px; transform: translateY(-.05rem); }
