/* Thandeka Installs — one stylesheet, no framework, no build step.
   Order: tokens → base → layout → components → pages → forms → admin → utilities.
   Everything is sized from the spacing scale so the whole site keeps one rhythm.
   Look: a warm ivory page with white cards on it, plum as the brand colour and a champagne
   accent, a serif (Fraunces) for headings and a clean sans (Plus Jakarta Sans) for everything else. */

/* ---------- Tokens ---------- */
:root {
  --brand: #7a2e5c;
  --brand-dark: #5c2045;
  --brand-deep: #2e0f24;
  --brand-tint: #f8eef3;
  --brand-tint-2: #efdfe8;
  --brand-light: #a8477f;
  --brand-rgb: 122, 46, 92;
  --brand-deep-rgb: 46, 15, 36;
  --brand-light-rgb: 168, 71, 127;
  --brand-mid: #52183f;
  --brand-soft: #9c3f76;
  --brand-pale: #f7c9df;
  --brand-pale-rgb: 247, 201, 223;
  --brand-on-deep: #d9c5d1;
  --on-brand: #fff;          /* text on the brand colour */
  --header-bg: rgba(251, 248, 246, 0.85);
  --stripe: #f3ecee;          /* hatching on unavailable days */
  --accent: #e9c28a;         /* champagne, on dark plum only */
  --accent-soft: #fbf1e3;
  --ink: #1f1720;
  --muted: #625a64;
  --line: #ece4e6;
  --line-strong: #bfaeb8;
  --bg: #fbf8f6;
  --surface: #ffffff;
  --ok-bg: #e3f4e8; --ok-ink: #17552e;
  --warn-bg: #fdecc8; --warn-ink: #7a4a00;
  --bad-bg: #fdeaea; --bad-ink: #a4161a;

  /* 4px scale: every margin, padding and gap comes from here */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --radius: 20px; --radius-sm: 12px; --radius-pill: 999px;
  --tap: 48px;
  --shadow-sm: 0 1px 2px rgba(var(--brand-deep-rgb), 0.05), 0 2px 8px rgba(var(--brand-deep-rgb), 0.04);
  --shadow: 0 12px 32px rgba(var(--brand-deep-rgb), 0.12), 0 2px 8px rgba(var(--brand-deep-rgb), 0.06);
  --shadow-lg: 0 24px 60px rgba(var(--brand-deep-rgb), 0.22);
  --ring: 0 0 0 4px rgba(var(--brand-rgb), 0.22);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --wide: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; min-height: 100vh;
}
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0 0 var(--s3); text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-optical-sizing: auto; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-top: var(--s2); }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin-top: var(--s5); }
h3 { font-size: 1.02rem; font-weight: 700; margin-top: var(--s4); letter-spacing: -0.01em; }
h1 em, h2 em { font-style: italic; font-weight: 500; }
p { margin: 0 0 var(--s3); }
ul, ol { margin: 0 0 var(--s3); padding-left: var(--s5); }
li { margin: var(--s1) 0; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
.icon { flex: 0 0 auto; vertical-align: middle; }
code { font-family: ui-monospace, "DejaVu Sans Mono", monospace; font-size: 0.9em; color: var(--ink); background: var(--brand-tint); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
::selection { background: var(--brand-tint-2); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- Layout ---------- */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: var(--s4); top: var(--s2); z-index: 30; background: #fff; padding: var(--s2) var(--s3); border-radius: var(--radius-sm); }

.announce {
  margin: 0; padding: var(--s2) var(--s4); text-align: center; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em;
  background: var(--brand-deep); color: #f6e7ef; display: flex; align-items: center; justify-content: center; gap: var(--s2);
}
.announce .icon { color: var(--accent); }
.phone-only { display: none; }
@media (max-width: 520px) { .wide-only { display: none; } .phone-only { display: inline; } }

/* Frosted bar that stays at the top while scrolling, so the way home and to the shop is always there. */
.site-header {
  position: sticky; top: 0; z-index: 20; padding: var(--s2) var(--s4);
  background: var(--header-bg); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(var(--brand-rgb), 0.1);
}
.header-inner { width: 100%; max-width: var(--wide); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 52px; }
.brand {
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: var(--s2); min-height: 44px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em;
}
.brand em { color: var(--brand); font-weight: 500; }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid; place-content: center; width: 36px; height: 36px; border-radius: 11px; font-style: italic;
  background: linear-gradient(140deg, var(--brand-light), var(--brand) 55%, var(--brand-deep)); color: #fff; font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.35);
}
/* The public header's own nav; the admin nav has its own rules further down. */
.site-header nav:not(.admin-nav) { display: flex; align-items: center; gap: var(--s1); }
.site-header nav:not(.admin-nav) a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; min-height: 44px; white-space: nowrap;
  display: flex; align-items: center; gap: 6px; padding: 0 var(--s3); border-radius: var(--radius-pill);
}
.site-header nav:not(.admin-nav) a:hover { background: var(--brand-tint); color: var(--brand); }
.site-header nav:not(.admin-nav) .icon { color: var(--brand); }
.site-header .nav-cta { background: var(--brand); color: var(--on-brand) !important; margin-left: var(--s2); padding: 0 var(--s4) !important; box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.3); }
.site-header .nav-cta:hover { background: var(--brand-dark) !important; }
@media (max-width: 640px) { .site-header .nav-cta { display: none !important; } }
/* Phones: each menu link is an icon over a short label, so the brand and both links always fit
   on one line, down to a 320px screen. */
@media (max-width: 520px) {
  .site-header { padding: var(--s1) var(--s3); }
  .header-inner { gap: var(--s2); }
  .brand { font-size: 1.08rem; min-width: 0; }
  .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .brand-mark { width: 32px; height: 32px; flex: 0 0 auto; }
  .site-header nav:not(.admin-nav) { gap: 2px; flex: 0 0 auto; }
  .site-header nav:not(.admin-nav) a {
    flex-direction: column; justify-content: center; gap: 1px; min-height: 48px; min-width: 56px; padding: 2px var(--s2);
    font-size: 0.7rem; border-radius: 12px;
  }
}
@media (max-width: 350px) { .site-header .brand-mark { display: none; } }

.container { width: 100%; max-width: var(--wide); margin: 0 auto; padding: var(--s5) var(--s4) var(--s8); flex: 1; }
section + section { margin-top: var(--s7); }

