/* ==========================================================================
   ExactBowl — Kitchen Bowl Production Design System
   Cobalt Pet-Brand Hero · Terracotta Clay · Butter Scoop Gold · Tactile Print
   100% PC & Mobile Responsive (@container + WCAG 2.2 44px Touch Targets)
   ========================================================================== */

:root {
  --bg-canvas: #fff9f0;
  --bg-surface: #ffffff;
  --bg-elevated: #fff2de;
  --bg-recessed: #f5e5cc;
  --bg-ink: #1e1814;
  --text-secondary: #4e4239;
  --text-muted: #6c5d52;

  --accent-primary: #e85d2a;
  --accent-primary-hover: #cc4a1b;
  --accent-primary-ink: #ffffff;
  --accent-primary-soft: rgba(232, 93, 42, 0.12);

  --accent-secondary: #183153;
  --accent-highlight: #ffc947;

  /* DMB Macro Swatches */
  --sw-prot: #183153;
  --sw-fat: #ffc947;
  --sw-fib: #7c6f64;
  --sw-carb: #e85d2a;
  --sw-ash: #d6c8b6;

  --status-ok: #15803d;
  --status-ok-soft: rgba(21, 128, 61, 0.12);
  --status-warn: #d97706;
  --status-warn-soft: rgba(217, 119, 6, 0.14);
  --status-danger: #c81e1e;
  --status-danger-soft: rgba(200, 30, 30, 0.12);

  --border-subtle: rgba(30, 24, 20, 0.16);
  --border-strong: #1e1814;
  --shadow-card: 5px 5px 0 #1e1814;
  --shadow-hover: 7px 7px 0 #1e1814;

  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  /* Concentric Optical Radii */
  --r-outer: 24px;
  --r-mid: 16px;
  --r-inner: 10px;
  --r-pill: 999px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-6: 24px;
  --s-8: 32px;
  --s-12: 48px;

  --ease-snappy: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-canvas);
  color: var(--bg-ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: clip;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 32px);
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 249, 240, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--border-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bg-ink);
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--r-inner);
  background: var(--accent-primary);
  color: var(--accent-primary-ink);
  display: grid;
  place-items: center;
  border: 2px solid var(--border-strong);
  box-shadow: 2px 2px 0 var(--border-strong);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 8px 12px;
  border-radius: var(--r-pill);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 180ms var(--ease-snappy), color 180ms var(--ease-snappy);
}

.nav-link:hover {
  background: var(--bg-elevated);
  color: var(--bg-ink);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--bg-ink);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.ctrl-btn:hover {
  border-color: var(--accent-primary);
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
}

.lang-btn {
  min-height: 32px;
  padding: 4px 10px;
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--accent-primary);
  color: var(--accent-primary-ink);
}

/* ==========================================================================
   KITCHEN BOWL HERO + OVERLAPPING TACTILE INSTRUMENT DECK
   ========================================================================== */
.hero-section {
  padding-bottom: var(--s-12);
}

.hero-backdrop {
  background: #183153;
  background-image: radial-gradient(rgba(255, 201, 71, 0.17) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  color: #fff9f0;
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: 88px;
  border-bottom: 3px solid var(--border-strong);
}

.deck-overlap-wrap {
  margin-top: -54px;
  position: relative;
  z-index: 4;
}

.hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: var(--s-6);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.hero-backdrop .eyebrow {
  color: #ffc947;
}

.live-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.hero-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.35rem, 4.4vw, 3.95rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.hero-title em {
  color: #ffc947;
  font-style: italic;
}

.hero-sub {
  margin: 0;
  color: rgba(255, 249, 240, 0.88);
  font-size: 0.98rem;
  max-width: 58ch;
  line-height: 1.6;
}

/* Signature Animated Pet Bowl Card */
.signature-stage {
  border-radius: var(--r-outer);
  padding: 18px 20px;
  border: 2px solid var(--border-strong);
  background: #fff9f0;
  color: var(--bg-ink);
  box-shadow: 6px 6px 0 #ffc947;
}

.sig-flex {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sig-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.sig-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
}

.sig-big {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
}

.sig-caption {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   INTERACTIVE INSTRUMENT DECK
   ========================================================================== */
.instrument-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr);
  gap: var(--s-6);
  align-items: start;
}

