:root {
  color-scheme: light;
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-raised: #f5f0e8;
  --text: #1c1917;
  --text-muted: #6b625b;
  --text-faint: #756c66;
  --border: #e7e0d5;
  --border-strong: #d6cdbe;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-subtle: #fff7ed;
  --accent-subtle-border: #fdba74;
  --food: #3f6f23;
  --food-subtle: #f2f9e8;
  --success: #167a35;
  --focus-ring: #c2410c;
  --shadow-color: rgba(28, 25, 23, 0.08);
  --skeleton: #ede8e0;
  --skeleton-shine: #f7f3ed;
  --font-display: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  --header-height: 56px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px var(--shadow-color);
  --shadow-md: 0 2px 8px var(--shadow-color), 0 1px 2px var(--shadow-color);
  --shadow-lg: 0 4px 16px var(--shadow-color), 0 2px 4px var(--shadow-color);
  --shadow-xl: 0 8px 32px var(--shadow-color), 0 2px 8px var(--shadow-color);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1917;
  --surface: #292524;
  --surface-raised: #33302e;
  --text: #f5f0e8;
  --text-muted: #b6ada6;
  --text-faint: #968d87;
  --border: #44403c;
  --border-strong: #6b625b;
  --accent: #fb923c;
  --accent-hover: #fdba74;
  --accent-subtle: #431407;
  --accent-subtle-border: #9a3412;
  --food: #b8e875;
  --food-subtle: #1a2e05;
  --success: #4ade80;
  --focus-ring: #fb923c;
  --shadow-color: rgba(0, 0, 0, 0.34);
  --skeleton: #33302e;
  --skeleton-shine: #44403c;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input, select, summary { font: inherit; }
button, summary { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 8px;
  z-index: 1000;
  transform: translateY(-160%);
  border-radius: var(--radius-md);
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.container {
  width: min(1200px, calc(100% - 64px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1200px, calc(100% - 64px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.brand-symbol { position: relative; width: 32px; height: 32px; flex: 0 0 32px; }
.wordmark .brand-mark { position: absolute; inset: 0; width: 32px; height: 32px; }
.wordmark .brand-mark-dark { display: none; }
html[data-theme="dark"] .wordmark .brand-mark-light { display: none; }
html[data-theme="dark"] .wordmark .brand-mark-dark { display: block; }
.wordmark-name { display: flex; flex-direction: column; line-height: 1.02; }
.wordmark-name > span { white-space: nowrap; }

.desktop-nav { display: flex; align-items: center; gap: 22px; }
.desktop-nav a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.desktop-nav a:hover { color: var(--accent); }

.mobile-guide-menu { display: none; position: relative; }
.mobile-guide-menu summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.mobile-guide-menu summary svg { width: 18px; height: 18px; fill: currentColor; }
.mobile-guide-menu[open] summary { border-color: var(--accent); color: var(--accent); }
.mobile-guide-menu summary::-webkit-details-marker { display: none; }
.mobile-guide-links {
  position: absolute;
  right: 0;
  top: 38px;
  width: 210px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  padding: 8px;
}
.mobile-guide-links a {
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 14px;
  text-decoration: none;
}
.mobile-guide-links a:hover { background: var(--surface-raised); }

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}
.icon-button:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.icon-button svg { width: 19px; height: 19px; }

.hero { padding: 56px 0 42px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: 64px;
  align-items: center;
}
.hero-copy { max-width: 650px; }
.eyebrow,
.overline {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1em;
  line-height: 1.35;
  text-transform: uppercase;
}
.hero h1,
.page-title,
.recipe-title,
.category-title,
.card-title,
.guide-title,
.guide h2,
.guide h3 {
  font-family: var(--font-display);
}
.hero h1 {
  max-width: 12ch;
  margin: 12px 0 16px;
  font-size: clamp(42px, 5.3vw, 70px);
  line-height: .98;
  letter-spacing: -.035em;
}
.hero h1.brand-hero-title {
  max-width: 17ch;
  font-size: clamp(38px, 4.7vw, 64px);
}
.brand-hero-title > span { display: block; white-space: nowrap; }
.hero-support {
  max-width: 57ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.65;
}
.allergen-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.allergen-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--success) 35%, var(--border));
  border-radius: 999px;
  background: var(--food-subtle);
  color: color-mix(in srgb, var(--success) 88%, var(--text));
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 750;
}
.allergen-badge svg { width: 14px; height: 14px; }
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--skeleton);
  box-shadow: var(--shadow-lg);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, #1c1917 82%, transparent);
  color: #fff;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.discovery-shell {
  position: sticky;
  top: var(--header-height);
  z-index: 80;
  border-block: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
.discovery-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, .35fr) minmax(165px, .32fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding-block: 10px;
}
.search-wrap { position: relative; }
.search-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-input,
.discovery-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}
.search-input { padding: 10px 44px 10px 42px; }
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus,
.discovery-select:focus { border-color: var(--border-strong); outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.clear-search {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
}
.clear-search:hover { background: var(--surface-raised); color: var(--text); }
.clear-search svg { position: static; width: 16px; height: 16px; transform: none; }
.discovery-select { padding: 9px 34px 9px 12px; }
.filter-trigger {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
.filter-trigger:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.filter-trigger svg { width: 17px; height: 17px; }
.filter-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}

.catalog-tools { padding: 18px 0 4px; }
.quick-filters,
.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  padding: 2px 2px 8px;
}
.quick-filters::-webkit-scrollbar,
.category-strip::-webkit-scrollbar { display: none; }
.quick-filter,
.category-pill {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.quick-filter:hover,
.category-pill:hover { border-color: var(--border-strong); }
.quick-filter[aria-pressed="true"],
.category-pill[aria-pressed="true"] {
  border-color: var(--accent-subtle-border);
  background: var(--accent-subtle);
  color: var(--accent);
}
.quick-filter svg { width: 14px; height: 14px; }
.category-strip { padding-top: 10px; border-top: 1px solid var(--border); }
.category-pill .pill-count { color: var(--text-muted); font-weight: 550; }
.category-pill[aria-pressed="true"] .pill-count { color: currentColor; }

.catalog { padding: 28px 0 72px; }
.catalog-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.catalog-heading-row h2 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.1;
}
.result-count { color: var(--text-muted); font-size: 13px; }
.result-summary { display: flex; align-items: center; gap: 12px; }
.clear-results {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 6px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.category-section {
  margin-top: 52px;
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}
.category-section:first-child { margin-top: 0; }
.category-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.category-title { margin: 4px 0 0; font-size: 26px; line-height: 1.15; }
.category-count { color: var(--text-muted); font-size: 13px; white-space: nowrap; }

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.recipe-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.recipe-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.recipe-card:active { transform: scale(.995); }
.card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--skeleton);
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease-out;
}
.recipe-card:hover .card-image img { transform: scale(1.025); }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 17px; }
.card-category {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 7px 0 7px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.card-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.macro-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}
.macro-chip {
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--text);
  padding: 5px 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}