.site-footer { background: var(--brand-deep); color: var(--brand-on-deep); font-size: 0.95rem; padding: var(--s7) var(--s4) var(--s5); }
.site-footer a { color: #f6e7ef; text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer h2 { font: 700 0.78rem/1.2 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s3); }
.site-footer li { margin: var(--s2) 0; }
.site-footer .brand, .site-footer .brand:hover { color: #fff; text-decoration: none; }
.site-footer .brand em { color: var(--accent); }
.footer-inner { max-width: var(--wide); margin: 0 auto; display: grid; gap: var(--s6); }
.footer-brand p { margin-top: var(--s3); max-width: 22rem; }
.footer-inner { grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
.footer-legal { max-width: var(--wide); margin: var(--s6) auto 0; padding-top: var(--s4); border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.82rem; color: #bfa8b6; }

/* ---------- Shared bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 var(--s2);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand);
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin: 0 0 var(--s4); }
.section-head h2 { margin: 0; }
.section-head .eyebrow { margin-bottom: var(--s1); }
.section-head > a { font-weight: 700; font-size: 0.95rem; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.section-head > a:hover { text-decoration: underline; }
.page-head { margin-bottom: var(--s4); }
.page-head h1 { margin: 0; }
.list-head { margin: var(--s2) 0 var(--s4); }
.list-head h1 { margin: 0 0 var(--s1); }
.lead { font-size: 1.12rem; }
.lead-sm { font-size: 1.05rem; max-width: 44rem; }
.crumbs { font-size: 0.88rem; color: var(--muted); margin: 0 0 var(--s4); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: var(--s5); text-align: center; color: var(--muted); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); white-space: nowrap;
  min-height: var(--tap); padding: 0 var(--s5); border: 2px solid transparent; border-radius: var(--radius-pill);
  background: var(--brand); color: var(--on-brand); font: 700 1rem/1 var(--font); letter-spacing: 0.005em; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.28);
}
.button:hover { background: var(--brand-dark); color: var(--on-brand); box-shadow: 0 10px 22px rgba(var(--brand-rgb), 0.34); }
.button:active { transform: translateY(1px) scale(0.99); }
.button .icon { transition: transform .2s var(--ease); }
.button:hover .icon { transform: translateX(3px); }
.button.secondary { background: var(--surface); color: var(--brand); border-color: rgba(var(--brand-rgb), 0.35); box-shadow: none; }
.button.secondary:hover { background: var(--brand-tint); color: var(--brand-dark); border-color: var(--brand); }
.button.danger { background: var(--bad-ink); box-shadow: none; }
.button.danger:hover { background: #7d0f12; }
.button.wide { width: 100%; min-height: 54px; font-size: 1.05rem; }
/* On a phone a long label wraps onto two lines instead of pushing the button off the screen. */
@media (max-width: 480px) {
  .button { white-space: normal; text-align: center; line-height: 1.2; padding-top: var(--s2); padding-bottom: var(--s2); }
  .button.small-btn { padding-left: var(--s3); padding-right: var(--s3); }
}
.button[disabled], .button[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.small-btn { min-height: 42px; padding: 0 var(--s4); font-size: 0.92rem; box-shadow: none; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; min-height: 40px; }
.link-button:hover { color: var(--brand-dark); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: stretch; }
.actions > .button, .actions > form > .button { flex: 1 1 9rem; }
.actions > form { display: flex; flex: 1 1 9rem; }
@media (min-width: 560px) { .actions > .button, .actions > form, .actions > form > .button { flex: 0 0 auto; } }
.actions .button { margin-top: 0; }
.inline { display: inline; }

/* ---------- Panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s5) var(--s4); margin: var(--s4) 0; box-shadow: var(--shadow-sm);
}
@media (min-width: 560px) { .panel { padding: var(--s5) var(--s6); } }
.panel > h2:first-of-type, .panel > h3:first-of-type, .panel > *:first-child { margin-top: 0; }
.panel h2 { font-size: 1.35rem; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); }
.h-sub { font: 500 0.95rem var(--font); color: var(--muted); letter-spacing: 0; }
.step-no {
  display: inline-grid; place-content: center; width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: var(--brand); color: var(--on-brand); font: 700 0.9rem/1 var(--font);
}
.form-step { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.narrow { max-width: 420px; }

/* ---------- Home ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  display: grid; gap: var(--s6); align-items: center;
  border-radius: calc(var(--radius) + 8px); padding: var(--s7) var(--s5) var(--s6); margin-bottom: var(--s5);
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(233, 194, 138, 0.28), transparent 60%),
    radial-gradient(70% 90% at 0% 100%, rgba(var(--brand-light-rgb), 0.55), transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 55%, var(--brand-deep) 100%);
  box-shadow: var(--shadow-lg);
}
/* A faint grain of dots for texture. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(120deg, #000, transparent 70%);
}
.hero .eyebrow { color: var(--accent); }
.hero h1 { margin: 0 0 var(--s4); font-size: clamp(2.3rem, 7vw, 4rem); line-height: 1.02; color: #fff; }
.hero h1 em { display: block; color: var(--brand-pale); }
.hero .lead { color: rgba(255, 255, 255, 0.88); max-width: 34rem; }
.hero .actions { margin: var(--s5) 0 0; }
.hero .button { background: #fff; color: var(--brand-dark); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25); }
.hero .button:hover { background: var(--accent-soft); color: var(--brand-deep); }
.hero .button.secondary { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.55); box-shadow: none; backdrop-filter: blur(4px); }
.hero .button.secondary:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.hero-trust { list-style: none; padding: 0; margin: var(--s5) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); }
.hero-trust li { margin: 0; display: flex; align-items: center; gap: var(--s2); }
.hero-trust .icon { color: var(--accent); }
.hero-art { position: relative; height: 220px; max-width: 420px; width: 100%; justify-self: center; }
.hero-pic {
  position: absolute; object-fit: cover; border-radius: var(--radius); border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.hero-pic-1 { width: 58%; aspect-ratio: 4 / 5; left: 4%; top: 0; rotate: -4deg; z-index: 2; }
.hero-pic-2 { width: 44%; aspect-ratio: 1; right: 4%; top: 6%; rotate: 5deg; }
.hero-pic-3 { width: 36%; aspect-ratio: 1; right: 16%; bottom: -6%; rotate: -2deg; z-index: 3; }
.hero-pic-1:only-of-type { left: 20%; }
.hero-blob { position: absolute; inset: 10% 15%; border-radius: 42% 58% 60% 40% / 45% 40% 60% 55%; background: linear-gradient(140deg, rgba(var(--brand-pale-rgb), 0.5), rgba(233, 194, 138, 0.35)); }
.hero-badge {
  position: absolute; left: 0; bottom: 4%; z-index: 4; display: grid; padding: var(--s3) var(--s4);
  background: #fff; color: var(--ink); border-radius: var(--radius-sm); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}
.hero-badge small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hero-badge strong { font: 600 1.5rem/1.1 var(--font-display); color: var(--brand); }
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.15fr 1fr; padding: var(--s8) var(--s7); }
  .hero-art { height: 380px; }
}

/* How it works: three short promises under the hero. */
.perks { list-style: none; padding: 0; margin: 0 0 var(--s7); display: grid; gap: var(--s3); }
.perks li {
  margin: 0; display: grid; grid-template-columns: 48px 1fr; column-gap: var(--s3); align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); box-shadow: var(--shadow-sm);
}
.perks .icon { grid-row: span 2; width: 48px; height: 48px; padding: 12px; border-radius: 14px; background: var(--brand-tint); color: var(--brand); }
.perks strong { font-size: 1rem; }
.perks span { color: var(--muted); font-size: 0.9rem; line-height: 1.35; }
@media (min-width: 760px) { .perks { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }

/* Shop by type: pills that scroll sideways on a phone. */
.type-chips { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--s4)) var(--s4); padding: 2px var(--s4) var(--s1); }
.type-chips::-webkit-scrollbar { display: none; }
.type-chips a {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 42px; padding: 0 var(--s4); border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 0.92rem; text-decoration: none;
}
.type-chips a:hover { border-color: var(--brand); color: var(--brand); }
.type-chips a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.cta-band {
  text-align: center; border-radius: calc(var(--radius) + 8px); padding: var(--s7) var(--s5); color: #fff;
  background: radial-gradient(80% 120% at 50% 0%, var(--brand-light), var(--brand) 50%, var(--brand-deep));
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; margin: 0 0 var(--s2); font-size: clamp(1.6rem, 4vw, 2.2rem); }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 32rem; margin: 0 auto var(--s5); }
.cta-band .button { background: #fff; color: var(--brand-dark); }
.cta-band .button:hover { background: var(--accent-soft); }

/* ---------- Cards: two a row on a phone, like a shop app; more as the screen widens ---------- */
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s5) var(--s4); } }
.card {
  position: relative; display: flex; flex-direction: column; gap: 2px; margin: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 var(--s3); box-shadow: var(--shadow-sm);
}
.card > :not(.card-link) { margin-left: var(--s3); margin-right: var(--s3); }
.card:hover { box-shadow: var(--shadow); translate: 0 -3px; border-color: transparent; }
.card:focus-within { box-shadow: var(--ring); }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* the whole card is the link */
.card-link:hover h3 { color: var(--brand); }
.card-media { position: relative; display: block; overflow: hidden; background: var(--brand-tint); }
.card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover img { transform: scale(1.05); }
.card[data-sold-out] img { filter: grayscale(0.9); opacity: 0.7; }
.chip {
  position: absolute; left: var(--s2); top: var(--s2); display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 700; text-transform: capitalize;
  background: rgba(255, 255, 255, 0.92); color: var(--ink); backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.chip .icon { color: var(--brand); }
.chip-dark { background: var(--ink); color: #fff; text-transform: none; }
.card h3 { margin: var(--s3) var(--s3) 0; font-size: 0.98rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card p { margin-top: 0; margin-bottom: 0; }
.card .meta { margin: 2px var(--s3) 0; }
.card .price { margin-top: var(--s2); }
.card .deposit { margin-bottom: var(--s3); color: var(--muted); }
.card .button { margin-top: auto; position: relative; z-index: 2; }
.card > * { min-width: 0; }
.price { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.stock { font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.stock.ok { color: var(--ok-ink); }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
/* A row of related items scrolls sideways on a phone instead of stacking. */
@media (max-width: 639px) {
  .cards-scroll { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--s4)); padding: 0 var(--s4) var(--s2); }
  .cards-scroll::-webkit-scrollbar { display: none; }
  .cards-scroll .card { scroll-snap-align: start; }
}
.related { margin-top: var(--s7); }

/* ---------- Product and service pages: photos beside the buy box on a wide screen ---------- */
.pdp { display: grid; gap: var(--s4); align-items: start; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr); gap: var(--s6); }
  .buybox { position: sticky; top: 92px; }
}
.buybox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow-sm); }
@media (min-width: 560px) { .buybox { padding: var(--s6); } }
.buybox .eyebrow { text-transform: uppercase; }
.buybox h1 { margin: 0 0 var(--s2); }
.spec-chips { list-style: none; padding: 0; margin: var(--s3) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.spec-chips li { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--bg); border: 1px solid var(--line); font-size: 0.88rem; font-weight: 600; }
.spec-chips .icon { color: var(--brand); }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: var(--s3); margin: 0 calc(-1 * var(--s4));
  padding: 0 var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery.many { grid-auto-columns: 86%; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--brand-tint); scroll-snap-align: center; }
.swipe-hint { margin: calc(-1 * var(--s2)) 0 0; text-align: center; }
@media (min-width: 900px) {
  .gallery, .gallery.many { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); overflow: visible; margin: 0; padding: 0; }
  .gallery img:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .swipe-hint { display: none; }
}
.ticks { list-style: none; padding: var(--s4) 0 0; margin: var(--s5) 0 0; border-top: 1px solid var(--line); font-size: 0.93rem; color: var(--muted); }
.ticks li { padding-left: 30px; position: relative; margin: var(--s2) 0; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-content: center; font-size: 0.7rem; font-weight: 800; background: var(--ok-bg); color: var(--ok-ink);
}
.info-grid { display: grid; gap: var(--s4); margin-top: var(--s6); }
@media (min-width: 900px) { .info-grid { grid-template-columns: 1fr 1.3fr; align-items: start; } }
.description-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow-sm); }
.pdp + .description-panel { margin-top: var(--s6); }
.description-panel h2 { margin-top: 0; font-size: 1.35rem; }
.info-grid > .description-panel + .description-panel { margin-top: 0; }
.description { max-width: 46rem; }
.description p:last-child { margin-bottom: 0; }
.meta { color: var(--muted); margin: var(--s1) 0 var(--s3); }

/* ---------- Checkout: the form beside an order summary ---------- */
.checkout { display: grid; gap: var(--s4); align-items: start; margin-top: var(--s5); }
.checkout > .panel, .checkout-main > .panel { margin: 0; }
.checkout-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); min-width: 0; }
.checkout > *, .checkout-main > *, .request-grid > * { min-width: 0; }
@media (min-width: 900px) {
  .checkout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s5); }
  .checkout > .summary { position: sticky; top: 92px; }
}
@media (max-width: 899px) {
  .checkout > .summary { order: -1; padding: var(--s4); }
  .checkout > .summary .summary-note { display: none; }
}
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow-sm); }
.summary-item { display: grid; grid-template-columns: 72px 1fr; gap: var(--s3); align-items: center; padding-bottom: var(--s4); margin-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.summary-item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); background: var(--brand-tint); }
.summary-item p { margin: 2px 0 0; }
.summary-lines { display: grid; grid-template-columns: 1fr auto; gap: var(--s2) var(--s4); margin: 0; }
.summary-lines dt { color: var(--muted); }
.summary-lines dd { margin: 0; text-align: right; font-weight: 600; }
.summary-lines dd strong { font-size: 1.15rem; color: var(--brand); }
.summary-note { display: flex; gap: var(--s2); margin: var(--s4) 0 0; padding: var(--s3); border-radius: var(--radius-sm); background: var(--bg); font-size: 0.85rem; color: var(--muted); }
.summary-note .icon { color: var(--ok-ink); margin-top: 2px; }

