/*
  main.bundle.css
  Combined bundle with /css/style.css, /assets/css/utilities.css, /css/ui.css, and /css/stocking-advisor.css
  Generated during Codex task to keep Stocking Advisor on a single stylesheet.
*/
/*
 * CSS Inventory — 2024-06-XX
 * /css/style.css — global tokens, resets, navigation, hero + card shells. Used by index.html, stocking-advisor.html,
 *   gear/index.html, cycling-coach/index.html, media.html, journal.html, and most marketing pages.
 * /css/site.css — shared layout modules (environment cards, footer, split grids) relied on index.html, journal.html,
 *   stocking-advisor.html, gear/index.html, and legacy sections that include env tables.
 * /css/utilities.css & /assets/css/utilities.css — tooltip + helper utilities injected into stocking-advisor.html,
 *   cycling-coach/index.html, media.html, and other interactive prototypes.
 * /assets/css/theme.css — gradients + brand color utilities for university/media hero shells. Blog hero treatments
 *   import it through components.
 * /css/ui.css — legacy form + table helpers piggybacked only by stocking-advisor.html.
 * /css/stocking-advisor.css — complete layout/theme for the Stocking Advisor app shell.
 * /gear/css/gear.v2.css — gear guide grid + CTA controls loaded by gear/index.html.
 * /assets/css/cycling-coach.css — stepper UI for cycling-coach/index.html.
 * /assets/css/media.css — media hub + community archive components on media.html.
 * /css/journal.css & /css/journal-dashboard*.css — kept for experiments; journal.html currently relies on inline
 *   legal-pad styles while journal-dashboard.html embeds its own grid/charts.
 * Inline <style> blocks live in stocking-advisor.html (cards + prototype patch), gear/index.html (CTA buttons +
 *   retailer badge grid), media.html (hero + storefront), journal.html (legal pad skin), and journal-dashboard.html
 *   (dashboard layout) — all slated for consolidation/namespace in this pass.
 * These comments keep the current scope visible while we merge/cleanup without touching JS or HTML structure.
 */

/*
 * CSS Merge Plan — base vs. layout vs. theming
 * - Keep /css/style.css as the canonical hub for tokens, resets, typography, buttons, cards, nav, hero sections, and
 *   shared utility classes. Any duplicate .btn/.card/.hero styles from other files will move here.
 * - Keep /css/site.css for site-wide layout components (sections, grids, footer, advisor environment tables). Remove
 *   overlapping button/typography definitions there once consolidated.
 * - Keep /assets/css/theme.css strictly for gradients, beams, overlays, and color utility helpers. Anything structural
 *   that leaked into theme.css gets pulled back into style.css or site.css.
 * - Page-specific CSS (Stocking Advisor, Gear Guide, Cycling Coach, Media, Journal Dashboard) stays isolated but gains
 *   namespaces (.stocking-card, .gear-section, .cycling-step, .journal-dashboard-*) to avoid collisions.
 * - Delete redundant selectors only when 100% unused; leave unsure ones with a /* possible legacy */ note.
 */

/* Temporarily hide AdSense slots during content expansion phase */
.ttg-ad-slot,
.ad-slot,
div[class*="ad-slot"],
div[id*="ad-"],
div[data-ad-label],
div[aria-label="Advertisement"] {
  display: none !important;
}

/* Also hide any ad placeholders */
.ad-placeholder {
  display: none !important;
}

:root {
  --nav-text: #f3f6ff;
  --nav-muted: rgba(243, 246, 255, 0.78);
  --nav-inline-gap: 20px;
  --bg: #0b1020;
  --fg: #eef3ff;
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --good: #1fbf75;
  --warn: #f5b301;
  --bad: #e25555;
  --bubble-warn-bg: rgba(245, 179, 1, 0.18);
  --bubble-warn-line: rgba(245, 179, 1, 0.5);
  --bubble-warn-text: #fff5d6;
  --bubble-bad-bg: rgba(226, 85, 85, 0.2);
  --bubble-bad-line: rgba(226, 85, 85, 0.55);
  --bubble-bad-text: #ffe3e3;
  --nav-layer: 20000;
  --nav-overlay-layer: 20001;
  --nav-drawer-layer: 20002;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Accessible skip link — hidden until focused */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  color: #000000;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  z-index: 10000;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* Global AdSense layout shift fix */
.ttg-ad-slot {
  min-height: 250px;
  contain: layout;
}

.ttg-ad-slot:not(.ttg-ad-slot--empty) {
  min-height: 0;
}

#site-footer {
  min-height: 200px;
  contain: content;
}

/* Primary nav minimum height to prevent CLS */
#primary-nav,
.site-nav {
  min-height: 60px;
}

/* Global image constraints to prevent overflow */
img {
  max-width: 100%;
  height: auto;
}

body.theme-dark {
  --page-bg: radial-gradient(140% 100% at 0% 0%, #091421 0%, #0b1b2b 45%, #0a0f18 100%);
  background: var(--page-bg);
  color: #eef3ff;
  min-height: 100vh;
  background-attachment: fixed;
}

body.theme-light {
  --page-bg: radial-gradient(140% 100% at 0% 0%, #0e5e8b 0%, #1477a8 45%, #1a8fc2 100%);
  background: var(--page-bg);
  color: #eef3ff;
  min-height: 100vh;
}

.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;
}

.ttg-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.page-background {
  background:
    radial-gradient(1200px 800px at 75% -10%, #36c2cc 0%, rgba(54, 194, 204, 0) 60%),
    radial-gradient(1200px 900px at -10% 120%, #0077c7 0%, rgba(0, 119, 199, 0) 60%),
    linear-gradient(140deg, #0077c7 0%, #0b6ea6 40%, #0a4d87 100%);
  min-height: 100vh;
}

.bg--dark {
  background:
    radial-gradient(1200px 600px at 30% -10%, rgba(0, 0, 0, 0.35), transparent 60%),
    linear-gradient(180deg, #0f2d49 0%, #0a2742 60%, #082035 100%);
  min-height: 100%;
  background-attachment: fixed;
}

#global-nav {
  position: relative;
  z-index: var(--nav-layer, 20000);
  background: rgba(10, 14, 22, 0.35);
  backdrop-filter: saturate(1.4) blur(6px);
  -webkit-backdrop-filter: saturate(1.4) blur(6px);
  color: var(--nav-text);
}

#global-nav .inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  width: min(1100px, 100%);
}

#global-nav #ttg-nav-open {
  order: 0;
  margin: 0;
  flex-shrink: 0;
}

#global-nav .brand {
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

#global-nav .links {
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
}

#global-nav .links .nav__list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--nav-inline-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

#global-nav .links .nav__item {
  display: flex;
}

#global-nav .links .nav__link {
  color: var(--nav-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  white-space: nowrap;
  position: relative;
}

#global-nav .links .nav__link:hover,
#global-nav .links .nav__link:focus-visible {
  color: #ffffff;
}

#global-nav .links .nav__link[aria-current="page"] {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* Homepage-only: ensure nav/brand/hamburger stay white on blue hero */
.page-background #global-nav,
.page-background #global-nav .site-brand,
.page-background #global-nav .site-brand__title,
.page-background #global-nav .site-brand__subtitle,
.page-background #global-nav .site-brand__em,
.page-background #global-nav .links .nav__link,
.page-background #global-nav .hamburger,
.page-background #global-nav .hamburger .hamburger__bars,
.page-background #global-nav .hamburger .hamburger__bars::before,
.page-background #global-nav .hamburger .hamburger__bars::after {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.9);
}

.page-background #global-nav .hamburger {
  background: rgba(12, 24, 40, 0.25);
}

.page-background #global-nav .links .nav__link:hover,
.page-background #global-nav .links .nav__link:focus-visible,
.page-background #global-nav .links .nav__link[aria-current="page"] {
  color: #ffffff;
}

.page-background #global-nav #ttg-drawer,
.page-background #global-nav #ttg-drawer .drawer-links .nav__link,
.page-background #global-nav #ttg-drawer .drawer-title,
.page-background #global-nav #ttg-drawer .drawer-close,
.page-background #global-nav #ttg-drawer .drawer-links .nav__link:hover,
.page-background #global-nav #ttg-drawer .drawer-links .nav__link:focus-visible,
.page-background #global-nav #ttg-drawer .drawer-links .nav__link[aria-current="page"] {
  color: #ffffff;
}

@media (max-width: 920px) {
  #global-nav .links {
    display: none;
  }
}

/* Desktop nav spacing - tighter gap to prevent wrapping */
@media (min-width: 921px) {
  #global-nav .links .nav__list {
    gap: 1.25rem; /* ~20px - tighter spacing to fit all items */
  }
}

.site-brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex-shrink: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  justify-content: center;
  min-height: 48px;
}

.site-brand__title {
  font-weight: 800;
  font-size: 1.12rem;
  line-height: 1;
}

.site-brand__subtitle {
  font-size: 0.92rem;
  opacity: 0.85;
}

.site-brand__em {
  font-weight: 600;
}

.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 24, 40, 0.42);
  color: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.hamburger:hover,
.hamburger:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
}

/* Featured Videos CTA */
.video-card a.yt-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.video-card a.yt-cta:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.video-card a.yt-cta:hover {
  filter: brightness(1.08);
}

.video-card a.yt-cta:active {
  transform: translateY(1px);
}

.video-card a.yt-cta .yt-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff0033;
  border-radius: 6px;
}


.video-card a.yt-cta .yt-label {
  white-space: nowrap;
}

.video-card a.yt-cta,
.video-card a.yt-cta:link,
.video-card a.yt-cta:visited {
  background-color: #000;
  color: #fff;
}

.video-card .video-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.video-card .video-blurb {
  flex: 1 1 auto;
}

.video-card .video-blurb p {
  margin: 0;
}

.video-card .video-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.hamburger__bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.hamburger__bars::before,
.hamburger__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.hamburger__bars::before {
  top: -6px;
}

.hamburger__bars::after {
  top: 6px;
}

#global-nav #ttg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: var(--nav-overlay-layer, 20001);
  display: none;
  pointer-events: none;
}

#global-nav[data-open="true"] #ttg-overlay,
#global-nav #ttg-overlay.is-open {
  display: block;
  pointer-events: auto;
}

#global-nav #ttg-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(45vw, 420px);
  max-width: 420px;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  background: rgba(10, 14, 22, 0.82);
  backdrop-filter: saturate(1.2) blur(6px);
  -webkit-backdrop-filter: saturate(1.2) blur(6px);
  z-index: var(--nav-drawer-layer, 20002);
  display: flex;
  flex-direction: column;
  color: var(--nav-text);
  min-height: 100vh;
}

#global-nav[data-open="true"] #ttg-drawer,
#global-nav #ttg-drawer.is-open {
  transform: translateX(0);
}

#global-nav #ttg-drawer .drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 12px;
}

#global-nav #ttg-drawer .drawer-title {
  font-size: 1.12rem;
  font-weight: 700;
}

#global-nav #ttg-drawer .drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#global-nav #ttg-drawer .drawer-close:hover,
#global-nav #ttg-drawer .drawer-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
}

#global-nav #ttg-drawer .drawer-links {
  padding: 12px 0 24px;
  overflow-y: auto;
}

#global-nav #ttg-drawer .drawer-links .nav__list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

#global-nav #ttg-drawer .drawer-links .nav__item {
  display: block;
}

#global-nav #ttg-drawer .drawer-links .nav__link {
  display: block;
  padding: 16px 22px;
  line-height: 1.25;
  font-size: 1.05rem;
  color: rgba(243, 246, 255, 0.85);
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

#global-nav #ttg-drawer .drawer-links .nav__link:hover,
#global-nav #ttg-drawer .drawer-links .nav__link:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

#global-nav #ttg-drawer .drawer-links .nav__link[aria-current="page"] {
  color: #ffffff;
  background: none;
  text-decoration: underline;
}

#global-nav #ttg-drawer .drawer-links .nav__link[aria-current="page"]:hover,
#global-nav #ttg-drawer .drawer-links .nav__link[aria-current="page"]:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

#global-nav a:focus-visible,
#global-nav button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
  border-radius: 12px;
}

html[data-scroll-lock="on"],
html[data-scroll-lock="on"] body {
  overflow: hidden;
}

.about-box {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.04);
}

.about-hero-title {
  text-align: center;
  color: #ffffff;
  margin: 6vh 0 3vh;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
}

/* Stocking Advisor layout */
.wrap {
  max-width: 1024px;
  margin: 0 auto;
  padding: 18px;
}

.seo-intro {
  max-width: 700px;
  margin: 1rem auto 0;
  padding: 0;
  font-size: 0.75em;
  line-height: 1.4;
  color: var(--muted, rgba(255, 255, 255, 0.85));
  text-align: center;
}

.seo-intro p {
  margin: 0;
}

.seo-intro strong {
  color: var(--fg, #ffffff);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}

.row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.row-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 6px;
}

input,
select,
button {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  appearance: none;
}

input[disabled] {
  opacity: 0.8;
}

button.btn,
button.button {
  cursor: pointer;
  border: 0;
  width: auto;
  background: none;
}

button.danger {
  background: rgba(226, 85, 85, 0.16);
}

.planted-wrap label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--good);
}

.tip {
  opacity: 0.8;
  font-size: 0.9rem;
  align-self: end;
}

.help {
  margin-top: 6px;
  opacity: 0.85;
  font-size: 0.85rem;
}

.badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.metric {
  margin-bottom: 14px;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}

body.cycling-coach input[type='checkbox'] {
  appearance: checkbox;
  -webkit-appearance: checkbox;
  width: auto;
  height: auto;
  margin: 0;
}

body.cycling-coach .field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

body.cycling-coach .field--checkbox label {
  margin: 0;
}

body.cycling-coach .field-error {
  margin: 0;
  font-size: 0.8rem;
  color: #ffb5b5;
}

.env-recs {
  opacity: 0.85;
  font-size: 0.9rem;
}

.env-recs .dot {
  opacity: 0.6;
  margin: 0 6px;
}

.bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.bar-fill {
  height: 100%;
  width: 0%;
  transition: width 1.2s ease;
  background: linear-gradient(90deg, var(--good), var(--warn), var(--bad));
}

.bar-fill.green {
  background: linear-gradient(90deg, var(--good), var(--good));
}

.bar-fill.yellow {
  background: linear-gradient(90deg, var(--warn), var(--warn));
}

.bar-fill.red {
  background: linear-gradient(90deg, var(--bad), var(--bad));
}

.warnings-section {
  margin-top: 8px;
}

.warning-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bubble {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.bubble.warn {
  background: var(--bubble-warn-bg);
  border-color: var(--bubble-warn-line);
  color: var(--bubble-warn-text);
}

.bubble.bad {
  background: var(--bubble-bad-bg);
  border-color: var(--bubble-bad-line);
  color: var(--bubble-bad-text);
}

.bubble.note {
  opacity: 0.9;
}

table.stock {
  width: 100%;
  border-collapse: collapse;
  color: var(--fg);
}

table.stock th,
table.stock td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  background: transparent;
}

table.stock th.qty,
table.stock td.qty {
  width: 90px;
  text-align: center;
}

table.stock th.actions,
table.stock td.actions {
  width: 180px;
  text-align: right;
}

td.empty-cell {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.actions .mini {
  width: auto;
  padding: 6px 10px;
  margin-left: 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
  cursor: pointer;
  appearance: none;
}
#cycling-coach .planted-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px;
}

/* Shared control styles */
.control {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font: inherit;
  line-height: 1.25;
  border-radius: 12px;
  border: 1px solid var(--control-border, rgba(255, 255, 255, 0.12));
  background: var(--control-bg, rgba(255, 255, 255, 0.06));
  color: var(--control-fg, #e6e8ea);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

/* Select: ensure text is visible in dark theme and not clipped */
select.control {
  background-image:
    linear-gradient(transparent, transparent),
    url("data:image/svg+xml,%3Csvg width='20' height='12' viewBox='0 0 20 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2l8 8 8-8' stroke='%23E6E8EA' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: right 12px center;
  background-size: 20px 12px;
  padding-right: 42px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* High-contrast focus */
.control:focus {
  border-color: var(--accent, #30e1a1);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent, #30e1a1) 35%, transparent);
}

/* Disabled/placeholder option style */
select.control option[disabled],
select.control option[value=""] {
  color: rgba(230, 232, 234, 0.55);
}

/* iOS Safari zoom/size quirks */
html {
  -webkit-text-size-adjust: 100%;
}

@supports (-webkit-touch-callout: none) {
  select.control {
    font-size: 16px;
  }
}

/* Container layout guard so controls don’t get clipped by overflow */
.controls-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 720px) {
  .controls-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .controls-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

#stocking-page section[aria-labelledby="controls-title"] {
  margin-bottom: 16px;
}

#stocking-page section[aria-labelledby="water-title"] {
  margin-top: 16px;
}

@media (min-width: 720px) {
  #stocking-page section[aria-labelledby="controls-title"] {
    margin-bottom: 20px;
  }

  #stocking-page section[aria-labelledby="water-title"] {
    margin-top: 20px;
  }
}

.control-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.control-field label {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted, rgba(235, 239, 251, 0.86));
}

.control-field--full {
  grid-column: 1 / -1;
  width: 100%;
}


.tank-size-card .facts-line {
  margin: 8px 0 0;
  font-size: 0.95rem;
  padding-top: 0;
}

#challengeCard[hidden] { display: none !important; }
.chip { padding:4px 8px; border-radius:999px; background:rgba(255,255,255,.08); font-size:.85rem; }

.stock-list { display:grid; gap:12px; }
.stock-entry {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:8px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.08);
}
.stock-entry__name { font-weight:600; font-size:1rem; }
.stock-entry__meta { color:var(--muted, rgba(235,239,251,0.86)); font-size:0.95rem; }
.stock-entry__remove {
  appearance:none;
  border:0;
  border-radius:10px;
  padding:8px 12px;
  background:rgba(255,255,255,0.12);
  color:inherit;
  font-weight:600;
  cursor:pointer;
  justify-self:start;
}
.stock-entry__remove:hover { background:rgba(255,255,255,0.18); }
@media (min-width: 640px){
  .stock-entry {
    grid-template-columns:minmax(0,1fr) auto auto;
    align-items:center;
  }
  .stock-entry__meta { justify-self:end; }
  .stock-entry__remove { justify-self:end; }
}
.stock-empty { padding:10px 2px; color:var(--muted, rgba(235,239,251,0.75)); font-size:0.95rem; }
.subtle { color:var(--muted, rgba(235,239,251,0.75)); font-size:0.95rem; }

/* Warnings card */
.warn-card .card__hd h2 { margin:0 0 6px 0; }
.warn-list { display:grid; gap:10px; }
.warn-row { padding:12px; border-radius:10px; background:rgba(255,140,0,.08); }
.warn-title { font-weight:700; margin-bottom:2px; }
.warn-reason { opacity:.9; margin-bottom:4px; }
.warn-detail { opacity:.8; font-size:.95rem; margin-bottom:4px; }
.warn-reco { font-size:.95rem; }

/* --- Hero grouping & spacing --- */
.hero-header{
  max-width: 30rem;
  padding: 16px 0 14px;
  margin: 0;            /* keep left-aligned; parent handles overall layout */
}
.hero-title{
  display: inline-flex;
  align-items: center;
  gap: 6px;             /* gap between title text and the info button */
  margin: 0 0 6px 0;    /* compact space under H1 */
}
.hero-subline{
  font-size: 12px;
  opacity: 0.85;
  margin: 0 0 4px 0;
}
.hero-tagline{
  line-height: 1.35;
  margin: 0 0 8px 0;
}

html.ttg-tooltip-lock,
body.ttg-tooltip-lock{
  overflow:hidden;
}
.hero-how{
  display: inline-block;
  margin-top: 2px;      /* tuck the link right under the tagline */
}

/* Unified info button */
.info-btn{
  --info-btn-hit: 44px;
  --info-btn-color: var(--ink-300, rgba(238,243,255,0.82));
  --info-btn-color-hover: var(--ink-100, rgba(247,251,255,0.98));
  --info-btn-color-disabled: rgba(238,243,255,0.45);
  --info-btn-focus-inner: var(--surface, rgba(8,13,24,1));
  --info-btn-focus-outer: var(--accent-400, rgba(63,211,218,0.75));
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--info-btn-hit);
  height: var(--info-btn-hit);
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: none;
  color: var(--info-btn-color);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.info-btn:hover:not([disabled]){
  color: var(--info-btn-color-hover);
}

.info-btn:active:not([disabled]){
  transform: scale(0.96);
}

.info-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px var(--info-btn-focus-inner), 0 0 0 4px var(--info-btn-focus-outer);
}

.info-btn[disabled]{
  color: var(--info-btn-color-disabled);
  cursor: default;
  pointer-events: none;
}

.info-btn[disabled]:active{
  transform: none;
}

.info-btn svg{
  width: 20px;
  height: 20px;
  display: block;
}

.ttg-tooltip[data-ttg-portal='body']{
  position: absolute;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.ttg-tooltip[data-ttg-portal='body'][data-open='true']{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-color-scheme: light){
  .info-btn{
    --info-btn-color: var(--ink-700, #334155);
    --info-btn-color-hover: var(--ink-900, #0f172a);
    --info-btn-color-disabled: rgba(148,163,184,0.6);
    --info-btn-focus-inner: var(--surface, #ffffff);
    --info-btn-focus-outer: var(--accent-400, rgba(63,211,218,0.55));
  }
}

@media (prefers-reduced-motion: reduce){
  .info-btn{
    transition: none;
  }
}


/* Remove default paragraph spacing INSIDE hero to keep tight control */
.hero-header p{ margin-top: 0; }

/* Ensure the cards stack doesn’t float too far below the hero */
.hero-header + *{
  margin-top: 16px !important;   /* tighten the gap below hero on mobile */
}

/* --- Tablet and up --- */
@media (min-width: 768px){
  .hero-header{
    max-width: 40rem;
    padding: 24px 0 18px;
  }
  .hero-title{ margin-bottom: 8px; }
  .hero-header + *{ margin-top: 20px !important; }
}

/* --- Nav restoration / normalization --- */
.site-nav,
header.site-header,
nav[role="navigation"]{
  position: static !important;   /* ensure non-sticky, non-fixed */
  top: auto !important;
  z-index: auto !important;
  display: block !important;     /* visible at all breakpoints */
  opacity: 1 !important;
  visibility: visible !important;
}

/* Remove accidental hidden states on small screens */
@media (max-width: 767.98px){
  .site-nav,
  header.site-header,
  nav[role="navigation"]{
    display: block !important;
  }
}

/* Ensure the hero does not overlap nav; keep normal flow */
.site-nav + .hero-header,
header.site-header + .hero-header,
nav[role="navigation"] + .hero-header{
  margin-top: 0; /* hero already has internal padding; do not add extra gap */
}

/* If the nav previously had a sticky class, neutralize it */
.is-sticky,
.sticky,
.nav-sticky{
  position: static !important;
}

/* Guard against negative margins pushing content under the nav */
.site-nav, header.site-header, nav[role="navigation"]{
  margin-bottom: 0 !important;
}

/* Optional: ensure tap target comfort on mobile without changing layout */
.site-nav a, header.site-header a, nav[role="navigation"] a{
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}

/* Gear page — footer blurb centered above footer (homepage match) */
.gear-footer-blurb {
  max-width: 60ch;
  margin: 16px auto 12px;   /* closer to footer */
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  opacity: .95;
  font-weight: 400;
  padding: 0 10px;
}
@media (min-width: 768px) {
  .gear-footer-blurb {
    font-size: 15px;
    margin: 20px auto 14px;
  }
}
/* Inline qty controls inside Current Stock */
.stock-list { display: grid; gap: 10px; }
.stock-list .stock-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  align-items: center; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.stock-list .stock-row__name { font-weight: 600; min-width: 0; }
.stock-list .stock-row__qtyctrl {
  display: grid; grid-auto-flow: column; align-items: center; gap: 8px;
  background: rgba(255,255,255,.06); border-radius: 999px; padding: 4px 8px;
}
.stock-list .qtybtn {
  appearance: none; border: 0; border-radius: 8px; padding: 4px 10px;
  background: rgba(255,255,255,.12); color: inherit; cursor: pointer;
  line-height: 1; font-size: 1rem; min-width: 34px;
}
.stock-list .qtybtn:focus { outline: 2px solid rgba(255,255,255,.35); outline-offset: 2px; }
.stock-list .qtyval { min-width: 1.5ch; text-align: center; font-variant-numeric: tabular-nums; }
.stock-list .stock-row__remove {
  appearance: none; border: 0; border-radius: 8px; padding: 6px 10px;
  background: rgba(255,255,255,.08); color: inherit; cursor: pointer;
}

@media (max-width: 420px){
  .stock-list .stock-row { grid-template-columns: 1fr auto; }
  .stock-list .stock-row__remove { grid-column: 1 / -1; justify-self: end; }
}

/* unified header with right-aligned toggle */
.card__hd--split { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.linklike { background:none; border:0; padding:0; color:var(--link, #87b4ff); font:inherit; cursor:pointer; }
.linklike:focus { outline:2px solid rgba(255,255,255,.35); outline-offset:2px; border-radius:6px; }

/* conditions grid */

/* ==== Cycling Coach bottom blurb — fallback to match homepage look ==== */
#cc-bottom {
  margin: 16px 0 20px;      /* same vertical rhythm as homepage blurb area */
}
#cc-bottom .home-subtext {
  font: inherit;
  font-size: var(--home-subtext-size, 0.95rem);
  line-height: var(--home-subtext-leading, 1.55);
  color: var(--text-muted, rgba(255,255,255,0.82));
  margin: 0 0 10px;
}
#cc-bottom .home-blurb {
  font: inherit;
  font-size: var(--home-blurb-size, 1.05rem);
  line-height: var(--home-blurb-leading, 1.7);
  color: var(--text-primary, #fff);
  margin: 0;
  max-width: 68ch;          /* keep readable line length like homepage */
}
@media (min-width: 768px) {
  #cc-bottom .home-subtext { font-size: var(--home-subtext-size-md, 1.0rem); }
  #cc-bottom .home-blurb   { font-size: var(--home-blurb-size-md, 1.1rem); }
}
/* Neutralize any accidental “card” or large-heading overrides in this area */
#cc-bottom .home-subtext,
#cc-bottom .home-blurb {
  font-weight: 400;
}

/* Optional: align left with page content column if a grid/container is used */
#cc-bottom {
  /* uncomment if needed to snap to the same left edge as content/cards */
  /* max-width: var(--content-max, 1100px); */
  /* margin-left: auto; margin-right: auto; */
}

/* Cycling Coach — compact left-aligned title block */
#cycling-coach .cc-title {
  /* Tucked top-left: adjust margins to match your site spacing scale */
  padding-top: 12px;
  margin: 0 0 12px 0;
}
#cycling-coach .cc-title__h1 {
  /* Smaller than homepage hero; strong, left-aligned */
  font-weight: 700;
  color: #ffffff;
  margin: 10px 0 6px 0;
  line-height: 1.2;
  /* Responsive, compact scale */
  font-size: 1.9rem;            /* desktop base */
}
@media (max-width: 768px) {
  #cycling-coach .cc-title__h1 {
    font-size: 1.6rem;          /* mobile compact */
  }
}
/* Leaf icon placeholder—existing JS can toggle content or a class on this span */
#cycling-coach .cc-title__leaf {
  display: inline-block;
  margin-left: 8px;
  opacity: 0;                   /* JS will reveal when planted is checked */
  transform: translateY(1px);
}
/* Provide a simple fade-in if JS adds a class like .is-visible; respect reduced motion */
@media (prefers-reduced-motion: no-preference) {
  #cycling-coach .cc-title__leaf {
    transition: opacity 200ms ease;
  }
}
#cycling-coach .cc-title__leaf.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Eyebrow: normal case, lighter than body but readable */
#cycling-coach .cc-title__eyebrow {
  color: #e0e0e0;               /* light gray, still bright */
  font-weight: 400;
  margin: 0 0 8px 0;
  line-height: 1.4;
  /* ~70% of H1 size visually */
  font-size: 1.33rem;
}
@media (max-width: 768px) {
  #cycling-coach .cc-title__eyebrow {
    font-size: 1.15rem;
  }
}

