/* ==========================================================================
   Howzit Healthy — brand stylesheet
   Mobile-first, no webfonts, no frameworks. One request, hard-cached.
   ========================================================================== */

:root {
  /* Brand — taken from the badge logo: olive green, near-black, white.
     There is no red in the identity; red below is functional only. */
  --ink:        #0D0D0D;
  --ink-2:      #171717;
  --ink-3:      #242424;
  --green:      #74A343;
  --green-mid:  #8ABF52;   /* lifts on dark backgrounds */
  --green-dark: #557C2E;
  --green-deep: #3F5D1F;
  --green-soft: #EDF4E2;
  --green-line: #CFE0B4;

  /* Functional only — never used as a brand colour */
  --red:        #C4392F;
  --red-dark:   #9E2A22;
  --red-soft:   #FBEDEB;

  /* Neutrals */
  --paper:      #FFFFFF;
  --bone:       #F7F7F4;
  --line:       #E4E4DE;
  --line-soft:  #EFEFEA;
  --text:       #1B1B1B;
  --muted:      #6A6A66;
  --muted-2:    #8E8E88;

  /* System */
  --radius:     14px;
  --radius-sm:  9px;
  --radius-lg:  22px;
  --shadow:     0 1px 2px rgba(20,20,20,.05), 0 8px 24px -12px rgba(20,20,20,.18);
  --shadow-lg:  0 2px 4px rgba(20,20,20,.06), 0 24px 48px -20px rgba(20,20,20,.28);
  --gradient:   linear-gradient(90deg, var(--green-deep) 0%, var(--green) 50%, var(--green-mid) 100%);

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

  --wrap: 1160px;
  --gutter: 20px;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; left: 12px; z-index: 200;
  background: var(--green); color: #fff; padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: 0; }

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 760px; }
.wrap-mid { max-width: 940px; }

.section { padding: 56px 0; }
.section-sm { padding: 36px 0; }
@media (min-width: 800px) { .section { padding: 84px 0; } .section-sm { padding: 52px 0; } }

.section-dark { background: var(--ink); color: #EDEDEA; }
.section-bone { background: var(--bone); }

.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-meals { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-meals { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-meals { grid-template-columns: repeat(3, 1fr); }
  .grid { gap: 24px; }
}

.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { justify-content: space-between; }
.row-tight { gap: 8px; }
.spacer { flex: 1; }

/* ------------------------------------------------------------ typography */
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2rem, 6.2vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 4.2vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.4rem); }
h4 { font-size: 1.02rem; letter-spacing: -0.01em; }

p { text-wrap: pretty; }
.lede { font-size: clamp(1.03rem, 2.1vw, 1.18rem); color: var(--muted); line-height: 1.6; }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.center { text-align: center; }
.bold { font-weight: 700; }

.section-dark .muted, .section-dark .lede { color: #A8A8A2; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #FFF; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .715rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--green-dark);
}
.section-dark .eyebrow { color: var(--green-mid); }
.eyebrow::before {
  content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--gradient);
}

.rule { height: 4px; width: 62px; border-radius: 2px; background: var(--gradient); border: 0; }

.wordmark-green { color: var(--green); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 700; font-size: .945rem; letter-spacing: -0.01em;
  text-decoration: none; border: 2px solid transparent;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }

.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-3); }