/* A row of named steps: done ones ticked, the current one highlighted. */
.steps { list-style: none; padding: 0; margin: var(--s4) 0 var(--s5); display: flex; gap: var(--s2); counter-reset: step; }
.steps li {
  flex: 1; margin: 0; counter-increment: step; font-size: 0.82rem; font-weight: 600; color: var(--muted); line-height: 1.25;
  padding-top: var(--s3); position: relative;
}
.steps li::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 5px; background: var(--line); }
.steps li::before { content: counter(step) ". "; }
.steps li.done, .steps li.current { color: var(--ink); }
.steps li.done::after { background: var(--brand); }
.steps li.current::after { background: linear-gradient(90deg, var(--brand) 50%, var(--line) 50%); }
.steps li.done::before { content: "✓ "; color: var(--brand); }
.steps li.current { color: var(--brand); }

/* Two weeks of dates as big buttons. */
.date-strip { list-style: none; display: flex; gap: var(--s2); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; margin: 0 calc(-1 * var(--s2)); padding: var(--s1) var(--s2) var(--s3); }
.date-strip li { margin: 0; flex: 0 0 auto; scroll-snap-align: start; }
.day-chip {
  display: grid; justify-items: center; gap: 2px; width: 68px; padding: var(--s3) 0; border-radius: 16px; text-decoration: none;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); line-height: 1.1;
}
.day-chip small { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.day-chip strong { font: 600 1.45rem/1.1 var(--font-display); }
a.day-chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
a.day-chip[aria-current] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 8px 18px rgba(var(--brand-rgb), 0.3); }
a.day-chip[aria-current] small { color: var(--on-brand); opacity: 0.85; }
.day-chip.closed { background: repeating-linear-gradient(135deg, var(--bg) 0 6px, var(--stripe) 6px 12px); border-style: dashed; color: var(--muted); }
.other-date { margin-top: var(--s2); }
.other-date summary { cursor: pointer; font-weight: 700; color: var(--brand); min-height: 44px; display: inline-flex; align-items: center; }
.other-date-form label { margin-top: var(--s2); }
.inline-field { display: flex; flex-wrap: wrap; gap: var(--s2); }
.inline-field input { flex: 1 1 12rem; width: auto; }
.inline-field .button { margin-top: 0; flex: 0 0 auto; }

/* ---------- Client request page ---------- */
.status-card {
  display: flex; gap: var(--s4); align-items: center; padding: var(--s4) var(--s5); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.status-card p { margin: 0; }
.status-card .muted { margin-top: 2px; }
.status-icon { display: grid; place-content: center; width: 52px; height: 52px; border-radius: 16px; flex: 0 0 auto; background: var(--brand-tint); color: var(--brand); }
.tone-ok .status-icon { background: var(--ok-bg); color: var(--ok-ink); }
.tone-warn .status-icon { background: var(--warn-bg); color: var(--warn-ink); }
.tone-bad .status-icon, .message-icon.tone-bad { background: var(--bad-bg); color: var(--bad-ink); }
.request-grid { display: grid; gap: var(--s4); align-items: start; }
.request-grid .panel:first-child { margin-top: 0; }
@media (min-width: 900px) { .request-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s5); } .request-grid > .summary { position: sticky; top: 92px; } }
.bank { display: grid; gap: 0; margin: var(--s4) 0 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.bank > div { display: grid; grid-template-columns: minmax(7rem, 40%) 1fr; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.bank > div:first-child { border-top: 0; background: var(--accent-soft); }
.bank dt { color: var(--muted); font-size: 0.9rem; }
.bank dd { margin: 0; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); overflow-wrap: anywhere; }
.copy-btn {
  flex: 0 0 auto; min-height: 36px; padding: 0 var(--s3); border-radius: var(--radius-pill); cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--brand); font: 700 0.8rem var(--font);
}
.copy-btn:hover { border-color: var(--brand); background: var(--brand-tint); }
.dropzone {
  display: grid; justify-items: center; gap: var(--s1); text-align: center; margin: 0; padding: var(--s5) var(--s4);
  border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg); cursor: pointer; font-weight: 400;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--brand); background: var(--brand-tint); }
.dropzone > .icon { color: var(--brand); }
.dropzone input[type="file"] { margin-top: var(--s3); max-width: 22rem; background: var(--surface); }

/* Pages that are just a message: a card in the middle. */
.message-card {
  max-width: 560px; margin: var(--s6) auto; text-align: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px); padding: var(--s7) var(--s5); box-shadow: var(--shadow);
}
.message-card h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.message-card p { color: var(--muted); }
.message-card .button { margin-top: var(--s3); }
.message-icon { display: inline-grid; place-content: center; width: 72px; height: 72px; border-radius: 50%; margin-bottom: var(--s4); background: var(--brand-tint); color: var(--brand); box-shadow: 0 0 0 10px rgba(var(--brand-rgb), 0.05); }

/* Choosing a replacement product: radio cards with a photo. */
.choice-grid { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .choice-grid { grid-template-columns: repeat(2, 1fr); } }
.choice {
  display: grid; grid-template-columns: auto 64px 1fr; gap: var(--s3); align-items: center; margin: 0; padding: var(--s3);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 400;
}
.choice img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.choice:hover { border-color: var(--brand); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); box-shadow: var(--ring); }

/* ---------- Status colours ---------- */
.badge { display: inline-block; font-size: 0.82rem; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--brand-tint-2); color: var(--brand-dark); }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.success, .error-box, .notice, .preview-banner { border-radius: var(--radius-sm); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); }
.success { background: var(--ok-bg); color: var(--ok-ink); display: flex; gap: var(--s2); align-items: flex-start; }
.success .icon { margin-top: 3px; }
.error-box { background: var(--bad-bg); color: var(--bad-ink); font-weight: 600; }
.error-box ul { font-weight: 400; }
.notice { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); }
.notice h2 { margin-top: 0; }
.preview-banner { background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; }
.error { color: var(--bad-ink); font-weight: 600; margin: var(--s1) 0 0; font-size: 0.92rem; }
.status { font-size: 1.05rem; }

/* ---------- Motion: gentle, and none at all for people who ask for less ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, input, select, textarea, .card, .day-chip, .slot, .type-chips a, .choice { transition: background-color .2s ease, border-color .2s ease, box-shadow .25s ease, transform .25s var(--ease), translate .25s var(--ease), color .2s ease; }
  @keyframes rise { from { transform: translateY(18px); opacity: 0; } }
  @keyframes pop { from { transform: translateY(24px) scale(0.94); opacity: 0; } }
  .hero-copy > * { animation: rise .7s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; }
  .hero-copy > :nth-child(5) { animation-delay: .24s; }
  .hero-pic, .hero-badge { animation: pop .9s var(--ease) both .15s; }
  .hero-pic-2 { animation-delay: .25s; }
  .hero-pic-3, .hero-badge { animation-delay: .35s; }
  .message-card, .status-card { animation: rise .5s var(--ease) both; }
  /* Cards drift up as they scroll into view, where the browser supports it. Movement only, never
     transparency, so text is never faint while it is on screen. */
  @supports (animation-timeline: view()) {
    @keyframes drift { from { transform: translateY(28px); } }
    .cards > .card, .perks li { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}

/* ---------- Forms: every control styled the same way ---------- */
label { display: block; font-weight: 600; font-size: 0.95rem; margin: var(--s4) 0 6px; }
.optional { font-weight: 400; color: var(--muted); }
.hint { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
input, select, textarea {
  width: 100%; min-width: 0; max-width: 100%; min-height: 52px;
  padding: var(--s3) var(--s4); font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); appearance: none;
}
textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--brand); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input[aria-invalid="true"] { border-color: var(--bad-ink); background: #fffafa; }
input::placeholder, textarea::placeholder { color: #8b8090; }
/* Native date and time pickers keep their behaviour; only the frame is ours. */
input[type="date"], input[type="time"] { min-height: 52px; }
::-webkit-calendar-picker-indicator { opacity: 0.65; cursor: pointer; }
select {
  padding-right: var(--s6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%237a2e5c'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--s3) center; background-size: 20px;
}
select.short { max-width: 9rem; }
/* Fields sized to what goes in them: a number, time or date never needs the full width. */
input[type="number"] { max-width: 16rem; }
input[type="time"] { max-width: 12rem; }
input[type="date"] { max-width: 18rem; }
.input-affix input { max-width: 100%; }
input[type="file"] { padding: var(--s2); border-style: dashed; cursor: pointer; min-height: 48px; }
input[type="file"]::file-selector-button {
  min-height: 36px; margin-right: var(--s3); padding: 0 var(--s4); cursor: pointer;
  border: 0; border-radius: var(--radius-pill); background: var(--brand); color: var(--on-brand); font: 700 0.9rem var(--font);
}
input[type="file"]:hover::file-selector-button { background: var(--brand-dark); }

/* Tick boxes and radios: drawn by us, still real controls for the keyboard and screen readers. */
input[type="checkbox"], input[type="radio"] {
  width: 24px; height: 24px; min-height: 24px; flex: 0 0 auto; margin: 0; padding: 0;
  border: 2px solid var(--line-strong); background: var(--surface); cursor: pointer; display: grid; place-content: center;
}
input[type="checkbox"] { border-radius: 7px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::after, input[type="radio"]::after { content: ""; transform: scale(0); transition: transform .1s ease-in-out; }
input[type="checkbox"]::after { width: 12px; height: 7px; border: 3px solid #fff; border-top: 0; border-right: 0; rotate: -45deg; margin-top: -3px; }
input[type="radio"]::after { width: 10px; height: 10px; border-radius: 50%; background: #fff; }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--brand); border-color: var(--brand); }
input[type="checkbox"]:checked::after, input[type="radio"]:checked::after { transform: scale(1); }
.check { display: flex; align-items: center; gap: var(--s3); font-weight: 600; min-height: var(--tap); margin: var(--s2) 0; cursor: pointer; }
.check.small { font-weight: 400; font-size: 0.92rem; }
fieldset { border: 0; padding: 0; margin: var(--s4) 0 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: var(--s2); }
fieldset.contact > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
form .button { margin-top: var(--s5); }
form .actions .button { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 var(--s4); }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-top: var(--s4); min-height: 65px; }

/* Times to choose from: big, obvious pill targets, grouped by part of the day. */
.slot-group { font-weight: 700; font-size: 0.9rem; margin: var(--s4) 0 var(--s2); }
.slot-group .muted { font-weight: 500; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s2); }
.slot {
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); margin: 0; padding: 0 var(--s2); cursor: pointer; font-weight: 700; font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--line); border-radius: var(--radius-pill); background: var(--surface);
}
/* The radio stays for keyboards and screen readers; the pill itself shows the choice. */
.slot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot:hover { border-color: var(--brand); color: var(--brand); }
.slot:has(input:checked) { border-color: var(--brand); background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 14px rgba(var(--brand-rgb), 0.3); }
.slot:has(input:focus-visible) { box-shadow: var(--ring); }
.slot { position: relative; }

/* ---------- Facts list ---------- */
.facts { display: grid; grid-template-columns: minmax(6rem, max-content) 1fr; align-items: baseline; gap: 0 var(--s4); margin: 0 0 var(--s4); }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts dt, .facts dd { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
.description-panel .facts { margin: 0; }

/* ---------- The main action on a service or product page ---------- */
.action-top, .action-sticky { display: flex; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); }
.action-top { flex-direction: column; align-items: stretch; margin: var(--s5) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line); }
.action-price { margin: 0; font-size: 1.25rem; min-width: 0; }
.action-price .small { display: block; }
.action-top .action-price strong { font: 600 2.4rem/1.05 var(--font-display); letter-spacing: -0.02em; display: block; }
.action-top .action-price .small { font-size: 0.95rem; margin-top: 4px; }
.action-top .button { width: 100%; min-height: 56px; font-size: 1.05rem; }
.action-top .badge { text-align: center; padding: var(--s3); font-size: 0.95rem; }
.action-sticky {
  flex-wrap: nowrap; position: fixed; left: var(--s2); right: var(--s2); bottom: calc(var(--s2) + env(safe-area-inset-bottom, 0px)); z-index: 15;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(var(--brand-deep-rgb), 0.22);
  padding: var(--s2) var(--s2) var(--s2) var(--s4);
}
.action-sticky .action-price { font-size: 1.15rem; line-height: 1.2; font-weight: 800; }
.action-sticky .action-price .small { font-size: 0.78rem; font-weight: 500; }
.action-top .button, .action-sticky .button { margin-top: 0; }
.action-sticky .button { flex: 0 1 auto; min-width: 0; }
.action-sticky .action-price { flex: 1 1 auto; }
@media (max-width: 360px) {
  .action-sticky { gap: var(--s2); padding-left: var(--s3); }
  .action-sticky .button { padding: 0 var(--s3); font-size: 0.92rem; }
  .action-sticky .action-price { font-size: 1rem; }
}
body:has(.action-sticky) .site-footer { padding-bottom: 110px; }
@media (min-width: 700px) {
  .action-sticky { display: none; }
  body:has(.action-sticky) .site-footer { padding-bottom: var(--s5); }
}

/* ---------- Shared components: alerts, fields, switches, rows ---------- */
.plain { list-style: none; padding: 0; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.alert { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--radius-sm); margin: 0 0 var(--s4); font-weight: 500; }
.alert > .icon { margin-top: 2px; }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert-bad { background: var(--bad-bg); color: var(--bad-ink); }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert a { color: inherit; font-weight: 700; }

.button.ghost { background: transparent; color: var(--brand); border-color: transparent; box-shadow: none; }
.button.ghost:hover { background: var(--brand-tint); color: var(--brand-dark); }
.danger-text, .button.ghost.danger-text { color: var(--bad-ink); }
.button.ghost.danger-text:hover { background: var(--bad-bg); color: var(--bad-ink); }
.icon-btn {
  display: inline-grid; place-content: center; width: 40px; height: 40px; flex: 0 0 auto; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink);
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }

/* A field with an icon inside it, or a unit such as R or min. */
.input-icon, .input-affix { position: relative; display: block; }
.input-icon > .icon { position: absolute; left: 15px; top: 26px; translate: 0 -50%; color: var(--muted); pointer-events: none; z-index: 1; }
.input-icon input { padding-left: 46px; }
.input-icon:focus-within > .icon { color: var(--brand); }
.input-affix .affix { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--muted); font-weight: 700; pointer-events: none; }
.input-affix input { padding-left: 38px; }
.input-affix.suffix .affix { left: auto; right: 16px; }
.input-affix.suffix input { padding-left: var(--s4); padding-right: 56px; }
.input-icon input[type="search"] { -webkit-appearance: none; }

/* An on/off switch: still a real checkbox for keyboards and screen readers. */
.check.switch input[type="checkbox"] { width: 48px; height: 28px; min-height: 28px; border-radius: var(--radius-pill); border: 0; background: var(--line-strong); }
.check.switch input[type="checkbox"]::after { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; rotate: 0deg; margin: 0; transform: translateX(-10px); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.check.switch input[type="checkbox"]:checked { background: var(--ok-ink); }
.check.switch input[type="checkbox"]:checked::after { transform: translateX(10px); }
@media (prefers-reduced-motion: no-preference) { .check.switch input[type="checkbox"]::after { transition: transform .2s var(--ease); } }

/* Two or three choices side by side, like a toggle. */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-pill); }
.segmented label { position: relative; margin: 0; padding: 0 var(--s4); min-height: 42px; display: inline-flex; align-items: center; border-radius: var(--radius-pill); cursor: pointer; font-weight: 600; font-size: 0.93rem; color: var(--muted); }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.segmented label:has(input:focus-visible) { box-shadow: var(--ring); }
.time-off-form:has(input[value="days"]:checked) .when-hours, .time-off-form:has(input[value="hours"]:checked) .when-days { display: none; }

.grid-3 { display: grid; grid-template-columns: 1fr; gap: 0 var(--s4); }
@media (min-width: 560px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.form-section { margin: var(--s6) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line); font: 700 0.75rem/1.2 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.form-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
form .form-foot .button { margin-top: 0; }
@media (max-width: 559px) { .form-foot .button { flex: 1 1 auto; } }
.form-narrow { max-width: 760px; }
.divider { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: 0.85rem; margin: var(--s4) 0 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.empty-state {
  display: grid; justify-items: center; gap: var(--s2); text-align: center; padding: var(--s6) var(--s4); margin: 0 0 var(--s4);
  background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted);
}
.empty-state > .icon { width: 52px; height: 52px; padding: 12px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); }

.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s4); margin: 0 0 var(--s5); }
.page-title h1 { margin: 0; }
.page-title p.muted { margin: var(--s1) 0 0; }
.page-title .actions { margin: 0; align-items: center; }
/* Phones: the page's buttons share one full-width row under the title, labels on one line. */
@media (max-width: 480px) {
  .page-title > .button, .page-title > .actions { width: 100%; }
  .page-title > .actions > .button { flex: 1 1 0; white-space: nowrap; padding-left: var(--s3); padding-right: var(--s3); }
}
.page-title .eyebrow { margin-bottom: var(--s1); }
.page-title p, .lead-sm, .hint { max-width: 68ch; }
.hint .icon { vertical-align: -3px; color: var(--ok-ink); }

.avatar {
  display: grid; place-content: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%;
  background: linear-gradient(140deg, var(--brand-light), var(--brand-deep)); color: #fff; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em;
}
.pill-link {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; margin: 2px 0;
  border-radius: var(--radius-pill); background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-size: 0.85rem; font-weight: 600; text-decoration: none;
}
.pill-link:hover { border-color: var(--brand); color: var(--brand); }
.pill-link .icon { color: var(--brand); }
.pill-link.wa .icon { color: #178a4c; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: var(--s2) 0 0; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); white-space: nowrap;
  font-size: 0.8rem; font-weight: 700; background: var(--brand-tint); color: var(--brand-dark);
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tone-ok.status-pill { background: var(--ok-bg); color: var(--ok-ink); }
.tone-warn.status-pill { background: var(--warn-bg); color: var(--warn-ink); }
.tone-bad.status-pill { background: var(--bad-bg); color: var(--bad-ink); }
.tone-muted.status-pill { background: #efecee; color: #555057; }
.count { display: inline-grid; place-content: center; min-width: 28px; height: 28px; padding: 0 var(--s2); background: var(--brand); color: var(--on-brand); border-radius: var(--radius-pill); font: 700 0.85rem/1 var(--font); vertical-align: middle; }
.h-sub { font: 500 0.9rem var(--font); color: var(--muted); letter-spacing: 0; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); }
.tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border-radius: var(--radius-pill); color: var(--muted); font-weight: 600; text-decoration: none; }
.tabs a:hover { color: var(--brand); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--surface); }

/* A list row as a card: the reference link stretches over the row, contact buttons sit above it. */
.results, .queue, .unpaid { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.row-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: start; margin: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); box-shadow: var(--shadow-sm);
}
.row-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.row-link { color: inherit; text-decoration: none; }
.row-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.row-link:hover strong { color: var(--brand); text-decoration: underline; }
.row-card:focus-within { box-shadow: var(--ring); }
.row-title { margin: 0 0 2px; font-size: 1rem; overflow-wrap: anywhere; }
.row-meta { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; display: flex; align-items: flex-start; gap: 6px; }
.row-meta .icon { color: var(--brand); margin-top: 3px; }
.row-meta > span { min-width: 0; }
.row-card .contact-row { margin-top: var(--s2); }
.row-card .contact-row .muted { position: relative; z-index: 2; }
.row-check { position: relative; z-index: 2; display: grid; place-content: center; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.row-card.overdue { border-left: 4px solid #d98a00; background: var(--surface); background: color-mix(in srgb, var(--warn-bg) 40%, var(--surface)); }
/* Phones: no initials circle (its column is worth more to the text); the status goes on top and the
   deposit sits under the details, so names and contact buttons get the full width. */
@media (max-width: 559px) {
  .row-card { grid-template-columns: minmax(0, 1fr); gap: var(--s2); padding: var(--s3) var(--s4); }
  .row-card > .avatar { display: none; }
  .row-card:has(> .row-check) { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s2); }
  .row-card:has(> .row-check) > .row-check { grid-row: span 3; margin-left: calc(-1 * var(--s2)); }
  .row-card > .status-pill { order: -1; justify-self: start; }
  .row-card > .req-amount { display: flex; align-items: baseline; gap: var(--s2); text-align: left; }
  .row-card > .req-amount small { order: 0; }
}
.req-amount { margin: 0; text-align: right; display: grid; line-height: 1.15; }
.req-amount small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.req-amount strong { font: 600 1.35rem var(--font-display); color: var(--ink); }
.rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); padding: var(--s3) 0; margin: 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .contact-row { margin: 0; }
.rows form { margin: 0; }
.rows .button { margin: 0; }
.sticky-actions {
  position: sticky; top: 0; z-index: 6; padding: var(--s3) 0; margin-bottom: var(--s3);
  background: rgba(251, 248, 246, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}

/* Timelines: a line of dots down the left. */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline > li { position: relative; margin: 0; padding: 0 0 var(--s4) var(--s5); border-left: 2px solid var(--line); margin-left: 6px; }
.timeline > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline > li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline p { margin: 0; overflow-wrap: anywhere; }
.activity pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); padding: var(--s3); border-radius: var(--radius-sm); }