/* Subline: a shade darker than eyebrow for a fade-down hierarchy */
#cycling-coach .cc-title__subline {
  color: #c0c0c0;               /* slightly more muted gray */
  font-weight: 400;
  margin: 0;
  line-height: 1.6;
  /* About ~90% of body size (adjust if your base is different) */
  font-size: 0.95rem;
}
@media (min-width: 768px) {
  #cycling-coach .cc-title__subline {
    font-size: 1rem;
  }
}

/* Ensure no card/container inflates title fonts inadvertently */
#cycling-coach .cc-title,
#cycling-coach .cc-title * {
  text-rendering: optimizeLegibility;
}

/* If any global hero/heading styles are larger, neutralize them here */
#cycling-coach .cc-title__h1,
#cycling-coach .cc-title__eyebrow,
#cycling-coach .cc-title__subline {
  letter-spacing: normal;
}

/* Optional: keep the title area snug to the left content edge if a grid is used */
#cycling-coach .cc-title {
  /* If your layout uses a container class, you can align to it instead */
  /* max-width: var(--content-max, 1100px); */
  /* padding-left: var(--content-pad, 16px); */
}

#cycling-coach .cc-title__leaf::before {
  content: '\1F343';
}

body.planted-active #cycling-coach .cc-title__leaf {
  opacity: 1;
  transform: translateY(0);
}
/* Cycling Coach — tuck title to top-left and tighten grouping */
#cycling-coach .cc-title {
  /* Remove hero-like spacing; rely on the container’s own padding */
  margin: 4px 0 8px 0;     /* very small gap above & below */
  padding: 0;              /* no internal padding so it hugs the inner corner */
}
#cycling-coach .cc-title__h1 {
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin: 6px 0 2px 0;     /* tight: little top, 2px to eyebrow */
  font-size: 1.6rem;       /* compact (smaller than homepage hero) */
}
@media (min-width: 768px) {
  #cycling-coach .cc-title__h1 { font-size: 1.8rem; }
}

/* Eyebrow: light gray, very close to H1 */
#cycling-coach .cc-title__eyebrow {
  color: #e0e0e0;
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 4px 0;       /* tight gap to subline */
  font-size: 1.05rem;      /* ~70%–75% of H1 */
}

/* Subline: slightly darker gray, final line in the group */
#cycling-coach .cc-title__subline {
  color: #c0c0c0;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 6px 0;       /* small gap before Inputs card */
  font-size: 0.95rem;      /* ~90% of body */
}

/* Leaf icon next to H1 (shown when planted is checked by existing JS) */
#cycling-coach .cc-title__leaf {
  display: inline-block;
  margin-left: 6px;
  opacity: 0;              /* JS toggles visibility */
  transform: translateY(1px);
}
@media (prefers-reduced-motion: no-preference) {
  #cycling-coach .cc-title__leaf { transition: opacity 200ms ease; }
}
#cycling-coach .cc-title__leaf.is-visible { opacity: 1; }

/* Safety: prevent any global hero/section rules from adding extra spacing */
#cycling-coach .cc-title,
#cycling-coach .cc-title * { letter-spacing: normal; }

/* Optional: if a global “card” adds top margin before the Inputs card, trim it slightly */
#cycling-coach .cc-title + .card,
#cycling-coach .cc-title + section.card {
  margin-top: 8px;
}

.site-footer {
  background: #111;
  color: #fff;
  font-size: .9rem;
  padding: 20px;
  text-align: center;
}

.site-footer .community-links,
.site-footer .social-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin: 0 0 16px;
  text-align: center;
}

.site-footer .community-links a,
.site-footer .social-strip a {
  align-items: center;
  color: #fff;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  text-decoration: none;
  transition: color .25s ease, transform .15s ease;
  width: 48px;
}

.site-footer .community-links a:hover,
.site-footer .social-strip a:hover {
  color: #1e90ff;
  transform: translateY(-1px);
}

.site-footer .community-links a:focus-visible,
.site-footer .social-strip a:focus-visible {
  border-radius: 8px;
  outline: 2px solid #1e90ff;
  outline-offset: 2px;
}

.site-footer .community-links svg,
.site-footer .social-strip svg {
  display: block;
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.site-footer .social-strip .x-icon {
  color: #fff;
  width: 28px;
  height: 28px;
  transition: color .3s ease, transform .15s ease;
}

.site-footer .social-strip .x-icon:hover,
.site-footer .social-strip .x-icon:focus-visible {
  color: #1da1f2;
}

.site-footer .social-strip .x-icon svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 480px) {
  .site-footer .community-links,
  .site-footer .social-strip {
    gap: 16px;
  }

  .site-footer .community-links svg,
  .site-footer .social-strip svg {
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer .community-links a,
  .site-footer .social-strip a {
    transition: none;
  }

  .site-footer .community-links a:hover,
  .site-footer .social-strip a:hover {
    transform: none;
  }
}

.footer-links {
  margin: 4px 0 12px 0;
  font-size: .95rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
}

.footer-links a:hover {
  color: #1e90ff;
  text-decoration: underline;
}

.footer-links .dot {
  opacity: .6;
  margin: 0 .5ch;
}

.footer-note {
  margin: 0;
  line-height: 1.6;
}

.site-footer .affiliate-note {
  margin: .4rem 0 0;
  font-size: .95rem;
  text-align: center;
  opacity: .9;
  color: inherit;
}

.site-footer .affiliate-note a {
  color: inherit;
  text-decoration: underline;
}


.site-footer .under-social {
  margin: 12px 0 8px;
  text-align: center;
  font-size: .95rem;
}

.site-footer .under-social a {
  color: #1e90ff;
  text-decoration: none;
  font-weight: 500;
}

.site-footer .under-social a:hover {
  text-decoration: underline;
}

.footer-attribution {
  margin: 14px 0 0;
  font-size: .78rem;
  color: rgba(255, 255, 255, .65);
  text-align: center;
}

.footer-attribution a {
  color: rgba(173, 216, 230, .9);
  text-decoration: none;
  font-weight: 500;
}

.footer-attribution a:hover {
  color: #1e90ff;
  text-decoration: underline;
}

/* Small screens: allow icons to wrap neatly */
@media (min-width: 768px) {
  .community-links,
  .social-strip {
    gap: 20px;
  }

  .community-links svg,
  .social-strip svg {
    width: 30px;
    height: 30px;
  }
}

/* Featured Videos card heading moved inside */
.video-card h2 { margin: 0 0 8px; }
.video-card .subline { margin: 0 0 12px; opacity: .9; }

/* Pill CTA based on YouTube brand (black background) */
.yt-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.yt-cta:focus { outline: 2px solid #ffffff; outline-offset: 2px; }
.yt-cta:hover { filter: brightness(1.08); }
.yt-cta:active { transform: translateY(1px); }

/* Red play icon wrapper */
.yt-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff0033;
  border-radius: 6px;
}

.yt-cta .yt-label {
  white-space: nowrap;
}

.yt-cta .yt-icon .yt-cta-svg {
  display: block;
}

.video-card > iframe,
.video-card .embed-wrapper { margin-top: 12px; }
.video-card .now-playing { margin: 12px 0 10px; }

/* Featured video meta layout */
.video-meta{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:.5rem;
}
.video-blurb{
  margin:0;
  line-height:1.4;
}
.video-actions{
  display:flex;
  justify-content:flex-end;
}

/* Ensure spacing looks good inside the card only */
.featured-videos-card .now-playing{ margin:12px 0 4px; }
.featured-videos-card .media-divider{
  border:0;
  border-top:1px solid var(--border);
  width:100%;
  margin:4px 0 4px;
}
.card-sep {
  border: 0;
  height: 1px;
  background: rgba(255,255,255,0.25);
  margin: 12px 0 16px;
}
.featured-videos-card .video-meta{
  padding-top:.25rem;
  margin-top:0;
}

/* Card compact state */
#env-card.compact {
  padding-block: 8px;
}
#env-card.compact .card-body {
  display: none;
}
#env-card.compact .env-compact-summary[hidden] {
  display: inline;
}
#env-card .env-compact-summary {
  font-size: 0.95rem;
  opacity: 0.85;
}
#env-card .env-compact-summary[hidden] {
  display: none;
}

/* (optional) smooth transitions */
#env-card {
  transition: padding 180ms ease;
}
/* Cycling Coach — compact bottom disclaimer + blurb */
#cc-bottom {
  margin: 8px 0 10px;
  padding: 0;
  max-width: 68ch;
}
#cc-bottom .home-subtext {
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-muted, rgba(255,255,255,0.8));
  margin: 0 0 6px 0;
}
#cc-bottom .home-blurb {
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--text-primary, #fff);
  margin: 0;
}
/* Desktop slight scale up without adding height */
@media (min-width: 768px) {
  #cc-bottom .home-subtext { font-size: 0.95rem; }
  #cc-bottom .home-blurb   { font-size: 1.02rem; }
}
/* Neutralize any card/section styles that inflate spacing in this zone */
#cc-bottom p { padding: 0; }
#cc-bottom .home-subtext,
#cc-bottom .home-blurb { font-weight: 400; }

/* Ensure the block hugs the same left content line as cards */
#cycling-coach #cc-bottom { /* if a container/grid is used, it will inherit alignment */ }

/* Guard against large margins from preceding sections */
#cc-bottom:where(*) { scroll-margin-top: 24px; }

/* === TTG Cookie Consent START === */
[data-consent-banner]{display:none !important;}
[data-consent-banner].is-open{display:block !important;}
.ttg-consent{position:fixed;left:0;right:0;bottom:0;z-index:9999;display:block;background:rgba(10,14,22,.96);backdrop-filter:saturate(120%) blur(6px);border-top:1px solid rgba(255,255,255,.08);}
.ttg-consent__inner{max-width:1100px;margin:0 auto;padding:14px 16px;display:flex;flex-direction:column;gap:10px;color:#e8edf3;}
.ttg-consent__inner h3{margin:0 0 4px 0;font-size:1rem;line-height:1.2}
.ttg-consent__actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.ttg-btn{padding:8px 12px;border-radius:8px;border:1px solid transparent;font:inherit;cursor:pointer}
.ttg-btn--primary{background:#ffffff;color:#0b1526}
.ttg-btn--secondary{background:#0b1526;color:#e8edf3;border-color:rgba(255,255,255,.18)}
.ttg-btn--ghost{background:transparent;color:#e8edf3;border-color:rgba(255,255,255,.18)}
/* Modal */
.ttg-consent-modal{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;padding:24px}
.ttg-consent-modal__panel{max-width:560px;width:100%;background:#0b1526;color:#e8edf3;border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:18px}
.ttg-consent-modal__panel h3{margin:0 0 8px 0}
.ttg-row{display:flex;gap:10px;align-items:flex-start;margin:8px 0}
.ttg-consent-modal__actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
/* === TTG Cookie Consent: visibility & sizing PATCH START === */
/* Ensure anything with [hidden] is actually not rendered (some resets override it) */
[hidden] { display: none !important; }

/* Smaller checkboxes and alignment */
.ttg-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
}
/* === TTG Cookie Consent: visibility & sizing PATCH END === */
/* === TTG Cookie Consent: checkbox visibility PATCH START === */
/* Force native checkbox UI (some resets hide it) */
.ttg-row input[type="checkbox"]{
  -webkit-appearance: checkbox;
  appearance: checkbox;
  width:16px;
  height:16px;
  margin-top:3px;
  flex-shrink:0;
  cursor:pointer;
  accent-color:#ffffff; /* uses your light theme; change if you want */
}
/* Make the whole row clickable */
.ttg-row{ cursor:pointer; }
/* Prevent text-selection when tapping labels on mobile */
.ttg-row span{ user-select:none; }
/* Small, subtle status text */
.ttg-consent-status{ margin-top:8px; opacity:.8; font-size:.9rem; }
/* === TTG Cookie Consent: checkbox visibility PATCH END === */
/* === TTG Cookie Consent: forced visible checkboxes START === */
.ttg-row input[type="checkbox"]{
  /* wipe any global resets and draw our own box */
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid rgba(232, 237, 243, 0.55);   /* light border */
  background: transparent;
  position: relative;
  outline: none;
}

.ttg-row input[type="checkbox"]:focus{
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}

/* checked state: white fill + dark tick */
.ttg-row input[type="checkbox"]:checked{
  background: #ffffff;
  border-color: #ffffff;
}

.ttg-row input[type="checkbox"]:checked::after{
  content: "";
  position: absolute;
  left: 5px;     /* positions the tick */
  top: 1px;
  width: 5px;
  height: 10px;
  border-right: 2px solid #0b1526;  /* dark tick to match theme */
  border-bottom: 2px solid #0b1526;
  transform: rotate(45deg);
}

/* disabled (Essential) stays checked and muted */
.ttg-row input[type="checkbox"]:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

/* Make the whole row tappable on mobile */
.ttg-row{ cursor: pointer; }
.ttg-row span{ user-select: none; }
/* === TTG Cookie Consent: forced visible checkboxes END === */
/* === TTG Cookie Consent END === */
/* === TTG Ads (behavior fix) START === */
.ttg-adunit{
  /* Reserve space to avoid layout shifts until the ad renders */
  min-height: 250px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .7;
  margin: 16px 0;
}

ins.adsbygoogle{
  display: block;
  min-height: 250px;
  width: 100%;
}
.ttg-adunit--top{ margin-top: 12px; margin-bottom: 20px; }
.ttg-adunit--bottom{ margin-top: 24px; margin-bottom: 16px; }
.ttg-adunit--media-bottom{ margin-top: 28px; margin-bottom: 20px; }

/* Hide ad placeholders until consent is expressly granted */
.is-ads-disabled .ttg-adunit{
  display: none !important;
}

/* Large screens: center and constrain */
@media (min-width: 900px){
  .ttg-adunit{
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
  }
}
/* === TTG Ads (behavior fix) END === */

/* ===== Custom checkbox: planted tank ===== */
#cycling-coach .planted-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: #d7d7d7;
  cursor: pointer;
  user-select: none;
}

#cycling-coach .planted-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  margin: 0;
  font: inherit;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

#cycling-coach .planted-checkbox input[type="checkbox"]::before {
  content: "\2713";
  font-size: 14px;
  color: #fff;
  transform: scale(0);
  transition: transform 0.15s ease;
}

#cycling-coach .planted-checkbox input[type="checkbox"]:checked {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

#cycling-coach .planted-checkbox input[type="checkbox"]:checked::before {
  transform: scale(1);
}

#cycling-coach .planted-checkbox:hover input[type="checkbox"] {
  border-color: rgba(255, 255, 255, 0.6);
}

#cycling-coach .planted-checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

#cycling-coach .planted-checkbox .checkmark {
  display: none;
}

/* === Typography Enhancement & Contrast Adjustments === */
h1, .h1 {
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

h2, .h2 {
  font-weight: 750;
  letter-spacing: -0.005em;
  line-height: 1.18;
}

@media (max-width: 480px) {
  h1, .h1 { font-size: clamp(2rem, 6.5vw, 2.4rem); }
  h2, .h2 { font-size: clamp(1.35rem, 4.8vw, 1.6rem); }
  p { font-size: 1.05rem; line-height: 1.65; }
}

body.page-background #content .section {
  padding: clamp(48px, 10vw, 80px) 20px;
}

body.page-background #content .section--gradient {
  color: #fff;
  --muted: rgba(255,255,255,.86);
  background:
    radial-gradient(1200px 800px at 75% -10%, rgba(54,194,204,0.85) 0%, rgba(54,194,204,0) 60%),
    radial-gradient(1200px 900px at -10% 120%, rgba(0,119,199,0.95) 0%, rgba(0,119,199,0) 60%),
    linear-gradient(140deg, #0077c7 0%, #0b6ea6 40%, #0a4d87 100%);
}

body.page-background #content .section--gradient h1,
body.page-background #content .section--gradient h2,
body.page-background #content .section--gradient h3 {
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,.15);
}

body.page-background #content .section--gradient a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.page-background #content .section .container {
  width: min(980px, 100%);
  margin: 0 auto;
}

body.page-background #content .grid {
  display: grid;
  gap: var(--space-4);
}

body.page-background #content .grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

body.page-background #content .eyebrow {
  margin: var(--space-2) 0 var(--space-3);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

body.page-background #content .hero,
body.page-background #content .hero.hero--tools {
  padding: clamp(16px, 2.5vw, 28px) 20px clamp(8px, 1.5vw, 16px);
}

body.page-background #content .kicker {
  margin: var(--space-1) 0 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-intro {
  --hero-internal-gap: 6px;
  --hero-bottom-gap: 0px;
  display: grid;
  gap: var(--hero-internal-gap);
  margin-bottom: var(--hero-bottom-gap);
}

.hero-intro h1,
.hero-intro h2 {
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero-intro p,
.hero-intro .kicker {
  line-height: 1.4;
  max-width: 70ch;
}

@media (min-width: 768px) {
  .hero-intro {
    --hero-internal-gap: 8px;
    --hero-bottom-gap: 0px;
  }

  .hero-intro h1 {
    line-height: 1.12;
  }
}

.tools-grid {
  --tools-gap: 20px;
  display: grid;
  gap: var(--tools-gap);
  margin-top: 12px;
}

@media (min-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tool-card {
  border-radius: 16px;
  padding: clamp(16px, 2.2vw, 22px);
  backdrop-filter: saturate(120%) blur(0px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: grid;
  gap: 12px;
}

.tool-card h3 {
  margin: 0 0 8px 0;
}

.tool-card p {
  margin: 0 0 14px 0;
}

.tool-card-cta {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  margin-top: 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 20px rgba(4, 21, 38, 0.25);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
  backdrop-filter: blur(8px);
}

.tool-card-cta:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(4, 21, 38, 0.28);
}

.tool-card-cta:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(4, 21, 38, 0.2);
}

.tool-card-cta:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(6, 27, 49, 0.5), 0 10px 24px rgba(4, 21, 38, 0.35);
}

/* HERO — tighter vertical rhythm */
.hero,
.hero.hero--tools {
  padding-top: clamp(16px, 2.5vw, 28px);
  padding-bottom: clamp(8px, 1.5vw, 16px);
}

.hero .eyebrow {
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin: 8px 0 10px;
  line-height: 1.15;
}

.hero p.lede,
.hero .lede {
  margin: 10px 0 14px;
  max-width: 68ch;
}

.hero .cta-line {
  margin-top: 8px;
  margin-bottom: 8px;
  font-weight: 700;
}

/* Reduce gap between hero and first card */
.section--tools,
.card-grid {
  margin-top: 12px;
}

/* Card spacing tighten just a bit */
.card {
  padding: clamp(16px, 2.2vw, 22px);
}

/* Base button */
.btn,
.button,
button.btn,
button.button,
a.btn,
a.button {
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  text-align: center;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
  position: relative;
  min-width: 0;
  width: auto;
  background: transparent;
  color: inherit;
  appearance: none;
}

.btn[disabled],
.button[disabled],
a.btn[aria-disabled='true'],
a.button[aria-disabled='true'] {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:focus-visible,
.button:focus-visible,
a.btn:focus-visible,
a.button:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px #1b6fbd,
    0 12px 22px rgba(6, 42, 77, 0.20);
}

/* Primary style used for "Launch" */
.btn--launch,
.button--launch,
.card .btn,
.card a.btn {
  background: #ffffff;
  color: #0b5fa5;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.05);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--launch:hover,
.btn--launch:focus,
.card .btn:hover,
.card .btn:focus {
  background: #f7fbff;
  color: #084e8a;
  border-color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 -2px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  outline: none;
}

.btn--launch:active,
.card .btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) inset;
}

body.page-background #content .faq-list {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
}

body.page-background #content .faq-btn {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

body.page-background #content .faq-btn:hover,
body.page-background #content .faq-btn:focus-visible {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

body.page-background #content .faq-btn:active {
  transform: scale(0.99);
}

body.page-background #content .faq-answers {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

body.page-background #content .faq-answer {
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.18);
  scroll-margin-top: 96px;
}

body.page-background #content .faq-answer h3 {
  margin-top: 0;
}

@media (min-width: 640px) {
  body.page-background #content .faq-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  body.page-background #content .faq-btn {
    flex: 1 1 240px;
  }
}

/* Shared white/gradient typography helpers */
.section--brand,
.section--gradient,
.section--blue {
  color: #fff;
  --muted: rgba(255,255,255,.86);
}

.section--brand h1,
.section--brand h2,
.section--brand h3,
.section--gradient h1,
.section--gradient h2,
.section--gradient h3,
.section--blue h1,
.section--blue h2,
.section--blue h3 {
  color: #fff;
}

.section--brand a,
.section--gradient a,
.section--blue a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Tagline under product line */
.tagline {
  margin-top: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: none;
}

/* Maintain readable width for large text blocks */
.container--copy {
  max-width: 68ch;
  margin-inline: auto;
}


/* --- Compact spacing & visual refresh (v1.1.1) --- */
:root{
  /* spacing scale tuned tighter */
  --space-0: 0;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 28px;
  --space-7: 32px;
  --radius-card: 14px;
}

/* Base type rhythm */
body{
  line-height: 1.45; /* down from ~1.55–1.6 */
  letter-spacing: 0;
}

p{ 
  margin: var(--space-3) 0;           /* tighter paragraph gaps */
}

/* Headings: reduce sizes a notch on mobile, keep weight strong */
h1{
  font-weight: 800;
  line-height: 1.15;
  margin: var(--space-5) 0 var(--space-3);
  font-size: clamp(28px, 5.8vw, 40px); /* previously ~32–48px -> a bit smaller */
}
h2{
  font-weight: 800;
  line-height: 1.18;
  margin: var(--space-5) 0 var(--space-2);
  font-size: clamp(22px, 4.6vw, 30px);
}
h3{
  font-weight: 700;
  margin: var(--space-4) 0 var(--space-2);
}

/* Sections – reduce vertical padding */
.section:not(.hero),
.section--light,
.section--brand{
  padding-top: var(--space-6);   /* was larger; reduce */
  padding-bottom: var(--space-6);
}

/* Hero keeps blue gradient; just tighten spacing */
.hero .container{
  width: min(980px, 100%);
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
}

/* Content container max width feels roomy but compact */
.container{
  max-width: 980px;           /* desktop */
  padding-left: 16px;
  padding-right: 16px;
}

/* Cards (tool, contact) – reduce padding & gap */
.card,
.tool-card,
.contact-card{
  border-radius: var(--radius-card);
  padding: clamp(16px, 2.2vw, 22px);            /* was bigger */
  margin-bottom: var(--space-5);
}
.card p:last-child{ margin-bottom: 0; }

.card .actions,
.tool-card .actions{
  margin-top: var(--space-3);
}

/* FAQ – compact items */
.faq,
.faq-list{
  margin-top: var(--space-5);
}
.faq-item,
.faq .item{
  border-radius: 14px;
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
}
.faq-item h3,
.faq .q{
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}
.faq .a{
  margin-top: var(--space-2);
}

/* Lists inside content blocks */
ul,ol{ margin: var(--space-3) 0 var(--space-3) 1.25rem; }

/* Section separators (if used) – smaller gap */
.section + .section{ margin-top: var(--space-6); }

/* Footer/utility links – condense line-height slightly */
.footer,
.site-footer{
  line-height: 1.35;
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

/* Media queries – a bit tighter on very small screens */
@media (max-width: 360px){
  h1{ font-size: 26px; }
  h2{ font-size: 20px; }
  .card,
  .tool-card,
  .contact-card{ padding: var(--space-4); }
}
/* --- Tighten grouping below tools intro --- */
.tools-intro {
  margin-bottom: 0.75rem;
}
@media (min-width: 768px) {
  .tools-intro { margin-bottom: 1rem; }
}
.tools-grid, .tools-section {
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .tools-grid, .tools-section { gap: 1rem; }
}

.btn--primary,
.btn--launch {
  color: #0e3b66;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
  box-shadow:
    0 10px 18px rgba(6, 42, 77, 0.18),
    0 2px 4px rgba(6, 42, 77, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.btn--primary::before,
.btn--launch::before {
  content: "";
  position: absolute;
  inset: 6% 8% auto 8%;
  height: 38%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0));
  pointer-events: none;
}

.btn--primary:hover,
.btn--launch:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 22px rgba(6, 42, 77, 0.20),
    0 3px 6px rgba(6, 42, 77, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.85);
}

.btn--primary:active,
.btn--launch:active {
  transform: translateY(1px);
  box-shadow:
    0 4px 8px rgba(6, 42, 77, 0.18),
    inset 0 3px 6px rgba(6, 42, 77, 0.12),
    inset 0 -1px 0 rgba(255,255,255,0.6);
}