.macro-chip.calories { background: var(--accent-subtle); color: var(--accent); }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: auto;
  padding-top: 15px;
  color: var(--text-muted);
  font-size: 12px;
}
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta svg { width: 14px; height: 14px; }

.empty-state {
  max-width: 560px;
  margin: 40px auto 80px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 42px 26px;
  text-align: center;
}
.empty-state svg { width: 38px; height: 38px; margin: 0 auto 14px; color: var(--accent); }
.empty-state h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 24px; }
.empty-state p { margin: 0 0 20px; color: var(--text-muted); }

.button-primary,
.button-secondary,
.text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}
.button-primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.button-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.button-secondary { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.button-secondary:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.text-button { border: 0; background: transparent; color: var(--accent); }
.button-primary svg,
.button-secondary svg,
.text-button svg { width: 17px; height: 17px; }

.guides-section { padding: 0 0 78px; }
.section-heading { margin-bottom: 20px; }
.section-heading h2 { margin: 4px 0 0; font-family: var(--font-display); font-size: 28px; }
.guide-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.guide-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.guide-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.guide-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--accent);
}
.guide-icon svg { width: 21px; height: 21px; }
.guide-card h3 { margin: 18px 0 5px; font-family: var(--font-display); font-size: 20px; }
.guide-card p { margin: 0; color: var(--text-muted); font-size: 13px; }
.guide-card .card-arrow { margin-top: auto; padding-top: 14px; color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0 42px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
}
.footer-inner { display: grid; gap: 5px; text-align: center; }
.footer-inner strong { color: var(--text); }

