:root {
  --brick: #a8412d;
  --green: #315c48;
  --gold: #d8a437;
  --cream: #fff7e8;
  --ink: #202024;
  --muted: #69645c;
  --line: #e8deca;
  --surface: #ffffff;
  --focus: #0b65c2;
  --shadow: 0 10px 30px rgba(32, 32, 36, 0.08);
  --shadow-strong: 0 22px 70px rgba(32, 32, 36, 0.18);
}

* { box-sizing: border-box; }
html { color: var(--ink); background: linear-gradient(180deg, #fff9ed 0%, var(--cream) 42%, #f7ead2 100%); font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
body { margin: 0; overflow-x: hidden; overflow-x: clip; }
a { color: var(--green); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--brick); }
button, input, select, textarea { font: inherit; }
button, .button, input, select, textarea { min-height: 44px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 0.65rem 0.75rem; background: #fff; color: var(--ink); }
textarea { min-height: 140px; resize: vertical; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
p, h1, h2, h3, .badge, .button, button, label { overflow-wrap: anywhere; }

.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 0.75rem; z-index: 10; }
.skip-link:focus { left: 0; }
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255,247,232,0.94); border-bottom: 1px solid rgba(232, 222, 202, 0.8); backdrop-filter: blur(12px); }
.nav-shell { display: flex; align-items: center; gap: 1rem; max-width: 1180px; margin: 0 auto; padding: 0.75rem 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 850; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; color: var(--brick); }
.nav-toggle { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 0 0.85rem; box-shadow: 0 4px 16px rgba(32, 32, 36, 0.06); }
.nav-links { display: none; flex-direction: column; gap: 0.35rem; width: 100%; position: absolute; top: 64px; left: 0; right: 0; background: rgba(255,247,232,0.98); border-bottom: 1px solid var(--line); padding: 0.75rem 1rem 1rem; box-shadow: 0 18px 36px rgba(32, 32, 36, 0.1); max-height: calc(100vh - 64px); overflow-y: auto; }
.nav-links.is-open { display: flex; }
.nav-links a { min-height: 44px; display: flex; align-items: center; font-weight: 750; text-decoration: none; padding: 0 0.65rem; border-radius: 8px; color: var(--ink); }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: #fff; color: var(--brick); }
.main-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.25rem 0 4rem; }
.main-shell > * + * { margin-top: clamp(1.6rem, 3.5vw, 3rem); }
.site-footer { border-top: 1px solid var(--line); padding: 2rem 1rem; text-align: center; color: var(--muted); }
.site-footer a { margin: 0 0.35rem; }