.tool-card .btn { width: 100%; }
@media (min-width: 768px) {
  .tool-card .btn { width: auto; min-width: 9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .button,
  button.btn,
  button.button,
  a.btn,
  a.button { transition: none; }
}

.tool-card .card-actions { margin-top: 0.85rem; }

.tool-card {
  padding-bottom: 1.1rem;
  margin-bottom: 0.9rem;
}
@media (min-width: 768px) {
  .tool-card { margin-bottom: 1rem; }
}

.tools-cta-line { margin-bottom: 0.75rem; }

/* ----------------------------------------------------------
   PROTOTYPE: spacing fixes apply on all sizes, incl. desktop
   ---------------------------------------------------------- */
.page-background { margin: 0; padding: 0; }

/* NAV should not contribute bottom spacing */
.page-background #global-nav,
.page-background .site-nav,
.page-background header { margin-bottom: 0 !important; }

/* HERO owns its spacing; stop margin-collapsing and kill tall min-height */
.page-background .hero {
  display: flow-root;                /* new block formatting context */
  padding-block: clamp(20px, 4vw, 48px) clamp(16px, 3vw, 32px);
  min-height: initial !important;    /* neutralize any 100vh/100dvh from globals */
}

/* Desktop: ensure no breakpoint reintroduces tall hero */
@media (min-width: 768px) {
  .page-background .hero {
    padding-block: clamp(28px, 3.5vw, 56px) clamp(18px, 3vw, 36px);
    min-height: unset !important;
  }
}

/* Tighten hero children margins so the stack doesn’t add surprise gaps */
.page-background .hero > * { margin-top: 0; }
.page-background .hero .eyebrow,
.page-background .hero .h1,
.page-background .hero h1,
.page-background .hero p { margin-block: 0.25em 0.6em; }

/* Bring “How it works” and first card up */
.page-background .tools-intro { margin: 0; padding-top: 0; margin-bottom: clamp(8px, 1.6vw, 16px); }
.page-background .tool-card,
.page-background .cards,
.page-background .tools { margin-top: 0; }

/* Use GAP for vertical rhythm so breakpoints don’t collapse margins */
.page-background main,
.page-background .proto-section-wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.2vw, 24px);
}

/* Safety: no first-child top margin inside hero */
.page-background .hero > :first-child { margin-top: 0 !important; }

/* -----------------------------------------------------------
   PROTOTYPE DESKTOP LAYOUT — do not affect live homepage
   ----------------------------------------------------------- */

/* Base container width on prototype */
.page-background .wrap,
.page-background .proto-section-wrap,
.page-background .container {
  max-width: 1080px;                /* matches live width */
  margin-inline: auto;
  padding-inline: clamp(16px, 2.2vw, 24px);
}

/* Ensure main doesn’t force a single-column flex on desktop */
@media (min-width: 768px) {
  .page-background main,
  .page-background .proto-section-wrap {
    display: block;                  /* stop global flex column from locking mobile layout */
    gap: 0;                          /* gap no longer needed when block */
  }
}

/* Cards grid: switch stacked cards to 2-col on tablet/desktop */
.page-background .tools,
.page-background .tools-grid,
.page-background .cards {
  display: grid;
  grid-template-columns: 1fr;        /* mobile default: one column */
  gap: clamp(14px, 2vw, 24px);
}

/* Two columns from 900px up; breathing room */
@media (min-width: 900px) {
  .page-background .tools,
  .page-background .tools-grid,
  .page-background .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/* Guard: card blocks should stretch and not set fixed widths */
.page-background .tool-card {
  width: auto;
  max-width: none;
  margin: 0;                         /* grid controls spacing */
}

.page-background .tool-card .tool-card-cta {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 0.9rem 1.25rem;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(5, 12, 28, 0.35);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.page-background .tool-card .tool-card-cta:hover,
.page-background .tool-card .tool-card-cta:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 14px 30px rgba(5, 12, 28, 0.4);
}

.page-background .tool-card .tool-card-cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
}

.page-background .tool-card .tool-card-cta:active {
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(5, 12, 28, 0.3);
  background: rgba(255, 255, 255, 0.2);
}

/* Keep the nice hero spacing we added but avoid huge desktop gaps */
@media (min-width: 900px) {
  .page-background .hero {
    padding-block: clamp(28px, 3.5vw, 56px) clamp(18px, 3vw, 36px);
    min-height: unset !important;    /* ensure no 100vh creeps in at desktop */
  }
  .page-background .tools-intro {
    margin-bottom: clamp(10px, 1.6vw, 18px);
  }
}

/* Safety: if any legacy rule sets fixed widths on cards, neutralize */
.page-background .tool-card[style*="width"],
.page-background .tool-card[style*="max-width"] {
  width: auto !important;
  max-width: none !important;
}

/* Prototype: ensure hero paragraph is left-aligned; no spacing/visual changes */
.page-background .hero p {
  text-align: left !important;
}

/* Prototype: hero text alignment and bold eyebrow */
.page-background .hero-copy {
  text-align: left;
}
.page-background .hero-copy .eyebrow {
  font-weight: 700;
  margin-bottom: 0.5em;
}

/* Homepage hero + tool cards: force pure white text for accessibility */
.page-background .hero h1,
.page-background .hero h2,
.page-background .hero h3,
.page-background .hero p,
.page-background .hero a,
.page-background .hero button,
.page-background .hero .ttg-btn,
.page-background .hero .cta-btn,
.page-background .hero .how-trigger,
.page-background .hero .tool-card-cta,
.page-background .hero-section h1,
.page-background .hero-section h2,
.page-background .hero-section h3,
.page-background .hero-section p,
.page-background .hero-section a,
.page-background .hero-section button,
.page-background .hero-container h1,
.page-background .hero-container h2,
.page-background .hero-container h3,
.page-background .hero-container p,
.page-background .hero-container a,
.page-background .hero-container button {
  color: #ffffff !important;
}

.page-background .tools-title,
.page-background .homepage-tools-section h2,
.page-background .homepage-tools-section h3,
.page-background .homepage-tools-section p,
.page-background .homepage-tools-section a,
.page-background .homepage-tools-section button,
.page-background .tool-card h2,
.page-background .tool-card h3,
.page-background .tool-card p,
.page-background .tool-card a,
.page-background .tool-card button,
.page-background .tool-card .ttg-btn,
.page-background .tool-card .cta-btn,
.page-background .tool-card .tool-card-cta,
.page-background .tool-card .card-button,
.page-background .tools .cta-btn,
.page-background .tools .ttg-btn {
  color: #ffffff !important;
}
.legal-links {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--muted-text, #a0a0a0);
}

.legal-links a {
  margin: 0 12px;
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
}

.legal-links a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* -----------------------------------------------------------
   HERO "HOW IT WORKS" MODAL (live homepage)
   ----------------------------------------------------------- */
.how-it-works-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 60px);
  background: rgba(3, 12, 26, 0.68);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease;
}

.how-it-works-overlay[hidden] {
  display: none !important;
}

.how-it-works-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.how-it-works-modal {
  background: rgba(4, 12, 26, 0.96);
  color: inherit;
  width: min(640px, 100%);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  border-radius: 18px;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 24px 50px rgba(3, 6, 12, 0.55),
    0 2px 12px rgba(3, 6, 12, 0.35);
}

.how-it-works-modal:focus {
  outline: 3px solid #1b6fbd;
  outline-offset: 3px;
}

.how-it-works-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.how-it-works-modal__close {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.how-it-works-modal__close:hover,
.how-it-works-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

.how-it-works-modal__body {
  display: grid;
  gap: 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

.how-it-works-modal__body strong {
  color: inherit;
}

.how-it-works-modal__cta {
  font-weight: 600;
  margin-bottom: 0;
}

.how-it-works-modal__footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.page-background.body--modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .how-it-works-overlay {
    align-items: flex-start;
    padding-top: clamp(40px, 10vh, 80px);
  }

  .how-it-works-modal {
    max-height: calc(100vh - clamp(40px, 10vh, 80px));
  }
}

/* ===== Homepage FAQ Cards ===== */
#beginner-faq {
  margin-top: 3rem;
}

#beginner-faq h2 {
  margin-bottom: 1.75rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.faq-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(6px);
}

.faq-card summary {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.faq-card details p {
  margin-top: 0.75rem;
  line-height: 1.55;
}

.card-button {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  margin-top: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.2s ease, transform 0.15s ease;
}

.card-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.card-button:active {
  transform: translateY(0px);
}

.card-button:focus {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}
/*
 * Shared utility styles extracted for theme and interactive pages.
 * Includes consolidated layout helpers and tooltip visuals.
 */

body.theme-media *,
body.theme-media *::before,
body.theme-media *::after,
body.uni-bg *,
body.uni-bg *::before,
body.uni-bg *::after,
body.theme-media.university *,
body.theme-media.university *::before,
body.theme-media.university *::after {
  box-sizing: border-box;
}

/* Inline tooltip presentation used by Cycling Coach, Stocking, etc. */
.ttg-tooltip {
  position: fixed;
  z-index: 1600;
  background: rgba(12, 16, 26, 0.95);
  color: #e9eef5;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-radius: 9px;
  padding: 10px 12px;
  max-width: min(320px, calc(100vw - 32px));
  font-size: 0.92rem;
  line-height: 1.45;
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.ttg-tooltip[data-open='true'] {
  pointer-events: auto;
}

.ttg-tooltip[hidden] {
  display: none !important;
}

.ttg-tooltip__title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 6px;
}

.ttg-tooltip__body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ttg-tooltip__body + .ttg-tooltip__body {
  margin-top: 6px;
}

.ttg-tooltip__list {
  margin: 8px 0 0 18px;
  padding: 0;
  list-style: disc;
}

.ttg-tooltip__list > li + li {
  margin-top: 4px;
}

/* Trigger styling adopted by Cycling Coach buttons */
.ttg-tooltip-trigger {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.ttg-tooltip-trigger:focus-visible {
  outline: none;
}

html.ttg-tooltip-lock,
body.ttg-tooltip-lock {
  overflow: hidden;
}
#stocking-page .tank-size-card .row.toggle-row .row-right {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

#stocking-page .tank-size-card .row.toggle-row #filtration-trigger {
  flex: 0 0 auto;
}

#stocking-page .tank-size-card .row.toggle-row .planted-row {
  flex: 0 0 auto;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control {
  display: grid;
  gap: 10px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  width: 100%;
  flex: 1 1 320px;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-input,
#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-product-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted, rgba(235, 239, 251, 0.78));
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field {
  display: flex;
  gap: 8px;
  align-items: center;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field input {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field input[readonly] {
  cursor: not-allowed;
  opacity: 0.7;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field input[readonly]::placeholder {
  color: rgba(235, 239, 251, 0.65);
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field input:focus {
  outline: 2px solid rgba(20, 203, 168, 0.55);
  outline-offset: 2px;
}

#stocking-page #stock-list-card.is-updated {
  box-shadow: 0 0 0 1px rgba(61, 220, 132, 0.35), 0 22px 44px -26px rgba(20, 203, 168, 0.5);
}

#stocking-page #plan-add.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
}

#stocking-page #plan-add.is-loading::after {
  content: '';
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: rgba(255, 255, 255, 0.75);
  animation: ttg-spin 0.8s linear infinite;
}

#stocking-page #plan-add.is-loading span,
#stocking-page #plan-add.is-loading strong {
  opacity: 0.6;
}

@keyframes ttg-spin {
  to {
    transform: rotate(360deg);
  }
}

#stocking-page .stock-list [data-row-id] {
  position: relative;
  border-radius: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#stocking-page .stock-list [data-row-id].is-updated {
  box-shadow: 0 0 0 1px rgba(61, 220, 132, 0.38), 0 12px 22px -16px rgba(20, 203, 168, 0.45);
  transform: translateY(-1px);
}

#stocking-page .stock-list [data-row-id].is-updated::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.95rem;
  color: rgba(61, 220, 132, 0.95);
  text-shadow: 0 0 6px rgba(13, 178, 120, 0.4);
  pointer-events: none;
}

#stocking-page .stock-list [data-row-id] .stock-row__remove {
  position: relative;
  z-index: 1;
}

#stocking-page .tank-size-card .row.toggle-row .filter-product-field .select-wrap {
  position: relative;
}

#stocking-page .tank-size-card .row.toggle-row .filter-product-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  appearance: none;
}

#stocking-page .tank-size-card .row.toggle-row .filter-product-field select:focus {
  outline: 2px solid rgba(20, 203, 168, 0.55);
  outline-offset: 2px;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-note,
#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-product-note,
#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta {
  font-size: 0.78rem;
  color: var(--muted, rgba(235, 239, 251, 0.78));
  margin: 0;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta strong,
#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta span {
  font-weight: 600;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta .filter-turnover {
  font-size: 0.84rem;
  color: var(--fg, #eef3ff);
}

@media (max-width: 720px) {
  #stocking-page .tank-size-card .row.toggle-row .row-right {
    align-items: stretch;
    gap: 12px;
  }

  #stocking-page .tank-size-card .row.toggle-row .filter-flow-control {
    grid-template-columns: 1fr;
    flex: 1 1 100%;
  }

  #stocking-page .tank-size-card .row.toggle-row #filtration-trigger {
    width: 100%;
  }
}

#filtration-trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.filter-trigger-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.filter-trigger-button:hover,
.filter-trigger-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  outline: none;
}

.filter-trigger-button.is-open {
  background: rgba(255, 255, 255, 0.14);
}

.filter-trigger-button[data-warning="true"] {
  border-color: rgba(255, 100, 92, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 100, 92, 0.35);
}

.filter-trigger-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.filter-trigger-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  opacity: 0.78;
  flex-wrap: wrap;
}

.filter-trigger-summary-text {
  white-space: nowrap;
}

.filter-trigger-summary .info-btn {
  --info-btn-visible: 30px;
  transform: none;
  font-size: 0.95rem;
}

.filter-trigger-chevron {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.filter-trigger-button.is-open .filter-trigger-chevron {
  transform: rotate(180deg);
}

@media (max-width: 600px) {
  .filter-trigger-summary-text {
    white-space: normal;
  }
}

.filter-drawer-host {
  width: 100%;
  margin-top: 12px;
}

.filter-drawer {
  margin-top: 4px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--panel, rgba(255, 255, 255, 0.06));
  box-shadow: 0 18px 28px -24px rgba(10, 14, 28, 0.45);
}

.filter-drawer__intro {
  margin-bottom: 14px;
}

.filter-drawer__title {
  margin: 0 0 4px;
  font-size: 1rem;
}

.filter-drawer__desc {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(235, 239, 251, 0.78);
}

.filter-drawer__rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-drawer__row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(120px, 160px) auto;
  gap: 12px;
  align-items: end;
}

.filter-field label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(235, 239, 251, 0.72);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.filter-field select,
.filter-field input[type="number"] {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 0 12px;
  font-size: 0.92rem;
}

.filter-field input[type="number"]::-webkit-outer-spin-button,
.filter-field input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
}

.filter-row-remove {
  align-self: center;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(235, 239, 251, 0.9);
  border-radius: 10px;
  font-size: 1.1rem;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.filter-row-remove[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.filter-row-remove:not([aria-disabled="true"]):hover,
.filter-row-remove:not([aria-disabled="true"]):focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.filter-drawer__add {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: transparent;
  color: inherit;
  padding: 10px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.filter-drawer__add:hover,
.filter-drawer__add:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.filter-drawer__results {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 10px;
}

.filter-result-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.filter-result-line span:first-child {
  color: rgba(235, 239, 251, 0.7);
}

.filter-result-line span:last-child {
  font-weight: 600;
}

.filter-result-status {
  display: flex;
  justify-content: flex-start;
}

.filter-result-status .chip {
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .filter-drawer__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }
  .filter-drawer__row .filter-row-remove {
    grid-column: span 2;
    justify-self: flex-end;
  }
}

@media (max-width: 520px) {
  #stocking-page .tank-size-card .row.toggle-row .row-right {
    justify-content: flex-start;
  }
  #filtration-trigger {
    align-items: flex-start;
  }
  .filter-drawer {
    padding: 16px;
  }
}
/* Stocking Advisor aggregated styles (migrated from prototype) */
/* Stocking Advisor base styles */
:root {
  color-scheme: dark;
}

body.prototype-stock-page {
  --fg: #eef3ff;
  --muted: rgba(223, 233, 255, 0.82);
  --card: rgba(12, 20, 36, 0.82);
  --card-raised: rgba(16, 26, 46, 0.9);
  --panel: var(--card);
  --line: rgba(135, 170, 228, 0.28);
  --chip: rgba(223, 237, 255, 0.18);
  --chip-border: rgba(223, 237, 255, 0.38);
  --chip-warn-border: rgba(244, 180, 0, 0.55);
  --chip-bad-border: rgba(255, 100, 92, 0.6);
  --chip-warn-text: #f4d48a;
  --chip-bad-text: #ffb3b0;
  --info-btn-bg: rgba(223, 237, 255, 0.12);
  --info-btn-bg-hover: rgba(223, 237, 255, 0.18);
  --info-btn-bg-active: rgba(223, 237, 255, 0.14);
  --info-btn-border: rgba(223, 237, 255, 0.24);
  --info-btn-border-hover: rgba(223, 237, 255, 0.32);
  --info-btn-border-active: rgba(223, 237, 255, 0.28);
  --info-btn-focus: rgba(20, 203, 168, 0.7);
  --ghost: rgba(225, 236, 255, 0.32);
  --bar-bg: rgba(223, 237, 255, 0.2);
  --ok: #12c278;
  --warn: #f4b400;
  --bad: #ff645c;
  --ok-soft: rgba(18, 194, 120, 0.25);
  --warn-soft: rgba(244, 180, 0, 0.22);
  --bad-soft: rgba(255, 100, 92, 0.26);
  --shadow: rgba(5, 12, 28, 0.68);
  --shadow-base: rgba(5, 12, 28, 0.68);
  --popover-bg: rgba(6, 12, 24, 0.96);
  --link: #8ec5ff;
}

/* Environmental meters */
body.prototype-stock-page #env-bars,
body.prototype-stock-page .env-bars {
  display: grid;
  gap: clamp(12px, 2vw, 18px);
  margin-top: 12px;
}

body.prototype-stock-page .env-bars--xl {
  gap: 10px;
}

body.prototype-stock-page #env-bars .bioagg-card,
body.prototype-stock-page .env-bars .bioagg-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card-raised);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 24px 50px -36px var(--shadow-base);
  backdrop-filter: blur(10px);
}

body.prototype-stock-page .env-bar,
body.prototype-stock-page #env-bars .env-bar,
body.prototype-stock-page .bar-row {
  border-radius: 16px;
  background: rgba(223, 237, 255, 0.05);
  border: 1px solid rgba(223, 237, 255, 0.12);
  padding: 14px 16px;
  box-shadow: 0 18px 34px -28px var(--shadow-base);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.prototype-stock-page .env-bar--xl {
  background: rgba(223, 237, 255, 0.08);
  border-color: rgba(223, 237, 255, 0.2);
  border-radius: 14px;
  padding: 10px 12px;
  gap: 8px;
}

body.prototype-stock-page .env-bar__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.prototype-stock-page .env-bar__label,
body.prototype-stock-page .metric-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.88rem;
  color: var(--muted);
}

body.prototype-stock-page .env-bar__value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.96rem;
}

body.prototype-stock-page .env-bar__track,
body.prototype-stock-page .meter-track,
body.prototype-stock-page .progress-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(223, 237, 255, 0.18);
  overflow: hidden;
}

body.prototype-stock-page .env-bar--xl .env-bar__track,
body.prototype-stock-page .env-bar--xl .meter-track,
body.prototype-stock-page .env-bar--xl .progress-track {
  height: 8px;
}

body.prototype-stock-page .env-bar__fill {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #20fdd9, #47a6ff);
  transition: width 0.3s ease, background 0.3s ease;
}

body.prototype-stock-page .env-bar__chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.prototype-stock-page .chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.prototype-stock-page .chips:empty {
  display: none;
}

body.prototype-stock-page .chip {
  background: var(--chip);
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.92rem;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

body.prototype-stock-page .chip[data-tone="warn"] {
  border-color: var(--chip-warn-border);
  color: var(--chip-warn-text);
}

body.prototype-stock-page .chip[data-tone="bad"] {
  border-color: var(--chip-bad-border);
  color: var(--chip-bad-text);
}

body.prototype-stock-page .chip__icon {
  font-size: 0.9em;
  line-height: 1;
}

body.prototype-stock-page .chip__text {
  display: inline;
}

body.theme-dark.prototype-stock-page {
  background: var(--page-bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  min-height: 100vh;
  background-attachment: fixed;
}



.prototype-stock-page .info-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 0.5rem;
  overflow: visible;
  isolation: isolate;
}

.prototype-stock-page .info-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.prototype-stock-page .info-inline .info-trigger {
  margin-inline-start: 0;
}

.prototype-stock-page .info-badge,
body.prototype-stock-page .info-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

body.prototype-stock-page .proto-info-tooltip {
  position: absolute;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(6, 12, 24, 0.96);
  border: 1px solid rgba(163, 200, 255, 0.32);
  color: rgba(238, 243, 255, 0.92);
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 18px 36px rgba(4, 10, 30, 0.4);
  z-index: 1100;
  pointer-events: auto;
}

body.prototype-stock-page .proto-info-tooltip[hidden] {
  display: none !important;
}

body.prototype-stock-page .proto-info-tooltip__body {
  margin: 0;
}

.prototype-stock-page .card-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.prototype-stock-page .card-title-row .card-title {
  margin: 0;
}

.prototype-stock-page .info-btn {
  --info-btn-hit: 44px;
  --info-btn-visible: 30px;
  --info-btn-bg: rgba(255, 255, 255, 0.12);
  --info-btn-bg-hover: rgba(255, 255, 255, 0.18);
  --info-btn-bg-active: rgba(255, 255, 255, 0.14);
  --info-btn-border: rgba(255, 255, 255, 0.24);
  --info-btn-border-hover: rgba(255, 255, 255, 0.32);
  --info-btn-border-active: rgba(255, 255, 255, 0.28);
  --info-btn-focus: rgba(20, 203, 168, 0.7);
  --info-btn-icon: rgba(238, 243, 255, 0.95);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--info-btn-hit);
  height: var(--info-btn-hit);
  border: 0;
  padding: 0;
  background: none;
  color: var(--info-btn-icon);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.prototype-stock-page .info-btn::before {
  content: '';
  position: absolute;
  inset: 50%;
  width: var(--info-btn-visible);
  height: var(--info-btn-visible);
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--info-btn-bg);
  border: 1px solid var(--info-btn-border);
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  z-index: -1;
}

.prototype-stock-page .info-btn:hover::before,
.prototype-stock-page .info-btn:focus-visible::before {
  background: var(--info-btn-bg-hover);
  border-color: var(--info-btn-border-hover);
}

.prototype-stock-page .info-btn:active::before {
  background: var(--info-btn-bg-active);
  border-color: var(--info-btn-border-active);
}

.prototype-stock-page .info-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(8, 13, 24, 0.85), 0 0 0 4px var(--info-btn-focus);
}

.prototype-stock-page .info-btn.is-open,
.prototype-stock-page [data-info-open='true'] .info-btn {
  color: #0b1b18;
}

.prototype-stock-page .info-btn.is-open::before,
.prototype-stock-page [data-info-open='true'] .info-btn::before {
  background: rgba(20, 203, 168, 0.9);
  border-color: rgba(20, 203, 168, 0.95);
  box-shadow: 0 0 0 1px rgba(20, 203, 168, 0.55);
}

.prototype-stock-page [data-info-pop] {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: calc(100% + 8px);
  padding: 14px 16px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 26, 44, 0.98), rgba(10, 16, 30, 0.96));
  border: 1px solid rgba(163, 200, 255, 0.2);
  box-shadow: 0 14px 40px rgba(4, 10, 30, 0.45);
  color: rgba(235, 243, 255, 0.92);
  max-inline-size: min(22rem, 90vw);
  transform-origin: top center;
  transform: translateY(-4px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 220;
}

.prototype-stock-page [data-info-pop].is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.prototype-stock-page [data-info-pop][data-info-placement='top'] {
  transform-origin: bottom center;
}

.prototype-stock-page [data-info-pop][hidden] {
  display: none !important;
}

.prototype-stock-page .info-popover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-end: 0.5rem;
}

.prototype-stock-page .info-popover__header strong {
  font-size: 0.95rem;
  color: rgba(244, 248, 255, 0.98);
}

.prototype-stock-page .info-popover__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.prototype-stock-page .info-popover__header .info-popover__close ~ .info-popover__close,
.prototype-stock-page .info-popover__header .info-popover__close ~ [data-close="popover"],
.prototype-stock-page .info-popover__header [data-close="popover"] ~ [data-close="popover"],
.prototype-stock-page .info-popover__header button[aria-label="Close"] ~ button[aria-label="Close"] {
  display: none !important;
}

.prototype-stock-page .info-popover__close:hover,
.prototype-stock-page .info-popover__close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}

.prototype-stock-page .info-popover__close:focus-visible {
  outline: 2px solid rgba(163, 200, 255, 0.55);
  outline-offset: 2px;
}

.prototype-stock-page [data-info-pop] p,
.prototype-stock-page [data-info-pop] li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(235, 243, 255, 0.88);
}

.prototype-stock-page [data-info-pop] ul {
  margin: 0;
  padding-inline-start: 1.1rem;
  display: grid;
  gap: 0.45rem;
  list-style: disc;
}

.prototype-stock-page [data-info-scope] {
  overflow: visible;
}

.prototype-stock-page #stock-list-card,
.prototype-stock-page #stock-list-card .card-header,
.prototype-stock-page #env-card,
.prototype-stock-page #env-card .card-header,
.prototype-stock-page #tank-size-card,
.prototype-stock-page #tank-size-card .card-header {
  position: relative;
  overflow: visible;
}

.prototype-stock-page .card {
  position: relative;
  overflow: visible;
}