.recipe-page { padding: 32px 0 72px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}
.back-link svg { width: 17px; height: 17px; }
.recipe-intro {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(420px, 1.14fr);
  gap: 44px;
  align-items: center;
  margin-top: 24px;
}
.recipe-title {
  margin: 9px 0 12px;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.03;
  letter-spacing: -.025em;
}
.recipe-description { max-width: 60ch; margin: 0; color: var(--text-muted); font-size: 16px; line-height: 1.65; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--text-muted); font-size: 13px; }
.recipe-meta b { color: var(--text); }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.recipe-tag { border-radius: 999px; background: var(--surface-raised); padding: 5px 9px; font-size: 11px; font-weight: 700; }
.recipe-hero-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--skeleton);
  box-shadow: var(--shadow-lg);
}
.recipe-hero-image img { width: 100%; height: 100%; object-fit: cover; }

.detail-macro-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.detail-macro {
  min-width: 0;
  padding: 14px 16px;
  border-left: 1px solid var(--border);
}
.detail-macro:first-child { border-left: 0; }
.detail-macro .value { display: block; overflow: hidden; color: var(--text); font-family: var(--font-mono); font-size: 18px; font-weight: 750; text-overflow: ellipsis; }
.detail-macro:first-child .value { color: var(--accent); }
.detail-macro .label { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }

.recipe-columns { display: grid; grid-template-columns: minmax(310px, 390px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 28px; }
.recipe-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.panel-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-heading { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.scaler { display: inline-flex; align-items: center; gap: 8px; }
.scaler button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--text);
}
.scaler button:disabled { opacity: .38; cursor: not-allowed; }
.scaler button svg { width: 16px; height: 16px; }
.scaler-output { min-width: 88px; text-align: center; font-size: 12px; font-weight: 750; }
.ingredient-hint { margin: -5px 0 10px; color: var(--text-faint); font-size: 11px; }
.ingredient-list { list-style: none; margin: 0; padding: 0; }
.ingredient-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px dashed var(--border);
  cursor: pointer;
  padding: 8px 0;
}
.ingredient-row:last-child { border-bottom: 0; }
.ingredient-row input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--success);
}
.ingredient-row .ingredient-text { min-width: 0; font-size: 13px; line-height: 1.45; }
.ingredient-row .grams { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }
.ingredient-row.is-checked .ingredient-text { color: var(--text-faint); text-decoration: line-through; }
.component-link { color: var(--accent); font-weight: 650; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }

.method-list { list-style: none; margin: 0; padding: 0; counter-reset: recipe-step; }
.method-list li {
  counter-increment: recipe-step;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 22px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}
.method-list li::before {
  content: counter(recipe-step);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
}
.notes-box {
  margin-top: 6px;
  border: 1px solid var(--accent-subtle-border);
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--text);
  padding: 16px;
  font-size: 13px;
  line-height: 1.55;
}
.notes-box strong { display: block; margin-bottom: 4px; color: var(--accent); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.method-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.nutrition-panel { margin-top: 28px; }
.nutrition-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.nutrition-header p { margin: 0; color: var(--text-muted); font-size: 12px; }
.nutrition-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 3px solid var(--text); }
.nutrition-item { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 10px 8px; font-size: 12px; }
.nutrition-item:nth-child(odd) { background: color-mix(in srgb, var(--surface-raised) 55%, transparent); }
.nutrition-item strong { font-family: var(--font-mono); }
.nutrition-note { margin: 14px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.55; }

.related-section { margin-top: 44px; }
.related-section h2 { margin: 4px 0 16px; font-family: var(--font-display); font-size: 26px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mini-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); text-decoration: none; }
.mini-card:hover { border-color: var(--border-strong); }
.mini-card img { width: 112px; height: 92px; object-fit: cover; background: var(--skeleton); }
.mini-card-copy { align-self: center; min-width: 0; padding: 12px; }
.mini-card-copy span { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.mini-card-copy h3 { margin: 4px 0 0; font-family: var(--font-display); font-size: 15px; line-height: 1.2; }

.guide-page { padding: 32px 0 72px; }
.guide { width: min(720px, 100%); margin: 24px auto 0; }
.guide-title { margin: 8px 0 8px; font-size: clamp(36px, 5vw, 54px); line-height: 1.05; }
.guide-lead { margin: 0 0 32px; color: var(--text-muted); font-size: 17px; line-height: 1.65; }
.guide h2 { margin: 42px 0 10px; font-size: 28px; line-height: 1.2; }
.guide h3 { margin: 34px 0 8px; font-size: 22px; line-height: 1.25; }
.guide p { margin: 10px 0; font-size: 15px; line-height: 1.75; }
.table-scroll { width: 100%; overflow-x: auto; margin: 16px 0; }
.guide table { width: 100%; min-width: 620px; border-collapse: collapse; border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.guide th { border-bottom: 2px solid var(--text); padding: 10px 12px; text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.guide td { border-bottom: 1px solid var(--border); padding: 11px 12px; vertical-align: top; }
.guide tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-raised) 60%, transparent); }
.guide-callout { margin: 18px 0; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--accent-subtle); padding: 14px 16px; font-size: 14px; line-height: 1.65; }

