/* ============================================================
   B's BAGELS KITCHEN PORTAL — MOBILE-FIRST VISUAL BUILD
   Look: dark green header, bagel photo hero, cream recipe cards.
   ============================================================ */

:root {
  --ink: #111111;
  --ink-soft: #292723;
  --cream: #F7F1E5;
  --paper: #FFFDF8;
  --green: #2F5538;
  --green-deep: #183522;
  --green-2: #244B31;
  --tan: #D7C09C;
  --tan-line: #E4D6BF;
  --chalk: #F4EFE2;
  --muted: #756E62;
  --flag-bg: #FFF4C7;
  --flag-border: #E4B52E;
  --flag-text: #6D4E00;
  --stop-bg: #F6E0D6;
  --stop-border: #A8431F;
  --stop-text: #7C2E13;
  --radius-xl: 26px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 30px rgba(22, 18, 12, 0.12);
  --shadow-soft: 0 3px 16px rgba(22, 18, 12, 0.08);
  --font-display: "Alfa Slab One", "Rockwell", "Georgia", serif;
  --font-script: "Caveat", cursive;
  --font-body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-label: "IBM Plex Mono", "Menlo", "Consolas", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid rgba(47,85,56,.45); outline-offset: 2px; }
.skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 100;
  transform: translateY(-140%);
  background: var(--paper);
  color: var(--green-deep);
  border: 2px solid var(--green-deep);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 900;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------- App header ---------------- */
.site-header {
  position: relative;
  z-index: 10;
  background:
    radial-gradient(circle at 28% 0%, rgba(255,255,255,.08), transparent 36%),
    linear-gradient(135deg, var(--green-deep), var(--green));
  color: var(--chalk);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 18px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--chalk); text-decoration: none; min-width: 0; }
.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.16), 0 8px 18px rgba(0,0,0,.22);
  flex: none;
}
.brand-text { line-height: 1.05; min-width: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 6vw, 2.1rem);
  letter-spacing: .02em;
  display: block;
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--font-label);
  font-size: clamp(.72rem, 3vw, .95rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--tan);
  display: block;
  margin-top: 4px;
  white-space: nowrap;
}
.header-meta {
  margin-left: auto;
  text-align: right;
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .12em;
  line-height: 1.65;
  color: rgba(244,239,226,.76);
  white-space: nowrap;
}
.menu-button {
  width: 46px;
  height: 46px;
  border: 1.5px solid rgba(244,239,226,.35);
  border-radius: 13px;
  background: rgba(0,0,0,.18);
  color: var(--chalk);
  display: inline-grid;
  place-content: center;
  gap: 5px;
  flex: none;
}
.menu-button span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
@media (max-width: 700px) { .header-meta { display: none; } .menu-button { margin-left: auto; border-color: transparent; background: transparent; } }

/* ---------------- Main canvas ---------------- */
main { max-width: 1080px; margin: 0 auto; padding: 0 18px 34px; }

.home-hero { position: relative; margin: 0 -18px 0; }
.hero-image { height: clamp(170px, 32vw, 315px); overflow: hidden; background: #211b15; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.03) contrast(1.03); }
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: clamp(170px, 32vw, 315px);
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.18));
  pointer-events: none;
}
.welcome-card {
  position: relative;
  margin: -48px 18px 0;
  background: rgba(255,253,248,.97);
  border: 1.5px solid var(--tan-line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 22px 20px 20px;
  overflow: hidden;
}
.script-kicker {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 8vw, 2.7rem);
  line-height: 1;
  color: var(--green);
  margin: 0 0 3px;
}
.welcome-card h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 11vw, 4.2rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: .005em;
  margin: 0;
  color: var(--ink);
}
.welcome-copy { max-width: 560px; margin: 14px 0 17px; color: var(--muted); font-size: clamp(1.02rem, 3.3vw, 1.28rem); }
.bs-stamp {
  position: absolute;
  right: 22px;
  top: 22px;
  width: 100px;
  height: 100px;
  border: 3px solid rgba(199,174,134,.6);
  color: rgba(150,124,83,.72);
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  text-transform: uppercase;
  font-family: var(--font-label);
  font-size: .56rem;
  letter-spacing: .12em;
  line-height: 1.25;
  transform: rotate(-8deg);
}
.bs-stamp b { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 0; line-height: 1; }
@media (max-width: 560px) { .bs-stamp { width: 74px; height: 74px; right: 16px; top: 18px; font-size: .43rem; } .bs-stamp b { font-size: 1.2rem; } }

.home-search-wrap { position: relative; }
.search-input {
  width: 100%;
  padding: 15px 16px 15px 52px;
  font-size: clamp(1rem, 3.4vw, 1.2rem);
  border: 1.5px solid #E6DAC7;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}
.search-input::placeholder { color: #9A9184; }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; color: var(--green-deep); pointer-events: none; }

/* ---------------- Section headings ---------------- */
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; }
.eyebrow-heading {
  font-family: var(--font-label);
  font-size: .95rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  margin: 0;
  color: var(--green-deep);
}
.section-title { font-family: var(--font-display); font-size: clamp(1.35rem, 5vw, 2rem); font-weight: 400; margin: 0; color: var(--ink); }
.text-link { border: 0; background: transparent; color: var(--green); font-weight: 800; cursor: pointer; padding: 8px 2px; white-space: nowrap; }
.category-section, .featured-section, .results-section, .quick-reference { margin-top: 26px; }
.results-count { margin: -8px 0 14px; color: var(--muted); }

/* ---------------- Browse/category tiles ---------------- */
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.category-tile {
  min-height: 76px;
  border: 1.5px solid var(--tan-line);
  background: rgba(255,253,248,.78);
  border-radius: 16px;
  color: var(--green-deep);
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 2px 10px rgba(22,18,12,.035);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.category-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.category-tile[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--cream); }
.category-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--green-deep); color: var(--cream); font-size: 1.2rem; }
.category-tile[aria-pressed="true"] .category-icon { background: rgba(255,255,255,.18); }
.category-label { font-weight: 800; font-size: clamp(.98rem, 3.5vw, 1.18rem); line-height: 1.1; }
.category-count { color: inherit; opacity: .74; font-weight: 800; }
.category-chevron { font-size: 1.8rem; line-height: 1; opacity: .55; }
@media (max-width: 380px) { .category-grid { grid-template-columns: 1fr; } }