@media (min-width: 640px) {
  .prototype-stock-page [data-info-pop] {
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: max-content;
    min-inline-size: 16rem;
    max-inline-size: 22rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prototype-stock-page .info-btn,
  .prototype-stock-page [data-info-pop] {
    transition: none;
  }
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
}

main.stocking-page {
  position: relative;
  isolation: isolate;
  padding-bottom: 96px;
}

.advisor-overview {
  margin: 24px 0 48px;
  display: grid;
  gap: 16px;
}

.sa-proto-block {
  display: grid;
  gap: 14px;
  padding: 12px 0;
}

.sa-proto-block + .sa-proto-block {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}

.advisor-overview h2,
.advisor-overview h3 {
  color: #f6f9ff;
  margin-top: 0;
}

.advisor-overview p,
.advisor-overview li {
  color: rgba(238, 243, 255, 0.85);
  line-height: 1.7;
}

.advisor-overview a {
  color: #88c7ff;
  font-weight: 600;
  text-decoration-thickness: 2px;
}

.ad-hero {
  text-align: center;
  margin: 1.5rem 0;
}

.ad-label:not(.sr-only) {
  display: inline-block;
  background: var(--accent-dark, #1a237e);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.advisor-faq details {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(10, 18, 36, 0.6);
  padding: 16px 20px;
  margin-bottom: 14px;
}

.advisor-faq summary {
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
}

.advisor-faq summary:focus-visible {
  outline: 2px solid #5bbcff;
  outline-offset: 4px;
}

.advisor-faq p {
  margin: 12px 0 0;
}

.notice-box {
  border-left: 3px solid #3ddc84;
  padding: 16px 20px;
  background: rgba(24, 40, 32, 0.65);
  border-radius: 12px;
  margin: 24px 0;
}

@media (max-width: 720px) {
  .advisor-overview {
    padding: 24px;
  }

}

/* === Prototype-only How It Works modal trigger === */
.sa-proto-how-header {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.sa-proto-how-trigger,
.sa-proto-howitworks-trigger {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(12, 20, 36, 0.65);
  color: #f5f9ff;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sa-proto-how-trigger:hover,
.sa-proto-how-trigger:focus-visible,
.sa-proto-howitworks-trigger:hover,
.sa-proto-howitworks-trigger:focus-visible {
  background: rgba(59, 117, 217, 0.55);
  border-color: rgba(163, 200, 255, 0.85);
  color: #ffffff;
  outline: none;
}

.sa-proto-how-trigger:focus-visible,
.sa-proto-howitworks-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.35);
}

@media (max-width: 640px) {
  .sa-proto-how-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sa-proto-how-trigger,
  .sa-proto-howitworks-trigger {
    width: 100%;
    text-align: center;
  }
}

/* === Prototype-only modal === */
.sa-proto-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(5, 10, 22, 0.76);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.sa-proto-modal-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.sa-proto-modal-panel {
  max-width: 640px;
  min-width: min(520px, 100%);
  width: min(640px, 100%);
  background: linear-gradient(180deg, rgba(12, 20, 36, 0.98), rgba(8, 12, 24, 0.98));
  border: 1px solid rgba(163, 200, 255, 0.25);
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(4, 10, 30, 0.5);
  padding: 28px;
  color: #f2f6ff;
}

.sa-proto-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.sa-proto-modal-header h2 {
  margin: 0;
  font-size: 1.6rem;
  color: #ffffff;
}

.sa-proto-modal-close {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(14, 22, 38, 0.7);
  color: #ffffff;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sa-proto-modal-close:hover,
.sa-proto-modal-close:focus-visible {
  background: rgba(163, 200, 255, 0.35);
  border-color: rgba(163, 200, 255, 0.85);
  color: #ffffff;
  outline: none;
}

.sa-proto-modal-close:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.35);
}

.sa-proto-modal-body {
  display: grid;
  gap: 16px;
  font-size: 1rem;
  line-height: 1.6;
}

.sa-proto-modal-body ol {
  padding-left: 22px;
  margin: 0;
  display: grid;
  gap: 10px;
}

.sa-proto-modal-body p {
  margin: 0;
  color: rgba(238, 243, 255, 0.9);
}

.sa-proto-modal-helper {
  font-style: italic;
  color: #cbe4ff;
}

@media (max-width: 640px) {
  .sa-proto-modal-backdrop {
    padding: 16px;
  }

  .sa-proto-modal-panel {
    width: 100%;
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sa-proto-modal-backdrop,
  .sa-proto-modal-panel,
  .sa-proto-how-trigger,
  .sa-proto-modal-close {
    transition: none;
  }
}

body.sa-proto-modal-open {
  overflow: hidden;
}

.sa-proto-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;
}

/* === Prototype-only tooltip === */
.sa-proto-tank-size-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sa-proto-tooltip-trigger {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(12, 20, 36, 0.65);
  color: #ffffff;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sa-proto-tooltip-trigger:hover,
.sa-proto-tooltip-trigger:focus-visible {
  background: rgba(59, 117, 217, 0.55);
  border-color: rgba(163, 200, 255, 0.85);
  color: #ffffff;
  outline: none;
}

.sa-proto-tooltip-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.35);
}

.sa-proto-tooltip {
  margin-top: 10px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(12, 20, 36, 0.9);
  border: 1px solid rgba(163, 200, 255, 0.25);
  color: rgba(238, 243, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 12px 28px rgba(4, 10, 30, 0.35);
}

.sa-proto-tooltip p {
  margin: 0;
}

/* === Prototype-only Feature CTA === */
.sa-proto-feature-cta,
.sa-proto-feature {
  margin-top: 28px;
  padding: 24px 28px;
  border-radius: 16px;
  background: rgba(12, 22, 38, 0.82);
  border: 1px solid rgba(163, 200, 255, 0.2);
  display: grid;
  gap: 14px;
}

.sa-proto-feature-cta h3,
.sa-proto-feature h3 {
  margin: 0;
  font-size: 1.35rem;
  color: #ffffff;
}

.sa-proto-feature-cta p,
.sa-proto-feature p {
  margin: 0;
  color: rgba(238, 243, 255, 0.85);
  line-height: 1.6;
}

.sa-proto-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sa-proto-feature-primary,
.sa-proto-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59, 117, 217, 0.85), rgba(20, 203, 168, 0.85));
  color: #0a1020;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(163, 200, 255, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sa-proto-feature-primary:hover,
.sa-proto-feature-primary:focus-visible,
.sa-proto-button:hover,
.sa-proto-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(14, 110, 196, 0.35);
  outline: none;
}

.sa-proto-feature-primary:focus-visible,
.sa-proto-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.45);
}

.sa-proto-feature-secondary,
.sa-proto-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(163, 200, 255, 0.35);
  color: #e5f0ff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.sa-proto-feature-secondary:hover,
.sa-proto-feature-secondary:focus-visible,
.sa-proto-link:hover,
.sa-proto-link:focus-visible {
  background: rgba(59, 117, 217, 0.35);
  border-color: rgba(163, 200, 255, 0.85);
  outline: none;
}

.sa-proto-feature-secondary:focus-visible,
.sa-proto-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.35);
}

@media (max-width: 640px) {
  .sa-proto-feature-cta {
    padding: 22px;
  }

  .sa-proto-feature-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sa-proto-feature-primary,
  .sa-proto-feature-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* PROTOTYPE-ONLY */
#stocking-page .proto-inline-controls {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

#stocking-page .proto-inline-controls[data-role="filter-product-controls"] {
  margin-top: 10px;
}

#stocking-page .proto-inline-controls__field {
  flex: 1 1 0%;
  min-width: 0;
}

#stocking-page .proto-inline-controls__field--type {
  flex: 0 0 180px;
}

#stocking-page .proto-inline-controls--flow {
  margin-top: 6px;
}

#stocking-page .proto-inline-controls--flow .filter-flow-input__field {
  flex: 1 1 160px;
}

#stocking-page .proto-inline-controls select,
#stocking-page .proto-inline-controls input {
  height: 44px;
}

#stocking-page .filter-setup {
  margin-top: 0.5rem;
}

#stocking-page .filter-setup .muted {
  opacity: 0.8;
  margin: 0 0 0.5rem;
}

#stocking-page .filter-setup__row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

#stocking-page .fs-input {
  height: 44px;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  min-width: 0;
}

#stocking-page .fs-select {
  width: 160px;
}

#stocking-page .fs-gph {
  width: 120px;
}

#stocking-page #fs-add-custom {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 2px 6px rgba(6, 12, 24, 0.3);
  color: var(--fg, #eef3ff) !important;
  -webkit-text-fill-color: var(--fg, #eef3ff) !important;
  font-weight: 600;
}

#stocking-page #fs-add-custom:not([disabled]):hover,
#stocking-page #fs-add-custom:not([disabled]):focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 6px 12px rgba(8, 15, 30, 0.35);
}

#stocking-page #fs-add-custom[aria-disabled="true"],
#stocking-page #fs-add-custom:disabled {
  opacity: 1;
  color: rgba(238, 243, 255, 0.78) !important;
  -webkit-text-fill-color: rgba(238, 243, 255, 0.78) !important;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

#stocking-page .btn-compact {
  height: 44px;
  padding: 0 0.9rem;
  border-radius: 12px;
}

@media (max-width: 420px) {
  #stocking-page .fs-select {
    flex: 1 1 140px;
  }

  #stocking-page .fs-gph {
    flex: 0 0 110px;
  }

  #stocking-page #fs-add-custom {
    flex: 0 0 auto;
  }
}

#stocking-page .hint {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  opacity: 0.75;
}

#stocking-page .proto-add-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.95rem;
  height: 44px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

#stocking-page .proto-add-button--primary {
  background: rgba(59, 117, 217, 0.55);
  border-color: rgba(163, 200, 255, 0.65);
  box-shadow: 0 2px 6px rgba(59, 117, 217, 0.25);
}

#stocking-page .proto-add-button--primary:hover,
#stocking-page .proto-add-button--primary:focus-visible {
  background: rgba(74, 140, 242, 0.65);
  border-color: rgba(180, 215, 255, 0.9);
}

#stocking-page .proto-add-button:hover,
#stocking-page .proto-add-button:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
}

#stocking-page .proto-add-button:focus-visible {
  outline: 2px solid rgba(163, 200, 255, 0.6);
  outline-offset: 2px;
}

#stocking-page .proto-add-button[disabled],
#stocking-page .proto-add-button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

@media (max-width: 600px) {
  #stocking-page .proto-inline-controls {
    flex-direction: column;
    align-items: stretch;
  }

  #stocking-page .proto-inline-controls__field,
  #stocking-page .proto-inline-controls__field--type {
    flex: 1 1 auto;
  }

  #stocking-page .proto-add-button {
    width: 100%;
  }
}

#post-results-explainer.ttg-explainer--bg {
  background: transparent;
  padding: var(--space-8) 0;
  margin: 0;
}

#post-results-explainer h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  font-size: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
  line-height: 1.2;
}

#post-results-explainer h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  font-size: clamp(1.0625rem, 0.95rem + .5vw, 1.25rem);
  line-height: 1.25;
}

#post-results-explainer p {
  max-width: 72ch;
  opacity: .9;
}

/* spacing harmony with ad slot */
.ad-slot--footer + #post-results-explainer,
.ad-container + #post-results-explainer,
.ad-slot-placeholder + #post-results-explainer {
  margin-top: var(--space-8);
}
#stocking-page .proto-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

#stocking-page .proto-filter-empty {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

#stocking-page .proto-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px var(--shadow);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#stocking-page .proto-filter-chip[data-source="custom"] {
  background: rgba(20, 203, 168, 0.12);
  border-color: rgba(20, 203, 168, 0.22);
}

#stocking-page .proto-filter-chip__icon {
  font-size: 0.9rem;
  opacity: 0.85;
}

#stocking-page .proto-filter-chip__label {
  font-weight: 600;
  white-space: nowrap;
}

#stocking-page .proto-filter-chip__gph {
  font-size: 0.85rem;
  color: var(--muted);
}

#stocking-page .proto-filter-chip__remove {
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

#stocking-page .proto-filter-chip__remove:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

#stocking-page .proto-filter-chip__remove:hover,
#stocking-page .proto-filter-chip__remove:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

#stocking-page .proto-filter-chip__remove:active {
  background: rgba(255, 255, 255, 0.24);
}

#stocking-page .proto-filter-summary {
  margin: 10px 0 0;
  font-weight: 600;
}

#stocking-page #filter-turnover [data-role="filter-turnover-value"],
#stocking-page #filter-turnover .proto-turnover {
  display: none !important;
}

#stocking-page .proto-filter-chips[data-has-filters="true"] + .proto-filter-empty {
  display: none;
}
.popover-panel,[role="dialog"].popover{position:fixed;z-index:10020}
.popover-close{inline-size:2.25rem;block-size:2.25rem;border:0;border-radius:.5rem;background:rgba(255,255,255,.08);color:inherit;cursor:pointer}
.popover-close + .popover-close{display:none}

/* Crosscheck UI fix — Oct 2025: filter chips overflow */
.proto-stock .fp-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-start;
  overflow: hidden;
  margin-top: 8px;
}

.proto-stock .fp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  min-width: 0;
  max-width: 100%;
}

.proto-stock .fp-chip .proto-filter-chip__icon {
  flex: 0 0 auto;
}

.proto-stock .fp-chip__label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proto-stock .fp-chip__badge {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0.9;
}

.proto-stock .fp-chip__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
}

.proto-stock .fp-chip__close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0;
}

@media (max-width: 480px) {
  .proto-stock .fp-chip {
    padding: 6px 8px;
  }

  .proto-stock .fp-chip__badge {
    font-size: 11px;
  }
}

.proto-stock .filter-status {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}

/* Stocking Advisor popover styles */
.proto-info-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
}

.proto-info-overlay[hidden] {
  display: none !important;
}

.proto-info-overlay.is-active {
  pointer-events: auto;
}

.proto-info-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 24, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.proto-info-overlay.is-active .proto-info-overlay__backdrop {
  opacity: 1;
}

.proto-info-popover {
  position: fixed;
  z-index: 12001;
  max-width: min(360px, calc(100vw - 32px));
  width: min(360px, calc(100vw - 32px));
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(6, 12, 24, 0.96);
  color: #eef3ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 46px -24px rgba(4, 8, 18, 0.72);
  max-height: calc(100vh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
  will-change: top, left, opacity;
}

.proto-info-popover[hidden] {
  display: none !important;
}

.proto-info-popover.is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.proto-info-popover[data-overlay-placement='center'] {
  transform: translate3d(0, 0, 0);
}

.proto-info-popover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.proto-info-popover__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.proto-info-popover__close {
  border: 0;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.proto-info-popover__close:hover,
.proto-info-popover__close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.proto-info-popover__close:focus-visible {
  outline: 2px solid rgba(20, 203, 168, 0.65);
  outline-offset: 2px;
}

.proto-info-popover__body {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(238, 243, 255, 0.92);
}

.proto-info-popover__list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

body.proto-popover-overlay-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
}

.proto-popover {
  position: absolute;
  inset: auto;
  z-index: 1200;
  min-width: 240px;
  max-width: min(320px, 90vw);
  padding: 16px;
  border-radius: 12px;
  background: rgba(6, 12, 24, 0.96);
  color: #eef3ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 46px -24px rgba(4, 8, 18, 0.72);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  will-change: opacity, transform;
}

.proto-popover[hidden] {
  display: none !important;
}

.proto-popover.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.proto-popover header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
}

.proto-popover header h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.proto-popover [data-close] {
  margin-left: auto;
  border: 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.proto-popover [data-close]:hover,
.proto-popover [data-close]:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.proto-popover [data-close]:focus-visible {
  outline: 2px solid rgba(20, 203, 168, 0.65);
  outline-offset: 2px;
}

.proto-popover p {
  margin: 0 0 0.85rem;
  font-size: 0.96rem;
  line-height: 1.5;
}

.proto-popover ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.proto-popover ul li + li {
  margin-top: 0.45rem;
}

.proto-popover .dup-x {
  display: none !important;
}

/* === PROTOTYPE-ONLY compact input for turnover === */
.proto-input-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.proto-input {
  display: inline-block;
  height: 48px;
  line-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 160px;
  max-width: 50vw;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.proto-input--compact {
  width: 140px;
}

@media (min-width: 768px) {
  .proto-input--compact {
    width: 160px;
  }
}

@media (min-width: 1024px) {
  .proto-input--compact {
    width: 180px;
  }
}

.proto-input[readonly] {
  cursor: default;
}

.proto-input-suffix {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #cfe4ff;
  user-select: none;
  pointer-events: none;
}

.proto-turnover {
  margin-top: 8px;
}

/* Stocking Advisor filtration controls */
[data-proto-hide] {
  display: none !important;
}

/* Stocking Advisor shared UI tokens */
/* Defensive: hide any legacy filtration summary card if it leaks in */
#filtration-summary,
.filtration-summary,
[data-card="filtration-summary"],
.filtration-card,
.filter-setup-legacy,
.filter-rows,
.filter-row,
.add-another-filter,
.total-flow,
.turnover,
#filtration-trigger {
  display: none !important;
}

/* Oct 2025 — Prototype-only: hide aggression meter UI */
.proto-stock .meter--aggression,
.proto-stock .aggression-meter,
.proto-stock [data-metric="aggression"] {
  display: none !important;
}

.proto-stock [data-role="aggression-percent"],
.proto-stock [data-info="aggression"],
.proto-stock .env-bar[data-kind="aggression"] {
  display: none !important;
}

.proto-stock #env-bars .env-bar + .env-bar {
  margin-top: 0;
}

.proto-stock #env-bars .bioagg-card {
  row-gap: 12px;
}

.dev-debug {
  font-style: normal;
}

body:not(.debug-on) .dev-debug {
  display: none !important;
}

.proto-debug-badge {
  position: fixed;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(10, 16, 32, 0.82);
  color: #f5f7fb;
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 9999;
}

body:not(.debug-on) .proto-debug-badge {
  display: none;
}

/* Stocking Advisor layout adjustments */
/* Prototype-only adjustments for info popovers and meter hit targets */
.proto-stock .env-bar__fill,
.proto-stock .env-bar__track,
.proto-stock .meter .fill,
.proto-stock .meter .track {
  pointer-events: none;
}

body.prototype-stock-page .ttg-tooltip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Hero spacing tweaks for prototype hero after walkthrough removal */
.proto-stock .hero-header {
  padding: 16px 0 10px;
}

.proto-stock .hero-title {
  margin-bottom: 4px;
}

.proto-stock .hero-subline {
  margin-bottom: 2px;
}

.proto-stock .hero-tagline {
  margin: 0 0 6px 0;
}

body.prototype-stock-page .ttg-tooltip.is-open,
body.prototype-stock-page .ttg-tooltip[data-open="true"],
body.prototype-stock-page .ttg-tooltip[aria-expanded="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.proto-stock .info-dot,
.proto-stock .info-btn {
  position: relative;
  z-index: 2;
}

.proto-stock .info-btn {
  min-width: 36px;
  min-height: 36px;
}

.proto-info-panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(6, 12, 24, 0.65);
  backdrop-filter: blur(2px);
  z-index: 1400;
}

.proto-info-panel[hidden] {
  display: none !important;
}

.proto-info-panel__surface {
  width: min(480px, 100%);
  max-width: 480px;
  border-radius: 16px;
  background: rgba(6, 12, 24, 0.96);
  border: 1px solid rgba(163, 200, 255, 0.32);
  box-shadow: 0 24px 48px rgba(5, 10, 22, 0.45);
  padding: 20px 24px;
  color: rgba(238, 243, 255, 0.92);
}

.proto-info-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.proto-info-panel__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg, #eef3ff);
}

.proto-info-panel__close {
  appearance: none;
  border: 0;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  line-height: 1;
  background: rgba(238, 243, 255, 0.12);
  color: inherit;
  cursor: pointer;
}

.proto-info-panel__close:focus-visible {
  outline: 2px solid rgba(163, 200, 255, 0.8);
  outline-offset: 2px;
}

.proto-info-panel__body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(238, 243, 255, 0.92);
}

.proto-info-panel__body ul {
  padding-left: 18px;
  margin: 0;
  display: grid;
  gap: 8px;
}

.proto-stock.proto-info-panel-open {
  overflow: hidden;
}

