/* ==========================================================================
   HealthyRizz Design System  —  hr.css
   Single source of truth for the public site.
   Replaces: main.min.css, footer-fix.css, mobile-app-ux.css,
             theme-switcher.css, dark-theme.css, light-theme.css
   Loaded AFTER the Tailwind CDN so it wins on conflicts.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Brand */
  --hr-green-50:  #ecfdf5;
  --hr-green-100: #d1fae5;
  --hr-green-200: #a7f3d0;
  --hr-green-500: #10b981;
  --hr-green-600: #059669;
  --hr-green-700: #047857;
  --hr-green-900: #064e3b;

  --hr-amber-50:  #fffbeb;
  --hr-amber-100: #fef3c7;
  --hr-amber-400: #fbbf24;
  --hr-amber-500: #f59e0b;
  --hr-amber-600: #d97706;

  /* Neutrals */
  --hr-ink:       #0f172a;
  --hr-ink-2:     #334155;
  --hr-muted:     #64748b;
  --hr-line:      #e2e8f0;
  --hr-line-soft: #f1f5f9;
  --hr-bg:        #ffffff;
  --hr-bg-alt:    #f8fafc;
  --hr-bg-warm:   #fdfaf4;

  /* Semantic */
  --hr-danger:    #dc2626;
  --hr-danger-bg: #fef2f2;
  --hr-info:      #0284c7;
  --hr-info-bg:   #f0f9ff;

  /* Type */
  --hr-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shape */
  --hr-r-sm: 8px;
  --hr-r:    14px;
  --hr-r-lg: 20px;
  --hr-r-xl: 28px;
  --hr-r-pill: 999px;

  /* Elevation */
  --hr-sh-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --hr-sh:    0 4px 12px rgba(15,23,42,.06), 0 2px 4px rgba(15,23,42,.04);
  --hr-sh-lg: 0 12px 32px rgba(15,23,42,.10), 0 4px 8px rgba(15,23,42,.04);

  /* Layout */
  --hr-container: 1200px;
  --hr-gutter: 20px;
  --hr-header-h: 72px;
}

/* ---------- 2. Reset / base ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hr-header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--hr-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--hr-ink-2);
  background: var(--hr-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-family: var(--hr-font);
  color: var(--hr-ink);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--hr-green-700); text-decoration: none; }
a:hover { color: var(--hr-green-600); }

img, svg, video { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

hr { border: 0; border-top: 1px solid var(--hr-line); margin: 2rem 0; }

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

/* Preflight replacements — Tailwind's own reset is disabled (see base.html),
   so these keep templates that still use Tailwind utilities behaving sanely. */
*, *::before, *::after { border-width: 0; border-style: solid; border-color: var(--hr-line); }
button, input, select, optgroup, textarea {
  font-family: inherit; font-size: 100%; line-height: inherit; color: inherit; margin: 0;
}
button, [type='button'], [type='submit'], [type='reset'] { -webkit-appearance: button; background-color: transparent; background-image: none; cursor: pointer; }
table { border-collapse: collapse; }
blockquote, figure { margin: 0; }
summary { display: list-item; }

/* ---------- 3. Layout ---------------------------------------------------- */
.hr-container {
  width: 100%;
  max-width: var(--hr-container);
  margin-inline: auto;
  padding-inline: var(--hr-gutter);
}
.hr-container--narrow { max-width: 780px; }
.hr-container--mid    { max-width: 960px; }

.hr-section { padding-block: clamp(48px, 6vw, 88px); }
.hr-section--tight { padding-block: clamp(32px, 4vw, 56px); }
.hr-section--alt  { background: var(--hr-bg-alt); }
.hr-section--warm { background: var(--hr-bg-warm); }
.hr-section--green {
  background: linear-gradient(135deg, var(--hr-green-700), var(--hr-green-900));
  color: #fff;
}
.hr-section--green h1, .hr-section--green h2, .hr-section--green h3 { color: #fff; }
.hr-section--green p { color: rgba(255,255,255,.85); }

/* Section heading block */
.hr-sec-head { max-width: 680px; margin: 0 0 clamp(28px, 3vw, 44px); }
.hr-sec-head--center { margin-inline: auto; text-align: center; }
.hr-sec-head p { color: var(--hr-muted); font-size: 1.05rem; margin-bottom: 0; }
.hr-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--hr-green-600);
  margin-bottom: .6rem;
}

/* Grid — explicit, never relies on a global .flex rule */
.hr-grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.hr-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.hr-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.hr-grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.hr-grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

@media (max-width: 900px) {
  .hr-grid-3, .hr-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .hr-grid-2, .hr-grid-3, .hr-grid-4 { grid-template-columns: minmax(0,1fr); }
}

