/* BiteTalk shared presentation. Keep business rules and component layouts local.
   Screen overrides deliberately leave production-pack pagination untouched. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --bt-paper: #f8f5ee;
  --bt-surface: #fffdf8;
  --bt-ink: #242a20;
  --bt-muted: #62695b;
  --bt-rust: #aa4328;
  --bt-rust-dark: #87351f;
  --bt-sage: #e9eddf;
  --bt-olive: #526344;
  --bt-line: #d8dccf;
  --bt-gold: #d9bb85;
  --bt-serif: Georgia, 'Times New Roman', serif;
  --bt-sans: 'DM Sans', 'Segoe UI', Arial, sans-serif;
  --bt-radius: 8px;
  --bt-shadow: 0 4px 20px #242a2007;
}

@media screen {
  :root {
    --bg: var(--bt-paper); --text: var(--bt-ink); --muted: var(--bt-muted);
    --surface: var(--bt-surface); --surface-2: var(--bt-sage);
    --accent: var(--bt-rust); --accent-strong: var(--bt-rust-dark); --accent-soft: #f6e8df;
    --stroke: var(--bt-line); --radius: var(--bt-radius); --shadow: var(--bt-shadow);
    --ink: var(--bt-ink); --cream: var(--bt-paper); --paper: var(--bt-surface);
    --white: var(--bt-surface); --orange: var(--bt-rust); --gold: var(--bt-gold);
    --green: var(--bt-olive); --olive: var(--bt-olive); --sage: var(--bt-olive);
    --clay: var(--bt-rust); --line: var(--bt-line); --serif: var(--bt-serif); --sans: var(--bt-sans);
    --editorial-cream: var(--bt-paper); --editorial-paper: var(--bt-surface);
    --editorial-ink: var(--bt-ink); --editorial-ink-soft: #424b3c;
    --editorial-stone: var(--bt-muted); --editorial-rule: var(--bt-line);
    --editorial-orange: var(--bt-rust); --editorial-orange-deep: var(--bt-rust-dark);
    --editorial-display: var(--bt-serif); --editorial-sans: var(--bt-sans);
    --home-cream: var(--bt-paper); --home-paper: var(--bt-surface);
    --home-ink: var(--bt-ink); --home-ink-soft: #424b3c; --home-stone: var(--bt-muted);
    --home-rule: var(--bt-line); --home-orange: var(--bt-rust); --home-orange-deep: var(--bt-rust-dark);
    --home-display: var(--bt-serif); --home-sans: var(--bt-sans);
    --cs-ink: var(--bt-ink); --cs-muted: var(--bt-muted); --cs-paper: var(--bt-paper);
    --cs-card: var(--bt-surface); --cs-line: var(--bt-line);
    --cs-orange: var(--bt-rust); --cs-orange-dark: var(--bt-rust-dark);
    --cs-peach: #f6e8df; --cs-gold: var(--bt-gold); --cs-shadow: var(--bt-shadow);
    --cs-radius: var(--bt-radius); --cs-radius-sm: 6px;
    --admin-bg: var(--bt-paper); --panel: var(--bt-surface); --panel-strong: #fff;
    --panel-muted: var(--bt-sage); --border: var(--bt-line); --border-strong: #aab39e;
    --radius-lg: 10px; --radius-md: 8px; --radius-sm: 6px;
    --lab-soft: var(--bt-sage); --lab-soft-2: var(--bt-paper); --lab-border: var(--bt-line);
    --lab-shadow: var(--bt-shadow); --lab-shadow-soft: var(--bt-shadow); --lab-radius: var(--bt-radius);
    --lab-ink: var(--bt-ink); --lab-muted: var(--bt-muted); --lab-accent: var(--bt-rust);
  }

  html { background: var(--bt-paper); }
  body[data-bt-theme] { background: var(--bt-paper); color: var(--bt-ink); font-family: var(--bt-sans); line-height: 1.6; }
  body[data-bt-theme] :is(h1,h2,h3) { font-family: var(--bt-serif); font-weight: 400; letter-spacing: -.035em; }
  body[data-bt-theme] :is(button,input,select,textarea) { font-family: var(--bt-sans); }
  body[data-bt-theme] :is(button,.btn,.cs-button,.bo-primary,.home-button,.primary-button,.secondary-button) {
    border-radius: 5px; font-weight: 600; letter-spacing: 0;
  }
  body[data-bt-theme] :is(.btn,.cs-button,.bo-primary,.home-button,.primary-button,.secondary-button) { min-height: 44px; }
  body[data-bt-theme] :is(.btn.accent,.cs-button--accent,.home-button--primary,.primary-button,.bo-primary) {
    background: var(--bt-rust); border-color: var(--bt-rust); color: #fff; box-shadow: none;
  }
  body[data-bt-theme] :is(.btn.accent,.cs-button--accent,.home-button--primary,.primary-button,.bo-primary):hover {
    background: var(--bt-rust-dark); border-color: var(--bt-rust-dark); color: #fff; transform: none;
  }
  body[data-bt-theme] :is(.btn.ghost,.cs-button--ghost,.secondary-button) { border-color: #aab39e; box-shadow: none; }
  body[data-bt-theme] :is(a,button,input,textarea,select,summary,[tabindex]):focus-visible {
    outline: 3px solid var(--bt-rust); outline-offset: 4px;
  }
  body[data-bt-theme] :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=submit]),select,textarea) {
    border-color: #aab39e; border-radius: 5px; background-color: #fffefb; color: var(--bt-ink);
  }
  body[data-bt-theme] :is(input[type=checkbox],input[type=radio]) { accent-color: var(--bt-olive); }
  body[data-bt-theme] :is(button,input,select,textarea):disabled { cursor: not-allowed; }
  body[data-bt-theme] :is(.eyebrow,.home-kicker,.cs-eyebrow,.bo-eyebrow,.mk-eyebrow,.status-kicker) {
    font-family: var(--bt-sans); letter-spacing: .13em; font-weight: 700;
  }

  /* Shared brand surfaces; functional nav items retain their current targets. */
  body[data-bt-theme] :is(.site-header,.site-header.sticky,.cs-admin-header,.bo-header,.mk-header,.mpc-header,.fm-site-header) {
    background: var(--bt-surface); border-color: var(--bt-line); box-shadow: none;
  }
  body[data-bt-theme] .site-header .nav-wrap { padding-block: 10px; }
  body[data-bt-theme] .site-header .brand { min-height: 54px; }
  body[data-bt-theme] :is(.site-footer,.fm-footer) { border-color: var(--bt-line); }
  body[data-bt-theme] :is(.recipe-card-home,.shop-card-home,.card,.free-membership-card,.bo-meal,.bo-summary,.mk-card,.mk-share,.mpc-card,.cs-card,.cs-list-card,.cs-stat-card,.auth-card) {
    border-radius: var(--bt-radius); border-color: var(--bt-line); box-shadow: var(--bt-shadow);
  }
  body[data-bt-theme] :is(.recipe-card-home,.shop-card-home,.bo-meal,.bo-summary,.mk-card,.mk-share,.mpc-card,.cs-card,.cs-list-card,.cs-stat-card,.auth-card) {
    background-color: var(--bt-surface);
  }
  body[data-bt-theme] :is(.home-hero__media,.recipes-hero-visual,.bo-hero img,.live-cook-card,.pc-gallery-card,.book-feature) { border-radius: var(--bt-radius); }
  body[data-bt-theme] :is(.home-live-panel,.free-membership-card,.bo-steps,.mk-controls,.shelf-tools) { background: var(--bt-sage); border-color: var(--bt-line); }

  /* Operational screens use the same materials at a practical reading density. */
  body[data-bt-theme].cs-admin { --cs-radius: var(--bt-radius); }
  body[data-bt-theme] :is(.admin-sidebar,.admin-panel,.module-card,.metric-card,.table-card,.detail-card,.summary-card,.status-card) {
    background: var(--bt-surface); border-color: var(--bt-line); border-radius: var(--bt-radius); box-shadow: none;
  }
  body[data-bt-theme] :is(.admin-sidebar,.cs-admin-sidebar) { background: var(--bt-sage); }
  body[data-bt-theme] :is(.admin-sidebar,.cs-admin-sidebar) :is(h1,h2,h3) { color: var(--bt-ink); }
  body[data-bt-theme] .cs-admin-nav button.active,
  body[data-bt-theme] .admin-nav button.active,
  body[data-bt-theme] .cs-workspace-nav button.active { background: var(--bt-ink); color: #fff; border-color: var(--bt-ink); box-shadow: none; }
  body[data-bt-theme] .admin-nav button.active span { color: #dbe1d2; }
  body[data-bt-theme] :is(.sidebar-mini,.admin-nav a,.env-banner) { border-radius: var(--bt-radius); }
  body[data-bt-theme] .sidebar-mini strong { overflow-wrap: anywhere; line-height: 1.35; }
  body[data-bt-theme] .module-hero { background: var(--bt-ink); border-radius: var(--bt-radius); }
  body[data-bt-theme] .metric-card::after { content: none; }
  body[data-bt-theme] .metric { font-size: clamp(1.3rem,2vw,1.8rem); line-height: 1.2; overflow-wrap: anywhere; }
  body[data-bt-theme] .cs-admin-nav button:not(.active) { color: var(--bt-ink); }
  body[data-bt-theme] :is(.cs-workspace-bar,.cs-editor-topbar,.cs-workspace-save,.cs-budget-dialog,.cs-budget-summary,.ma-stage,.ma-booking) {
    border-radius: var(--bt-radius); border-color: var(--bt-line); box-shadow: none;
  }
  body[data-bt-theme] :is(.cs-workspace-bar,.cs-editor-topbar,.cs-workspace-save,.cs-budget-dialog,.ma-booking) { background: var(--bt-surface); }
  body[data-bt-theme] :is(.cs-next-step,.cs-budget-summary,.ma-stage) { background: var(--bt-sage); }
  body[data-bt-theme] .cs-admin :is(.cs-page-head h1,.cs-editor-topbar h2) { font-size: clamp(1.65rem,2.5vw,2.3rem); }
  body[data-bt-theme] .mp-admin h1 { font-size: clamp(2rem,4vw,3.3rem); }
  body[data-bt-theme] .mp-admin h2 { font-size: 1.8rem; }
  body[data-bt-theme] .mp-admin h3 { font-size: 1.4rem; }
  body[data-bt-theme] .mp-admin > section { border: 1px solid var(--bt-line); border-radius: var(--bt-radius); box-shadow: none; background: var(--bt-surface); }
  body[data-bt-theme] .mp-admin :is(.ma-flow li,.ma-stage) { background: var(--bt-sage); color: var(--bt-ink); }
  body[data-bt-theme] .mp-admin button { border-radius: 5px; min-height: 44px; }
  body[data-bt-theme] .mk-intro h1 { font-size: clamp(2.3rem,4vw,3.8rem); }
  body[data-bt-theme] .mk-summary { background: var(--bt-ink); border-radius: var(--bt-radius); }
  body[data-bt-theme] .mk-tabs button[aria-selected=true] { color: var(--bt-rust); border-color: var(--bt-rust); }
  body[data-bt-theme] .mk-card h2 { font-size: 1.8rem; }
  body[data-bt-theme] .mk-card h3 { font-size: 1.35rem; }
  body[data-bt-theme] .bo-meal h3 { font-size: 1.5rem; }
  body[data-bt-theme] .bo-meal.is-picked { border-color: var(--bt-olive); box-shadow: 0 0 0 2px var(--bt-sage); }
  body[data-bt-theme] .bo-meal.is-picked button { background: var(--bt-olive); color: #fff; }
  body[data-bt-theme] .bo-summary { top: 20px; }
  body[data-bt-theme] .auth-wrap { padding-top: clamp(35px,8vh,90px); }
  body[data-bt-theme] .auth-card h1 { font-size: clamp(2rem,4vw,2.8rem); line-height: 1.15; }
  body[data-bt-theme] .auth-card :is(input,select,button) { min-height: 44px; }
  body[data-bt-theme] .auth-card { padding: clamp(24px,4vw,36px); }
  body[data-bt-theme] :is(.account-card,.account-jump-nav__item,.account-side-panel,.hero-stat,.mini-stat) { border-radius: var(--bt-radius); box-shadow: none; }
  body[data-bt-theme] :is(.account-card,.account-jump-nav__item) { border-color: var(--bt-line); background: var(--bt-surface); }
  body[data-bt-theme] .account-jump-nav__item--primary { background: var(--bt-sage); border-color: #aab39e; }
  body[data-bt-theme].account-page .account-card.account-hero { background: var(--bt-ink); border-color: var(--bt-ink); }
  body[data-bt-theme].account-page .account-card.account-hero :is(.hero-stat,.mini-stat,.account-side-panel) { border-radius: var(--bt-radius); }
  body[data-bt-theme] .account-title-row h1 { color: var(--bt-ink); }
  body[data-bt-theme] .account-kicker { color: var(--bt-rust); }
  body[data-bt-theme] .account-card:not(.account-hero) h2 { color: var(--bt-ink); font-size: 1.5rem; }
  body[data-bt-theme] .account-jump-nav__item { min-width: 0; }
  body[data-bt-theme] .account-jump-nav__item :is(strong,span) { overflow-wrap: anywhere; }
  body[data-bt-theme] .account-hero p { color: #dbe1d2; }
  body[data-bt-theme] .lab-shell { background: var(--bt-paper); }
  body[data-bt-theme] :is(.lab-hero-card,.lab-panel,.followup-panel,.followup-history) { background: var(--bt-surface); border-color: var(--bt-line); border-radius: var(--bt-radius); box-shadow: var(--bt-shadow); }
  body[data-bt-theme] .lab-hero-card::after { content: none; }
  body[data-bt-theme] .recipe-edit-protection { padding: 14px 16px 0; color: var(--bt-muted); font-size: .875rem; }
  body[data-bt-theme] .followup-form { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; min-width: 0; }
  body[data-bt-theme] .followup-form textarea { display: block; width: 100%; box-sizing: border-box; min-height: 140px; padding: 12px 14px; font-size: 1rem; line-height: 1.6; resize: vertical; }
  body[data-bt-theme] .followup-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
  body[data-bt-theme] .followup-history { background: var(--bt-sage); }
  body[data-bt-theme] .followup-history summary { min-height: 44px; display: flex; align-items: center; color: var(--bt-ink); }
  body[data-bt-theme] .followup-history summary::after { content: '+'; margin-left: auto; padding-left: 12px; }
  body[data-bt-theme] .followup-history[open] summary::after { content: '−'; }
  body[data-bt-theme] #recipeVersionPreview { margin-top: 16px; padding: 20px; border: 1px solid var(--bt-line); border-radius: var(--bt-radius); background: var(--bt-surface); max-height: 65vh; overflow: auto; }
  body[data-bt-theme] #recipeVersionPreview :is(h4,h5) { font-family: var(--bt-serif); font-size: 1.3rem; font-weight: 400; }
  body[data-bt-theme] #recipeVersionPreview :is(ol,ul) { padding-left: 24px; }
  body[data-bt-theme] .lab-results-head > div:last-child { flex-wrap: wrap; }
  body[data-bt-theme] .sheet > .section { border-color: var(--bt-line); border-radius: var(--bt-radius); box-shadow: none; background: var(--bt-surface); }
  body[data-bt-theme] .closeout-page-head h1 { font-size: clamp(2rem,3vw,2.6rem); }
  body[data-bt-theme] .fm-save-bar button { background: var(--bt-rust); }

  @media (max-width: 760px) {
    body[data-bt-theme].tool-editorial .lab-builder { padding-inline: 12px; }
    body[data-bt-theme].tool-editorial #results-section { margin-inline: 0; padding: 10px !important; }
    body[data-bt-theme] .followup-panel { padding: 0; }
    body[data-bt-theme] .followup-head { flex-direction: column; }
    body[data-bt-theme] .followup-form { padding: 12px; }
    body[data-bt-theme] .followup-actions .btn { width: 100%; }
    body[data-bt-theme] .followup-history { margin: 12px 0; padding: 10px; }
    body[data-bt-theme] #recipeVersionPreview { padding: 12px; }
    body[data-bt-theme] .site-header .nav-wrap { padding-block: 8px; }
    body[data-bt-theme] :is(.cs-card,.mk-card,.mk-share) { border-radius: 6px; }
    body[data-bt-theme] .cs-admin :is(.cs-page-head h1,.cs-editor-topbar h2) { font-size: 1.65rem; }
    body[data-bt-theme] .mp-admin h1 { font-size: 2.2rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    body[data-bt-theme] :is(button,a,.card,.cs-card) { transition: none; }
  }
}

@media screen {body[data-bt-theme].cs-admin .cs-page-head{background:var(--bt-ink);border-radius:var(--bt-radius);box-shadow:none}body[data-bt-theme].cs-admin .cs-page-head .cs-eyebrow{color:var(--bt-gold)}body[data-bt-theme].cs-admin .cs-page-head h1{color:var(--bt-surface)}}
