/* Hallmark · shape: app screen · genre: modern-minimal · theme: brand · redesign: full (app screens, layout recomposed inside each shell, content and wiring kept)
 * paper: #FAFBFC · accent: #23445C · display: Plus Jakarta Sans · body: Plus Jakarta Sans
 * nav: kept (top bar per layout) · signature: the live queue board (people, wait, processed) · states: empty, flash, validation, disabled
 * axes: light/geometric-sans/chromatic-blue · posture: settled · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 · weakest: V, Bootstrap 4 stays for its JS (modals, switches, AJAX), so the system is a token layer over its classes rather than new markup primitives */
/* Hallmark · answered F4 · btn-secondary is an outlined surface, not a filled recipe; btn-danger fills only inside confirm dialogs */
/* Hallmark · answered F24 · dropdowns float over table rows on paper, so they keep both edge and lift */
/* Queue design tokens: the only place a colour, face, radius or duration is declared. */
:root {
  /* Brand palette (mandatory) */
  --brand-deep: #23445C;   /* Medical Navy: brand, headings, primary actions */
  --brand-soft: #527D98;   /* Steel Blue: secondary accents */
  --brand-sky: #A8D5E8;    /* Soft Sky: highlights, interactive states */
  --brand-paper: #FAFBFC;  /* Background */

  /* Roles, derived from the palette */
  --color-paper: var(--brand-paper);
  --color-paper-2: #EAF4F8;                 /* Surface tint: hero band, footer-adjacent bands, table head */
  --color-surface: #FFFFFF;                 /* raised panel on paper */
  --color-ink: #152B3B;                     /* body text, 14:1 on paper */
  --color-ink-2: var(--brand-deep);         /* headings, 9.9:1 on paper */
  --color-muted: #4E6577;                   /* supporting text, 5.9:1 on paper */
  --color-rule: rgba(35, 68, 92, 0.14);    /* hairlines */
  --color-rule-strong: #7F94A3;             /* input borders, 3:1 on paper */
  --color-accent: var(--brand-deep);
  --color-accent-hover: #1B3749;
  --color-accent-press: #142A39;
  --color-accent-ink: #FFFFFF;
  --color-accent-2: var(--brand-soft);
  --color-tint: rgba(168, 213, 232, 0.35);  /* hover / selected wash */
  --color-tint-strong: rgba(168, 213, 232, 0.7);
  --color-focus: var(--brand-deep);
  --color-focus-halo: rgba(82, 125, 152, 0.45);

  /* Status: functional only, kept muted so the palette leads */
  --color-error: #A23B32;
  --color-error-tint: rgba(162, 59, 50, 0.09);
  --color-success: #2E6A55;
  --color-success-tint: rgba(46, 106, 85, 0.1);
  --color-success-edge: rgba(46, 106, 85, 0.25);
  --color-error-edge: rgba(162, 59, 50, 0.32);
  --color-error-hover: #8C3129;
  --color-on-error: #FDFDFA;
  --color-accent-2-edge: rgba(82, 125, 152, 0.5);
  --color-scrim: rgba(21, 43, 59, 0.42);
  --color-row-hover: rgba(168, 213, 232, 0.2);
  --color-press: rgba(35, 68, 92, 0.08);
  --color-on-ink: #FFFFFF;
  --color-on-ink-muted: rgba(255, 255, 255, 0.72);
  --color-on-ink-rule: rgba(168, 213, 232, 0.2);

  /* Type */
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-body);
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.2rem;
  --text-xl: 1.44rem; --text-2xl: 1.728rem; --text-3xl: 2.074rem; --text-4xl: 2.488rem;
  --text-figure: clamp(2.75rem, 6vw, 4rem);
  --tracking-display: -0.022em;

  /* Space, shape, depth, motion */
  --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px;
  --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px;
  --radius-control: 8px; --radius-panel: 12px; --radius-dialog: 14px; --radius-pill: 999px;
  --shadow-panel: 0 1px 2px rgba(21, 43, 59, 0.05);
  --shadow-pop: 0 12px 32px -8px rgba(21, 43, 59, 0.18), 0 2px 6px rgba(21, 43, 59, 0.06);
  --shadow-dialog: 0 24px 56px -12px rgba(21, 43, 59, 0.28);
  --control-h: 40px; --control-h-sm: 34px;
  --container: 1200px; --container-narrow: 560px; --gutter: 32px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms; --dur-short: 220ms;
  --nav-h: 64px;
}
@media (max-width: 60rem) { :root { --gutter: 24px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; } }
/* ---------- Footer ---------- */
/* Light band after frametile.com: brand + links row, then a hairline bar with legal and credits. */
.site-footer { width: 100%; margin-top: var(--space-2xl); padding: var(--space-xl) 0 var(--space-lg); background: var(--color-paper); border-top: 1px solid var(--color-rule); color: var(--color-muted); font-size: var(--text-sm); }
/* Auth pages: the split panel runs full height, so the footer sits flush under it. */
.auth-main + .site-footer { margin-top: 0; }
.site-footer__inner { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--color-muted); text-decoration: none; }
.site-footer a:hover { color: var(--color-ink-2); text-decoration: underline; }
.site-footer a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 2px; }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md) var(--space-xl); }
.site-footer .site-footer__brand { display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--color-ink-2); font-size: var(--text-md); font-weight: 700; }
.site-footer .site-footer__brand:hover { color: var(--color-ink-2); text-decoration: none; }
.site-footer__brand img { width: 28px; height: 28px; display: block; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 24px; }
.site-footer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-xl); margin-top: var(--space-lg); padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); font-size: var(--text-xs); }
.site-footer__credits { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin: 0; padding: 0; list-style: none; min-width: 0; }
.site-footer__credits li { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs); min-width: 0; max-width: 100%; }
.site-footer__credits a { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 24px; color: var(--color-ink-2); font-weight: 600; }
.site-footer__credits img { height: 16px; width: auto; display: block; }
/* websiteswatch logo is a wide mark with white text (invisible on light paper): show only its icon. */
.site-footer__credits img.site-footer__crop { width: 18px; -o-object-fit: cover; object-fit: cover; -o-object-position: left center; object-position: left center; }
.site-footer__social { display: flex; gap: var(--space-2xs); }
.site-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-control); color: var(--color-muted); }
.site-footer__social a:hover { color: var(--color-ink-2); background: var(--color-tint); text-decoration: none; }
/* Screen-specific styles: public screens. Tokens only (tokens.css); shared components stay in theme.css.
 * This file is imported before theme.css's own rules, so selectors here are doubled up (.a.b) or scoped to beat them. */