.panel-card {
  position: relative;
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-radius: var(--r-outer);
  padding: var(--s-6);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 200ms var(--ease-snappy);
}

.panel-card:hover {
  box-shadow: var(--shadow-hover);
}

.deck-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-mid);
  gap: 4px;
}

.seg-btn {
  min-height: 40px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--r-inner);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 160ms var(--ease-snappy);
}

.seg-btn.active {
  background: var(--accent-primary);
  color: var(--accent-primary-ink);
}

.unit-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-inner);
}

.unit-btn {
  min-height: 34px;
  padding: 4px 11px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.unit-btn.active {
  background: var(--bg-surface);
  color: var(--bg-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.presets-wrap {
  margin-bottom: var(--s-4);
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--s-2);
}

.presets-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 160ms var(--ease-snappy);
}

.preset-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.preset-chip.active {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: var(--accent-primary-ink);
}

.control-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-mid);
  padding: var(--s-4);
  margin-bottom: var(--s-4);
}

.weight-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.tactile-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 9px;
  border-radius: var(--r-pill);
  background: linear-gradient(
    to right,
    var(--accent-primary) 0%,
    var(--accent-primary) var(--pct, 40%),
    var(--border-subtle) var(--pct, 40%),
    var(--border-subtle) 100%
  );
  outline: none;
  cursor: pointer;
}

.tactile-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  cursor: grab;
}

.tactile-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--accent-primary);
  cursor: grab;
}

.num-box {
  width: 88px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: var(--r-inner);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--bg-ink);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  text-align: right;
  flex-shrink: 0;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: var(--s-4);
}

.stage-chip {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--r-inner);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--bg-ink);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transition: all 160ms var(--ease-snappy);
}

.stage-chip:hover {
  border-color: var(--accent-primary);
}

.stage-chip.active {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  color: #ffffff;
}

.stage-chip-name {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.stage-chip-mult {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  opacity: 0.78;
}

.meals-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.meals-pills {
  display: inline-flex;
  gap: 6px;
}

.meal-pill {
  min-width: 44px;
  min-height: 38px;
  border-radius: var(--r-inner);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--bg-ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.meal-pill.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--accent-primary-ink);
}

.search-input,
.styled-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--r-inner);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--bg-ink);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.food-picker-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-toggle-btn {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.custom-bag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-inner);
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
}

.custom-bag-grid[hidden] {
  display: none;
}

.mini-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-field label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.mini-field input {
  width: 100%;
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--bg-canvas);
  color: var(--bg-ink);
}

/* ==========================================================================
   RIGHT TELEMETRY STAGE
   ========================================================================== */
.stage-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.active-formula-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border-subtle);
}

.formula-brand-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
}

.formula-title {
  margin: 2px 0 0;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.25;
}

.formula-source-line {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--text-muted);
}

.wsava-pill {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  border: 1px solid rgba(232, 93, 42, 0.28);
}

.wsava-pill.standard {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}

.kpi-tile {
  padding: var(--s-4);
  border-radius: var(--r-mid);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.kpi-tile.hero-tile {
  background: var(--accent-secondary);
  color: #ffffff;
  border-color: var(--accent-secondary);
}

.kpi-tile.hero-tile .kpi-label,
.kpi-tile.hero-tile .kpi-sub {
  color: rgba(255, 255, 255, 0.78);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.kpi-value {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: clamp(1.28rem, 2vw, 1.72rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}

.kpi-sub {
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Precision Scale BOFU Helper Strip */
.scale-helper-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 10px 14px;
  border-radius: var(--r-inner);
  background: #fff6dc;
  border: 1px dashed rgba(30, 24, 20, 0.28);
  font-size: 0.8rem;
  color: var(--bg-ink);
  flex-wrap: wrap;
}

.scale-helper-copy {
  font-weight: 600;
}

.scale-helper-link {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: underline;
  white-space: nowrap;
}

/* Dry Matter Basis (DMB) Visual Bar */
.dmb-panel {
  padding: var(--s-4);
  border-radius: var(--r-mid);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
}

.dmb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}

.dmb-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.dmb-sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.carb-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.carb-badge.optimal { background: var(--status-ok-soft); color: var(--status-ok); }
.carb-badge.moderate { background: var(--status-warn-soft); color: var(--status-warn); }
.carb-badge.high { background: var(--status-danger-soft); color: var(--status-danger); }

.dmb-svg-wrap {
  width: 100%;
  height: 28px;
  border-radius: var(--r-inner);
  overflow: hidden;
  background: var(--bg-recessed);
  margin-bottom: var(--s-3);
}

.dmb-svg-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
}

.dmb-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.legend-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legend-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.sw-prot { background: var(--sw-prot); }
.sw-fat  { background: var(--sw-fat); }
.sw-fib  { background: var(--sw-fib); }
.sw-carb { background: var(--sw-carb); }

.legend-val {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--bg-ink);
}