.confirm-card { max-width: 600px; margin: var(--s6) auto; }
.confirm-card > .message-icon { display: grid; margin: 0 auto var(--s4); }
.confirm-card > h1 { text-align: center; font-size: clamp(1.5rem, 4vw, 2rem); }
.confirm-card > p:not(.hint) { text-align: center; }
.confirm-card .actions { justify-content: center; margin-top: var(--s5); }
.confirm-card .rows { margin-bottom: var(--s3); }

/* ---------- Admin shell ---------- */
/* Phones: a slim top bar and a tab bar along the bottom, in reach of the thumb.
   Wide screens: the same menu as a sidebar down the left. */
body.admin .site-header {
  position: static; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 0; padding: var(--s2) var(--s4); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 60px;
}
body.admin .brand, body.admin .brand:hover { color: #fff; font-size: 1.15rem; }
body.admin .brand em { color: var(--accent); }
body.admin .brand-mark { background: #fff; color: var(--brand); box-shadow: none; }
.logout { margin: 0; }
.logout-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 var(--s3); cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: var(--radius-pill); background: transparent; color: #fff; font: 600 0.88rem var(--font);
}
.logout-btn:hover { background: rgba(255, 255, 255, 0.12); }
.admin-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 97%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(var(--brand-deep-rgb), 0.08);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.admin-nav a {
  display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 52px; padding: 0 2px; border-radius: 12px;
  color: var(--muted); font-size: 0.66rem; font-weight: 700; text-decoration: none; white-space: nowrap; letter-spacing: 0.01em;
}
.admin-nav a .icon { width: 30px; height: 30px; padding: 5px; border-radius: 10px; }
.admin-nav a:hover { color: var(--brand); }
.admin-nav a[aria-current="page"] { color: var(--brand); }
.admin-nav a[aria-current="page"] .icon { background: var(--brand-tint); }
body.admin.signed-in .container { padding-bottom: 120px; }
@media (max-width: 380px) {
  .admin-nav { padding-left: 2px; padding-right: 2px; }
  .admin-nav a { font-size: 0.58rem; letter-spacing: 0; min-width: 0; }
  .admin-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .logout-btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .logout-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  body.admin .site-header { padding: var(--s2) var(--s3); }
}
body.admin .container { max-width: 1120px; padding-top: var(--s5); }

@media (min-width: 960px) {
  body.admin.signed-in { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; background: linear-gradient(90deg, var(--brand-deep) 250px, var(--bg) 250px); }
  body.admin.signed-in .site-header {
    position: sticky; top: 0; height: 100vh; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: var(--s5);
    padding: var(--s5) var(--s4); background: linear-gradient(180deg, var(--brand-deep), #3f1532);
  }
  body.admin.signed-in .brand { padding: 0 var(--s2); }
  body.admin.signed-in .admin-nav {
    position: static; display: flex; flex-direction: column; gap: 4px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  body.admin.signed-in .admin-nav a {
    display: flex; justify-items: start; align-items: center; gap: var(--s3); min-height: 46px; padding: 0 var(--s3);
    color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; font-weight: 600;
  }
  body.admin.signed-in .admin-nav a .icon { width: 20px; height: 20px; padding: 0; background: none; }
  body.admin.signed-in .admin-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
  body.admin.signed-in .admin-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.14); box-shadow: inset 3px 0 0 var(--accent); }
  body.admin.signed-in .admin-nav a[aria-current="page"] .icon { background: none; color: var(--accent); }
  body.admin.signed-in .logout { margin-top: auto; }
  body.admin.signed-in .logout-btn { width: 100%; justify-content: flex-start; min-height: 46px; border-radius: 12px; border-color: rgba(255, 255, 255, 0.18); }
  body.admin.signed-in .container { padding: var(--s6) var(--s6) var(--s7); }
}

/* ---------- Admin pages ---------- */
.stats { list-style: none; padding: 0; margin: 0 0 var(--s6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); gap: var(--s4); } }
.stats li { margin: 0; }
.stat {
  display: flex; align-items: center; gap: var(--s3); height: 100%; padding: var(--s4); color: var(--ink); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.stat:hover { box-shadow: var(--shadow); translate: 0 -2px; color: var(--ink); }
.stat-icon { display: grid; place-content: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px; background: var(--brand-tint); color: var(--brand); }
.stats li:nth-child(2) .stat-icon { background: var(--warn-bg); color: var(--warn-ink); }
.stats li:nth-child(3) .stat-icon { background: var(--ok-bg); color: var(--ok-ink); }
.stats li:nth-child(4) .stat-icon { background: #e7eef9; color: #28508a; }
.stat-body { font-size: 0.88rem; color: var(--muted); font-weight: 600; line-height: 1.3; min-width: 0; }
.stat-body strong { display: block; font: 600 1.9rem/1.05 var(--font-display); color: var(--ink); }
@media (max-width: 400px) {
  .stat { flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s3); }
  .stat-icon { width: 38px; height: 38px; border-radius: 12px; }
  .stat-body .badge { display: inline-block; margin-top: 4px; }
}

.dash-grid { display: grid; gap: var(--s6); align-items: start; }
.dash-main > section + section { margin-top: var(--s6); }
.dash-main h2, .dash-side h2 { margin-top: 0; display: flex; align-items: center; gap: var(--s2); }
.dash-side { display: grid; gap: var(--s4); }
.dash-side .panel { margin: 0; }
@media (min-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr) 340px; } .dash-side { position: sticky; top: var(--s5); } }

.req-card { margin: 0; display: grid; gap: var(--s2); }
.req-card p { margin: 0; }
.req-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; margin-bottom: var(--s1); }
@media (max-width: 480px) {
  .req-head { grid-template-columns: auto minmax(0, 1fr); row-gap: var(--s1); }
  .req-head > .req-amount { grid-column: 2; display: flex; align-items: baseline; gap: var(--s2); text-align: left; }
}
.req-who p { margin: 0; }
.queue-head { font-size: 1.02rem; }
.meta-line { display: flex; gap: var(--s2); align-items: flex-start; }
.meta-line .icon { color: var(--brand); margin-top: 3px; }
.req-card .actions { margin-top: var(--s2); }
.req-card .badge { justify-self: start; }

.agenda { display: grid; gap: var(--s3); margin: 0 0 var(--s4); }
.agenda > li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s3); margin: 0; }
.agenda-time { margin: 0; padding-top: var(--s4); display: grid; align-content: start; line-height: 1.2; }
.agenda-time strong { color: var(--brand); font-size: 1.05rem; }
.agenda-time span { color: var(--muted); font-size: 0.85rem; }
.agenda .panel { margin: 0; border-left: 4px solid var(--brand); }
.agenda .panel p { margin: 0 0 var(--s1); }
.agenda-head { font-size: 1rem; }
.note { color: var(--muted); font-size: 0.9rem; background: var(--bg); padding: var(--s2) var(--s3); border-radius: var(--radius-sm); margin-top: var(--s2) !important; }

.week { margin: 0; }
.week > li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: var(--s2) 0; margin: 0; border-bottom: 1px solid var(--line); }
.week > li:last-child { border-bottom: 0; }
.week p { margin: 0; font-weight: 600; font-size: 0.93rem; }
.week ul { margin-top: 2px; color: var(--muted); }
.week-day { display: grid; justify-items: center; width: 46px; padding: 4px 0; border-radius: 12px; background: var(--bg); line-height: 1.1; }
.week-day small { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.week-day strong { font: 600 1.15rem var(--font-display); }
.week .busy .week-day { background: var(--brand-tint); color: var(--brand-dark); }
.week .busy .week-day small { color: inherit; }
.week .closed { color: var(--muted); }
.week .closed .week-day { background: repeating-linear-gradient(135deg, var(--bg) 0 5px, var(--stripe) 5px 10px); }
.stock-list li { display: grid; gap: 6px; margin: 0; padding: var(--s2) 0; }
.stock-bar { display: block; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.stock-bar span { display: block; height: 100%; background: #d98a00; border-radius: inherit; }
.stock-list .out .stock-bar { background: var(--bad-bg); }
.side-link { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--s3); font-weight: 700; text-decoration: none; min-height: 40px; }
.side-link:hover { text-decoration: underline; }

.filter-bar { display: grid; gap: var(--s2); }
.filter-bar label { margin-top: var(--s2); }
.filter-grid { display: grid; grid-template-columns: 1fr; gap: 0 var(--s3); }
@media (min-width: 560px) { .filter-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .filter-grid { grid-template-columns: repeat(4, 1fr); } }
.filter-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); }
.filter-foot .hint { margin: 0; }
.filter-foot .button { margin-top: 0; }

.detail-grid { display: grid; gap: var(--s4); align-items: start; }
.detail-grid .panel { margin: 0 0 var(--s4); }
.detail-grid h2 { display: flex; align-items: center; gap: var(--s2); }
.detail-grid h2 .icon { color: var(--brand); }
.detail-actions:not(:has(*)) { display: none; }
@media (min-width: 960px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "facts actions" "log actions"; gap: 0 var(--s5); }
  .detail-facts { grid-area: facts; }
  .detail-actions { grid-area: actions; position: sticky; top: var(--s5); }
  .detail-log { grid-area: log; }
}
.client-card .req-head { margin: 0; }
.action-card { border-top: 4px solid var(--brand); }
.action-card form .button { margin-top: var(--s3); }
.danger-zone { border-color: #f1caca; }
.danger-zone summary { display: flex; align-items: center; gap: var(--s2); color: var(--bad-ink); cursor: pointer; min-height: var(--tap); }
.danger-zone h2, .danger-zone h2 .icon { color: var(--bad-ink) !important; }
details.panel summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: var(--s2); font-weight: 600; }
.email-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3) 0; margin: 0; border-bottom: 1px solid var(--line); }
.email-list li:last-child { border-bottom: 0; }
.email-list li > span:first-child { flex: 1 1 14rem; }
.email-list form { margin: 0; }
.email-list .button { margin: 0; }