/* ---------- Public queue board (/companies/{slug}) ---------- */
.board-head { margin-bottom: var(--space-lg); }
.board-desc { max-width: 60ch; margin: var(--space-xs) 0 0; color: var(--color-ink); }
.board-meta { display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); margin: var(--space-sm) 0 0; padding: 0; list-style: none; font-size: var(--text-sm); color: var(--color-muted); }
.board-meta li { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 36px; }
.board-meta .fa-solid, .board-meta .fa-regular { color: var(--color-accent-2); }
.board-meta a { display: inline-flex; align-items: center; min-height: 36px; font-weight: 600; }
.board-grid { display: grid; gap: var(--space-lg); align-items: stretch; }
.board-grid > .stat-board { margin-bottom: 0; }
.board-grid > .stat-board .stat { display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 56rem) { .board-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.join-steps { display: grid; gap: var(--space-sm); margin: 0 0 var(--space-lg); padding: 0; list-style: none; counter-reset: join; }
.join-steps li { position: relative; padding-left: 36px; counter-increment: join; color: var(--color-ink); }
.join-steps li::before { content: counter(join); position: absolute; left: 0; top: -1px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--color-tint-strong); color: var(--color-ink-2); font-size: var(--text-xs); font-weight: 700; }
/* ---------- Public flow: join the queue and book an appointment ---------- */
.page.flow-wrap { width: 100%; max-width: 680px; margin-inline: auto; padding-inline: var(--gutter); }
@media (max-width: 40rem) { .page.flow-wrap { padding-inline: var(--space-md); padding-top: var(--space-lg); } }
.flow-progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-xs); margin: 0 0 var(--space-lg); padding: 0; list-style: none; }
.flow-progress li { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.flow-progress li::before { content: ""; height: 4px; border-radius: var(--radius-pill); background: var(--color-rule); }
.flow-progress li.is-done::before { background: var(--color-accent-2); }
.flow-progress li.is-current::before { background: var(--color-accent); }
.flow-progress li.is-current { color: var(--color-ink-2); }
.flow-head { margin-bottom: var(--space-lg); }
.flow-head .flow-step { margin: 0 0 var(--space-xs); }
.flow-head .page-title { font-size: var(--text-2xl); }
@media (max-width: 40rem) { .flow-head .page-title { font-size: var(--text-xl); } }
/* Service list: one tap target per row */
.choice-list { display: grid; background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); box-shadow: var(--shadow-panel); overflow: hidden; }
.choice-list .choice { flex-direction: row; align-items: center; justify-content: space-between; min-height: 60px; padding: var(--space-sm) var(--space-md); border: 0; border-bottom: 1px solid var(--color-rule); border-radius: 0; font-size: var(--text-md); }
.choice-list .choice:last-child { border-bottom: 0; }
.choice-list .choice::after { content: ""; flex: none; width: 8px; height: 8px; border-top: 2px solid var(--color-muted); border-right: 2px solid var(--color-muted); transform: rotate(45deg); transition: transform var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.choice-list .choice:hover::after { transform: translateX(2px) rotate(45deg); border-color: var(--color-ink-2); }
/* Day and time tiles */
.choice-grid.choice-grid--days { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.choice-grid.choice-grid--times { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.choice.choice--time { align-items: center; min-height: 56px; font-variant-numeric: tabular-nums; text-align: center; }
@media (max-width: 40rem) { .choice-grid.choice-grid--days, .choice-grid.choice-grid--times { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 22rem) { .choice-grid.choice-grid--days { grid-template-columns: minmax(0, 1fr); } }
.flow-foot { margin-top: var(--space-lg); }
.flow-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm) var(--space-lg); margin: 0 0 var(--space-lg); padding: var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-control); text-align: left; }
.flow-summary > div { min-width: 0; }
.flow-summary dt { margin: 0; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.flow-summary dd { margin: 0; font-weight: 600; color: var(--color-ink-2); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.flow-summary--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flow-summary--3 dd { font-size: var(--text-lg); }
.flow-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.flow-actions--start { justify-content: flex-start; }
.flow-actions .btn { min-height: 44px; }
@media (max-width: 40rem) {
  .flow-actions { flex-direction: column-reverse; align-items: stretch; }
  .flow-actions--start { flex-direction: column; }
  .flow-actions .btn { width: 100%; }
  .flow-summary--3 dd { font-size: var(--text-md); }
}
.flow-panel .illo { margin-bottom: var(--space-sm); }
.flow-panel .page-title { margin-bottom: var(--space-2xs); }
.flow-note { margin: var(--space-md) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.flow-next { display: grid; gap: var(--space-xs); margin: 0 0 var(--space-lg); padding: 0; list-style: none; text-align: left; }
.flow-next li { position: relative; padding-left: 28px; color: var(--color-ink); }
.flow-next li::before { content: ""; position: absolute; left: 0; top: 0.4em; width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent-2); }
.flow-center { text-align: center; }
.flow-center .page-sub { margin-inline: auto; max-width: 44ch; }
.flow-center .flow-actions { justify-content: center; }
.help-dock { display: flex; justify-content: center; margin-top: var(--space-xl); }
.help-dock .help-chat { float: none; }
.help-dock .help-chat .popuptext { right: 50%; transform: translateX(50%); }
@media (scripting: enabled) { .help-dock .help-chat .popuptext:not(.show) { transform: translateX(50%) translateY(4px); } }
/* ---------- Privacy: a document, not a card ---------- */
.page.legal-wrap { width: 100%; max-width: 880px; margin-inline: auto; padding-inline: var(--gutter); }
@media (max-width: 40rem) { .page.legal-wrap { padding-inline: var(--space-md); } }
.legal-lead { max-width: 56ch; margin: var(--space-xs) 0 0; color: var(--color-muted); }
.legal-section { display: grid; gap: var(--space-xs) var(--space-xl); padding-block: var(--space-lg); border-top: 1px solid var(--color-rule); }
.legal-section:last-of-type { border-bottom: 1px solid var(--color-rule); }
.legal-section h2 { margin: 0; font-size: var(--text-md); line-height: 1.4; }
.legal-section p { margin: 0; max-width: 62ch; line-height: 1.7; }
@media (min-width: 48rem) { .legal-section { grid-template-columns: 13rem minmax(0, 1fr); } }
/* ---------- Blog: index and posts ---------- */
.page.blog-wrap { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }
@media (max-width: 40rem) { .page.blog-wrap { padding-inline: var(--space-md); } }
.blog-head { margin-bottom: var(--space-xl); }
.blog-meta { margin: 0 0 var(--space-xs); color: var(--color-muted); font-size: var(--text-sm); }
.blog-lead { margin: var(--space-sm) 0 0; color: var(--color-muted); font-size: var(--text-lg); line-height: 1.5; }
.blog-body { line-height: 1.75; }
.blog-body h2 { margin: var(--space-xl) 0 var(--space-sm); font-size: var(--text-xl); }
.blog-body h3 { margin: var(--space-lg) 0 var(--space-xs); font-size: var(--text-lg); }
.blog-body p, .blog-body ul, .blog-body ol { margin: 0 0 var(--space-md); }
.blog-body li { margin-bottom: var(--space-xs); }
.blog-body table { width: 100%; margin: 0 0 var(--space-md); border-collapse: collapse; font-size: var(--text-sm); }
.blog-body th, .blog-body td { padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--color-rule); text-align: left; vertical-align: top; }
.blog-body th { background: var(--color-paper-2); }
.blog-table { overflow-x: auto; }
.blog-cta { margin-block: var(--space-2xl) var(--space-xl); padding: var(--space-lg); background: var(--color-paper-2); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); }
.blog-cta h2 { margin: 0 0 var(--space-xs); font-size: var(--text-lg); }
.blog-cta p { margin: 0 0 var(--space-md); color: var(--color-ink); }
.blog-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); margin: 0 !important; }
.blog-more h2 { font-size: var(--text-md); }
.blog-more ul { padding-left: var(--space-lg); }
.blog-list { display: grid; gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.blog-card { padding: var(--space-lg); background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); }
.blog-card h2 { margin: 0 0 var(--space-xs); font-size: var(--text-lg); line-height: 1.3; }
.blog-card h2 a { text-decoration: none; }
.blog-card h2 a:hover { text-decoration: underline; }
.blog-card p { margin: 0 0 var(--space-xs); color: var(--color-ink); }
.blog-card time { color: var(--color-muted); font-size: var(--text-sm); }
/* ---------- Home ---------- */
.home-contact { display: grid; gap: var(--space-md) var(--space-xl); align-items: center; margin-block: var(--space-2xl) var(--space-3xl); padding: var(--space-xl); background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); box-shadow: var(--shadow-panel); }
.home-contact .home-h2, .home-contact p { margin: 0; }
.home-contact p { margin-top: var(--space-xs); color: var(--color-muted); }
.home-contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); }
.home-contact-actions .float { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-lg); background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-pill); font-weight: 600; text-decoration: none; transition: background-color var(--dur-short) var(--ease-out); }
.home-contact-actions .float:hover, .home-contact-actions .float:focus-visible { background: var(--color-accent-hover); color: var(--color-accent-ink); text-decoration: none; }
.home-contact-actions a:not(.float) { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 48rem) { .home-contact { grid-template-columns: minmax(0, 1fr) auto; } }
@media (max-width: 40rem) { .home-contact { padding: var(--space-lg) var(--space-md); } .home-contact-actions .float { width: 100%; } }
.home-lead { max-width: 46ch; }
.home-actions .btn-outline-secondary { background: transparent; }
/* ---------- Error pages ---------- */
.error-main { display: flex; align-items: center; justify-content: center; padding: var(--space-xl) var(--gutter); }
.error-main .empty-state { margin: 0 auto; padding: 0; }
.error-main .empty-state p { max-width: 36ch; margin-inline: auto; }
/* Home: cards and FAQ */
.home-cards { display: grid; gap: var(--space-md); margin: var(--space-xl) 0 0; padding: 0; list-style: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-intro + .home-cards { margin-top: var(--space-lg); }
.home-card { padding: var(--space-lg); background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); }
.home-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: var(--space-sm); border-radius: var(--radius-control); background: var(--color-paper-2); color: var(--color-accent); }
.home-card p { margin: 0; color: var(--color-ink-2); line-height: 1.6; }
@media (max-width: 60rem) { .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .home-cards { grid-template-columns: minmax(0, 1fr); } .home-card { padding: var(--space-md); } }
.home-faq { margin-top: var(--space-lg); border-top: 1px solid var(--color-rule); max-width: 800px; }
.home-faq details { border-bottom: 1px solid var(--color-rule); }
.home-faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 56px; padding-block: var(--space-sm); font-weight: 600; color: var(--color-ink-2); cursor: pointer; list-style: none; }
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border: solid var(--color-accent-2); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform var(--dur-short) var(--ease-out); }
.home-faq details[open] summary::after { transform: rotate(-135deg); }
.home-faq summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-control); }
.home-faq p { margin: 0 0 var(--space-md); max-width: 62ch; color: var(--color-ink-2); }
/* Screen-specific styles: staff screens. Tokens only (tokens.css); shared components stay in theme.css. */
/* Settings-style forms: wide enough for a two-column field grid, never full-bleed. */
.container-form { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }
/* Section header inside a panel: title + one muted line. */
.section-head { margin-bottom: var(--space-md); }
.section-head .section-title { margin-bottom: var(--space-2xs); }
.section-sub { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }
/* A list of on/off settings, one row each, separated by hairlines. */
.setting-list { display: grid; }
.setting-list > .setting { margin: 0; padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
.setting-list > .setting:first-child { padding-top: 0; }
.setting-list > .setting:last-child { border-bottom: 0; padding-bottom: 0; }
.switch-hint { margin: var(--space-2xs) 0 0 3rem; }
/* Field grid that follows a setting list inside the same panel. */
.form-grid--after { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
/* Short numeric inputs (days, counts, minutes, order) don't need a full-width box. */
.input-narrow { max-width: 10rem; }
/* Form buttons: primary first, aligned with the panel edge. */
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin-top: var(--space-lg); }
.form-actions-hint { margin-top: var(--space-xs); }
/* Appointments list as cards on phones: every value sits in the right column, chips keep their size,
   phone and email each get their own line. */
#bookingList td.td-lead a.cell-sub { display: block; width: -moz-fit-content; width: fit-content; }
@media (max-width: 48rem) {
  #bookingList td[data-label] > * { grid-column: 2; justify-self: start; }
  #bookingList td[data-label] .cell-sub { margin-top: 0; }
  #bookingList td.td-lead a.cell-sub { display: flex; align-items: center; width: -moz-fit-content; width: fit-content; max-width: 100%; padding-block: var(--space-2xs); overflow-wrap: anywhere; }
  #bookingList td.td-lead .td-strong { font-size: var(--text-lg); margin-bottom: var(--space-2xs); }
}
@media (max-width: 48rem) and (pointer: coarse) {
  #bookingList td.td-lead a.cell-sub { min-height: 44px; padding-block: 0; }
}
@media (max-width: 40rem) {
  .form-actions > .btn { flex: 1 1 auto; }
  .input-narrow { max-width: none; }
}
/* Screen-specific styles: queue-admin screens. Tokens only (tokens.css); shared components stay in theme.css. */
/* ---------- Shared bits ---------- */
.label-opt { margin-left: var(--space-2xs); color: var(--color-muted); font-weight: 500; font-size: var(--text-xs); }
.table .td-note { color: var(--color-muted); max-width: 30ch; overflow-wrap: anywhere; }
.table .td-note:empty::before { content: "\2014"; }
.table .td-lead .td-strong { font-size: var(--text-md); }
.table .td-lead .tag { margin-left: var(--space-xs); vertical-align: 2px; }
.table .td-lead a.cell-sub { display: inline-block; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.table .td-meta { white-space: nowrap; }
/* ---------- Queue board: the number that matters is read from across the desk ---------- */
.stat-board.queue-board { margin-bottom: var(--space-md); }
.queue-board .stat { padding: var(--space-md) var(--space-lg); display: flex; flex-direction: column; justify-content: flex-start; }
.queue-board .stat-value { margin-top: var(--space-2xs); }
.queue-board .stat--lead .stat-value { font-size: clamp(3.25rem, 7vw, 4.75rem); color: var(--color-ink-2); }
.queue-board .stat--lead .stat-label { color: var(--color-ink-2); }
.queue-board .stat-unit { margin-top: var(--space-2xs); }
.queue-board .stat-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; margin-top: 0; }
@media (min-width: 40.01rem) {
  .stat-board.queue-board { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 40rem) {
  .stat-board.queue-board { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .queue-board .stat--lead { grid-column: 1 / -1; border-bottom: 1px solid var(--color-rule); flex-direction: row; justify-content: flex-start; align-items: baseline; flex-wrap: wrap; gap: 0 var(--space-sm); }
  .queue-board .stat--lead .stat-label { flex-basis: 100%; }
  .queue-board .stat--lead .stat-unit { margin: 0; }
  .queue-board .stat:nth-child(2) { border-left: 0; }
  .queue-board .stat-value { font-size: var(--text-3xl); }
  .queue-board .stat--lead .stat-value { font-size: 3.5rem; }
}
/* ---------- Switches: one quiet strip under the board, set once per day ---------- */
.staff-page .staff-toggles { gap: var(--space-xs); margin-bottom: var(--space-md); }
/* The whole card is the label, so a tap anywhere on it flips the switch. */
.staff-page .toggle-card { padding: 0; border-radius: var(--radius-control); }
.staff-page .toggle-card .custom-switch { padding-left: 0; min-height: 0; }
.staff-page .toggle-card .custom-control-label { display: block; width: 100%; min-height: 44px; padding: var(--space-sm) var(--space-md) var(--space-sm) calc(var(--space-md) + 3rem); font-size: var(--text-md); cursor: pointer; }
.staff-page .toggle-card .custom-control-label::before { left: var(--space-md); top: calc(var(--space-sm) + 0.15rem); }
.staff-page .toggle-card .custom-control-label::after { left: calc(var(--space-md) + 3px); top: calc(var(--space-sm) + 0.15rem + 3px); }
.staff-page .toggle-title { display: block; font-weight: 600; }
.staff-page .toggle-card .toggle-hint { display: block; margin: 2px 0 0; color: var(--color-muted); font-size: var(--text-sm); font-weight: 400; line-height: 1.45; }
/* The hint describes the current position, not just "on". */
.custom-control-input:checked ~ .custom-control-label .when-off,
.custom-control-input:not(:checked) ~ .custom-control-label .when-on { display: none; }
.staff-page .toggle-card:has(input:checked) { border-color: var(--color-accent-2-edge); background: linear-gradient(var(--color-tint), var(--color-tint)), var(--color-surface); }
.staff-page .toggle-card:has(.custom-control-input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.staff-page .page-actions { row-gap: var(--space-2xs); }
.staff-page #addHint { order: 3; }
/* ---------- Queue table ---------- */
.td-no { width: 3.5rem; }
.queue-no { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 var(--space-xs); border-radius: var(--radius-control); background: var(--color-paper-2); color: var(--color-ink-2); font-size: var(--text-md); font-weight: 700; font-variant-numeric: tabular-nums; }
.queue-no--next { background: var(--color-accent); color: var(--color-accent-ink); }
#queueTable tr.row-pending { background: var(--color-tint); }
#queueTable tr.row-pending:hover { background: var(--color-tint-strong); }
#queueTable tr.row-pending > :first-child, #queueTable tr.row-pending > :last-child { background: transparent; }
#queueTable td.td-actions { text-align: right; width: 1%; }
#queueTable .btn-done { min-width: 96px; }
@media (pointer: coarse) {
  .table .btn-done { min-height: 44px; }
  .table td.td-lead a.cell-sub[href^="tel:"] { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 48rem) {
  #queueTable tbody tr { position: relative; padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 2.75rem); }
  #queueTable tbody tr.row-pending { background: var(--color-tint); }
  #queueTable td.td-no { display: block; position: absolute !important; left: var(--space-md); top: var(--space-md); width: auto; padding: 0; }
  #queueTable tr.row-pending > :first-child { box-shadow: none !important; }
  #queueTable td.td-lead { padding-bottom: 0; }
  #queueTable td.td-lead .td-strong { font-size: var(--text-lg); line-height: 1.25; }
  #queueTable td.td-lead a.cell-sub { margin-top: 0; padding-block: var(--space-2xs); font-size: var(--text-md); font-weight: 500; color: var(--color-ink-2); }
  #queueTable td.td-note { display: block; max-width: none; padding: 0 0 var(--space-xs); color: var(--color-muted); }
  #queueTable td.td-note:empty { display: none; }
  #queueTable td.td-meta { display: inline-flex; align-items: center; gap: var(--space-xs); width: auto; margin: 0 var(--space-sm) 0 0; padding: var(--space-2xs) 0; font-size: var(--text-sm); }
  #queueTable td.td-meta[data-label]::before { padding-top: 0; }
  #queueTable td.td-actions { padding-top: var(--space-sm); width: 100%; text-align: left; }
  #queueTable td.td-actions .btn { width: 100%; min-height: 44px; }
}
/* ---------- Processed list ---------- */
@media (max-width: 48rem) {
  #servedTable tbody tr { padding: var(--space-md); }
  #servedTable td.td-lead .td-strong { font-size: var(--text-lg); }
  #servedTable td.td-lead a.cell-sub { padding-block: var(--space-2xs); font-size: var(--text-md); font-weight: 500; color: var(--color-ink-2); }
  #servedTable td.td-note { display: block; max-width: none; padding: 0 0 var(--space-xs); }
  #servedTable td.td-note:empty { display: none; }
  #servedTable td.td-actions .btn { min-height: 44px; }
}
#servedTable td.td-actions { text-align: right; }
.panel-flush > .empty-state { margin: 0 auto; padding: var(--space-xl) var(--space-md); }
/* ---------- Admin: companies table ---------- */
.table-companies td a:not(.cell-sub) { color: var(--color-ink-2); text-decoration: none; font-variant-numeric: tabular-nums; }
.table-companies td a:not(.cell-sub):hover { text-decoration: underline; text-decoration-color: currentColor; }
.table-companies .td-lead a.cell-sub { padding-block: 0; }
.table-companies .tag-list .tag { min-height: 22px; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--color-muted); }
.btn-quiet:hover { background: var(--color-tint); border-color: transparent; color: var(--color-ink-2); }
/* The sticky action column is only needed when the table scrolls sideways. */
@media (min-width: 72rem) {
  .table-responsive > .table#companyTable tr > :last-child, .table-responsive > .table#queueTable tr > :last-child, .table-responsive > .table#servedTable tr > :last-child { position: static; box-shadow: none; }
}
.table-companies td.td-actions { text-align: right; }
@media (max-width: 48rem) {
  .table-companies td.td-actions { text-align: left; }
  .table-companies td.td-actions .btn-quiet { border-color: var(--color-rule-strong); color: var(--color-ink-2); }
  .table-companies tbody tr { padding: var(--space-md); }
  .table-companies td[data-label] { grid-template-columns: 6rem minmax(0, 1fr); align-items: center; }
  .table-companies td .tag-list, .table-companies td > .tag { justify-self: start; }
  .table-companies td[data-label="Contact"], .table-companies td[data-label="Booking page"] { padding-block: 0; }
  .table-companies td.td-lead .td-strong { font-size: var(--text-lg); }
  .table-companies td.td-lead a.cell-sub { padding-block: var(--space-2xs); font-size: var(--text-sm); }
}
/* ---------- Admin modals: two columns, compact so a 900px screen needs no scrolling ---------- */
#addQueueModal .modal-body, #editQueueModal .modal-body { padding: var(--space-md) var(--space-lg); }
#addQueueModal .form-group, #editQueueModal .form-group { margin-bottom: var(--space-sm); }
#addQueueModal .col-form-label, #editQueueModal .col-form-label { padding-bottom: var(--space-2xs); }
#addQueueModal .form-text, #editQueueModal .form-text { margin-top: var(--space-2xs); overflow-wrap: anywhere; }
#addQueueModal .form-section, #editQueueModal .form-section { margin-top: var(--space-xs); padding-top: var(--space-sm); display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--space-lg); }
#addQueueModal .form-section .form-text, #editQueueModal .form-section .form-text { margin: 0 0 var(--space-2xs); }
#addQueueModal .option-row, #editQueueModal .option-row { border-bottom: 0; padding: var(--space-xs) 0; }
#addQueueModal .toggle-row, #editQueueModal .toggle-row { padding: var(--space-xs) 0 0; border-top: 1px solid var(--color-rule); }
@media (min-width: 576px) {
  #addQueueModal .form-section, #editQueueModal .form-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #addQueueModal .option-row, #editQueueModal .option-row { flex-direction: column; align-items: flex-start; justify-content: flex-start; }
  #addQueueModal .toggle-row, #editQueueModal .toggle-row, #addQueueModal .form-section .form-text, #editQueueModal .form-section .form-text { grid-column: 1 / -1; }
}
.modal-footer .btn + .btn { margin-left: 0; }
/* ---------- Admin profile ---------- */
.profile-id { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-lg); padding-bottom: var(--space-lg); border-bottom: 1px solid var(--color-rule); min-width: 0; }
.profile-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-ink); font-size: var(--text-xl); font-weight: 700; }
.profile-id__text { min-width: 0; }
.profile-id__text .td-strong { display: block; font-size: var(--text-lg); font-weight: 700; color: var(--color-ink-2); overflow-wrap: anywhere; }
.profile-id__text .cell-sub { margin-top: 0; font-size: var(--text-sm); overflow-wrap: anywhere; }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-md); margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.profile-actions > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.profile-actions__buttons { display: flex; gap: var(--space-xs); }
@media (max-width: 30rem) {
  .profile-actions__buttons { width: 100%; }
  .profile-actions__buttons .btn { flex: 1 1 0; }
  .profile-actions > a { order: 2; justify-content: center; width: 100%; }
}
/* ---------- Staff sidebar (LayoutCompany) ----------
 * Desktop (>=992px): fixed rail that morphs between full (248px) and icon-only (72px); state kept in localStorage.
 * Phones/tablets: top bar + off-canvas drawer that slides in over a scrim.
 * Transitions switch on only after first paint (html.sb-ready) so a saved collapsed state never animates on load. */