/* Main column + sidebar; collapses to one column on tablet and below. */
.hr-split { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: clamp(24px, 3vw, 40px); align-items: start; }
@media (max-width: 900px) { .hr-split { grid-template-columns: minmax(0,1fr); } }

.hr-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hr-row--between { justify-content: space-between; }
.hr-row--center { justify-content: center; }
.hr-stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- 4. Buttons --------------------------------------------------- */
.hr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: var(--hr-r-pill);
  border: 1.5px solid transparent;
  font-family: var(--hr-font);
  font-size: .975rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.hr-btn:hover { transform: translateY(-1px); }
.hr-btn:active { transform: translateY(0); }

.hr-btn--primary {
  background: var(--hr-green-600);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5,150,105,.30);
}
.hr-btn--primary:hover { background: var(--hr-green-700); color: #fff; box-shadow: 0 6px 20px rgba(5,150,105,.38); }

.hr-btn--accent {
  background: var(--hr-amber-500);
  color: #3b2200;
  box-shadow: 0 4px 14px rgba(245,158,11,.30);
}
.hr-btn--accent:hover { background: var(--hr-amber-400); color: #3b2200; }

.hr-btn--outline {
  background: transparent;
  color: var(--hr-green-700);
  border-color: var(--hr-green-600);
}
.hr-btn--outline:hover { background: var(--hr-green-50); color: var(--hr-green-700); }

.hr-btn--ghost { background: var(--hr-bg-alt); color: var(--hr-ink); border-color: var(--hr-line); }
.hr-btn--ghost:hover { background: #fff; border-color: var(--hr-green-500); color: var(--hr-green-700); }

.hr-btn--onDark { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.5); backdrop-filter: blur(6px); }
.hr-btn--onDark:hover { background: #fff; color: var(--hr-green-700); }

.hr-btn--sm { padding: .55rem 1rem; font-size: .875rem; }
.hr-btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }
.hr-btn--block { display: flex; width: 100%; }

.hr-btn[disabled], .hr-btn.is-disabled { opacity: .55; pointer-events: none; }

/* ---------- 5. Header / navigation --------------------------------------- */
.hr-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hr-line);
}
.hr-header__inner {
  height: var(--hr-header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}
.hr-logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; color: var(--hr-ink); letter-spacing: -.02em; }
.hr-logo:hover { color: var(--hr-green-700); }
.hr-logo__mark {
  width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--hr-green-500), var(--hr-green-700));
  color: #fff;
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 800; letter-spacing: -.01em;
}
.hr-logo__img { height: 34px; width: auto; max-width: 190px; object-fit: contain; display: block; }
@media (max-width: 520px) { .hr-logo__img { height: 28px; max-width: 150px; } }
.hr-footer__brand .hr-logo__img { height: 30px; }

.hr-nav { display: flex; align-items: center; justify-content: center; gap: 4px; }
.hr-nav a {
  padding: .5rem .85rem;
  border-radius: var(--hr-r-pill);
  font-size: .95rem;
  font-weight: 600;
  color: var(--hr-ink-2);       /* explicit — never inherits a white */
  transition: background .15s ease, color .15s ease;
}
.hr-nav a:hover { background: var(--hr-green-50); color: var(--hr-green-700); }
.hr-nav a.is-active { color: var(--hr-green-700); background: var(--hr-green-50); }

.hr-header__actions { display: flex; align-items: center; gap: 10px; }

.hr-burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--hr-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.hr-burger span { display: block; width: 20px; height: 2px; background: var(--hr-ink); border-radius: 2px; position: relative; }
.hr-burger span::before, .hr-burger span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: var(--hr-ink); border-radius: 2px;
}
.hr-burger span::before { top: -6px; }
.hr-burger span::after  { top: 6px; }

/* Mobile drawer */
.hr-drawer {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,.45);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.hr-drawer.is-open { opacity: 1; pointer-events: auto; }
.hr-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(340px, 86vw);
  background: #fff;
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; gap: 6px;
}
.hr-drawer.is-open .hr-drawer__panel { transform: translateX(0); }
.hr-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hr-drawer__close {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--hr-line); background: #fff;
  font-size: 1.4rem; line-height: 1; color: var(--hr-ink); cursor: pointer;
}
.hr-drawer a.hr-drawer__link {
  display: block;
  padding: .85rem .9rem;
  border-radius: 12px;
  font-weight: 650;
  color: var(--hr-ink);
  border: 1px solid transparent;
}
.hr-drawer a.hr-drawer__link:hover { background: var(--hr-green-50); color: var(--hr-green-700); }
.hr-drawer__sep { height: 1px; background: var(--hr-line); margin: 10px 0; }

