/*
 * Raw & Well — FREE Raw Dog Food Calculator — dedicated stylesheet
 * =============================================================================
 * STANDALONE. Intentionally isolated from the app's ITCSS token system
 * (src/css/**). Brand values below are LOCAL COPIES so this page never depends
 * on, and can never collide with, the application CSS. Brand reference:
 * src/css/core/_tokens.css (teal #1A5F5F, cream #FAF7F0, terracotta #C04E2D,
 * Lora headings / Inter body) — see .claude/rules/typography.md & Design-rules.md.
 * Do NOT @import app CSS here. Do NOT reuse app class names.
 * Page-scoped under .rdfc to avoid any leakage if ever embedded.
 * =============================================================================
 */

/* ---- Self-hosted brand fonts (subset, /public/fonts) ---------------------- */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/lora-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lora-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
}

/* ---- Local design tokens (page-scoped copies, NOT app tokens) ------------- */
.rdfc {
  --rdfc-cream: #FAF7F0;
  --rdfc-white: #FFFFFF;
  --rdfc-teal: #1A5F5F;
  --rdfc-teal-dark: #124747;
  --rdfc-terracotta: #C04E2D;
  --rdfc-terracotta-dark: #A8421F;
  --rdfc-ink: #1A2E1A;
  --rdfc-body: #4A5568;
  --rdfc-muted: #5C6B80;
  --rdfc-border: color-mix(in srgb, #4A5568 14%, transparent);
  --rdfc-teal-surface: rgba(26, 95, 95, 0.06);
  --rdfc-teal-border: rgba(26, 95, 95, 0.18);
  --rdfc-gold: #E6B17E;
  --rdfc-success: #2C5530;

  --rdfc-font-head: 'Lora', Georgia, 'Times New Roman', serif;
  --rdfc-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --rdfc-radius: 12px;
  --rdfc-radius-sm: 8px;
  --rdfc-radius-full: 999px;
  --rdfc-shadow-sm: 0 1px 3px rgba(18, 71, 71, 0.08);
  --rdfc-shadow-md: 0 4px 16px rgba(18, 71, 71, 0.1);
  --rdfc-shadow-lg: 0 8px 32px rgba(18, 71, 71, 0.12);
  --rdfc-max-hero: 68rem;
  --rdfc-max-content: 48rem;
  --rdfc-gutter: clamp(1rem, 0.65rem + 1.75vw, 1.5rem);
  --rdfc-touch: 44px;
  --rdfc-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");

  font-family: var(--rdfc-font-body);
  color: var(--rdfc-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* ---- Reset-ish (scoped) --------------------------------------------------- */
.rdfc *, .rdfc *::before, .rdfc *::after { box-sizing: border-box; }

body.rdfc-body {
  margin: 0;
  overflow-x: clip;
  background-color: var(--rdfc-cream);
  background-image:
    radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--rdfc-terracotta) 3%, transparent) 0%, transparent 45%),
    radial-gradient(circle at 92% 88%, color-mix(in srgb, var(--rdfc-teal) 4%, transparent) 0%, transparent 50%);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* App header horizontal rhythm (header styled locally in the compatibility layer below) */
body.rdfc-body.landing-page .app-header {
  padding-inline: var(--space-2xl);
}

@media (max-width: 1024px) {
  body.rdfc-body.landing-page .app-header {
    padding-inline: var(--space-lg);
  }
}

@media (max-width: 480px) {
  body.rdfc-body.landing-page .app-header {
    padding-inline: var(--space-md);
  }
}

/* ---- Page shell (hero + main share one horizontal rhythm) ----------------- */
.rdfc-page {
  width: 100%;
  max-width: var(--max-width-xl);
  margin-inline: auto;
  padding-inline: var(--space-2xl);
  padding-top: var(--space-md);
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .rdfc-page { padding-inline: var(--space-lg); }
}

@media (max-width: 480px) {
  .rdfc-page { padding-inline: var(--space-md); }
}

/* ---- Hero ----------------------------------------------------------------- */
.rdfc .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--space-md);
  column-gap: var(--space-2xl);
  align-items: start;
  margin: 0 0 var(--space-xl);
  padding-top: var(--space-3xl);
  width: 100%;
}

