/* Grace Couriers — design system
   Ink + brushed gold + teal, taken from the logo. Sharp 4px corners, ruled lines, no glows. */

:root {
  --f-head: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --f-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --r: 4px;
  --r-lg: 6px;
  --wrap: 1180px;
  --pad: clamp(1rem, 4vw, 2rem);
  --hdr: 64px;

  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --surface-2: #EBE6DB;
  --text: #15181A;
  --muted: #555A5D;
  --line: #D3CBBA;
  --line-strong: #15181A;
  --gold: #85600F;          /* gold for text on light (5.6:1) */
  --gold-fill: #C9972F;
  --teal: #0B6A73;          /* white text on this = 6.3:1 */
  --on-teal: #FFFFFF;
  --btn-bg: #0B0D0E;
  --btn-text: #F4F1EA;
  --btn-hover: #2A2F33;
  --danger: #A3171C;
  --danger-bg: #FBE9E7;
  --ok: #1D6A39;
  --ok-bg: #E4F2E8;
  --warn: #7A5300;
  --warn-bg: #FBF0D4;
  --info-bg: #E2F0F1;
  --focus: #F2B705;
  --focus-ring: #0B0D0E;
  --hatch: #D9D2C3;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #0B0D0E;
  --surface: #131618;
  --surface-2: #1A1E21;
  --text: #ECE8E0;
  --muted: #A4A8AA;
  --line: #2D3236;
  --line-strong: #ECE8E0;
  --gold: #E2B33C;
  --gold-fill: #E2B33C;
  --teal: #35B7C3;
  --on-teal: #071012;
  --btn-bg: #E2B33C;
  --btn-text: #0B0D0E;
  --btn-hover: #F0C65A;
  --danger: #FF8A80;
  --danger-bg: #2A1414;
  --ok: #7FD69B;
  --ok-bg: #12261A;
  --warn: #F3C969;
  --warn-bg: #2A2210;
  --info-bg: #10272A;
  --focus: #F2B705;
  --focus-ring: #0B0D0E;
  --hatch: #24292C;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 3.5rem); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--f-body);
  overflow-x: hidden;
  transition: background-color .2s ease, color .2s ease;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-head); font-stretch: 118%; line-height: 1.05; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); font-weight: 900; line-height: .98; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 800; font-stretch: 112%; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.narrow { max-width: 680px; }
