/* The stepped 3D tank used by the cycling and ammonia spike guides (Lab, Nov 17 2026), with the small pieces those
   pages share: jump menu, definition line, picture cards and the chart panel. The Prevent the Crash page carries its own
   copy of these rules in its <style>; keep the two in step when one changes. Script: tank-stepper.js. */
.ts-define { margin: 0 0 12px; padding: 10px 12px; border-left: 4px solid #40d9ff; border-radius: 0 6px 6px 0; color: #fff; background: rgba(64,217,255,0.1); font-size: 15px; line-height: 1.45; }
.ts-define strong { color: #bdefff; }
.ts-define.urgent { border-left-color: #ff715f; background: rgba(255,113,95,0.1); }
.ts-define.urgent strong { color: #ffd0c8; }
.text-link { color: #dff8ff; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(64,217,255,0.5); text-underline-offset: 4px; }
.ts-panel { border: 1px solid rgba(116,205,235,0.2); border-radius: 8px; background: radial-gradient(circle at 100% 0%, rgba(64,217,255,0.08), transparent 36%), #071a27; box-shadow: 0 16px 34px rgba(0,0,0,0.22); }
section[id], .ts-anchor { scroll-margin-top: 84px; }

.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid rgba(116,205,235,0.32); border-radius: 999px; color: #fff; background: rgba(8,35,52,0.72); font-size: 13px; font-weight: 850; }
.jump a:hover { border-color: #40d9ff; }
.jump .jump-urgent { border-color: #ff715f; color: #04121d; background: #ff715f; }

/* Picture on top of a card. */
.ts-pic { display: block; width: calc(100% + 32px); max-width: none; margin: -16px -16px 12px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px 8px 0 0; background: #061a27; }

/* Do / don't pairs. */
.pair { display: grid; gap: 6px; margin-top: 12px; }
.pair p { position: relative; margin: 0; padding: 7px 9px 7px 32px; border-radius: 6px; color: #e6f9ff; font-size: 13px; line-height: 1.35; }
.pair p::before { position: absolute; left: 9px; top: 6px; font-size: 15px; font-weight: 950; }
.pair .do { background: rgba(114,211,137,0.12); }
.pair .do::before { content: "\2713"; color: #72d389; }
.pair .dont { background: rgba(255,113,95,0.12); }
.pair .dont::before { content: "\2717"; color: #ff715f; }
.pair b { color: #fff; }

/* The stepped tank. */
.cc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 18px; }
.cc-stage { display: grid; gap: 10px; align-content: start; }
.cc-3d { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; background: radial-gradient(circle at 50% 28%, #103349, #04121d 72%); }
.cc-3d canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.cc-poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.has-3d .cc-poster { display: none; }
.cc-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cc-controls[hidden], .tl-top[hidden], html:not(.js) .cc-meters { display: none; }
.ctl { min-height: 40px; padding: 8px 14px; border: 1px solid rgba(116,205,235,0.32); border-radius: 6px; color: #fff; background: rgba(8,35,52,0.72); font: inherit; font-size: 13px; font-weight: 850; cursor: pointer; }
.ctl:hover { border-color: #40d9ff; }
.ctl[aria-pressed="true"] { border-color: #ff7b32; color: #04121d; background: #ff7b32; }
.ctl:focus-visible, .cc-steps button:focus-visible { outline: 2px solid #40d9ff; outline-offset: 2px; }
.cc-count { margin-left: auto; color: #9fc6d6; font-size: 13px; font-weight: 850; }
.cc-seeing { margin: 0; padding: 9px 12px; border-left: 4px solid #ff7b32; border-radius: 0 6px 6px 0; color: #fff; background: rgba(255,123,50,0.12); font-size: 14px; line-height: 1.4; }
.cc-seeing[hidden] { display: none; }
.cc-seeing b { color: #ffc49f; }
.cc-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cc-meters span { display: block; margin-bottom: 4px; color: #b9d9e7; font-size: 11px; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.cc-meters i { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(185,217,231,0.16); }
.cc-meters b { display: block; width: 0; height: 100%; border-radius: 999px; transition: width 1.2s ease; }
.m-ammonia { background: #ffb02e; } .m-nitrite { background: #ff5fb0; } .m-nitrate { background: #9fe8ff; }
.m-bact { background: #72d389; } .m-oxy { background: #40d9ff; } .m-waste { background: #ff715f; }
.cc-caption { margin: 0; color: #9fc6d6; font-size: 12px; line-height: 1.45; }
.cc-key { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 50%; vertical-align: baseline; }
.cc-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; align-content: start; }
.cc-steps li { counter-increment: step; border: 1px solid rgba(116,205,235,0.18); border-radius: 8px; background: rgba(4,19,32,0.6); transition: border-color 0.3s, background 0.3s; }
.cc-steps button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; color: #fff; background: none; font: inherit; font-size: 15px; font-weight: 850; text-align: left; cursor: pointer; }
.cc-steps button::before { content: counter(step); display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; color: #04121d; background: #6f93a3; font-size: 13px; font-weight: 950; transition: background 0.3s; }
.cc-steps li.is-active { border-color: rgba(64,217,255,0.7); background: rgba(64,217,255,0.08); }
.cc-steps li.is-active button::before { background: #40d9ff; }
.cc-body { padding: 0 12px 12px 48px; }
.cc-body p { margin: 0; color: #b9d9e7; font-size: 14px; line-height: 1.5; }
.cc-body p + p { margin-top: 8px; }
.cc-break { padding: 7px 10px; border-radius: 6px; color: #e6f9ff !important; background: rgba(114,211,137,0.13); }
.cc-break b { color: #72d389; }
.js .cc-steps li:not(.is-active) .cc-body { display: none; }

/* The chart under the tank. */
.tl { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 20px; align-items: center; margin-top: 14px; padding: 18px; }
.tl-side h3 { margin: 0 0 8px; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 24px; line-height: 1.1; }
.tl-side p { margin: 0; color: #b9d9e7; font-size: 14px; line-height: 1.5; }
.tl-side .tl-note { margin-top: 10px; color: #9fc6d6; font-size: 12px; }
.tl svg { display: block; width: 100%; height: auto; }
.tl text { fill: #b9d9e7; font: 700 12px Inter, system-ui, sans-serif; }
.tl .axis, .tl .grid, .tl .line { fill: none; }
.tl .axis { stroke: rgba(185,217,231,0.35); stroke-width: 1; }
.tl .grid { stroke: rgba(185,217,231,0.12); stroke-width: 1; }
.tl .line { stroke-width: 4; stroke-linecap: round; }
.tl .band { fill: rgba(64,217,255,0.12); opacity: 0; transition: opacity 0.5s; }
.tl[data-step="1"] .band-1, .tl[data-step="2"] .band-2, .tl[data-step="3"] .band-3, .tl[data-step="4"] .band-4 { opacity: 1; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: #e6f9ff; font-size: 13px; font-weight: 800; }

/* A short checklist with a result line. */
.ready { padding: 18px; }
.ready h3 { margin: 0 0 6px; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 24px; line-height: 1.1; }
.ready ul { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.ready label { display: flex; gap: 10px; align-items: flex-start; color: #d9f5fc; font-size: 14px; line-height: 1.45; cursor: pointer; }
.ready input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: #72d389; }
.ready-result { margin-top: 14px; padding: 10px 12px; border-radius: 6px; color: #fff; background: rgba(255,123,50,0.14); font-size: 14px; line-height: 1.45; }
.ready-result.is-ready { background: rgba(114,211,137,0.18); }
.ready-result[hidden] { display: none; }

@media (max-width: 1040px) {
  .cc, .tl { grid-template-columns: 1fr; }
}
@media (max-width: 1040px) and (min-height: 600px) {
  .cc-stage { display: contents; }
  .cc-3d { position: sticky; top: 64px; z-index: 5; box-shadow: 0 12px 26px rgba(0,0,0,0.5); }
}
@media (max-width: 620px) {
  .cc, .tl, .ready { padding: 12px; }
  .cc-count { margin-left: 0; }
  .tl text { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cc-meters b, .tl .band { transition: none; }
}

/* A wide picture at the top of a section. */
.ts-figure { display: block; width: 100%; max-height: 360px; margin: 0 0 14px; object-fit: cover; border: 1px solid rgba(116,205,235,0.2); border-radius: 8px; }
