/* ==========================================================================
   NUTGYM — Design System
   White + light green only. Light theme only. Locked palette — do not add
   competing accent colors (see build spec, section 4).
   ========================================================================== */

:root {
  /* ---- Color: locked palette ---- */
  --color-bg: #FFFFFF;
  --color-surface: #F4F6F4;
  --color-surface-raised: #FFFFFF;
  --color-surface-sunken: #EEF2EF;
  --color-border: #E1E7E3;
  --color-border-strong: #C9D2CC;

  --color-text: #12211A;
  --color-text-secondary: #445048;
  --color-text-muted: #7C8A82;
  --color-text-on-accent: #0F2A19;

  --color-accent: #4ECB78;
  --color-accent-strong: #2FA85D;
  --color-accent-soft: #E7F8EC;
  --color-accent-line: #B9E9C7;

  --color-danger: #C4453A;
  --color-danger-soft: #FBEAE8;

  /* ---- Typography ---- */
  --font-display: 'Manrope', -apple-system, sans-serif;
  --font-body: 'Manrope', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.6rem;
  --text-2xl: 2.1rem;
  --text-3xl: 2.9rem;

  /* ---- Spacing (8pt grid) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* ---- Radius ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ---- Shadow ---- */
  --shadow-sm: 0 1px 2px rgba(18, 33, 26, 0.06);
  --shadow-md: 0 6px 20px rgba(18, 33, 26, 0.08);
  --shadow-lg: 0 16px 40px rgba(18, 33, 26, 0.12);

  /* ---- Motion ---- */
  --dur-fast: 120ms;
  --dur-base: 220ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 72px;
}

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

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--color-accent-strong);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-text);
  color: #fff; padding: var(--space-2) var(--space-4); z-index: 200;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); border-radius: var(--radius-sm); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
  white-space: nowrap;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--color-accent); color: var(--color-text-on-accent); }
.btn-primary:hover { background: var(--color-accent-strong); box-shadow: var(--shadow-md); }

.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border-strong); }
.btn-secondary:hover { background: var(--color-surface-sunken); }

.btn-ghost { background: transparent; color: var(--color-text-secondary); border-color: var(--color-border); }
.btn-ghost:hover { background: var(--color-surface); }

.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); min-height: 36px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   Top navigation
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height); gap: var(--space-5);
}
.brand { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-weight: 800; font-size: var(--text-lg); }
.brand .mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--color-accent);
  display: grid; place-items: center; color: var(--color-text-on-accent); font-weight: 800; font-size: var(--text-sm);
}
.brand .tagline { display: none; }

.main-nav { display: flex; align-items: center; gap: var(--space-5); }
.main-nav a {
  font-weight: 600; font-size: var(--text-sm); color: var(--color-text-secondary);
  padding: var(--space-2) 0; border-bottom: 2px solid transparent;
  transition: color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--color-text); border-color: var(--color-accent); }

.nav-tools { display: flex; align-items: center; gap: var(--space-3); }

.country-select {
  appearance: none; background: var(--color-surface); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill); padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs); font-weight: 700; cursor: pointer;
}

.compare-chip {
  position: relative; display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--color-surface); border: 1px solid var(--color-border-strong);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 700; cursor: pointer;
}
.compare-chip .count {
  background: var(--color-accent); color: var(--color-text-on-accent);
  min-width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 800;
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--space-2); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--color-text); margin: 4px 0; }

@media (max-width: 880px) {
  .main-nav { position: fixed; inset: var(--nav-height) 0 0 0; background: var(--color-bg);
    flex-direction: column; align-items: flex-start; padding: var(--space-6) var(--space-5);
    transform: translateX(100%); transition: transform var(--dur-base) var(--ease); gap: var(--space-5); overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: var(--text-md); width: 100%; }
  .nav-toggle { display: block; }
  .nav-tools .country-select { display: none; }
}

/* ==========================================================================
   Search bar
   ========================================================================== */

.search-bar {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--color-surface-raised); border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-pill); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
  box-shadow: var(--shadow-sm); transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.search-bar:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); }