.item-list > li.panel { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s3) var(--s4); margin: 0; }
.item-list > li.panel:hover { box-shadow: var(--shadow); }
.item-list > li.panel > .icon { color: var(--muted); }
.item-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; background: var(--brand-tint); }
.empty-thumb { display: grid; place-content: center; color: var(--brand); }

.hub { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s4); }
.hub li { margin: 0; }
.hub-card {
  display: flex; align-items: center; gap: var(--s4); height: 100%; padding: var(--s5); color: var(--ink); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.hub-card:hover { box-shadow: var(--shadow); translate: 0 -2px; color: var(--ink); }
.hub-card:hover strong { color: var(--brand); }
.hub-card > .icon { margin-left: auto; color: var(--muted); }
.hub-body { display: grid; gap: 2px; }
.hub-body strong { font: 600 1.25rem var(--font-display); }
.hub-body .muted { font-size: 0.92rem; line-height: 1.4; }

.edit-grid, .split { display: grid; gap: var(--s4); align-items: start; }
.edit-grid .panel, .split .panel { margin: 0 0 var(--s4); }
.edit-grid h2, .split h2, .settings-forms h2, .form-narrow h2 { display: flex; align-items: center; gap: var(--s2); }
.edit-grid h2 > .icon, .split h2 > .icon, .settings-forms h2 > .icon, .form-narrow h2 > .icon { color: var(--brand); }
@media (min-width: 1000px) {
  .edit-grid, .split { grid-template-columns: minmax(0, 1fr) 320px; gap: 0 var(--s5); }
  .split-wide { grid-template-columns: minmax(0, 1fr) 340px; }
  .edit-side, .sticky-side { position: sticky; top: var(--s5); }
}
.status-line { margin: 0 0 var(--s2); }
.day { border-bottom: 1px solid var(--line); padding: var(--s4) 0; margin: 0; }
.day:last-of-type { border-bottom: 0; }
.day legend { font: 600 1.1rem var(--font-display); color: var(--ink); float: left; margin: 10px 0 0; }
.day > .check.switch { justify-content: flex-end; margin: 0; }
.day-times { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s3); }
/* Four times a row only when the box itself is wide enough, whatever the screen. */
.day, form.form-narrow { container-type: inline-size; }
@container (min-width: 600px) { .day-times { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
input[type="time"] { padding-left: var(--s3); padding-right: var(--s2); }
/* A closed day's times look quieter, in colours that still pass contrast. */
.day:has(input[role="switch"]:not(:checked)) .day-times label { color: var(--muted); font-weight: 500; }
.day:has(input[role="switch"]:not(:checked)) .day-times input { background: var(--bg); border-color: var(--line); }
.day .button.ghost { margin-top: var(--s2); justify-content: flex-start; text-align: left; padding-left: var(--s2); }
.switch-cell { padding-top: 0; }
@media (min-width: 560px) { .switch-cell { padding-top: 34px; } .switch-cell .check { margin: 0; } }

.settings-grid { display: grid; gap: var(--s4); align-items: start; }
.section-nav { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--s4)); padding: 0 var(--s4) var(--s1); }
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: var(--s2); min-height: 42px; padding: 0 var(--s4); border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 0.92rem; text-decoration: none;
}
.section-nav a .icon { color: var(--brand); }
.section-nav a:hover { border-color: var(--brand); color: var(--brand); }
.settings-forms > .panel { margin: 0 0 var(--s4); scroll-margin-top: var(--s5); }
@media (min-width: 1000px) {
  .settings-grid { grid-template-columns: 220px minmax(0, 1fr); gap: var(--s6); }
  .section-nav { position: sticky; top: var(--s5); flex-direction: column; margin: 0; padding: 0; overflow: visible; }
  .section-nav a { background: transparent; border-color: transparent; border-radius: 12px; }
  .section-nav a:hover { background: var(--surface); border-color: var(--line); }
}
.login-forms { display: grid; gap: var(--s5); }
.login-forms h3 { margin-top: var(--s4); }
@media (min-width: 760px) { .login-forms { grid-template-columns: 1fr 1fr; gap: var(--s6); } }
.muted-panel { background: transparent; border-style: dashed; box-shadow: none; }

.login-wrap { min-height: calc(100vh - 200px); display: grid; place-items: center; }
.login-card { width: 100%; max-width: 440px; margin: var(--s5) 0; padding: var(--s6) var(--s5); box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 var(--s1); font-size: 2rem; }
.login-card .button { margin-top: var(--s5); }
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 1.6rem; margin-bottom: var(--s4); }

/* Photos of a service or product: a grid of tiles with the controls on each photo. */
.photos { list-style: none; padding: 0; margin: var(--s4) 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: var(--s4); }
.photo-tile { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; gap: var(--s2); padding-bottom: var(--s3); }
.photo-frame { position: relative; }
.photo-frame img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--brand-tint); }
.photo-actions { position: absolute; top: var(--s2); right: var(--s2); display: flex; gap: 6px; margin: 0; }
.photo-actions .icon-btn { width: 36px; height: 36px; background: var(--surface); border-color: transparent; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.photo-alt, .photo-remove { padding: 0 var(--s3); margin: 0; }
.photo-alt label { margin-top: var(--s1); }
.photo-alt .inline-field { flex-wrap: nowrap; }
.photo-alt input { min-height: 44px; padding: var(--s2) var(--s3); }
.photo-remove { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1); }
.photo-remove .check { margin: 0; min-height: 40px; }
.photo-remove .button { margin: 0; }
.upload-form .button { margin-top: var(--s3); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin-bottom: var(--s4); }
th, td { border: 1px solid var(--line); padding: var(--s2) var(--s3); text-align: left; vertical-align: top; }
th { background: var(--brand-tint); color: var(--brand-dark); }

/* ---------- Utilities ---------- */
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.back { margin: 0 0 var(--s3); }
.back a { font-weight: 600; text-decoration: none; }
.back a:hover { text-decoration: underline; }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s4); margin: var(--s6) 0 0; }
.pager .button { box-shadow: none; }