.page-pad { padding-block: clamp(2rem, 6vw, 4.5rem); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { font: 700 .75rem/1.2 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: .9rem; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.55; max-width: 38ch; color: var(--muted); }
.accent { color: var(--gold); }
code { font-family: var(--f-mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 3px; }

/* Focus: GOV.UK-style high-visibility ring */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-ring); border-radius: 2px; }
[data-theme='dark'] :focus-visible { box-shadow: 0 0 0 6px #000; }
main:focus { outline: none; }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--focus); color: #0B0D0E; padding: .75rem 1rem; font-weight: 700; border-radius: var(--r); }
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); transition: background-color .2s ease; }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: var(--hdr); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; min-height: 44px; }
.brand img { width: 62px; height: auto; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font: 900 1.35rem/1 var(--f-head); font-stretch: 125%; letter-spacing: .02em; text-transform: uppercase; color: var(--gold); }
.brand-sub { font: 600 .62rem/1.3 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin-top: .2rem; }
.main-nav { display: flex; gap: .25rem; }
.main-nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: .6rem .8rem; border-radius: var(--r); min-height: 44px; display: inline-flex; align-items: center; }
.main-nav a:hover { background: var(--surface-2); }
.main-nav a[aria-current='page'] { box-shadow: inset 0 -3px 0 var(--gold-fill); border-radius: 0; }
.header-tools { display: flex; gap: .4rem; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.icon-btn:hover { border-color: var(--line-strong); }
.theme-toggle .i-moon { display: none; }
[data-theme='dark'] .theme-toggle .i-sun { display: none; }
[data-theme='dark'] .theme-toggle .i-moon { display: block; }
.menu-toggle { display: none; }
.burger { display: grid; gap: 4px; width: 18px; }
.burger span { height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded='true'] .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] .burger span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded='true'] .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.status-row { padding-bottom: .55rem; }
.status-badge { display: inline-flex; align-items: center; gap: .55rem; margin: 0; font-size: .85rem; font-weight: 600; padding: .3rem .7rem .3rem .55rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.status-badge .dot { width: 9px; height: 9px; border-radius: 2px; background: var(--ok); }
.status-badge.is-open { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.status-badge.is-closed .dot { background: var(--danger); }
.status-badge.is-closed { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.status-badge .count { font-family: var(--f-mono); font-weight: 500; color: var(--muted); }

@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .brand-sub { display: none; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: .5rem var(--pad) 1rem; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: .9rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.05rem; }
  .main-nav a[aria-current='page'] { box-shadow: inset 3px 0 0 var(--gold-fill); padding-left: .75rem; }
}

/* ---------- Notices ---------- */
.notices { display: grid; gap: .5rem; padding-top: 1rem; }
.notice { border: 1px solid var(--line); border-left: 4px solid var(--teal); background: var(--info-bg); padding: .8rem 1rem; border-radius: var(--r); }
.notice p { margin: .2rem 0 0; }
.notice-warning { border-left-color: var(--gold-fill); background: var(--warn-bg); }
.notice-alert { border-left-color: var(--danger); background: var(--danger-bg); }
.notice-title { font-weight: 700; }
.pin { font: 700 .65rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; border: 1px solid currentColor; padding: .2rem .35rem; margin-right: .5rem; border-radius: 3px; vertical-align: 2px; }

/* ---------- Hero + booker ---------- */
.hero { display: grid; gap: clamp(2rem, 4vw, 4rem); padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); align-items: start; }
.hero-facts { margin-top: 0; }
@media (min-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 33rem); grid-template-areas: 'copy booker' 'facts booker'; grid-template-rows: auto 1fr; row-gap: 2rem; }
  .hero-copy { grid-area: copy; padding-top: 2.5rem; }
  .booker { grid-area: booker; }
  .hero-facts { grid-area: facts; align-self: start; }
}
.hero > * { min-width: 0; }
.hero h1.hero-h-long { font-size: clamp(2rem, 4.4vw, 3.5rem); max-width: 17ch; line-height: 1.02; }
.welcome { border-left: 4px solid var(--gold-fill); padding: .2rem 0 .2rem 1.1rem; max-width: 40ch; font-size: clamp(1.02rem, 1.5vw, 1.15rem); line-height: 1.55; color: var(--muted); }
.welcome p { margin: 0 0 .6rem; }
.welcome p:last-child { margin-bottom: 0; }
.welcome strong { color: var(--text); }
.welcome-hi { font-weight: 700; color: var(--text); }
.h-sub { display: block; font: 600 .9rem/1.3 var(--f-body); color: var(--muted); letter-spacing: 0; margin-top: .3rem; }
.caps { text-transform: uppercase; letter-spacing: .04em; }
.hero h1 { max-width: 13ch; }
.hero-facts { margin: 2rem 0 0; display: grid; gap: 0; border-top: 2px solid var(--line-strong); max-width: 30rem; }
.hero-facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.hero-facts dt { font: 700 .72rem/1.6 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero-facts dd { margin: 0; font-weight: 600; }
@media (max-width: 520px) { .hero-facts div { grid-template-columns: 1fr; gap: .1rem; } }

.booker { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-fill); border-radius: var(--r-lg); padding: clamp(1.1rem, 3vw, 1.75rem); }
.booker-head h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.steps { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; gap: 1.25rem; font-size: .85rem; font-weight: 600; color: var(--muted); counter-reset: st; }
.step { display: flex; align-items: center; gap: .45rem; counter-increment: st; }
.step .n { width: 22px; height: 22px; border-radius: 3px; border: 1.5px solid var(--line); display: grid; place-items: center; font: 700 .72rem/1 var(--f-body); }
.step .n::before { content: counter(st); }
.step.is-current { color: var(--text); }
.step.is-current .n { border-color: var(--line-strong); }
.step.is-done { color: var(--text); }
.step.is-done .n { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.step.is-done .n::before { content: ''; width: 9px; height: 5px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.progress { height: 3px; background: var(--surface-2); margin-bottom: 1.4rem; }
.progress span { display: block; height: 100%; background: var(--gold-fill); transition: width .3s ease; width: 34%; }
.progress .p-1 { width: 20%; } .progress .p-2 { width: 50%; } .progress .p-3 { width: 85%; } .progress .p-4 { width: 100%; }

.step-panel { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { margin-bottom: 1.1rem; min-width: 0; }
.label, .field > label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .4rem; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } .field-row.three { grid-template-columns: .7fr 1.2fr 1fr; } }
input:not([type=radio]):not([type=checkbox]), select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .8rem; background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r);
  font-size: 1rem; transition: border-color .15s ease;
}
[data-theme='dark'] input:not([type=radio]):not([type=checkbox]), [data-theme='dark'] select, [data-theme='dark'] textarea { background: var(--surface-2); }
textarea { resize: vertical; min-height: 72px; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--line-strong); }
[aria-invalid='true'] { border-color: var(--danger) !important; }
.field-msg { min-height: 1.2em; font-size: .88rem; margin: .4rem 0 0; color: var(--muted); }
.field-msg.is-error, .err { color: var(--danger); font-weight: 600; }
.err { display: block; font-size: .85rem; margin-top: .35rem; }

