/* =========================================================================
   [Business Name] design system — shared by the public site, admin and cleaner portal.
   Brand values (primary colour, ink, background) are overridden at runtime from
   Admin → Settings via CSS variables in the page <head>. Everything else derives from these tokens.
   ========================================================================= */
@font-face { font-family: 'Figtree'; src: url('/static/fonts/figtree.woff2') format('woff2'); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
  /* Colour */
  --paper: #FFFFFF;          /* clean white page background */
  --surface: #FFFFFF;
  --ink: #1F2937;            /* slate text (14.7:1 on white) */
  --ink-2: #4B5563;          /* secondary text (7.6:1 on white) */
  --line: #E2E8F0;           /* cool grey dividers (decorative) */
  --field-border: #868D9A;   /* form control borders (≥3:1 on white) */
  --brand-50: #EEF2FB; --brand-100: #D9E1F6; --brand-300: #9DB0E3; --brand-700: #2E4BA6; /* bluebonnet blue: links, icons, selected options (7.9:1 on white) */
  --band: #24356E;           /* deep bluebonnet: footer and bands */
  --action: #C53A27;         /* chili red booking buttons (5.2:1 with white text) — reserved for actions */
  --action-hover: #A22E1F;
  --on-action: #FFFFFF;
  --focus: #1F2937;
  --ok: #1E6A39;  --ok-bg: #E5F2E8;
  --warn: #855000; --warn-bg: #FCF0D8;
  --bad: #A0271B; --bad-bg: #FBE7E3;
  --info: #1D4C88; --info-bg: #E6EEF8;
  --muted-bg: #F1F5F9;

  /* Type */
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1.0625rem; --fs-lg: 1.25rem;
  --fs-h3: 1.1875rem; --fs-h2: clamp(1.45rem, 1.15rem + 1.2vw, 1.875rem); --fs-h1: clamp(1.85rem, 1.35rem + 2.2vw, 2.625rem);
  --lh: 1.6;

  /* Space (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* Shape */
  --r-sm: 6px; --r-md: 10px;
  --shadow: 0 1px 2px rgba(22,35,59,.06), 0 2px 8px rgba(22,35,59,.05);
  --tap: 44px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--fs-md)/var(--lh) var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0 0 var(--s3); line-height: 1.2; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: var(--fs-h1); } h2 { font-size: var(--fs-h2); } h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--s4); }
a { color: var(--brand-700); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
small, .text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.muted { color: var(--ink-2); }
.eyebrow { font-size: var(--fs-xs); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-700); margin-bottom: var(--s2); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s3); top: -100px; z-index: 100; display: inline-flex; align-items: center; min-height: var(--tap); background: var(--surface); color: var(--ink); padding: var(--s2) var(--s4); border-radius: var(--r-sm); }
.skip-link:focus { top: var(--s3); }

/* Focus: always visible for keyboard users */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.on-dark { --focus: #F2C14E; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--tap); padding: 10px 20px;
  font: 600 var(--fs-md)/1.2 var(--font); border-radius: var(--r-sm); border: 1.5px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); color: var(--on-action); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--field-border); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-quiet { background: transparent; color: var(--brand-700); padding-inline: var(--s2); text-decoration: underline; text-underline-offset: .18em; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #7f1f15; color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: var(--fs-sm); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn .spinner { width: 16px; height: 16px; }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--s4); }
.field > label, .label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: 6px; }
.hint { display: block; font-size: var(--fs-sm); color: var(--ink-2); margin-top: 4px; font-weight: 400; }
.optional { font-weight: 400; color: var(--ink-2); }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=password], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font: 400 16px/1.4 var(--font); /* 16px stops iOS zoom */
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--field-border); border-radius: var(--r-sm); }
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
[aria-invalid="true"] { border-color: var(--bad) !important; border-width: 2px !important; }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: var(--bad); font-size: var(--fs-sm); font-weight: 600; margin-top: 6px; }
.field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--bad); color: #fff; font-size: 12px; margin-top: 1px; }
.field-error[hidden] { display: none; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); min-width: 0; }
legend { font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--s2); padding: 0; }
.check { display: flex; gap: var(--s3); align-items: flex-start; min-height: var(--tap); padding: 10px 0; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand-700); }
.grid-2 { display: grid; gap: 0 var(--s4); grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Option cards (radio/checkbox with visible native control) */
.options { display: grid; gap: var(--s3); }
.option { position: relative; display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; transition: border-color .15s, background-color .15s; }
.option:hover { border-color: var(--field-border); }
.option input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand-700); }
.option:has(input:checked) { border-color: var(--brand-700); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-700); }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option input:focus-visible { outline: none; }
.option:has(input:disabled) { cursor: not-allowed; background: var(--muted-bg); color: var(--ink-2); }
.option-title { display: block; font-weight: 650; }
.option-meta { display: block; font-size: var(--fs-sm); color: var(--ink-2); }
.option-price { margin-left: auto; font-weight: 600; white-space: nowrap; }

/* ---------- Status chips (icon + text, never colour alone) ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 650; line-height: 1.7; white-space: nowrap;
  background: var(--muted-bg); color: var(--ink); }
.chip::before { content: attr(data-icon); font-size: .85em; }
.chip--ok { background: var(--ok-bg); color: var(--ok); }
.chip--warn { background: var(--warn-bg); color: var(--warn); }
.chip--bad { background: var(--bad-bg); color: var(--bad); }
.chip--info { background: var(--info-bg); color: var(--info); }
.chip--neutral { background: var(--muted-bg); color: var(--ink-2); }

/* ---------- Messages ---------- */
.notice { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-sm); margin-bottom: var(--s4); border-left: 4px solid currentColor; font-size: var(--fs-sm); }
.notice > :last-child { margin-bottom: 0; }
.notice p > strong:first-child { display: block; }
.notice--ok { background: var(--ok-bg); color: var(--ok); }
.notice--warn { background: var(--warn-bg); color: var(--warn); }
.notice--bad { background: var(--bad-bg); color: var(--bad); }
.notice--info { background: var(--info-bg); color: var(--info); }
.notice p, .notice li { color: var(--ink); }
.notice a { color: inherit; font-weight: 600; }

/* ---------- Panels & tables ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); }
.panel + .panel { margin-top: var(--s4); }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); }
.panel-title h2, .panel-title h3 { margin: 0; font-size: var(--fs-h3); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { text-align: left; padding: 10px var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: var(--fs-xs); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.lines { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.lines td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td:last-child { text-align: right; white-space: nowrap; padding-left: var(--s3); }
.lines .discount td { color: var(--ok); }
.lines .total td { border-bottom: 0; padding-top: var(--s3); font-weight: 700; font-size: var(--fs-md); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px var(--s4); margin: 0; font-size: var(--fs-sm); }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; overflow-wrap: anywhere; }

details.disclosure > summary { cursor: pointer; font-weight: 600; min-height: var(--tap); display: flex; align-items: center; gap: var(--s2); list-style: none; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: '+'; width: 1.2em; font-weight: 700; color: var(--brand-700); }
details.disclosure[open] > summary::before { content: '−'; }

.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--muted-bg), #F8FAFC, var(--muted-bg)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

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

.test-banner{background:#7C2D12;color:#fff;text-align:center;font-size:.875rem;font-weight:600;padding:6px 12px}