.hero, .detail-hero, .page-heading { display: grid; gap: 1rem; padding: 1.5rem 0; }
.page-heading { align-items: end; }
.visual-hero { position: relative; min-height: auto; align-content: end; overflow: hidden; border-radius: 8px; padding: clamp(1rem, 4vw, 2.5rem); box-shadow: var(--shadow-strong); isolation: isolate; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 18, 16, 0.82) 0%, rgba(20, 18, 16, 0.58) 44%, rgba(20, 18, 16, 0.1) 100%), linear-gradient(0deg, rgba(20,18,16,0.42), rgba(20,18,16,0.08)); }
.hero-copy { max-width: 760px; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }
.hero h1, .detail-hero h1, .page-heading h1 { font-size: clamp(2rem, 7vw, 4.8rem); line-height: 0.98; margin: 0; letter-spacing: 0; max-width: 850px; overflow-wrap: anywhere; }
.lead { font-size: clamp(1.02rem, 2.2vw, 1.22rem); color: var(--muted); max-width: 720px; }
.hero-copy .lead { color: rgba(255, 255, 255, 0.92); }
.eyebrow { margin: 0 0 0.35rem; color: var(--brick); font-weight: 850; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.08em; }
.hero-copy .eyebrow { color: #ffd26f; }
.date-strip, .filter-bar, .form-panel, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.date-strip, .filter-bar, .form-panel { display: grid; gap: 0.85rem; padding: 1rem; }
.date-strip label, .filter-bar label, .form-panel label { display: grid; gap: 0.35rem; font-weight: 750; color: #38332e; }
.visual-hero .date-strip { margin-top: clamp(1.25rem, 3vw, 2rem); background: rgba(255, 250, 241, 0.94); border-color: rgba(255,255,255,0.62); box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18); backdrop-filter: blur(12px); }
.panel { padding: clamp(1rem, 2vw, 1.25rem); }
.section-grid, .card-grid, .split-section, .metric-grid, .calendar-grid, .spin-layout { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 0.9rem; margin: clamp(1.4rem, 3vw, 2.25rem) 0; }
.stat-pill { background: rgba(255,255,255,0.88); border: 1px solid var(--line); border-radius: 8px; padding: 0.85rem; box-shadow: 0 8px 22px rgba(32, 32, 36, 0.06); }
.stat-pill strong { display: block; color: var(--brick); font-size: 1.05rem; line-height: 1.15; }
.stat-pill span { color: var(--muted); font-size: 0.92rem; }
.stat-pill.quiet strong { color: var(--green); }
.meal-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2, .panel h2, .card h2, .card h3, .row-card h3, .calendar-day h2 { margin-top: 0; }
.card, .row-card, .calendar-day, .metric { background: rgba(255,255,255,0.92); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; min-width: 0; }
.panel > .card + .card, .panel > .row-card + .row-card { margin-top: 0.85rem; }
.card { display: grid; gap: 0.55rem; min-width: 0; transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.card:hover { transform: translateY(-2px); border-color: #dbc9a8; box-shadow: 0 14px 34px rgba(32, 32, 36, 0.1); }
.card p, .row-card p { margin: 0; }
.discovery-card { align-content: start; }
.card-callout { font-size: 1.02rem; font-weight: 800; color: var(--ink); }
.card-topline, .quick-actions, .card-actions, .admin-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0.2rem 0.55rem; border-radius: 999px; background: #eaf3ec; color: var(--green); font-size: 0.82rem; font-weight: 750; }
.badge.muted { background: #f4eee2; color: var(--muted); }
.badge.warning { background: #fff0bd; color: #684b00; }
.meta, .empty { color: var(--muted); }
.empty { margin: 0; }
.small { font-size: 0.9rem; }
.price { font-weight: 850; color: var(--brick); }
.why { border-left: 4px solid var(--gold); padding-left: 0.7rem; color: #3d3935; max-width: 100%; }
.hours-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0.65rem; margin: 0.75rem 0; }
.hours-list p { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.75rem; align-items: baseline; margin: 0; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.hours-list em { grid-column: 1 / -1; color: var(--muted); font-size: 0.86rem; font-style: normal; }
.button, button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--green); border-radius: 8px; padding: 0.65rem 0.9rem; background: #fff; color: var(--green); text-decoration: none; font-weight: 800; cursor: pointer; white-space: normal; text-align: center; line-height: 1.15; }
.button.primary, button.primary { background: var(--green); color: #fff; border-color: var(--green); }
.button.primary:hover, button.primary:hover { background: #244736; }
.button.ghost { background: transparent; }
.button.is-disabled, .button[aria-disabled="true"] { opacity: 0.55; pointer-events: none; filter: grayscale(0.25); }
.button.small { min-height: 36px; padding: 0.4rem 0.65rem; font-size: 0.92rem; }
.check { display: flex; align-items: center; gap: 0.55rem; }
.check input { width: auto; min-height: auto; }
.honeypot { position: absolute; left: -9999px; }
.flash, .error-summary { border-radius: 8px; padding: 0.85rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line); background: #fff; }
.flash-success { border-color: #b9dfc7; background: #edf8f1; }
.flash-warning, .error-summary, .flash-error { border-color: #e8c37d; background: #fff7df; }
.result-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 1.25rem 0; color: var(--muted); }
.result-summary p { margin: 0; }
.result-summary strong { color: var(--brick); }
.table-wrap { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; min-width: min(640px, 100%); }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 0.7rem; vertical-align: top; }
.inline { display: inline; }
.inline button { min-height: 34px; padding: 0.3rem 0.55rem; }
.metric { display: grid; gap: 0.2rem; }
.metric strong { font-size: 2rem; color: var(--brick); }
.calendar-day { display: grid; gap: 0.35rem; }
.calendar-day h3 { margin: 0.7rem 0 0; color: var(--green); }
.spin-layout { align-items: start; }
.wheel-stage { display: grid; place-items: center; gap: 1rem; min-height: auto; overflow: hidden; }
.wheel, .mini-wheel { width: min(78vw, 320px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative; color: #fff; font-weight: 900; background: conic-gradient(var(--brick) 0 60deg, var(--green) 60deg 120deg, var(--gold) 120deg 180deg, #6f3f2f 180deg 240deg, #467b62 240deg 300deg, #d56d3b 300deg 360deg); box-shadow: var(--shadow-strong); transition: transform 1450ms cubic-bezier(.08,.72,.12,1); border: 8px solid rgba(255,255,255,0.88); will-change: transform; }
.mini-wheel { width: min(62vw, 260px); }
.wheel-svg { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.18)); }
.wheel-label { fill: #fff; font-size: 7.5px; font-weight: 850; paint-order: stroke; stroke: rgba(32,32,36,0.42); stroke-width: 2.4px; stroke-linejoin: round; }
.wheel-ring { fill: none; stroke: rgba(255,255,255,0.92); stroke-width: 2; }
.wheel-center { display: grid; place-items: center; width: 42%; aspect-ratio: 1; border-radius: 999px; background: rgba(32,32,36,0.78); color: #fff; border: 3px solid rgba(255,255,255,0.88); box-shadow: 0 8px 24px rgba(0,0,0,0.22); font-size: 0.95rem; text-align: center; padding: 0.35rem; }
.wheel-pointer { width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 36px solid var(--ink); margin-bottom: -31px; z-index: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.24)); }
.spin-result.large { font-size: 1.2rem; font-weight: 850; text-align: center; min-height: 2rem; }
.segmented { border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 0.4rem; padding: 0.75rem; }
.segmented label { display: flex; gap: 0.5rem; align-items: center; }
.segmented input { width: auto; min-height: auto; }
.mode-fields { display: grid; gap: 0.85rem; }
.mode-fields[hidden] { display: none; }
.readable { max-width: 760px; }

@media (min-width: 720px) {
  .page-heading-action { grid-template-columns: minmax(0, 1fr) auto; }
  .hero:not(.visual-hero) { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr); align-items: end; padding: 3rem 0 2rem; }
  .visual-hero .date-strip { grid-template-columns: minmax(180px, 1fr) auto; align-items: end; max-width: 760px; }
  .visual-hero .date-strip button { grid-column: 1 / -1; justify-self: start; }
  .card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
  .metric-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
  .filter-bar { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); align-items: end; }
  .calendar-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
}

@media (min-width: 980px) {
  .visual-hero .date-strip { grid-template-columns: minmax(190px, 1fr) auto auto; max-width: 920px; }
  .visual-hero .date-strip button { grid-column: auto; }
  .split-section, .spin-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr); }
}

@media (max-width: 520px) {
  .main-shell { width: min(100% - 0.75rem, 1180px); padding-top: 0.75rem; }
  .main-shell > * + * { margin-top: 1.35rem; }
  .visual-hero { min-height: min(460px, calc(100vh - 78px)); min-height: min(460px, calc(100svh - 78px)); padding: 0.85rem; align-content: end; }
  .hero h1, .detail-hero h1, .page-heading h1 { font-size: clamp(1.9rem, 11vw, 2.8rem); }
  .lead { font-size: 1rem; }
  .hero-shade { background: linear-gradient(180deg, rgba(20,18,16,0.78) 0%, rgba(20,18,16,0.62) 48%, rgba(20,18,16,0.82) 100%); }
  .quick-actions { display: grid; grid-template-columns: 1fr; }
  .date-strip, .filter-bar, .form-panel, .panel { padding: 0.9rem; }
  .date-strip, .filter-bar, .form-panel { gap: 0.7rem; }
  .section-grid, .card-grid, .split-section, .metric-grid, .calendar-grid, .spin-layout { gap: 1rem; }
  .date-strip .button, .date-strip button, .filter-bar button, .form-panel > button { width: 100%; }
  .nav-toggle, .page-heading-action .button, .card-actions .button, .admin-nav .button, .inline button { width: auto; }
  .card-actions { align-items: stretch; }
  .card-actions .button { flex: 1 1 130px; }
  .nav-links { top: 62px; }
  .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-pill.quiet { grid-column: 1 / -1; }
  .stat-pill { padding: 0.7rem 0.8rem; }
  .wheel { width: min(82vw, 300px); }
  .mini-wheel { width: min(70vw, 220px); }
}

@media (max-width: 360px) {
  .brand { font-size: 1.08rem; }
  .brand-mark { width: 32px; height: 32px; }
  .nav-shell { gap: 0.5rem; padding: 0.62rem 0.75rem; }
  .nav-toggle { padding: 0 0.7rem; }
  .visual-hero { min-height: auto; padding-top: clamp(3.5rem, 18svh, 5rem); }
  .hero h1, .detail-hero h1, .page-heading h1 { font-size: clamp(1.8rem, 10.5vw, 2.35rem); }
  .card, .row-card, .calendar-day, .metric { padding: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .filter-bar, .quick-actions, .button { display: none !important; }
  .main-shell { width: 100%; }
  .calendar-grid { display: block; }
}