/* Stocking Advisor layout styles migrated from inline page styles */
    body.prototype-stock-page {

      margin: 0;
      padding: 0;
      color: var(--fg);
      background: var(--page-bg);
      font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
      min-height: 100vh;
    }

    body.prototype-stock-page .ttg-ad-slot {

      --ttg-ad-border: rgba(129, 155, 211, 0.72);
      --ttg-ad-bg: rgba(12, 20, 36, 0.22);
      --ttg-ad-label-bg: rgba(12, 20, 36, 0.85);
      --ttg-ad-label-color: rgba(226, 235, 255, 0.96);
      margin: 10rem auto;
      padding: clamp(1.5rem, 4vw, 2.75rem);
      max-width: min(100%, 970px);
      min-height: 280px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 20px;
      border: 2px dashed transparent;
      background: transparent;
      text-align: center;
      transition: background 0.3s ease, border-color 0.3s ease;
    }

    body.prototype-stock-page[data-ad-qa="true"] .ttg-ad-slot,
    body.prototype-stock-page .ttg-ad-slot.ttg-ad-slot--empty {

      border-color: var(--ttg-ad-border);
      background: var(--ttg-ad-bg);
    }

    body.prototype-stock-page .ttg-ad-slot::before {

      content: "";
      position: absolute;
      top: 12px;
      left: 16px;
      padding: 4px 10px;
      border-radius: 999px;
      background: var(--ttg-ad-label-bg);
      color: var(--ttg-ad-label-color);
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      pointer-events: none;
      opacity: 0;
      transform: translateY(-6px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      white-space: nowrap;
      z-index: 2;
    }

    body.prototype-stock-page[data-ad-qa="true"] .ttg-ad-slot::before,
    body.prototype-stock-page .ttg-ad-slot.ttg-ad-slot--empty::before {

      content: attr(data-ad-label);
      opacity: 1;
      transform: translateY(0);
    }

    body.prototype-stock-page .ttg-ad-slot::after {

      content: attr(data-ad-label);
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: clamp(1rem, 4vw, 1.75rem);
      background: var(--ttg-ad-label-bg);
      color: var(--ttg-ad-label-color);
      border-radius: inherit;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      z-index: 1;
    }

    body.prototype-stock-page .ttg-ad-slot.ttg-ad-slot--empty::after {

      opacity: 1;
      visibility: visible;
    }

    body.prototype-stock-page .ttg-ad-slot ins.adsbygoogle {

      display: block;
      width: 100%;
      position: relative;
      z-index: 3;
    }

    body.prototype-stock-page a {

      color: var(--link);
    }

    body.prototype-stock-page .wrap {

      max-width: 1160px;
      margin: 0 auto;
      padding: 0 18px;
    }

      body.prototype-stock-page .stocking-page {

        position: relative;
        isolation: isolate;
      }

    body.prototype-stock-page .page-content {

      padding-bottom: 96px;
    }

    body.prototype-stock-page .hero {

      padding: 12px 0 32px;
      text-align: left;
    }

    body.prototype-stock-page .hero-surface {

      background: var(--card-raised);
      border: 1px solid var(--line);
      border-radius: 22px;
      padding: clamp(1.5rem, 5vw, 2.75rem) clamp(1.25rem, 4vw, 2.8rem);
      box-shadow: 0 32px 60px -36px var(--shadow);
      backdrop-filter: blur(12px);
    }

    body.prototype-stock-page .hero-title {

      margin: 0 0 4px;
    }

    body.prototype-stock-page .hero-subline {

      margin: 0 0 6px;
      color: var(--muted);
    }

    body.prototype-stock-page .brand-name {

      font-weight: 800;
      font-size: clamp(2.4rem, 3vw, 2.9rem);
      letter-spacing: -0.01em;
    }

    body.prototype-stock-page .brand-sub {

      font-size: 0.95rem;
      opacity: 0.85;
      color: var(--muted);
    }

      body.prototype-stock-page .tagline {

        font-size: 1.05rem;
        opacity: 0.85;
        color: var(--muted);
      }

    body.prototype-stock-page .hero .lead {

      max-width: 36rem;
      margin: 6px 0 10px;
      color: var(--muted);
      font-size: 1.05rem;
      line-height: 1.5;
    }

    body.prototype-stock-page .quick-answer {

      margin: 0 auto 28px;
      padding: 18px clamp(1.25rem, 4vw, 2rem);
      border-radius: 18px;
      background: var(--card-raised);
      border: 1px solid var(--line);
      box-shadow: 0 32px 60px -36px var(--shadow);
      color: var(--muted);
      font-size: 1.02rem;
      line-height: 1.6;
      backdrop-filter: blur(12px);
    }

    body.prototype-stock-page .quick-answer p {

      margin: 0;
    }

    body.prototype-stock-page .page-content > .panel:first-of-type {

      margin-top: 10px;
    }

    body.prototype-stock-page .panel {

      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 20px 20px 22px;
      box-shadow: 0 28px 56px -34px var(--shadow);
      margin-bottom: 20px;
      backdrop-filter: blur(10px);
    }

    body.prototype-stock-page .faq-section {

      margin-top: 40px;
    }

    body.prototype-stock-page .faq-section .section-title {

      margin: 0 0 18px;
    }

    body.prototype-stock-page .faq-accordion {

      display: grid;
      gap: 12px;
    }

    body.prototype-stock-page .faq-item {

      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--card);
      box-shadow: 0 24px 50px -36px var(--shadow);
      overflow: hidden;
    }

    body.prototype-stock-page .faq-trigger {

      width: 100%;
      padding: 16px 18px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      background: transparent;
      border: 0;
      color: inherit;
      font-size: 1.05rem;
      font-weight: 600;
      text-align: left;
      cursor: pointer;
      list-style: none;
    }

    body.prototype-stock-page .faq-trigger::-webkit-details-marker {

      display: none;
    }

    body.prototype-stock-page .faq-trigger::after {

      content: "+";
      font-weight: 700;
      transition: transform 0.2s ease;
    }

    body.prototype-stock-page .faq-trigger[aria-expanded="true"]::after {

      transform: rotate(45deg);
    }

    body.prototype-stock-page .faq-panel {

      padding: 0 18px 18px;
      color: var(--muted);
      font-size: 0.98rem;
      line-height: 1.6;
    }

    body.prototype-stock-page .faq-panel p {

      margin: 0;
    }

    body.prototype-stock-page .controls-row .control-field {

      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
    }

    body.prototype-stock-page .control-field label {

      font-size: 0.92rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
    }

    body.prototype-stock-page .field-label-row {

      display: flex;
      align-items: center;
      gap: 6px;
    }

    body.prototype-stock-page .filter-catalog-debug {

      margin-top: 8px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 0.85rem;
      letter-spacing: 0.01em;
      color: var(--muted);
      background: var(--card);
      border-radius: 12px;
      padding: 6px 12px;
      border: 1px solid var(--line);
      box-shadow: 0 16px 32px -28px var(--shadow);
    }

    body.prototype-stock-page .filter-catalog-debug[data-source='CATALOG'] {

      color: var(--ok);
    }

    body.prototype-stock-page .filter-catalog-debug[data-source='FALLBACK'] {

      color: var(--warn);
    }

    body.prototype-stock-page .field-label-row .info-btn,
    body.prototype-stock-page .filter-turnover-label .info-btn {

      --info-btn-visible: 30px;
      --info-btn-hit: 44px;
      font-size: 0.95rem;
      transform: none;
    }

    body.prototype-stock-page .filter-turnover {

      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: baseline;
    }

    body.prototype-stock-page .filter-turnover-label {

      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-weight: 600;
    }

    body.prototype-stock-page .filter-turnover-value {

      font-variant-numeric: tabular-nums;
    }

    body.prototype-stock-page .link-like:focus-visible,
    body.prototype-stock-page button:focus-visible:not(.info-btn),
    body.prototype-stock-page .toggle:focus-visible {

      outline: 2px solid var(--link);
      outline-offset: 3px;
    }

    body.prototype-stock-page .link-like {

      background: none;
      border: 0;
      padding: 0;
      margin-left: 0.5rem;
      text-decoration: underline;
      cursor: pointer;
      font: inherit;
      color: var(--link);
    }

    body.prototype-stock-page .link-like:hover {

      text-decoration: underline;
    }

    /* prototype-only modal styles */
    body.prototype-stock-page .modal-backdrop.hidden {

      display: none;
    }

    body.prototype-stock-page .modal-backdrop {

      position: fixed;
      inset: 0;
      background: rgba(6, 14, 30, 0.55);
      backdrop-filter: blur(2px);
      z-index: 9999;
      display: grid;
      place-items: center;
    }

    body.prototype-stock-page .modal.card {

      width: min(92vw, 640px);
      max-height: 85vh;
      overflow: auto;
      background: var(--card-raised);
      color: var(--fg);
      border-radius: 16px;
      padding: 20px 22px;
      border: 1px solid var(--line);
      box-shadow: 0 36px 64px -32px var(--shadow);
      position: relative;
    }

    body.prototype-stock-page .icon-btn.modal-close {

      position: absolute;
      top: 10px;
      right: 12px;
      font-size: 22px;
      background: transparent;
      border: 0;
      color: inherit;
      cursor: pointer;
    }

    body.prototype-stock-page .modal .spaced li {

      margin: 12px 0;
    }

    body.prototype-stock-page .link-underline {

      text-decoration: underline;
      font-weight: 600;
    }

    body.prototype-stock-page .muted.small {

      font-size: 0.95rem;
      opacity: 0.9;
      margin-top: 0.5rem;
    }

    body.prototype-stock-page [data-role="tank-spec"] {

      pointer-events: none;
      text-decoration: none;
    }

    body.prototype-stock-page .conditions-list {

      display: grid;
      gap: 10px;
      margin: 18px 0 0;
      padding: 0;
      list-style: none;
    }

    body.prototype-stock-page .condition-item {

      display: grid;
      grid-template-columns: minmax(180px, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: var(--card);
    }

    body.prototype-stock-page .condition-item .label {

      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 600;
    }

    body.prototype-stock-page .condition-item .value {

      color: var(--muted);
      font-size: 0.95rem;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    body.prototype-stock-page .condition-item[data-state="ok"] {

      border-color: var(--ok);
    }

    body.prototype-stock-page .condition-item[data-state="warn"] {

      border-color: var(--warn);
    }

    body.prototype-stock-page .condition-item[data-state="bad"] {

      border-color: var(--bad);
    }

    body.prototype-stock-page .condition-icon {

      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      font-weight: 700;
      font-size: 0.85rem;
    }

    body.prototype-stock-page .condition-item[data-state="ok"] .condition-icon {

      background: var(--ok-soft);
      color: var(--ok);
    }

    body.prototype-stock-page .condition-item[data-state="warn"] .condition-icon {

      background: var(--warn-soft);
      color: var(--warn);
    }

    body.prototype-stock-page .condition-item[data-state="bad"] .condition-icon {

      background: var(--bad-soft);
      color: var(--bad);
    }

    body.prototype-stock-page .bars {

      display: grid;
      gap: 18px;
    }

    body.prototype-stock-page .bar-card {

      display: grid;
      gap: 10px;
    }

    body.prototype-stock-page .bar-header {

      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    body.prototype-stock-page .bar-header h3 {

      margin: 0;
      font-size: 1.1rem;
    }

    body.prototype-stock-page .bar-wrapper {

      position: relative;
      height: 22px;
      border-radius: 999px;
      background: var(--bar-bg);
      overflow: hidden;
    }

    body.prototype-stock-page .bar-fill,
    body.prototype-stock-page .bar-ghost {

      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      border-radius: 999px;
      transition: width 140ms ease;
    }

    body.prototype-stock-page .bar-fill {

      background: var(--ok);
    }

    body.prototype-stock-page .bar-ghost {

      background: var(--ghost);
      pointer-events: none;
    }

    body.prototype-stock-page .bar-text {

      font-size: 0.96rem;
      color: var(--muted);
    }

    body.prototype-stock-page .status-strip {

      border-radius: 12px;
      padding: 12px 14px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 1.02rem;
      color: var(--fg);
      background: var(--card-raised);
      border: 1px solid var(--line);
      box-shadow: 0 20px 40px -28px var(--shadow);
    }

    body.prototype-stock-page .status-strip[data-state="ok"] {

      background: var(--ok-soft);
      border-color: var(--ok);
    }

    body.prototype-stock-page .status-strip[data-state="warn"] {

      background: var(--warn-soft);
      border-color: var(--warn);
    }

    body.prototype-stock-page .status-strip[data-state="bad"] {

      background: var(--bad-soft);
      border-color: var(--bad);
    }

    #stocking-page #stock-warnings {

      display: flex;
      flex-direction: column;
      gap: var(--space-sm);
      margin: var(--space-sm) 0 0;
    }

    #stocking-page #stock-warnings .status-strip {

      width: 100%;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      font-size: 1rem;
      color: #0b1228;
    }

    #stocking-page #stock-warnings .warning-title {

      font-weight: 700;
    }

    #stocking-page #stock-warnings .warning-message {

      font-size: 0.96rem;
      opacity: 0.92;
    }

    body.prototype-stock-page .stock-grid {

      display: grid;
      gap: 16px;
    }

    body.prototype-stock-page .stock-row {

      display: grid;
      gap: 10px;
      grid-template-columns: 1fr;
    }

    body.prototype-stock-page .stock-row .see-gear {

      width: 100%;
      justify-content: center;
      margin-top: 0;
    }

    @media (min-width: 540px) {
      body.prototype-stock-page .stock-row {

        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
      }

      body.prototype-stock-page .stock-row .see-gear {

        grid-column: 1 / -1;
      }
    }

    @media (min-width: 780px) {
      body.prototype-stock-page .stock-row {

        grid-template-columns: minmax(160px, 1.4fr) repeat(2, minmax(120px, 1fr)) auto;
      }

      body.prototype-stock-page .stock-row .see-gear {

        grid-column: auto;
        width: auto;
        justify-self: end;
      }
    }

    body.prototype-stock-page .stock-list {

      display: grid;
      gap: 12px;
    }

    body.prototype-stock-page .stock-entry {

      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 8px;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: var(--card);
      box-shadow: 0 20px 44px -32px var(--shadow);
    }

    body.prototype-stock-page .stock-entry__name {

      font-weight: 600;
      font-size: 1rem;
    }

    body.prototype-stock-page .stock-entry__meta {

      color: var(--muted);
      font-size: 0.95rem;
    }

    body.prototype-stock-page .stock-entry__remove {

      appearance: none;
      border: 0;
      border-radius: 10px;
      padding: 8px 12px;
      background: var(--chip);
      color: inherit;
      font-weight: 600;
      cursor: pointer;
      justify-self: start;
    }

    body.prototype-stock-page .stock-entry__remove:hover {

      background: var(--chip-border);
    }

    @media (min-width: 640px) {
      body.prototype-stock-page .stock-entry {

        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
      }

      body.prototype-stock-page .stock-entry__meta {

        justify-self: end;
      }

      body.prototype-stock-page .stock-entry__remove {

        justify-self: end;
      }
    }

    body.prototype-stock-page .stock-empty {

      padding: 10px 2px;
      color: var(--muted);
      font-size: 0.95rem;
    }

    body.prototype-stock-page .secondary-text {

      color: var(--muted);
      font-size: 0.92rem;
    }

    body.prototype-stock-page .subtle {

      color: var(--muted);
      font-size: 0.95rem;
    }

    body.prototype-stock-page .see-gear {

      margin-top: 24px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      background: linear-gradient(90deg, rgba(77, 140, 255, 0.9), rgba(77, 200, 255, 0.88));
      color: #0b1228;
      border: none;
      border-radius: 12px;
      padding: 12px 18px;
      font-size: 1.02rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 16px 28px -20px rgba(52, 120, 255, 0.8);
      text-decoration: none;
    }

    body.prototype-stock-page .diagnostics {

      margin-top: 18px;
      background: rgba(10, 16, 32, 0.82);
      border: 1px dashed rgba(163, 200, 255, 0.4);
      border-radius: 14px;
      padding: 16px;
      display: grid;
      gap: 10px;
      color: var(--muted);
      font-size: 0.95rem;
    }

    body.prototype-stock-page .diagnostics h3 {

      margin: 0 0 4px;
      font-size: 1.05rem;
      color: var(--fg);
    }

    body.prototype-stock-page .diagnostics ul {

      margin: 0;
      padding-left: 20px;
      display: grid;
      gap: 4px;
    }

    body.prototype-stock-page .water-grid {

      display: grid;
      gap: 12px;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    body.prototype-stock-page .sr-only {

      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    @media (prefers-reduced-motion: reduce) {
      body.prototype-stock-page *,
      body.prototype-stock-page *::before,
      body.prototype-stock-page *::after {

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

    /* --- Compact vertical rhythm for Stocking Advisor --- */
    #stocking-page {

      --space-xxs: 4px;
      --space-xs: 6px;
      --space-sm: 10px;
      --space-md: 14px;
      --space-lg: 18px;
    }

    #stocking-page .card,
    #stocking-page .panel {

      padding: var(--space-md) var(--space-md) calc(var(--space-md) + 2px);
      margin-bottom: var(--space-lg);
    }

    #stocking-page .ttg-card {

      padding: 12px 14px 14px;
    }

    @media (max-width: 480px) {
      #stocking-page .ttg-card {

        padding: 10px 12px 12px;
      }
    }

    #stocking-page .card + .card,
    #stocking-page .panel + .card,
    #stocking-page .card + .panel,
    #stocking-page .panel + .panel {

      margin-top: 0;
    }

    #stocking-page .card-title,
    #stocking-page .panel > h2 {

      margin: 0;
      line-height: 1.15;
    }

    #stocking-page .panel > h2 {

      margin-bottom: var(--space-sm);
    }

    #stocking-page .toggle-title {

      margin: 0;
    }

    #stocking-page .row {

      display: flex;
      align-items: center;
      gap: 10px;
    }

    #stocking-page .row.title-row {

      margin: 4px 0 4px;
    }

    #stocking-page .row.title-row.between {

      justify-content: space-between;
    }

    #stocking-page .env-header {

      position: relative;
      overflow: visible;
    }

    #stocking-page #env-card {

      overflow: visible;
      position: relative;
    }

    #stocking-page #env-card.is-tooltip-open {

      z-index: 30;
    }

    #stocking-page .env-header .title-row {

      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      position: relative;
    }

    @media (orientation: portrait) and (max-width: 480px) {
      #stocking-page .env-header {

        position: relative;
      }

      #stocking-page .env-header .title-row {

        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto;
        align-items: center;
        column-gap: 10px;
        justify-content: initial;
      }

      #stocking-page .env-header .title-row .card-title {

        grid-column: 1 / 2;
        margin: 0;
        line-height: 1.15;
      }

      #stocking-page #env-info-btn {

        grid-column: 2 / 3;
        align-self: start;
        margin-top: 2px;
      }

      #stocking-page .env-header .card-subtitle {

        margin-top: 4px;
        grid-column: 1 / -1;
      }
    }

    #stocking-page .card-header {

      margin-bottom: 8px;
    }

    #stocking-page .card-header .card-subtitle {

      margin: 2px 0 0;
      font-size: 13px;
      line-height: 1.35;
      color: var(--muted);
    }

    #stocking-page .card p,
    #stocking-page .panel p {

      margin-top: var(--space-xs);
      margin-bottom: var(--space-sm);
    }

    #stocking-page .tank-size-card .form-row {

      margin-bottom: var(--space-xs);
    }

    #stocking-page .select-wrap {

      margin: 8px 0 10px;
    }

    #stocking-page .select-wrap select {

      min-height: 44px;
      padding-right: 44px;
    }

    #stocking-page .tank-size-card .facts-line {

      margin-top: var(--space-sm);
      margin-bottom: var(--space-sm);
    }

    #stocking-page #stock-list {

      gap: var(--space-sm);
    }

    #stocking-page #stock-list .stock-entry {

      padding: var(--space-sm) var(--space-md);
      gap: var(--space-xs);
    }

    #stocking-page #stock-list .stock-entry__meta {

      margin-top: var(--space-xxs);
    }

    #stocking-page #stock-list .stock-entry__remove {

      min-height: 44px;
    }

    #stocking-page #stock-list .stock-entry + .stock-entry {

      margin-top: 0;
    }

    #stocking-page #stock-list-card .stock-empty {

      padding: var(--space-sm) var(--space-xs);
    }

    #stocking-page .env-card .section-lead {

      margin-bottom: var(--space-sm);
    }

    #stocking-page .env-card .env-divider {

      margin: var(--space-sm) 0;
    }

    #stocking-page .env-card table {

      border-spacing: 0;
    }

    #stocking-page .env-card table th,
    #stocking-page .env-card table td {

      padding: 10px 12px;
      line-height: 1.25;
    }

    #stocking-page .env-bars {

      margin-top: 10px;
      row-gap: 10px;
    }

    #stocking-page .env-bars .env-bar,
    #stocking-page .env-bars .bar-row {

      margin-bottom: var(--space-xs);
      padding-top: var(--space-xs);
      padding-bottom: var(--space-xs);
    }

    #stocking-page .env-bars .env-bar:last-child,
    #stocking-page .env-bars .bar-row:last-child {

      margin-bottom: 0;
    }

    /* ----- Compact Bioload/Aggression card adjustments ----- */
    #stocking-page #bioagg-card {

      min-height: 0 !important;
      height: auto !important;
      flex: 0 0 auto !important;
    }

    #stocking-page #bioagg-card.is-compact {

      padding-top: 8px;
      padding-bottom: 10px;
    }

    @media (orientation: portrait) and (max-width: 480px) {
      #stocking-page #bioagg-card.is-compact {

        padding-top: 6px;
        padding-bottom: 8px;
      }
    }

    #stocking-page button:not(.info-btn),
    #stocking-page select {

      min-height: 44px;
    }

    @media (max-width: 480px) {
      #stocking-page {

        --space-sm: 8px;
        --space-md: 12px;
        --space-lg: 16px;
      }

      #stocking-page .ttg-card {

        padding: 10px 12px 12px;
      }

      #stocking-page .row {

        gap: 8px;
      }

      #stocking-page .row.title-row {

        margin: 2px 0 2px;
      }

      #stocking-page .card-header {

        margin-bottom: 6px;
      }

      #stocking-page .card-header .card-subtitle {

        font-size: 12.5px;
      }

      #stocking-page .env-card table th,
      #stocking-page .env-card table td {

        padding: 8px 10px;
      }
    }

    @media (min-width: 1024px) {
      body.prototype-stock-page .hero {

        padding-top: 16px;
      }

      body.prototype-stock-page .page-content > .panel:first-of-type {

        margin-top: 14px;
      }
    }

    #stocking-page .tank-size-card + .card-spacer:empty {

      display: none !important;
    }

  
/* Tank size + env legend refinements migrated from inline */
        /* Layout tightening */
        body.prototype-stock-page .tank-size-card .form-row {

          margin-bottom: 8px;
        }

        /* --- Tank Size chevron styles (scoped) --- */
        body.prototype-stock-page .tank-size-card .select-wrap {

          position: relative;
        }
        body.prototype-stock-page .tank-size-card .select-wrap select {

          display: block;
          width: 100%;
          height: 44px;
          line-height: 44px;
          padding: 0 44px 0 14px;
          border-radius: 12px;
          border: 1px solid var(--line);
          background: var(--card);
          color: inherit;
          -webkit-appearance: none;
          -moz-appearance: none;
          appearance: none;
          /* iOS: keeps native picker while allowing custom icon */
        }
        body.prototype-stock-page .tank-size-card .select-wrap .chevron {

          position: absolute;
          right: 14px;
          top: 50%;
          width: 16px;
          height: 16px;
          transform: translateY(-50%);
          opacity: 0.8;
          pointer-events: none;
          /* IMPORTANT: never block taps on the select */
          transition: transform 0.18s ease, opacity 0.18s ease;
        }
        body.prototype-stock-page .tank-size-card .select-wrap:hover .chevron {

          opacity: 0.95;
        }
        body.prototype-stock-page .tank-size-card .select-wrap.open .chevron {

          transform: translateY(-50%) rotate(180deg);
        }
        body.prototype-stock-page .tank-size-card .select-wrap select:focus {

          outline: 2px solid var(--info-btn-focus);
          outline-offset: 2px;
        }
        @media (prefers-reduced-motion: reduce) {
          body.prototype-stock-page .tank-size-card .select-wrap .chevron {

            transition: none;
          }
        }

          /* Facts line (empty when none selected) */
          body.prototype-stock-page .tank-size-card .facts-line {

            margin-top: 8px;
          }

          body.prototype-stock-page .heads-up-note {

            margin-top: 12px;
            padding: 12px 14px;
            border-radius: 12px;
            background: var(--card);
            border: 1px solid var(--line);
            font-size: 0.95rem;
            line-height: 1.5;
            color: var(--muted);
          }

          body.prototype-stock-page .heads-up-note strong {

            color: var(--fg);
          }

        /* Ensure the card can host positioned children safely */
        body.prototype-stock-page .tank-size-card {
 position: relative; }

        /* Info buttons adopt Cycling Coach parity */
        #stocking-page .info-btn {

          --info-btn-hit: 44px;
          --info-btn-visible: 30px;
          --info-btn-icon: var(--fg);
          font-size: 0.95rem;
          transform: none;
        }

        /* Env. Recommendations single icon “expanded” state (if present) */
        #stocking-page [data-role="env-info"][aria-expanded="true"] {

          --info-btn-bg: rgba(20, 203, 168, 0.9);
          --info-btn-bg-hover: rgba(20, 203, 168, 0.95);
          --info-btn-bg-active: rgba(20, 203, 168, 0.82);
          --info-btn-border: rgba(20, 203, 168, 0.95);
          --info-btn-border-hover: rgba(20, 203, 168, 1);
          --info-btn-border-active: rgba(20, 203, 168, 0.92);
          --info-btn-focus: rgba(20, 203, 168, 0.55);
          color: #0b1b18;
        }

        #stocking-page [data-role="env-info"][aria-expanded="true"]::before {

          box-shadow: 0 0 0 2px rgba(20, 203, 168, 0.25);
        }

        /* Environmental legend collapsed by default */
        #stocking-page #env-card [data-role="env-legend"] {

          display: none;
          margin: 0;
          padding-top: 0;
          opacity: 0;
          transition: opacity 160ms ease;
        }

        #stocking-page #env-card.info-open [data-role="env-legend"] {

          display: block;
          opacity: 1;
        }

        #stocking-page #env-card .env-bars .env-bar,
        #stocking-page #env-card .env-bars .bar-row {

          margin-bottom: 0;
        }

        #stocking-page #env-card.info-open .env-bars .env-bar,
        #stocking-page #env-card.info-open .env-bars .bar-row {

          margin-bottom: var(--space-xs);
        }

        #stocking-page #env-card.info-open .env-bars .env-bar:last-child,
        #stocking-page #env-card.info-open .env-bars .bar-row:last-child {

          margin-bottom: 0;
        }

      
body.prototype-stock-page .howto-steps {
  margin: 16px 0 24px;
  padding-left: 1.25rem;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

body.prototype-stock-page .howto-steps li {
  padding-left: 0.25rem;
}

body.prototype-stock-page .howto-steps strong {
  color: var(--fg);
  display: block;
  font-size: 1rem;
  margin-bottom: 2px;
}
/* === HOMEPAGE SAFETY PATCH 2025-11 === */
.home-page .how-it-works-overlay,
.page--prototype-home .how-it-works-overlay,
.home-page .how-it-works-backdrop,
.page--prototype-home .how-it-works-backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.home-page .how-it-works-modal,
.home-page .how-it-works-dialog,
.page--prototype-home .how-it-works-modal,
.page--prototype-home .how-it-works-dialog {
  background: #ffffff;
  color: #000000;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  border: none;
}

.home-page .how-it-works-btn,
.page--prototype-home .how-it-works-btn {
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  color: #ffffff !important;
}

.home-page .how-it-works-btn:hover,
.home-page .how-it-works-btn:focus-visible,
.page--prototype-home .how-it-works-btn:hover,
.page--prototype-home .how-it-works-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}
/* === HOMEPAGE PATCH: HOW-IT-WORKS BUTTON BORDER (2025-11) === */
.home-page .how-it-works-btn {
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  color: #fff !important;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  backdrop-filter: saturate(180%) blur(10px);
}

.home-page .how-it-works-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
/* === HOMEPAGE: HOW IT WORKS BUTTON BORDER (2025-11-15) === */
.how-it-works-btn {
    border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
    border-radius: 32px !important;     /* matches other hero buttons */
    color: #fff !important;             /* ensures text contrast */
    padding: 0.75rem 1.75rem !important;
    backdrop-filter: saturate(180%) blur(12px);
}

.how-it-works-btn:hover {
    border-color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.1);
}
/*
 * Shared utility styles extracted for theme and interactive pages.
 * Includes consolidated layout helpers and tooltip visuals.
 */

body.theme-media *,
body.theme-media *::before,
body.theme-media *::after,
body.uni-bg *,
body.uni-bg *::before,
body.uni-bg *::after,
body.theme-media.university *,
body.theme-media.university *::before,
body.theme-media.university *::after {
  box-sizing: border-box;
}

/* Inline tooltip presentation used by Cycling Coach, Stocking, etc. */
.ttg-tooltip {
  position: fixed;
  z-index: 1600;
  background: rgba(12, 16, 26, 0.95);
  color: #e9eef5;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-radius: 9px;
  padding: 10px 12px;
  max-width: min(320px, calc(100vw - 32px));
  font-size: 0.92rem;
  line-height: 1.45;
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.ttg-tooltip[data-open='true'] {
  pointer-events: auto;
}

.ttg-tooltip[hidden] {
  display: none !important;
}

.ttg-tooltip__title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 6px;
}

.ttg-tooltip__body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ttg-tooltip__body + .ttg-tooltip__body {
  margin-top: 6px;
}

.ttg-tooltip__list {
  margin: 8px 0 0 18px;
  padding: 0;
  list-style: disc;
}

.ttg-tooltip__list > li + li {
  margin-top: 4px;
}

/* Trigger styling adopted by Cycling Coach buttons */
.ttg-tooltip-trigger {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.ttg-tooltip-trigger:focus-visible {
  outline: none;
}

html.ttg-tooltip-lock,
body.ttg-tooltip-lock {
  overflow: hidden;
}
#stocking-page .tank-size-card .row.toggle-row .row-right {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

#stocking-page .tank-size-card .row.toggle-row #filtration-trigger {
  flex: 0 0 auto;
}

#stocking-page .tank-size-card .row.toggle-row .planted-row {
  flex: 0 0 auto;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control {
  display: grid;
  gap: 10px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  width: 100%;
  flex: 1 1 320px;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-input,
#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-product-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted, rgba(235, 239, 251, 0.78));
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field {
  display: flex;
  gap: 8px;
  align-items: center;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field input {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field input[readonly] {
  cursor: not-allowed;
  opacity: 0.7;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field input[readonly]::placeholder {
  color: rgba(235, 239, 251, 0.65);
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-input__field input:focus {
  outline: 2px solid rgba(20, 203, 168, 0.55);
  outline-offset: 2px;
}

#stocking-page #stock-list-card.is-updated {
  box-shadow: 0 0 0 1px rgba(61, 220, 132, 0.35), 0 22px 44px -26px rgba(20, 203, 168, 0.5);
}

#stocking-page #plan-add.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
}

#stocking-page #plan-add.is-loading::after {
  content: '';
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: rgba(255, 255, 255, 0.75);
  animation: ttg-spin 0.8s linear infinite;
}

#stocking-page #plan-add.is-loading span,
#stocking-page #plan-add.is-loading strong {
  opacity: 0.6;
}

@keyframes ttg-spin {
  to {
    transform: rotate(360deg);
  }
}

#stocking-page .stock-list [data-row-id] {
  position: relative;
  border-radius: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#stocking-page .stock-list [data-row-id].is-updated {
  box-shadow: 0 0 0 1px rgba(61, 220, 132, 0.38), 0 12px 22px -16px rgba(20, 203, 168, 0.45);
  transform: translateY(-1px);
}

#stocking-page .stock-list [data-row-id].is-updated::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.95rem;
  color: rgba(61, 220, 132, 0.95);
  text-shadow: 0 0 6px rgba(13, 178, 120, 0.4);
  pointer-events: none;
}

#stocking-page .stock-list [data-row-id] .stock-row__remove {
  position: relative;
  z-index: 1;
}

#stocking-page .tank-size-card .row.toggle-row .filter-product-field .select-wrap {
  position: relative;
}

#stocking-page .tank-size-card .row.toggle-row .filter-product-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  appearance: none;
}

#stocking-page .tank-size-card .row.toggle-row .filter-product-field select:focus {
  outline: 2px solid rgba(20, 203, 168, 0.55);
  outline-offset: 2px;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-note,
#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-product-note,
#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta {
  font-size: 0.78rem;
  color: var(--muted, rgba(235, 239, 251, 0.78));
  margin: 0;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta strong,
#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta span {
  font-weight: 600;
}

#stocking-page .tank-size-card .row.toggle-row .filter-flow-control .filter-flow-meta .filter-turnover {
  font-size: 0.84rem;
  color: var(--fg, #eef3ff);
}

@media (max-width: 720px) {
  #stocking-page .tank-size-card .row.toggle-row .row-right {
    align-items: stretch;
    gap: 12px;
  }

  #stocking-page .tank-size-card .row.toggle-row .filter-flow-control {
    grid-template-columns: 1fr;
    flex: 1 1 100%;
  }

  #stocking-page .tank-size-card .row.toggle-row #filtration-trigger {
    width: 100%;
  }
}

#filtration-trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.filter-trigger-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.filter-trigger-button:hover,
.filter-trigger-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  outline: none;
}

.filter-trigger-button.is-open {
  background: rgba(255, 255, 255, 0.14);
}

.filter-trigger-button[data-warning="true"] {
  border-color: rgba(255, 100, 92, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 100, 92, 0.35);
}

.filter-trigger-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.filter-trigger-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  opacity: 0.78;
  flex-wrap: wrap;
}

.filter-trigger-summary-text {
  white-space: nowrap;
}

.filter-trigger-summary .info-btn {
  --info-btn-visible: 30px;
  transform: none;
  font-size: 0.95rem;
}