@media (min-width: 900px) {
  .rdfc .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: auto auto auto auto;
    row-gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    padding-top: var(--space-4xl);
    align-items: center;
  }

  .rdfc .hero-badge-container { grid-column: 1; grid-row: 1; }
  .rdfc .hero__title { grid-column: 1; grid-row: 2; }
  .rdfc .hero__lede { grid-column: 1; grid-row: 3; }
  .rdfc .hero-proof-strip { grid-column: 1; grid-row: 4; }
  .rdfc .hero__visual {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
  }
}

.rdfc .hero-badge-container {
  margin: 0 0 var(--space-sm);
}

/* NRC trust badge — self-contained (avoids landing-page gold-on-gold icon clash) */
.rdfc .rdfc-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-white);
  color: var(--color-deep-teal);
  border: var(--border-width-2x) solid var(--color-soft-gold);
  border-radius: var(--radius-full);
  padding: var(--space-xs) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-snug);
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--box-shadow-sm);
}

.rdfc .rdfc-trust-badge__label {
  color: inherit;
}

.rdfc .rdfc-trust-badge__icon {
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  flex-shrink: 0;
  color: var(--color-deep-teal);
}

.rdfc .rdfc-trust-badge .app-icon--shield-check {
  display: block;
  color: var(--color-deep-teal);
  stroke: currentColor;
}

.rdfc .hero__title {
  font-family: var(--rdfc-font-head);
  font-size: clamp(1.65rem, 1.15rem + 2.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--rdfc-teal);
  margin: 0;
  width: 100%;
  max-width: 100%;
  text-wrap: balance;
}

.rdfc .hero__lede {
  margin: 0;
  max-width: none;
  width: 100%;
}

.rdfc .hero-proof-strip {
  width: 100%;
  max-width: 100%;
  margin: 0;
  margin-left: 0;
  margin-right: 0;
  align-items: stretch;
}

.rdfc .hero-proof-strip__item {
  text-align: left;
}

.rdfc .hero__visual {
  position: relative;
  border-radius: var(--rdfc-radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--rdfc-shadow-lg);
  margin: 0;
  width: 100%;
  min-width: 0;
}
.rdfc .hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 42%;
  filter: brightness(0.9) saturate(1.1) contrast(1.05);
  display: block;
}
.rdfc .hero__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rdfc-cream) 30%, transparent) 0%, transparent 55%);
  pointer-events: none;
}

/* ---- Main layout ---------------------------------------------------------- */
.rdfc .main {
  margin: 0;
  padding: 0 0 var(--space-3xl);
  width: 100%;
}

.rdfc .back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--rdfc-teal);
  transition: color 0.15s;
}
.rdfc .back-link:hover { color: var(--rdfc-teal-dark); }
.rdfc .back-link:focus-visible { outline: 2px solid var(--rdfc-teal); outline-offset: 3px; border-radius: 4px; }
.rdfc .back-link .icon-left { flex-shrink: 0; }
.rdfc .back-link-footer { margin-top: var(--space-2xl); }

/* ---- Typography ----------------------------------------------------------- */
.rdfc h1, .rdfc h2, .rdfc h3 {
  font-family: var(--rdfc-font-head);
  color: var(--rdfc-ink);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.rdfc h2 {
  font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.65rem);
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  background: linear-gradient(90deg, var(--rdfc-teal) 0%, transparent 100%) no-repeat top / 100% 2px;
}
.rdfc h3 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.rdfc p { margin: 0 0 1rem; }
.rdfc a { color: var(--rdfc-teal); }
.rdfc strong { color: var(--rdfc-ink); font-weight: 600; }
.rdfc .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "lnum" 1; }

.rdfc .lede {
  font-size: 1.05rem;
  color: var(--rdfc-body);
}
.rdfc .answer-block {
  background: var(--rdfc-white);
  border-left: 4px solid var(--rdfc-terracotta);
  border-radius: var(--rdfc-radius-sm);
  padding: 1rem 1.25rem;
  box-shadow: var(--rdfc-shadow-sm);
}