:root { --sb-w: 248px; --sb-w-mini: 72px; --sb-dur: 320ms; }
.has-sb .sb-main { display: flex; flex-direction: column; flex: 1 0 auto; min-width: 0; }
.has-sb .sb-main > main { flex: 1 0 auto; }
.sb {
  position: fixed; inset: 0 auto 0 0; z-index: 1040; width: var(--sb-w);
  display: flex; flex-direction: column; gap: var(--space-md);
  padding: var(--space-md) var(--space-sm);
  background: var(--color-surface); border-right: 1px solid var(--color-rule);
  overflow: hidden;
}
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); min-height: 44px; padding-left: 10px; }
.sb-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--color-ink-2); font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.sb-brand:hover { color: var(--color-ink-2); }
.sb-brand img { flex: none; }
.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; }
.sb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sb-section { margin: var(--space-lg) 0 var(--space-xs); padding-left: 14px; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); white-space: nowrap; height: 1.2em; }
.sb-link {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--radius-control);
  background: transparent; color: var(--color-ink); font: inherit; font-size: var(--text-sm); font-weight: 500;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.sb-link .icon { flex: none; color: var(--color-muted); transition: color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.sb-link:hover { background: var(--color-tint); color: var(--color-ink-2); }
.sb-link:hover .icon { color: var(--color-ink-2); }
.sb-link:active .icon { transform: scale(0.92); }
/* Current page: tinted pill plus an accent bar that grows in. */
.sb-link::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--color-accent); transform: scaleY(0); transition: transform var(--dur-short) var(--ease-out); }
.sb-link.is-current { background: var(--color-tint); color: var(--color-ink-2); font-weight: 600; }
.sb-link.is-current .icon { color: var(--color-ink-2); }
.sb-link.is-current::before { transform: scaleY(1); }
.sb-label { display: inline-block; transition: opacity var(--dur-short) var(--ease-out), transform var(--sb-dur) var(--ease-out); }
.sb-foot { display: grid; gap: var(--space-xs); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.sb-user { display: flex; align-items: center; gap: 12px; padding: 0 6px; min-height: 44px; }
.sb-avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); font-size: var(--text-sm); font-weight: 700; }
.sb-user-text { display: grid; min-width: 0; line-height: 1.3; }
.sb-user-text strong { font-size: var(--text-sm); color: var(--color-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-text span { font-size: var(--text-xs); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-logout:hover { background: var(--color-error-tint); color: var(--color-error); }
.sb-logout:hover .icon { color: var(--color-error); }
.sb-collapse, .sb-close, .sb-menu-btn {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--color-rule); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-ink-2); cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), transform var(--sb-dur) var(--ease-out);
}
.sb-collapse:hover, .sb-close:hover, .sb-menu-btn:hover { background: var(--color-tint); }
.sb-menu-btn { width: 44px; height: 44px; }
.sb-topbar { display: none; }
.sb-scrim { position: fixed; inset: 0; z-index: 1035; background: var(--color-scrim); opacity: 0; transition: opacity var(--sb-dur) var(--ease-out); }
.sb-scrim[hidden] { display: none; }
/* ---------- Desktop rail ---------- */
@media (min-width: 992px) {
  .sb-close { display: none; }
  .has-sb .sb-main { padding-left: var(--sb-w); }
  .sb-ready .sb { transition: width var(--sb-dur) var(--ease-out); }
  .sb-ready.has-sb .sb-main { transition: padding-left var(--sb-dur) var(--ease-out); }

  .sb-collapsed .sb { width: var(--sb-w-mini); }
  .sb-collapsed.has-sb .sb-main { padding-left: var(--sb-w-mini); }
  .sb-collapsed .sb-label { opacity: 0; transform: translateX(-8px); pointer-events: none; }
  .sb-collapsed .sb-section { border-top: 1px solid var(--color-rule); margin-inline: 8px; }
  .sb-collapsed .sb-head { flex-direction: column; padding-left: 0; gap: var(--space-sm); }
  .sb-collapsed .sb-brand { gap: 0; }
  .sb-collapsed .sb-brand .sb-label { width: 0; }
  .sb-collapsed .sb-collapse { transform: rotate(180deg); }
  .sb-collapsed .sb-user { padding: 0 8px; }

  /* Icon-only rail: name each item on hover/focus. */
  .sb-collapsed .sb-link::after {
    content: attr(data-label); position: fixed; left: calc(var(--sb-w-mini) + 8px); margin-top: 0;
    padding: 6px 10px; border-radius: var(--radius-control); background: var(--color-ink); color: var(--color-on-ink);
    font-size: var(--text-xs); font-weight: 500; white-space: nowrap; pointer-events: none;
    opacity: 0; transform: translateX(-4px); transition: opacity var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
  }
  .sb-collapsed .sb-link:hover::after, .sb-collapsed .sb-link:focus-visible::after { opacity: 1; transform: none; }
}
/* ---------- Phones / tablets: drawer ---------- */
@media (max-width: 991.98px) {
  .sb-collapse { display: none; }
  .sb-topbar {
    position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; justify-content: space-between;
    min-height: var(--nav-h); padding: 0 var(--space-md); background: var(--color-surface); border-bottom: 1px solid var(--color-rule);
  }
  .sb { width: min(84vw, 300px); box-shadow: var(--shadow-dialog); transform: translateX(-105%); visibility: hidden; }
  .sb-ready .sb { transition: transform var(--sb-dur) var(--ease-out), visibility 0s linear var(--sb-dur); }
  .sb-open .sb { transform: none; visibility: visible; transition: transform var(--sb-dur) var(--ease-out), visibility 0s; }
  .sb-open .sb-scrim { opacity: 1; }
  /* Items cascade in as the drawer opens. */
  .sb-open .sb-list li { animation: sb-in var(--sb-dur) var(--ease-out) both; }
  .sb-open .sb-list li:nth-child(2) { animation-delay: 30ms; }
  .sb-open .sb-list li:nth-child(3) { animation-delay: 60ms; }
  .sb-open .sb-list li:nth-child(4) { animation-delay: 90ms; }
  .sb-open { overflow: hidden; }
}
@keyframes sb-in { from { opacity: 0; transform: translateX(-12px); } }
@media (prefers-reduced-motion: reduce) {
  .sb, .sb-main, .sb-label, .sb-link, .sb-link::before, .sb-link::after, .sb-collapse, .sb-scrim { transition: none !important; }
  .sb-open .sb-list li { animation: none; }
}
/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-rule-strong) var(--color-paper); scroll-padding-top: calc(var(--nav-h) + var(--space-md)); scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--color-paper); color: var(--color-ink);
  font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; caret-color: var(--color-accent);
}
body > #container, body > main { flex: 1 0 auto; }
main[tabindex="-1"]:focus, main[tabindex="-1"]:focus-visible { outline: none; }
::-moz-selection { background: var(--color-tint-strong); color: var(--color-ink); }
::selection { background: var(--color-tint-strong); color: var(--color-ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }
a { color: var(--color-ink-2); text-decoration: underline; text-decoration-color: var(--color-rule-strong); text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: color var(--dur-micro) var(--ease-out), text-decoration-color var(--dur-micro) var(--ease-out); }
a:hover { color: var(--color-accent-hover); text-decoration-color: currentColor; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display); font-weight: 700; color: var(--color-ink-2);
  letter-spacing: var(--tracking-display); line-height: 1.2; overflow-wrap: break-word; min-width: 0; text-wrap: balance;
}
h1, .h1 { font-size: var(--text-3xl); line-height: 1.1; }
h2, .h2 { font-size: var(--text-2xl); line-height: 1.15; }
h3, .h3 { font-size: var(--text-xl); }
h4, .h4 { font-size: var(--text-lg); }
h5, .h5 { font-size: var(--text-md); letter-spacing: -0.01em; }
h6, .h6 { font-size: var(--text-sm); letter-spacing: 0; }
p { text-wrap: pretty; }
small, .small { font-size: var(--text-sm); }
.text-muted { color: var(--color-muted) !important; }
hr { border: 0; border-top: 1px solid var(--color-rule); }
b, strong { font-weight: 700; }
.num, td.num, .stat-value { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; -webkit-clip-path: inset(50%); clip-path: inset(50%); white-space: nowrap; }
/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--gutter); }
.page { padding-block: var(--space-xl) var(--space-2xl); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-md) var(--space-lg); margin-bottom: var(--space-lg); }
.page-head > :first-child { min-width: 0; }
.page-title { margin: 0; font-size: clamp(var(--text-xl), 1rem + 1.6vw, var(--text-2xl)); line-height: 1.15; }
.page-sub { margin: var(--space-2xs) 0 0; color: var(--color-muted); font-size: var(--text-md); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.section-title { margin: 0 0 var(--space-sm); font-size: var(--text-lg); }
/* Panel: the one surface. Never nest a panel in a panel. */
.panel, .card {
  background: var(--color-surface); border: 1px solid var(--color-rule);
  border-radius: var(--radius-panel); box-shadow: var(--shadow-panel);
}
.panel { padding: var(--space-lg); }
.panel-flush { padding: 0; overflow: hidden; }
.panel + .panel { margin-top: var(--space-lg); }
.card-body { padding: var(--space-lg); }
.card-header { background: transparent; border-bottom: 1px solid var(--color-rule); padding: var(--space-md) var(--space-lg); font-weight: 600; color: var(--color-ink-2); }
@media (max-width: 40rem) { .panel, .card-body { padding: var(--space-md); } }
.prose > p, .prose > div > p { max-width: 68ch; line-height: 1.7; }
.table-wrap:has(.table-pick) { max-width: 640px; }
/* Definition list for facts (contact, description, status) */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-xs) var(--space-lg); margin: 0; }
.facts dt { font-weight: 600; color: var(--color-muted); font-size: var(--text-sm); padding-top: 2px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 40rem) { .facts { grid-template-columns: minmax(0, 1fr); gap: 0; } .facts dd { margin-bottom: var(--space-sm); } }
/* ---------- Signature: the live queue board ---------- */
.stat-board {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel); overflow: hidden; margin-bottom: var(--space-lg);
}
.stat { padding: var(--space-lg); border-left: 1px solid var(--color-rule); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat-label { display: block; margin: 0; font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); white-space: nowrap; }
.stat-value {
  display: block; margin: var(--space-xs) 0 0; font-size: var(--text-figure); font-weight: 700; line-height: 1;
  letter-spacing: -0.035em; color: var(--color-ink-2); font-variant-numeric: tabular-nums;
}
.stat-value a { color: inherit; text-decoration: none; }
.stat-value a:hover { color: var(--color-accent-hover); text-decoration: underline; text-decoration-thickness: 2px; }
.stat-unit { display: block; margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.stat--lead { background: linear-gradient(var(--color-tint), var(--color-tint)), var(--color-surface); }
@media (max-width: 40rem) {
  .stat-board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .stat { padding: var(--space-md); }
  .stat-label { white-space: normal; }
  .stat-value { font-size: var(--text-3xl); }
  .stat-unit { font-size: var(--text-xs); }
}
/* State line: queue in progress / booking open */
.state { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 600; color: var(--color-ink-2); }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-rule-strong); flex: none; }
.state--on::before { background: var(--color-success); box-shadow: 0 0 0 4px var(--color-success-tint); }
/* ---------- Status chips (booking status) ---------- */
.status { display: inline-flex; align-items: center; min-height: 24px; padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; line-height: 1.3; white-space: nowrap; border: 1px solid transparent; }
.status--pending { background: var(--color-tint); color: var(--color-ink-2); border-color: var(--color-accent-2-edge); }
.status--approved { background: var(--color-success-tint); color: var(--color-success); border-color: var(--color-success-edge); }
.status--rejected { background: var(--color-error-tint); color: var(--color-error); border-color: var(--color-error-edge); }
.status--expired { background: var(--color-paper-2); color: var(--color-muted); border-color: var(--color-rule-strong); }
/* ---------- Navigation ---------- */
.app-nav.navbar {
  min-height: var(--nav-h); padding: var(--space-xs) 0; background: var(--color-paper);
  border-top: 3px solid var(--color-accent); border-bottom: 1px solid var(--color-rule);
  position: sticky; top: 0; z-index: 1030;
}
.app-nav.fixed-top { position: fixed; }
.app-nav.navbar > .container, .app-nav.navbar > .container-fluid { padding-inline: var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.app-nav.navbar:not(:has(> .container)) { padding-inline: var(--gutter); }
.app-nav .navbar-brand { display: inline-flex; align-items: center; gap: var(--space-xs); margin-right: var(--space-lg); padding: 0; font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.02em; color: var(--color-ink-2); text-decoration: none; }
.app-nav .navbar-brand:hover { color: var(--color-ink-2); }
/* Brand mark (public/images/brand/queue-icon.svg) before the wordmark. */
.app-nav .navbar-brand { position: relative; padding-left: 36px; min-height: 44px; }
.app-nav .navbar-brand::before { content: ""; position: absolute; left: 0; top: 50%; width: 28px; height: 28px; margin-top: -14px; background: url("/images/brand/queue-icon.svg") center / contain no-repeat; }
.brand-mark { width: 28px; height: 28px; flex: none; display: block; }
.app-nav .navbar-nav { align-items: center; gap: 2px; }
.app-nav .nav-link, .app-nav .navbar-nav > a.nav-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-sm) !important;
  border-radius: var(--radius-control); color: var(--color-ink) !important; font-size: var(--text-sm); font-weight: 500; text-decoration: none;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.app-nav .nav-link:hover { background: var(--color-tint); color: var(--color-ink-2) !important; }