/* openFDA Status Strip */
.fda-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 12px 14px;
  border-radius: var(--r-mid);
  border: 1px solid rgba(21, 128, 61, 0.28);
  background: var(--status-ok-soft);
}

.fda-strip.alert {
  border-color: rgba(200, 30, 30, 0.35);
  background: var(--status-danger-soft);
}

.fda-strip-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fda-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--status-ok);
  color: #ffffff;
  font-weight: 800;
  flex-shrink: 0;
}

.fda-strip.alert .fda-icon {
  background: var(--status-danger);
}

.fda-strip-title {
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.25;
}

.fda-strip-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.fda-jump-link {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--bg-ink);
  text-decoration: underline;
  white-space: nowrap;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-primary,
.btn-secondary,
.btn-retail {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--r-inner);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 160ms var(--ease-snappy);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--accent-primary-ink);
  border: 2px solid var(--border-strong);
  box-shadow: 3px 3px 0 var(--border-strong);
  flex: 1 1 200px;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--bg-ink);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
}

.btn-retail {
  background: var(--bg-elevated);
  color: var(--bg-ink);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  padding: 8px 13px;
}

.btn-retail:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-retail.amazon-cta {
  background: #ffd166;
  border: 2px solid var(--border-strong);
  color: var(--bg-ink);
  box-shadow: 2px 2px 0 var(--border-strong);
}

.btn-retail.amazon-cta:hover {
  background: #ffc333;
  color: var(--bg-ink);
}

.btn-retail[hidden] {
  display: none;
}

.btn-retail.fresh-cta {
  background: rgba(24, 49, 83, 0.08);
  border-color: rgba(24, 49, 83, 0.24);
  color: var(--accent-secondary);
}

.btn-retail.fresh-cta:hover {
  background: var(--accent-secondary);
  color: #ffffff;
}

.btn-primary:active,
.btn-secondary:active,
.btn-retail:active {
  transform: scale(0.98);
}

/* ==========================================================================
   SECTIONS (COMPARE A VS B, BREED HUBS, OPENFDA MONITOR, SOURCES)
   ========================================================================== */
.content-section {
  padding-block: var(--s-12);
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.section-sub {
  margin: 6px 0 0;
  color: var(--text-secondary);
  max-width: 64ch;
}

.compare-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--s-4);
}

.compare-preset-btn {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--bg-ink);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 160ms var(--ease-snappy);
}

.compare-preset-btn:hover,
.compare-preset-btn.active {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: var(--accent-primary-ink);
}

.compare-preset-btn .mini-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.82;
}

.compare-selectors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--s-4);
  align-items: end;
  margin-bottom: var(--s-6);
}

