/* TunedCook SEO companion site — shared stylesheet.
   Design tokens mirror marketing/landing/index.html exactly (brand accent
   blue #005B9A light / #4DA3D9 dark) so this site reads as the same product
   family as the landing page, just a different section. */

:root {
  --ground:      #F3F6F9;
  --surface:     #FFFFFF;
  --surface-2:   #E9F1F8;
  --hairline:    #DBE3EB;
  --ink:         #16212C;
  --ink-soft:    #45566A;
  --ink-mute:    #78899A;
  --brand:       #005B9A;
  --brand-soft:  #2C7CB8;
  --signal:      #005B9A;
  --signal-ink:  #FFFFFF;
  --on-brand:    #FFFFFF;
  --focus:       #005B9A;
  --radius:      14px;
  --radius-sm:   9px;
  --maxw:        1120px;
  --shadow:      0 1px 2px rgba(20,32,44,.06), 0 10px 30px -12px rgba(20,32,44,.20);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground:    #0C131B;
    --surface:   #121C26;
    --surface-2: #18242F;
    --hairline:  #27343F;
    --ink:       #E6EDF4;
    --ink-soft:  #AAB7C3;
    --ink-mute:  #7E8A96;
    --brand:     #4DA3D9;
    --brand-soft:#6FB4E0;
    --signal:    #4DA3D9;
    --signal-ink:#08161F;
    --on-brand:  #0B1620;
    --focus:     #6FA8DC;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 18px 44px -18px rgba(0,0,0,.6);
  }
}
:root[data-theme="light"] {
  --ground:#F3F6F9; --surface:#FFFFFF; --surface-2:#E9F1F8; --hairline:#DBE3EB;
  --ink:#16212C; --ink-soft:#45566A; --ink-mute:#78899A; --brand:#005B9A;
  --brand-soft:#2C7CB8; --signal:#005B9A; --signal-ink:#FFFFFF; --on-brand:#FFFFFF;
  --focus:#005B9A; --shadow:0 1px 2px rgba(20,32,44,.06), 0 10px 30px -12px rgba(20,32,44,.20);
}
:root[data-theme="dark"] {
  --ground:#0C131B; --surface:#121C26; --surface-2:#18242F; --hairline:#27343F;
  --ink:#E6EDF4; --ink-soft:#AAB7C3; --ink-mute:#7E8A96; --brand:#4DA3D9;
  --brand-soft:#6FB4E0; --signal:#4DA3D9; --signal-ink:#08161F; --on-brand:#0B1620;
  --focus:#6FA8DC; --shadow:0 1px 2px rgba(0,0,0,.4), 0 18px 44px -18px rgba(0,0,0,.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }

/* ---------- Header / Footer (shared across every page) ---------- */
header.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--ground) 84%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.brandmark { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); flex: none; }
.brandmark:hover { text-decoration: none; }
.brand-icon { width: 30px; height: 30px; border-radius: 7px; display: block; flex: none; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--ink-soft); font-size: 14.5px; font-weight: 600; }
.nav-links a:hover { color: var(--brand); text-decoration: none; }
/* Selector must out-specify `.nav-links a` (0,1,1) above, or the pill inherits
   the generic nav-link ink and goes dark-on-dark — see issue #788. */