.app-nav .nav-link.is-current, .app-nav .nav-link[aria-current="page"] { color: var(--color-ink-2) !important; background: var(--color-tint); font-weight: 600; }
.app-nav .navbar-toggler { border: 1px solid var(--color-rule); border-radius: var(--radius-control); padding: var(--space-2xs) var(--space-xs); min-height: 40px; }
.app-nav .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='%2323445C' stroke-linecap='round' stroke-width='2' d='M5 8h20M5 15h20M5 22h20'/%3e%3c/svg%3e"); width: 1.25em; height: 1.25em; }
.app-nav .dropdown-toggle { gap: var(--space-xs); }
.app-nav .dropdown-toggle .nav-email { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 991.98px) {
  .app-nav .navbar-collapse { flex-basis: 100%; padding: var(--space-xs) 0 var(--space-sm); border-top: 1px solid var(--color-rule); margin-top: var(--space-xs); }
  .app-nav .navbar-nav { align-items: stretch; }
  .app-nav .nav-link { min-height: 44px; }
  .app-nav .dropdown-menu { box-shadow: none; border: 0; padding: 0 0 0 var(--space-sm); background: transparent; }
}
.has-fixed-nav { padding-top: var(--nav-h); }
/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: var(--control-h); padding: 0 var(--space-md); border-radius: var(--radius-control);
  border: 1px solid transparent; font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; line-height: 1.2;
  letter-spacing: 0; text-decoration: none; white-space: nowrap; box-shadow: none;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:focus, .btn.focus { box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; box-shadow: none; }
