:root {
  color: var(--c-1c343f);
  background: var(--c-f5f8f9);
  color-scheme: light;
  font-family: var(--meridian-font);
}

* { box-sizing: border-box; }
/* Form controls use the page's typeface rather than the browser's. */
button, input, select, textarea { font-family: inherit; }

/* Same-origin page loads keep the current page on screen, then swap without a fade,
   instead of flashing an empty (often dark) window in between. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
body { margin: 0; }
.site-header { align-items: center; background: var(--c-ffffff); border-bottom: 1px solid var(--c-dde7eb); display: flex; justify-content: space-between; min-height: 4rem; padding: 0 2rem; }
.brand { color: var(--c-0d2631); font-size: 1.25rem; font-weight: 750; letter-spacing: -.02em; text-decoration: none; }
.page-shell { margin: 0 auto; max-width: 72rem; padding: 3rem 2rem; }
.company-switcher { align-items: center; display: flex; gap: .5rem; }
.company-switcher label { color: var(--c-5d6d76); font-size: .8rem; font-weight: 600; }
.company-switcher select { background: var(--c-ffffff); border: 1px solid var(--c-afbec4); border-radius: .4rem; color: var(--c-1c343f); padding: .45rem .6rem; }
.header-actions { align-items: center; display: flex; gap: 1rem; }
.account-name { color: var(--c-5d6d76); font-size: .82rem; font-weight: 600; }
.header-signout { background: transparent; border: 0; color: var(--c-1a4051); cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700; padding: .25rem; }
.header-signout:hover { text-decoration: underline; }
/* Breadcrumbs sit above each page heading: Overview or Home first, with a back arrow one level up. */
.page-breadcrumbs { align-items: center; display: flex; gap: .65rem; margin: 0 0 1.1rem; min-width: 0; }
.page-breadcrumbs ol { align-items: center; color: var(--console-muted, var(--c-70838d)); display: flex; flex-wrap: wrap; font-size: .81rem; font-weight: 650; gap: .25rem .55rem; list-style: none; margin: 0; min-width: 0; padding: 0; }
.page-breadcrumbs li { align-items: center; display: inline-flex; gap: .55rem; min-width: 0; }
.page-breadcrumbs li + li::before { background: var(--c-c3d3d9); border-radius: 50%; content: ''; flex: 0 0 auto; height: .24rem; width: .24rem; }
.page-breadcrumbs ol a { color: var(--console-teal-dark, var(--c-153b4b)); text-decoration: none; }
.page-breadcrumbs ol a:hover { text-decoration: underline; }
.page-breadcrumbs [aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-breadcrumbs__back { align-items: center; border: 1px solid var(--console-line, var(--c-deeaef)); border-radius: 50%; color: var(--console-teal-dark, var(--c-153b4b)); display: inline-flex; flex: 0 0 auto; height: 1.75rem; justify-content: center; width: 1.75rem; }
.page-breadcrumbs__back:hover { background: var(--console-teal-soft, var(--c-e4f4fa)); }
.page-breadcrumbs__back:focus-visible { outline: 2px solid var(--console-teal, var(--c-1d4a5f)); outline-offset: 2px; }
.page-breadcrumbs__back svg { fill: none; height: .9rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; width: .9rem; }
/* The same back button on its own at the top of a public page, e.g. sign in and the questionnaire. */
.page-breadcrumbs__back--large { height: 2.25rem; width: 2.25rem; }
.page-breadcrumbs__back--large svg { height: 1.05rem; width: 1.05rem; }
/* Messages after an action show as toasts at the top right, above the header and every page. */
.toast-stack { display: grid; gap: .5rem; max-width: min(24rem, calc(100vw - 2rem)); pointer-events: none; position: fixed; right: 1rem; top: .75rem; z-index: 1000; }
.toast { align-items: flex-start; animation: toast-in .2s ease-out, toast-out .3s ease-in 5s forwards; box-shadow: 0 12px 32px var(--c-173a49-160); display: flex; gap: .75rem; justify-content: space-between; line-height: 1.45; pointer-events: auto; }
.toast:hover, .toast:focus-within { animation-play-state: paused; }
.toast.error { animation: toast-in .2s ease-out; }
/* Shown above a modal dialog, the stack is a popover: keep it looking like the plain stack. */
.toast-stack[popover] { background: none; border: 0; color: inherit; height: auto; inset: .75rem 1rem auto auto; margin: 0; overflow: visible; padding: 0; width: auto; }
.toast__close { background: none; border: 0; border-radius: .35rem; color: inherit; cursor: pointer; flex: 0 0 auto; font: inherit; font-size: 1.15rem; line-height: 1; margin: -.15rem -.35rem 0 0; opacity: .7; padding: .15rem .35rem; }
.toast__close:hover { opacity: 1; }
.toast__close:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-.5rem); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-.5rem); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: toast-out 0s linear 3s forwards; } .toast.error { animation: none; } }
.flash-message { background: var(--c-eef7fb); border: 1px solid var(--c-b8dbe4); border-radius: .6rem; color: var(--c-163341); font-size: .9rem; padding: .75rem 1rem; }
.flash-message.error { background: var(--c-fff4f2); border-color: var(--c-efc9c4); color: var(--c-8e3e36); }
.eyebrow { color: var(--c-1a4051); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.02em; margin: .2rem 0 .75rem; }
.empty-state { background: var(--c-ffffff); border: 1px solid var(--c-dde7eb); border-radius: .75rem; margin-top: 2.5rem; padding: 2rem; }

@media (max-width: 44rem) {
  .site-header { gap: .75rem; min-height: auto; padding: .8rem 1rem; }
  .header-actions { gap: .55rem; }
  .company-switcher label, .account-name { display: none; }
  .company-switcher select { max-width: 10rem; }
  .page-shell { padding: 1.5rem 1rem; }
}

/* Date-and-time pickers (care/widgets.py): the date, then a Time list of quarter hours, side by side. */
.quarter-hour-picker { display: grid; gap: .5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-width: 0; width: 100%; }

/* Booking an appointment: Patient, Clinician and Appointment type each on a line, then Date, Time and Duration in thirds. */
.booking-fields { display: grid; gap: .9rem; }
.booking-fields__when { display: grid; gap: .75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.booking-fields__when .console-form__field { min-width: 0; }
.booking-fields__when--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.booking-fields select:disabled, [data-time-range] select:disabled { background: var(--c-f3f6f7); color: var(--c-8c9aa1); cursor: not-allowed; }
@media (max-width: 34rem) { .booking-fields__when { grid-template-columns: minmax(0, 1fr); } }