@media (max-width: 1024px) {
  .hr-nav { display: none; }
  .hr-burger { display: grid; }
  .hr-header__actions .hr-hide-sm { display: none; }
}

/* Mobile bottom tab bar */
.hr-tabbar { display: none; }
@media (max-width: 768px) {
  .hr-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 880;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #fff;
    border-top: 1px solid var(--hr-line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 14px rgba(15,23,42,.06);
  }
  .hr-tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 9px 2px 7px;
    font-size: .68rem; font-weight: 650; color: var(--hr-muted);
  }
  .hr-tabbar a.is-active { color: var(--hr-green-700); }
  .hr-tabbar svg { width: 21px; height: 21px; }
  body { padding-bottom: 66px; }
}

/* ---------- 6. Hero ------------------------------------------------------ */
.hr-hero { position: relative; overflow: hidden; background: var(--hr-green-900); }
.hr-hero__media { position: absolute; inset: 0; }
.hr-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hr-hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(3,40,28,.92) 0%, rgba(3,40,28,.72) 42%, rgba(3,40,28,.18) 100%),
    linear-gradient(180deg, rgba(3,40,28,.30), rgba(3,40,28,.45));
}
@media (max-width: 860px) {
  /* Text sits over the whole photo on narrow screens, so darken evenly. */
  .hr-hero__scrim { background: linear-gradient(180deg, rgba(3,40,28,.74), rgba(3,40,28,.86)); }
}
.hr-hero__inner {
  position: relative;
  padding-block: clamp(64px, 9vw, 128px);
  max-width: 660px;
}
.hr-hero h1 { color: #fff; margin-bottom: .75rem; text-wrap: balance; }
.hr-hero__sub { color: rgba(255,255,255,.88); font-size: clamp(1rem, .95rem + .35vw, 1.2rem); margin-bottom: 1.75rem; max-width: 46ch; }
.hr-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hr-hero__pill {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  padding: .4rem .9rem;
  border-radius: var(--hr-r-pill);
  font-size: .82rem; font-weight: 650;
  margin-bottom: 1.1rem;
  backdrop-filter: blur(6px);
}

/* Trust strip under hero */
.hr-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px;
  background: var(--hr-line);
  border: 1px solid var(--hr-line);
  border-radius: var(--hr-r);
  overflow: hidden;
  margin-top: -32px;
  position: relative;
  z-index: 3;
  box-shadow: var(--hr-sh);
}
.hr-trust__item { background: #fff; padding: 18px 16px; text-align: center; }
.hr-trust__n { display: block; font-size: 1.35rem; font-weight: 800; color: var(--hr-ink); line-height: 1.2; }
.hr-trust__l { font-size: .78rem; color: var(--hr-muted); font-weight: 600; }
@media (max-width: 640px) {
  .hr-trust { grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: -20px; }
}

/* ---------- 7. Cards ----------------------------------------------------- */
.hr-card {
  background: #fff;
  border: 1px solid var(--hr-line);
  border-radius: var(--hr-r-lg);
  padding: 24px;
  box-shadow: var(--hr-sh-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.hr-card--hover:hover { box-shadow: var(--hr-sh-lg); transform: translateY(-3px); border-color: var(--hr-green-200); }
.hr-card--flat { box-shadow: none; }
.hr-card--pad-0 { padding: 0; overflow: hidden; }

.hr-icon-box {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--hr-green-50);
  color: var(--hr-green-700);
  margin-bottom: 14px;
}
.hr-icon-box svg { width: 24px; height: 24px; }
.hr-icon-box--amber { background: var(--hr-amber-50); color: var(--hr-amber-600); }

/* Goal / category tiles */
.hr-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: #fff;
  border: 1px solid var(--hr-line);
  border-radius: var(--hr-r-lg);
  padding: 22px;
  transition: all .18s ease;
}
.hr-tile:hover { border-color: var(--hr-green-500); box-shadow: var(--hr-sh); transform: translateY(-2px); }
.hr-tile__title { font-weight: 750; color: var(--hr-ink); font-size: 1.02rem; }
.hr-tile__desc { font-size: .87rem; color: var(--hr-muted); }

/* ---------- 8. Plan cards ------------------------------------------------ */
.hr-plan {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--hr-line);
  border-radius: var(--hr-r-lg);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.hr-plan:hover { box-shadow: var(--hr-sh-lg); transform: translateY(-3px); }
.hr-plan.is-featured { border-color: var(--hr-green-500); box-shadow: 0 0 0 4px var(--hr-green-50), var(--hr-sh); }

.hr-plan__media { position: relative; aspect-ratio: 16/9; background: var(--hr-green-50); }
.hr-plan__media img { width: 100%; height: 100%; object-fit: cover; }
.hr-plan__flag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(15,23,42,.82);
  color: #fff;
  font-size: .7rem; font-weight: 700; letter-spacing: .03em;
  padding: .3rem .65rem; border-radius: var(--hr-r-pill);
  backdrop-filter: blur(4px);
}
.hr-plan__ribbon {
  position: absolute; top: 12px; right: 12px;
  background: var(--hr-green-600); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: var(--hr-r-pill);
}
.hr-plan__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.hr-plan__name { font-size: 1.18rem; margin-bottom: .3rem; }
.hr-plan__meta { font-size: .82rem; color: var(--hr-muted); font-weight: 600; margin-bottom: .9rem; }
.hr-plan__desc {
  font-size: .92rem; color: var(--hr-ink-2); margin-bottom: 1.1rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Price block — grid so the badge can never overlap the amount */
.hr-plan__price {
  display: flex; align-items: baseline; gap: .4rem;
  padding: 14px 0; margin-bottom: 1rem;
  border-top: 1px solid var(--hr-line-soft);
  border-bottom: 1px solid var(--hr-line-soft);
}
.hr-plan__amt { font-size: 1.9rem; font-weight: 800; color: var(--hr-ink); letter-spacing: -.03em; line-height: 1; }
.hr-plan__per { font-size: .85rem; color: var(--hr-muted); font-weight: 600; }

.hr-plan__feats { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: .55rem; }
.hr-plan__feats li { display: grid; grid-template-columns: 20px 1fr; gap: .55rem; align-items: start; font-size: .89rem; color: var(--hr-ink-2); }
.hr-plan__feats svg { width: 18px; height: 18px; color: var(--hr-green-600); margin-top: 2px; }
.hr-plan__foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

/* Macro chips */
.hr-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 1rem; }
.hr-macro { background: var(--hr-bg-alt); border-radius: var(--hr-r-sm); padding: 9px 6px; text-align: center; }
.hr-macro__v { display: block; font-weight: 800; color: var(--hr-ink); font-size: .95rem; }
.hr-macro__k { font-size: .68rem; color: var(--hr-muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- 9. Badges ---------------------------------------------------- */
.hr-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .28rem .7rem;
  border-radius: var(--hr-r-pill);
  font-size: .75rem; font-weight: 700;
  background: var(--hr-bg-alt); color: var(--hr-ink-2);
  border: 1px solid var(--hr-line);
}
.hr-badge--green { background: var(--hr-green-50); color: var(--hr-green-700); border-color: var(--hr-green-200); }
.hr-badge--amber { background: var(--hr-amber-50); color: var(--hr-amber-600); border-color: var(--hr-amber-100); }
.hr-badge--veg   { background: var(--hr-green-50); color: var(--hr-green-700); border-color: var(--hr-green-200); }

/* ---------- 10. Steps ---------------------------------------------------- */
.hr-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; counter-reset: step; }
@media (max-width: 900px) { .hr-steps { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .hr-steps { grid-template-columns: minmax(0,1fr); } }
.hr-step { position: relative; padding-top: 8px; }
.hr-step__n {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--hr-green-600); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.05rem;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(5,150,105,.28);
}
.hr-step h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.hr-step p { font-size: .9rem; color: var(--hr-muted); margin: 0; }