/* ---------------- Cards ---------------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
@media (min-width: 700px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.recipe-card {
  background: var(--paper);
  border: 1px solid var(--tan-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform .15s ease, box-shadow .15s ease;
}
.recipe-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-photo-wrap { width: 100%; aspect-ratio: 4 / 3; background: #eee5d2; overflow: hidden; border-bottom: 1px solid #EFE6D6; }
.card-photo { width: 100%; height: 100%; object-fit: cover; }
.card-photo-placeholder { display: grid; place-items: center; color: var(--muted); font-family: var(--font-label); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; background: radial-gradient(circle at 20% 24%, rgba(47,85,56,.1), transparent 30%), var(--paper); }
.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-title { font-family: var(--font-body); font-weight: 800; font-size: 1.04rem; line-height: 1.15; margin: 0; }
.save-icon { color: #BDA985; font-size: 1.2rem; line-height: 1; }
.card-cat { width: fit-content; color: var(--muted); font-size: .88rem; line-height: 1; }
.card-allergens { font-size: .86rem; color: var(--muted); }
.card-meta { display: grid; gap: 4px; font-family: var(--font-label); font-size: .72rem; color: var(--muted); border-top: 1px dashed var(--tan-line); padding-top: 9px; margin-top: auto; }
.card-meta b { color: var(--green-deep); }
.featured-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(146px, 1fr); gap: 12px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; }
.featured-scroll .recipe-card { scroll-snap-align: start; }
.recipe-card-compact .card-body { min-height: 88px; }
.recipe-card-compact .card-photo-wrap { aspect-ratio: 1 / 1.02; }
@media (min-width: 840px) { .featured-scroll { grid-auto-flow: initial; grid-template-columns: repeat(4, 1fr); overflow: visible; } }

/* ---------------- Quick reference ---------------- */
.quick-reference-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .quick-reference-grid { grid-template-columns: repeat(3, 1fr); } }
.quick-reference-grid a {
  background: rgba(255,253,248,.85);
  border: 1.5px solid var(--tan-line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  padding: 18px;
  min-height: 110px;
  display: grid;
  align-content: center;
  gap: 4px;
  box-shadow: var(--shadow-soft);
}
.quick-reference-grid span { font-size: 1.7rem; }
.quick-reference-grid b { font-size: 1.15rem; color: var(--green-deep); }
.quick-reference-grid small { color: var(--muted); font-size: .92rem; }

/* ---------------- Badges ---------------- */
.badge-flag { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-family: var(--font-label); font-size: .68rem; background: var(--flag-bg); border: 1.5px solid var(--flag-border); color: var(--flag-text); border-radius: 999px; padding: 4px 8px; }
.badge-stop { background: var(--stop-bg); border-color: var(--stop-border); color: var(--stop-text); }

/* ---------------- Detail page ---------------- */
.back-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; color: var(--green); margin: 22px 0 14px; min-height: 44px; }
.detail-header { margin-bottom: 8px; }
.detail-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.75rem, 6vw, 2.7rem); line-height: 1.08; margin: 10px 0 12px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.stop-banner { background: var(--stop-bg); border: 2px solid var(--stop-border); color: var(--stop-text); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 700; margin: 0 0 16px; }
.prep-label { background: var(--paper); border: 2px dashed var(--tan-line); border-radius: var(--radius); padding: 17px 15px 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 14px; margin: 0 0 18px; position: relative; box-shadow: var(--shadow-soft); }
.prep-label::before { content: "PREP LABEL"; position: absolute; top: -10px; left: 14px; background: var(--tan); color: var(--ink); font-family: var(--font-label); font-size: .6rem; letter-spacing: .2em; padding: 2px 8px; border-radius: 4px; }
@media (min-width: 700px) { .prep-label { grid-template-columns: repeat(3, 1fr); } }
.meta-item dt { font-family: var(--font-label); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 3px; }
.meta-item dd { margin: 0; font-size: .98rem; font-weight: 800; color: var(--ink-soft); overflow-wrap: break-word; }
.flag-inline { color: var(--flag-text); }
.detail-photo { border-radius: var(--radius-xl); box-shadow: var(--shadow); margin: 0 0 6px; max-height: 440px; width: 100%; object-fit: cover; }
.photo-note { font-family: var(--font-label); font-size: .68rem; color: var(--muted); margin: 6px 0 16px; }
.finished-card .photo-note { padding: 4px 16px 16px; margin: 0; }
.photo-warning {
  color: var(--stop-text) !important;
  background: var(--stop-bg);
  border-top: 1px solid var(--stop-border);
  font-weight: 800;
}
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1fr 1fr; align-items: start; } .detail-grid .span-2 { grid-column: 1 / -1; } }
.panel { background: var(--paper); border: 1px solid var(--tan-line); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 18px 20px; }
.panel h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; margin: 0 0 12px; color: var(--green-deep); display: flex; align-items: center; gap: 9px; }
.panel h2 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tan); flex: none; }
.panel h3 { font-family: var(--font-label); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.panel ul, .panel ol { margin: 0; padding-left: 22px; }
.panel li { margin: 7px 0; }
.panel ol li::marker { font-weight: 700; color: var(--green); }
.panel.flag-panel { background: var(--flag-bg); border: 1.5px solid var(--flag-border); }
.panel.flag-panel h2, .panel.flag-panel li { color: var(--flag-text); }
.allergen-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.allergen-list li { background: rgba(47,85,56,.08); border: 1px solid rgba(47,85,56,.25); color: var(--green-deep); font-weight: 800; font-size: .9rem; padding: 6px 12px; border-radius: 999px; margin: 0; }
.print-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--green-deep); color: var(--cream); border: none; font-weight: 800; font-size: 1rem; padding: 13px 22px; border-radius: 999px; cursor: pointer; margin-top: 20px; min-height: 44px; }
.print-btn:hover { background: var(--green); }

.detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.home-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border-radius: 999px; background: var(--paper); color: var(--green-deep); border: 2px solid var(--green-deep); font-weight: 900; text-decoration: none; }
.home-btn:hover { background: var(--chalk); }
.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state b { color: var(--ink); }