.filter-trigger-chevron {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.filter-trigger-button.is-open .filter-trigger-chevron {
  transform: rotate(180deg);
}

@media (max-width: 600px) {
  .filter-trigger-summary-text {
    white-space: normal;
  }
}

.filter-drawer-host {
  width: 100%;
  margin-top: 12px;
}

.filter-drawer {
  margin-top: 4px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--panel, rgba(255, 255, 255, 0.06));
  box-shadow: 0 18px 28px -24px rgba(10, 14, 28, 0.45);
}

.filter-drawer__intro {
  margin-bottom: 14px;
}

.filter-drawer__title {
  margin: 0 0 4px;
  font-size: 1rem;
}

.filter-drawer__desc {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(235, 239, 251, 0.78);
}

.filter-drawer__rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-drawer__row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(120px, 160px) auto;
  gap: 12px;
  align-items: end;
}

.filter-field label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(235, 239, 251, 0.72);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.filter-field select,
.filter-field input[type="number"] {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 0 12px;
  font-size: 0.92rem;
}

.filter-field input[type="number"]::-webkit-outer-spin-button,
.filter-field input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
}

.filter-row-remove {
  align-self: center;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(235, 239, 251, 0.9);
  border-radius: 10px;
  font-size: 1.1rem;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.filter-row-remove[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.filter-row-remove:not([aria-disabled="true"]):hover,
.filter-row-remove:not([aria-disabled="true"]):focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.filter-drawer__add {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: transparent;
  color: inherit;
  padding: 10px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.filter-drawer__add:hover,
.filter-drawer__add:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.filter-drawer__results {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 10px;
}

.filter-result-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.filter-result-line span:first-child {
  color: rgba(235, 239, 251, 0.7);
}

.filter-result-line span:last-child {
  font-weight: 600;
}

.filter-result-status {
  display: flex;
  justify-content: flex-start;
}

.filter-result-status .chip {
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .filter-drawer__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }
  .filter-drawer__row .filter-row-remove {
    grid-column: span 2;
    justify-self: flex-end;
  }
}

@media (max-width: 520px) {
  #stocking-page .tank-size-card .row.toggle-row .row-right {
    justify-content: flex-start;
  }
  #filtration-trigger {
    align-items: flex-start;
  }
  .filter-drawer {
    padding: 16px;
  }
}
/* Stocking Advisor aggregated styles (migrated from prototype) */
/* NOTE: All Stocking Advisor inline styles have been consolidated here so the page can rely on cacheable CSS.
   This file is scoped for future bundling work—keep selectors stable so it can merge into the main bundle safely. */
/* === Stocking Advisor: Base Tokens === */
:root {
  color-scheme: dark;
}

body.prototype-stock-page {
  --fg: #eef3ff;
  --muted: rgba(223, 233, 255, 0.82);
  --card: rgba(12, 20, 36, 0.82);
  --card-raised: rgba(16, 26, 46, 0.9);
  --panel: var(--card);
  --line: rgba(135, 170, 228, 0.28);
  --chip: rgba(223, 237, 255, 0.18);
  --chip-border: rgba(223, 237, 255, 0.38);
  --chip-warn-border: rgba(244, 180, 0, 0.55);
  --chip-bad-border: rgba(255, 100, 92, 0.6);
  --chip-warn-text: #f4d48a;
  --chip-bad-text: #ffb3b0;
  --info-btn-bg: rgba(223, 237, 255, 0.12);
  --info-btn-bg-hover: rgba(223, 237, 255, 0.18);
  --info-btn-bg-active: rgba(223, 237, 255, 0.14);
  --info-btn-border: rgba(223, 237, 255, 0.24);
  --info-btn-border-hover: rgba(223, 237, 255, 0.32);
  --info-btn-border-active: rgba(223, 237, 255, 0.28);
  --info-btn-focus: rgba(20, 203, 168, 0.7);
  --ghost: rgba(225, 236, 255, 0.32);
  --bar-bg: rgba(223, 237, 255, 0.2);
  --ok: #12c278;
  --warn: #f4b400;
  --bad: #ff645c;
  --ok-soft: rgba(18, 194, 120, 0.25);
  --warn-soft: rgba(244, 180, 0, 0.22);
  --bad-soft: rgba(255, 100, 92, 0.26);
  --shadow: rgba(5, 12, 28, 0.68);
  --shadow-base: rgba(5, 12, 28, 0.68);
  --popover-bg: rgba(6, 12, 24, 0.96);
  --link: #8ec5ff;
}

/* === Stocking Advisor: Environmental Card & Bars === */
body.prototype-stock-page #env-bars,
body.prototype-stock-page .env-bars {
  display: grid;
  gap: clamp(12px, 2vw, 18px);
  margin-top: 12px;
}

body.prototype-stock-page .env-bars--xl {
  gap: 10px;
}

body.prototype-stock-page #env-bars .bioagg-card,
body.prototype-stock-page .env-bars .bioagg-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card-raised);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 24px 50px -36px var(--shadow-base);
  backdrop-filter: blur(10px);
}

body.prototype-stock-page .env-bar,
body.prototype-stock-page #env-bars .env-bar,
body.prototype-stock-page .bar-row {
  border-radius: 16px;
  background: rgba(223, 237, 255, 0.05);
  border: 1px solid rgba(223, 237, 255, 0.12);
  padding: 14px 16px;
  box-shadow: 0 18px 34px -28px var(--shadow-base);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.prototype-stock-page .env-bar--xl {
  background: rgba(223, 237, 255, 0.08);
  border-color: rgba(223, 237, 255, 0.2);
  border-radius: 14px;
  padding: 10px 12px;
  gap: 8px;
}

body.prototype-stock-page .env-bar__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.prototype-stock-page .env-bar__label,
body.prototype-stock-page .metric-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.88rem;
  color: var(--muted);
}

body.prototype-stock-page .env-bar__value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.96rem;
}

body.prototype-stock-page .env-bar__track,
body.prototype-stock-page .meter-track,
body.prototype-stock-page .progress-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(223, 237, 255, 0.18);
  overflow: hidden;
}

body.prototype-stock-page .env-bar--xl .env-bar__track,
body.prototype-stock-page .env-bar--xl .meter-track,
body.prototype-stock-page .env-bar--xl .progress-track {
  height: 8px;
}

body.prototype-stock-page .env-bar__fill {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #20fdd9, #47a6ff);
  transition: width 0.3s ease, background 0.3s ease;
}

body.prototype-stock-page .env-bar__chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* === Stocking Advisor: Warnings & Chips === */
body.prototype-stock-page .chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.prototype-stock-page .chips:empty {
  display: none;
}

body.prototype-stock-page .chip {
  background: var(--chip);
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.92rem;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

body.prototype-stock-page .chip[data-tone="warn"] {
  border-color: var(--chip-warn-border);
  color: var(--chip-warn-text);
}

body.prototype-stock-page .chip[data-tone="bad"] {
  border-color: var(--chip-bad-border);
  color: var(--chip-bad-text);
}

body.prototype-stock-page .chip__icon {
  font-size: 0.9em;
  line-height: 1;
}

body.prototype-stock-page .chip__text {
  display: inline;
}

body.theme-dark.prototype-stock-page {
  background: var(--page-bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  min-height: 100vh;
  background-attachment: fixed;
}



.prototype-stock-page .info-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 0.5rem;
  overflow: visible;
  isolation: isolate;
}

.prototype-stock-page .info-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.prototype-stock-page .info-inline .info-trigger {
  margin-inline-start: 0;
}

.prototype-stock-page .info-badge,
body.prototype-stock-page .info-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

body.prototype-stock-page .proto-info-tooltip {
  position: absolute;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(6, 12, 24, 0.96);
  border: 1px solid rgba(163, 200, 255, 0.32);
  color: rgba(238, 243, 255, 0.92);
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 18px 36px rgba(4, 10, 30, 0.4);
  z-index: 1100;
  pointer-events: auto;
}

body.prototype-stock-page .proto-info-tooltip[hidden] {
  display: none !important;
}

body.prototype-stock-page .proto-info-tooltip__body {
  margin: 0;
}

.prototype-stock-page .card-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.prototype-stock-page .card-title-row .card-title {
  margin: 0;
}

.prototype-stock-page .info-btn {
  --info-btn-hit: 44px;
  --info-btn-visible: 30px;
  --info-btn-bg: rgba(255, 255, 255, 0.12);
  --info-btn-bg-hover: rgba(255, 255, 255, 0.18);
  --info-btn-bg-active: rgba(255, 255, 255, 0.14);
  --info-btn-border: rgba(255, 255, 255, 0.24);
  --info-btn-border-hover: rgba(255, 255, 255, 0.32);
  --info-btn-border-active: rgba(255, 255, 255, 0.28);
  --info-btn-focus: rgba(20, 203, 168, 0.7);
  --info-btn-icon: rgba(238, 243, 255, 0.95);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--info-btn-hit);
  height: var(--info-btn-hit);
  border: 0;
  padding: 0;
  background: none;
  color: var(--info-btn-icon);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.prototype-stock-page .info-btn::before {
  content: '';
  position: absolute;
  inset: 50%;
  width: var(--info-btn-visible);
  height: var(--info-btn-visible);
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--info-btn-bg);
  border: 1px solid var(--info-btn-border);
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  z-index: -1;
}

.prototype-stock-page .info-btn:hover::before,
.prototype-stock-page .info-btn:focus-visible::before {
  background: var(--info-btn-bg-hover);
  border-color: var(--info-btn-border-hover);
}

.prototype-stock-page .info-btn:active::before {
  background: var(--info-btn-bg-active);
  border-color: var(--info-btn-border-active);
}

.prototype-stock-page .info-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(8, 13, 24, 0.85), 0 0 0 4px var(--info-btn-focus);
}

.prototype-stock-page .info-btn.is-open,
.prototype-stock-page [data-info-open='true'] .info-btn {
  color: #0b1b18;
}

.prototype-stock-page .info-btn.is-open::before,
.prototype-stock-page [data-info-open='true'] .info-btn::before {
  background: rgba(20, 203, 168, 0.9);
  border-color: rgba(20, 203, 168, 0.95);
  box-shadow: 0 0 0 1px rgba(20, 203, 168, 0.55);
}

.prototype-stock-page [data-info-pop] {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: calc(100% + 8px);
  padding: 14px 16px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 26, 44, 0.98), rgba(10, 16, 30, 0.96));
  border: 1px solid rgba(163, 200, 255, 0.2);
  box-shadow: 0 14px 40px rgba(4, 10, 30, 0.45);
  color: rgba(235, 243, 255, 0.92);
  max-inline-size: min(22rem, 90vw);
  transform-origin: top center;
  transform: translateY(-4px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 220;
}

.prototype-stock-page [data-info-pop].is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.prototype-stock-page [data-info-pop][data-info-placement='top'] {
  transform-origin: bottom center;
}

.prototype-stock-page [data-info-pop][hidden] {
  display: none !important;
}

.prototype-stock-page .info-popover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-end: 0.5rem;
}

.prototype-stock-page .info-popover__header strong {
  font-size: 0.95rem;
  color: rgba(244, 248, 255, 0.98);
}

.prototype-stock-page .info-popover__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.prototype-stock-page .info-popover__header .info-popover__close ~ .info-popover__close,
.prototype-stock-page .info-popover__header .info-popover__close ~ [data-close="popover"],
.prototype-stock-page .info-popover__header [data-close="popover"] ~ [data-close="popover"],
.prototype-stock-page .info-popover__header button[aria-label="Close"] ~ button[aria-label="Close"] {
  display: none !important;
}

.prototype-stock-page .info-popover__close:hover,
.prototype-stock-page .info-popover__close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}

.prototype-stock-page .info-popover__close:focus-visible {
  outline: 2px solid rgba(163, 200, 255, 0.55);
  outline-offset: 2px;
}

.prototype-stock-page [data-info-pop] p,
.prototype-stock-page [data-info-pop] li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(235, 243, 255, 0.88);
}

.prototype-stock-page [data-info-pop] ul {
  margin: 0;
  padding-inline-start: 1.1rem;
  display: grid;
  gap: 0.45rem;
  list-style: disc;
}

.prototype-stock-page [data-info-scope] {
  overflow: visible;
}

.prototype-stock-page #stock-list-card,
.prototype-stock-page #stock-list-card .card-header,
.prototype-stock-page #env-card,
.prototype-stock-page #env-card .card-header,
.prototype-stock-page #tank-size-card,
.prototype-stock-page #tank-size-card .card-header {
  position: relative;
  overflow: visible;
}

.prototype-stock-page .card {
  position: relative;
  overflow: visible;
}

@media (min-width: 640px) {
  .prototype-stock-page [data-info-pop] {
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: max-content;
    min-inline-size: 16rem;
    max-inline-size: 22rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prototype-stock-page .info-btn,
  .prototype-stock-page [data-info-pop] {
    transition: none;
  }
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
}

main.stocking-page {
  position: relative;
  isolation: isolate;
  padding-bottom: 96px;
}

.advisor-overview {
  margin: 24px 0 48px;
  display: grid;
  gap: 16px;
}

.sa-proto-block {
  display: grid;
  gap: 14px;
  padding: 12px 0;
}

.sa-proto-block + .sa-proto-block {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}

.advisor-overview h2,
.advisor-overview h3 {
  color: #f6f9ff;
  margin-top: 0;
}

.advisor-overview p,
.advisor-overview li {
  color: rgba(238, 243, 255, 0.85);
  line-height: 1.7;
}

.advisor-overview a {
  color: #88c7ff;
  font-weight: 600;
  text-decoration-thickness: 2px;
}

.ad-hero {
  text-align: center;
  margin: 1.5rem 0;
}

.ad-label:not(.sr-only) {
  display: inline-block;
  background: var(--accent-dark, #1a237e);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.advisor-faq details {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(10, 18, 36, 0.6);
  padding: 16px 20px;
  margin-bottom: 14px;
}

.advisor-faq summary {
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
}

.advisor-faq summary:focus-visible {
  outline: 2px solid #5bbcff;
  outline-offset: 4px;
}

.advisor-faq p {
  margin: 12px 0 0;
}

.notice-box {
  border-left: 3px solid #3ddc84;
  padding: 16px 20px;
  background: rgba(24, 40, 32, 0.65);
  border-radius: 12px;
  margin: 24px 0;
}

@media (max-width: 720px) {
  .advisor-overview {
    padding: 24px;
  }

}

/* === Prototype-only How It Works modal trigger === */
.sa-proto-how-header {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.sa-proto-how-trigger,
.sa-proto-howitworks-trigger {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(12, 20, 36, 0.65);
  color: #f5f9ff;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sa-proto-how-trigger:hover,
.sa-proto-how-trigger:focus-visible,
.sa-proto-howitworks-trigger:hover,
.sa-proto-howitworks-trigger:focus-visible {
  background: rgba(59, 117, 217, 0.55);
  border-color: rgba(163, 200, 255, 0.85);
  color: #ffffff;
  outline: none;
}

.sa-proto-how-trigger:focus-visible,
.sa-proto-howitworks-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.35);
}

@media (max-width: 640px) {
  .sa-proto-how-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sa-proto-how-trigger,
  .sa-proto-howitworks-trigger {
    width: 100%;
    text-align: center;
  }
}

/* === Prototype-only modal === */
.sa-proto-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(5, 10, 22, 0.76);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.sa-proto-modal-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.sa-proto-modal-panel {
  max-width: 640px;
  min-width: min(520px, 100%);
  width: min(640px, 100%);
  background: linear-gradient(180deg, rgba(12, 20, 36, 0.98), rgba(8, 12, 24, 0.98));
  border: 1px solid rgba(163, 200, 255, 0.25);
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(4, 10, 30, 0.5);
  padding: 28px;
  color: #f2f6ff;
}

.sa-proto-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.sa-proto-modal-header h2 {
  margin: 0;
  font-size: 1.6rem;
  color: #ffffff;
}

.sa-proto-modal-close {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(14, 22, 38, 0.7);
  color: #ffffff;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sa-proto-modal-close:hover,
.sa-proto-modal-close:focus-visible {
  background: rgba(163, 200, 255, 0.35);
  border-color: rgba(163, 200, 255, 0.85);
  color: #ffffff;
  outline: none;
}

.sa-proto-modal-close:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.35);
}

.sa-proto-modal-body {
  display: grid;
  gap: 16px;
  font-size: 1rem;
  line-height: 1.6;
}

.sa-proto-modal-body ol {
  padding-left: 22px;
  margin: 0;
  display: grid;
  gap: 10px;
}

.sa-proto-modal-body p {
  margin: 0;
  color: rgba(238, 243, 255, 0.9);
}

.sa-proto-modal-helper {
  font-style: italic;
  color: #cbe4ff;
}

@media (max-width: 640px) {
  .sa-proto-modal-backdrop {
    padding: 16px;
  }

  .sa-proto-modal-panel {
    width: 100%;
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sa-proto-modal-backdrop,
  .sa-proto-modal-panel,
  .sa-proto-how-trigger,
  .sa-proto-modal-close {
    transition: none;
  }
}

body.sa-proto-modal-open {
  overflow: hidden;
}

.sa-proto-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;
}

/* === Prototype-only tooltip === */
.sa-proto-tank-size-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sa-proto-tooltip-trigger {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(12, 20, 36, 0.65);
  color: #ffffff;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sa-proto-tooltip-trigger:hover,
.sa-proto-tooltip-trigger:focus-visible {
  background: rgba(59, 117, 217, 0.55);
  border-color: rgba(163, 200, 255, 0.85);
  color: #ffffff;
  outline: none;
}

.sa-proto-tooltip-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.35);
}

.sa-proto-tooltip {
  margin-top: 10px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(12, 20, 36, 0.9);
  border: 1px solid rgba(163, 200, 255, 0.25);
  color: rgba(238, 243, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 12px 28px rgba(4, 10, 30, 0.35);
}

.sa-proto-tooltip p {
  margin: 0;
}

/* === Prototype-only Feature CTA === */
.sa-proto-feature-cta,
.sa-proto-feature {
  margin-top: 28px;
  padding: 24px 28px;
  border-radius: 16px;
  background: rgba(12, 22, 38, 0.82);
  border: 1px solid rgba(163, 200, 255, 0.2);
  display: grid;
  gap: 14px;
}

.sa-proto-feature-cta h3,
.sa-proto-feature h3 {
  margin: 0;
  font-size: 1.35rem;
  color: #ffffff;
}

.sa-proto-feature-cta p,
.sa-proto-feature p {
  margin: 0;
  color: rgba(238, 243, 255, 0.85);
  line-height: 1.6;
}

.sa-proto-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sa-proto-feature-primary,
.sa-proto-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59, 117, 217, 0.85), rgba(20, 203, 168, 0.85));
  color: #0a1020;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(163, 200, 255, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sa-proto-feature-primary:hover,
.sa-proto-feature-primary:focus-visible,
.sa-proto-button:hover,
.sa-proto-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(14, 110, 196, 0.35);
  outline: none;
}

.sa-proto-feature-primary:focus-visible,
.sa-proto-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.45);
}

.sa-proto-feature-secondary,
.sa-proto-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(163, 200, 255, 0.35);
  color: #e5f0ff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.sa-proto-feature-secondary:hover,
.sa-proto-feature-secondary:focus-visible,
.sa-proto-link:hover,
.sa-proto-link:focus-visible {
  background: rgba(59, 117, 217, 0.35);
  border-color: rgba(163, 200, 255, 0.85);
  outline: none;
}

.sa-proto-feature-secondary:focus-visible,
.sa-proto-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(163, 200, 255, 0.35);
}

@media (max-width: 640px) {
  .sa-proto-feature-cta {
    padding: 22px;
  }

  .sa-proto-feature-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sa-proto-feature-primary,
  .sa-proto-feature-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Stocking Advisor filter controls */
#stocking-page .proto-inline-controls {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

#stocking-page .proto-inline-controls[data-role="filter-product-controls"] {
  margin-top: 10px;
}

#stocking-page .proto-inline-controls__field {
  flex: 1 1 0%;
  min-width: 0;
}

#stocking-page .proto-inline-controls__field--type {
  flex: 0 0 180px;
}

#stocking-page .proto-inline-controls--flow {
  margin-top: 6px;
}

#stocking-page .proto-inline-controls--flow .filter-flow-input__field {
  flex: 1 1 160px;
}

#stocking-page .proto-inline-controls select,
#stocking-page .proto-inline-controls input {
  height: 44px;
}

#stocking-page .filter-setup {
  margin-top: 0.5rem;
}

#stocking-page .filter-setup .muted {
  opacity: 0.8;
  margin: 0 0 0.5rem;
}

#stocking-page .filter-setup__row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

#stocking-page .fs-input {
  height: 44px;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  min-width: 0;
}

#stocking-page .fs-select {
  width: 160px;
}

#stocking-page .fs-gph {
  width: 120px;
}

#stocking-page #fs-add-custom {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 2px 6px rgba(6, 12, 24, 0.3);
  color: var(--fg, #eef3ff) !important;
  -webkit-text-fill-color: var(--fg, #eef3ff) !important;
  font-weight: 600;
}

#stocking-page #fs-add-custom:not([disabled]):hover,
#stocking-page #fs-add-custom:not([disabled]):focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 0 6px 12px rgba(8, 15, 30, 0.35);
}

#stocking-page #fs-add-custom[aria-disabled="true"],
#stocking-page #fs-add-custom:disabled {
  opacity: 1;
  color: rgba(238, 243, 255, 0.78) !important;
  -webkit-text-fill-color: rgba(238, 243, 255, 0.78) !important;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

#stocking-page .btn-compact {
  height: 44px;
  padding: 0 0.9rem;
  border-radius: 12px;
}

@media (max-width: 420px) {
  #stocking-page .fs-select {
    flex: 1 1 140px;
  }

  #stocking-page .fs-gph {
    flex: 0 0 110px;
  }

  #stocking-page #fs-add-custom {
    flex: 0 0 auto;
  }
}

#stocking-page .hint {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  opacity: 0.75;
}

#stocking-page .proto-add-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.95rem;
  height: 44px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

#stocking-page .proto-add-button--primary {
  background: rgba(59, 117, 217, 0.55);
  border-color: rgba(163, 200, 255, 0.65);
  box-shadow: 0 2px 6px rgba(59, 117, 217, 0.25);
}

#stocking-page .proto-add-button--primary:hover,
#stocking-page .proto-add-button--primary:focus-visible {
  background: rgba(74, 140, 242, 0.65);
  border-color: rgba(180, 215, 255, 0.9);
}

#stocking-page .proto-add-button:hover,
#stocking-page .proto-add-button:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
}

#stocking-page .proto-add-button:focus-visible {
  outline: 2px solid rgba(163, 200, 255, 0.6);
  outline-offset: 2px;
}

#stocking-page .proto-add-button[disabled],
#stocking-page .proto-add-button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

@media (max-width: 600px) {
  #stocking-page .proto-inline-controls {
    flex-direction: column;
    align-items: stretch;
  }

  #stocking-page .proto-inline-controls__field,
  #stocking-page .proto-inline-controls__field--type {
    flex: 1 1 auto;
  }

  #stocking-page .proto-add-button {
    width: 100%;
  }
}

#post-results-explainer.ttg-explainer--bg {
  background: transparent;
  padding: var(--space-8) 0;
  margin: 0;
}

#post-results-explainer h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  font-size: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
  line-height: 1.2;
}

#post-results-explainer h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  font-size: clamp(1.0625rem, 0.95rem + .5vw, 1.25rem);
  line-height: 1.25;
}

#post-results-explainer p {
  max-width: 72ch;
  opacity: .9;
}

/* spacing harmony with ad slot */
.ad-slot--footer + #post-results-explainer,
.ad-container + #post-results-explainer,
.ad-slot-placeholder + #post-results-explainer {
  margin-top: var(--space-8);
}
#stocking-page .proto-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

#stocking-page .proto-filter-empty {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

#stocking-page .proto-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px var(--shadow);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#stocking-page .proto-filter-chip[data-source="custom"] {
  background: rgba(20, 203, 168, 0.12);
  border-color: rgba(20, 203, 168, 0.22);
}

#stocking-page .proto-filter-chip__icon {
  font-size: 0.9rem;
  opacity: 0.85;
}

#stocking-page .proto-filter-chip__label {
  font-weight: 600;
  white-space: nowrap;
}

#stocking-page .proto-filter-chip__gph {
  font-size: 0.85rem;
  color: var(--muted);
}

#stocking-page .proto-filter-chip__remove {
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

#stocking-page .proto-filter-chip__remove:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

#stocking-page .proto-filter-chip__remove:hover,
#stocking-page .proto-filter-chip__remove:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

#stocking-page .proto-filter-chip__remove:active {
  background: rgba(255, 255, 255, 0.24);
}

#stocking-page .proto-filter-summary {
  margin: 10px 0 0;
  font-weight: 600;
}

#stocking-page #filter-turnover [data-role="filter-turnover-value"],
#stocking-page #filter-turnover .proto-turnover {
  display: none !important;
}

#stocking-page .proto-filter-chips[data-has-filters="true"] + .proto-filter-empty {
  display: none;
}
.popover-panel,[role="dialog"].popover{position:fixed;z-index:10020}
.popover-close{inline-size:2.25rem;block-size:2.25rem;border:0;border-radius:.5rem;background:rgba(255,255,255,.08);color:inherit;cursor:pointer}
.popover-close + .popover-close{display:none}

/* Crosscheck UI fix — Oct 2025: filter chips overflow */
.proto-stock .fp-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-start;
  overflow: hidden;
  margin-top: 8px;
}

.proto-stock .fp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  min-width: 0;
  max-width: 100%;
}

.proto-stock .fp-chip .proto-filter-chip__icon {
  flex: 0 0 auto;
}

.proto-stock .fp-chip__label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proto-stock .fp-chip__badge {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: 0.9;
}

.proto-stock .fp-chip__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
}

.proto-stock .fp-chip__close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0;
}

@media (max-width: 480px) {
  .proto-stock .fp-chip {
    padding: 6px 8px;
  }

  .proto-stock .fp-chip__badge {
    font-size: 11px;
  }
}

.proto-stock .filter-status {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}

/* Stocking Advisor popover styles */
.proto-info-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
}

.proto-info-overlay[hidden] {
  display: none !important;
}

.proto-info-overlay.is-active {
  pointer-events: auto;
}

.proto-info-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 24, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.proto-info-overlay.is-active .proto-info-overlay__backdrop {
  opacity: 1;
}

