/* =============================================================================
   XQ2 Film Recipe Explorer — design system
   Premium photography-discovery aesthetic: dark editorial canvas, large
   images doing the talking, one warm film-amber accent (restrained, the way
   the parent site uses one accent hue). Self-contained — does not import
   the parent site's global.css, but follows the same conventions (CSS
   variables, 4px spacing scale, one accent color, subtle borders, 150-300ms
   motion) so it feels like the same family of work without being a copy.
   ============================================================================= */

:root {
  /* --- Palette: "Darkroom" — warm-neutral near-black + film amber accent */
  --bg:            #0b0a09;
  --bg-raised:     #131110;
  --surface:       #17140f;
  --surface-2:     #1e1a15;
  --line:          rgba(240, 230, 210, 0.10);
  --line-strong:   rgba(240, 230, 210, 0.22);
  --ink:           #f3ede1;
  --ink-dim:       #beb2a0;
  --ink-faint:     #8a7d6c;
  --accent:        #e08a3e;
  --accent-hover:  #f2a558;
  --accent-wash:   color-mix(in srgb, var(--accent) 16%, var(--bg) 84%);
  --ok:            #79b673;
  --warn:          #e0a83e;
  --bad:           #d9705f;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --maxw: clamp(20rem, 94vw, 84rem);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-5); }
@media (max-width: 30rem) { .wrap { padding: 0 var(--s-4); } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 10, 9, 0.86);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
@media (max-width: 30rem) {
  .topbar-inner { padding: 0.6rem var(--s-4); gap: 8px; flex-wrap: wrap; row-gap: 8px; }
  .topbar-actions { flex: 1 1 100%; justify-content: flex-end; }
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px 6px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.76rem;
  font-weight: 600;
  flex: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.home-link:hover { color: var(--accent); border-color: var(--line-strong); }
.home-link svg { width: 13px; height: 13px; }
.home-link span { white-space: nowrap; }
@media (max-width: 26rem) { .home-link span { display: none; } .home-link { padding: 7px; } }

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 auto;
  min-width: 0;
}
.brand-badge {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #b85c22);
  color: #171310;
  font-weight: 900;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.02em;
}
.brand-text h1 { margin: 0; font-size: 0.98rem; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text p { margin: 0; font-size: 0.68rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 30rem) { .brand-text p { display: none; } }

.topbar-actions { display: flex; align-items: center; gap: var(--s-3); flex: none; }
.fav-count-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.fav-count-btn:hover { color: var(--accent); border-color: var(--line-strong); }
.fav-count-btn svg { width: 15px; height: 15px; }
.fav-count-btn .icon-fill { fill: var(--accent); stroke: var(--accent); }
@media (max-width: 26rem) { .fav-count-btn span.label { display: none; } .fav-count-btn { padding: 8px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
  min-height: 44px;
}
.btn-primary {
  background: linear-gradient(100deg, var(--accent), #c96a2c);
  color: #171310;
  box-shadow: 0 10px 26px -14px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.05);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,10,9,0.15) 0%, rgba(11,10,9,0.55) 55%, rgba(11,10,9,0.96) 100%),
    linear-gradient(90deg, rgba(11,10,9,0.55) 0%, rgba(11,10,9,0.05) 45%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--s-9) var(--s-5) var(--s-7);
}
.hero-inner-max { max-width: 40rem; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-hover);
  background: rgba(224, 138, 62, 0.14);
  border: 1px solid rgba(224, 138, 62, 0.3);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.8rem;
  margin-bottom: var(--s-4);
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 var(--s-3);
  color: #fff;
}
.hero p.lede {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(243, 237, 225, 0.82);
  max-width: 34rem;
  margin: 0 0 var(--s-5);
  line-height: 1.55;
}
.hero-cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 30rem) {
  .hero { min-height: 74vh; }
  .hero-inner { padding: var(--s-7) var(--s-4) var(--s-6); }
}