.filter-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: min(74vh, 720px);
  margin: auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xl);
  padding: 0;
}
.filter-dialog::backdrop { background: rgba(28, 25, 23, .55); backdrop-filter: blur(2px); }
.filter-dialog-inner { display: flex; flex-direction: column; max-height: inherit; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 18px 20px; }
.dialog-header h2 { margin: 0; font-family: var(--font-display); font-size: 24px; }
.dialog-close { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 999px; background: var(--surface-raised); }
.dialog-close svg { width: 18px; height: 18px; }
.dialog-body { overflow-y: auto; padding: 20px; }
.dialog-body h3 { margin: 0 0 12px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.dialog-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.dialog-filter-grid .quick-filter { width: 100%; justify-content: flex-start; min-height: 42px; white-space: normal; text-align: left; }
.dialog-sort { margin-top: 24px; }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); background: var(--surface); padding: 14px 20px; }
.dialog-actions .button-primary { min-width: 140px; }

.skeleton {
  background: linear-gradient(100deg, var(--skeleton) 30%, var(--skeleton-shine) 50%, var(--skeleton) 70%);
  background-size: 220% 100%;
  animation: skeleton 1.45s linear infinite;
}
@keyframes skeleton { to { background-position-x: -220%; } }
.loading-shell { padding: 48px 0; }
.loading-hero { width: min(1200px, calc(100% - 64px)); height: 360px; margin: 0 auto 48px; border-radius: var(--radius-xl); }
.loading-line { width: min(560px, 70%); height: 48px; border-radius: var(--radius-md); }
.loading-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.loading-card { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); }
.noscript { margin: 30px auto; max-width: 720px; border: 1px solid var(--border); background: var(--surface); padding: 18px; }