/* ---------------- Bottom nav ---------------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  height: 76px;
  background: rgba(255,253,248,.96);
  border-top: 1px solid var(--tan-line);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px 12px 8px;
  box-shadow: 0 -6px 24px rgba(22,18,12,.08);
}
.bottom-nav-item { color: #786F62; text-decoration: none; display: grid; place-items: center; gap: 2px; font-size: .78rem; font-weight: 700; }
.bottom-nav-item span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem; line-height: 1; }
.bottom-nav-item.active { color: var(--green); }
.bottom-nav-item.active span { background: var(--green); color: var(--cream); }
@media (min-width: 900px) { .bottom-nav { max-width: 720px; left: 50%; transform: translateX(-50%); border-radius: 24px 24px 0 0; } }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: var(--chalk); border-top: 4px solid var(--green); margin-top: 34px; }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 28px 16px 34px; text-align: center; }
.footer-tagline { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .4px; margin: 0 0 6px; }
.footer-manager { font-family: var(--font-label); font-size: .78rem; letter-spacing: .12em; color: var(--tan); margin: 0 0 14px; }
.footer-small { font-size: .75rem; color: rgba(247,242,232,.55); margin: 0; line-height: 1.7; }

@media print {
  body { background: #fff; font-size: 12pt; padding-bottom: 0; }
  .site-header, .site-footer, .back-link, .print-btn, .home-btn, .bottom-nav, .home-hero, .category-section { display: none !important; }
  main { max-width: none; padding: 0; }
  .panel, .prep-label { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .detail-grid { display: block; }
  .detail-grid > * { margin-bottom: 12pt; }
  .detail-photo { display: none; }
  .badge-flag { border: 1.5px solid #000; }
}

/* ============================================================
   KITCHEN OPS PORTAL LAYOUT
   Matches the dark header + large green operations dashboard card.
   ============================================================ */