.search-bar input { flex: 1; border: none; background: none; outline: none; font-size: var(--text-md); }
.search-bar input::placeholder { color: var(--color-text-muted); }
.search-bar .btn { flex-shrink: 0; }

/* ==========================================================================
   Chips / tags
   ========================================================================== */

.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  background: var(--color-surface); border: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 700; cursor: pointer; color: var(--color-text-secondary);
  transition: all var(--dur-base) var(--ease);
}
.chip:hover { border-color: var(--color-border-strong); color: var(--color-text); }
.chip.active { background: var(--color-accent-soft); border-color: var(--color-accent-line); color: var(--color-text); }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-available { background: var(--color-accent-soft); color: var(--color-accent-strong); }
.badge-limited { background: #FBF3DF; color: #96731B; }
.badge-unavailable { background: var(--color-surface-sunken); color: var(--color-text-muted); }
.badge-demo { background: var(--color-surface-sunken); color: var(--color-text-muted); }

/* ==========================================================================
   Match Ring — signature UI element
   ========================================================================== */

.match-ring { position: relative; display: inline-grid; place-items: center; }
.match-ring svg { transform: rotate(-90deg); }
.match-ring circle.track { fill: none; stroke: var(--color-surface-sunken); }
.match-ring circle.progress { fill: none; stroke: var(--color-accent); stroke-linecap: round; transition: stroke-dashoffset 700ms var(--ease); }
.match-ring .ring-value {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; line-height: 1;
}
.match-ring .ring-value .num { font-size: var(--text-lg); }
.match-ring .ring-value .unit { font-size: 9px; color: var(--color-text-muted); margin-top: 2px; }
.match-ring.sm .ring-value .num { font-size: var(--text-sm); }
.match-ring.low circle.progress { stroke: var(--color-text-muted); }

/* ==========================================================================
   Cards
   ========================================================================== */

.product-card {
  background: var(--color-surface-raised); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3);
  transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
  height: 100%;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--color-border-strong); }
.product-card .thumb {
  overflow: hidden;
  aspect-ratio: 1/1; border-radius: var(--radius-md); background: var(--color-surface);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.product-card .thumb .ring-wrap { position: absolute; top: var(--space-2); right: var(--space-2); }
.product-card .cat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); font-weight: 700; }
.product-card h3 { font-size: var(--text-md); font-weight: 700; }
.product-card .brand { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: 600; }
.product-card .price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; }
.product-card .price { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-md); }
.product-card .per-serving { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-muted); }
.product-card .card-actions { display: flex; gap: var(--space-2); }
.product-card .card-actions .btn { flex: 1; }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-5);
}

/* ==========================================================================
   Sections & layout helpers
   ========================================================================== */

section.block { padding: var(--space-8) 0; }
section.block.tight { padding: var(--space-6) 0; }
section.block.sunken { background: var(--color-surface); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: var(--space-6); gap: var(--space-4); flex-wrap: wrap; }
.section-head h2 { font-size: var(--text-2xl); }
.eyebrow { font-size: var(--text-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent-strong); margin-bottom: var(--space-2); }
.lede { color: var(--color-text-secondary); max-width: 620px; }

.two-col { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }

.panel { background: var(--color-surface-raised); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.field label { font-size: var(--text-xs); font-weight: 700; color: var(--color-text-secondary); }
.field input[type="text"], .field input[type="number"], .field select {
  border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4); background: var(--color-surface-raised); min-height: 44px;
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); }
.radio-group, .check-group { display: flex; flex-direction: column; gap: var(--space-2); }
.radio-group label, .check-group label {
  display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); font-weight: 500;
  padding: var(--space-3) var(--space-4); border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--dur-base) var(--ease);
}
.radio-group label:hover, .check-group label:hover { border-color: var(--color-border-strong); }
.radio-group input:checked + span, .check-group input:checked + span { font-weight: 700; }
.radio-group label:has(input:checked), .check-group label:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-soft); }
.radio-group input, .check-group input { accent-color: var(--color-accent-strong); width: 18px; height: 18px; }
.unsure-option { border-style: dashed !important; color: var(--color-text-muted); }

/* ==========================================================================
   Result / verdict blocks
   ========================================================================== */