/* ---------- section shells ---------- */
.section { padding: var(--s-8) 0; }
.section-tight { padding: var(--s-6) 0; }
@media (max-width: 30rem) { .section { padding: var(--s-6) 0; } }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.section-head .section-sub { color: var(--ink-faint); font-size: 0.86rem; margin-top: 4px; }
.section-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}
.section-link:hover { color: var(--accent); }
.section-link svg { width: 1em; height: 1em; }

/* ---------- Featured: clean 2x2 showcase grid ---------- */
/* 4 top picks, equal-size cards, one consistent photo ratio — no mixed big/
   small tiles competing for attention. The grid itself (not each card) gets
   a max-width and is centered, so the two columns share one symmetric
   gutter instead of each card centering on its own and doubling the middle
   gap. Capped width keeps cards a sensible size — wide enough to feel
   substantial, not so large the 2x2 turns into a two-screen scroll. */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6);
  max-width: 58rem;
  margin: 0 auto;
}
.featured-grid .recipe-photo { aspect-ratio: 3 / 2; }
.featured-grid .recipe-name { font-size: 1.1rem; }
.featured-grid .recipe-tagline { font-size: 0.86rem; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 40rem) {
  .featured-grid { grid-template-columns: 1fr; gap: var(--s-5); max-width: 26rem; }
}