.proto-info-popover {
  position: fixed;
  z-index: 12001;
  max-width: min(360px, calc(100vw - 32px));
  width: min(360px, calc(100vw - 32px));
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(6, 12, 24, 0.96);
  color: #eef3ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 46px -24px rgba(4, 8, 18, 0.72);
  max-height: calc(100vh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
  will-change: top, left, opacity;
}

.proto-info-popover[hidden] {
  display: none !important;
}

.proto-info-popover.is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.proto-info-popover[data-overlay-placement='center'] {
  transform: translate3d(0, 0, 0);
}

.proto-info-popover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.proto-info-popover__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.proto-info-popover__close {
  border: 0;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.proto-info-popover__close:hover,
.proto-info-popover__close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.proto-info-popover__close:focus-visible {
  outline: 2px solid rgba(20, 203, 168, 0.65);
  outline-offset: 2px;
}

.proto-info-popover__body {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(238, 243, 255, 0.92);
}

.proto-info-popover__list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

body.proto-popover-overlay-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
}

.proto-popover {
  position: absolute;
  inset: auto;
  z-index: 1200;
  min-width: 240px;
  max-width: min(320px, 90vw);
  padding: 16px;
  border-radius: 12px;
  background: rgba(6, 12, 24, 0.96);
  color: #eef3ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 46px -24px rgba(4, 8, 18, 0.72);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  will-change: opacity, transform;
}

.proto-popover[hidden] {
  display: none !important;
}

.proto-popover.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.proto-popover header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
}

.proto-popover header h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.proto-popover [data-close] {
  margin-left: auto;
  border: 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.proto-popover [data-close]:hover,
.proto-popover [data-close]:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.proto-popover [data-close]:focus-visible {
  outline: 2px solid rgba(20, 203, 168, 0.65);
  outline-offset: 2px;
}

.proto-popover p {
  margin: 0 0 0.85rem;
  font-size: 0.96rem;
  line-height: 1.5;
}

.proto-popover ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.proto-popover ul li + li {
  margin-top: 0.45rem;
}

.proto-popover .dup-x {
  display: none !important;
}

/* === PROTOTYPE-ONLY compact input for turnover === */
.proto-input-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.proto-input {
  display: inline-block;
  height: 48px;
  line-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 160px;
  max-width: 50vw;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.proto-input--compact {
  width: 140px;
}

@media (min-width: 768px) {
  .proto-input--compact {
    width: 160px;
  }
}

@media (min-width: 1024px) {
  .proto-input--compact {
    width: 180px;
  }
}

.proto-input[readonly] {
  cursor: default;
}

.proto-input-suffix {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #cfe4ff;
  user-select: none;
  pointer-events: none;
}

.proto-turnover {
  margin-top: 8px;
}

/* Stocking Advisor filtration controls */
[data-proto-hide] {
  display: none !important;
}

/* Stocking Advisor shared UI tokens */
/* Defensive: hide any legacy filtration summary card if it leaks in */
#filtration-summary,
.filtration-summary,
[data-card="filtration-summary"],
.filtration-card,
.filter-setup-legacy,
.filter-rows,
.filter-row,
.add-another-filter,
.total-flow,
.turnover,
#filtration-trigger {
  display: none !important;
}

/* Oct 2025 — Prototype-only: hide aggression meter UI */
.proto-stock .meter--aggression,
.proto-stock .aggression-meter,
.proto-stock [data-metric="aggression"] {
  display: none !important;
}

.proto-stock [data-role="aggression-percent"],
.proto-stock [data-info="aggression"],
.proto-stock .env-bar[data-kind="aggression"] {
  display: none !important;
}

.proto-stock #env-bars .env-bar + .env-bar {
  margin-top: 0;
}

.proto-stock #env-bars .bioagg-card {
  row-gap: 12px;
}

.dev-debug {
  font-style: normal;
}

body:not(.debug-on) .dev-debug {
  display: none !important;
}

.proto-debug-badge {
  position: fixed;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(10, 16, 32, 0.82);
  color: #f5f7fb;
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 9999;
}

body:not(.debug-on) .proto-debug-badge {
  display: none;
}

/* Stocking Advisor layout adjustments */
/* Prototype-only adjustments for info popovers and meter hit targets */
.proto-stock .env-bar__fill,
.proto-stock .env-bar__track,
.proto-stock .meter .fill,
.proto-stock .meter .track {
  pointer-events: none;
}

body.prototype-stock-page .ttg-tooltip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Hero spacing tweaks for prototype hero after walkthrough removal */
.proto-stock .hero-header {
  padding: 16px 0 10px;
}

.proto-stock .hero-title {
  margin-bottom: 4px;
}

.proto-stock .hero-subline {
  margin-bottom: 2px;
}

.proto-stock .hero-tagline {
  margin: 0 0 6px 0;
}

body.prototype-stock-page .ttg-tooltip.is-open,
body.prototype-stock-page .ttg-tooltip[data-open="true"],
body.prototype-stock-page .ttg-tooltip[aria-expanded="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.proto-stock .info-dot,
.proto-stock .info-btn {
  position: relative;
  z-index: 2;
}

.proto-stock .info-btn {
  min-width: 36px;
  min-height: 36px;
}

.proto-info-panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(6, 12, 24, 0.65);
  backdrop-filter: blur(2px);
  z-index: 1400;
}

.proto-info-panel[hidden] {
  display: none !important;
}

.proto-info-panel__surface {
  width: min(480px, 100%);
  max-width: 480px;
  border-radius: 16px;
  background: rgba(6, 12, 24, 0.96);
  border: 1px solid rgba(163, 200, 255, 0.32);
  box-shadow: 0 24px 48px rgba(5, 10, 22, 0.45);
  padding: 20px 24px;
  color: rgba(238, 243, 255, 0.92);
}

.proto-info-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.proto-info-panel__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg, #eef3ff);
}

.proto-info-panel__close {
  appearance: none;
  border: 0;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  line-height: 1;
  background: rgba(238, 243, 255, 0.12);
  color: inherit;
  cursor: pointer;
}

.proto-info-panel__close:focus-visible {
  outline: 2px solid rgba(163, 200, 255, 0.8);
  outline-offset: 2px;
}

.proto-info-panel__body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(238, 243, 255, 0.92);
}

.proto-info-panel__body ul {
  padding-left: 18px;
  margin: 0;
  display: grid;
  gap: 8px;
}

.proto-stock.proto-info-panel-open {
  overflow: hidden;
}

/* Stocking Advisor layout styles migrated from inline page styles */
    body.prototype-stock-page {

      margin: 0;
      padding: 0;
      color: var(--fg);
      background: var(--page-bg);
      font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
      min-height: 100vh;
    }

/* === Stocking Advisor: Ad Slot Styling === */
    body.prototype-stock-page .ttg-ad-slot {

      --ttg-ad-border: rgba(129, 155, 211, 0.72);
      --ttg-ad-bg: rgba(12, 20, 36, 0.22);
      --ttg-ad-label-bg: rgba(12, 20, 36, 0.85);
      --ttg-ad-label-color: rgba(226, 235, 255, 0.96);
      margin: 10rem auto;
      padding: clamp(1.5rem, 4vw, 2.75rem);
      max-width: min(100%, 970px);
      min-height: 280px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 20px;
      border: 2px dashed transparent;
      background: transparent;
      text-align: center;
      transition: background 0.3s ease, border-color 0.3s ease;
    }

    body.prototype-stock-page[data-ad-qa="true"] .ttg-ad-slot,
    body.prototype-stock-page .ttg-ad-slot.ttg-ad-slot--empty {

      border-color: var(--ttg-ad-border);
      background: var(--ttg-ad-bg);
    }

    body.prototype-stock-page .ttg-ad-slot::before {

      content: "";
      position: absolute;
      top: 12px;
      left: 16px;
      padding: 4px 10px;
      border-radius: 999px;
      background: var(--ttg-ad-label-bg);
      color: var(--ttg-ad-label-color);
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      pointer-events: none;
      opacity: 0;
      transform: translateY(-6px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      white-space: nowrap;
      z-index: 2;
    }

    body.prototype-stock-page[data-ad-qa="true"] .ttg-ad-slot::before,
    body.prototype-stock-page .ttg-ad-slot.ttg-ad-slot--empty::before {

      content: attr(data-ad-label);
      opacity: 1;
      transform: translateY(0);
    }

    body.prototype-stock-page .ttg-ad-slot::after {

      content: attr(data-ad-label);
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: clamp(1rem, 4vw, 1.75rem);
      background: var(--ttg-ad-label-bg);
      color: var(--ttg-ad-label-color);
      border-radius: inherit;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      z-index: 1;
    }

    body.prototype-stock-page .ttg-ad-slot.ttg-ad-slot--empty::after {

      opacity: 1;
      visibility: visible;
    }

    body.prototype-stock-page .ttg-ad-slot ins.adsbygoogle {

      display: block;
      width: 100%;
      position: relative;
      z-index: 3;
    }

    body.prototype-stock-page a {

      color: var(--link);
    }

    body.prototype-stock-page .wrap {

      max-width: 1160px;
      margin: 0 auto;
      padding: 0 18px;
    }

      body.prototype-stock-page .stocking-page {

        position: relative;
        isolation: isolate;
      }

    body.prototype-stock-page .page-content {

      padding-bottom: 96px;
    }

/* === Stocking Advisor: Hero & Quick Answer === */
    body.prototype-stock-page .hero {

      padding: 12px 0 32px;
      text-align: left;
    }

    body.prototype-stock-page .hero-surface {

      background: var(--card-raised);
      border: 1px solid var(--line);
      border-radius: 22px;
      padding: clamp(1.5rem, 5vw, 2.75rem) clamp(1.25rem, 4vw, 2.8rem);
      box-shadow: 0 32px 60px -36px var(--shadow);
      backdrop-filter: blur(12px);
    }

    body.prototype-stock-page .hero-title {

      margin: 0 0 4px;
    }

    body.prototype-stock-page .hero-subline {

      margin: 0 0 6px;
      color: var(--muted);
    }

    body.prototype-stock-page .brand-name {

      font-weight: 800;
      font-size: clamp(2.4rem, 3vw, 2.9rem);
      letter-spacing: -0.01em;
    }

    body.prototype-stock-page .brand-sub {

      font-size: 0.95rem;
      opacity: 0.85;
      color: var(--muted);
    }

      body.prototype-stock-page .tagline {

        font-size: 1.05rem;
        opacity: 0.85;
        color: var(--muted);
      }

    body.prototype-stock-page .hero .lead {

      max-width: 36rem;
      margin: 6px 0 10px;
      color: var(--muted);
      font-size: 1.05rem;
      line-height: 1.5;
    }

    body.prototype-stock-page .quick-answer {

      margin: 0 auto 28px;
      padding: 18px clamp(1.25rem, 4vw, 2rem);
      border-radius: 18px;
      background: var(--card-raised);
      border: 1px solid var(--line);
      box-shadow: 0 32px 60px -36px var(--shadow);
      color: var(--muted);
      font-size: 1.02rem;
      line-height: 1.6;
      backdrop-filter: blur(12px);
    }

    body.prototype-stock-page .quick-answer p {

      margin: 0;
    }

    body.prototype-stock-page .page-content > .panel:first-of-type {

      margin-top: 10px;
    }

/* === Stocking Advisor: Cards & Panels === */
    body.prototype-stock-page .panel {

      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 20px 20px 22px;
      box-shadow: 0 28px 56px -34px var(--shadow);
      margin-bottom: 20px;
      backdrop-filter: blur(10px);
    }

    body.prototype-stock-page .faq-section {

      margin-top: 40px;
    }

    body.prototype-stock-page .faq-section .section-title {

      margin: 0 0 18px;
    }

    body.prototype-stock-page .faq-accordion {

      display: grid;
      gap: 12px;
    }

    body.prototype-stock-page .faq-item {

      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--card);
      box-shadow: 0 24px 50px -36px var(--shadow);
      overflow: hidden;
    }

    body.prototype-stock-page .faq-trigger {

      width: 100%;
      padding: 16px 18px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      background: transparent;
      border: 0;
      color: inherit;
      font-size: 1.05rem;
      font-weight: 600;
      text-align: left;
      cursor: pointer;
      list-style: none;
    }

    body.prototype-stock-page .faq-trigger::-webkit-details-marker {

      display: none;
    }

    body.prototype-stock-page .faq-trigger::after {

      content: "+";
      font-weight: 700;
      transition: transform 0.2s ease;
    }

    body.prototype-stock-page .faq-trigger[aria-expanded="true"]::after {

      transform: rotate(45deg);
    }

    body.prototype-stock-page .faq-panel {

      padding: 0 18px 18px;
      color: var(--muted);
      font-size: 0.98rem;
      line-height: 1.6;
    }

    body.prototype-stock-page .faq-panel p {

      margin: 0;
    }

    body.prototype-stock-page .controls-row .control-field {

      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
    }

    body.prototype-stock-page .control-field label {

      font-size: 0.92rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
    }

    body.prototype-stock-page .field-label-row {

      display: flex;
      align-items: center;
      gap: 6px;
    }

    body.prototype-stock-page .filter-catalog-debug {

      margin-top: 8px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 0.85rem;
      letter-spacing: 0.01em;
      color: var(--muted);
      background: var(--card);
      border-radius: 12px;
      padding: 6px 12px;
      border: 1px solid var(--line);
      box-shadow: 0 16px 32px -28px var(--shadow);
    }

    body.prototype-stock-page .filter-catalog-debug[data-source='CATALOG'] {

      color: var(--ok);
    }

    body.prototype-stock-page .filter-catalog-debug[data-source='FALLBACK'] {

      color: var(--warn);
    }

    body.prototype-stock-page .field-label-row .info-btn,
    body.prototype-stock-page .filter-turnover-label .info-btn {

      --info-btn-visible: 30px;
      --info-btn-hit: 44px;
      font-size: 0.95rem;
      transform: none;
    }

    body.prototype-stock-page .filter-turnover {

      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: baseline;
    }

    body.prototype-stock-page .filter-turnover-label {

      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-weight: 600;
    }

    body.prototype-stock-page .filter-turnover-value {

      font-variant-numeric: tabular-nums;
    }

    body.prototype-stock-page .link-like:focus-visible,
    body.prototype-stock-page button:focus-visible:not(.info-btn),
    body.prototype-stock-page .toggle:focus-visible {

      outline: 2px solid var(--link);
      outline-offset: 3px;
    }

    body.prototype-stock-page .link-like {

      background: none;
      border: 0;
      padding: 0;
      margin-left: 0.5rem;
      text-decoration: underline;
      cursor: pointer;
      font: inherit;
      color: var(--link);
    }

    body.prototype-stock-page .link-like:hover {

      text-decoration: underline;
    }

    /* prototype-only modal styles */
    body.prototype-stock-page .modal-backdrop.hidden {

      display: none;
    }

    body.prototype-stock-page .modal-backdrop {

      position: fixed;
      inset: 0;
      background: rgba(6, 14, 30, 0.55);
      backdrop-filter: blur(2px);
      z-index: 9999;
      display: grid;
      place-items: center;
    }

    body.prototype-stock-page .modal.card {

      width: min(92vw, 640px);
      max-height: 85vh;
      overflow: auto;
      background: var(--card-raised);
      color: var(--fg);
      border-radius: 16px;
      padding: 20px 22px;
      border: 1px solid var(--line);
      box-shadow: 0 36px 64px -32px var(--shadow);
      position: relative;
    }

    body.prototype-stock-page .icon-btn.modal-close {

      position: absolute;
      top: 10px;
      right: 12px;
      font-size: 22px;
      background: transparent;
      border: 0;
      color: inherit;
      cursor: pointer;
    }

    body.prototype-stock-page .modal .spaced li {

      margin: 12px 0;
    }

    body.prototype-stock-page .link-underline {

      text-decoration: underline;
      font-weight: 600;
    }

    body.prototype-stock-page .muted.small {

      font-size: 0.95rem;
      opacity: 0.9;
      margin-top: 0.5rem;
    }

    body.prototype-stock-page [data-role="tank-spec"] {

      pointer-events: none;
      text-decoration: none;
    }

    body.prototype-stock-page .conditions-list {

      display: grid;
      gap: 10px;
      margin: 18px 0 0;
      padding: 0;
      list-style: none;
    }

    body.prototype-stock-page .condition-item {

      display: grid;
      grid-template-columns: minmax(180px, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: var(--card);
    }

    body.prototype-stock-page .condition-item .label {

      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 600;
    }

    body.prototype-stock-page .condition-item .value {

      color: var(--muted);
      font-size: 0.95rem;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    body.prototype-stock-page .condition-item[data-state="ok"] {

      border-color: var(--ok);
    }

    body.prototype-stock-page .condition-item[data-state="warn"] {

      border-color: var(--warn);
    }

    body.prototype-stock-page .condition-item[data-state="bad"] {

      border-color: var(--bad);
    }

    body.prototype-stock-page .condition-icon {

      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      font-weight: 700;
      font-size: 0.85rem;
    }

    body.prototype-stock-page .condition-item[data-state="ok"] .condition-icon {

      background: var(--ok-soft);
      color: var(--ok);
    }

    body.prototype-stock-page .condition-item[data-state="warn"] .condition-icon {

      background: var(--warn-soft);
      color: var(--warn);
    }

    body.prototype-stock-page .condition-item[data-state="bad"] .condition-icon {

      background: var(--bad-soft);
      color: var(--bad);
    }

    body.prototype-stock-page .bars {

      display: grid;
      gap: 18px;
    }

    body.prototype-stock-page .bar-card {

      display: grid;
      gap: 10px;
    }

    body.prototype-stock-page .bar-header {

      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
    }

    body.prototype-stock-page .bar-header h3 {

      margin: 0;
      font-size: 1.1rem;
    }

    body.prototype-stock-page .bar-wrapper {

      position: relative;
      height: 22px;
      border-radius: 999px;
      background: var(--bar-bg);
      overflow: hidden;
    }

    body.prototype-stock-page .bar-fill,
    body.prototype-stock-page .bar-ghost {

      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      border-radius: 999px;
      transition: width 140ms ease;
    }

    body.prototype-stock-page .bar-fill {

      background: var(--ok);
    }

    body.prototype-stock-page .bar-ghost {

      background: var(--ghost);
      pointer-events: none;
    }

    body.prototype-stock-page .bar-text {

      font-size: 0.96rem;
      color: var(--muted);
    }

    body.prototype-stock-page .status-strip {

      border-radius: 12px;
      padding: 12px 14px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 1.02rem;
      color: var(--fg);
      background: var(--card-raised);
      border: 1px solid var(--line);
      box-shadow: 0 20px 40px -28px var(--shadow);
    }

    body.prototype-stock-page .status-strip[data-state="ok"] {

      background: var(--ok-soft);
      border-color: var(--ok);
    }

    body.prototype-stock-page .status-strip[data-state="warn"] {

      background: var(--warn-soft);
      border-color: var(--warn);
    }

    body.prototype-stock-page .status-strip[data-state="bad"] {

      background: var(--bad-soft);
      border-color: var(--bad);
    }

    #stocking-page #stock-warnings {

      display: flex;
      flex-direction: column;
      gap: var(--space-sm);
      margin: var(--space-sm) 0 0;
    }

    #stocking-page #stock-warnings .status-strip {

      width: 100%;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      font-size: 1rem;
      color: #0b1228;
    }

    #stocking-page #stock-warnings .warning-title {

      font-weight: 700;
    }

    #stocking-page #stock-warnings .warning-message {

      font-size: 0.96rem;
      opacity: 0.92;
    }

    body.prototype-stock-page .stock-grid {

      display: grid;
      gap: 16px;
    }

    body.prototype-stock-page .stock-row {

      display: grid;
      gap: 10px;
      grid-template-columns: 1fr;
    }

    body.prototype-stock-page .stock-row .see-gear {

      width: 100%;
      justify-content: center;
      margin-top: 0;
    }

    @media (min-width: 540px) {
      body.prototype-stock-page .stock-row {

        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
      }

      body.prototype-stock-page .stock-row .see-gear {

        grid-column: 1 / -1;
      }
    }

    @media (min-width: 780px) {
      body.prototype-stock-page .stock-row {

        grid-template-columns: minmax(160px, 1.4fr) repeat(2, minmax(120px, 1fr)) auto;
      }

      body.prototype-stock-page .stock-row .see-gear {

        grid-column: auto;
        width: auto;
        justify-self: end;
      }
    }

    body.prototype-stock-page .stock-list {

      display: grid;
      gap: 12px;
    }

    body.prototype-stock-page .stock-entry {

      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 8px;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: var(--card);
      box-shadow: 0 20px 44px -32px var(--shadow);
    }

    body.prototype-stock-page .stock-entry__name {

      font-weight: 600;
      font-size: 1rem;
    }

    body.prototype-stock-page .stock-entry__meta {

      color: var(--muted);
      font-size: 0.95rem;
    }

    body.prototype-stock-page .stock-entry__remove {

      appearance: none;
      border: 0;
      border-radius: 10px;
      padding: 8px 12px;
      background: var(--chip);
      color: inherit;
      font-weight: 600;
      cursor: pointer;
      justify-self: start;
    }

    body.prototype-stock-page .stock-entry__remove:hover {

      background: var(--chip-border);
    }

    @media (min-width: 640px) {
      body.prototype-stock-page .stock-entry {

        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
      }

      body.prototype-stock-page .stock-entry__meta {

        justify-self: end;
      }

      body.prototype-stock-page .stock-entry__remove {

        justify-self: end;
      }
    }

    body.prototype-stock-page .stock-empty {

      padding: 10px 2px;
      color: var(--muted);
      font-size: 0.95rem;
    }

    body.prototype-stock-page .secondary-text {

      color: var(--muted);
      font-size: 0.92rem;
    }

    body.prototype-stock-page .subtle {

      color: var(--muted);
      font-size: 0.95rem;
    }

    body.prototype-stock-page .see-gear {

      margin-top: 24px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      background: linear-gradient(90deg, rgba(77, 140, 255, 0.9), rgba(77, 200, 255, 0.88));
      color: #0b1228;
      border: none;
      border-radius: 12px;
      padding: 12px 18px;
      font-size: 1.02rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 16px 28px -20px rgba(52, 120, 255, 0.8);
      text-decoration: none;
    }

    body.prototype-stock-page .diagnostics {

      margin-top: 18px;
      background: rgba(10, 16, 32, 0.82);
      border: 1px dashed rgba(163, 200, 255, 0.4);
      border-radius: 14px;
      padding: 16px;
      display: grid;
      gap: 10px;
      color: var(--muted);
      font-size: 0.95rem;
    }

    body.prototype-stock-page .diagnostics h3 {

      margin: 0 0 4px;
      font-size: 1.05rem;
      color: var(--fg);
    }

    body.prototype-stock-page .diagnostics ul {

      margin: 0;
      padding-left: 20px;
      display: grid;
      gap: 4px;
    }

    body.prototype-stock-page .water-grid {

      display: grid;
      gap: 12px;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    body.prototype-stock-page .sr-only {

      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    @media (prefers-reduced-motion: reduce) {
      body.prototype-stock-page *,
      body.prototype-stock-page *::before,
      body.prototype-stock-page *::after {

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

    /* --- Compact vertical rhythm for Stocking Advisor --- */
    #stocking-page {

      --space-xxs: 4px;
      --space-xs: 6px;
      --space-sm: 10px;
      --space-md: 14px;
      --space-lg: 18px;
    }

    #stocking-page .card,
    #stocking-page .panel {

      padding: var(--space-md) var(--space-md) calc(var(--space-md) + 2px);
      margin-bottom: var(--space-lg);
    }

    #stocking-page .ttg-card {

      padding: 12px 14px 14px;
    }

    @media (max-width: 480px) {
      #stocking-page .ttg-card {

        padding: 10px 12px 12px;
      }
    }

    #stocking-page .card + .card,
    #stocking-page .panel + .card,
    #stocking-page .card + .panel,
    #stocking-page .panel + .panel {

      margin-top: 0;
    }

    #stocking-page .card-title,
    #stocking-page .panel > h2 {

      margin: 0;
      line-height: 1.15;
    }

    #stocking-page .panel > h2 {

      margin-bottom: var(--space-sm);
    }

    #stocking-page .toggle-title {

      margin: 0;
    }

    #stocking-page .row {

      display: flex;
      align-items: center;
      gap: 10px;
    }

    #stocking-page .row.title-row {

      margin: 4px 0 4px;
    }

    #stocking-page .row.title-row.between {

      justify-content: space-between;
    }

    #stocking-page .env-header {

      position: relative;
      overflow: visible;
    }

    #stocking-page #env-card {

      overflow: visible;
      position: relative;
    }

    #stocking-page #env-card.is-tooltip-open {

      z-index: 30;
    }

    #stocking-page .env-header .title-row {

      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      position: relative;
    }

    @media (orientation: portrait) and (max-width: 480px) {
      #stocking-page .env-header {

        position: relative;
      }

      #stocking-page .env-header .title-row {

        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto;
        align-items: center;
        column-gap: 10px;
        justify-content: initial;
      }

      #stocking-page .env-header .title-row .card-title {

        grid-column: 1 / 2;
        margin: 0;
        line-height: 1.15;
      }

      #stocking-page #env-info-btn {

        grid-column: 2 / 3;
        align-self: start;
        margin-top: 2px;
      }

      #stocking-page .env-header .card-subtitle {

        margin-top: 4px;
        grid-column: 1 / -1;
      }
    }

    #stocking-page .card-header {

      margin-bottom: 8px;
    }

    #stocking-page .card-header .card-subtitle {

      margin: 2px 0 0;
      font-size: 13px;
      line-height: 1.35;
      color: var(--muted);
    }

    #stocking-page .card p,
    #stocking-page .panel p {

      margin-top: var(--space-xs);
      margin-bottom: var(--space-sm);
    }

    #stocking-page .tank-size-card .form-row {

      margin-bottom: var(--space-xs);
    }

    #stocking-page .select-wrap {

      margin: 8px 0 10px;
    }

    #stocking-page .select-wrap select {

      min-height: 44px;
      padding-right: 44px;
    }

    #stocking-page .tank-size-card .facts-line {

      margin-top: var(--space-sm);
      margin-bottom: var(--space-sm);
    }

    #stocking-page #stock-list {

      gap: var(--space-sm);
    }

    #stocking-page #stock-list .stock-entry {

      padding: var(--space-sm) var(--space-md);
      gap: var(--space-xs);
    }

    #stocking-page #stock-list .stock-entry__meta {

      margin-top: var(--space-xxs);
    }

    #stocking-page #stock-list .stock-entry__remove {

      min-height: 44px;
    }

    #stocking-page #stock-list .stock-entry + .stock-entry {

      margin-top: 0;
    }

    #stocking-page #stock-list-card .stock-empty {

      padding: var(--space-sm) var(--space-xs);
    }

    #stocking-page .env-card .section-lead {

      margin-bottom: var(--space-sm);
    }

    #stocking-page .env-card .env-divider {

      margin: var(--space-sm) 0;
    }

    #stocking-page .env-card table {

      border-spacing: 0;
    }

    #stocking-page .env-card table th,
    #stocking-page .env-card table td {

      padding: 10px 12px;
      line-height: 1.25;
    }

    #stocking-page .env-bars {

      margin-top: 10px;
      row-gap: 10px;
    }

    #stocking-page .env-bars .env-bar,
    #stocking-page .env-bars .bar-row {

      margin-bottom: var(--space-xs);
      padding-top: var(--space-xs);
      padding-bottom: var(--space-xs);
    }

    #stocking-page .env-bars .env-bar:last-child,
    #stocking-page .env-bars .bar-row:last-child {

      margin-bottom: 0;
    }

    /* ----- Compact Bioload/Aggression card adjustments ----- */
    #stocking-page #bioagg-card {

      min-height: 0 !important;
      height: auto !important;
      flex: 0 0 auto !important;
    }

    #stocking-page #bioagg-card.is-compact {

      padding-top: 8px;
      padding-bottom: 10px;
    }

    @media (orientation: portrait) and (max-width: 480px) {
      #stocking-page #bioagg-card.is-compact {

        padding-top: 6px;
        padding-bottom: 8px;
      }
    }

    #stocking-page button:not(.info-btn),
    #stocking-page select {

      min-height: 44px;
    }

    @media (max-width: 480px) {
      #stocking-page {

        --space-sm: 8px;
        --space-md: 12px;
        --space-lg: 16px;
      }

      #stocking-page .ttg-card {

        padding: 10px 12px 12px;
      }

      #stocking-page .row {

        gap: 8px;
      }

      #stocking-page .row.title-row {

        margin: 2px 0 2px;
      }

      #stocking-page .card-header {

        margin-bottom: 6px;
      }

      #stocking-page .card-header .card-subtitle {

        font-size: 12.5px;
      }

      #stocking-page .env-card table th,
      #stocking-page .env-card table td {

        padding: 8px 10px;
      }
    }

    @media (min-width: 1024px) {
      body.prototype-stock-page .hero {

        padding-top: 16px;
      }

      body.prototype-stock-page .page-content > .panel:first-of-type {

        margin-top: 14px;
      }
    }

    #stocking-page .tank-size-card + .card-spacer:empty {

      display: none !important;
    }

  