/* ---- Calculator widget ---------------------------------------------------- */
.rdfc .calc {
  background: var(--rdfc-white);
  background-image: var(--rdfc-noise);
  border: 1px solid var(--rdfc-border);
  border-radius: var(--rdfc-radius);
  border-top: 3px solid var(--rdfc-terracotta);
  box-shadow: var(--rdfc-shadow-lg);
  padding: 1.5rem;
  margin: 0 0 3rem;
}
@media (min-width: 640px) {
  .rdfc .calc { padding: 2rem 2.25rem; }
}

.rdfc .calc__head {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rdfc-border);
}
.rdfc .calc__title {
  font-family: var(--rdfc-font-head);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--rdfc-ink);
  margin: 0 0 0.25rem;
}
.rdfc .calc__subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--rdfc-muted);
}

.rdfc .calc-progress {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.75rem;
}
.rdfc .calc-progress__seg {
  flex: 1;
  height: 4px;
  border-radius: var(--rdfc-radius-full);
  background: color-mix(in srgb, var(--rdfc-body) 12%, transparent);
  transition: background 0.2s;
}
.rdfc .calc-progress__seg.is-done { background: var(--rdfc-teal); }
.rdfc .calc-progress__seg.is-current { background: var(--rdfc-terracotta); }

.rdfc .step { margin: 0 0 1.5rem; }
.rdfc .step.is-hidden { display: none; }
.rdfc .step-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--rdfc-ink);
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}
.rdfc .step-label__icon,
.rdfc .step-label .icon { color: var(--rdfc-teal); flex-shrink: 0; }
.rdfc .step-hint {
  font-size: 0.82rem;
  color: var(--rdfc-muted);
  margin: 0.35rem 0 0;
}

.rdfc .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rdfc .btn-group--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
}
.rdfc .btn-group--stack {
  flex-direction: column;
}
.rdfc .btn-group--stack .chip {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.rdfc .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--rdfc-white);
  color: var(--rdfc-body);
  border: 1.5px solid var(--rdfc-border);
  border-radius: var(--rdfc-radius-full);
  padding: 0.55rem 1rem;
  min-height: 44px;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.rdfc .chip:hover {
  border-color: var(--rdfc-gold);
  background: color-mix(in srgb, var(--rdfc-gold) 8%, white);
}
.rdfc .chip:focus-visible { outline: 2px solid var(--rdfc-teal); outline-offset: 2px; }
.rdfc .chip.is-active {
  background: var(--rdfc-teal);
  border-color: var(--rdfc-teal);
  color: var(--rdfc-white);
  box-shadow: 0 2px 8px rgba(26, 95, 95, 0.25);
}

.rdfc .weight-row { display: flex; gap: 0.75rem; align-items: stretch; flex-wrap: wrap; }
.rdfc .weight-input {
  font: inherit;
  flex: 1 1 140px;
  min-width: 120px;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--rdfc-border);
  border-radius: var(--rdfc-radius-sm);
  background: var(--rdfc-white);
  color: var(--rdfc-ink);
  font-size: 1.05rem;
}
.rdfc .weight-input:focus-visible { outline: 2px solid var(--rdfc-teal); outline-offset: 1px; border-color: var(--rdfc-teal); }
.rdfc .unit-toggle { flex: 0 0 auto; }
.rdfc .field-error {
  color: var(--rdfc-terracotta-dark);
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
  min-height: 1.1rem;
}
.rdfc .field-error:not(.is-visible) { visibility: hidden; }

.rdfc .calc-btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  padding: 0.95rem 1.5rem;
  border: none;
  border-radius: var(--rdfc-radius-sm);
  background: var(--rdfc-terracotta);
  color: var(--rdfc-white);
  font-size: 1.05rem;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  box-shadow: 0 4px 14px rgba(192, 78, 45, 0.3);
}
.rdfc .calc-btn:hover:not(:disabled) { background: var(--rdfc-terracotta-dark); }
.rdfc .calc-btn:active:not(:disabled) { transform: scale(0.98); }
.rdfc .calc-btn:focus-visible { outline: 2px solid var(--rdfc-teal); outline-offset: 2px; }
.rdfc .calc-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ---- Results -------------------------------------------------------------- */
.rdfc .results {
  margin-top: 2rem;
  scroll-margin-top: 1rem;
  animation: rdfc-fade-up 0.5s ease-out;
}
@keyframes rdfc-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.rdfc .results.is-hidden { display: none; animation: none; }
.rdfc .results:focus-visible { outline: none; }