/* Show/hide button inside a password field. The wrapper is added by /js/reveal-password.js. */
.reveal { position: relative; display: block; }
.reveal input { padding-right: var(--s7); }
.reveal-toggle {
  position: absolute; top: 0; right: 0; width: var(--s7); height: 100%;
  display: grid; place-content: center; padding: 0; cursor: pointer;
  border: 0; background: none; color: var(--muted); border-radius: var(--radius-sm);
}
.reveal-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.reveal-toggle:hover { color: var(--brand); }
.reveal-toggle:focus-visible { outline: none; box-shadow: var(--ring); color: var(--brand); }
.reveal-toggle[aria-pressed="true"] { color: var(--brand); }
.photo-alt .inline-field input { flex: 1 1 0; min-width: 0; }
.photo-frame .chip { text-transform: none; }
.login-card .brand-mark.big { display: grid; background: linear-gradient(140deg, var(--brand-light), var(--brand) 55%, var(--brand-deep)); color: #fff; box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.35); }

/* ---------- Dashboard calendar ---------- */
.calendar { margin-top: var(--s6); scroll-margin-top: var(--s5); }
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.cal-head h2 { margin: 0; display: flex; align-items: center; gap: var(--s2); }
.cal-head h2 .icon { color: var(--brand); }
.cal-nav { display: flex; align-items: center; gap: var(--s2); }
.cal-nav .button { margin: 0; }
.flip { display: inline-grid; transform: scaleX(-1); }
.cal-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin: var(--s4) 0 var(--s3); }
.cal-totals li:last-child { grid-column: 1 / -1; }
@media (min-width: 760px) { .cal-totals { grid-template-columns: repeat(5, minmax(0, 1fr)); } .cal-totals li:last-child { grid-column: auto; } }
.cal-totals li { margin: 0; padding: var(--s3); border-radius: var(--radius-sm); background: var(--bg); font-size: 0.85rem; color: var(--muted); font-weight: 600; line-height: 1.3; }
.cal-totals strong { display: block; font: 600 1.35rem/1.15 var(--font-display); color: var(--ink); }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: 0 0 var(--s4); font-size: 0.8rem; color: var(--muted); }
.cal-legend li { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

/* Colours for each kind of entry, shared by the key and the entries. */
.dot.tone-ok, .cal-item.tone-ok { --tone: var(--ok-ink); --tone-bg: var(--ok-bg); }
.dot.tone-brand { --tone: var(--brand); --tone-bg: var(--brand-tint); }
/* Text on the pale tint: the darker shade, so it reads in every design. */
.cal-item.tone-brand { --tone: var(--brand-dark); --tone-bg: var(--brand-tint); }
.dot.tone-warn, .cal-item.tone-warn { --tone: var(--warn-ink); --tone-bg: var(--warn-bg); }
/* Quiet tones from the theme's own colours, so they read on light and dark designs alike. */
.dot.tone-lapsed, .cal-item.tone-lapsed { --tone: var(--muted); --tone-bg: var(--stripe); }
.dot.tone-done, .cal-item.tone-done { --tone: var(--muted); --tone-bg: color-mix(in srgb, var(--muted) 16%, var(--surface)); }
.dot.tone-off, .cal-item.tone-off { --tone: var(--muted); --tone-bg: repeating-linear-gradient(135deg, var(--stripe) 0 5px, var(--surface) 5px 10px); }
.dot { background: var(--tone); }
/* Hollow dots (a fill with a border) keep "deadline passed" and "time off" apart from the solid "done" dot. */
.dot.tone-off, .dot.tone-lapsed { background: var(--tone-bg); border: 1px solid var(--line-strong); }
.dot.tone-lapsed { border-color: var(--muted); }
/* color-mix can't fall back through a custom property, so done entries get their own pair. */
.cal-item.tone-done { background: var(--surface); background: color-mix(in srgb, var(--muted) 16%, var(--surface)); }
.cal-item {
  display: flex; align-items: baseline; gap: 6px; min-width: 0; padding: 4px 8px; margin: 0; border-radius: 8px;
  background: var(--tone-bg); color: var(--ink); border-left: 3px solid var(--tone); font-size: 0.8rem; line-height: 1.3; text-decoration: none;
}
a.cal-item:hover { box-shadow: inset 0 0 0 1px var(--tone); color: var(--ink); }
.cal-item.tone-lapsed .cal-text { text-decoration: line-through; text-decoration-color: currentColor; }
.cal-time { font-weight: 700; color: var(--tone); font-variant-numeric: tabular-nums; flex: 0 0 auto; display: inline-flex; }
.cal-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-items { display: grid; gap: 4px; }
.cal-items li { margin: 0; min-width: 0; }
.cal-date { margin: 0 0 6px; display: flex; align-items: center; gap: var(--s2); }
.cal-closed { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cal-empty { display: flex; align-items: center; justify-content: center; gap: var(--s2); padding: var(--s5); margin: 0; color: var(--muted); text-align: center; }
.cal-empty .icon { color: var(--brand); }

/* Phones: a list of the days that have something on. */
.cal-weekdays, .cal-num, .cal-first { display: none; }
.cal-days { display: grid; gap: var(--s2); }
.cal-day { margin: 0; }
.cal-day:not(.has-items), .cal-day.other-month { display: none; }
.cal-day.has-items { padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cal-day.is-today { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.cal-long { font-weight: 700; font-size: 0.95rem; }
.cal-day .cal-item { font-size: 0.9rem; padding: 8px 10px; min-height: 44px; align-items: center; }
.cal-day .cal-text { white-space: normal; }

/* Wide screens: the month as a Monday–Sunday grid. */
@media (min-width: 760px) {
  .cal-grid { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
  .cal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--bg); border-bottom: 1px solid var(--line); }
  .cal-weekdays span { padding: var(--s2); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
  .cal-days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
  .cal-day, .cal-day:not(.has-items), .cal-day.other-month, .cal-day.has-items {
    display: block; min-height: 112px; padding: 6px; border: 0; border-radius: 0;
    border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: none; background: var(--surface);
  }
  .cal-day:nth-child(7n) { border-right: 0; }
  .cal-day.other-month { background: var(--bg); }
  .cal-day.other-month .cal-num { color: #a79ca3; }
  .cal-day.closed { background: repeating-linear-gradient(135deg, var(--surface) 0 8px, var(--stripe) 8px 16px); }
  .cal-num { display: inline-grid; place-content: center; min-width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 0.88rem; }
  .cal-day.is-today .cal-num { background: var(--brand); color: var(--on-brand); }
  .cal-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cal-closed { margin-left: auto; font-size: 0.62rem; }
  .cal-day .cal-item { font-size: 0.76rem; padding: 3px 6px; min-height: 0; }
  .cal-day .cal-text { white-space: nowrap; }
  .cal-service, .cal-full { display: none; }
  .cal-first { display: inline; }
  .cal-empty { border-top: 1px solid var(--line); }
}
@media (min-width: 1200px) { .cal-day, .cal-day.has-items { min-height: 128px; } }

/* ---------- Sent emails ---------- */
.email-frame { display: block; width: 100%; height: 820px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f7eef3; }
@media (max-width: 559px) { .email-frame { height: 600px; } }
.email-text { margin-top: var(--s4); }
.email-text summary { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); cursor: pointer; font-weight: 600; color: var(--brand); }
.email-text pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.88rem/1.55 ui-monospace, "DejaVu Sans Mono", monospace; background: var(--bg); padding: var(--s4); border-radius: var(--radius-sm); margin: 0; }
.email-subject { font-size: clamp(1.4rem, 3.5vw, 2rem); overflow-wrap: anywhere; }
.mail-avatar { background: var(--brand-tint); color: var(--brand); }
.policy p { margin: 0 0 var(--s1); }
.policy p:last-child { margin: 0; }
.current-time p { margin: 0; }
.strip-note { margin: 0 0 var(--s2); display: flex; gap: 6px; align-items: flex-start; } .strip-note .icon { margin-top: 3px; color: var(--brand); }
.day-chip.closed small { white-space: nowrap; letter-spacing: 0.02em; font-size: 0.64rem; }

/* ---------- Developer dashboard ---------- */
/* Chart colours, checked for colour-blind safety (dataviz validate_palette.js on white):
   s1 plum and s2 gold pass every check; quiet grey + critical red is the emphasis pair for
   "sent vs failed" (the story is the failures), with a legend and a table for the pale grey. */
.tone-s1 { --mark: var(--brand-soft); }
.tone-s2 { --mark: #c28a2c; }
.tone-quiet { --mark: #b8adb3; }
.tone-critical { --mark: #a4161a; }
.dev-stats .stat { align-items: flex-start; }
.stat-sub, .delta { display: block; font-size: 0.8rem; font-weight: 600; margin-top: 2px; }
.stat-sub { color: var(--muted); }
.delta-good { color: var(--ok-ink); }
.delta-bad { color: var(--bad-ink); }
.delta-flat { color: var(--muted); }
.dev-grid { display: grid; gap: var(--s4); margin-bottom: var(--s4); } /* panels in a row share one height */
.dev-grid > .panel { margin: 0; min-width: 0; }
.dev-grid h2 { display: flex; align-items: center; gap: var(--s2); font-size: 1.2rem; }
.dev-grid h2 .icon { color: var(--brand); }
@media (min-width: 1000px) { .dev-grid { grid-template-columns: 1fr 1fr; } }

.col-chart { margin: 0; }
.col-chart .plot { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 170px auto; column-gap: var(--s2); }
.y-ticks { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1; }
/* Recessive hairline grid at 0, half and the top: solid, one shade off the surface. */
.cols {
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); align-items: end; height: 100%;
  border-top: 1px solid var(--line); border-bottom: 1px solid #d9cfd4;
  background: linear-gradient(to bottom, transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px), var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.col { height: 100%; display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; padding: 0 1px; cursor: default; }
.col:hover { background: rgba(var(--brand-rgb), 0.05); }
.seg { display: block; width: min(24px, 100%); background: var(--mark); flex: 0 0 auto; }
.seg:last-child { border-radius: 4px 4px 0 0; }
.x-ticks { grid-column: 2; display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: var(--s3) 0 0; font-size: 0.85rem; color: var(--muted); }
.chart-legend li { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.chart-legend strong { color: var(--ink); }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--mark); }
.chart-table { margin-top: var(--s3); }
.chart-table summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--brand); min-height: 40px; display: flex; align-items: center; }
.chart-table table { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.chart-table td { text-align: right; }
.hbars li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 3ch; gap: var(--s3); align-items: center; margin: var(--s2) 0; font-size: 0.88rem; }
.hbar-label { color: var(--muted); overflow-wrap: anywhere; }
.hbar-track { height: 12px; }
.hbar { display: block; height: 100%; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--mark); }
.hbars strong { text-align: right; font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Developer lists: error cards and activity rows. Times sit in one right-hand column. */
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); margin-bottom: var(--s3); }
.panel-head h2 { margin: 0; }
.dev-time { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dev-errors { display: grid; gap: var(--s3); }
.dev-error { margin: 0; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.dev-errors-page .dev-error { box-shadow: var(--shadow-sm); padding: var(--s4) var(--s5); }
.dev-error-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; }
.dev-error-icon { display: grid; place-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); }
.dev-error-icon.tone-bad { background: var(--bad-bg); color: var(--bad-ink); }
.dev-error-icon.tone-warn { background: var(--warn-bg); color: var(--warn-ink); }
.dev-error-title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); min-width: 0; }
.dev-error-title code { font-weight: 700; }
.dev-error-message { margin: var(--s2) 0 0 44px; overflow-wrap: anywhere; }
.dev-meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: var(--s2) 0 0 44px; font-size: 0.85rem; color: var(--muted); }
.dev-meta li { margin: 0; display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.dev-meta .icon { color: var(--brand); flex: 0 0 auto; }
.dev-id .copy-btn { margin-left: var(--s1); min-height: 32px; }
.dev-stack { margin: var(--s2) 0 0 44px; }
.dev-stack summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--brand); }
.dev-stack pre { margin: var(--s2) 0 0; max-height: 320px; overflow: auto; white-space: pre; font-size: 0.78rem; line-height: 1.5; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--s3); }
.dev-activities li { margin: 0; }
.dev-activity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: var(--s3); align-items: center; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.dev-activity:last-child { border-bottom: 0; }
.dev-activity-icon { display: grid; place-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); }
.dev-activity-what { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 559px) {
  .dev-error-head { grid-template-columns: auto minmax(0, 1fr); }
  .dev-error-head .dev-time { grid-column: 2; }
  .dev-error-message, .dev-meta, .dev-stack { margin-left: 0; }
  .dev-activity { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 2px; }
  .dev-activity .dev-time { grid-column: 2 / -1; }
}
/* Names (events, actions) never split mid-word; paths and IDs may break anywhere. */
code.name { overflow-wrap: normal; word-break: keep-all; white-space: nowrap; }
code.path { overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.dev-stack-sections { display: grid; gap: var(--s4); margin-bottom: var(--s4); }
.dev-stack-sections > .panel { margin: 0; min-width: 0; }
.dev-stack-sections h2 { display: flex; align-items: center; gap: var(--s2); font-size: 1.2rem; }
.dev-stack-sections h2 .icon { color: var(--brand); }
@media (min-width: 900px) {
  .facts-2col { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); column-gap: var(--s5); }
}