/* ---------- horizontal scroll rows (Recently Added) ---------- */
.hscroll {
  display: flex;
  gap: var(--s-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--s-2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .recipe-card { flex: 0 0 16.5rem; scroll-snap-align: start; }
@media (max-width: 30rem) {
  .hscroll .recipe-card { flex-basis: 78%; }
}

/* ---------- Browse by style ---------- */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: var(--s-3);
}
.style-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.1rem 0.8rem;
  min-height: 64px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.style-pill:hover { border-color: var(--accent); color: var(--accent-hover); transform: translateY(-2px); background: var(--surface-2); }

/* ---------- Recipe card ---------- */
.recipe-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.24s var(--ease), transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
  cursor: pointer;
}
.recipe-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -22px rgba(0,0,0,0.55);
}
.recipe-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(150deg, var(--surface-2), #0d0b09);
}
.recipe-card.is-big .recipe-photo { aspect-ratio: 16 / 12; }
.hscroll .recipe-photo { aspect-ratio: 4 / 5; }
.recipe-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.recipe-card:hover .recipe-photo img { transform: scale(1.05); }
.recipe-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.72) 100%);
  pointer-events: none;
}
.recipe-compat-row { margin: -2px 0 2px; }
.recipe-compat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.recipe-compat-badge.full { background: rgba(121, 182, 115, 0.14); color: #b7e6b0; border: 1px solid rgba(121,182,115,0.4); }
.recipe-compat-badge.partial { background: rgba(224, 168, 62, 0.14); color: #f3cf8e; border: 1px solid rgba(224,168,62,0.4); }
.recipe-compat-badge.none { background: rgba(224, 90, 62, 0.14); color: #f3a58e; border: 1px solid rgba(224,90,62,0.4); }
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(11,10,9,0.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}
.fav-btn:hover { transform: scale(1.08); background: rgba(11,10,9,0.75); }
.fav-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; transition: fill 0.18s var(--ease), stroke 0.18s var(--ease); }
.fav-btn.is-fav svg { fill: var(--accent); stroke: var(--accent); }
.recipe-photo-caption {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  z-index: 2;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.recipe-body {
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}
.recipe-name { font-size: 1.05rem; font-weight: 800; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
.recipe-tagline { font-size: 0.86rem; color: var(--ink-dim); margin: 0; line-height: 1.5; }
.recipe-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  color: var(--ink-faint);
  border: 1px solid var(--line);
}
.chip-film { color: var(--accent-hover); border-color: rgba(224,138,62,0.3); background: rgba(224,138,62,0.08); }

@media (max-width: 30rem) {
  .recipe-body { padding: var(--s-3); gap: 6px; }
  .recipe-name { font-size: 0.98rem; }
  .recipe-tagline { font-size: 0.82rem; }
}

/* ---------- explorer controls ---------- */
.explorer-controls {
  position: sticky;
  top: 56px;
  z-index: 20;
  background: rgba(11,10,9,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: var(--s-4) 0;
  margin-bottom: var(--s-5);
}
.controls-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.search-wrap {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.search-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--ink-faint); pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  min-height: 44px;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-input::placeholder { color: var(--ink-faint); }

.sort-select, .filter-toggle-btn {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-dim);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.filter-toggle-btn { display: inline-flex; align-items: center; gap: 6px; }
.filter-toggle-btn svg { width: 15px; height: 15px; }
.filter-toggle-btn.has-active { border-color: var(--accent); color: var(--accent-hover); }

.filter-panel {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.filter-panel.is-open { display: flex; }
.filter-chip {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.filter-chip:hover { border-color: var(--line-strong); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #171310; }

@media (max-width: 30rem) {
  .explorer-controls { top: 52px; }
  .controls-row { gap: 8px; }
  .sort-select { flex: 1 1 auto; }
}

/* ---------- explorer grid ---------- */
.explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: var(--s-5);
}
@media (max-width: 30rem) {
  .explorer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
}
@media (max-width: 22rem) {
  .explorer-grid { grid-template-columns: 1fr; }
}

.empty-state {
  text-align: center;
  padding: var(--s-8) var(--s-5);
  color: var(--ink-faint);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--s-6) 0 var(--s-8);
  margin-top: var(--s-8);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  color: var(--ink-faint);
  font-size: 0.8rem;
}
.footer-row a { color: var(--ink-dim); }
.footer-row a:hover { color: var(--accent); }

/* =============================================================================
   Recipe detail page
   ============================================================================= */
.detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 78vh;
  overflow: hidden;
  background: #000;
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,10,9,0.05) 0%, rgba(11,10,9,0.35) 65%, rgba(11,10,9,1) 100%);
}
@media (max-width: 30rem) { .detail-hero { aspect-ratio: 4 / 5; } }

.detail-back {
  position: absolute;
  top: var(--s-4);
  left: var(--s-4);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(11,10,9,0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.14);
}
.detail-back:hover { border-color: var(--accent); color: var(--accent-hover); }
.detail-back svg { width: 15px; height: 15px; }

.detail-photo-credit {
  position: absolute;
  bottom: var(--s-3);
  right: var(--s-4);
  z-index: 3;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.65);
  text-align: right;
}
.detail-photo-credit a { text-decoration: underline; color: rgba(255,255,255,0.85); }

.detail-header {
  margin-top: calc(-1 * var(--s-8));
  position: relative;
  z-index: 2;
  padding-bottom: var(--s-6);
}
@media (max-width: 30rem) { .detail-header { margin-top: calc(-1 * var(--s-6)); } }

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.detail-title-row h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.detail-tagline { color: var(--ink-dim); font-size: 1.02rem; margin: 0 0 var(--s-4); max-width: 40rem; }

.compat-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--s-5);
  border: 1px solid var(--line);
}
.compat-banner.full { background: rgba(121, 182, 115, 0.09); border-color: rgba(121,182,115,0.3); }
.compat-banner.partial { background: rgba(224, 168, 62, 0.09); border-color: rgba(224,168,62,0.3); }
.compat-banner.none { background: rgba(217, 112, 95, 0.09); border-color: rgba(217,112,95,0.3); }
.compat-icon { flex: none; width: 26px; height: 26px; margin-top: 2px; }
.compat-icon.full { color: var(--ok); }
.compat-icon.partial { color: var(--warn); }
.compat-icon.none { color: var(--bad); }
.compat-banner-body strong { display: block; font-size: 1.02rem; margin-bottom: 3px; }
.compat-banner-body p { margin: 0; color: var(--ink-dim); font-size: 0.9rem; line-height: 1.55; }
.compat-notes {
  margin: var(--s-3) 0 0;
  padding-left: 1.1rem;
  color: var(--ink-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}
.compat-notes li { margin-bottom: 6px; }
.compat-notes li:last-child { margin-bottom: 0; }

.detail-meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s-5); }