.rdfc .result-card {
  background: color-mix(in srgb, var(--rdfc-cream) 60%, white);
  border: 1px solid var(--rdfc-teal-border);
  border-radius: var(--rdfc-radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.rdfc .result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rdfc-teal), var(--rdfc-gold));
}

.rdfc .result-kcal {
  text-align: center;
  margin-bottom: 1.25rem;
}
.rdfc .result-kcal-num {
  font-family: var(--rdfc-font-head);
  font-weight: 700;
  font-size: clamp(2.5rem, 2rem + 3vw, 3.5rem);
  color: var(--rdfc-teal);
  line-height: 1;
  position: relative;
  display: inline-block;
}
.rdfc .result-kcal-num::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0.15rem;
  height: 4px;
  background: color-mix(in srgb, var(--rdfc-gold) 50%, transparent);
  border-radius: var(--rdfc-radius-full);
}
.rdfc .result-kcal-unit {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--rdfc-muted);
  margin-top: 0.35rem;
}
.rdfc .result-formula {
  text-align: center;
  font-size: 0.88rem;
  color: var(--rdfc-muted);
  margin: 0 0 1.5rem;
}

.rdfc .result-h {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rdfc-teal-dark);
  margin: 1.5rem 0 0.75rem;
}

.rdfc .stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.rdfc .stat-tile {
  background: var(--rdfc-white);
  border: 1px solid var(--rdfc-border);
  border-radius: var(--rdfc-radius-sm);
  padding: 1rem 0.75rem;
  text-align: center;
  box-shadow: var(--rdfc-shadow-sm);
}
.rdfc .stat-tile__val {
  font-family: var(--rdfc-font-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--rdfc-ink);
  font-variant-numeric: tabular-nums;
}
.rdfc .stat-tile__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rdfc-muted);
  margin-top: 0.2rem;
}

.rdfc .ratio-bar {
  display: flex;
  height: 2rem;
  border-radius: var(--rdfc-radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.rdfc .ratio-bar__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--rdfc-white);
  min-width: 0;
}
.rdfc .ratio-bar__seg--meat { background: var(--rdfc-terracotta); }
.rdfc .ratio-bar__seg--bone { background: var(--rdfc-teal); }
.rdfc .ratio-bar__seg--liver { background: var(--rdfc-success); }
.rdfc .ratio-bar__seg--organ { background: var(--rdfc-gold); color: var(--rdfc-ink); }
.rdfc .ratio-bar__seg--veg { background: color-mix(in srgb, var(--rdfc-success) 70%, var(--rdfc-teal)); }
.rdfc .ratio-bar--pmr .ratio-bar__seg--meat { flex: 80; }
.rdfc .ratio-bar--pmr .ratio-bar__seg--bone { flex: 10; }
.rdfc .ratio-bar--pmr .ratio-bar__seg--liver { flex: 5; }
.rdfc .ratio-bar--pmr .ratio-bar__seg--organ { flex: 5; }
.rdfc .ratio-bar--barf .ratio-bar__seg--meat { flex: 70; }
.rdfc .ratio-bar--barf .ratio-bar__seg--bone { flex: 10; }
.rdfc .ratio-bar--barf .ratio-bar__seg--liver { flex: 5; }
.rdfc .ratio-bar--barf .ratio-bar__seg--organ { flex: 5; }
.rdfc .ratio-bar--barf .ratio-bar__seg--veg { flex: 10; }