body {
  background:
    radial-gradient(circle at 22% 18%, rgba(215,192,156,.22), transparent 34%),
    var(--cream);
  padding-bottom: 0;
}
.site-header {
  background:
    radial-gradient(circle at 22% 0%, rgba(255,255,255,.05), transparent 34%),
    linear-gradient(135deg, #0D0E0C, #121412 62%, #0B0C0B);
  border-bottom: 0;
}
.header-inner {
  padding: 22px 18px 18px;
  align-items: flex-start;
}
.brand-logo {
  width: 74px;
  height: 74px;
  box-shadow: 0 0 0 4px rgba(255,255,255,.11), 0 10px 20px rgba(0,0,0,.32);
}
.brand-name {
  color: var(--chalk);
  text-shadow: 0 1px 0 rgba(255,255,255,.05);
}
.brand-sub {
  letter-spacing: .24em;
  color: var(--tan);
}
.header-meta {
  color: rgba(244,239,226,.72);
  padding-top: 8px;
  font-size: .78rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.menu-button {
  margin-top: 8px;
}
main {
  padding-top: 0;
}
.ops-search-band {
  margin: 0 -18px;
  padding: 0 18px 28px;
  background:
    linear-gradient(135deg, #0D0E0C, #121412 62%, #0B0C0B);
  border-bottom: 4px solid var(--tan-line);
}
.ops-search-meta {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-label);
  color: rgba(244,239,226,.72);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .78rem;
  margin: 0 auto 14px;
  max-width: 1080px;
}
.ops-search-wrap {
  max-width: 940px;
  margin: 0 auto;
}
.ops-search-wrap .search-input {
  min-height: 64px;
  border: 3px solid rgba(215,192,156,.74);
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
  background: #FFFCF4;
  padding-left: 64px;
  font-size: clamp(1.02rem, 4vw, 1.35rem);
}
.ops-search-wrap .search-icon {
  left: 24px;
  width: 30px;
  height: 30px;
}
.ops-hero-card {
  position: relative;
  margin: 28px 0 26px;
  overflow: hidden;
  border-radius: 30px;
  padding: clamp(32px, 8vw, 64px) clamp(26px, 7vw, 58px);
  background:
    linear-gradient(135deg, rgba(47,85,56,.97), rgba(24,53,34,.98) 54%, rgba(12,14,12,.99));
  color: var(--chalk);
  box-shadow: 0 16px 36px rgba(22,18,12,.22);
  border: 1px solid rgba(215,192,156,.28);
  min-height: 430px;
  display: grid;
  align-content: center;
}
.ops-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 14%, rgba(255,255,255,.08), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.035) 0 1px, transparent 1px 22px);
  pointer-events: none;
}
.ops-route-line {
  position: absolute;
  right: -26px;
  top: -18px;
  width: 320px;
  height: 320px;
  border: 4px dashed rgba(215,192,156,.55);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(28deg);
}
.ops-kicker {
  position: relative;
  font-family: var(--font-label);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 0 0 16px;
  font-size: clamp(.9rem, 3.6vw, 1.14rem);
}
.ops-kicker::after {
  content: "";
  display: block;
  width: 88px;
  height: 5px;
  background: var(--tan);
  border-radius: 999px;
  margin-top: 14px;
}
.ops-hero-card h1 {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10.8vw, 5.7rem);
  line-height: .96;
  letter-spacing: .01em;
  margin: 0 0 22px;
  font-weight: 400;
  max-width: 900px;
}
.ops-copy {
  position: relative;
  max-width: 720px;
  font-size: clamp(1.08rem, 4.2vw, 1.55rem);
  line-height: 1.55;
  color: rgba(244,239,226,.92);
  margin: 0 0 28px;
}
.ops-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.ops-actions button {
  min-height: 58px;
  border-radius: 999px;
  padding: 0 26px;
  font-weight: 900;
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 1.02rem;
}
.ops-primary {
  background: var(--tan);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.ops-secondary {
  background: transparent;
  border-color: rgba(244,239,226,.75) !important;
  color: var(--chalk);
}
.ops-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 26px;
}
.ops-stats article {
  background: rgba(255,253,248,.86);
  border: 1.5px solid var(--tan-line);
  border-radius: 18px;
  padding: 16px 14px;
  box-shadow: var(--shadow-soft);
}
.ops-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--green-deep);
  line-height: 1;
}
.ops-stats span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  margin-top: 6px;
  font-size: .9rem;
}
.ops-stats .stat-warn {
  background: var(--flag-bg);
  border-color: var(--flag-border);
}
.ops-stats .stat-warn b,
.ops-stats .stat-warn span {
  color: var(--flag-text);
}
@media (min-width: 760px) {
  .ops-stats { grid-template-columns: repeat(4, 1fr); }
}
.category-section,
.featured-section,
.results-section,
.quick-reference,
.ops-rollouts {
  margin-top: 30px;
}
.rollout-card {
  background: rgba(255,253,248,.9);
  border: 1.5px solid var(--tan-line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
.rollout-card b {
  color: var(--green-deep);
  font-size: 1.12rem;
}
.rollout-card p {
  margin: 8px 0 0;
  color: var(--muted);
}
.pill-soft {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(47,85,56,.1);
  border: 1px solid rgba(47,85,56,.18);
  color: var(--green-deep);
  font-weight: 900;
  font-size: .82rem;
}
.bottom-nav-item:nth-child(3).active span,
.bottom-nav-item:nth-child(3) span {
  font-size: 1.05rem;
}
@media (max-width: 520px) {
  .header-inner { padding: 20px 22px 14px; }
  .brand-logo { width: 70px; height: 70px; }
  .brand { gap: 14px; }
  .brand-name { font-size: clamp(1.55rem, 7.3vw, 2.1rem); }
  .brand-sub { font-size: .8rem; letter-spacing: .22em; }
  .ops-search-band { padding: 8px 30px 32px; }
  .ops-search-meta { justify-content: flex-end; font-size: .8rem; line-height: 1.8; }
  .ops-search-meta span:first-child { width: 100%; text-align: right; }
  .ops-search-wrap .search-input { min-height: 68px; }
  .ops-hero-card { margin: 28px 12px 24px; min-height: 430px; border-radius: 28px; }
  .ops-actions { display: grid; }
  .ops-actions button { width: fit-content; max-width: 100%; }
  .ops-stats { margin-left: 12px; margin-right: 12px; }
}
@media (max-width: 370px) {
  .ops-hero-card h1 { font-size: 2.18rem; }
  .ops-copy { font-size: 1rem; }
}

/* ---------------- Sandwich build photo steps ---------------- */
.build-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.build-photo-card {
  margin: 0;
  overflow: hidden;
  border: 1.5px solid var(--tan-line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.build-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #efe6d7;
}
.build-photo-card figcaption {
  display: grid;
  gap: 4px;
  padding: 12px 13px 13px;
}
.build-photo-card figcaption b {
  font-size: 1rem;
  color: var(--green-deep);
}
.build-photo-card figcaption span {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.35;
}

/* =========================================================
   v2.1 — APP SHELL, SIDEBAR, HEADER & BUILD-GUIDE LAYOUT
   ========================================================= */

/* Header upgrade */
.header-inner { display: flex; align-items: center; gap: 16px; max-width: 1320px; margin: 0 auto; padding: 0 18px; min-height: 64px; }
.menu-button { display: inline-flex; flex-direction: column; gap: 4px; justify-content: center; order: -1; }
.header-search { flex: 1; max-width: 560px; position: relative; display: flex; align-items: center; }
.header-search .search-icon { left: 16px; color: #8d8474; }
.header-search-input { width: 100%; border: none; border-radius: 999px; background: #FFFDF8; padding: 11px 16px 11px 46px; font: inherit; font-size: .98rem; color: var(--ink); }
.header-search-input:focus { outline: 2px solid var(--tan); }
.header-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; text-decoration: none; color: var(--chalk); font-family: var(--font-label); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.header-pill b { background: var(--green); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; font-size: .72rem; }
.header-pill-warn b { background: var(--flag-border); color: #2a1d00; }
.header-home-pill b { background: var(--paper); color: var(--green-deep); font-size: .9rem; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.16); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-size: .8rem; }
.user-text { display: grid; line-height: 1.15; }
.user-text b { color: var(--chalk); font-size: .82rem; }
.user-text small { color: var(--tan); font-family: var(--font-label); font-size: .6rem; letter-spacing: .12em; }

/* Shell + sidebar */
.shell { display: flex; align-items: flex-start; max-width: 1320px; margin: 0 auto; gap: 0; }
.sidebar { width: 250px; flex: none; align-self: stretch; background: var(--paper); border-right: 1px solid var(--tan-line); padding: 16px 12px 24px; position: sticky; top: 0; min-height: calc(100vh - 64px); display: flex; flex-direction: column; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: .96rem; min-height: 44px; }
.side-link:hover { background: var(--chalk); }
.side-link.active { background: var(--green); color: #fff; }
.side-link.active .side-badge { background: rgba(255,255,255,.2); color: #fff; }
.side-ico { width: 22px; text-align: center; opacity: .85; }
.side-badge { margin-left: auto; background: var(--chalk); color: var(--muted); border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 1px 8px; }
.side-sub-item { padding-left: 30px; font-size: .9rem; font-weight: 600; color: var(--muted); min-height: 44px; }
.side-sub-item.active { color: #fff; }
.side-group-btn { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 12px; background: transparent; border: 0; cursor: pointer; font: inherit; font-weight: 800; color: var(--ink); border-radius: 12px; min-height: 44px; }
.side-group-btn:hover { background: var(--chalk); }
.side-caret { margin-left: auto; transition: transform .2s; }
.side-group-btn[aria-expanded="true"] .side-caret { transform: rotate(90deg); }
.sidebar-foot { margin-top: auto; padding: 16px 12px 0; font-family: var(--font-label); font-size: .6rem; letter-spacing: .14em; color: var(--muted); }
.sidebar-foot p { margin: 2px 0; }
.sidebar-scrim { position: fixed; inset: 0; background: rgba(20,15,10,.45); z-index: 40; }

/* Main column overrides shell context */
main { max-width: none; margin: 0; padding: 22px 26px 40px; flex: 1; min-width: 0; }

/* Home hero within shell */
.home-hero { position: relative; margin: 0 0 18px; }
.hero-image { height: clamp(150px, 22vw, 240px); border-radius: var(--radius-xl); overflow: hidden; background: #211b15; }
.hero-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: -54px; position: relative; padding: 0 6px; }
.welcome-card, .ops-hero-card { position: relative; border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.welcome-card { background: var(--cream); padding: 22px 24px 24px; }
.ops-hero-card { background: var(--green-deep); color: var(--cream); padding: 24px 26px; overflow: hidden; }
.ops-hero-card h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.4vw, 2rem); margin: 4px 0 10px; line-height: 1.1; }
.ops-kicker { font-family: var(--font-label); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--tan); margin: 0; }
.ops-copy { color: rgba(247,241,229,.86); font-size: .98rem; margin: 0 0 18px; }
.ops-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ops-primary, .ops-secondary { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; border-radius: 999px; padding: 12px 20px; text-decoration: none; cursor: pointer; min-height: 44px; border: 1.5px solid transparent; }
.ops-primary { background: var(--tan); color: var(--green-deep); }
.ops-secondary { background: transparent; color: var(--cream); border-color: rgba(255,255,255,.5); }
.ops-route-line { position: absolute; right: -40px; top: -30px; width: 220px; height: 220px; border: 2px dashed rgba(215,192,156,.35); border-radius: 50%; }

/* Stats */
.ops-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 24px; }
.ops-stats article { background: var(--paper); border: 1px solid var(--tan-line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-soft); }
.ops-stats b { font-family: var(--font-display); font-size: 1.7rem; color: var(--green-deep); display: block; line-height: 1; }
.ops-stats span { font-family: var(--font-label); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ops-stats article a { display: block; color: inherit; text-decoration: none; }
.ops-stats article a:hover span { color: var(--green-deep); }

.ops-stats .stat-warn b { color: var(--stop-border); }

/* Quick tiles */
.quick-section { margin: 0 0 26px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.quick-tile { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--tan-line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-soft); }
.quick-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.quick-ico { width: 42px; height: 42px; border-radius: 50%; background: var(--green-deep); color: var(--cream); display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.quick-tile b { display: block; color: var(--green-deep); }
.quick-tile small { color: var(--muted); font-size: .85rem; }
.quick-arrow { margin-left: auto; color: var(--green); font-weight: 800; }



/* Procedures */
.procedures-hero {
  background: var(--green-deep);
  color: var(--cream);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 5vw, 40px);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.procedures-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border: 2px dashed rgba(215,192,156,.35);
  border-radius: 50%;
}
.procedures-hero h1 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
  margin: 8px 0 10px;
}
.procedures-hero p:not(.ops-kicker) {
  position: relative;
  max-width: 760px;
  font-size: 1.08rem;
  line-height: 1.55;
  color: rgba(247,241,229,.9);
}
.procedure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.procedure-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: start;
  gap: 13px;
  background: var(--paper);
  border: 1px solid var(--tan-line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  min-height: 142px;
}
.procedure-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.procedure-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--green-deep);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-size: 1.45rem;
}
.procedure-card h3 { margin: 0 0 5px; color: var(--green-deep); font-size: 1.18rem; }
.procedure-card p { margin: 0 0 10px; color: var(--muted); line-height: 1.35; }
.procedure-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--chalk);
  border: 1px solid var(--tan-line);
  color: var(--ink-soft);
  font-family: var(--font-label);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.procedure-note { margin-top: 18px; }
.procedure-placeholder { text-align: left; }
.procedure-placeholder h2 { margin: 8px 0 8px; }

/* Reviewed badge */
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.reviewed-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-label); font-size: .66rem; background: rgba(47,85,56,.1); border: 1.5px solid rgba(47,85,56,.4); color: var(--green-deep); border-radius: 999px; padding: 4px 9px; }