.vs-orb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-secondary);
  color: #ffc947;
  border: 2px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.compare-verdict-banner {
  padding: var(--s-4) var(--s-6);
  border-radius: var(--r-mid);
  background: var(--accent-secondary);
  color: #ffffff;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}

.verdict-text {
  font-size: 0.96rem;
  font-weight: 600;
}

.verdict-text strong {
  color: var(--accent-highlight);
}

.verdict-delta {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}

.compare-col {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--r-outer);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.compare-col.winner {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.compare-col-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
}

.score-ring {
  min-width: 58px;
  height: 58px;
  border-radius: var(--r-mid);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.compare-col.winner .score-ring {
  background: var(--accent-primary);
  border-color: var(--border-strong);
  color: #ffffff;
}

.score-ring .num { font-size: 1.25rem; font-weight: 700; line-height: 1; }
.score-ring .den { font-size: 0.65rem; opacity: 0.82; }

.metric-table {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-subtle);
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

.metric-row-label { color: var(--text-muted); font-weight: 600; }
.metric-row-val { font-family: var(--font-mono); font-weight: 700; text-align: right; }
.metric-row-val.good { color: var(--status-ok); }
.metric-row-val.warn { color: var(--status-danger); }

.ingredients-list {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  background: var(--bg-canvas);
  padding: 10px 12px;
  border-radius: var(--r-inner);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   BREED HUBS — HORIZONTAL RECTANGLE ROWS (@container Mastery)
   ========================================================================== */
.breed-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--s-4);
}

.breed-tab {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--r-mid);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--bg-ink);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 160ms var(--ease-snappy);
}

.breed-tab:hover { border-color: var(--accent-primary); }
.breed-tab.active {
  background: var(--accent-primary);
  border-color: var(--border-strong);
  color: #ffffff;
}

.breed-tab-title { font-size: 0.86rem; font-weight: 800; }
.breed-tab-vol { font-family: var(--font-mono); font-size: 0.68rem; opacity: 0.8; }

.breed-insight-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 14px 18px;
  border-radius: var(--r-mid);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}

.breed-insight-note { margin: 0; font-size: 0.88rem; color: var(--text-secondary); max-width: 74ch; }

.density-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-inner);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.density-btn {
  min-height: 34px;
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.density-btn.active { background: var(--accent-secondary); color: #ffffff; }

.rect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}

.rect-grid.single-col { grid-template-columns: 1fr; }

.entity-slot {
  container-type: inline-size;
  container-name: entity-card;
}

.hyb-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 92px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--r-mid);
  transition: border-color 180ms var(--ease-snappy), box-shadow 180ms var(--ease-snappy);
}

.hyb-item-row:hover {
  border-color: var(--border-strong);
  box-shadow: 4px 4px 0 var(--border-strong);
}

.entity-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.entity-badge-box {
  width: 52px;
  height: 52px;
  border-radius: var(--r-inner);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.entity-badge-box .big { font-size: 0.86rem; font-weight: 700; color: var(--accent-primary); line-height: 1; }
.entity-badge-box .sm { font-size: 0.58rem; color: var(--text-muted); text-transform: uppercase; }

.entity-copy { min-width: 0; flex: 1; }
.entity-title-full { font-size: 0.94rem; font-weight: 800; color: var(--bg-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entity-desc-clamp { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.entity-meta-line { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }

.hyb-row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.row-btn {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: var(--r-inner);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--bg-ink);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.row-btn.primary { background: var(--accent-primary); border-color: var(--border-strong); color: #ffffff; }

@container entity-card (max-width: 480px) {
  .hyb-item-row { flex-direction: column; align-items: stretch; }
  .entity-title-full,
  .entity-desc-clamp { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .hyb-row-actions { width: 100%; border-top: 1px solid var(--border-subtle); padding-top: 10px; }
  .row-btn { flex: 1; min-height: 44px; }
}

/* ==========================================================================
   OPENFDA RECALL MONITOR & SECTION 5 CLINICAL SOURCES
   ========================================================================== */
.recall-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}

.recall-search-wrap { flex: 1 1 280px; }

.recall-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.recall-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}

.recall-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-mid);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recall-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.class-badge { padding: 3px 9px; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; }
.class-badge.c1 { background: var(--status-danger-soft); color: var(--status-danger); }
.class-badge.c2 { background: var(--status-warn-soft); color: var(--status-warn); }
.recall-firm { font-weight: 800; font-size: 0.94rem; }
.recall-product { font-size: 0.84rem; color: var(--bg-ink); font-weight: 600; }
.recall-reason { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.45; }
.recall-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  flex-wrap: wrap;
}

.empty-state {
  grid-column: 1 / -1;
  padding: var(--s-8);
  text-align: center;
  background: var(--bg-elevated);
  border-radius: var(--r-mid);
  border: 1px dashed var(--border-strong);
  color: var(--text-secondary);
}

/* Section 5: Clinical Methodology & Authoritative Sources */
.sources-section {
  background: var(--bg-elevated);
}

.equations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}

.eq-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-radius: var(--r-mid);
  padding: var(--s-6);
  box-shadow: 4px 4px 0 var(--border-strong);
}