.rdfc .breakdown-list {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.rdfc .breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  background: var(--rdfc-white);
  border-radius: var(--rdfc-radius-sm);
  border: 1px solid var(--rdfc-border);
  font-size: 0.92rem;
}
.rdfc .breakdown-row strong {
  color: var(--rdfc-ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex-shrink: 0;
}

.rdfc .calc-note { font-size: 0.82rem; color: var(--rdfc-muted); margin: 0.4rem 0 0; }

.rdfc .result-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.25rem 0 0.5rem;
}
.rdfc .result-table th,
.rdfc .result-table td {
  text-align: left;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid var(--rdfc-border);
  font-size: 0.95rem;
}
.rdfc .result-table th { color: var(--rdfc-muted); font-weight: 600; font-size: 0.8rem; }
.rdfc .result-table td.num, .rdfc .result-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

.rdfc .result-cta {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--rdfc-teal-surface);
  border-radius: var(--rdfc-radius-sm);
  border: 1px solid color-mix(in srgb, var(--rdfc-teal) 15%, transparent);
  text-align: center;
}
.rdfc .result-cta-lead { font-size: 0.95rem; color: var(--rdfc-body); margin: 0 0 1rem; }

.rdfc .cta-btn {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  background: var(--rdfc-terracotta);
  color: var(--rdfc-white);
  padding: 0.8rem 1.5rem;
  border-radius: var(--rdfc-radius-sm);
  box-shadow: 0 4px 12px rgba(192, 78, 45, 0.25);
  transition: background 0.15s;
}
.rdfc .cta-btn:hover { background: var(--rdfc-terracotta-dark); }
.rdfc .cta-btn:focus-visible { outline: 2px solid var(--rdfc-teal); outline-offset: 2px; }

/* ---- Content sections ----------------------------------------------------- */
.rdfc .content {
  max-width: var(--rdfc-max-content);
  margin: 0 auto;
}
.rdfc .content ul { padding-left: 1.25rem; }
.rdfc .content li { margin: 0 0 0.4rem; }

.rdfc .compare-grid {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
@media (min-width: 640px) {
  .rdfc .compare-grid { grid-template-columns: 1fr 1fr; }
}
.rdfc .compare-card {
  background: var(--rdfc-white);
  border: 1px solid var(--rdfc-border);
  border-radius: var(--rdfc-radius-sm);
  padding: 1rem 1.15rem;
  box-shadow: var(--rdfc-shadow-sm);
}
.rdfc .compare-card--ours {
  border-color: color-mix(in srgb, var(--rdfc-success) 30%, transparent);
  border-inline-start: 3px solid var(--rdfc-success);
}
.rdfc .compare-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rdfc-muted);
  margin: 0 0 0.75rem;
}
.rdfc .compare-card--ours .compare-card__title { color: var(--rdfc-success); }
.rdfc .compare-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rdfc .compare-card__list li {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
  align-items: flex-start;
}
.rdfc .compare-card__list .icon,
.rdfc .compare-card__list svg { flex-shrink: 0; margin-top: 0.15rem; }

.rdfc .data-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.92rem; }
.rdfc .data-table th, .rdfc .data-table td {
  border-bottom: 1px solid var(--rdfc-border);
  padding: 0.55rem 0.6rem;
  text-align: left;
}
.rdfc .data-table thead th { color: var(--rdfc-teal-dark); font-weight: 600; }

.rdfc details.faq {
  border-bottom: 1px solid var(--rdfc-border);
  padding: 0.25rem 0;
}
.rdfc details.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--rdfc-ink);
  padding: 0.75rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.rdfc details.faq summary::-webkit-details-marker { display: none; }
.rdfc details.faq summary::after {
  content: '+';
  color: var(--rdfc-gold);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.rdfc details.faq[open] summary::after { content: '–'; color: var(--rdfc-terracotta); }
.rdfc details.faq[open] {
  border-inline-start: 3px solid var(--rdfc-terracotta);
  padding-inline-start: 1rem;
}
.rdfc .faq-list {
  margin: 0;
  padding: 0;
}

.rdfc .table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}
.rdfc .table-scroll .data-table,
.rdfc .table-scroll .result-table {
  margin: 0;
  min-width: 16rem;
}