.nav-cta,
.nav-links a.nav-cta {
  font-size: 14px; font-weight: 650; color: var(--signal-ink);
  padding: 9px 16px; border-radius: 999px; background: var(--signal);
  border: 1px solid color-mix(in srgb, var(--signal) 70%, #000 12%);
  white-space: nowrap;
}
.nav-cta:hover,
.nav-links a.nav-cta:hover { color: var(--signal-ink); text-decoration: none; filter: brightness(1.05); }

main { min-height: 60vh; }

footer.site-footer { border-top: 1px solid var(--hairline); background: var(--surface); margin-top: 48px; }
.foot { display: flex; flex-wrap: wrap; gap: 22px 40px; justify-content: space-between; padding: 36px 0; }
.foot .col-brand { max-width: 320px; }
.foot .brandmark { margin-bottom: 10px; }
.foot p { color: var(--ink-mute); font-size: 14px; }
.foot nav { display: flex; flex-direction: column; gap: 9px; }
.foot nav .h { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 4px; }
.foot nav a { color: var(--ink-soft); font-size: 14px; }
.foot-legal { border-top: 1px solid var(--hairline); padding: 16px 0; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; color: var(--ink-mute); font-size: 12.5px; }
.not-deployed-banner {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-soft); font-size: 12.5px; text-align: center; padding: 6px 12px;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  color: var(--signal-ink); background: var(--signal);
  border: 1px solid color-mix(in srgb, var(--signal) 70%, #000 12%);
  padding: 12px 20px; border-radius: var(--radius-sm);
  transition: transform .05s, filter .15s; white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; font-size: 14.5px; color: var(--ink);
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid var(--hairline);
  background: var(--surface);
}
.btn-secondary:hover { text-decoration: none; border-color: var(--brand); }

/* ---------- CTA banner (used on every recipe + calculator page) ---------- */
.cta-band {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 22px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; box-shadow: var(--shadow);
}
.cta-band .cta-copy strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 3px; }
.cta-band .cta-copy span { font-size: 13.5px; color: var(--ink-mute); }

/* ---------- Answer box (AEO direct-answer block) ---------- */
.answer-box {
  background: var(--surface-2); border: 1px solid var(--hairline); border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); padding: 18px 20px; margin: 18px 0 28px;
  font-size: 16px; color: var(--ink); line-height: 1.65;
}
.answer-box .answer-label { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: 8px; }

/* ---------- Recipe hub (index) ---------- */
.hub-hero { padding: clamp(36px, 6vw, 64px) 0 clamp(20px, 3vw, 32px); }
.hub-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; }
.hub-hero p { margin-top: 14px; color: var(--ink-soft); font-size: 17px; max-width: 62ch; }
.hub-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.chip {
  font-size: 13px; font-weight: 650; color: var(--ink-soft); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 6px 13px; cursor: pointer;
}
.chip[aria-pressed="true"] { color: var(--signal-ink); background: var(--signal); border-color: transparent; }

.recipe-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
  padding: 24px 0 60px;
}
.recipe-card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.recipe-card:hover { transform: translateY(-2px); }
.recipe-card a.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; flex: 1; }
.recipe-card .thumb { aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.recipe-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recipe-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.recipe-card h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.recipe-card .stats { display: flex; gap: 14px; font-size: 13px; color: var(--ink-soft); }
.recipe-card .stats b { color: var(--brand); font-weight: 700; }
.recipe-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.recipe-card .tag { font-size: 11px; color: var(--ink-mute); background: var(--surface-2); border-radius: 6px; padding: 3px 7px; }

/* ---------- Recipe detail page ---------- */
.recipe-head { padding: clamp(28px, 5vw, 48px) 0 8px; }
.crumb { font-size: 13px; color: var(--ink-mute); margin-bottom: 14px; }
.crumb a { color: var(--ink-mute); }
.crumb a:hover { color: var(--brand); }
.recipe-head h1 { font-size: clamp(26px, 4.2vw, 38px); font-weight: 800; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.stat-pill {
  display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); padding: 10px 16px; min-width: 92px;
}
.stat-pill .k { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.stat-pill .v { font-size: 19px; font-weight: 800; color: var(--ink); }
.stat-pill.brand .v { color: var(--brand); }

.hero-photo { margin: 22px 0 6px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hairline); box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: auto; display: block; aspect-ratio: 16/10; object-fit: cover; }

.adapted-from { margin: 12px 0 4px; font-size: 13.5px; color: var(--ink-mute); display: flex; align-items: center; gap: 6px; }
.adapted-from a { color: var(--brand-soft); font-weight: 600; }

.recipe-body { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(24px, 4vw, 48px); padding: 28px 0 20px; align-items: start; }
@media (max-width: 760px) { .recipe-body { grid-template-columns: 1fr; } }

.card-block { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px 22px; }
.card-block h2 { font-size: 18px; font-weight: 750; margin-bottom: 14px; }
.ingredient-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ingredient-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; color: var(--ink-soft); border-bottom: 1px dashed var(--hairline); padding-bottom: 9px; }
.ingredient-list li:last-child { border-bottom: none; padding-bottom: 0; }
.ingredient-list .qty { color: var(--ink); font-weight: 650; white-space: nowrap; }
.ingredient-group-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); font-weight: 700; margin: 14px 0 6px; }
.ingredient-group-label:first-child { margin-top: 0; }

