/* 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;
  --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(46, 15, 36, 0.05), 0 2px 8px rgba(46, 15, 36, 0.04);
  --shadow: 0 12px 32px rgba(46, 15, 36, 0.12), 0 2px 8px rgba(46, 15, 36, 0.06);
  --shadow-lg: 0 24px 60px rgba(46, 15, 36, 0.22);
  --ring: 0 0 0 4px rgba(122, 46, 92, 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; 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: rgba(251, 248, 246, 0.85); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(122, 46, 92, 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, #a8477f, var(--brand) 55%, var(--brand-deep)); color: #fff; font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(122, 46, 92, 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: #fff !important; margin-left: var(--s2); padding: 0 var(--s4) !important; box-shadow: 0 4px 14px rgba(122, 46, 92, 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: #d9c5d1; 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: #fff; font: 700 1rem/1 var(--font); letter-spacing: 0.005em; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 16px rgba(122, 46, 92, 0.28);
}
.button:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 10px 22px rgba(122, 46, 92, 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(122, 46, 92, 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: #fff; 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(168, 71, 127, 0.55), transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, #52183f 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: #f7c9df; }
.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(247, 201, 223, 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%, #a8477f, 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: #fff; box-shadow: 0 8px 18px rgba(122, 46, 92, 0.3); }
a.day-chip[aria-current] small { color: rgba(255, 255, 255, 0.85); }
.day-chip.closed { background: repeating-linear-gradient(135deg, var(--bg) 0 6px, #f3ecee 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(122, 46, 92, 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: #fff; 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: #fff; 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: #fff; box-shadow: 0 6px 14px rgba(122, 46, 92, 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: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(46, 15, 36, 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, #a8477f, 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: #fff; 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: #fff; }

/* 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: #fffbf4; }
/* 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: rgba(255, 255, 255, 0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(46, 15, 36, 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); }
.week .closed { color: var(--muted); }
.week .closed .week-day { background: repeating-linear-gradient(135deg, var(--bg) 0 5px, #f1eaec 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: rgba(255, 255, 255, 0.94); 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, #a8477f, var(--brand) 55%, var(--brand-deep)); color: #fff; box-shadow: 0 6px 16px rgba(122, 46, 92, 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, .cal-item.tone-brand { --tone: var(--brand); --tone-bg: var(--brand-tint); }
.dot.tone-warn, .cal-item.tone-warn { --tone: #9a5b00; --tone-bg: var(--warn-bg); }
.dot.tone-lapsed, .cal-item.tone-lapsed { --tone: #6b6470; --tone-bg: #f3f0f2; }
.dot.tone-done, .cal-item.tone-done { --tone: #555057; --tone-bg: #ebe8ea; }
.dot.tone-off, .cal-item.tone-off { --tone: #555057; --tone-bg: repeating-linear-gradient(135deg, #f1edef 0 5px, #e8e2e5 5px 10px); }
.dot { background: var(--tone); }
.dot.tone-off { background: var(--tone-bg); border: 1px solid #cfc6cb; }
.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: rgba(0, 0, 0, 0.35); }
.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, #faf6f7 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: #fff; }
  .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; }