/* Detail header */
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.detail-sub { color: var(--muted); font-size: 1.05rem; margin: 2px 0 12px; max-width: 60ch; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip { font-family: var(--font-label); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; background: var(--chalk); color: var(--ink-soft); border: 1px solid var(--tan-line); border-radius: 999px; padding: 5px 11px; }
.meta-chip.star { background: var(--flag-bg); border-color: var(--flag-border); color: var(--flag-text); }

/* Build-guide two-column */
.build-layout { display: grid; grid-template-columns: 1fr; gap: 18px; }
.build-main { display: grid; grid-template-columns: 1fr; gap: 16px; min-width: 0; }
.build-main .span-2 { grid-column: 1 / -1; }
.build-rail { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) { .build-layout { grid-template-columns: minmax(0,1fr) 320px; align-items: start; } }

.build-steps { list-style: none; margin: 0; padding: 0; }
.build-step { display: grid; grid-template-columns: 30px 104px 1fr; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--tan-line); }
.build-step:last-child { border-bottom: 0; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--green-deep); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.step-thumb { width: 104px; height: 84px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--tan-line); }
.step-thumb-empty { display: grid; place-items: center; font-size: 1.2rem; }
.step-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.step-head b { font-size: 1.02rem; }
.step-body p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.portion-pill { font-family: var(--font-label); font-size: .68rem; background: var(--chalk); border: 1px solid var(--tan-line); color: var(--ink-soft); border-radius: 999px; padding: 3px 9px; }