.verdict { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-5); border-radius: var(--radius-pill); font-weight: 800; font-size: var(--text-sm); }
.verdict.buy { background: var(--color-accent-soft); color: var(--color-accent-strong); }
.verdict.consider { background: #FBF3DF; color: #96731B; }
.verdict.skip { background: var(--color-danger-soft); color: var(--color-danger); }

.reason-list { display: flex; flex-direction: column; gap: var(--space-2); }
.reason-list li { display: flex; gap: var(--space-3); font-size: var(--text-sm); align-items: flex-start; }
.reason-list.why li::before { content: "✓"; color: var(--color-accent-strong); font-weight: 800; }
.reason-list.why-not li::before { content: "✕"; color: var(--color-danger); font-weight: 800; }
.reason-list.unknown li::before { content: "–"; color: var(--color-text-muted); font-weight: 800; }

/* ==========================================================================
   Compare table
   ========================================================================== */


.compare-toolbar { position: sticky; top: 1rem; z-index: 20; display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:var(--space-4); border:1px solid var(--border); box-shadow:var(--shadow-sm); }
@media (max-width:780px){ .compare-toolbar{flex-direction:column;align-items:stretch;} }
.compare-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.compare-callouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
@media (max-width: 780px) { .compare-callouts { grid-template-columns: 1fr; } }
.callout { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); text-align: center; }
.callout .eyebrow { margin-bottom: var(--space-3); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { border-top: 1px solid var(--color-border); background: var(--color-surface); padding: var(--space-8) 0 var(--space-6); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-6); }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-3); color: var(--color-text-muted); }
.footer-grid ul { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-grid a { font-size: var(--text-sm); color: var(--color-text-secondary); }
.footer-grid a:hover { color: var(--color-text); }
.affiliate-strip { margin-top: var(--space-7); padding-top: var(--space-6); border-top: 1px solid var(--color-border); font-size: var(--text-xs); color: var(--color-text-muted); display: flex; flex-direction: column; gap: var(--space-2); }
.footer-bottom { margin-top: var(--space-6); font-size: var(--text-xs); color: var(--color-text-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); }

/* ==========================================================================
   Misc utility
   ========================================================================== */

.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); } .mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); } .gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); }
.divider { height: 1px; background: var(--color-border); border: none; margin: var(--space-5) 0; }
.empty-state { text-align: center; padding: var(--space-9) var(--space-5); color: var(--color-text-muted); }
.empty-state .icon { font-size: 40px; margin-bottom: var(--space-4); }
.skeleton { background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-surface-sunken) 37%, var(--color-surface) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-md); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.hero-search { padding: var(--space-8) 0 var(--space-7); text-align: center; }
.hero-search h1 { font-size: var(--text-3xl); margin-bottom: var(--space-2); }
.hero-search .lede { margin: 0 auto var(--space-6); text-align: center; }
.hero-search .search-bar { max-width: 620px; margin: 0 auto; }

@media (max-width: 600px) {
  :root { --text-3xl: 2.1rem; --text-2xl: 1.6rem; }
  .compare-callouts, .footer-grid { grid-template-columns: 1fr; }
}
\n/* NUTGYM product imagery */\n.product-card .thumb { position:relative; min-height:210px; display:grid; place-items:center; background:var(--color-surface); }\n.product-thumb-image { width:100%; height:210px; object-fit:contain; display:block; padding:var(--space-4); }\n.product-brand-overlay { position:absolute; left:var(--space-3); bottom:var(--space-3); background:rgba(255,255,255,.9); padding:4px 7px; border-radius:6px; }\n.product-detail-image-wrap { position:relative; width:100%; height:100%; min-height:380px; display:grid; place-items:center; }\n.product-detail-image { width:100%; height:100%; max-height:380px; object-fit:contain; padding:var(--space-6); }\n.product-detail-image-wrap .match-ring { position:absolute; right:var(--space-4); bottom:var(--space-4); }\n@media (max-width:700px){ .product-card .thumb{min-height:180px;} .product-thumb-image{height:180px;} .product-detail-image-wrap{min-height:280px;} }\n