.btn-ghost { border-color: currentColor; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.section-dark .btn-ghost { color: #fff; }
.section-dark .btn-ghost:hover { background: #fff; color: var(--ink); }

.btn-sm { padding: 9px 16px; font-size: .85rem; }
.btn-lg { padding: 16px 30px; font-size: 1.03rem; }
.btn-block { width: 100%; }

.link {
  color: var(--green-dark); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px;
  text-decoration-color: rgba(116,163,67,.45);
}
.link:hover { text-decoration-color: var(--green); }
.section-dark .link { color: var(--green-mid); text-decoration-color: rgba(116,163,67,.4); }

/* ----------------------------------------------------------------- badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .715rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: var(--bone); color: var(--muted); border: 1px solid var(--line);
}
.badge-lean  { background: var(--green-soft); color: var(--green-deep); border-color: var(--green-line); }
.badge-bulk  { background: #1F1F1F;           color: #E8E8E4;           border-color: #1F1F1F; }
.badge-stock-in   { background: var(--green-soft); color: var(--green-deep); border-color: var(--green-line); }
.badge-stock-low  { background: #FFF3E0; color: #97590A; border-color: #F5D9A8; }
.badge-stock-out  { background: #F1F1EE; color: var(--muted-2); border-color: var(--line); }
.badge-solid { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------------ card */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card-pad-lg { padding: 26px; }
@media (min-width: 700px) { .card-pad-lg { padding: 34px; } }
.card-flat { box-shadow: none; }
.card-dark { background: var(--ink-2); border-color: #333; color: #E8E8E4; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.header-strip { height: 3px; background: var(--gradient); }
.header-inner { display: flex; align-items: center; gap: 14px; height: 62px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; }

.brand-text { line-height: 1; display: flex; align-items: baseline; gap: 6px; }

/* "Howzit" is hand-lettered brush script in the badge. Nothing on a system
   stack matches it, so the inline lockup leans italic and lets the badge
   artwork carry the real letterforms wherever it is shown at size. */
.wordmark-script {
  font-family: "Snell Roundhand", "Segoe Script", "Bradley Hand", cursive;
  font-style: italic; font-weight: 700; font-size: 1.32rem;
  letter-spacing: -.01em; color: #fff;
}
.wordmark-block {
  font-weight: 800; font-size: .82rem; letter-spacing: .17em;
  text-transform: uppercase; color: var(--green-mid);
}
@media (max-width: 420px) {
  .wordmark-script { font-size: 1.14rem; }
  .wordmark-block { font-size: .7rem; letter-spacing: .13em; }
}

/* Full circular badge, for large surfaces only. */
.brand-badge { width: 100%; max-width: 220px; height: auto; margin: 0 auto; border-radius: 50%; }
.brand-badge-sm { max-width: 132px; }
.brand-badge-lg { max-width: 300px; }

/* Strapline from the badge: "Real Food. Real Flavour. Real Results." */
.strapline {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
  font-size: .78rem; font-weight: 800; letter-spacing: .04em; color: #C6C6C0;
}
.strapline span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.strapline svg { width: 15px; height: 15px; color: var(--green-mid); flex-shrink: 0; }
.strapline-light span { color: var(--muted); }
.strapline-light svg { color: var(--green); }

/* The badge's outer arc line, used as a section device. */
.arc-tagline {
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--muted);
}
.arc-tagline b { color: var(--green-dark); font-weight: 800; }

.nav { display: none; gap: 4px; margin-left: 10px; }
@media (min-width: 1000px) { .nav { display: flex; } }
.nav a {
  padding: 8px 12px; border-radius: 8px; text-decoration: none;
  font-size: .9rem; font-weight: 600; color: #CFCFCA;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav a[aria-current] { color: var(--green-mid); background: rgba(116,163,67,.14); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: #fff;
  font-size: .85rem; font-weight: 700; text-decoration: none;
  border: 1px solid rgba(255,255,255,.1);
}
.icon-btn:hover { background: rgba(255,255,255,.15); }
.icon-btn svg { width: 17px; height: 17px; }

.cart-pill { background: var(--green); color: #fff; border-color: var(--green); }
.cart-pill:hover { background: #8ABF52; }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800;
  display: grid; place-items: center;
}

.menu-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.1);
}
@media (min-width: 1000px) { .menu-toggle { display: none; } }

.mobile-nav {
  display: none; background: var(--ink-2); border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px var(--gutter) 18px;
}
.mobile-nav.open { display: block; }
@media (min-width: 1000px) { .mobile-nav { display: none !important; } }
.mobile-nav a {
  display: block; padding: 12px 6px; text-decoration: none; color: #D8D8D4;
  font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.06);
}
.mobile-nav a[aria-current] { color: var(--green-mid); }
.mobile-nav .mobile-nav-group { padding-top: 10px; }
.mobile-nav .mobile-nav-group span {
  display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); padding: 6px;
}

/* ---------------------------------------------------------- target bar */
.target-bar {
  background: var(--ink-2); color: #E4E4E0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .85rem;
}
.target-bar .wrap { display: flex; align-items: center; gap: 12px; padding-top: 9px; padding-bottom: 9px; flex-wrap: wrap; }
.target-bar strong { color: var(--green-mid); font-variant-numeric: tabular-nums; }
.target-bar form { margin-left: auto; }
.target-bar button {
  color: #9C9C97; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px;
}
.target-bar button:hover { color: #fff; }

/* ----------------------------------------------------------------- hero */
.hero {
  background: var(--ink); color: #fff;
  position: relative; overflow: hidden;
  padding: 44px 0 52px;
}
@media (min-width: 900px) { .hero { padding: 72px 0 84px; } }
.hero::after {
  content: ""; position: absolute; inset: auto -10% -60% 40%;
  height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(116,163,67,.16), transparent 62%);
  pointer-events: none;
}
.hero-grid { display: grid; gap: 34px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 54px; } }