.btn:not(:disabled):not(.disabled):active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: 0.55; cursor: not-allowed; pointer-events: auto; }
.btn-sm { min-height: var(--control-h-sm); padding: 0 var(--space-sm); font-size: var(--text-sm); border-radius: var(--radius-control); }
.btn-lg { min-height: 48px; padding: 0 var(--space-lg); font-size: var(--text-md); }
.btn-block { display: flex; width: 100%; }
@media (pointer: coarse) { .btn { min-height: 44px; } }
/* Primary: Deep Blue. Success maps to primary so the page keeps one filled action colour. */
.btn-primary, .btn-success, .btn-dark {
  background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink);
}
.btn-primary:hover, .btn-success:hover, .btn-dark:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: var(--color-accent-ink); }
.btn-primary:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled):active, .btn-dark:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active { background: var(--color-accent-press); border-color: var(--color-accent-press); color: var(--color-accent-ink); box-shadow: none; }
.btn-primary:disabled, .btn-success:disabled, .btn-primary.disabled, .btn-success.disabled { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
/* Secondary: outlined, quieter than primary */
.btn-secondary, .btn-outline-primary, .btn-outline-secondary, .btn-light, .btn-info, .btn-outline-info, .btn-outline-success, .btn-outline-dark {
  background: var(--color-surface); border-color: var(--color-rule-strong); color: var(--color-ink-2);
}
.btn-secondary:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-light:hover, .btn-info:hover, .btn-outline-info:hover, .btn-outline-success:hover, .btn-outline-dark:hover {
  background: var(--color-tint); border-color: var(--color-accent-2); color: var(--color-ink-2);
}
.btn-secondary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-secondary:not(:disabled):not(.disabled):active,
.btn-light:not(:disabled):not(.disabled):active, .btn-info:not(:disabled):not(.disabled):active { background: var(--color-tint-strong); border-color: var(--color-accent); color: var(--color-ink-2); box-shadow: none; }
/* Destructive */
.btn-danger { background: var(--color-error); border-color: var(--color-error); color: var(--color-on-error); }
.btn-danger:hover { background: var(--color-error-hover); border-color: var(--color-error-hover); color: var(--color-on-error); }
.btn-outline-danger { background: var(--color-surface); border-color: var(--color-error-edge); color: var(--color-error); }
.btn-outline-danger:hover, .btn-outline-danger:not(:disabled):not(.disabled):active { background: var(--color-error-tint); border-color: var(--color-error); color: var(--color-error); box-shadow: none; }
/* Typographic */
.btn-link { min-height: auto; padding: 0; border: 0; background: none; color: var(--color-ink-2); font-weight: 600; text-decoration: underline; text-decoration-color: var(--color-rule-strong); text-underline-offset: 0.18em; }
.btn-link:hover { color: var(--color-accent-hover); text-decoration-color: currentColor; }
/* ---------- Forms ---------- */
label, .col-form-label { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink); }
.col-form-label { padding-top: 0; padding-bottom: var(--space-2xs); }
.form-group { margin-bottom: var(--space-md); }
.form-control, .custom-select {
  height: auto; min-height: var(--control-h); padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-rule-strong); border-radius: var(--radius-control);
  background-color: var(--color-surface); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.4; box-shadow: none;
  transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}
.form-control::-moz-placeholder { color: var(--color-muted); opacity: 0.8; }
.form-control::placeholder { color: var(--color-muted); opacity: 0.8; }
.form-control:hover { border-color: var(--color-ink-2); }
.form-control:focus, .custom-select:focus { border-color: var(--color-ink-2); box-shadow: none; background-color: var(--color-surface); color: var(--color-ink); }
.form-control:focus-visible, .custom-select:focus-visible, .form-control:focus { outline: 2px solid var(--color-focus-halo); outline-offset: 0; }
.form-control:disabled, .form-control[readonly] { background: var(--color-paper-2); opacity: 0.75; cursor: not-allowed; }
textarea.form-control { min-height: 96px; resize: vertical; }
.form-control-sm { min-height: var(--control-h-sm); font-size: var(--text-sm); }
.form-control.is-invalid, .was-validated .form-control:invalid { border-color: var(--color-error); background-image: none; padding-right: var(--space-sm); }
.form-control.is-invalid:focus { box-shadow: none; outline-color: var(--color-error-edge); }
.invalid-feedback, .text-danger { color: var(--color-error) !important; font-size: var(--text-sm); }
.form-text { color: var(--color-muted); font-size: var(--text-sm); }
.form-check { padding-left: 1.75rem; }
.form-check-input { margin-left: -1.75rem; width: 18px; height: 18px; margin-top: 0.2rem; accent-color: var(--brand-deep); }
.form-check-label { font-weight: 500; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-deep); }
@media (max-width: 40rem) { .form-control, .custom-select { font-size: 16px; } }
/* Switches (booking open / in progress) */
.custom-control-label { font-weight: 600; color: var(--color-ink); cursor: pointer; }
.custom-switch { padding-left: 3rem; min-height: 1.5rem; }
.custom-switch .custom-control-label::before { left: -3rem; top: 0.1rem; width: 2.25rem; height: 1.3rem; border-radius: var(--radius-pill); border: 1px solid var(--color-rule-strong); background: var(--color-paper-2); box-shadow: none; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.custom-switch .custom-control-label::after { left: calc(-3rem + 3px); top: calc(0.1rem + 3px); width: calc(1.3rem - 6px); height: calc(1.3rem - 6px); border-radius: 50%; background: var(--color-muted); transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.custom-switch .custom-control-input:checked ~ .custom-control-label::before { background: var(--color-accent); border-color: var(--color-accent); }
.custom-switch .custom-control-input:checked ~ .custom-control-label::after { background: var(--color-paper); transform: translateX(0.95rem); }
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: none; }
.custom-control-input:focus-visible ~ .custom-control-label::before { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.custom-control-input:focus:not(:checked) ~ .custom-control-label::before { border-color: var(--color-ink-2); }
.custom-control-input:disabled ~ .custom-control-label { opacity: 0.55; cursor: not-allowed; }
.switch-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); }
/* ---------- Tables: horizontal rules only, sentence-case heads ---------- */
.table { width: 100%; margin-bottom: 0; color: var(--color-ink); background: transparent; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.table th, .table td { padding: var(--space-sm); vertical-align: middle; border-top: 0; border-bottom: 1px solid var(--color-rule); }
.table thead th, .table thead td {
  background: var(--color-paper-2); color: var(--color-ink-2); font-weight: 600; font-size: var(--text-sm);
  text-transform: none; letter-spacing: 0; white-space: nowrap; border-bottom: 1px solid var(--color-rule); vertical-align: bottom;
}
.table thead tr[style] { background: none !important; color: inherit !important; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr { transition: background-color var(--dur-micro) var(--ease-out); }
.table tbody tr:hover { background: var(--color-row-hover); }
.table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.table-bordered, .table-bordered th, .table-bordered td { border-left: 0; border-right: 0; }
.table td .btn + .btn, .table td form + form, .table td .btn + form, .table td form + .btn { margin-left: var(--space-xs); }
.table td form { display: inline-block; margin: 0; }
.table-wrap { background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); box-shadow: var(--shadow-panel); overflow: hidden; }
.table-wrap .table-responsive { margin: 0; }
.table-responsive { -webkit-overflow-scrolling: touch; }
.table-responsive > .table td:first-child, .table-responsive > .table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--color-surface); }
.table-responsive > .table thead th:first-child { background: var(--color-paper-2); }
.table .td-actions { white-space: nowrap; }
/* The column that acts stays in view while the rest scrolls (F25). */
.table-responsive > .table:has(td.td-actions:last-child) tr > :last-child { position: sticky; right: 0; z-index: 1; background: var(--color-surface); box-shadow: inset 1px 0 0 var(--color-rule); }
/* An open row menu lifts its cell above the later rows' pinned cells, which would otherwise paint over it. */
.table-responsive > .table tbody tr > td.td-actions:has(.dropdown.show) { z-index: 3; }
.table-responsive > .table:has(td.td-actions:last-child) thead tr > :last-child { background: var(--color-paper-2); }
.table-responsive > .table:has(td.td-actions:last-child) tbody tr:hover > :last-child, .table-responsive > .table tbody tr:hover > :first-child { background: linear-gradient(var(--color-row-hover), var(--color-row-hover)), var(--color-surface); }
@media (max-width: 40rem) {
  .table td.td-actions { white-space: normal; }
  .table td.td-actions > form, .table td.td-actions > .btn { display: flex; width: 100%; }
  .table td.td-actions > * + * { margin: var(--space-xs) 0 0 !important; }
  .table td.td-actions .btn { width: 100%; }
  .table-responsive > .table td:first-child, .table-responsive > .table th:first-child { position: static; }
}
/* Table toolbar: search + live count, sits inside the table surface above the head. */
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); }
.table-toolbar .form-control { flex: 1 1 260px; max-width: 420px; }
.table-count { margin-left: auto; color: var(--color-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap > .empty { margin: 0; border-bottom: 1px solid var(--color-rule); }
.table .td-lead .td-strong { display: block; color: var(--color-ink-2); }
.table .td-lead a.cell-sub { padding-block: 0; color: var(--color-muted); text-decoration: none; }
.table .td-lead a.cell-sub:hover { color: var(--color-ink-2); text-decoration: underline; }
/* Tags: small square labels for a row's type and settings (not booking status). */
.tag { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 24px; padding: 0 var(--space-xs); border: 1px solid var(--color-accent-2-edge); border-radius: 6px; background: var(--color-tint); color: var(--color-ink-2); font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.tag--off { border-color: var(--color-rule); background: transparent; color: var(--color-muted); font-weight: 500; }
.tag-list { display: inline-flex; flex-wrap: wrap; gap: var(--space-2xs); }
/* Stacked table: on phones and portrait tablets each row becomes a labelled card instead of a sideways scroll. */
@media (max-width: 48rem) {
  .table-stack td a, .table .td-lead a.cell-sub { display: inline-block; padding-block: var(--space-xs); }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; -webkit-clip-path: inset(50%); clip-path: inset(50%); }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tbody tr { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack tbody tr:hover { background: transparent; }
  .table-responsive > .table-stack td, .table-responsive > .table-stack tr > :last-child { position: static !important; box-shadow: none !important; background: transparent !important; }
  .table-stack td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-sm); align-items: start; padding: var(--space-2xs) 0; border: 0; overflow-wrap: anywhere; }
  .table-stack td[data-label]::before { content: attr(data-label); color: var(--color-muted); font-size: var(--text-xs); font-weight: 600; padding-top: 2px; }
  .table-stack td.td-lead { display: block; padding-bottom: var(--space-xs); }
  .table-stack td.td-lead::before { content: none; }
  .table-stack td.td-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); padding-top: var(--space-sm); }
  .table-stack td.td-actions > * + * { margin: 0 !important; }
  .table-stack td.td-actions > form, .table-stack td.td-actions > .btn, .table-stack td.td-actions > .dropdown { flex: 1 1 0; width: auto; }
  .table-stack td.td-actions > .dropdown > .btn { width: 100%; }
  .table-toolbar .form-control { max-width: none; }
}
/* Phone and email links in rows: a taller hit area for thumbs, same look. */
.table td a[href^="tel:"], .table td a[href^="mailto:"] { display: inline-block; padding-block: var(--space-xs); }
.table .cell-sub { display: block; color: var(--color-muted); font-size: var(--text-xs); margin-top: 2px; }
/* Pick lists: public day / slot / facility choosers, each row one tap target */
.table-pick td { padding: 0; }
.table-pick td a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: 52px; padding: var(--space-sm) var(--space-md); color: var(--color-ink-2); font-size: var(--text-md); font-weight: 600; text-decoration: none; }
.table-pick td a::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: var(--space-2xs); border-top: 2px solid var(--color-muted); border-right: 2px solid var(--color-muted); transform: rotate(45deg); transition: transform var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.table-pick td a:hover { background: var(--color-tint); color: var(--color-ink-2); }
.table-pick td a:hover::after { transform: translateX(2px) rotate(45deg); border-color: var(--color-ink-2); }
.table-pick td a:focus-visible { outline-offset: -2px; }
.table-pick h5, .table-pick .h6 { margin: 0; font-size: inherit; }
.table-pick tbody tr:hover { background: transparent; }
/* Empty state */
.empty { padding: var(--space-xl) var(--space-lg); text-align: center; color: var(--color-muted); }
.empty strong { display: block; color: var(--color-ink-2); font-size: var(--text-md); margin-bottom: var(--space-2xs); }
/* ---------- Alerts and flashes ---------- */
.alert { position: relative; padding: var(--space-sm) var(--space-md); padding-right: 3rem; border-radius: var(--radius-control); border: 1px solid transparent; font-size: var(--text-sm); font-weight: 500; line-height: 1.5; }
.alert:not(.alert-dismissible) { padding-right: var(--space-md); }
.alert-success, .alert-info, .alert-primary, .alert-flash { background: var(--color-tint); border-color: var(--color-accent-2-edge); color: var(--color-ink-2); }
.alert-danger, .alert-warning { background: var(--color-error-tint); border-color: var(--color-error-edge); color: var(--color-error); }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert .close, .close {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%); float: none; width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-control);
  color: var(--color-muted); opacity: 1; text-shadow: none; font-size: 1.25rem; font-weight: 400;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.close:hover { background: var(--color-press); color: var(--color-ink); }