/* --- Settings grid --- */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.settings-card h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 var(--s-4);
  display: flex; align-items: center; gap: 8px;
}
.settings-card h2 svg { width: 1.15em; height: 1.15em; color: var(--accent); }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: var(--s-4) var(--s-5);
}
.setting-item { min-width: 0; }
.setting-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.setting-value {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}
@media (max-width: 30rem) {
  .settings-card { padding: var(--s-4); }
  .settings-grid { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
}

.copy-cta-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); margin: var(--s-6) 0; }
.copy-cta-wrap .btn-primary { font-size: 1rem; padding: 1rem 2.2rem; letter-spacing: 0.02em; }
.copy-cta-hint { font-size: 0.78rem; color: var(--ink-faint); }

/* --- source / attribution card --- */
.source-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
  font-size: 0.9rem;
  color: var(--ink-dim);
}
.source-card h2 { font-size: 0.95rem; font-weight: 800; margin: 0 0 var(--s-3); color: var(--ink); }
.source-row { display: flex; justify-content: space-between; gap: var(--s-3); padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.source-row:last-child { border-bottom: none; }
.source-row .k { color: var(--ink-faint); font-size: 0.82rem; }
.source-row .v { color: var(--ink); font-weight: 600; text-align: right; }
.source-row a.v { color: var(--accent-hover); }
.source-row a.v:hover { text-decoration: underline; }

/* --- related --- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: var(--s-4);
}

/* =============================================================================
   Copy Settings modal / checklist
   ============================================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 5, 4, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-backdrop.is-open { display: flex; }
@media (min-width: 40rem) {
  .modal-backdrop { align-items: center; padding: var(--s-5); }
}
.modal {
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  width: 100%;
  max-width: 34rem;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--s-5);
  animation: modalUp 0.28s var(--ease) both;
}
@media (min-width: 40rem) {
  .modal { border-radius: var(--radius-lg); }
}
@keyframes modalUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-2); }
.modal-head h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-close:hover { color: var(--accent); border-color: var(--line-strong); }
.modal-close svg { width: 16px; height: 16px; }
.modal-sub { color: var(--ink-faint); font-size: 0.84rem; margin: 0 0 var(--s-4); }

.checklist { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
  min-height: 44px;
}
.checklist-item:hover { border-color: var(--line-strong); }
.checklist-item.is-checked { background: rgba(121,182,115,0.08); border-color: rgba(121,182,115,0.35); }
.checklist-box {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.checklist-item.is-checked .checklist-box { background: var(--ok); border-color: var(--ok); }
.checklist-box svg { width: 13px; height: 13px; color: #0b0a09; opacity: 0; transition: opacity 0.12s var(--ease); }
.checklist-item.is-checked .checklist-box svg { opacity: 1; }
.checklist-text { flex: 1 1 auto; min-width: 0; }
.checklist-text .k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-family: var(--font-mono); }
.checklist-text .v { font-size: 0.98rem; font-weight: 700; color: var(--ink); }
.checklist-item.is-checked .checklist-text .v { color: var(--ink-dim); text-decoration: line-through; text-decoration-color: var(--line-strong); }

.modal-actions { display: flex; gap: var(--s-3); }
.copy-progress { text-align: center; font-size: 0.82rem; color: var(--ink-faint); margin-bottom: var(--s-3); }

/* toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 700;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.5);
}
.toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }

/* focus states */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .recipe-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