/* ---------- 11. Forms ---------------------------------------------------- */
.hr-field { margin-bottom: 1.1rem; }
.hr-label {
  display: block;
  font-size: .87rem; font-weight: 700; color: var(--hr-ink);
  margin-bottom: .4rem;
}
.hr-input, .hr-select, .hr-textarea {
  width: 100%;
  padding: .75rem .95rem;
  font-family: var(--hr-font);
  font-size: .97rem;
  color: var(--hr-ink);
  background: #fff;
  border: 1.5px solid var(--hr-line);
  border-radius: var(--hr-r-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
.hr-textarea { min-height: 130px; resize: vertical; }
.hr-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: 18px;
  padding-right: 2.4rem;
}
.hr-input:focus, .hr-select:focus, .hr-textarea:focus {
  outline: none;
  border-color: var(--hr-green-500);
  box-shadow: 0 0 0 4px var(--hr-green-50);
}
.hr-input::placeholder, .hr-textarea::placeholder { color: #94a3b8; }
.hr-input.is-error, .hr-select.is-error, .hr-textarea.is-error { border-color: var(--hr-danger); }
.hr-error { display: block; color: var(--hr-danger); font-size: .82rem; font-weight: 600; margin-top: .35rem; }
.hr-hint  { display: block; color: var(--hr-muted); font-size: .82rem; margin-top: .35rem; }

.hr-check { display: grid; grid-template-columns: 20px 1fr; gap: .6rem; align-items: start; font-size: .9rem; }
.hr-check input[type="checkbox"], .hr-check input[type="radio"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--hr-green-600); }

/* Auth card */
.hr-auth { min-height: calc(100vh - var(--hr-header-h)); display: grid; place-items: center; padding: clamp(28px, 5vw, 64px) 0; background: var(--hr-bg-alt); }
.hr-auth__card { width: min(460px, 100%); background: #fff; border: 1px solid var(--hr-line); border-radius: var(--hr-r-xl); padding: clamp(26px, 4vw, 40px); box-shadow: var(--hr-sh-lg); }
.hr-auth__head { text-align: center; margin-bottom: 1.75rem; }
.hr-auth__head h1 { font-size: 1.7rem; margin-bottom: .35rem; }
.hr-auth__head p { color: var(--hr-muted); font-size: .93rem; margin: 0; }
.hr-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .8rem; margin: 1.35rem 0; color: var(--hr-muted); font-size: .8rem; font-weight: 600; }
.hr-divider::before, .hr-divider::after { content: ''; height: 1px; background: var(--hr-line); }

/* ---------- 12. Toggle (weekly/monthly) ---------------------------------- */
.hr-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  background: var(--hr-bg-alt);
  border: 1px solid var(--hr-line);
  border-radius: var(--hr-r-pill);
  padding: 4px;
}
.hr-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: .55rem 1.35rem;
  border-radius: var(--hr-r-pill);
  font-family: var(--hr-font); font-size: .9rem; font-weight: 700;
  color: var(--hr-muted);
  transition: all .18s ease;
}
.hr-switch button.is-active { background: #fff; color: var(--hr-green-700); box-shadow: var(--hr-sh-sm); }

/* Day chips */
.hr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hr-chip {
  border: 1.5px solid var(--hr-line); background: #fff;
  padding: .45rem 1rem; border-radius: var(--hr-r-pill);
  font-family: var(--hr-font); font-size: .88rem; font-weight: 650; color: var(--hr-ink-2);
  cursor: pointer; transition: all .15s ease;
}
.hr-chip:hover { border-color: var(--hr-green-500); color: var(--hr-green-700); }
.hr-chip.is-active { background: var(--hr-green-600); border-color: var(--hr-green-600); color: #fff; }

/* ---------- 12b. Tabs (account area) ------------------------------------- */
.hr-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--hr-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.hr-tabs::-webkit-scrollbar { display: none; }
.hr-tab {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.1rem;
  border: 0; background: transparent;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  font-family: var(--hr-font); font-size: .93rem; font-weight: 650;
  color: var(--hr-muted);
  white-space: nowrap; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.hr-tab svg { width: 18px; height: 18px; }
.hr-tab:hover { color: var(--hr-ink); }
.hr-tab.is-active { color: var(--hr-green-700); border-bottom-color: var(--hr-green-600); }

/* Stat tile */
.hr-stat { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; }
.hr-stat__icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--hr-green-50); color: var(--hr-green-700);
}
.hr-stat__icon svg { width: 17px; height: 17px; }
.hr-stat__k { font-size: .8rem; font-weight: 650; color: var(--hr-muted); }
.hr-stat__v { font-size: 1.55rem; font-weight: 800; color: var(--hr-ink); line-height: 1.15; }

/* Account avatar. Deliberately uses the same light-tint treatment as
   .hr-stat__icon — a solid saturated disc read as the heaviest element on the
   page and fought the numbers for attention. */
.hr-avatar {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--hr-green-50);
  color: var(--hr-green-700);
  border: 1px solid var(--hr-green-200);
  font-size: .95rem; font-weight: 800; line-height: 1;
}