/* Date strip */
.date-strip { display: flex; gap: .45rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: thin; }
.date-chip { flex: 0 0 auto; scroll-snap-align: start; width: 66px; padding: .5rem 0 .45rem; text-align: center; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--bg); cursor: pointer; line-height: 1.1; }
[data-theme='dark'] .date-chip { background: var(--surface-2); }
.date-chip .dc-d { display: block; font: 700 .68rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.date-chip .dc-n { display: block; font: 900 1.45rem/1.1 var(--f-head); margin: .2rem 0 .1rem; }
.date-chip .dc-m { display: block; font-size: .72rem; color: var(--muted); }
.date-chip:hover { border-color: var(--line-strong); }
.date-chip[aria-checked='true'] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.date-chip[aria-checked='true'] .dc-d, .date-chip[aria-checked='true'] .dc-m { color: inherit; opacity: .85; }
.more-dates { display: inline-flex; align-items: center; gap: .5rem; margin-top: .4rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.field > label.more-dates { display: inline-flex; font-weight: 600; font-size: .85rem; margin: .4rem 0 0; }
.more-dates input:not([type=radio]) { width: auto; min-height: 40px; padding: .35rem .5rem; }

/* Slot grid */
.legend { display: flex; gap: .8rem; list-style: none; margin: 0 0 .4rem; padding: 0; font-size: .78rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .3rem; }
.k { width: 12px; height: 12px; border-radius: 2px; border: 1.5px solid var(--line-strong); display: inline-block; }
.k-sel { background: var(--teal); border-color: var(--teal); }
.k-off { border-color: var(--line); background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 5px); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .4rem; }
.slot { min-height: 48px; padding: .35rem .25rem; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: transparent; cursor: pointer; font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; transition: background-color .12s ease, color .12s ease; }
.slot small { font-weight: 500; font-size: .7rem; color: var(--muted); margin-top: .15rem; }
.slot:hover:not([aria-disabled='true']) { background: var(--surface-2); }
.slot[aria-checked='true'] { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.slot[aria-checked='true'] small { color: inherit; }
.slot[aria-disabled='true'] { cursor: not-allowed; border-color: var(--line); color: var(--muted); font-weight: 500; background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 7px); }
.slot[aria-disabled='true'] .t { text-decoration: line-through; }
.slot.just-taken { animation: taken .6s ease 2; }
@keyframes taken { 50% { border-color: var(--danger); } }
.slot-empty { grid-column: 1 / -1; padding: 1rem; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); }

/* Segmented radios */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.seg label { position: relative; display: block; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: .4rem .3rem; font-weight: 600; font-size: .88rem; line-height: 1.15; border-left: 1px solid var(--line); cursor: pointer; }
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--btn-bg); color: var(--btn-text); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }

/* Checkbox */
.check { display: grid; grid-template-columns: 24px 1fr; gap: .7rem; align-items: start; cursor: pointer; font-size: .92rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
[data-theme='dark'] .check { background: var(--surface-2); }
.check input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--line-strong); border-radius: 3px; background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--teal); border-color: var(--teal); }
.check input:checked::after { content: ''; width: 11px; height: 6px; border: solid var(--on-teal); border-width: 0 0 2.5px 2.5px; transform: translateY(-2px) rotate(-45deg); }

.picked { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .7rem .9rem; margin-bottom: 1.2rem; background: var(--info-bg); border-left: 4px solid var(--teal); border-radius: var(--r); font-weight: 600; }
.picked button { background: none; border: 0; padding: .3rem; text-decoration: underline; cursor: pointer; font-weight: 600; color: var(--teal); min-height: 44px; }