@media (max-width: 1023px) {
  .container,
  .header-inner { width: min(720px, calc(100% - 48px)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); gap: 34px; }
  .hero h1 { font-size: clamp(38px, 6vw, 56px); }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .discovery-bar { grid-template-columns: minmax(220px, 1fr) minmax(150px, .5fr) auto; }
  .discovery-bar .sort-control { display: none; }
  .guide-card-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 0; }
  .recipe-intro { grid-template-columns: minmax(0, .9fr) minmax(350px, 1.1fr); gap: 28px; }
  .related-grid { grid-template-columns: 1fr; }
  .mini-card { grid-template-columns: 130px minmax(0, 1fr); }
  .mini-card img { width: 130px; }
  .nutrition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  :root { --header-height: 56px; }
  .container,
  .header-inner { width: calc(100% - 32px); }
  .header-inner { gap: 10px; }
  .desktop-nav { display: none; }
  .mobile-guide-menu { display: block; }
  .wordmark { font-size: 14px; }
  .brand-symbol { width: 28px; height: 28px; flex-basis: 28px; }
  .wordmark .brand-mark { width: 28px; height: 28px; }
  .hero { padding: 18px 0 24px; }
  .hero-grid { display: flex; flex-direction: column-reverse; gap: 22px; }
  .hero-copy { max-width: none; }
  .hero h1 { max-width: none; margin: 9px 0 10px; font-size: clamp(34px, 11vw, 46px); line-height: 1.01; }
  .hero h1.brand-hero-title { font-size: clamp(30px, 9.6vw, 42px); }
  .hero-support { font-size: 15px; line-height: 1.55; }
  .hero-visual { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
  .hero-caption { left: 10px; right: 10px; bottom: 10px; max-width: none; font-size: 11px; }
  .allergen-row { gap: 6px; margin-top: 15px; }
  .allergen-badge { padding: 5px 8px; font-size: 10px; }
  .discovery-shell { position: sticky; }
  .discovery-bar { grid-template-columns: minmax(0, 1fr) auto; min-height: 64px; }
  .discovery-bar .category-control,
  .discovery-bar .sort-control { display: none; }
  .filter-trigger { width: 44px; padding: 0; }
  .filter-trigger .filter-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .filter-trigger .filter-count { position: absolute; top: -5px; right: -5px; border: 2px solid var(--bg); }
  .filter-trigger { position: relative; }
  .catalog-tools { padding-top: 12px; }
  .quick-filters { display: none; }
  .category-strip { border-top: 0; padding-top: 0; }
  .catalog { padding-top: 18px; }
  .catalog-heading-row { align-items: start; margin-bottom: 24px; }
  .catalog-heading-row h2 { font-size: 25px; }
  .category-section { margin-top: 40px; contain-intrinsic-size: 1200px; }
  .category-title { font-size: 23px; }
  .recipe-grid { grid-template-columns: 1fr; gap: 16px; }
  .card-image { aspect-ratio: 16 / 9; }
  .card-body { padding: 15px; }
  .card-description { -webkit-line-clamp: 1; }
  .guides-section { padding-bottom: 58px; }
  .guide-card-grid { gap: 12px; }
  .site-footer { padding-bottom: max(34px, env(safe-area-inset-bottom)); }
  .recipe-page { padding-top: 18px; }
  .recipe-intro { display: flex; flex-direction: column; gap: 20px; margin-top: 16px; }
  .recipe-intro-copy { order: 2; }
  .recipe-hero-image { order: 1; width: calc(100% + 32px); margin-left: -16px; aspect-ratio: 16 / 9; border-inline: 0; border-radius: 0; }
  .recipe-title { font-size: clamp(34px, 10vw, 46px); }
  .detail-macro-band { grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; margin-top: 22px; }
  .detail-macro { padding: 10px 8px; }
  .detail-macro .value { font-size: 16px; }
  .detail-macro .label { font-size: 9px; }
  .recipe-columns { grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
  .recipe-panel { padding: 18px; }
  .panel-heading-row { align-items: flex-start; flex-direction: column; }
  .scaler button { width: 44px; height: 44px; }
  .ingredient-row { min-height: 48px; }
  .method-list li { font-size: 15px; }
  .nutrition-panel { margin-top: 18px; }
  .nutrition-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .guide-page { padding-top: 18px; }
  .guide-title { font-size: 38px; }
  .guide { margin-top: 18px; }
  .filter-dialog { width: 100%; max-width: none; max-height: 76vh; margin: auto 0 0; border-width: 1px 0 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .dialog-filter-grid { grid-template-columns: 1fr 1fr; }
  .loading-shell { padding-top: 20px; }
  .loading-hero { width: calc(100% - 32px); height: 280px; margin-bottom: 24px; }
  .loading-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .wordmark { font-size: 13px; }
  .mobile-guide-menu > summary { width: 42px; padding: 0; }
  .mobile-guide-label { display: none; }
  .dialog-filter-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .wordmark-name { max-width: 135px; }
  .detail-macro { padding: 8px 5px; }
  .detail-macro .value { font-size: 14px; }
  .detail-macro .label { font-size: 8px; letter-spacing: .04em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --text: #000; --text-muted: #333; --border: #bbb; --accent: #000; }
  .site-header,
  .back-link,
  .recipe-hero-image,
  .recipe-tags,
  .method-actions,
  .related-section,
  .site-footer,
  .filter-dialog { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .container { width: 100%; }
  .recipe-page { padding: 0; }
  .recipe-intro { display: block; margin: 0; }
  .recipe-title { margin-top: 0; font-size: 24pt; }
  .detail-macro-band { break-inside: avoid; }
  .recipe-columns { grid-template-columns: 42% 58%; gap: 14pt; align-items: start; }
  .recipe-panel { border: 0; box-shadow: none; padding: 0; }
  .ingredient-row { min-height: 0; padding: 4pt 0; }
  .ingredient-row input { display: none; }
  .method-list li { break-inside: avoid; margin-bottom: 9pt; }
  .nutrition-panel { break-inside: avoid; border: 0; box-shadow: none; padding: 0; }
  .nutrition-note { font-size: 8pt; }
}