/* Rail cards */
.rail-card { background: var(--paper); border: 1px solid var(--tan-line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-soft); }
.rail-card h3 { font-family: var(--font-label); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.rail-card ul { margin: 0; padding-left: 18px; }
.rail-card li { margin: 6px 0; font-size: .92rem; }
.finished-card { padding: 0; overflow: hidden; }
.finished-card img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: contain; background: #efe7d6; }
.finished-card b { display: block; padding: 14px 16px 0; font-size: 1.1rem; }
.finished-card small { display: block; padding: 4px 16px 16px; color: var(--muted); }
.allergen-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.allergen-chip { display: inline-flex; align-items: center; gap: 7px; background: rgba(47,85,56,.07); border: 1px solid rgba(47,85,56,.22); color: var(--green-deep); font-weight: 700; font-size: .84rem; border-radius: 999px; padding: 6px 12px; }
.allergen-ico { font-size: 1rem; }
.muted-note { color: var(--muted); font-size: .8rem; margin: 12px 0 0; line-height: 1.5; }
.tips-list { list-style: disc; }
.rail-flag { background: var(--flag-bg); border-color: var(--flag-border); }
.rail-flag h3, .rail-flag li { color: var(--flag-text); }

/* Allergen index + rollouts + soon */
.count-soft { margin-left: auto; font-family: var(--font-label); font-size: .72rem; color: var(--muted); }
.allergen-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.allergen-link { background: var(--chalk); border: 1px solid var(--tan-line); border-radius: 999px; padding: 7px 13px; text-decoration: none; color: var(--green-deep); font-weight: 700; font-size: .9rem; }
.allergen-link:hover { background: var(--tan); }
.pill-soft { font-family: var(--font-label); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; background: var(--flag-bg); border: 1px solid var(--flag-border); color: var(--flag-text); border-radius: 999px; padding: 4px 10px; }
.rollout-card { background: var(--paper); border: 1px solid var(--tan-line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-soft); }
.rollout-card b { color: var(--green-deep); }
.rollout-card p { margin: 8px 0 0; color: var(--ink-soft); }
.soon-card { text-align: center; background: var(--paper); border: 2px dashed var(--tan-line); border-radius: var(--radius-xl); padding: 48px 24px; }
.soon-ico { font-size: 2.4rem; }
.soon-card h1 { font-family: var(--font-display); font-weight: 400; margin: 10px 0; }

/* Responsive: collapse sidebar under 980px */
@media (max-width: 980px) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); min-height: 100vh; }
  .sidebar.open { transform: translateX(0); }
  .header-search { display: none; }
  main { padding: 18px 16px 40px; }
  .hero-cards { grid-template-columns: 1fr; }
  .ops-stats { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 981px) {
  .menu-button { display: none; }
  .sidebar-scrim { display: none; }
}
@media (max-width: 560px) {
  .header-right .user-text, .header-pill span { display: none; }
  .quick-grid { grid-template-columns: 1fr; }
  .detail-top { flex-direction: column; }
  .detail-actions { width: 100%; justify-content: flex-start; }
  .build-step { grid-template-columns: 26px 1fr; }
  .build-step .step-thumb { grid-row: 2; grid-column: 1 / -1; width: 100%; height: auto; max-height: 320px; object-fit: contain; }
}

/* Print */
@media print {
  .site-header, .sidebar, .sidebar-scrim, .site-footer, .print-btn, .home-btn, .back-link { display: none !important; }
  .shell, main { display: block; max-width: none; padding: 0; }
  .build-layout { grid-template-columns: 1fr 1fr; }
  .rail-card, .panel { break-inside: avoid; box-shadow: none; }
  .photo-warning { border: 1px solid #000; color: #000 !important; }
}

/* text-only build steps (sandwiches without per-step photos) */
.build-step-text { grid-template-columns: 30px 1fr; }
.build-step-text .step-body p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

/* ===== Browse / search results view ===== */
.browse-bar { margin: 4px 0 6px; }
.browse-bar .home-search-wrap { max-width: 640px; }
.browse-head { margin-top: 18px; }
.browse-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.browse-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--tan-line); color: var(--ink-soft); font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.browse-chip:hover { border-color: var(--green); color: var(--ink); }
.browse-chip.active { background: var(--green); border-color: var(--green); color: #fff; }
@media (max-width: 560px) { .browse-chips { gap: 6px; } .browse-chip { padding: 7px 12px; font-size: .82rem; } }

/* ===== Staff feedback / maintenance links ===== */
.footer-small a { color: rgba(247,242,232,.86); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.feedback-card { border-left: 4px solid var(--green); }
.feedback-card p { margin: 0 0 10px; color: var(--ink-soft); font-size: .92rem; line-height: 1.45; }
.procedure-status { white-space: nowrap; }

/* ===== Homepage cleanup: remove technical stats feel and tighten mobile hero ===== */
.home-hero { margin-bottom: 18px; }
.home-hero .ops-hero-card { min-height: 0; }
.quick-section { margin-top: 4px; }
@media (max-width: 560px) {
  .home-hero { margin-bottom: 16px; }
  .hero-cards { gap: 12px; padding: 0; }
  .ops-hero-card {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 22px 24px 24px;
    border-radius: 24px;
  }
  .ops-hero-card h2 { font-size: clamp(2rem, 10vw, 3rem); }
  .ops-copy { font-size: 1rem; line-height: 1.5; margin-bottom: 16px; }
  .ops-actions { display: flex; gap: 10px; }
  .ops-primary, .ops-secondary { flex: 1 1 100%; padding: 12px 16px; }
}

/* ============================================================
   Agency-style polish pass: clearer mobile nav, cleaner actions,
   searchable procedures, and checklist-ready procedure pages.
   ============================================================ */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
}
@media (max-width: 899px) {
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav {
    grid-template-columns: repeat(5, 1fr);
    height: calc(76px + env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-nav-item { min-width: 0; }
  .bottom-nav-item b { font-size: .7rem; line-height: 1; }
}
.bottom-nav-item b { display: block; font-weight: 900; }
.bottom-nav-item:hover { color: var(--green-deep); }
.bottom-nav-item.active span { box-shadow: 0 4px 14px rgba(24,53,34,.22); }

/* Cleaner search control */
.home-search-wrap .search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--green-deep);
  color: var(--cream);
  font-weight: 900;
  cursor: pointer;
}
.home-search-wrap:has(.search-clear) .search-input { padding-right: 82px; }

/* Stronger button system */
.ops-primary, .ops-secondary, .print-btn, .home-btn, .small-action {
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}
.ops-primary:hover, .ops-secondary:hover, .print-btn:hover, .home-btn:hover, .small-action:hover,
.quick-tile:hover, .procedure-card:hover, .recipe-card:hover {
  transform: translateY(-1px);
}
.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--green-deep);
  color: var(--cream);
  font-weight: 900;
  text-decoration: none;
}

/* More polished homepage hierarchy */
.ops-actions { flex-wrap: wrap; }
.ops-actions .ops-primary, .ops-actions .ops-secondary { min-height: 46px; }
.quick-grid { align-items: stretch; }
.quick-tile b { font-size: 1rem; }
.quick-tile small { line-height: 1.35; }
.card-desc {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.35;
}
.recipe-card .card-body { display: flex; flex-direction: column; }
.recipe-card .card-meta { margin-top: auto; }

/* Procedure search results */
.procedure-results { margin-top: 28px; }
.procedure-results .section-title { font-size: clamp(1.15rem, 4vw, 1.55rem); }