.review { margin: 0 0 1.2rem; border-top: 2px solid var(--line-strong); }
.review div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.review dt { color: var(--muted); font-weight: 600; }
.review dd { margin: 0; word-break: break-word; white-space: pre-line; }
@media (max-width: 420px) { .review div { grid-template-columns: 1fr; gap: 0; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.25rem; border: 1.5px solid transparent; border-radius: var(--r); font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center; transition: background-color .15s ease, border-color .15s ease; }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover:not(:disabled) { background: var(--btn-hover); }
.btn-secondary { background: var(--teal); color: var(--on-teal); }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
[data-theme='dark'] .btn-danger { color: #1a0505; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: .35rem .7rem; font-size: .85rem; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.btn-row .btn-primary { flex: 1 1 auto; }
.btn-col { display: grid; gap: .5rem; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid var(--btn-text); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px; }

.gate { padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.gate .btn { margin: .4rem 0 .8rem; }

/* Skeletons */
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--bg) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r); }
.skel-chip { flex: 0 0 66px; height: 70px; }
.skel-slot { height: 48px; }
.skel-row { height: 64px; margin-bottom: .5rem; }
.skel-kpi { height: 108px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Content sections ---------- */
.band { background: var(--surface-2); padding-block: clamp(3rem, 7vw, 5.5rem); }
.band-ink { background: #0B0D0E; color: #ECE8E0; --muted: #A4A8AA; --line: #2D3236; --gold: #E2B33C; }
[data-theme='dark'] .band-ink { background: var(--surface); border-block: 1px solid var(--line); }
.section-h { margin-bottom: 1.6rem; }
.how { display: grid; gap: 2rem; }
@media (min-width: 900px) { .how { grid-template-columns: 18rem 1fr; } }
.how-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
@media (min-width: 640px) { .how-list { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; } .how-list li:nth-child(even) { transform: translateY(2.5rem); } }
.how-list li { display: grid; grid-template-columns: 3.6rem 1fr; gap: .5rem; padding: 1.25rem 0; border-top: 2px solid var(--line-strong); }
.how-n { font: 900 1.9rem/1 var(--f-head); font-stretch: 125%; color: var(--gold); }
.how-list p { margin: 0; color: var(--muted); max-width: 34ch; }

.services { display: grid; gap: 2rem; padding-block: clamp(4rem, 8vw, 6.5rem); }
@media (min-width: 900px) { .services { grid-template-columns: 5fr 7fr; gap: 4rem; } .services-intro { position: sticky; top: calc(var(--hdr) + 5rem); align-self: start; } }
.services-intro p { font-size: 1.15rem; color: var(--muted); max-width: 24ch; }
.service-list article { padding: 1.6rem 0; border-top: 1px solid var(--line); display: grid; gap: .25rem; }
.service-list article:first-child { border-top: 2px solid var(--line-strong); }
.service-list h3 { font-size: 1.4rem; }
.service-list p { margin: 0; max-width: 52ch; color: var(--muted); font-size: 1.02rem; }
@media (min-width: 640px) { .service-list article:nth-child(2) { padding-left: 3rem; } .service-list article:nth-child(3) { padding-left: 6rem; } }

.rules { display: grid; gap: 1rem; }
@media (min-width: 900px) { .rules { grid-template-columns: 18rem 1fr; } }
.rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2.5rem; }
@media (min-width: 700px) { .rule-list { grid-template-columns: 1fr 1fr; } }
.rule-list li { padding: 1rem 0; border-top: 1px solid var(--line); color: var(--muted); }
.rule-list strong { display: block; color: inherit; color: #ECE8E0; font-size: 1.02rem; margin-bottom: .2rem; }
[data-theme='dark'] .rule-list strong { color: var(--text); }

.contact { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.contact-grid { display: grid; gap: 0; border-top: 2px solid var(--line-strong); }
@media (min-width: 720px) { .contact-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.contact-card { display: flex; flex-direction: column; gap: .2rem; padding: 1.2rem 1rem 1.2rem 0; border-bottom: 1px solid var(--line); text-decoration: none; min-height: 44px; }
.cc-k { font: 700 .72rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cc-v { font: 800 1.25rem/1.25 var(--f-head); font-stretch: 112%; word-break: break-word; }
.contact-card:hover .cc-v { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }

/* Forms on inner pages */
.card-form { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-fill); border-radius: var(--r-lg); padding: 1.4rem; margin: 1.5rem 0; }
.result-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 1.3rem; margin-top: 1rem; }
.timeline { list-style: none; margin: 1rem 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem 1.1rem; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px; background: var(--teal); border-radius: 2px; }

/* Merchant dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--line-strong); }
.order-rows { display: grid; gap: .6rem; }
.order-row { display: grid; gap: .3rem 1rem; grid-template-columns: 1fr auto; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.order-row .or-when { font: 800 1.05rem/1.2 var(--f-head); font-stretch: 112%; }
.order-row .or-meta { color: var(--muted); font-size: .9rem; grid-column: 1 / 2; }
.order-row .or-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: end; }
@media (max-width: 560px) { .order-row { grid-template-columns: 1fr; } .order-row .or-actions { grid-column: 1; grid-row: auto; justify-content: start; } }

.pill { display: inline-flex; align-items: center; gap: .35rem; font: 700 .72rem/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; padding: .35rem .5rem; border-radius: 3px; border: 1px solid var(--line); white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 1px; background: currentColor; }
.pill-pending { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.pill-confirmed { color: var(--teal); background: var(--info-bg); border-color: transparent; }
.pill-dispatched { color: var(--gold); background: var(--warn-bg); border-color: transparent; }
.pill-completed { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.pill-cancelled { color: var(--danger); background: var(--danger-bg); border-color: transparent; }

.ref { font-family: var(--f-mono); letter-spacing: .04em; }
.ref-line { font-size: 1.05rem; }
.ref-line .ref { font-size: 1.5rem; display: block; margin-top: .2rem; color: var(--gold); }

/* Modal */
.modal { border: 0; padding: 0; width: min(560px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); background: var(--surface); color: var(--text); border-radius: var(--r-lg); border-top: 5px solid var(--gold-fill); }
.modal::backdrop { background: rgba(5, 6, 7, .66); }
.modal-body { padding: clamp(1.2rem, 4vw, 2rem); }
.modal h2 { font-size: 1.8rem; }

/* Toasts */
.toasts { position: fixed; z-index: 200; bottom: max(1rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; width: min(440px, calc(100% - 2rem)); pointer-events: none; }
@media (min-width: 900px) { .toasts { left: auto; right: 1.5rem; transform: none; } }
.toast { pointer-events: auto; background: #0B0D0E; color: #F4F1EA; border-left: 4px solid var(--teal); padding: .85rem 1rem; border-radius: var(--r); font-weight: 600; font-size: .95rem; display: flex; gap: .75rem; align-items: start; animation: toastIn .2s ease; }
[data-theme='dark'] .toast { background: #ECE8E0; color: #0B0D0E; }
.toast.t-error { border-left-color: #E5484D; }
.toast.t-ok { border-left-color: #3DBA6A; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 .2rem; min-width: 32px; min-height: 32px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* Footer */
.site-footer { background: #0B0D0E; color: #D9D5CD; padding-top: 3.5rem; border-top: 4px solid var(--gold-fill); }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-brand img { width: 180px; margin-bottom: 1rem; }
.footer-brand p { color: #A4A8AA; max-width: 30ch; font-size: .95rem; }
.footer-h { font: 700 .72rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: #E2B33C; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.footer-links a { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; text-decoration: none; color: #ECE8E0; }
.footer-links a:hover { text-decoration: underline; }
.site-footer :focus-visible { box-shadow: 0 0 0 6px #000; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; padding-block: 1.2rem 2rem; border-top: 1px solid #2D3236; font-size: .82rem; color: #8E9396; }
.footer-base p { margin: 0; }
.credit a { color: #A4A8AA; }

/* Prose / legal */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.prose h2 { font-size: 1.3rem; margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--teal); }

.nf { text-align: left; }
.nf-code { font: 900 clamp(5rem, 20vw, 10rem)/0.9 var(--f-head); font-stretch: 125%; color: var(--gold); margin: 0 0 1rem; letter-spacing: -.03em; }

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

/* =================== ADMIN =================== */
.admin-body { background: var(--bg); }
.admin-loading { display: grid; place-items: center; min-height: 100dvh; gap: .5rem; color: var(--muted); }
.admin-root { min-height: 100dvh; }
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-fill); border-radius: var(--r-lg); padding: 1.8rem; }
.auth-card img { width: 72px; margin-bottom: 1rem; }
.auth-card h1 { font-size: 1.8rem; }

.shell { display: grid; min-height: 100dvh; }
.shell > * { min-width: 0; }
@media (min-width: 1024px) { .shell { grid-template-columns: 248px 1fr; } }
.side { background: #0B0D0E; color: #ECE8E0; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; border-right: 1px solid #22272a; }
@media (max-width: 1023px) { .side { position: sticky; top: 0; z-index: 30; padding: .6rem var(--pad); gap: .5rem; } }
.side-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.side-brand img { width: 46px; }
.side-brand b { font: 900 1.05rem/1 var(--f-head); font-stretch: 125%; text-transform: uppercase; color: #E2B33C; }
.side-brand small { display: block; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: #8E9396; margin-top: .2rem; }
.side-nav { display: flex; flex-direction: column; gap: .15rem; }
.side-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
@media (max-width: 1023px) { .side-nav { flex-direction: row; overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); scrollbar-width: none; } }
.side-nav button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; border-radius: var(--r); font-weight: 600; font-size: .92rem; cursor: pointer; color: #C9C5BD; white-space: nowrap; min-height: 44px; }
.side-nav button:hover { background: #1A1E21; color: #fff; }
.side-nav button[aria-current='page'] { background: #E2B33C; color: #0B0D0E; }
.side-nav button:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.side-foot { margin-top: auto; display: grid; gap: .4rem; font-size: .82rem; color: #8E9396; }
.side-foot .btn { color: #ECE8E0; border-color: #3A4044; }
@media (max-width: 1023px) { .side-foot { display: none; } }
.side-tools { display: flex; gap: .4rem; }
.side .icon-btn { background: #1A1E21; border-color: #2D3236; color: #ECE8E0; }

.content { padding: clamp(1rem, 3vw, 2rem); min-width: 0; }
.view-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 2px solid var(--line-strong); }
.view-head h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0; }
.view-head p { margin: .3rem 0 0; color: var(--muted); }

.kpis { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.5rem; }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.kpi:first-child { border-top: 4px solid var(--gold-fill); }
.kpi-k { font: 700 .7rem/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kpi-v { font: 900 clamp(1.7rem, 3.4vw, 2.5rem)/1 var(--f-head); font-stretch: 112%; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-s { font-size: .82rem; color: var(--muted); }
.kpi-v.danger { color: var(--danger); }
.kpi-v.mono { font-family: var(--f-mono); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2.1rem); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; margin-bottom: 1.25rem; min-width: 0; }
.panel h2 { font-size: 1.15rem; font-stretch: 112%; margin-bottom: .9rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.grid-2 { display: grid; gap: 1.25rem; }
@media (min-width: 1100px) { .grid-2 { grid-template-columns: 1.5fr 1fr; } }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; align-items: end; height: 140px; }
.week-col { display: flex; flex-direction: column; justify-content: end; align-items: center; gap: .3rem; height: 100%; font-size: .72rem; color: var(--muted); }
.week-bar { width: 100%; max-width: 38px; background: var(--teal); border-radius: 3px 3px 0 0; min-height: 3px; }
.week-col.closed .week-bar { background: var(--hatch); }
.week-n { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.toolbar .field { margin: 0; flex: 1 1 140px; }
.toolbar .field.grow { flex: 3 1 220px; }
.toolbar input:not([type=radio]):not([type=checkbox]), .toolbar select { min-height: 42px; padding: .45rem .6rem; }
.toolbar .label { font-size: .78rem; margin-bottom: .25rem; }
.view-toggle { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.view-toggle button { all: unset; padding: .55rem .9rem; font-weight: 600; font-size: .88rem; cursor: pointer; min-height: 24px; }
.view-toggle button[aria-pressed='true'] { background: var(--btn-bg); color: var(--btn-text); }
.view-toggle button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font: 700 .7rem/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .7rem .75rem; border-bottom: 2px solid var(--line-strong); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
table.data td { padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-sub { display: block; color: var(--muted); font-size: .8rem; }
@media (max-width: 760px) {
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { padding: .6rem .2rem; border-bottom: 1px solid var(--line); }
  table.data td { border: 0; padding: .2rem .75rem; display: grid; grid-template-columns: 7rem 1fr; gap: .5rem; }
  table.data td::before { content: attr(data-label); font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  table.data .num { text-align: left; }
}
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

.tl { display: grid; gap: 0; }
.tl-row { display: grid; grid-template-columns: 5.5rem 1fr; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--line); align-items: start; }
.tl-time { font: 700 .9rem/1.6 var(--f-body); font-variant-numeric: tabular-nums; }
.tl-time small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.tl-items { display: flex; flex-wrap: wrap; gap: .4rem; min-height: 32px; }
.tl-card { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: .1rem; padding: .45rem .6rem; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--r); background: var(--bg); font-size: .85rem; min-width: 180px; max-width: 100%; }
.tl-card:hover { border-color: var(--line-strong); }
.tl-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tl-card.s-pending { border-left-color: var(--gold-fill); }
.tl-card.s-cancelled { border-left-color: var(--danger); opacity: .7; }
.tl-card.s-completed { border-left-color: var(--ok); }
.tl-free { color: var(--muted); font-size: .82rem; padding: .35rem 0; }
.tl-row.off { opacity: .8; }

.drawer { border: 0; padding: 0; margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(560px, 100%); background: var(--surface); color: var(--text); border-left: 4px solid var(--gold-fill); }
.drawer::backdrop { background: rgba(5, 6, 7, .6); }
.drawer-head { position: sticky; top: 0; background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); z-index: 2; }
.drawer-head h2 { margin: 0; font-size: 1.3rem; }
.drawer-body { padding: 1.2rem; }
.drawer-section { padding: 1rem 0; border-top: 1px solid var(--line); }
.drawer-section h3 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--f-body); color: var(--muted); margin-bottom: .7rem; }
.status-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.events { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.events li { padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.events time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: .4rem; }
.proof-img { max-height: 260px; border-radius: var(--r); border: 1px solid var(--line); margin-top: .5rem; }

.settings-grid { display: grid; gap: 0 1rem; }
@media (min-width: 700px) { .settings-grid { grid-template-columns: repeat(3, 1fr); } }
.day-picks { display: flex; flex-wrap: wrap; gap: .4rem; }
.day-picks label { position: relative; }
.day-picks input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day-picks span { display: inline-grid; place-items: center; min-width: 52px; min-height: 44px; padding: 0 .6rem; border: 1.5px solid var(--line-strong); border-radius: var(--r); font-weight: 700; font-size: .85rem; cursor: pointer; }
.day-picks input:checked + span { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.day-picks input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch { display: flex; align-items: center; gap: .75rem; cursor: pointer; font-weight: 600; min-height: 44px; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 4px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background-color .15s ease; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--surface); border-radius: 3px; transition: transform .15s ease; }
.switch input:checked { background: var(--teal); }
.switch input:checked::after { transform: translateX(20px); }
.list-rows { display: grid; gap: 0; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list-row:first-child { border-top: 0; }
.list-row .lr-main { min-width: 0; flex: 1 1 240px; }
.list-row .lr-main b { display: block; }
.secret { font-family: var(--f-mono); font-size: 1.4rem; letter-spacing: .08em; background: var(--surface-2); padding: .4rem .7rem; border-radius: var(--r); display: inline-block; margin: .2rem 0 .6rem; }
.callout { padding: .9rem 1rem; border-left: 4px solid var(--gold-fill); background: var(--warn-bg); border-radius: var(--r); margin-bottom: 1rem; font-size: .92rem; }
.callout.info { border-left-color: var(--teal); background: var(--info-bg); }
.inline-check { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; cursor: pointer; min-height: 40px; }
.inline-check input { width: 20px; height: 20px; accent-color: var(--teal); }

/* =================== INVOICE =================== */
.invoice-body { background: var(--surface-2); }
.inv-toolbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem var(--pad); background: var(--bg); border-bottom: 1px solid var(--line); }
.invoice { max-width: 820px; margin: clamp(1rem, 4vw, 2.5rem) auto; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--gold-fill); border-radius: var(--r-lg); padding: clamp(1.2rem, 5vw, 3rem); font-size: .95rem; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1.5rem; border-bottom: 2px solid var(--line-strong); }
.inv-brand img { width: 150px; background: #0B0D0E; padding: .6rem; border-radius: var(--r); }
.inv-title { text-align: right; margin-left: auto; }
.inv-title h1 { font-size: clamp(2rem, 5vw, 2.8rem); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6rem; }
.inv-meta { margin: 0; display: grid; gap: .2rem; }
.inv-meta div { display: flex; justify-content: flex-end; gap: .75rem; }
.inv-meta dt { color: var(--muted); }
.inv-meta dd { margin: 0; font-weight: 700; }
.inv-state { display: inline-block; margin: .8rem 0 0; padding: .35rem .7rem; border-radius: 3px; font: 700 .75rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; }
.inv-unpaid { background: var(--warn-bg); color: var(--warn); }
.inv-paid { background: var(--ok-bg); color: var(--ok); }
.inv-void { background: var(--danger-bg); color: var(--danger); }
.inv-parties { display: grid; gap: 1.2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .inv-parties { grid-template-columns: repeat(3, 1fr); } }
.inv-parties h2, .inv-cod h2 { font: 700 .72rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.inv-parties p { margin: 0; line-height: 1.5; word-break: break-word; }
.inv-booking { display: flex; flex-wrap: wrap; gap: .5rem 2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.inv-booking span { display: block; font-size: .78rem; color: var(--muted); }
.inv-lines { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.inv-lines th { text-align: left; font: 700 .7rem/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .6rem .5rem; border-bottom: 2px solid var(--line-strong); }
.inv-lines td { padding: .8rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.inv-lines .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-lines tfoot th { text-align: right; font-size: .85rem; color: var(--text); border: 0; padding-top: 1rem; }
.inv-lines tfoot td { border: 0; padding-top: 1rem; }
.inv-total { font: 900 1.5rem/1 var(--f-head); }
.inv-cod { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--r); padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.inv-cod dl { margin: 0 0 .6rem; }
.inv-cod dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.inv-cod dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.inv-cod .net { border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .5rem; font-size: 1.05rem; }
.inv-note { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }
.inv-foot { margin-top: 1.5rem; padding-top: 1rem; border-top: 2px solid var(--line-strong); }
.inv-foot p { margin: 0 0 .3rem; }
@media print {
  @page { size: A4; margin: 14mm; }
  .no-print { display: none !important; }
  html, html[data-theme='dark'] { --bg: #fff; --surface: #fff; --surface-2: #fff; --text: #111; --muted: #555; --line: #ccc; --line-strong: #111; --gold: #85600F; --gold-fill: #C9972F; --teal: #0B6A73; --ok: #1D6A39; --ok-bg: #E4F2E8; --warn: #7A5300; --warn-bg: #FBF0D4; --danger: #A3171C; --danger-bg: #FBE9E7; }
  body { background: #fff !important; color: #111; }
  .invoice { margin: 0; border: 0; border-top: 6px solid #C9972F; padding: 0; max-width: none; }
  .inv-brand img { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inv-state, .inv-cod { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =================== PRICING / CALENDAR =================== */
:root { --wk: #8A5A00; --wk-bg: #FBF0D4; --hol: #0B6A73; --hol-bg: #E0F1F2; --std: #3F4549; --std-bg: #ECE8DF; }
[data-theme='dark'] { --wk: #F3C969; --wk-bg: #2B230F; --hol: #6FD3DC; --hol-bg: #0F2A2D; --std: #C9C5BD; --std-bg: #22262A; }
.day-badge { display: inline-flex; align-items: center; gap: .3rem; font: 700 .7rem/1 var(--f-body); letter-spacing: .04em; padding: .3rem .45rem; border-radius: 3px; white-space: nowrap; }
.db-standard { color: var(--std); background: var(--std-bg); }
.db-weekend { color: var(--wk); background: var(--wk-bg); }
.db-holiday { color: var(--hol); background: var(--hol-bg); }
.row-off td, .row-off { opacity: .55; }
.price-dl .price-final { border-top: 2px solid var(--line-strong); }
.price-dl dd .day-badge { vertical-align: 1px; }
.quote-out { margin-top: .5rem; border-top: 2px solid var(--line-strong); }
.quote-line { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.quote-line strong { font-variant-numeric: tabular-nums; }
.quote-total { font-size: 1.1rem; border-bottom: 0; }
.quote-total strong { font: 900 1.5rem/1 var(--f-head); }

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.cal-title { margin: 0 !important; font-size: 1.25rem !important; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; list-style: none; padding: 0; margin: 0 0 .8rem; font-size: .8rem; color: var(--muted); }
.cal-legend li { display: flex; align-items: center; gap: .35rem; }
.cal-legend .k { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); }
.k.t-standard { background: var(--surface); } .k.t-weekend { background: var(--wk-bg); border-color: var(--wk); } .k.t-holiday { background: var(--hol-bg); border-color: var(--hol); }
.k.k-closed { background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 5px); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font: 700 .7rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .3rem .2rem; }
.cal-day { min-height: 86px; border: 1px solid var(--line); border-radius: var(--r); padding: .4rem .45rem; display: flex; flex-direction: column; gap: .2rem; background: var(--surface); min-width: 0; }
.cal-day.t-weekend { background: var(--wk-bg); border-color: color-mix(in srgb, var(--wk) 35%, var(--line)); }
.cal-day.t-holiday { background: var(--hol-bg); border-color: color-mix(in srgb, var(--hol) 45%, var(--line)); }
.cal-day.is-closed { background-image: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 7px); }
.cal-day.is-out { opacity: .4; }
.cal-day.is-today { outline: 2px solid var(--gold-fill); outline-offset: -2px; }
.cal-n { font: 800 1rem/1 var(--f-head); }
.cal-name { font-size: .7rem; line-height: 1.2; font-weight: 600; color: var(--hol); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-mult { margin-top: auto; font: 700 .7rem/1 var(--f-body); color: var(--muted); }
.t-weekend .cal-mult { color: var(--wk); } .t-holiday .cal-mult { color: var(--hol); }
@media (max-width: 640px) { .cal-day { min-height: 58px; padding: .3rem; } .cal-name { display: none; } .cal-n { font-size: .9rem; } }

/* Merchant portal estimate + date tags */
.estimate { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; align-items: baseline; padding: .8rem 1rem; margin-bottom: 1.1rem; border: 1px solid var(--line); border-left: 4px solid var(--gold-fill); border-radius: var(--r); background: var(--bg); }
[data-theme='dark'] .estimate { background: var(--surface-2); }
.est-k { font-weight: 700; font-size: .9rem; }
.est-v { font: 900 1.4rem/1 var(--f-head); grid-row: span 2; align-self: center; font-variant-numeric: tabular-nums; }
.est-s { font-size: .8rem; color: var(--muted); }
.date-chip { position: relative; }
.dc-tag { display: block; margin: .25rem auto 0; width: max-content; max-width: 100%; font: 700 .6rem/1 var(--f-body); padding: .2rem .3rem; border-radius: 2px; letter-spacing: .02em; }
.dc-hol { color: var(--hol); background: var(--hol-bg); }
.dc-wk { color: var(--wk); background: var(--wk-bg); }
.date-chip[aria-checked='true'] .dc-tag { background: rgba(255, 255, 255, .16); color: inherit; }
.inline-select { width: auto !important; min-height: 36px !important; padding: .2rem .5rem !important; font-size: .95rem; margin-left: .5rem; }