.rdfc .author {
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  background: var(--rdfc-white);
  border-radius: var(--rdfc-radius);
  border: 1px solid var(--rdfc-border);
  font-size: 0.92rem;
  box-shadow: var(--rdfc-shadow-sm);
}
.rdfc .author__quote {
  font-family: var(--rdfc-font-head);
  font-style: italic;
  color: var(--rdfc-teal-dark);
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.rdfc .page-cta {
  margin-top: 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rdfc-teal) 8%, var(--rdfc-white)) 0%, var(--rdfc-white) 100%);
  border: 1px solid color-mix(in srgb, var(--rdfc-teal) 15%, transparent);
  border-radius: var(--rdfc-radius);
  padding: 2.5rem 1.5rem;
  box-shadow: var(--rdfc-shadow-md);
}
.rdfc .page-cta p {
  font-family: var(--rdfc-font-head);
  font-size: 1.25rem;
  color: var(--rdfc-ink);
  margin: 0 0 1.25rem;
}

.rdfc .disclaimer { font-size: 0.85rem; color: var(--rdfc-muted); margin-top: 2.5rem; }

/* ---- noscript ------------------------------------------------------------- */
.rdfc .noscript-msg {
  background: var(--rdfc-teal-surface);
  border: 1px solid var(--rdfc-teal-border);
  border-radius: var(--rdfc-radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

/* ---- Print: show results, hide interactive/marketing chrome -------------- */
@media print {
  body.rdfc-body { background: #fff; }
  .app-header,
  .rdfc .hero,
  .rdfc .btn-group,
  .rdfc .calc-btn,
  .rdfc .unit-toggle,
  .rdfc .step-label,
  .rdfc .calc-progress,
  .rdfc .calc__head,
  .rdfc .result-cta,
  .rdfc .page-cta,
  .rdfc details.faq,
  .rdfc .compare-grid {
    display: none;
  }
  .rdfc .result-card { border: 1px solid #999; box-shadow: none; }
}

/* ---- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .rdfc * { transition: none; animation: none; }
}

/* ---- Responsive polish (375px → 1280px+) -------------------------------- */
@media (max-width: 639px) {
  .rdfc .hero { row-gap: var(--space-sm); }
  .rdfc .hero__title { font-size: clamp(1.5rem, 1.05rem + 1.6vw, 1.85rem); }
  .rdfc .hero__lede,
  .rdfc .answer-block { padding: var(--space-md); }
  .rdfc .hero-proof-strip { padding: var(--space-md); }
  .rdfc .calc { padding: 1.15rem; margin-bottom: 2rem; }
  .rdfc .calc__title { font-size: 1.2rem; }
  .rdfc .chip { font-size: 0.85rem; padding: 0.5rem 0.75rem; }
  .rdfc .weight-input { min-width: 0; flex: 1 1 100%; }
  .rdfc .unit-toggle { width: 100%; }
  .rdfc .unit-toggle .chip { flex: 1; }
  .rdfc .result-card { padding: 1.15rem; }
  .rdfc .stat-tile__val { font-size: clamp(1rem, 0.9rem + 1vw, 1.35rem); }
  .rdfc .stat-tile { padding: 0.75rem 0.4rem; }
  .rdfc .cta-btn {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  .rdfc .page-cta { padding: 2rem 1.15rem; }
  .rdfc .page-cta p { font-size: 1.1rem; }
  .rdfc .compare-card { padding: 0.9rem 1rem; }
}

@media (max-width: 480px) {
  .rdfc .ratio-bar__seg { font-size: 0; }
  .rdfc .ratio-bar__seg--meat { font-size: 0.62rem; }
  .rdfc .breakdown-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .rdfc .breakdown-row strong { text-align: left; }
  .rdfc .result-formula { font-size: 0.8rem; word-break: break-word; }
}

@media (max-width: 360px) {
  .rdfc .stat-grid { gap: 0.45rem; }
  .rdfc .stat-tile__label { font-size: 0.68rem; }
}

/* Tablet stacked hero — match landing crop (index.css 640–1024): keep dog head in frame */
@media (min-width: 640px) and (max-width: 899px) {
  .rdfc .hero {
    row-gap: var(--space-lg);
  }
  .rdfc .hero__visual {
    aspect-ratio: 10 / 7;
    max-height: none;
  }
  .rdfc .hero__visual img {
    object-position: center top;
  }
}

@media (min-width: 900px) {
  .rdfc .content { padding-inline: 0.5rem; }
  .rdfc .calc { max-width: 52rem; margin-inline: auto; }
}

@media (min-width: 1200px) {
  .rdfc .hero__title { font-size: 2.75rem; }
  .rdfc .hero__visual { aspect-ratio: 5 / 4; }
}

/* =============================================================================
 * STANDALONE COMPATIBILITY LAYER
 * Local copies of the few app tokens + app classes the markup references, so this
 * page renders WITHOUT linking the app's landing.css. Keeps the page self-contained
 * (zero src/ coupling). Token values mirror src/css/core/_tokens.css.
 * ========================================================================== */
.rdfc {
  --space-2xs: 0.125rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: clamp(1.25rem, 0.5rem + 1.6vw, 2rem);
  --space-2xl: clamp(1.5rem, 0.75rem + 1.9vw, 2.5rem);
  --space-3xl: clamp(1.75rem, 1rem + 2.2vw, 3rem);
  --space-4xl: clamp(2rem, 1rem + 3.3vw, 4rem);
  --max-width-xl: 75rem;
  --color-white: #FFFFFF;
  --color-deep-teal: #1A5F5F;
  --color-soft-gold: #E6B17E;
  --border-width-2x: 2px;
  --radius-full: 999px;
  --font-size-sm: 0.875rem;
  --fw-bold: 700;
  --letter-spacing-wide: 0.04em;
  --line-height-snug: 1.3;
  --box-shadow-sm: 0 1px 3px rgba(18, 71, 71, 0.08);
  --icon-size-sm: 1.05rem;
}

/* Inline SVG icons (replace the former js-icon-hydrate app dependency) */
.rdfc svg { display: inline-block; vertical-align: middle; }
.rdfc .icon--size-sm { width: var(--icon-size-sm); height: var(--icon-size-sm); }
.rdfc .u-color-success { color: var(--rdfc-success); }
.rdfc .u-color-danger { color: var(--rdfc-terracotta); }
.rdfc .u-icon-bullet { flex-shrink: 0; margin-top: 0.15rem; }
.rdfc .heading--display { font-family: var(--rdfc-font-head); font-weight: 700; }

/* App header chrome (ported from landing.css — minimal faithful version) */
.rdfc-body .app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--space-2xl);
  background: var(--rdfc-white);
  border-bottom: 1px solid var(--rdfc-border);
}
.rdfc-body .app-header__logo { display: block; width: 150px; height: auto; }
.rdfc-body .app-header__nav { display: flex; align-items: center; }
.rdfc-body .app-header__button,
.rdfc-body .button--nav {
  display: inline-block;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  background: var(--rdfc-terracotta);
  color: var(--rdfc-white);
  padding: 0.55rem 1.15rem;
  border-radius: var(--rdfc-radius-sm);
  transition: background 0.15s;
}
.rdfc-body .app-header__button:hover,
.rdfc-body .button--nav:hover { background: var(--rdfc-terracotta-dark); }
.rdfc-body .app-header__button:focus-visible,
.rdfc-body .button--nav:focus-visible { outline: 2px solid var(--rdfc-teal); outline-offset: 2px; }
@media (max-width: 480px) {
  .rdfc-body .app-header__logo { width: 124px; }
}

/* Hero proof strip (ported from landing.css — minimal faithful version) */
.rdfc .hero-proof-strip {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--rdfc-white);
  border: 1px solid var(--rdfc-border);
  border-radius: var(--rdfc-radius-sm);
  box-shadow: var(--rdfc-shadow-sm);
}
.rdfc .hero-proof-strip__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--rdfc-body);
}
.rdfc .hero-proof-strip__icon { flex-shrink: 0; }

/* Upsell note under results */
.rdfc .result-upsell {
  font-size: 0.82rem;
  color: var(--rdfc-muted);
  margin: 0.75rem 0 0;
  text-align: center;
}