.steps-list { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.steps-list li { display: flex; gap: 14px; }
.steps-list li::before {
  counter-increment: step; content: counter(step);
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--signal); color: var(--signal-ink); font-weight: 800; font-size: 14px;
  display: grid; place-items: center;
}
.steps-list .step-text { padding-top: 3px; }
.steps-list .step-part { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: 3px; }
.steps-list .step-tip { display: block; margin-top: 5px; font-size: 13.5px; color: var(--ink-mute); font-style: italic; }

.macro-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.macro-bars .mb { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.macro-bars .mb .k { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.macro-bars .mb .v { font-size: 17px; font-weight: 750; margin-top: 2px; }

/* ---------- FAQ (shared) ---------- */
.faq { border-top: 1px solid var(--hairline); }
.faq h2 { font-size: 22px; font-weight: 800; margin: 28px 0 6px; }
details { border-bottom: 1px solid var(--hairline); }
details summary { list-style: none; cursor: pointer; padding: 16px 2px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 650; font-size: 15.5px; }
details summary::-webkit-details-marker { display: none; }
details summary .chev { flex: none; color: var(--brand); font-size: 20px; transition: transform .2s; line-height: 1; }
details[open] summary .chev { transform: rotate(45deg); }
details .ans { padding: 0 2px 18px; color: var(--ink-soft); font-size: 15px; max-width: 70ch; }

/* ---------- Calculator page ---------- */
.calc-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; padding: 8px 0 40px; }
@media (max-width: 800px) { .calc-wrap { grid-template-columns: 1fr; } }
.calc-form .field { margin-bottom: 16px; }
.calc-form label { display: block; font-size: 13px; font-weight: 650; color: var(--ink-soft); margin-bottom: 6px; }
.calc-form input, .calc-form select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline);
  padding: 11px 14px; border-radius: var(--radius-sm);
}
.calc-form input:focus, .calc-form select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 24%, transparent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-card {
  background: linear-gradient(180deg, #0F1C28, #081119); color: #D5DEE7;
  border-radius: var(--radius); padding: 24px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
  border: 1px solid #223442; position: sticky; top: 84px;
}
.result-card .rc-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8698A6; }
.result-card .rc-score { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; color: #EAF1F7; margin: 6px 0 2px; }
.result-card .rc-score .unit { font-size: 18px; color: #4DA3D9; font-weight: 700; }
.result-card .rc-tier { font-size: 15px; font-weight: 700; color: #4DA3D9; margin-bottom: 14px; }
.result-card .rc-explain { font-size: 14px; color: #AAB7C3; line-height: 1.6; margin-bottom: 16px; }
.result-card .rc-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid #23303C; padding-top: 14px; }
.result-card .rc-metrics .m { background: rgba(255,255,255,.04); border: 1px solid #23303C; border-radius: 10px; padding: 9px 11px; }
.result-card .rc-metrics .m .k { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #8698A6; }
.result-card .rc-metrics .m .v { font-size: 16px; font-weight: 750; color: #EAF1F7; margin-top: 2px; }
.quickpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.quickpick button {
  font: inherit; font-size: 13px; font-weight: 650; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 7px 13px; cursor: pointer;
}
.quickpick button:hover { border-color: var(--brand); color: var(--brand); }
.calc-note { font-size: 12.5px; color: var(--ink-mute); margin-top: 14px; line-height: 1.6; }

/* ---------- Section scaffolding ---------- */
section { padding: clamp(28px, 5vw, 56px) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(20px, 3vw, 32px); }
.section-head h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; }
.section-head p { margin-top: 12px; color: var(--ink-soft); font-size: 16px; }