/* Web volume capacity: the fill carries the severity, the track is a lighter step of the same hue. */
.volume { padding: var(--s4); margin-bottom: var(--s4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.volume-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.volume-title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.volume-title .icon { color: var(--brand); }
.meter { height: 12px; border-radius: 999px; overflow: hidden; background: var(--track); }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--fill); }
.meter-ok { --fill: var(--brand-soft); --track: var(--brand-tint-2); }
.meter-warn { --fill: #c28a2c; --track: #f6e8cf; }
.meter-bad { --fill: #a4161a; --track: #f6d6d6; }
.volume-figures { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s3); margin: var(--s2) 0 0; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.volume .hint { margin: var(--s2) 0 0; display: flex; gap: 6px; }
.pill-link-status { text-decoration: none; min-height: 40px; }

/* Server, database and storage facts: one card each, every card the same height (grid-auto-rows:
   1fr sizes every row to the tallest card), content aligned to the top. */
.fact-cards { display: grid; grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: var(--s3); }
@media (min-width: 600px) { .fact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .fact-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fact-card { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: var(--s3); align-content: start;
  padding: var(--s4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.fact-icon { grid-row: 1 / span 3; display: grid; place-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); }
.fact-icon.tone-ok { background: var(--ok-bg); color: var(--ok-ink); }
.fact-icon.tone-warn { background: var(--warn-bg); color: var(--warn-ink); }
.fact-icon.tone-bad { background: var(--bad-bg); color: var(--bad-ink); }
.fact-label { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.fact-value { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.fact-sub { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.space-photo { display: block; width: 100%; border-radius: var(--radius); margin-bottom: var(--s3); }

/* ---------- Terms and conditions, privacy policy ---------- */
.footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal { max-width: 46rem; }
.legal-contact { margin-top: 0; padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.legal .description h2 { font-size: 1.2rem; margin: var(--s5) 0 var(--s2); }

/* ---------- Admin guide (How renting works) ---------- */
.guide { max-width: 46rem; }
.guide h1 { margin-top: 0; }
.guide h2 { font-size: 1.2rem; margin: var(--s5) 0 var(--s2); }
.guide blockquote { margin: var(--s3) 0; padding: var(--s3); border-left: 4px solid var(--line); background: var(--bg, transparent); }
.guide-flow { margin: var(--s4) 0; text-align: center; }
.guide-flow svg { width: 100%; max-width: 30rem; height: auto; }
.guide-flow figcaption { font-size: 0.9rem; color: var(--muted, inherit); margin-top: var(--s2); }

/* An uploaded logo fills the brand mark (services/brand.js). */
.brand-mark img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

/* Settings → Design → Preview: shown only to the browser that is previewing a theme. */
.theme-preview { margin: 0; padding: var(--s2) var(--s4); text-align: center; font: 600 0.88rem/1.4 system-ui, sans-serif; background: #fdecc8; color: #4a3200; }
.theme-preview a { color: #4a3200; font-weight: 700; }
/* A demo salon (DEMO_MODE): who made it, a design menu and the owner's side. Neutral, so it never looks like the salon's own design. */
/* Pinned to the top while visitors explore; the salon's own sticky header sits just below it.
   Drawn in the current design's own colours, fonts and shapes, so it belongs to whichever design is showing. */
:root { --demo-h: 0px; }
:root:has(.demo-bar) { --demo-h: 60px; }
/* In-page links (#services, #apply) land below the sticky bars, not under them. */
html { scroll-padding-top: calc(var(--demo-h) + 84px); }
/* Signed-in admin on a wide screen: the header is a side column, so nothing covers the top. */
@media (min-width: 960px) { html:has(body.admin.signed-in) { scroll-padding-top: 0; } }
.demo-bar {
  position: sticky; top: 0; z-index: 25; height: var(--demo-h); display: flex; align-items: center;
  padding: 0 max(var(--s4), env(safe-area-inset-left, 0px)); background: var(--brand-deep); color: var(--brand-on-deep);
  border-bottom: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 6px 18px rgba(var(--brand-deep-rgb), .22);
  font: 500 0.86rem/1.3 var(--font);
}
.demo-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); width: 100%; max-width: 1240px; margin: 0 auto; }
.demo-what { display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0; }
.demo-what > .wide-only { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .9; }
.demo-badge {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px 0 12px; border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); font-weight: 700; font-size: 0.82rem;
}
.demo-badge::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.demo-salon { display: flex; margin: 0; }
/* The salon menu sits inside the badge: no box of its own, the accent text and a small arrow. */
.demo-bar .demo-salon select {
  min-width: 0; min-height: 40px; padding: 0 28px 0 4px; border: 0; border-radius: var(--radius-pill); background-color: transparent;
  color: var(--brand-on-deep); font-weight: 700; font-size: 0.86rem; background-position: right 8px center; background-size: 16px;
}
.demo-bar .demo-salon select:hover { background-color: rgba(255, 255, 255, .08); }
.demo-bar .demo-salon select:focus { box-shadow: none; }
.demo-tools { display: flex; align-items: center; gap: var(--s2); flex: none; }
.demo-bar form { display: flex; align-items: center; gap: 10px; margin: 0; }
.demo-label { margin: 0; font-weight: 600; }
.demo-bar select {
  width: auto; min-width: 11.5rem; min-height: 44px; padding: 10px 40px 10px 12px; cursor: pointer;
  font: 600 0.88rem/1.2 var(--font); color: var(--brand-on-deep); background-color: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius-sm); box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffffff'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5z'/%3E%3C/svg%3E");
  background-position: right 12px center; background-size: 18px;
}
.demo-bar select:hover { border-color: var(--accent); background-color: rgba(255, 255, 255, .13); }
.demo-bar select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
/* The browser's own list (no customizable select): readable dark-on-light on every system. */
.demo-bar option { color: #17120a; background: #fff; }
.demo-swatch { display: none; }
/* Browsers with customizable selects get our own list, in the design's card colours: a colour dot per design, a tick on the current one. */
@supports (appearance: base-select) {
  .demo-bar select, .demo-bar select::picker(select) { appearance: base-select; }
  .demo-bar select { background-image: none; display: flex; align-items: center; gap: 10px; padding-right: 12px; }
  .demo-bar select selectedcontent { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .demo-bar select::picker-icon { color: var(--accent); transition: rotate .2s ease; }
  .demo-bar select:open::picker-icon { rotate: 180deg; }
  .demo-bar select::picker(select) {
    margin-top: 8px; padding: 6px; min-width: anchor-size(width); border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink); box-shadow: 0 16px 36px rgba(var(--brand-deep-rgb), .28);
  }
  .demo-bar option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; border-radius: calc(var(--radius-sm) * .7); color: var(--ink); background: transparent; font: 500 0.92rem/1.2 var(--font); cursor: pointer; }
  .demo-bar option:hover, .demo-bar option:focus-visible { background: var(--brand-tint); outline: none; }
  .demo-bar option:checked { font-weight: 700; }
  .demo-bar option::checkmark { order: 1; margin-left: auto; color: var(--brand); }
  .demo-swatch { display: inline-block; flex: none; box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
  /* In the closed menu the ring is a border, inside the dot's own box, so the clipped menu text never cuts it. */
  .demo-bar selectedcontent .demo-swatch { border: 2px solid rgba(255, 255, 255, .8); }
  .demo-bar .demo-salon select { padding-right: 6px; }
  .demo-bar .demo-salon select::picker(select) { min-width: 9rem; }
}
.demo-owner {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--brand-deep); font-weight: 700; text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); transition: filter .2s ease, translate .2s ease;
}
.demo-owner:hover { filter: brightness(1.08); translate: 0 -1px; }
.demo-owner-icon { display: inline-flex; }
.demo-owner .icon { width: 18px; height: 18px; }
.demo-bar :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.demo-owner:focus-visible { outline-color: var(--brand-on-deep); }
@media (prefers-reduced-motion: reduce) { .demo-owner { transition: none; } .demo-owner:hover { translate: none; } }
/* Things that stick below the header move down by the bar's height. */
body:has(.demo-bar) .site-header { top: var(--demo-h); }
/* The owner's side: the bar spans the wide-screen grid, and the sidebar sits below it. */
.demo-bar { grid-column: 1 / -1; }
@media (min-width: 960px) { body.admin.signed-in:has(.demo-bar) .site-header { height: calc(100vh - var(--demo-h)); } }
body:has(.demo-bar) .buybox, body:has(.demo-bar) .checkout > .summary, body:has(.demo-bar) .request-grid > .summary { top: calc(92px + var(--demo-h)); }
@media (max-width: 520px) {
  :root:has(.demo-bar) { --demo-h: 56px; }
  .demo-bar { padding: 0 var(--s3); }
  .demo-inner { gap: var(--s2); }
  .demo-label, .demo-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .demo-badge { padding-left: 10px; }
  .demo-tools select { min-width: 0; max-width: 46vw; padding-left: 10px; }
  /* Phones: the owner's side is a round icon button (its name is still read out). */
  .demo-owner { width: 44px; padding: 0; justify-content: center; }
  .demo-owner-text { display: none; }
}
@media (max-width: 400px) {
  .demo-what { flex: none; }
  .demo-tools, .demo-tools form { flex: 1; min-width: 0; justify-content: flex-end; }
  .demo-tools select { flex: 1; width: 100%; max-width: none; }
}
/* A demo's guide on the client's page: what would happen by email, step by step (partials/demo-guide.ejs). */
.demo-guide { margin: 0 0 var(--s5); padding: var(--s4) var(--s5); border-radius: var(--radius); background: var(--brand-tint); border: 1px solid rgba(var(--brand-rgb), .18); }
.demo-guide-head { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.demo-guide-head h2 { margin: 0; font-size: 1.15rem; }
.demo-guide-badge { padding: 3px 10px; border-radius: var(--radius-pill); background: var(--brand-deep); color: var(--brand-on-deep); font-size: .78rem; font-weight: 700; }
.demo-guide-lead { margin: var(--s2) 0 var(--s3); color: var(--ink); }
.demo-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); counter-reset: demo; }
.demo-steps li { counter-increment: demo; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: var(--s3); row-gap: 4px; align-items: start; color: var(--muted); }
.demo-steps li::before { content: counter(demo); grid-row: span 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(var(--brand-rgb), .3); color: var(--brand); font-weight: 700; background: var(--surface); }
.demo-steps li.now { color: var(--ink); }
.demo-steps li.now::before { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.demo-steps li.done::before { content: "✓"; background: var(--ok-bg); border-color: var(--ok-ink); color: var(--ok-ink); }
.demo-steps li strong { color: var(--ink); }
.demo-steps form { margin: 6px 0 0; }
.demo-steps .button { justify-self: start; margin-top: 6px; }
/* The client's inbox in a demo (demo-emails.ejs): the list beside the open email. */
.demo-inbox { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
.demo-inbox-list { display: grid; gap: var(--s2); align-content: start; }
.demo-inbox-list a { display: grid; gap: 2px; padding: var(--s3); border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.demo-inbox-list a span { color: var(--muted); font-size: .85rem; }
.demo-inbox-list a[aria-current] { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.demo-inbox-mail { width: 100%; min-height: 720px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
@media (min-width: 900px) { .demo-inbox { grid-template-columns: 300px minmax(0, 1fr); } }

/* The design picker: one card per theme, its name set in its own fonts. */
.theme-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: var(--s3) 0; }
.theme-card { display: grid; gap: var(--s2); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: var(--s3); background: var(--surface); cursor: pointer; }
.theme-card:has(input:checked) { border-color: var(--brand); box-shadow: var(--ring); }
.theme-card input { width: auto; min-height: 0; margin: 0; appearance: auto; }
.theme-swatch { height: 72px; border-radius: 6px; display: grid; place-content: center; font-size: 1.6rem; }
.theme-card p { margin: 0; font-size: 0.85rem; color: var(--muted); }