.close:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; }
.has-fixed-nav > .alert:first-child { margin-top: var(--space-md); }
/* ---------- Dropdowns ---------- */
.dropdown-menu { padding: var(--space-2xs); margin-top: var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); background: var(--color-surface); box-shadow: var(--shadow-pop); font-size: var(--text-sm); min-width: 13rem; }
.dropdown-item { display: flex; align-items: center; min-height: 38px; padding: 0 var(--space-sm); border-radius: 6px; color: var(--color-ink); font-weight: 500; text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--color-tint); color: var(--color-ink-2); }
.dropdown-item:active { background: var(--color-tint-strong); color: var(--color-ink-2); }
/* Small action menu inside a table row (bookings Edit): hugs its button instead of the 13rem account menu. */
.dropdown-menu.menu-compact { min-width: 0; width: -moz-max-content; width: max-content; margin-top: var(--space-2xs); padding: var(--space-2xs); }
.menu-compact .dropdown-header { padding: var(--space-2xs) var(--space-xs) var(--space-2xs); }
.menu-compact .dropdown-item { min-height: 34px; padding: 0 var(--space-xs); }
.dropdown-item--danger, .dropdown-item--danger:hover, .dropdown-item--danger:focus { color: var(--color-error); gap: var(--space-xs); width: 100%; border: 0; background: none; text-align: left; }
.dropdown-item--danger:hover, .dropdown-item--danger:focus { background: var(--color-error-tint); }
.dropdown-divider { margin: var(--space-2xs) 0; border-top-color: var(--color-rule); }
.dropdown-header { padding: var(--space-2xs) var(--space-sm); color: var(--color-muted); font-size: var(--text-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ---------- Modals ---------- */
.modal-backdrop.show { opacity: 1; background: var(--color-scrim); }
.modal-dialog { max-width: 520px; margin: var(--space-xl) auto; }
.modal-dialog.modal-form-wide { max-width: 640px; }
.modal-dialog.modal-confirm { max-width: 420px; }
.modal-content { border: 1px solid var(--color-rule); border-radius: var(--radius-dialog); background: var(--color-surface); box-shadow: var(--shadow-dialog); overflow: hidden; }
.modal-header { position: relative; align-items: flex-start; padding: var(--space-lg) var(--space-2xl) var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-rule); background: transparent !important; color: var(--color-ink-2) !important; }
.modal-title { font-size: var(--text-lg); font-weight: 700; line-height: 1.3; color: var(--color-ink-2); letter-spacing: -0.015em; }
.modal-header .close { position: absolute; top: var(--space-sm); right: var(--space-sm); transform: none; margin: 0; color: var(--color-muted); }
.modal-body { padding: var(--space-lg); }
.modal-body > .form-group:last-child, .modal-body > form > .form-group:last-child { margin-bottom: 0; }
.modal-footer { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--color-rule); gap: var(--space-xs); background: var(--color-paper); }
.modal-footer > * { margin: 0; }
/* Confirm dialogs: the question is the body, the footer holds the one action */
.modal-confirm .modal-header { border-bottom: 0; padding-bottom: 0; }
.modal-confirm .modal-body { padding-top: var(--space-sm); }
.modal-lead, .modal-confirm .modal-body .col-form-label { display: block; margin: 0; padding: 0; font-size: var(--text-md); font-weight: 500; line-height: 1.5; color: var(--color-ink); }
/* Forms that wrap body + footer: body scrolls, header and footer stay put */
.modal-content > form { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.modal-dialog-scrollable .modal-content > form { overflow: hidden; }
.modal-dialog-scrollable .modal-body { overflow-y: auto; overscroll-behavior: contain; }
.modal.fade .modal-dialog { transform: translateY(8px) scale(0.98); transition: transform var(--dur-short) var(--ease-out); }
.modal.show .modal-dialog { transform: none; }
.modal-body .lead-text { color: var(--color-ink); margin-bottom: 0; }
.modal-body #msg2:empty { display: none; }
@media (max-width: 575.98px) {
  .modal-dialog, .modal-dialog.modal-form-wide, .modal-dialog.modal-confirm { max-width: none; margin: var(--space-sm); }
  .modal-dialog-scrollable { max-height: calc(100% - 2 * var(--space-sm)); }
  .modal-footer > .btn { flex: 1 1 auto; }
}
/* Form building blocks used inside modals and panels */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--space-md); }
@media (min-width: 576px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid > .span-2 { grid-column: 1 / -1; } }
.form-section { margin: var(--space-lg) 0 0; padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.input-action { display: flex; gap: var(--space-xs); }
.input-action > .form-control { flex: 1 1 auto; min-width: 0; }
.input-action > .btn { flex: none; min-height: var(--control-h); }
/* Option row: a question with Yes / No as a segmented control (native radios) */
.option-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); min-width: 0; margin: 0; padding: var(--space-sm) 0; border: 0; border-bottom: 1px solid var(--color-rule); }
.option-row:last-of-type { border-bottom: 0; }
.option-row > legend, .option-row__label { float: left; width: auto; max-width: 100%; margin: 0; padding: 0; font-size: var(--text-sm); font-weight: 600; color: var(--color-ink); }
.segmented { display: inline-flex; padding: var(--space-2xs); border: 1px solid var(--color-rule-strong); border-radius: var(--radius-control); background: var(--color-paper); }
.segmented__item { position: relative; margin: 0; cursor: pointer; }
.segmented__item > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segmented__item > span { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 32px; padding: 0 var(--space-sm); border-radius: calc(var(--radius-control) - var(--space-2xs)); font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.segmented__item:hover > span { color: var(--color-ink-2); background: var(--color-tint); }
.segmented__item > input:checked + span { background: var(--color-accent); color: var(--color-accent-ink); }
.segmented__item > input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* Toggle row: a checkbox drawn as a switch (native input, appearance reset) */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin: 0; padding: var(--space-sm) 0; cursor: pointer; font-size: var(--text-sm); font-weight: 600; color: var(--color-ink); }
input[type="checkbox"].toggle { -moz-appearance: none; appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 40px; height: 24px; margin: 0; border: 1px solid var(--color-rule-strong); border-radius: var(--radius-pill); background: var(--color-paper-2); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
input[type="checkbox"].toggle::before { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--color-muted); transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
input[type="checkbox"].toggle:checked { background: var(--color-accent); border-color: var(--color-accent); }
input[type="checkbox"].toggle:checked::before { background: var(--color-paper); transform: translateX(16px); }
input[type="checkbox"].toggle:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
/* ---------- Badges, list groups, pagination ---------- */
.badge { border-radius: var(--radius-pill); padding: var(--space-2xs) var(--space-xs); font-weight: 600; font-size: var(--text-xs); }
.badge-primary, .badge-info, .badge-secondary { background: var(--color-tint); color: var(--color-ink-2); }
.badge-success { background: var(--color-success-tint); color: var(--color-success); }
.badge-danger { background: var(--color-error-tint); color: var(--color-error); }
.list-group-item { border-color: var(--color-rule); background: var(--color-surface); }
.pagination { flex-wrap: wrap; gap: var(--space-2xs); margin: var(--space-lg) 0 0; }
.page-item .page-link,
.page-item:first-child .page-link,
.page-item:last-child .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; margin: 0; padding: 0 var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.page-link:hover { background: var(--color-tint); border-color: var(--color-rule-strong); color: var(--color-ink-2); text-decoration: none; }
.page-link:focus { box-shadow: none; }
.page-link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; z-index: 3; }
.page-item.active .page-link { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-paper); }
.page-item:first-child .page-link, .page-item:last-child .page-link { font-size: var(--text-lg); font-weight: 500; }
.page-item.disabled .page-link { background: transparent; border-color: transparent; color: var(--color-muted); }
/* Choice tiles: day / slot pickers on the public booking flow */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: var(--space-sm); }
.choice { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule-strong); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-ink-2); font-weight: 600; text-decoration: none; text-align: left; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.choice:hover { background: var(--color-tint); border-color: var(--color-accent); color: var(--color-ink-2); text-decoration: none; }
.choice small { color: var(--color-muted); font-weight: 500; }
/* Booking calendar (public "Choose a day"): month grid, free days are links. */
.cal { max-width: 26rem; padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); background: var(--color-surface); }
.cal-month + .cal-month { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.cal.is-paged .cal-month + .cal-month { margin-top: 0; padding-top: 0; border-top: 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.cal-title { flex: 1; margin: 0; font-size: var(--text-md); font-weight: 700; color: var(--color-ink-2); text-align: center; }
.cal-title:focus { outline: none; }
.cal-nav { position: relative; width: 40px; height: 40px; flex: none; border: 1px solid var(--color-rule-strong); border-radius: var(--radius-control); background: var(--color-surface); transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.cal-nav::before { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border: solid var(--color-ink-2); border-width: 0 0 2px 2px; transform: translate(-30%, -50%) rotate(45deg); }
.cal-nav--next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.cal-nav:hover:not(:disabled) { background: var(--color-tint); border-color: var(--color-accent); }
.cal-nav:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.cal-nav:disabled { opacity: 0.35; cursor: default; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-grid th { padding-bottom: var(--space-2xs); color: var(--color-muted); font-size: var(--text-xs); font-weight: 600; text-align: center; }
.cal-grid abbr[title] { text-decoration: none; border: 0; cursor: default; }
.cal-grid td { padding: 2px; text-align: center; }
.cal-day { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 44px; height: 44px; margin: 0 auto; border-radius: var(--radius-control); color: var(--color-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
a.cal-day.is-free { background: var(--color-tint); color: var(--color-ink-2); font-weight: 700; text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
a.cal-day.is-free:hover { background: var(--color-accent); color: var(--color-on-ink); }
a.cal-day.is-free:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.cal-day.is-today::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-key { display: flex; align-items: center; gap: var(--space-xs); margin: var(--space-sm) 0 0; color: var(--color-muted); font-size: var(--text-sm); }
.cal-key-free { width: 14px; height: 14px; border-radius: 4px; background: var(--color-tint); }
/* Date picker (forms with input[data-calendar]): a field-styled button that opens the same month grid in a popover. */
.dp { position: relative; }
.dp-trigger { display: flex; align-items: center; width: 100%; text-align: left; cursor: pointer; padding-right: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-trigger::after { content: ""; position: absolute; right: 14px; top: 50%; width: 14px; height: 13px; margin-top: -6px; border: 2px solid var(--color-muted); border-top-width: 4px; border-radius: 3px; }
.dp-trigger.is-empty { color: var(--color-muted); }
.dp-pop { position: absolute; z-index: 1060; top: calc(100% + var(--space-2xs)); left: 0; width: 20rem; max-width: calc(100vw - 2 * var(--space-md)); padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); background: var(--color-surface); box-shadow: var(--shadow-pop); }
.dp-pop .cal-head { margin-bottom: var(--space-xs); }
.dp-pop .cal-nav { width: 36px; height: 36px; }
.dp-pop .cal-day { max-width: 40px; height: 40px; border: 0; background: none; color: var(--color-ink-2); font-weight: 600; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.dp-pop .cal-day:hover:not(:disabled) { background: var(--color-tint); }
.dp-pop .cal-day:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.dp-pop .cal-day:disabled { color: var(--color-muted); font-weight: 400; opacity: 0.55; cursor: default; }
.dp-pop .cal-day.is-selected, .dp-pop .cal-day.is-selected:hover { background: var(--color-accent); color: var(--color-on-ink); }
.dp-foot { display: flex; justify-content: flex-end; gap: var(--space-xs); margin-top: var(--space-xs); }
.dp-foot:empty { display: none; }
.btn-icon { width: var(--control-h-sm); padding: 0; }
/* Inline SVG icons (components/icon.blade.php). */
.icon { flex: none; display: inline-block; vertical-align: -0.125em; }
.dropdown-item .icon { margin-left: auto; color: var(--color-muted); }
/* reCAPTCHA's widget is a fixed 304px iframe: scale it down so it fits a 320px phone panel. */
@media (max-width: 359.98px) { .g-recaptcha { transform: scale(0.82); transform-origin: 0 0; height: 64px; } }
/* Long emails and links wrap instead of running off narrow screens. */
.break-anywhere { overflow-wrap: anywhere; }
center > .alert { text-align: left; }
/* ---------- WhatsApp help (layouts/whatsUp) ---------- */
.help-chat { position: relative; display: inline-flex; flex-direction: column; align-items: flex-end; gap: var(--space-xs); float: right; }
.help-chat__toggle { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border: 1px solid var(--color-rule-strong); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-ink); font-size: var(--text-sm); cursor: pointer; -webkit-user-select: none; -moz-user-select: none; user-select: none; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.help-chat__toggle:hover { background: var(--color-tint); border-color: var(--color-accent-2); }
.help-chat__toggle .fab, .help-chat__toggle svg { font-size: 1.35rem; color: var(--color-ink-2); }
.help-chat .popuptext { position: absolute; bottom: calc(100% + var(--space-xs)); right: 0; z-index: var(--z-pop, 50); transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out), visibility 0s linear var(--dur-short); }
.help-chat .popuptext.show { transition-delay: 0s; }
@media (scripting: enabled) {
  .help-chat .popuptext:not(.show) { visibility: hidden; opacity: 0; transform: translateY(4px); }
}
.help-chat .popuptext a { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); font-weight: 600; font-size: var(--text-sm); text-decoration: none; }
.help-chat .popuptext a:hover { background: var(--color-accent-hover); color: var(--color-accent-ink); }
/* ---------- Utilities kept from the old layouts (mobile offset under fixed nav) ---------- */
@media (max-width: 767.98px) { .topPadding { padding-top: var(--space-md); } .bottomPadding { padding-top: var(--space-md); } }
/* ---------- Staff screens (queue dashboard, appointments): big targets, plain hints ---------- */
.staff-page .btn-lg { min-width: 120px; font-weight: 700; }
.staff-toggles { display: grid; gap: var(--space-sm); margin-bottom: var(--space-lg); }
@media (min-width: 768px) { .staff-toggles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.toggle-card { padding: var(--space-md) var(--space-lg); background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); }
.toggle-card .custom-control-label { font-weight: 600; font-size: var(--text-md); }
.toggle-hint { margin: var(--space-2xs) 0 0 3rem; color: var(--color-muted); font-size: var(--text-sm); line-height: 1.5; }
.table .td-strong { font-weight: 600; color: var(--color-ink); }
.table .btn-done { min-height: 40px; min-width: 88px; }
.table tr.row-pending > :first-child { box-shadow: inset 3px 0 0 var(--color-accent-2); }
.staff-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-lg); }
.quick-filters { display: inline-flex; flex-wrap: wrap; gap: var(--space-xs); }
.quick-filters form { margin: 0; }
.quick-filters .btn { min-height: 44px; min-width: 96px; font-weight: 600; }
.quick-filters .btn.is-current { background: var(--color-tint); border-color: var(--color-accent-2); color: var(--color-ink-2); }
/* Filter row (Activity, Visit log): labelled fields + Search/Clear, all one 44px height on one baseline. */
.filter-bar { margin-bottom: var(--space-md); }
.filter-bar form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-sm); }
.filter-field { display: flex; flex-direction: column; min-width: 0; }
.filter-field label { margin-bottom: var(--space-2xs); }
.filter-field--grow { flex: 1 1 18rem; max-width: 28rem; }
.filter-field--date { flex: 0 0 11.5rem; }
.filter-bar .form-control { height: 44px; border-radius: var(--radius-control); }
.filter-actions { display: flex; gap: var(--space-xs); }
.filter-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); height: 44px; padding-top: 0; padding-bottom: 0; }
@media (max-width: 40rem) {
  .filter-field--grow, .filter-field--date { flex: 1 1 100%; max-width: none; }
  .filter-actions { flex: 1 1 100%; }
  .filter-actions .btn { flex: 1 1 0; }
}
.staff-search { flex: 1 1 320px; max-width: 480px; }
.staff-search .input-group { flex-wrap: nowrap; gap: var(--space-xs); }
.staff-search .form-control { min-height: 44px; border-radius: var(--radius-control) !important; }
.staff-search .btn-icon { width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-control) !important; }
/* Phones: the main action stays in reach at the bottom of the screen. */
@media (max-width: 575.98px) {
  .staff-page .btn-quick { position: fixed; left: var(--space-md); right: var(--space-md); bottom: var(--space-md); z-index: 1020; width: auto; box-shadow: var(--shadow-pop); }
  .staff-page { padding-bottom: calc(var(--space-3xl) + var(--space-lg)); }
  .staff-search { max-width: none; }
  .quick-filters { width: 100%; }
  .quick-filters form, .quick-filters > .btn { flex: 1 1 0; }
  .quick-filters .btn { width: 100%; min-width: 0; }
}
/* Skip link: off-screen until a keyboard user tabs to it. */
.skip-link { position: absolute; left: var(--space-md); top: var(--space-xs); z-index: 1100; padding: var(--space-xs) var(--space-md); background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-control); font-weight: 600; transform: translateY(-200%); transition: transform var(--dur-micro) var(--ease-out); }
.skip-link:focus { transform: none; color: var(--color-accent-ink); outline: 2px solid var(--color-accent-2); outline-offset: 2px; }
/* ---------- Public homepage ---------- */
.home-hero { padding-block: var(--space-2xl); background: var(--color-paper-2); border-bottom: 1px solid var(--color-rule); }
.home-hero-grid { display: grid; gap: var(--space-xl); align-items: center; }
@media (min-width: 992px) { .home-hero { padding-block: var(--space-3xl); } .home-hero-grid { gap: var(--space-2xl); } }
@media (min-width: 992px) { .home-hero-grid { grid-template-columns: 1fr 1fr; } }
.home-title { margin: 0 0 var(--space-lg); font-size: clamp(var(--text-2xl), 1rem + 3vw, var(--text-4xl)); line-height: 1.1; letter-spacing: -0.02em; }
.home-title-sub { display: block; max-width: 30ch; margin-top: var(--space-md); font-size: var(--text-lg); font-weight: 500; line-height: 1.4; letter-spacing: 0; color: var(--color-muted); }
.home-lead { max-width: 46ch; margin: 0 0 var(--space-xl); color: var(--color-ink-2); font-size: var(--text-lg); line-height: 1.6; }
.home-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.home-sectors { margin: var(--space-lg) 0 0; padding-top: var(--space-md); border-top: 1px solid var(--color-rule); max-width: 46ch; color: var(--color-muted); font-size: var(--text-sm); }
.home-hero-media, .home-split-media { margin: 0; }
.home-hero-media img, .home-split-media img { display: block; width: 100%; height: auto; border-radius: var(--radius-panel); border: 1px solid var(--color-rule); }
.home-section { padding-block: var(--space-2xl) 0; }
.home-section:last-of-type { padding-bottom: var(--space-3xl); }
.home-h2 { margin: 0 0 var(--space-md); font-size: clamp(var(--text-xl), 1rem + 1.6vw, var(--text-3xl)); line-height: 1.15; letter-spacing: -0.01em; }
.home-h3 { margin: 0 0 var(--space-2xs); font-size: var(--text-lg); }
.home-section p, .home-intro { max-width: 68ch; line-height: 1.7; }
.home-split { display: grid; gap: var(--space-xl); align-items: center; }
@media (min-width: 992px) { .home-split { grid-template-columns: 0.9fr 1.1fr; } .home-split-media { order: -1; } }
.home-points { margin: var(--space-md) 0 0; padding: 0; list-style: none; line-height: 1.7; }
.home-points li { position: relative; padding-left: 32px; }
.home-points li::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 22px; height: 22px; border-radius: var(--radius-pill); background: var(--color-tint-strong); }
.home-points li::after { content: ""; position: absolute; left: 8px; top: calc(0.2em + 5px); width: 6px; height: 10px; border: solid var(--color-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.home-points li + li { margin-top: var(--space-2xs); }
/* Steps read as a connected timeline, not three boxed cards: vertical on phones, horizontal from 768px. */
.home-steps { display: grid; gap: var(--space-lg); margin: var(--space-xl) 0 0; padding: 0; list-style: none; }
.home-step { position: relative; padding: 4px 0 0 52px; }
.home-step p { margin: 0; max-width: 34ch; color: var(--color-ink-2); }
.home-step-num { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 6px var(--color-paper); }
.home-step:not(:last-child)::after { content: ""; position: absolute; left: 17.5px; top: 44px; bottom: calc(-1 * var(--space-lg) + 8px); width: 1px; background: var(--color-accent-2); }
@media (min-width: 768px) {
  .home-steps { grid-template-columns: repeat(3, 1fr); }
  .home-step { padding: 56px var(--space-lg) 0 0; }
  .home-step:not(:last-child)::after { left: 52px; right: calc(-1 * var(--space-lg) + 16px); top: 17.5px; bottom: auto; width: auto; height: 1px; }
}
.home-cta { position: relative; isolation: isolate; display: grid; gap: var(--space-md); align-items: center; padding: var(--space-xl) calc(var(--gutter) + var(--space-lg)); margin-top: var(--space-2xl); margin-bottom: var(--space-3xl); }
.home-cta::before { content: ""; position: absolute; inset: 0 var(--gutter); z-index: -1; background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); box-shadow: var(--shadow-panel); }
.home-section.home-cta { padding-bottom: var(--space-xl); }
.home-cta .home-h2, .home-cta p { margin: 0; }
@media (min-width: 768px) {
  .home-cta { grid-template-columns: 1fr auto; -moz-column-gap: var(--space-xl); column-gap: var(--space-xl); }
  .home-cta > div { grid-column: 2; grid-row: 1 / span 2; }
}
.home-cta .float { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-lg); margin: 0 !important; background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-pill); font-size: var(--text-md); font-weight: 600; text-decoration: none; transition: background-color var(--dur-short) var(--ease-out); }
.home-cta .float:hover, .home-cta .float:focus-visible { background: var(--color-accent-hover); color: var(--color-accent-ink); text-decoration: none; }
/* Entrance motion: hero on load, sections on scroll (class added by the page script only when motion is allowed). */
@keyframes home-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* Hero: title, lead and button rise one after another, then the photo. */
.home-hero-copy > * { animation: home-rise var(--dur-short) var(--ease-out) both; }
.home-hero-copy > :nth-child(2) { animation-delay: 80ms; }
.home-hero-copy > :nth-child(3) { animation-delay: 160ms; }
.home-hero-copy > :nth-child(4) { animation-delay: 200ms; }
.home-hero-media { animation: home-rise var(--dur-short) var(--ease-out) 240ms both; }
.js-reveal .home .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.js-reveal .home .reveal.is-in { opacity: 1; transform: none; }
/* Steps arrive left to right; the hover lift must not inherit the stagger delay. */
.js-reveal .home .home-step.reveal:nth-child(2) { transition-delay: 80ms; }
.js-reveal .home .home-step.reveal:nth-child(3) { transition-delay: 160ms; }
.js-reveal .home .home-step.reveal.is-in:hover { transition-delay: 0ms; }
/* Checklist points follow their section in. */
.js-reveal .home .home-points li { opacity: 0; transform: translateX(-8px); transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.js-reveal .home .is-in .home-points li { opacity: 1; transform: none; transition-delay: 120ms; }
.js-reveal .home .is-in .home-points li + li { transition-delay: 200ms; }
/* Hover feedback: photos and buttons lift slightly, the step number grows. */
.home-hero-media img, .home-split-media img { transition: transform var(--dur-short) var(--ease-out); }
.home-hero-media:hover img, .home-split-media:hover img { transform: translateY(-3px); }
.home-step-num { transition: transform var(--dur-short) var(--ease-out); }
.home-step:hover .home-step-num { transform: scale(1.08); }
.home-actions .btn { transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.home-actions .btn:hover { transform: translateY(-1px); }
.home-cta .float { transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.home-cta .float:hover { transform: translateY(-1px); }
.home-actions .btn:active, .home-cta .float:active { transform: none; }
/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; animation-delay: 0s !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .modal.fade .modal-dialog { transform: none; }
}
/* ---------- Illustrations, empty states, steps, breadcrumbs (production pass) ---------- */
.illo { display: block; margin: 0 auto var(--space-md); width: 160px; height: auto; }
.illo--sm { width: 96px; }
.empty-state { max-width: 32rem; margin: var(--space-xl) auto; padding: var(--space-xl) var(--space-md); text-align: center; color: var(--color-muted); }
.empty-title { margin: 0 0 var(--space-xs); font-size: var(--text-xl); font-weight: 700; color: var(--color-ink-2); letter-spacing: var(--tracking-display); }
.empty-state p { margin: 0 0 var(--space-md); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs) var(--space-sm); }
.steps { list-style: none; counter-reset: step; margin: 0 0 var(--space-lg); padding: 0; display: grid; gap: var(--space-sm); }
.step { counter-increment: step; position: relative; display: flex; flex-direction: column; gap: 2px; padding: var(--space-sm) var(--space-md) var(--space-sm) calc(var(--space-md) + 2.5rem); background: var(--color-surface); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); color: var(--color-muted); }
.step::before { content: counter(step); position: absolute; left: var(--space-md); top: var(--space-sm); width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-ink); font-weight: 700; font-size: var(--text-sm); }
.step strong { color: var(--color-ink-2); font-weight: 600; }
.step span { font-size: var(--text-sm); }
.step.is-done { background: var(--color-paper-2); }
.step.is-done::before { content: "\2713"; background: var(--color-success); }
.step.is-current { border-color: var(--color-accent-2); box-shadow: 0 0 0 2px var(--color-tint-strong); }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.flow-step { margin: 0 0 var(--space-xs); font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.breadcrumb { background: transparent; padding: 0; margin: 0 0 var(--space-md); border-radius: 0; font-size: var(--text-sm); }
.breadcrumb-item, .breadcrumb-item.active { color: var(--color-muted); }
.breadcrumb-item a { color: var(--color-ink-2); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--color-muted); }
.form-text { display: block; margin-top: var(--space-2xs); line-height: 1.45; }
/* ---------- Help page: minimal FAQ ---------- */
.help { max-width: 760px; }
.help-head { padding-bottom: var(--space-lg); margin-bottom: var(--space-xl); border-bottom: 1px solid var(--color-rule); }
.help-eyebrow { margin: 0 0 var(--space-xs); font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.help-head .page-sub { margin-bottom: var(--space-lg); }
.help-jump { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.help-jump a { padding: var(--space-xs) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.help-jump a:hover { background: var(--color-tint); border-color: var(--color-accent-2-edge); text-decoration: none; }
.help-group { margin-bottom: var(--space-xl); scroll-margin-top: var(--space-lg); }
.help-group-title { margin: 0 0 var(--space-sm); font-size: var(--text-lg); font-weight: 700; color: var(--color-ink-2); }
.faq { border-top: 1px solid var(--color-rule); }
.faq-item { border-bottom: 1px solid var(--color-rule); }
.faq-item summary { position: relative; display: block; padding: var(--space-md) var(--space-xl) var(--space-md) 0; font-weight: 600; color: var(--color-ink); cursor: pointer; list-style: none; transition: color var(--dur-micro) var(--ease-out); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: var(--space-2xs); top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--color-muted); border-bottom: 2px solid var(--color-muted); transform: rotate(45deg); transition: transform var(--dur-short) var(--ease-out); }
.faq-item[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq-item summary:hover { color: var(--color-ink-2); }
.faq-item summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-control); }
.faq-body { padding: 0 var(--space-xl) var(--space-md) 0; color: var(--color-muted); }
.faq-body p { margin: 0 0 var(--space-xs); }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body ol { margin: var(--space-xs) 0 0; padding-left: var(--space-lg); }
.faq-body li { margin-bottom: var(--space-2xs); }
.help-contact { padding: var(--space-lg); background: var(--color-paper-2); border-radius: var(--radius-panel); }
.help-contact-title { margin: 0 0 var(--space-2xs); font-size: var(--text-md); font-weight: 700; color: var(--color-ink-2); }
.help-contact p { margin: 0; color: var(--color-muted); }