/* Tank size + env legend refinements migrated from inline */
        /* Layout tightening */
        body.prototype-stock-page .tank-size-card .form-row {

          margin-bottom: 8px;
        }

        /* --- Tank Size chevron styles (scoped) --- */
        body.prototype-stock-page .tank-size-card .select-wrap {

          position: relative;
        }
        body.prototype-stock-page .tank-size-card .select-wrap select {

          display: block;
          width: 100%;
          height: 44px;
          line-height: 44px;
          padding: 0 44px 0 14px;
          border-radius: 12px;
          border: 1px solid var(--line);
          background: var(--card);
          color: inherit;
          -webkit-appearance: none;
          -moz-appearance: none;
          appearance: none;
          /* iOS: keeps native picker while allowing custom icon */
        }
        body.prototype-stock-page .tank-size-card .select-wrap .chevron {

          position: absolute;
          right: 14px;
          top: 50%;
          width: 16px;
          height: 16px;
          transform: translateY(-50%);
          opacity: 0.8;
          pointer-events: none;
          /* IMPORTANT: never block taps on the select */
          transition: transform 0.18s ease, opacity 0.18s ease;
        }
        body.prototype-stock-page .tank-size-card .select-wrap:hover .chevron {

          opacity: 0.95;
        }
        body.prototype-stock-page .tank-size-card .select-wrap.open .chevron {

          transform: translateY(-50%) rotate(180deg);
        }
        body.prototype-stock-page .tank-size-card .select-wrap select:focus {

          outline: 2px solid var(--info-btn-focus);
          outline-offset: 2px;
        }
        @media (prefers-reduced-motion: reduce) {
          body.prototype-stock-page .tank-size-card .select-wrap .chevron {

            transition: none;
          }
        }

          /* Facts line (empty when none selected) */
          body.prototype-stock-page .tank-size-card .facts-line {

            margin-top: 8px;
          }

          body.prototype-stock-page .heads-up-note {

            margin-top: 12px;
            padding: 12px 14px;
            border-radius: 12px;
            background: var(--card);
            border: 1px solid var(--line);
            font-size: 0.95rem;
            line-height: 1.5;
            color: var(--muted);
          }

          body.prototype-stock-page .heads-up-note strong {

            color: var(--fg);
          }

        /* Ensure the card can host positioned children safely */
        body.prototype-stock-page .tank-size-card {
 position: relative; }

        /* Info buttons adopt Cycling Coach parity */
        #stocking-page .info-btn {

          --info-btn-hit: 44px;
          --info-btn-visible: 30px;
          --info-btn-icon: var(--fg);
          font-size: 0.95rem;
          transform: none;
        }

        /* Env. Recommendations single icon “expanded” state (if present) */
        #stocking-page [data-role="env-info"][aria-expanded="true"] {

          --info-btn-bg: rgba(20, 203, 168, 0.9);
          --info-btn-bg-hover: rgba(20, 203, 168, 0.95);
          --info-btn-bg-active: rgba(20, 203, 168, 0.82);
          --info-btn-border: rgba(20, 203, 168, 0.95);
          --info-btn-border-hover: rgba(20, 203, 168, 1);
          --info-btn-border-active: rgba(20, 203, 168, 0.92);
          --info-btn-focus: rgba(20, 203, 168, 0.55);
          color: #0b1b18;
        }

        #stocking-page [data-role="env-info"][aria-expanded="true"]::before {

          box-shadow: 0 0 0 2px rgba(20, 203, 168, 0.25);
        }

        /* Environmental legend collapsed by default */
        #stocking-page #env-card [data-role="env-legend"] {

          display: none;
          margin: 0;
          padding-top: 0;
          opacity: 0;
          transition: opacity 160ms ease;
        }

        #stocking-page #env-card.info-open [data-role="env-legend"] {

          display: block;
          opacity: 1;
        }

        #stocking-page #env-card .env-bars .env-bar,
        #stocking-page #env-card .env-bars .bar-row {

          margin-bottom: 0;
        }

        #stocking-page #env-card.info-open .env-bars .env-bar,
        #stocking-page #env-card.info-open .env-bars .bar-row {

          margin-bottom: var(--space-xs);
        }

        #stocking-page #env-card.info-open .env-bars .env-bar:last-child,
        #stocking-page #env-card.info-open .env-bars .bar-row:last-child {

          margin-bottom: 0;
        }

      
body.prototype-stock-page .howto-steps {
  margin: 16px 0 24px;
  padding-left: 1.25rem;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

body.prototype-stock-page .howto-steps li {
  padding-left: 0.25rem;
}

body.prototype-stock-page .howto-steps strong {
  color: var(--fg);
  display: block;
  font-size: 1rem;
  margin-bottom: 2px;
}

/* TODO: When CSS bundling is available, merge these Stocking Advisor-only rules into the shared bundle. */
/* === Stocking Advisor: Legacy Filtration Hide === */
/* PROTOTYPE ONLY — block any lingering legacy UI from appearing */
.filtration-card,
.filtration-summary,
.filter-setup-legacy,
.filter-rows,
.filter-row,
.add-another-filter,
.total-flow,
.turnover,
#filtration-summary,
[data-card="filtration-summary"],
#filtration-trigger {
  display: none !important;
}

/* === Stocking Advisor: Prototype Info Tooltip === */
.prototype-stock-page .info-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.proto-info-tooltip {
  position: absolute;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(6, 12, 24, 0.96);
  border: 1px solid rgba(163, 200, 255, 0.32);
  color: rgba(238, 243, 255, 0.92);
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 18px 36px rgba(4, 10, 30, 0.4);
  z-index: 1100;
  pointer-events: auto;
}

.proto-info-tooltip[hidden] {
  display: none !important;
}

.proto-info-tooltip__body {
  margin: 0;
}

/* === Stocking Advisor: Layout & Components === */
html,
body {
  margin: 0;
  padding: 0;
  color: var(--fg);
  background: var(--page-bg);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100vh;
}

.ttg-ad-slot {
  --ttg-ad-border: rgba(129, 155, 211, 0.72);
  --ttg-ad-bg: rgba(12, 20, 36, 0.22);
  --ttg-ad-label-bg: rgba(12, 20, 36, 0.85);
  --ttg-ad-label-color: rgba(226, 235, 255, 0.96);
  margin: 10rem auto;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  max-width: min(100%, 970px);
  min-height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: 2px dashed transparent;
  background: transparent;
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease;
  contain: layout;
}

body[data-ad-qa="true"] .ttg-ad-slot,
.ttg-ad-slot.ttg-ad-slot--empty {
  border-color: var(--ttg-ad-border);
  background: var(--ttg-ad-bg);
  min-height: 0;
}

#site-footer {
  min-height: 200px;
}

.ttg-ad-slot::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ttg-ad-label-bg);
  color: var(--ttg-ad-label-color);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  z-index: 2;
}

body[data-ad-qa="true"] .ttg-ad-slot::before,
.ttg-ad-slot.ttg-ad-slot--empty::before {
  content: attr(data-ad-label);
  opacity: 1;
  transform: translateY(0);
}

.ttg-ad-slot::after {
  content: attr(data-ad-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1rem, 4vw, 1.75rem);
  background: var(--ttg-ad-label-bg);
  color: var(--ttg-ad-label-color);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
}

.ttg-ad-slot.ttg-ad-slot--empty::after {
  opacity: 1;
  visibility: visible;
}

.ttg-ad-slot ins.adsbygoogle {
  display: block;
  width: 100%;
  position: relative;
  z-index: 3;
}

a {
  color: var(--link);
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
}

.stocking-page {
    position: relative;
    isolation: isolate;
  }

.page-content {
  padding-bottom: 96px;
}

.hero {
  padding: 12px 0 32px;
  text-align: left;
}

.hero-surface {
  background: var(--card-raised);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(1.5rem, 5vw, 2.75rem) clamp(1.25rem, 4vw, 2.8rem);
  box-shadow: 0 32px 60px -36px var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-title {
  margin: 0 0 4px;
}

.hero-subline {
  margin: 0 0 6px;
  color: var(--muted);
}

.brand-name {
  font-weight: 800;
  font-size: clamp(2.4rem, 3vw, 2.9rem);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.95rem;
  opacity: 0.85;
  color: var(--muted);
}

.tagline {
    font-size: 1.05rem;
    opacity: 0.85;
    color: var(--muted);
  }

.hero .lead {
  max-width: 36rem;
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.quick-answer {
  margin: 0 auto 28px;
  padding: 18px clamp(1.25rem, 4vw, 2rem);
  border-radius: 18px;
  background: var(--card-raised);
  border: 1px solid var(--line);
  box-shadow: 0 32px 60px -36px var(--shadow);
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
  backdrop-filter: blur(12px);
}

.quick-answer p {
  margin: 0;
}

.page-content > .panel:first-of-type {
  margin-top: 10px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 20px 22px;
  box-shadow: 0 28px 56px -34px var(--shadow);
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.faq-section {
  margin-top: 40px;
}

.faq-section .section-title {
  margin: 0 0 18px;
}

.faq-accordion {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 24px 50px -36px var(--shadow);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  list-style: none;
}

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

.faq-trigger::after {
  content: "+";
  font-weight: 700;
  transition: transform 0.2s ease;
}

.faq-trigger[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.faq-panel {
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.faq-panel p {
  margin: 0;
}

.controls-row .control-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.control-field label {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.field-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-catalog-debug {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: var(--card);
  border-radius: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 32px -28px var(--shadow);
}

.filter-catalog-debug[data-source='CATALOG'] {
  color: var(--ok);
}

.filter-catalog-debug[data-source='FALLBACK'] {
  color: var(--warn);
}

.field-label-row .info-btn,
.filter-turnover-label .info-btn {
  --info-btn-visible: 30px;
  --info-btn-hit: 44px;
  font-size: 0.95rem;
  transform: none;
}

.filter-turnover {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.filter-turnover-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.filter-turnover-value {
  font-variant-numeric: tabular-nums;
}

.link-like:focus-visible,
button:focus-visible:not(.info-btn),
.toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.link-like {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 0.5rem;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  color: var(--link);
}

.link-like:hover {
  text-decoration: underline;
}

/* prototype-only modal styles */
.modal-backdrop.hidden {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 14, 30, 0.55);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: grid;
  place-items: center;
}

.modal.card {
  width: min(92vw, 640px);
  max-height: 85vh;
  overflow: auto;
  background: var(--card-raised);
  color: var(--fg);
  border-radius: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  box-shadow: 0 36px 64px -32px var(--shadow);
  position: relative;
}

.icon-btn.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 22px;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.modal .spaced li {
  margin: 12px 0;
}

.link-underline {
  text-decoration: underline;
  font-weight: 600;
}

.muted.small {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

[data-role="tank-spec"] {
  pointer-events: none;
  text-decoration: none;
}

.conditions-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.condition-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}

.condition-item .label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.condition-item .value {
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.condition-item[data-state="ok"] {
  border-color: var(--ok);
}

.condition-item[data-state="warn"] {
  border-color: var(--warn);
}

.condition-item[data-state="bad"] {
  border-color: var(--bad);
}

.condition-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
}

.condition-item[data-state="ok"] .condition-icon {
  background: var(--ok-soft);
  color: var(--ok);
}

.condition-item[data-state="warn"] .condition-icon {
  background: var(--warn-soft);
  color: var(--warn);
}

.condition-item[data-state="bad"] .condition-icon {
  background: var(--bad-soft);
  color: var(--bad);
}

.bars {
  display: grid;
  gap: 18px;
}

.bar-card {
  display: grid;
  gap: 10px;
}

.bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.bar-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.bar-wrapper {
  position: relative;
  height: 22px;
  border-radius: 999px;
  background: var(--bar-bg);
  overflow: hidden;
}

.bar-fill,
.bar-ghost {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: 999px;
  transition: width 140ms ease;
}

.bar-fill {
  background: var(--ok);
}

.bar-ghost {
  background: var(--ghost);
  pointer-events: none;
}

.bar-text {
  font-size: 0.96rem;
  color: var(--muted);
}

.status-strip {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.02rem;
  color: var(--fg);
  background: var(--card-raised);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -28px var(--shadow);
}

.status-strip[data-state="ok"] {
  background: var(--ok-soft);
  border-color: var(--ok);
}

.status-strip[data-state="warn"] {
  background: var(--warn-soft);
  border-color: var(--warn);
}

.status-strip[data-state="bad"] {
  background: var(--bad-soft);
  border-color: var(--bad);
}

#stocking-page #stock-warnings {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: var(--space-sm) 0 0;
}

#stocking-page #stock-warnings .status-strip {
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 1rem;
  color: #0b1228;
}

#stocking-page #stock-warnings .warning-title {
  font-weight: 700;
}

#stocking-page #stock-warnings .warning-message {
  font-size: 0.96rem;
  opacity: 0.92;
}

.chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--chip);
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.92rem;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip.warning,
.chip[data-tone="warn"] {
  border-color: var(--chip-warn-border);
  color: var(--chip-warn-text);
}

.chip.danger,
.chip[data-tone="bad"] {
  border-color: var(--chip-bad-border);
  color: var(--chip-bad-text);
}

.chip__icon {
  font-size: 0.95em;
  line-height: 1;
}

.chip__text {
  display: inline;
}

.stock-grid {
  display: grid;
  gap: 16px;
}

.stock-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.stock-row .see-gear {
  width: 100%;
  justify-content: center;
  margin-top: 0;
}

@media (min-width: 540px) {
.stock-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

.stock-row .see-gear {
    grid-column: 1 / -1;
  }
}

@media (min-width: 780px) {
.stock-row {
    grid-template-columns: minmax(160px, 1.4fr) repeat(2, minmax(120px, 1fr)) auto;
  }

.stock-row .see-gear {
    grid-column: auto;
    width: auto;
    justify-self: end;
  }
}

.stock-list {
  display: grid;
  gap: 12px;
}

.stock-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 20px 44px -32px var(--shadow);
}

.stock-entry__name {
  font-weight: 600;
  font-size: 1rem;
}

.stock-entry__meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.stock-entry__remove {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--chip);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  justify-self: start;
}

.stock-entry__remove:hover {
  background: var(--chip-border);
}

@media (min-width: 640px) {
.stock-entry {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
  }

.stock-entry__meta {
    justify-self: end;
  }

.stock-entry__remove {
    justify-self: end;
  }
}

.stock-empty {
  padding: 10px 2px;
  color: var(--muted);
  font-size: 0.95rem;
}

.secondary-text {
  color: var(--muted);
  font-size: 0.92rem;
}

.subtle {
  color: var(--muted);
  font-size: 0.95rem;
}

.see-gear {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(77, 140, 255, 0.9), rgba(77, 200, 255, 0.88));
  color: #0b1228;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 28px -20px rgba(52, 120, 255, 0.8);
  text-decoration: none;
}

.diagnostics {
  margin-top: 18px;
  background: rgba(10, 16, 32, 0.82);
  border: 1px dashed rgba(163, 200, 255, 0.4);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.diagnostics h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--fg);
}

.diagnostics ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

.water-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Compact vertical rhythm for Stocking Advisor --- */
#stocking-page {
  --space-xxs: 4px;
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 14px;
  --space-lg: 18px;
}

#stocking-page .card,
#stocking-page .panel {
  padding: var(--space-md) var(--space-md) calc(var(--space-md) + 2px);
  margin-bottom: var(--space-lg);
}

#stocking-page .ttg-card {
  padding: 12px 14px 14px;
}

@media (max-width: 480px) {
#stocking-page .ttg-card {
    padding: 10px 12px 12px;
  }
}

#stocking-page .card + .card,
#stocking-page .panel + .card,
#stocking-page .card + .panel,
#stocking-page .panel + .panel {
  margin-top: 0;
}

#stocking-page .card-title,
#stocking-page .panel > h2 {
  margin: 0;
  line-height: 1.15;
}

#stocking-page .panel > h2 {
  margin-bottom: var(--space-sm);
}

#stocking-page .toggle-title {
  margin: 0;
}

#stocking-page .row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#stocking-page .row.title-row {
  margin: 4px 0 4px;
}

#stocking-page .row.title-row.between {
  justify-content: space-between;
}

#stocking-page .env-header {
  position: relative;
  overflow: visible;
}

#stocking-page #env-card {
  overflow: visible;
  position: relative;
}

#stocking-page #env-card.is-tooltip-open {
  z-index: 30;
}

#stocking-page .env-header .title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}

@media (orientation: portrait) and (max-width: 480px) {
#stocking-page .env-header {
    position: relative;
  }

#stocking-page .env-header .title-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    column-gap: 10px;
    justify-content: initial;
  }

#stocking-page .env-header .title-row .card-title {
    grid-column: 1 / 2;
    margin: 0;
    line-height: 1.15;
  }

#stocking-page #env-info-btn {
    grid-column: 2 / 3;
    align-self: start;
    margin-top: 2px;
  }

#stocking-page .env-header .card-subtitle {
    margin-top: 4px;
    grid-column: 1 / -1;
  }
}

#stocking-page .card-header {
  margin-bottom: 8px;
}

#stocking-page .card-header .card-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

#stocking-page .card p,
#stocking-page .panel p {
  margin-top: var(--space-xs);
  margin-bottom: var(--space-sm);
}

#stocking-page .tank-size-card .form-row {
  margin-bottom: var(--space-xs);
}

#stocking-page .select-wrap {
  margin: 8px 0 10px;
}

#stocking-page .select-wrap select {
  min-height: 44px;
  padding-right: 44px;
}

#stocking-page .tank-size-card .facts-line {
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
}

#stocking-page #stock-list {
  gap: var(--space-sm);
}

#stocking-page #stock-list .stock-entry {
  padding: var(--space-sm) var(--space-md);
  gap: var(--space-xs);
}

#stocking-page #stock-list .stock-entry__meta {
  margin-top: var(--space-xxs);
}

#stocking-page #stock-list .stock-entry__remove {
  min-height: 44px;
}

#stocking-page #stock-list .stock-entry + .stock-entry {
  margin-top: 0;
}

#stocking-page #stock-list-card .stock-empty {
  padding: var(--space-sm) var(--space-xs);
}

#stocking-page .env-card .section-lead {
  margin-bottom: var(--space-sm);
}

#stocking-page .env-card .env-divider {
  margin: var(--space-sm) 0;
}

#stocking-page .env-card table {
  border-spacing: 0;
}

#stocking-page .env-card table th,
#stocking-page .env-card table td {
  padding: 10px 12px;
  line-height: 1.25;
}

#stocking-page .env-bars {
  margin-top: 10px;
  row-gap: 10px;
}

#stocking-page .env-bars .env-bar,
#stocking-page .env-bars .bar-row {
  margin-bottom: var(--space-xs);
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
}

#stocking-page .env-bars .env-bar:last-child,
#stocking-page .env-bars .bar-row:last-child {
  margin-bottom: 0;
}

/* ----- Compact Bioload/Aggression card adjustments ----- */
#stocking-page #bioagg-card {
  min-height: 0 !important;
  height: auto !important;
  flex: 0 0 auto !important;
}

#stocking-page #bioagg-card.is-compact {
  padding-top: 8px;
  padding-bottom: 10px;
}

@media (orientation: portrait) and (max-width: 480px) {
#stocking-page #bioagg-card.is-compact {
    padding-top: 6px;
    padding-bottom: 8px;
  }
}

#stocking-page button:not(.info-btn),
#stocking-page select {
  min-height: 44px;
}

@media (max-width: 480px) {
#stocking-page {
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
  }

#stocking-page .ttg-card {
    padding: 10px 12px 12px;
  }

#stocking-page .row {
    gap: 8px;
  }

#stocking-page .row.title-row {
    margin: 2px 0 2px;
  }

#stocking-page .card-header {
    margin-bottom: 6px;
  }

#stocking-page .card-header .card-subtitle {
    font-size: 12.5px;
  }

#stocking-page .env-card table th,
#stocking-page .env-card table td {
    padding: 8px 10px;
  }
}

@media (min-width: 1024px) {
.hero {
    padding-top: 16px;
  }

.page-content > .panel:first-of-type {
    margin-top: 14px;
  }
}

#stocking-page .tank-size-card + .card-spacer:empty {
  display: none !important;
}

/* === Stocking Advisor: Tank Size Controls & Env Legend === */
/* Layout tightening */
.tank-size-card .form-row {
  margin-bottom: 8px;
}

/* --- Tank Size chevron styles (scoped) --- */
.tank-size-card .select-wrap {
  position: relative;
}
.tank-size-card .select-wrap select {
  display: block;
  width: 100%;
  height: 44px;
  line-height: 44px;
  padding: 0 44px 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
/* iOS: keeps native picker while allowing custom icon */
}
.tank-size-card .select-wrap .chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  opacity: 0.8;
  pointer-events: none;
/* IMPORTANT: never block taps on the select */
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.tank-size-card .select-wrap:hover .chevron {
  opacity: 0.95;
}
.tank-size-card .select-wrap.open .chevron {
  transform: translateY(-50%) rotate(180deg);
}
.tank-size-card .select-wrap select:focus {
  outline: 2px solid var(--info-btn-focus);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
.tank-size-card .select-wrap .chevron {
    transition: none;
  }
}

/* Facts line (empty when none selected) */
.tank-size-card .facts-line {
    margin-top: 8px;
  }

.heads-up-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--muted);
  }

.heads-up-note strong {
    color: var(--fg);
  }

/* Ensure the card can host positioned children safely */
.tank-size-card { position: relative; }

/* Info buttons adopt Cycling Coach parity */
#stocking-page .info-btn {
  --info-btn-hit: 44px;
  --info-btn-visible: 30px;
  --info-btn-icon: var(--fg);
  font-size: 0.95rem;
  transform: none;
}

/* Env. Recommendations single icon “expanded” state (if present) */
#stocking-page [data-role="env-info"][aria-expanded="true"] {
  --info-btn-bg: rgba(20, 203, 168, 0.9);
  --info-btn-bg-hover: rgba(20, 203, 168, 0.95);
  --info-btn-bg-active: rgba(20, 203, 168, 0.82);
  --info-btn-border: rgba(20, 203, 168, 0.95);
  --info-btn-border-hover: rgba(20, 203, 168, 1);
  --info-btn-border-active: rgba(20, 203, 168, 0.92);
  --info-btn-focus: rgba(20, 203, 168, 0.55);
  color: #0b1b18;
}

#stocking-page [data-role="env-info"][aria-expanded="true"]::before {
  box-shadow: 0 0 0 2px rgba(20, 203, 168, 0.25);
}

/* Environmental legend collapsed by default */
#stocking-page #env-card [data-role="env-legend"] {
  display: none;
  margin: 0;
  padding-top: 0;
  opacity: 0;
  transition: opacity 160ms ease;
}

#stocking-page #env-card.info-open [data-role="env-legend"] {
  display: block;
  opacity: 1;
}

#stocking-page #env-card .env-bars .env-bar,
#stocking-page #env-card .env-bars .bar-row {
  margin-bottom: 0;
}

#stocking-page #env-card.info-open .env-bars .env-bar,
#stocking-page #env-card.info-open .env-bars .bar-row {
  margin-bottom: var(--space-xs);
}

#stocking-page #env-card.info-open .env-bars .env-bar:last-child,
#stocking-page #env-card.info-open .env-bars .bar-row:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Mobile Horizontal Overflow Prevention
   Fixes side-to-side scrolling on mobile devices (iPhone 15, etc.)
   ========================================================================== */

html,
body {
  overflow-x: hidden;
}

/* Ensure all main containers stay within viewport */
body * {
  max-width: 100%;
}

/* Word wrapping for all text content */
p,
h1, h2, h3, h4, h5, h6,
li,
td, th,
span,
label,
summary {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Force long URLs and strings to break */
a {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Specific fix for very long URLs like GPT links */
.assistant-btn,
.assistant-link,
.assistant-actions a,
.how-card a,
.feature-card a,
.about-card a {
  word-break: break-all;
}

/* Ensure assistant page containers don't overflow */
.assistant-shell,
.assistant-hero,
.assistant-section,
.feature-card,
.how-card,
.prompt-card,
.faq-card,
.about-card,
.cta-card {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Prevent flex children from causing overflow */
.assistant-actions,
.feature-grid,
.how-grid,
.prompt-grid {
  min-width: 0;
}

/* Mobile-specific overflow fixes */
@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
    width: 100%;
  }

  .assistant-shell {
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .assistant-hero,
  .assistant-section {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Temporarily hide AdSense slots during content expansion phase */
.ttg-ad-slot {
  display: none !important;
}