/* Checklist-style procedure pages */
.checklist-panel ul.checklist-list {
  list-style: none;
  padding-left: 0;
}
.checklist-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  margin: 10px 0;
}
.check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--green);
  border-radius: 6px;
  background: #fff;
  margin-top: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.template-checklist {
  display: grid;
  gap: 10px;
  max-width: 620px;
  margin: 20px auto 0;
  text-align: left;
}
.template-checklist div {
  background: rgba(47,85,56,.06);
  border: 1px solid rgba(47,85,56,.18);
  border-radius: 16px;
  padding: 13px 14px;
}
.template-checklist b {
  display: block;
  color: var(--green-deep);
  margin-bottom: 4px;
}
.template-checklist span {
  display: block;
  color: var(--muted);
  font-size: .92rem;
}
.procedure-placeholder { border-style: solid; }

/* Cleaner detail pages */
.detail-top {
  background: rgba(255,253,248,.58);
  border: 1px solid rgba(228,214,191,.7);
  border-radius: 22px;
  padding: 16px;
}
.detail-actions .print-btn, .detail-actions .home-btn { margin-top: 0; }
.prep-label {
  border-radius: 20px;
  overflow: hidden;
}
.meta-item dt { letter-spacing: .08em; }
.feedback-card { background: linear-gradient(180deg, var(--paper), #FBF6EA); }

/* Mobile-first kitchen usability */
@media (max-width: 700px) {
  .header-search { display: none; }
  .header-inner { padding: 12px 12px; gap: 10px; }
  .brand-logo { width: 52px; height: 52px; }
  .brand-sub { letter-spacing: .14em; }
  main { padding-left: 14px; padding-right: 14px; }
  .home-hero { margin-left: -14px; margin-right: -14px; }
  .welcome-card { margin-left: 14px; margin-right: 14px; }
  .quick-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .card-grid { gap: 12px; }
  .detail-top { padding: 14px; }
  .detail-title { font-size: clamp(1.65rem, 9vw, 2.35rem); }
  .build-step { grid-template-columns: 30px 88px 1fr; gap: 10px; }
  .step-thumb { width: 88px; height: 74px; }
  .prep-label { grid-template-columns: 1fr; }
  .procedure-card { grid-template-columns: 46px 1fr auto; padding: 14px; }
}
@media (max-width: 420px) {
  .user-chip { display: none; }
  .header-home-pill span { display: none; }
  .header-home-pill { width: 44px; justify-content: center; }
  .ops-actions { display: grid; grid-template-columns: 1fr; }
}

/* Cleaner print output */
@media print {
  body { background: #fff !important; color: #000; padding-bottom: 0 !important; }
  .bottom-nav, .sidebar, .sidebar-scrim, .site-header, .site-footer, .back-link, .detail-actions, .feedback-card { display: none !important; }
  main { max-width: none; padding: 0 !important; }
  .detail-top { border: 0; padding: 0; background: #fff; }
  .prep-label, .panel, .rail-card { box-shadow: none !important; break-inside: avoid; }
  .detail-photo, .finished-card img { max-height: 260px; object-fit: contain; }
  .build-layout { display: block; }
  .build-rail { margin-top: 12pt; }
  .template-checklist div { border: 1px solid #999; background: #fff; }
}

/* ============================================================
   Home flow cleanup: one intro, four main actions, small utilities
   ============================================================ */
.home-hero-single { margin-bottom: 16px; }
.home-hero-single .hero-image { height: clamp(150px, 30vw, 260px); }
.home-hero-single .hero-image::after { height: clamp(150px, 30vw, 260px); }
.home-hero-single .welcome-card { margin-top: -42px; }
.quick-grid-primary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.main-action-tile {
  min-height: 116px;
  align-items: flex-start;
  position: relative;
}
.main-action-tile .quick-ico { width: 48px; height: 48px; font-size: 1.25rem; }
.main-action-tile b { font-size: 1.08rem; }
.main-action-tile .quick-arrow { position: absolute; right: 16px; top: 16px; }
.utility-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -8px 0 24px;
}
.utility-strip a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255,253,248,.72);
  border: 1px solid rgba(228,214,191,.9);
  color: var(--green-deep);
  text-decoration: none;
  font-weight: 800;
  font-size: .86rem;
}
.utility-strip a:hover { background: var(--paper); border-color: var(--green); }
.featured-section { margin-top: 20px; }
.featured-scroll {
  grid-auto-columns: minmax(170px, 22%);
  scrollbar-width: thin;
}
.featured-scroll .recipe-card { min-width: 0; }

@media (max-width: 700px) {
  .header-inner { padding-top: 10px; padding-bottom: 10px; }
  .brand-logo { width: 48px; height: 48px; }
  .brand-name { font-size: clamp(1.18rem, 5.5vw, 1.7rem); }
  .brand-sub { font-size: clamp(.62rem, 2.5vw, .76rem); letter-spacing: .18em; }
  .home-hero-single .hero-image { height: 138px; }
  .home-hero-single .hero-image::after { height: 138px; }
  .home-hero-single .welcome-card {
    margin-top: -34px;
    padding: 18px 18px 17px;
    border-radius: 24px;
  }
  .home-hero-single .script-kicker { font-size: clamp(1.75rem, 8vw, 2.25rem); }
  .home-hero-single .welcome-card h1 { font-size: clamp(2.15rem, 10vw, 3.15rem); }
  .home-hero-single .welcome-copy { margin: 10px 0 14px; font-size: 1.02rem; line-height: 1.45; }
  .home-hero-single .bs-stamp { opacity: .55; }
  .quick-section { margin: 14px 0 12px; }
  .quick-grid-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .main-action-tile {
    min-height: 134px;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }
  .main-action-tile .quick-ico { width: 44px; height: 44px; }
  .main-action-tile b { font-size: 1rem; line-height: 1.12; }
  .main-action-tile small { font-size: .82rem; line-height: 1.25; }
  .main-action-tile .quick-arrow { top: 13px; right: 13px; }
  .utility-strip { justify-content: flex-start; margin: 0 0 20px; }
  .utility-strip a { font-size: .82rem; padding-inline: 11px; }
  .featured-section { margin-top: 18px; }
  .featured-scroll {
    margin-right: -14px;
    padding-right: 16px;
    grid-auto-columns: minmax(156px, 44vw);
    gap: 10px;
  }
  .recipe-card-compact .card-body { min-height: 82px; padding: 12px; }
  .recipe-card-compact .card-title { font-size: .98rem; }
  .recipe-card-compact .card-cat { font-size: .82rem; }
  main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 380px) {
  .quick-grid-primary { grid-template-columns: 1fr; }
  .main-action-tile { min-height: 96px; }
}


/* ============================================================
   Final phone demo polish: tighter welcome, shorter footer,
   cleaner carousel, lighter sidebar.
   ============================================================ */
@media (max-width: 700px) {
  .home-hero-single .hero-image { height: 118px; }
  .home-hero-single .hero-image::after { height: 118px; }
  .home-hero-single .welcome-card {
    margin-top: -28px;
    padding: 15px 16px 15px;
    border-radius: 22px;
  }
  .home-hero-single .script-kicker { font-size: clamp(1.55rem, 7vw, 2rem); }
  .home-hero-single .welcome-card h1 { font-size: clamp(1.95rem, 9vw, 2.72rem); }
  .home-hero-single .welcome-copy { margin: 8px 0 12px; font-size: .96rem; line-height: 1.38; }
  .home-hero-single .bs-stamp { width: 64px; height: 64px; font-size: .38rem; right: 14px; top: 14px; opacity: .42; }
  .home-hero-single .bs-stamp b { font-size: 1.04rem; }
  .search-input { padding-top: 13px; padding-bottom: 13px; }
  .quick-section { margin-top: 12px; margin-bottom: 10px; }
  .utility-strip { margin-bottom: 16px; gap: 7px; }
  .featured-section { margin-top: 12px; margin-bottom: 2px; }
  .featured-scroll {
    grid-auto-columns: minmax(150px, calc((100vw - 42px) / 2));
    gap: 10px;
    padding-bottom: 2px;
    scroll-padding-left: 0;
  }
  .recipe-card-compact .card-photo-wrap { aspect-ratio: 1 / .95; }
  .recipe-card-compact .card-body { min-height: 74px; }
  main { padding-bottom: 24px; }
  .site-footer { margin-top: 14px; }
  .footer-inner { padding: 18px 14px 20px; }
  .footer-tagline { font-size: .88rem; margin-bottom: 4px; }
  .footer-small { font-size: .72rem; line-height: 1.45; max-width: 340px; margin: 0 auto; }
  .side-badge { display: none; }
  .side-link, .side-group-btn { min-height: 44px; }
}
@media (min-width: 701px) {
  .site-footer { margin-top: 20px; }
  .footer-inner { padding: 22px 16px 26px; }
}


/* ============================================================
   Desktop homepage polish: split welcome/search and Start Here.
   Keeps the mobile flow unchanged while using laptop space better.
   ============================================================ */
.start-here-head { display: none; }

@media (min-width: 980px) {
  .home-desktop-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(292px, .72fr);
    gap: 20px;
    align-items: stretch;
    margin: 22px 0 18px;
  }
  .home-desktop-hero,
  .home-desktop-hero .home-hero-single {
    min-width: 0;
    height: 100%;
  }
  .home-desktop-hero .home-hero-single {
    margin: 0;
  }
  .home-desktop-hero .home-hero-single .hero-image {
    height: 100%;
    min-height: 360px;
    max-height: 430px;
    border-radius: 28px;
  }
  .home-desktop-hero .home-hero-single .hero-image::after {
    height: 100%;
    min-height: 360px;
    max-height: 430px;
    border-radius: 28px;
  }
  .home-desktop-hero .home-hero-single .welcome-card {
    max-width: 620px;
    margin: -235px 24px 24px;
    padding: 26px 28px 28px;
  }
  .home-desktop-hero .welcome-card h1 {
    font-size: clamp(3.1rem, 5.2vw, 5rem);
  }
  .home-desktop-hero .welcome-copy {
    max-width: 510px;
    font-size: 1.16rem;
  }
  .home-desktop-hero .script-kicker {
    font-size: clamp(2.25rem, 3.3vw, 3rem);
  }
  .home-desktop-hero .bs-stamp {
    width: 92px;
    height: 92px;
    right: 22px;
    top: 22px;
    opacity: .62;
  }

  .home-start-panel {
    margin: 0;
    padding: 22px;
    border-radius: 28px;
    background:
      radial-gradient(circle at 85% 4%, rgba(215,192,156,.18), transparent 34%),
      rgba(255,253,248,.86);
    border: 1.5px solid var(--tan-line);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 360px;
  }
  .start-here-head {
    display: block;
    margin: 0 0 14px;
  }
  .start-here-head .ops-kicker {
    color: var(--green);
    margin: 0 0 8px;
    font-size: .72rem;
  }
  .start-here-head .ops-kicker::after {
    width: 54px;
    height: 4px;
    margin-top: 8px;
  }
  .start-here-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.55rem, 2.2vw, 2.05rem);
    line-height: 1.08;
    color: var(--ink);
  }
  .home-start-panel .quick-grid-primary {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .home-start-panel .main-action-tile {
    min-height: 78px;
    padding: 13px 15px;
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }
  .home-start-panel .main-action-tile .quick-ico {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
  .home-start-panel .main-action-tile b {
    font-size: 1rem;
  }
  .home-start-panel .main-action-tile small {
    font-size: .82rem;
    line-height: 1.24;
  }
  .home-start-panel .main-action-tile .quick-arrow {
    position: static;
    margin-left: auto;
    font-size: 1.15rem;
  }
  .utility-strip {
    justify-content: flex-end;
    margin-top: -4px;
    margin-bottom: 20px;
  }
  .featured-section {
    margin-top: 16px;
  }
  .featured-scroll {
    grid-auto-columns: minmax(198px, 24%);
    gap: 14px;
  }
}

@media (min-width: 1180px) {
  .home-desktop-intro {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .72fr);
    gap: 24px;
  }
  .home-start-panel {
    padding: 26px;
  }
  .home-start-panel .main-action-tile {
    min-height: 86px;
  }
}

@media (min-width: 980px) and (max-width: 1120px) {
  .home-desktop-hero .home-hero-single .welcome-card {
    margin-top: -230px;
  }
  .home-desktop-hero .welcome-card h1 {
    font-size: clamp(2.75rem, 4.8vw, 4.25rem);
  }
  .home-start-panel .main-action-tile small {
    display: none;
  }
}