.hero h1 { font-size: clamp(2.15rem, 7.4vw, 3.85rem); }
.hero-tagline { font-size: clamp(1rem, 2.3vw, 1.2rem); color: #B4B4AE; max-width: 46ch; }

/* Meal "photography" — layered CSS plates. Zero image bytes. */
.plate {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius);
  overflow: hidden; background: var(--ink-3);
  display: grid; place-items: center;
}
.plate::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,.20), transparent 46%),
    radial-gradient(circle at 74% 72%, rgba(0,0,0,.30), transparent 52%),
    linear-gradient(150deg, var(--tone, #74A343) 0%, color-mix(in srgb, var(--tone, #74A343) 55%, #241a12) 100%);
}
.plate::after {
  content: ""; position: absolute; inset: 14%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 38%, rgba(255,255,255,.22), transparent 40%),
    color-mix(in srgb, var(--tone, #74A343) 78%, #120d09);
  box-shadow: inset 0 0 0 6px rgba(255,255,255,.10), 0 12px 30px -12px rgba(0,0,0,.6);
}
.plate-label {
  position: relative; z-index: 2;
  font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.82); text-shadow: 0 1px 6px rgba(0,0,0,.55);
  padding: 0 14px; text-align: center;
}
.plate-hero { aspect-ratio: 1 / 1; border-radius: var(--radius-lg); }
@media (min-width: 900px) { .plate-hero { aspect-ratio: 4 / 3.4; } }

/* -------------------------------------------------------- area checker */
.area-check {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--radius); padding: 18px;
}
@media (min-width: 700px) { .area-check { padding: 22px; } }
.area-check h2 { font-size: 1.08rem; margin-bottom: 4px; }
.area-check-form { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.area-check-form input {
  flex: 1 1 200px; min-width: 0;
  padding: 13px 15px; border-radius: 999px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: .95rem;
}
.area-check-form input::placeholder { color: #8E8E88; }
.area-check-form input:focus { background: rgba(255,255,255,.14); outline-color: var(--green); }

.area-result { margin-top: 14px; padding: 13px 16px; border-radius: var(--radius-sm); font-size: .9rem; display: none; }
.area-result.show { display: block; }
.area-result.yes { background: rgba(116,163,67,.18); border: 1px solid rgba(116,163,67,.4); color: #CFE3B2; }
.area-result.no  { background: rgba(196,57,47,.14); border: 1px solid rgba(196,57,47,.38); color: #F0BDB8; }
.area-result strong { color: #fff; }
.area-result form { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.area-result input[type=email] {
  flex: 1 1 190px; padding: 10px 14px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff;
}

.zone-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.zone-chip {
  font-size: .74rem; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.11); color: #B8B8B2;
}

/* ------------------------------------------------------------ meal card */
.meal-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.meal-card:hover { border-color: #CFCFC8; box-shadow: var(--shadow); transform: translateY(-2px); }
.meal-card.is-out { opacity: .72; }
.meal-card.is-out:hover { transform: none; }

.meal-card-media { position: relative; text-decoration: none; display: block; }
.meal-card-media .plate { border-radius: 0; aspect-ratio: 16 / 10; }
.meal-card-badges {
  position: absolute; inset: 10px 10px auto 10px; z-index: 3;
  display: flex; justify-content: space-between; gap: 8px; pointer-events: none;
}
.meal-card-badges .badge { backdrop-filter: blur(6px); background: rgba(255,255,255,.92); }

.meal-card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.meal-card-body h3 { font-size: 1.06rem; }
.meal-card-body h3 a { text-decoration: none; }
.meal-card-body h3 a:hover { color: var(--green-dark); }
.meal-blurb { font-size: .86rem; color: var(--muted); line-height: 1.5; }

/* "Numbers shown, not sold" — factual, quiet, monospaced. */
.nutri-strip {
  display: flex; flex-wrap: wrap; gap: 0 14px;
  padding-top: 10px; border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: .765rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.nutri-strip b { color: var(--text); font-weight: 600; }

.meal-card-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.price { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-sub { font-size: .72rem; color: var(--muted-2); font-weight: 500; }

/* --------------------------------------------------------- quick add ui */
.qa { margin-left: auto; }
.qa-btn { padding: 9px 15px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: .84rem; }
.qa-btn:hover { background: var(--green); color: #fff; }
.qa-btn[disabled] { background: var(--line); color: var(--muted-2); cursor: not-allowed; }
.qa-btn.added { background: var(--green); color: #fff; }

.qty {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; background: var(--paper);
}
.qty button {
  width: 34px; height: 34px; display: grid; place-items: center;
  font-size: 1.1rem; font-weight: 700; color: var(--muted);
}
.qty button:hover { background: var(--bone); color: var(--ink); }
.qty input {
  width: 40px; text-align: center; border: 0; background: none;
  font-weight: 700; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* -------------------------------------------------------------- filters */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); background: var(--paper);
  font-size: .865rem; font-weight: 600; color: var(--muted);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-green[aria-current] { background: var(--green); border-color: var(--green); color: var(--ink); }
.chip-red[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-clear { color: var(--red); border-color: #F4C9CD; }

select.input-select {
  padding: 9px 34px 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236A6A66' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none; font-size: .865rem; font-weight: 600; cursor: pointer;
}

/* --------------------------------------------------------------- forms */
.field { display: block; margin-bottom: 18px; }
.field > label, .label {
  display: block; font-weight: 700; font-size: .855rem; margin-bottom: 7px; letter-spacing: -.01em;
}
.field-hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.field-error { font-size: .82rem; color: var(--red-dark); margin-top: 6px; font-weight: 600; }

.input, input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=password], input[type=date], input[type=search], textarea, select.input {
  width: 100%; padding: 12px 15px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); font-size: 1rem;
}
textarea { resize: vertical; min-height: 120px; }
.input:focus, input:focus, textarea:focus, select:focus { border-color: var(--green); outline-offset: 0; }
.input-invalid { border-color: var(--red); background: #FFFBFB; }

.input-inline { display: flex; gap: 8px; }
.input-inline .input { flex: 1; }

/* Segmented radio groups — big tap targets on a phone. */
.segments { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.segments-3 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .segments-3 { grid-template-columns: repeat(3, 1fr); } }
.segments-stack { grid-template-columns: 1fr; }

.segment { position: relative; }
.segment input { position: absolute; opacity: 0; width: 0; height: 0; }
.segment span {
  display: block; padding: 13px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--paper);
  font-weight: 700; font-size: .92rem; text-align: center; cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}
.segment small { display: block; font-weight: 500; font-size: .765rem; color: var(--muted); margin-top: 3px; }
.segment span:hover { border-color: var(--muted-2); }
.segment input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.segment input:checked + span small { color: #B0B0AA; }
.segment input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.segment-green input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.segment-green input:checked + span small { color: #E8F0DC; }
.segment-red input:checked + span { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.segment-red input:checked + span small { color: #B0B0AA; }

.segment-wide span { text-align: left; }

.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.checkbox input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--green); flex-shrink: 0; }

/* ----------------------------------------------------- calculator result */
.calc-result { background: var(--bone); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.calc-result-head { padding: 30px 22px; background: var(--paper); border-bottom: 1px solid var(--line); text-align: center; }
@media (min-width: 700px) { .calc-result-head { padding: 40px 30px; } }

.calc-number {
  font-size: clamp(3rem, 13vw, 4.6rem); font-weight: 800; line-height: 1;
  letter-spacing: -.045em; font-variant-numeric: tabular-nums;
}
.calc-number span { font-size: .3em; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.calc-caption { font-size: .84rem; color: var(--muted); margin-top: 8px; }

/* Macros: deliberately quieter than the calorie number. */
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.macro { background: var(--paper); padding: 14px 10px; text-align: center; }
.macro-value { font-family: var(--mono); font-size: 1.02rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.macro-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); margin-top: 2px; }

.disclaimer {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 16px; background: #FFFDF5; border: 1px solid #EFE4C0;
  border-radius: var(--radius-sm); font-size: .815rem; color: #6B5A20; line-height: 1.55;
}
.disclaimer svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

.calc-breakdown { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.calc-breakdown div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 15px; background: var(--paper); font-size: .875rem; }
.calc-breakdown dt, .calc-breakdown span:first-child { color: var(--muted); }
.calc-breakdown b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ------------------------------------------------------------- meal page */
.meal-hero { display: grid; gap: 26px; }
@media (min-width: 880px) { .meal-hero { grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; } }

.nutrition-panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nutrition-panel-head {
  padding: 11px 16px; background: var(--bone); border-bottom: 1px solid var(--line);
  font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}
.nutrition-panel table { font-size: .875rem; }
.nutrition-panel td { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.nutrition-panel tr:last-child td { border-bottom: 0; }
.nutrition-panel td:last-child { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nutrition-panel tr.is-primary td { font-weight: 700; background: #FBFBF9; }

.info-block { border-left: 3px solid var(--green); padding: 2px 0 2px 16px; }
.info-block.warn { border-left-color: var(--red); }
.info-block h4 { margin-bottom: 5px; }
.info-block p { font-size: .885rem; color: var(--muted); line-height: 1.6; }

.allergen-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.allergen {
  font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 7px;
  background: var(--red-soft); color: var(--red-dark); border: 1px solid #EFC9C5;
}
.allergen-none { background: var(--bone); color: var(--muted); border-color: var(--line); font-weight: 600; }

.min-reminder {
  display: flex; gap: 11px; align-items: center;
  padding: 13px 16px; border-radius: var(--radius-sm);
  background: var(--green-soft); border: 1px solid var(--green-line); color: var(--green-deep);
  font-size: .865rem; font-weight: 600;
}
.min-reminder.met { background: var(--bone); border-color: var(--line); color: var(--muted); }

/* -------------------------------------------------------------- progress */
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--gradient); transition: width .35s ease; }
.progress-dark { background: rgba(255,255,255,.13); }

/* ------------------------------------------------------------------ cart */
.cart-layout { display: grid; gap: 26px; align-items: start; }
@media (min-width: 940px) { .cart-layout { grid-template-columns: 1fr 370px; gap: 34px; } }
@media (min-width: 940px) { .cart-aside { position: sticky; top: 84px; } }

.cart-line { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-of-type { border-bottom: 0; }
.cart-line .plate { aspect-ratio: 1; border-radius: var(--radius-sm); }
.cart-line-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cart-line h3 { font-size: .99rem; }
.cart-line h3 a { text-decoration: none; }
.cart-line-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.remove-btn { font-size: .8rem; color: var(--muted-2); text-decoration: underline; text-underline-offset: 3px; }
.remove-btn:hover { color: var(--red); }

.totals { display: grid; gap: 9px; font-size: .92rem; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals .total-row {
  padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line);
  font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em;
}
.totals .discount { color: var(--green-dark); font-weight: 600; }
.totals b { font-variant-numeric: tabular-nums; }

.promo-form { display: flex; gap: 8px; }
.promo-form input { flex: 1; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.promo-applied {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: var(--green-soft); border: 1px solid var(--green-line); border-radius: var(--radius-sm);
  font-size: .865rem; color: var(--green-deep); font-weight: 600;
}

/* --------------------------------------------------------- date picker */
.cycle-group + .cycle-group { margin-top: 18px; }
.cycle-head { font-size: .78rem; color: var(--muted); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date-options { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.date-option span { text-align: left; padding: 12px 14px; }
.date-option .date-day { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.date-option input:checked + span .date-day { color: rgba(255,255,255,.7); }
.date-option .date-num { font-size: 1.02rem; font-weight: 800; margin-top: 2px; }

.cycle-explainer {
  display: grid; gap: 14px; counter-reset: step;
}
@media (min-width: 760px) { .cycle-explainer { grid-template-columns: repeat(3, 1fr); } }
.cycle-step { padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); position: relative; }
.cycle-step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--green-mid); font-weight: 800; font-size: .82rem; margin-bottom: 10px;
}
.cycle-step h4 { margin-bottom: 4px; }
.cycle-step p { font-size: .855rem; color: var(--muted); }

/* --------------------------------------------------------------- steps */
.steps { display: grid; gap: 16px; counter-reset: flowstep; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step { display: flex; gap: 14px; }
.step-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green); color: #fff;
  font-weight: 800; font-size: .92rem;
}
.step h4 { margin-bottom: 3px; }
.step p { font-size: .885rem; color: var(--muted); }

/* --------------------------------------------------------------- alerts */
.alert {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 16px; border-radius: var(--radius-sm); font-size: .89rem; line-height: 1.55;
  border: 1px solid;
}
.alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; }
.alert-success { background: var(--green-soft); border-color: var(--green-line); color: var(--green-deep); }
.alert-error   { background: var(--red-soft);   border-color: #EFC9C5; color: var(--red-dark); }
.alert-info    { background: #EDF4FD; border-color: #C7DCF5; color: #1F4E82; }
.alert-warn    { background: #FFF7E8; border-color: #F1DCAF; color: #7A5A12; }

.flash-stack { position: fixed; top: 74px; right: 16px; left: 16px; z-index: 150; display: grid; gap: 8px; pointer-events: none; }
@media (min-width: 700px) { .flash-stack { left: auto; width: 380px; } }
.flash-stack .alert { pointer-events: auto; box-shadow: var(--shadow-lg); background-color: #fff; }
.flash-stack .alert-success { background: #F3FAE8; }
.flash-stack .alert-error { background: #FEF3F4; }

/* ---------------------------------------------------------------- table */
.data-table { font-size: .89rem; }
.data-table th {
  text-align: left; padding: 12px 14px; background: var(--ink); color: #fff;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800;
}
.data-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:nth-child(even) td { background: #FCFCFA; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ------------------------------------------------------------------ faq */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  padding: 17px 34px 17px 0; cursor: pointer; font-weight: 700; font-size: .985rem;
  list-style: none; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s ease;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item[open] summary { color: var(--green-dark); }
.faq-item p { padding: 0 0 18px; color: var(--muted); font-size: .91rem; line-height: 1.65; max-width: 68ch; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: #A6A6A0; padding: 48px 0 22px; margin-top: 60px; }
.footer-grid { display: grid; gap: 30px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; } }
.site-footer h4 { color: #fff; font-size: .755rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 13px; }
.site-footer a { color: #A6A6A0; text-decoration: none; font-size: .885rem; }
.site-footer a:hover { color: var(--green-mid); }
.site-footer li { margin-bottom: 8px; }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.09);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .78rem; color: #75756F;
}

.whatsapp-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px;
  background: #25D366; color: #06331A !important; font-weight: 700; font-size: .875rem; text-decoration: none;
}
.whatsapp-btn:hover { background: #1FBF5B; color: #06331A !important; }
.whatsapp-btn svg { width: 18px; height: 18px; }

/* ------------------------------------------------------- sticky cart bar */
.sticky-cart {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--ink); color: #fff; padding: 11px var(--gutter);
  display: flex; align-items: center; gap: 12px;
  border-top: 2px solid var(--green);
  transform: translateY(110%); transition: transform .25s ease;
}
.sticky-cart.show { transform: translateY(0); }
@media (min-width: 940px) { .sticky-cart { display: none; } }
.sticky-cart-info { font-size: .8rem; line-height: 1.35; min-width: 0; }
.sticky-cart-info b { display: block; font-size: .95rem; }
.sticky-cart .btn { margin-left: auto; flex-shrink: 0; }
body.has-sticky-cart { padding-bottom: 74px; }

/* ------------------------------------------------------------ utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 34px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hide { display: none !important; }
@media (max-width: 619px) { .hide-sm { display: none !important; } }

.empty-state { text-align: center; padding: 50px 20px; }
.empty-state svg { width: 46px; height: 46px; color: var(--line); margin: 0 auto 14px; }

.breadcrumb { display: flex; gap: 7px; flex-wrap: wrap; font-size: .8rem; color: var(--muted-2); padding: 16px 0; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--green-dark); }

.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 700px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--paper); padding: 18px 16px; }
.stat-value { font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .765rem; color: var(--muted); margin-top: 2px; }

.quote { border-left: 3px solid var(--green); padding-left: 18px; font-size: 1.05rem; line-height: 1.6; }
.quote cite { display: block; font-size: .82rem; color: var(--muted); font-style: normal; margin-top: 9px; font-weight: 600; }

@media print {
  .site-header, .site-footer, .sticky-cart, .target-bar, .flash-stack { display: none !important; }
  body { background: #fff; }
}

/* ------------------------------------------------------------- hero badge */
.hero-badge { display: grid; place-items: center; }
.hero-badge .brand-badge { max-width: min(340px, 78vw); }
@media (min-width: 900px) { .hero-badge .brand-badge { max-width: 380px; } }
/* The badge artwork has a black field, so on light surfaces it sits on its own
   dark disc rather than appearing as a floating square. */
.card .brand-badge, .wrap-narrow .brand-badge { background: var(--ink); }

/* Category badges take their colour from the accent set in the admin, so the
   palette is data rather than markup. Text colour is contrast-checked in PHP. */
.badge-cat { border-style: solid; }