/* Definition rows (subscription meta) */
.hr-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.hr-dl__k { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--hr-muted); }
.hr-dl__v { font-size: .93rem; font-weight: 650; color: var(--hr-ink); }

/* "Your next delivery" — the one fact a subscriber opens this page for. */
.hr-next {
  background: linear-gradient(135deg, var(--hr-green-700), var(--hr-green-900));
  color: #fff;
  border-radius: var(--hr-r-lg);
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.hr-next h2, .hr-next h3 { color: #fff; }
.hr-next__k {
  font-size: .74rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255,255,255,.75); margin-bottom: .35rem;
}
.hr-next__when { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.hr-next__date { color: rgba(255,255,255,.82); font-size: .95rem; font-weight: 600; margin-top: .2rem; }
.hr-next__meta { color: rgba(255,255,255,.75); font-size: .88rem; margin-top: .75rem; }
.hr-next__meta strong { color: #fff; font-weight: 700; }
@media (max-width: 640px) {
  .hr-next { grid-template-columns: minmax(0,1fr); }
}

/* Plain-language note under a status badge */
.hr-note { font-size: .86rem; color: var(--hr-muted); margin: .4rem 0 0; }

/* Explainer: skip vs pause vs cancel */
.hr-explain { display: grid; grid-template-columns: 26px 1fr; gap: .75rem; align-items: start; }
.hr-explain + .hr-explain { margin-top: 1rem; }
.hr-explain__i {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--hr-green-50); color: var(--hr-green-700);
}
.hr-explain__i svg { width: 15px; height: 15px; }
.hr-explain__t { font-weight: 700; color: var(--hr-ink); font-size: .93rem; }
.hr-explain__d { font-size: .87rem; color: var(--hr-muted); margin: .15rem 0 0; }

/* Week grouping header inside a delivery list */
.hr-weekhead {
  font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em;
  color: var(--hr-muted);
  margin: 1.25rem 0 .6rem;
}
.hr-weekhead:first-child { margin-top: 0; }

/* Delivery row */
.hr-delivery {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 11px 14px;
  background: var(--hr-bg-alt);
  border: 1px solid var(--hr-line);
  border-radius: var(--hr-r-sm);
}
.hr-delivery + .hr-delivery { margin-top: 8px; }
.hr-delivery.is-skipped { opacity: .62; }
.hr-delivery.is-skipped .hr-delivery__d { text-decoration: line-through; }
.hr-delivery__d { font-size: .9rem; font-weight: 650; color: var(--hr-ink); }

/* ---------- 13. FAQ / accordion ------------------------------------------ */
.hr-faq { border: 1px solid var(--hr-line); border-radius: var(--hr-r); background: #fff; overflow: hidden; }
.hr-faq + .hr-faq { margin-top: 10px; }
.hr-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 17px 52px 17px 20px;
  font-weight: 700; color: var(--hr-ink); font-size: 1rem;
  position: relative;
}
.hr-faq summary::-webkit-details-marker { display: none; }
.hr-faq summary::after {
  content: '';
  position: absolute; right: 20px; top: 50%;
  width: 10px; height: 10px;
  border-right: 2.5px solid var(--hr-muted);
  border-bottom: 2.5px solid var(--hr-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.hr-faq[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.hr-faq[open] summary { color: var(--hr-green-700); }
.hr-faq__body { padding: 0 20px 18px; color: var(--hr-ink-2); font-size: .94rem; }

/* ---------- 14. Blog ----------------------------------------------------- */
.hr-post { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hr-line); border-radius: var(--hr-r-lg); overflow: hidden; transition: all .2s ease; }
.hr-post:hover { box-shadow: var(--hr-sh-lg); transform: translateY(-3px); }
/* The image is positioned out of flow so it cannot contribute to the box's
   content height -- otherwise aspect-ratio loses to the image's intrinsic
   ratio and a square upload makes its card taller than the rest of the row. */
.hr-post__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--hr-green-50); }
.hr-post__media > * { position: absolute; inset: 0; }
.hr-post__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hr-post__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.hr-post__title { font-size: 1.1rem; margin-bottom: .45rem; }
.hr-post__title a { color: var(--hr-ink); }
.hr-post__title a:hover { color: var(--hr-green-700); }
.hr-post__excerpt { font-size: .9rem; color: var(--hr-muted); margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hr-post__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: var(--hr-muted); font-weight: 600; }

.hr-prose { max-width: 72ch; }
.hr-prose h2 { margin-top: 2rem; }
.hr-prose h3 { margin-top: 1.5rem; }
.hr-prose img { border-radius: var(--hr-r); margin: 1.5rem 0; }
.hr-prose ul, .hr-prose ol { margin-bottom: 1.25rem; }
.hr-prose li { margin-bottom: .4rem; }
.hr-prose blockquote {
  margin: 1.5rem 0; padding: 1rem 1.25rem;
  border-left: 4px solid var(--hr-green-500);
  background: var(--hr-green-50);
  border-radius: 0 var(--hr-r-sm) var(--hr-r-sm) 0;
  color: var(--hr-ink);
}

/* ---------- 15. Alerts / flash ------------------------------------------- */
.hr-flash-wrap { position: sticky; top: var(--hr-header-h); z-index: 850; }
.hr-alert {
  display: grid; grid-template-columns: 22px 1fr auto; gap: .7rem; align-items: start;
  padding: .85rem 1rem;
  border-radius: var(--hr-r-sm);
  border: 1px solid;
  font-size: .92rem; font-weight: 600;
  margin-bottom: 10px;
}
.hr-alert svg { width: 20px; height: 20px; margin-top: 1px; }
.hr-alert__x { border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; line-height: 1; color: inherit; opacity: .6; padding: 0; }
.hr-alert__x:hover { opacity: 1; }
.hr-alert--success { background: var(--hr-green-50); border-color: var(--hr-green-200); color: var(--hr-green-900); }
.hr-alert--error   { background: var(--hr-danger-bg); border-color: #fecaca; color: #991b1b; }
.hr-alert--warning { background: var(--hr-amber-50); border-color: var(--hr-amber-100); color: #92400e; }
.hr-alert--info    { background: var(--hr-info-bg); border-color: #bae6fd; color: #075985; }

/* ---------- 16. Tables --------------------------------------------------- */
.hr-table-wrap { overflow-x: auto; border: 1px solid var(--hr-line); border-radius: var(--hr-r); background: #fff; }
.hr-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.hr-table th {
  text-align: left; padding: 12px 16px;
  background: var(--hr-bg-alt);
  font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em;
  color: var(--hr-muted);
  border-bottom: 1px solid var(--hr-line);
}
.hr-table td { padding: 14px 16px; border-bottom: 1px solid var(--hr-line-soft); color: var(--hr-ink-2); }
.hr-table tr:last-child td { border-bottom: 0; }

/* ---------- 17. Footer --------------------------------------------------- */
.hr-footer { background: #0b1220; color: #94a3b8; padding-top: clamp(44px, 5vw, 68px); margin-top: clamp(48px, 6vw, 80px); }
.hr-footer a { color: #cbd5e1; }
.hr-footer a:hover { color: #fff; }
.hr-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; margin-bottom: 1rem; }
.hr-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 36px; padding-bottom: 40px; }
@media (max-width: 900px) { .hr-footer__grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; } }
@media (max-width: 520px) { .hr-footer__grid { grid-template-columns: minmax(0,1fr); } }
.hr-footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; font-size: .92rem; }
.hr-footer__brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800; font-size: 1.15rem; margin-bottom: .8rem; }
.hr-footer__brand:hover { color: #fff; }
.hr-footer__news { max-width: min(22rem, 100%); }
.hr-footer__news label { display: block; font-size: .82rem; color: #94a3b8; margin-bottom: .5rem; }
/* Wraps rather than breaking out of the column: the footer grid hands this
   column anywhere from ~210px (4-col at 950px) to ~350px (2-col at 768px), and
   the input + button do not fit in most of that range. */
.hr-footer__news-row { display: flex; gap: 8px; flex-wrap: wrap; }
.hr-footer__news input {
  flex: 1 1 10rem; min-width: 0;
  background: rgba(148,163,184,.10);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: var(--hr-r-pill);
  padding: .5rem .85rem;
  color: #e2e8f0; font-size: .88rem; font-family: inherit;
}
.hr-footer__news input::placeholder { color: #64748b; }
.hr-footer__news input:focus { outline: none; border-color: var(--hr-green-600); }
.hr-footer__news .hr-btn { flex: 0 1 auto; }
/* On phones give the wrapped button the full width for a proper tap target. */
@media (max-width: 520px) {
  .hr-footer__news-row { flex-direction: column; align-items: stretch; }
  .hr-footer__news-row .hr-btn { width: 100%; justify-content: center; }
}

.hr-footer__bar {
  border-top: 1px solid rgba(148,163,184,.18);
  padding: 20px 0 28px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  font-size: .85rem;
}
.hr-social { display: flex; gap: 10px; }
.hr-social a {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(148,163,184,.12);
  display: grid; place-items: center;
  transition: background .15s ease;
}
.hr-social a:hover { background: var(--hr-green-600); }
.hr-social svg { width: 18px; height: 18px; }
@media (max-width: 768px) { .hr-footer { margin-bottom: 66px; } }

/* ---------- 18. CTA band ------------------------------------------------- */
.hr-cta {
  background: linear-gradient(135deg, var(--hr-green-700), var(--hr-green-900));
  border-radius: var(--hr-r-xl);
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
  color: #fff;
}
.hr-cta h2 { color: #fff; margin-bottom: .6rem; }
.hr-cta p { color: rgba(255,255,255,.85); max-width: 52ch; margin-inline: auto; margin-bottom: 1.75rem; }

/* ---------- 19. Empty state ---------------------------------------------- */
.hr-empty { text-align: center; padding: clamp(40px, 6vw, 72px) 20px; border: 1.5px dashed var(--hr-line); border-radius: var(--hr-r-lg); background: var(--hr-bg-alt); }
.hr-empty h3 { margin-bottom: .4rem; }
.hr-empty p { color: var(--hr-muted); margin-bottom: 1.25rem; }

/* ---------- 20. Utilities ------------------------------------------------ */
.hr-center { text-align: center; }
.hr-muted { color: var(--hr-muted); }
.hr-lead { font-size: 1.08rem; color: var(--hr-muted); }
.hr-mb-0 { margin-bottom: 0; }
.hr-mt-1 { margin-top: .5rem; }  .hr-mt-2 { margin-top: 1rem; }
.hr-mt-3 { margin-top: 1.5rem; } .hr-mt-4 { margin-top: 2rem; }
.hr-mb-2 { margin-bottom: 1rem; } .hr-mb-3 { margin-bottom: 1.5rem; } .hr-mb-4 { margin-bottom: 2rem; }
.hr-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hr-skip {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--hr-green-700); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0; font-weight: 700;
}
.hr-skip:focus { left: 0; color: #fff; }

/* ---------- 21. Compatibility shim ---------------------------------------
   Legacy class names still used by templates not yet migrated. These were
   defined in main.min.css (now unloaded). Kept so untouched pages render
   correctly instead of falling back to unstyled/invisible.
   ------------------------------------------------------------------------ */
.bg-darkest    { background-color: #ffffff !important; }
.bg-darker     { background-color: #ffffff !important; }
.bg-dark       { background-color: #ffffff !important; }
.bg-dark-lighter { background-color: var(--hr-bg-alt) !important; }

/* Legacy header/footer text that assumed a dark background */
.bg-darker .text-white,
.bg-darkest .text-white,
.bg-dark .text-white { color: var(--hr-ink) !important; }

.card { background: #fff; border: 1px solid var(--hr-line); border-radius: var(--hr-r-lg); box-shadow: var(--hr-sh-sm); }
.card-header { padding: 18px 22px; border-bottom: 1px solid var(--hr-line); font-weight: 750; color: var(--hr-ink); }
.card-body { padding: 22px; }
.card-footer { padding: 16px 22px; border-top: 1px solid var(--hr-line); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.35rem; border-radius: var(--hr-r-pill); border: 1.5px solid transparent; font-family: var(--hr-font); font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--hr-green-600); color: #fff; }
.btn-primary:hover { background: var(--hr-green-700); color: #fff; }
.btn-secondary { background: var(--hr-bg-alt); color: var(--hr-ink); border-color: var(--hr-line); }
.btn-success { background: var(--hr-green-600); color: #fff; }
.btn-warning { background: var(--hr-amber-500); color: #3b2200; }
.btn-outline-danger { background: transparent; color: var(--hr-danger); border-color: var(--hr-danger); }
.btn-outline-danger:hover { background: var(--hr-danger); color: #fff; }

/* Neutralise the legacy palette-switcher artefacts if any markup survives */
.theme-toggle-btn, #theme-switcher, .palette-switcher { display: none !important; }

/* Material Symbols sizing — the font is loaded in base.html for the templates
   that still render icons as text spans. */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Brand re-map for templates still hardcoding the old amber/brown palette
   (checkout, sample_menu, order_confirmation, pcos). Remapping here keeps one
   accent colour across the site without editing every arbitrary Tailwind value. */
.bg-\[\#855300\]              { background-color: var(--hr-green-600) !important; }
.hover\:bg-\[\#653e00\]:hover { background-color: var(--hr-green-700) !important; }
.text-\[\#855300\]            { color: var(--hr-green-700) !important; }
.hover\:text-\[\#855300\]:hover { color: var(--hr-green-700) !important; }
.border-\[\#855300\]          { border-color: var(--hr-green-600) !important; }
.focus\:border-\[\#855300\]:focus { border-color: var(--hr-green-500) !important; }
.bg-\[\#27313f\]              { background-color: var(--hr-green-900) !important; }
.text-\[\#27313f\]            { color: var(--hr-ink) !important; }
.border-\[\#d8c3ad\]          { border-color: var(--hr-line) !important; }
.bg-\[\#d8c3ad\]              { background-color: var(--hr-line) !important; }
.text-\[\#ffddb8\]            { color: var(--hr-green-100) !important; }
.ring-\[\#855300\]\/20        { --tw-ring-color: rgba(5,150,105,.20) !important; }
.bg-\[\#855300\]\/20          { background-color: rgba(5,150,105,.20) !important; }

/* ---------- 22. Motion / print ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .hr-btn:hover, .hr-card--hover:hover, .hr-plan:hover, .hr-post:hover { transform: none; }
}

@media print {
  .hr-header, .hr-tabbar, .hr-footer, .hr-drawer, .hr-btn { display: none !important; }
  body { padding-bottom: 0; }
}