.eq-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 800;
}

.eq-formula {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--r-inner);
  background: var(--accent-secondary);
  color: #ffc947;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.eq-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}

.source-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-mid);
  padding: var(--s-4) var(--s-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 180ms var(--ease-snappy);
}

.source-card:hover {
  border-color: var(--border-strong);
}

.source-org {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.source-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.3;
}

.source-role {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.source-link {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-link:hover {
  color: var(--accent-primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 2px solid var(--border-strong);
  padding-block: var(--s-8);
  background: var(--bg-canvas);
}

.footer-inner { display: flex; flex-direction: column; gap: var(--s-4); }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-4); font-family: var(--font-mono); font-size: 0.78rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--accent-primary); text-decoration: underline; }
.disclosure-text { margin: 0; font-size: 0.78rem; color: var(--text-muted); max-width: 96ch; }

/* ==========================================================================
   RESPONSIVE PC & MOBILE (Zero Horizontal Overflow)
   ========================================================================== */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero-head,
  .instrument-deck,
  .compare-grid,
  .rect-grid,
  .recall-list,
  .equations-grid,
  .sources-grid {
    grid-template-columns: 1fr;
  }
  .compare-selectors { grid-template-columns: 1fr; }
  .vs-orb { margin-inline: auto; }
}

@media (max-width: 640px) {
  .brand-sub { display: none; }
  .panel-card,
  .compare-col,
  .eq-card { padding: var(--s-4); }
  .stage-grid,
  .dmb-legend,
  .custom-bag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-input,
  .styled-select,
  .num-box,
  .mini-field input { font-size: 16px; }
  .sig-flex { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* PRINT / VETERINARY CLINICAL PDF FEEDING SHEET */
.print-banner { display: none; }

@media print {
  body { background: #ffffff; color: #000000; padding: 0; }
  .site-header,
  .hero-backdrop,
  .presets-wrap,
  .scale-helper-strip,
  .action-row,
  #breeds,
  #recalls,
  #sources,
  .compare-presets,
  .compare-selectors,
  .site-footer { display: none !important; }
  .deck-overlap-wrap { margin-top: 0 !important; }
  .panel-card, .compare-col { box-shadow: none !important; border: 1px solid #1e1814 !important; break-inside: avoid; }
  .print-banner { display: block; border-bottom: 2px solid #000000; padding-bottom: 12px; margin-bottom: 18px; }
}


/* ==========================================================================
   WAVE 1 pSEO EDITORIAL MODULES, BREADCRUMBS, DATA TABLES & SILO FOOTER
   ========================================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 249, 240, 0.75);
  margin-bottom: 12px;
}
.breadcrumb a { color: #ffc947; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.pseo-brief-section {
  padding-block: var(--s-8);
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-subtle);
}
.pseo-brief-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-radius: var(--r-outer);
  padding: var(--s-6);
  box-shadow: var(--shadow-card);
}
.pseo-brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--s-6);
  align-items: start;
}
.pseo-h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  font-weight: 800;
  line-height: 1.1;
}
.pseo-copy {
  margin: 0 0 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 66ch;
}
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-mid);
  background: var(--bg-canvas);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-elevated);
}
.data-table td.num {
  font-family: var(--font-mono);
  font-weight: 700;
}
.faq-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-mid);
  padding: 14px 16px;
}
.faq-item summary {
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
}
.faq-item p {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.silo-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--border-subtle);
}
.silo-col h4 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
}
.silo-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.silo-col a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}
.silo-col a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

@media (max-width: 960px) {
  .pseo-brief-grid { grid-template-columns: 1fr; }
  .silo-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .silo-footer-grid { grid-template-columns: 1fr; }
}
