/* ---------------------------------------------------------------------------
   Little Oaks Parent Portal
   Palette drawn from littleoakswaterloo.ca: plum #6b5478 with warm paper
   neutrals and an oak/acorn amber accent. Fraunces for headings, Nunito Sans
   for everything else.
--------------------------------------------------------------------------- */

:root {
    --paper: #f7f4ee;
    --card: #fffdf9;
    --ink: #3a3244;
    --muted: #7c7386;
    --plum: #6b5478;
    --plum-dark: #56425f;
    --plum-tint: #efe9f1;
    --oak: #b9884c;
    --oak-tint: #f4ead9;
    --sage: #63875f;
    --sage-tint: #e7efe4;
    --danger: #a1453e;
    --danger-tint: #f6e6e3;
    --line: #e7e1d6;
    --shadow: 0 1px 2px rgba(58, 50, 68, 0.06), 0 6px 18px rgba(58, 50, 68, 0.07);
    --radius: 16px;
    --radius-small: 10px;
    --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink);
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(107, 84, 120, 0.06), transparent 60%),
        var(--paper);
}

a { color: var(--plum); }

:focus-visible {
    outline: 3px solid var(--oak);
    outline-offset: 2px;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------------------ header */

.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--ink);
}

.wordmark__text {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.05;
    display: flex;
    flex-direction: column;
}

.wordmark__text small {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--oak);
}

.acorn { flex-shrink: 0; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.site-nav a {
    text-decoration: none;
    font-weight: 600;
    color: var(--ink);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
}

.site-nav a:hover { background: var(--plum-tint); }

.site-nav a.is-active {
    background: var(--plum);
    color: #fff;
}

.site-nav__user {
    color: var(--muted);
    padding-left: 0.5rem;
    border-left: 1px solid var(--line);
    margin-left: 0.35rem;
}

.site-nav__signout { color: var(--muted); font-weight: 400; }

/* ------------------------------------------------------------------ layout */

.container {
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3rem;
    flex: 1;
}

.page-head { margin: 0.5rem 0 1.75rem; }

.page-head h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.7rem, 3.5vw, 2.3rem);
    margin: 0 0 0.3rem;
}

.page-head h1 em {
    font-style: italic;
    color: var(--plum);
}

.page-head__sub {
    margin: 0;
    color: var(--muted);
    max-width: 55ch;
}

.page-head--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-head__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.section { margin: 2.25rem 0; }

.section__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    margin: 0 0 0.35rem;
}

.section__sub {
    margin: 0 0 1rem;
    color: var(--muted);
}

/* --------------------------------------------------------------- tabs (matches .admin-nav) */

.tabs__nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.5rem;
}

.tabs__tab {
    font: inherit;
    text-decoration: none;
    font-weight: 600;
    color: var(--muted);
    background: none;
    cursor: pointer;
    padding: 0.55rem 0.9rem;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.tabs__tab:hover { color: var(--ink); }

.tabs__tab.is-active {
    color: var(--plum-dark);
    border-bottom-color: var(--oak);
}

.tabs__panel[hidden] { display: none; }

.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
}

.site-footer p { margin: 0.15rem 0; }

/* ----------------------------------------------------------------- flashes */

.flash {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-small);
    margin-bottom: 1rem;
    font-weight: 600;
}

.flash--success { background: var(--sage-tint); color: var(--sage); }
.flash--error { background: var(--danger-tint); color: var(--danger); }

/* ------------------------------------------------------------------- cards */

.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.child-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.child-card__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--plum-tint);
    color: var(--plum-dark);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    flex-shrink: 0;
}

.child-card__meta h3 { margin: 0; font-size: 1.05rem; }
.child-card__meta p { margin: 0.1rem 0 0.35rem; color: var(--muted); font-size: 0.9rem; }

.room-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: var(--oak-tint);
    color: var(--oak);
}

.camera-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: var(--ink);
    transition: transform 120ms ease, border-color 120ms ease;
}

.camera-card:hover {
    transform: translateY(-2px);
    border-color: var(--plum);
}

.camera-card__screen {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-small);
    display: grid;
    place-items: center;
    background: var(--plum);
    color: #fff;
    flex-shrink: 0;
}

.camera-card__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.camera-card__name { font-weight: 700; }
.camera-card__location { color: var(--muted); font-size: 0.88rem; }

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sage);
    background: var(--sage-tint);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.live-pill__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sage);
    animation: live-breathe 2.4s ease-in-out infinite;
}

@keyframes live-breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .live-pill__dot { animation: none; }
    .camera-card { transition: none; }
}

/* ------------------------------------------------------------- empty state */

.empty-state {
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--muted);
}

.empty-state p { margin: 0.25rem 0; }

/* Extra breathing room below a work-queue notice sitting above a search box. */
.empty-state--spaced { margin-bottom: 1.5rem; }

/* ------------------------------------------------------------------ player */

.player-frame {
    position: relative;
    background: #241d2b;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.player-frame video.is-offline { visibility: hidden; }

.player-offline {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 0.25rem;
    text-align: center;
    color: #efe9f1;
    padding: 1.5rem;
}

/* display:grid above would otherwise override the browser's built-in
   [hidden] rule — this keeps the JS's hidden-toggling authoritative. */
.player-offline[hidden] { display: none; }

/* Configuration landing page tiles, grouped into labelled subsections. */
.config-group { margin-bottom: 2.2rem; }
.config-group:last-child { margin-bottom: 0; }
.config-group__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--line);
}
.config-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.config-tile {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid rgba(107, 84, 120, 0.14);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
a.config-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(107, 84, 120, 0.14);
    border-color: rgba(107, 84, 120, 0.35);
}
.config-tile__icon {
    flex: 0 0 auto;
    display: grid;
    place-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(107, 84, 120, 0.1);
    color: #6b5478;
}
.config-tile__icon .icon { width: 22px; height: 22px; }
.config-tile__body h2 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.config-tile__body p { margin: 0 0 0.6rem; font-size: 0.88rem; color: #6f6770; }
.config-tile--soon { opacity: 0.6; }

/* Icon-only action buttons in listings (tooltip via title, sr-only label). */
.btn--icon {
    padding: 0.42rem 0.55rem;
    line-height: 0;
}
.btn--icon .icon { display: inline-block; vertical-align: middle; }

.player-offline p { margin: 0.2rem 0; }
.player-offline .btn { margin: 0.9rem auto 0; }

.camera-switch {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.camera-switch__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.camera-switch__pill {
    text-decoration: none;
    font-weight: 600;
    color: var(--plum-dark);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
}

.camera-switch__pill:hover { border-color: var(--plum); }

/* Slideshow: a wall of live tiles, built by camera_grid_controller.js. Each
   tile reuses .player-frame/.player-offline, so it looks like the single-camera
   player at tile size. */
.camera-grid {
    display: grid;
    gap: 1rem;
    /* Three across, matching the 3x3 wall the screen view fills. */
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .camera-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .camera-grid { grid-template-columns: 1fr; }
}

.camera-tile__label {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    max-width: calc(100% - 1.1rem);
    background: rgba(36, 29, 43, 0.72);
    color: #efe9f1;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.camera-tile__flag {
    display: inline-block;
    background: rgba(239, 233, 241, 0.22);
    border-radius: 999px;
    padding: 0 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Expanded onto a television: nothing but the feeds, edge to edge. The tile
   spans are dealt out by camera_grid_controller.js so no screenful ever
   leaves a hole. */
.camera-stage:fullscreen {
    background: #000;
    width: 100vw;
    height: 100vh;
}

.camera-stage:fullscreen .camera-grid {
    gap: 0;
    height: 100vh;
}

.camera-stage:fullscreen .player-frame {
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
}

/* Fill the tile rather than letterbox it — a wall of black bars is exactly
   the gap this view is meant to avoid. */
.camera-stage:fullscreen .player-frame video {
    object-fit: cover;
}

.camera-stage:fullscreen .camera-grid__indicator {
    display: none;
}

/* Informational only — never looks or behaves like a control. */
.camera-grid__indicator {
    margin: 0 0 0.9rem;
    color: var(--muted);
    font-size: 0.9rem;
}

/* ----------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    padding: 0.55rem 1.1rem;
    cursor: pointer;
    background: none;
    color: var(--ink);
}

.btn--primary { background: var(--plum); color: #fff; }
.btn--primary:hover { background: var(--plum-dark); }

.btn--secondary {
    background: var(--card);
    border-color: var(--plum);
    color: var(--plum-dark);
}
.btn--secondary:hover { background: var(--plum-tint); }

.btn--ghost { color: var(--plum-dark); }
.btn--ghost:hover { background: var(--plum-tint); }

.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-tint); }

.btn--small { font-size: 0.83rem; padding: 0.3rem 0.7rem; }

.btn--block { width: 100%; }

/* ------------------------------------------------------------------- admin */

.admin-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.5rem;
}

.admin-nav a {
    text-decoration: none;
    font-weight: 600;
    color: var(--muted);
    padding: 0.55rem 0.9rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.admin-nav a:hover { color: var(--ink); }

.admin-nav a.is-active {
    color: var(--plum-dark);
    border-bottom-color: var(--oak);
}

/*
 * The pages inside the open section. Deliberately a different shape from the
 * section row above it — pills rather than underlined tabs — because two
 * identical tab strips stacked on top of each other read as one broken one,
 * which is exactly what the old people sub-nav did by reusing .admin-nav.
 */
.admin-nav:has(+ .admin-subnav) { margin-bottom: 0.75rem; }

.admin-subnav {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.admin-subnav a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
}

.admin-subnav a:hover { background: var(--plum-tint); color: var(--plum-dark); }

.admin-subnav a.is-active {
    background: var(--plum);
    color: #fff;
}

.stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-card:hover { border-color: var(--plum); }

.stat-card__number {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--plum-dark);
    line-height: 1;
}

.stat-card__number small {
    font-size: 1.1rem;
    color: var(--muted);
    font-weight: 400;
}

.stat-card__label { color: var(--muted); font-weight: 600; }
.stat-card__note { color: var(--muted); font-size: 0.85rem; }

.quick-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ------------------------------------------------------------------ tables */

/* Positioned so its scrolling also holds the absolutely positioned
   .sr-only labels in action cells. Without it they are laid out against the
   page instead, past the table's scroll, and widen the whole page on a
   phone. */
.table-wrap {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.data-table thead th {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--paper);
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table__actions {
    text-align: right;
    white-space: nowrap;
}

/* ...except when it holds a form: a select plus a button needs to be able
   to wrap, or it pushes the table into a horizontal scroll on the narrower
   admin screens. */
.data-table__actions:has(.inline-form) { white-space: normal; }

/* Values that mean less broken in half than scrolled to: a person's name,
   a date range, an amount. Pair with .table-wrap, which scrolls. */
.data-table__nowrap { white-space: nowrap; }

/* A quieter second line under the main value in a cell — an age under a
   name, a date under a title. Keeps a column to one idea instead of
   spending a whole column on each half of it. */
.data-table__sub {
    display: block;
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

/* Full width is right in a form column and wrong in a table cell, where it
   would stretch the column to whatever the widest option is. */
.data-table select,
.data-table input[type="text"] {
    width: auto;
    max-width: 14rem;
    font-size: 0.94rem;
    padding: 0.4rem 0.55rem;
}

/* The bulk-action bar above a queue table. */
.table-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.table-actions__hint { color: var(--muted); font-size: 0.9rem; }

/* The select-all and per-row checkboxes: big enough to hit, aligned with
   the text beside them. */
.data-table input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--sage);
    vertical-align: middle;
}

/* An action cell holding a control plus its button: right-aligned as a
   group, and allowed to wrap onto two lines on a narrow screen rather than
   forcing the whole table into a sideways scroll. */
.data-table__actions .inline-form {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.data-table__actions form { display: inline-block; margin-left: 0.25rem; }

/*
 * A single-line list of row actions inside a table cell — distinct from
 * .form-actions (a block-level row below a card, with its own top border
 * and margin, which looks broken when reused inside <td>: every action
 * became its own bordered block, stacking the row several lines tall).
 * Each action (a <form>, <a>, or <span>) is a direct child; a subdued
 * vertical rule separates them instead of a pipe glyph.
 *
 * Deliberately NON-wrapping: a wrapped divider orphaned onto its own line
 * looks broken. If a row's actions don't fit, .table-wrap's horizontal
 * scroll is the intended overflow behaviour, not an internal second line —
 * keep the action count per row small (2-3) so this stays moot in practice.
 */
.row-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}

.row-actions > * { display: inline-flex; align-items: center; margin: 0; }

.row-actions > * + * {
    margin-left: 0.65rem;
    padding-left: 0.65rem;
    border-left: 1px solid var(--line);
}

/* Left-aligned instead of the default right-aligned (data-table__actions) —
   for a badge-plus-link pairing inside an ordinary data cell. */
.row-actions--start { justify-content: flex-start; }

/*
 * A muted detail line directly under a data-table row, for secondary facts
 * that don't need their own always-visible column (invoice period, due
 * date, paid-via, refund status) — keeps the primary row down to the few
 * columns that matter, which is what actually keeps a table usable at
 * mobile widths instead of forcing every column to shrink.
 */
.data-table__row--with-subrow td { border-bottom: none; padding-bottom: 0.35rem; }

.data-table__subrow td {
    padding-top: 0;
    padding-bottom: 0.85rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.data-table__meta { display: flex; flex-wrap: wrap; row-gap: 0.25rem; }

.data-table__meta > * + * {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--line);
}

/* A row action rendered as plain text rather than a pill button — for
   compact single-line lists like "Mark configured | End billing". */
.row-actions__link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--plum-dark);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.row-actions__link:hover { text-decoration: underline; }
.row-actions__link--danger { color: var(--danger); }
.row-actions__link--muted { color: var(--muted); font-weight: 500; }

/* A form's own internal controls (e.g. a payer <select> beside its submit
   button) laid out inline, without .form-actions' card-row chrome. */
.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.search-box { margin-bottom: 1rem; }

.search-box__input {
    width: 100%;
    max-width: 22rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.94rem;
    background: var(--card);
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.table-pagination .btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.muted { color: var(--muted); }

.code-chip {
    font-size: 0.82rem;
    background: var(--plum-tint);
    color: var(--plum-dark);
    border-radius: 6px;
    padding: 0.12rem 0.45rem;
    word-break: break-all;
}

.status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    /* A pill that wraps reads as two broken words rather than one status —
       "NOT BILLED" split across two lines was the giveaway. It is short by
       definition, so it never needs to break. */
    white-space: nowrap;
}

.status--on { background: var(--sage-tint); color: var(--sage); }
.status--off { background: var(--danger-tint); color: var(--danger); }

.form-error { color: var(--danger); font-size: 0.9rem; margin-top: 0.5rem; }
.form-error:empty { display: none; }

.card-element {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: var(--card);
    margin-bottom: 1rem;
}

/* ------------------------------------------------------------------- forms */

.form-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    max-width: 680px;
    margin-top: 1rem;
}

/* A card holding a table takes the page's width. 680px is a form's
   measure; a five- or six-column table squeezed into it either spills
   through the card's edge or scrolls its action buttons out of sight. */
.form-card:has(> .table-wrap) { max-width: none; }

.form-grid {
    display: grid;
    gap: 0 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-card div:not(.form-grid):not(.form-actions),
.form-row {
    margin-bottom: 1rem;
}

.form-card label,
.form-row label,
.login-form label,
.section form label {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 0.3rem;
}

/* Every container that holds a Symfony-rendered form.
   form_row() emits a bare <div> (form_div_layout, the stock theme), so it
   carries no .form-row class — only hand-written markup like the login page
   does. Anything relying on form_row therefore has to name its container
   here, or its inputs render as unstyled browser defaults. That is what
   happened to the whole parent-facing sign-up flow: the invite landing page,
   the PIN screens and the enrolment form all rendered plain. */
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card input[type="password"],
.form-card input[type="date"],
.form-card input[type="number"],
.form-card input[type="url"],
.form-card select,
.form-card textarea,
.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="tel"],
.login-form input[type="password"],
.login-form input[type="number"],
.login-form select,
.login-form textarea,
.section form input[type="text"],
.section form input[type="email"],
.section form input[type="tel"],
.section form input[type="password"],
.section form input[type="date"],
.section form input[type="number"],
.section form select,
.section form textarea,
/* Controls sitting inside a data table — a room picker on a queue row —
   were left unstyled, because every rule above is scoped to a card or a
   section form and a table-wrap is neither. */
.data-table select,
.data-table input[type="text"],
.form-row input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    padding: 0.6rem 0.75rem;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.login-form input:focus,
.login-form select:focus,
.login-form textarea:focus,
.section form input:focus,
.section form select:focus,
.section form textarea:focus,
.data-table select:focus,
.data-table input[type="text"]:focus,
.form-row input:focus {
    border-color: var(--plum);
    outline: 3px solid var(--plum-tint);
}

.form-card .help-text,
.form-card .form-help,
.form-card [id$="_help"],
.login-form .help-text,
.login-form [id$="_help"],
.section form .help-text,
.section form [id$="_help"] {
    display: block;
    font-size: 0.83rem;
    color: var(--muted);
    font-weight: 400;
    margin-top: 0.3rem;
}

/* Symfony renders errors as <ul>; keep them close to the field. */
.form-card ul,
.login-form ul,
.section form ul {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    color: var(--danger);
    font-size: 0.86rem;
    font-weight: 600;
}

/* The "your card never reaches us" note under the Stripe field. Says it
   where somebody is about to type a card number rather than leaving it to
   the privacy policy. The icon sits on the first line of the text. */
.card-assurance {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.86rem;
    line-height: 1.5;
}

.card-assurance .icon {
    flex: none;
    margin-top: 0.15rem;
    color: var(--plum);
}

/* A life insurance election: read in full before signing, and kept as signed. */
.election-document { line-height: 1.6; max-width: 46rem; white-space: pre-wrap; }
details > .election-document { margin-top: 0.75rem; }

/* Authenticator setup: a phone only scans a QR code that is dark on light,
   so it keeps a white backing in the dark theme too. */
.qr-code {
    display: inline-block;
    background: #fff;
    padding: 0.75rem;
    border-radius: 8px;
    line-height: 0;
}

.qr-code svg {
    width: 220px;
    max-width: 100%;
    height: auto;
}

/* Checkbox groups (children / guardians pickers) */
.form-card input[type="checkbox"] {
    width: auto;
    accent-color: var(--plum);
    margin-right: 0.45rem;
    transform: scale(1.15);
}

.form-card div > div > label { font-weight: 400; }

/* Tom Select (Symfony UX Autocomplete) — the library ships its own DOM,
   separate from a plain <select>, so the form input rules above never
   reach it; it needs its own theme to match instead of the library's
   default blue-and-white look. */
.ts-wrapper { font-family: var(--font-body); font-size: 1rem; }

.ts-wrapper .ts-control {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    padding: 0.45rem 0.6rem;
    box-shadow: none;
    color: var(--ink);
}

.ts-wrapper.focus .ts-control {
    border-color: var(--plum);
    outline: 3px solid var(--plum-tint);
    box-shadow: none;
}

.ts-wrapper .ts-control > input {
    color: var(--ink);
    font-family: var(--font-body);
}

.ts-wrapper .ts-control > input::placeholder { color: var(--muted); }

/* Selected-item "chips" in multi-select fields (guardians/children pickers).
   Tom Select's own stylesheet re-declares this exact look via a
   "[data-value]" attribute selector further down in its file, which outranks
   a plain "> div" selector on specificity alone (4 class/attribute selectors
   vs. 3) regardless of stylesheet order — so this has to match that same
   shape, scoped under .form-card, to actually win. */
.form-card .ts-wrapper.multi .ts-control > div,
.form-card .ts-wrapper.multi .ts-control [data-value] {
    background: var(--plum-tint);
    background-image: none;
    color: var(--plum-dark);
    border: 1px solid var(--plum);
    border-radius: 999px;
    padding: 0.15rem 0.7rem;
    font-size: 0.88rem;
    text-shadow: none;
    box-shadow: none;
}

.form-card .ts-wrapper.multi .ts-control > div.active,
.form-card .ts-wrapper.multi .ts-control [data-value].active {
    background: var(--plum);
    background-image: none;
    color: #fff;
    border-color: var(--plum-dark);
}

.ts-dropdown {
    font-family: var(--font-body);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius-small) var(--radius-small);
    box-shadow: var(--shadow);
    margin-top: 0.3rem;
}

.ts-dropdown .option,
.ts-dropdown .optgroup-header,
.ts-dropdown .no-results,
.ts-dropdown .create {
    padding: 0.5rem 0.7rem;
    color: var(--ink);
}

.ts-dropdown .optgroup-header { background: var(--paper); color: var(--muted); }

.ts-dropdown [data-selectable] .highlight {
    background: var(--oak-tint);
    color: var(--ink);
    border-radius: 3px;
}

.ts-dropdown .active {
    background-color: var(--plum-tint);
    color: var(--plum-dark);
}

.ts-dropdown .create { color: var(--muted); }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------------- login */

.login-page {
    background:
        radial-gradient(900px 420px at 15% -10%, rgba(185, 136, 76, 0.09), transparent 60%),
        radial-gradient(1200px 500px at 85% 110%, rgba(107, 84, 120, 0.10), transparent 60%),
        var(--paper);
}

.login-main {
    display: grid;
    place-items: center;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 1.75rem;
    margin: 2.5rem 0;
}

.login-card__brand { text-align: center; margin-bottom: 1.5rem; }

.login-card__brand .acorn { width: 44px; height: 44px; }

.login-card__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.8rem;
    margin: 0.4rem 0 0.15rem;
}

.login-card__tag {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.login-card__tag em { color: var(--plum); }

.login-card__intro {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

.login-form { margin-top: 1.25rem; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    margin: 0.25rem 0 1.25rem;
    cursor: pointer;
}

.checkbox-row input { accent-color: var(--plum); transform: scale(1.15); }

.login-card__help {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.86rem;
    color: var(--muted);
}

.login-card__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.login-card__divider::before,
.login-card__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.login-card__oauth {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Rendered Markdown (terms & conditions) — the source is authored by admins
   as Markdown (see TermsVersionType) and rendered to HTML via the
   markdown_to_html Twig filter; this styles the resulting tags. */
.terms-doc__content h1,
.terms-doc__content h2,
.terms-doc__content h3,
.terms-doc__content h4 {
    font-family: var(--font-display);
    color: var(--ink);
    margin: 1.5rem 0 0.5rem;
}

.terms-doc__content h1:first-child,
.terms-doc__content h2:first-child,
.terms-doc__content h3:first-child,
.terms-doc__content h4:first-child {
    margin-top: 0;
}

.terms-doc__content h1 { font-size: 1.5rem; }
.terms-doc__content h2 { font-size: 1.3rem; }
.terms-doc__content h3 { font-size: 1.1rem; }
.terms-doc__content h4 { font-size: 1rem; }

.terms-doc__content p,
.terms-doc__content ul,
.terms-doc__content ol {
    margin: 0 0 1rem;
    line-height: 1.6;
}

.terms-doc__content ul,
.terms-doc__content ol {
    padding-left: 1.4rem;
}

.terms-doc__content li { margin-bottom: 0.35rem; }

.terms-doc__content hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 1.5rem 0;
}

/* Tables in an admin-authored document — a parties block, a fee schedule,
   a signature grid. Unstyled they arrive as bare browser default rows,
   which reads as broken in a document somebody is being asked to sign.
   Scrollable rather than squeezed: a legal table is wider than a phone. */
.terms-doc__content table {
    width: 100%;
    margin: 0 0 1.25rem;
    border-collapse: collapse;
    font-size: 0.95rem;
    display: block;
    overflow-x: auto;
}

.terms-doc__content th,
.terms-doc__content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.terms-doc__content thead th {
    background: var(--paper);
    font-weight: 700;
}

/* An empty cell is a blank to be filled — in a signature block that is the
   whole point of the row, so it must not collapse to nothing. */
.terms-doc__content td:empty::after {
    content: "";
    display: inline-block;
    min-height: 1.2em;
}

.terms-doc__content blockquote {
    margin: 0 0 1rem;
    padding: 0.5rem 1rem;
    border-left: 3px solid var(--plum);
    background: var(--plum-tint);
    color: var(--muted);
}

.terms-doc__content code {
    font-family: monospace;
    background: var(--paper);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.terms-doc__content a { color: var(--plum); }

.terms-source summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--plum-dark);
}

.terms-source[open] summary { margin-bottom: 1rem; }

.terms-source .form-actions { margin: 0.75rem 0; }

.terms-source__textarea {
    width: 100%;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    padding: 0.75rem;
    resize: vertical;
}

/* ------------------------------------------------------------------ mobile */

@media (max-width: 700px) {
    /* Denser tables buy more room before .table-wrap needs to scroll
       horizontally — the intended overflow behaviour on narrow screens,
       rather than squeezing action rows into an awkward multi-line wrap. */
    .data-table th,
    .data-table td { padding: 0.6rem 0.65rem; font-size: 0.88rem; }
    .data-table thead th { font-size: 0.68rem; }
    .data-table__subrow td { font-size: 0.78rem; }
}

@media (max-width: 560px) {
    .site-header__inner { justify-content: center; text-align: center; }
    .page-head--row { align-items: stretch; }
    .page-head--row .btn { align-self: flex-start; }
}

/* ------------------------------------------------------- guided walkthroughs */

.guide-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(58, 50, 68, 0.45);
}

.guide-modal[hidden] { display: none; }

.guide-modal__card {
    background: var(--card, #fffdf9);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(58, 50, 68, 0.35);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem 1.6rem;
}

.guide-modal__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--oak, #b9884c);
}

.guide-modal__head h2 {
    font-family: var(--font-display, Georgia, serif);
    margin: 0.15rem 0 0.1rem;
}

.guide-modal__progress {
    margin: 0 0 0.75rem;
    color: var(--muted, #7c7386);
    font-size: 0.85rem;
}

.guide-modal__foot {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

/* ----------------------------------------------------------- dialog popups */

/* A native <dialog> opened with showModal(): the browser supplies the
   backdrop, Esc to close, and keeps focus inside. Dressed like the guide
   modal above. The card and its footer are not divs, because
   `.form-card div` spaces every div in a card and a dialog can sit in one. */
.dialog {
    width: min(460px, calc(100vw - 2rem));
    max-height: 85vh;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 18px 50px rgba(58, 50, 68, 0.35);
}

.dialog::backdrop { background: rgba(58, 50, 68, 0.45); }

.dialog__card { display: block; padding: 1.5rem 1.6rem; }

.dialog__title {
    font-family: var(--font-display);
    margin: 0 0 0.35rem;
}

.dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

/* A button that reads as a link — a number that opens a popup — so it
   looks tappable beside the real links in the same table. */
.link-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--plum);
    text-decoration: underline;
    cursor: pointer;
}

/* A numbered list in a popup — the children a count is made of. */
.dialog__list {
    margin: 0.8rem 0 0;
    padding-left: 1.6rem;
    line-height: 1.7;
}

/* ==========================================================================
   Shop — shop.littleoakswaterloo.ca
   --------------------------------------------------------------------------
   Public storefront. For most visitors this is the first thing they see of
   the centre online, so it carries real retail furniture rather than the
   admin components it borrowed while it had nothing to sell. Same tokens as
   the portals (plum, paper, Fraunces + Nunito) so it reads as one brand.
   ========================================================================== */

.shop-body { background: var(--paper); }

.shop-container {
    width: 100%;
    /* 1140 keeps a 4-up product row at a comfortable card width and stops
       body copy running to unreadable line lengths on wide monitors. */
    max-width: 71.25rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.shop-main { flex: 1; padding: 2.5rem 0 4rem; }

/* Header ----------------------------------------------------------------- */

.shop-header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.shop-header__inner {
    width: 100%;
    max-width: 71.25rem;
    margin: 0 auto;
    padding: .85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.shop-nav { display: flex; align-items: center; gap: 1.25rem; }

.shop-nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
}

.shop-nav a:hover { color: var(--plum); }

.basket-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    transition: border-color .12s ease, background .12s ease;
}

.basket-link:hover { border-color: var(--plum); background: var(--plum-tint); }
.basket-link--full { border-color: var(--plum); background: var(--plum-tint); }

.basket-count {
    display: inline-grid;
    place-items: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--plum);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
}

/* Hero ------------------------------------------------------------------- */

.shop-hero { text-align: center; max-width: 40rem; margin: .5rem auto 2.75rem; }

.shop-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 2.9rem);
    line-height: 1.15;
    margin: 0 0 .6rem;
    color: var(--ink);
}

.shop-hero p { color: var(--muted); margin: 0; font-size: 1.05rem; line-height: 1.6; }

/* Product grid ----------------------------------------------------------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
    gap: 1.5rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.product-card:hover,
.product-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: #d9cfe0;
}

.product-card__media {
    position: relative;
    aspect-ratio: 1;
    /* A tint rather than white: the mockups have white backgrounds, so a
       white well makes the garment float with no edge to the card. */
    background: var(--plum-tint);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.product-card__media img,
.gallery__main img,
.swatch img,
.line-media img {
    width: 100%;
    height: 100%;
    /* Contained, never cropped: filling the square cuts the chest print off,
       and the print is the entire thing being sold. */
    object-fit: contain;
    display: block;
    transition: transform .35s ease;
}

.product-card:hover .product-card__media img { transform: scale(1.04); }

.badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: var(--card);
    color: var(--plum);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .2rem .65rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.product-card__body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .3rem; }

.product-card__body h2 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: var(--ink);
}

.product-card__price { margin: 0; color: var(--plum); font-weight: 700; font-size: 1.05rem; }
.product-card__meta { margin: 0; color: var(--muted); font-size: .85rem; }

/* Reassurance strip ------------------------------------------------------ */

.assurances {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 1.25rem;
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
}

.assurance h3 {
    font-family: var(--font-body);
    font-size: .98rem;
    margin: 0 0 .3rem;
    color: var(--ink);
}

.assurance p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }

/* Product detail --------------------------------------------------------- */

.breadcrumb { margin: 0 0 1.5rem; font-size: .9rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--plum); }

.product-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }

@media (min-width: 52rem) {
    .product-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; }
}

.gallery__main {
    aspect-ratio: 1;
    background: var(--plum-tint);
    border-radius: var(--radius);
    overflow: hidden;
    display: grid;
    place-items: center;
}

.gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

.gallery__thumb {
    display: block;
    width: 4rem;
    height: 4rem;
    padding: 0;
    border: 2px solid var(--line);
    border-radius: var(--radius-small);
    overflow: hidden;
    background: var(--plum-tint);
    cursor: pointer;
}

.gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery__thumb--active { border-color: var(--plum); }
.gallery__thumb:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }

.product-detail h1 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.2vw, 2.3rem);
    line-height: 1.2;
    margin: .5rem 0 .4rem;
    color: var(--ink);
}

.product-detail__price { font-size: 1.55rem; font-weight: 700; color: var(--plum); margin: 0 0 .35rem; }
.product-detail__colour { color: var(--muted); margin: 0 0 1.75rem; }
.product-detail__lede { color: var(--muted); line-height: 1.65; margin: 0 0 1.75rem; }

.option-group { margin-bottom: 1.5rem; }

.option-group__label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-weight: 700;
    margin-bottom: .6rem;
    color: var(--ink);
}

.option-group__label .muted { font-weight: 400; font-size: .875rem; }

/* Real radios, restyled — keyboard and screen-reader behaviour stays the
   browser's rather than being reinvented with divs. */
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: .55rem; }

.swatch input, .size-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.swatch span {
    display: block;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-small);
    border: 2px solid var(--line);
    overflow: hidden;
    background: var(--plum-tint);
    cursor: pointer;
}

.swatch input:checked + span { border-color: var(--plum); }
.swatch input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 2px; }

.size-option span {
    display: inline-block;
    min-width: 3.1rem;
    padding: .6rem .9rem;
    text-align: center;
    border-radius: var(--radius-small);
    border: 1px solid var(--line);
    background: var(--card);
    cursor: pointer;
    font-weight: 600;
    transition: all .12s ease;
}

.size-option input:checked + span { background: var(--plum); border-color: var(--plum); color: #fff; }
.size-option input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 2px; }
.size-option input:disabled + span { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.buy-row { display: flex; gap: .75rem; align-items: stretch; margin-bottom: 1rem; }

.buy-row input[type="number"] {
    width: 5rem;
    padding: .8rem .7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    font: inherit;
    text-align: center;
    background: var(--card);
}

.buy-row .btn { flex: 1; }

.btn--lg { padding: .85rem 1.5rem; font-size: 1rem; }

.product-facts { margin-top: 2rem; border-top: 1px solid var(--line); }

.product-facts__row {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 1rem;
    padding: .85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .92rem;
}

.product-facts__row dt { color: var(--muted); margin: 0; }
.product-facts__row dd { margin: 0; color: var(--ink); }

/* Basket ----------------------------------------------------------------- */

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    /* Contains a floated .panel__action. Without it, an action placed
       last in the panel (Sync now, on the payroll page) hangs out through
       the bottom border. */
    display: flow-root;
}

.panel + .panel { margin-top: 1.5rem; }

.panel__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0 0 1rem;
    color: var(--ink);
}

.line-item {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}

.line-item:last-of-type { border-bottom: 0; }

.line-media {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--radius-small);
    background: var(--plum-tint);
    overflow: hidden;
}

.line-item__name { font-weight: 700; margin: 0 0 .15rem; }
.line-item__meta { color: var(--muted); font-size: .875rem; margin: 0; }
.line-item__right { text-align: right; display: grid; gap: .35rem; justify-items: end; }
.line-item__total { font-weight: 700; white-space: nowrap; }

.line-item input[type="number"] {
    width: 4.2rem;
    padding: .45rem .5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    font: inherit;
    text-align: center;
    background: var(--card);
}

.totals { display: grid; gap: .5rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.totals__row { display: flex; justify-content: space-between; gap: 2rem; }
.totals__row--grand { font-size: 1.15rem; font-weight: 700; }

.shop-empty { text-align: center; padding: 3.5rem 1rem; }
.shop-empty p { color: var(--muted); margin-bottom: 1.5rem; font-size: 1.05rem; }

/* Checkout --------------------------------------------------------------- */

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }

@media (min-width: 56rem) {
    .checkout-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
    .checkout-summary { position: sticky; top: 5.5rem; }
}

.shipping-option {
    display: block;
    padding: .95rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    margin-bottom: .65rem;
    cursor: pointer;
    background: var(--card);
    transition: border-color .12s ease, background .12s ease;
}

.shipping-option:has(input:checked) { border-color: var(--plum); background: var(--plum-tint); }
.shipping-option strong { color: var(--plum); }

/* Order confirmation ----------------------------------------------------- */

.order-hero { text-align: center; max-width: 34rem; margin: 1rem auto 2.5rem; }
.order-hero h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0 0 .6rem; }
.order-hero p { color: var(--muted); line-height: 1.6; margin: 0; }

.order-ref {
    display: inline-block;
    margin-top: 1rem;
    padding: .45rem 1rem;
    border-radius: 999px;
    background: var(--plum-tint);
    color: var(--plum);
    font-weight: 700;
    letter-spacing: .04em;
}

/* Footer ----------------------------------------------------------------- */

.shop-footer {
    background: var(--card);
    border-top: 1px solid var(--line);
    padding: 2.5rem 0;
    margin-top: auto;
}

.shop-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 1.75rem;
    color: var(--muted);
    font-size: .9rem;
}

.shop-footer__title { font-weight: 700; color: var(--ink); margin: 0 0 .4rem; }
.shop-footer p { margin: 0 0 .3rem; line-height: 1.6; }
.shop-footer a { color: var(--muted); }
.shop-footer a:hover { color: var(--plum); }

/* Screen-reader-only text (basket count, per-row quantity labels). */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Shop forms -------------------------------------------------------------
   The portal's field styling hangs off .form-card, which the shop's .panel
   does not inherit — so checkout rendered as bare browser defaults, with
   labels jammed against inputs. Same visual language, applied to .panel. */

/* Symfony renders each form row as a bare <div> that is a DIRECT child of
   the panel — form_start() wraps the panel, not the other way round — so an
   earlier `.panel > form > div` selector matched nothing and the rows had no
   spacing whatsoever. Labels ended up flush against the field above them. */
.panel > div:has(> label),
.panel .form-row,
.shop-field {
    margin-bottom: 1.1rem;
}

/* Breathing room above every label in these forms, so one never sits hard
   against the input above it. Doubles as the fallback anywhere :has() is
   unavailable, since it does not depend on matching the row wrapper. */
.panel label {
    margin-top: .75rem;
}

/* ...except the first control in a card, which already has the heading or
   the notice above it. */
.panel .panel__title + div > label,
.panel .ships-to + div > label,
.panel .address-grid > div:first-child > label {
    margin-top: 0;
}

.panel label {
    display: block;
    font-weight: 700;
    font-size: .92rem;
    margin-bottom: .35rem;
    color: var(--ink);
}

.panel input[type="text"],
.panel input[type="email"],
.panel input[type="tel"],
.panel select,
.panel textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    padding: .7rem .8rem;
}

.panel input:focus,
.panel select:focus,
.panel textarea:focus {
    border-color: var(--plum);
    outline: 3px solid var(--plum-tint);
}

.panel .help-text,
.panel [id$="_help"] {
    display: block;
    font-size: .83rem;
    color: var(--muted);
    font-weight: 400;
    margin-top: .3rem;
}

/* Symfony renders validation errors as a <ul> above the field. */
.panel ul {
    list-style: none;
    margin: 0 0 .4rem;
    padding: 0;
    color: var(--danger);
    font-size: .87rem;
    font-weight: 600;
}

.panel .form-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* City / province / postal sit together — three full-width rows for what is
   really one line of an address wastes the form's vertical budget. */
.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    gap: 0 1rem;
}

.ships-to {
    margin: 0 0 1.25rem;
    padding: .7rem .9rem;
    border-radius: var(--radius-small);
    background: var(--plum-tint);
    color: var(--plum-dark);
    font-size: .9rem;
    font-weight: 600;
}

/* Google Places autocomplete ---------------------------------------------
   The widget is a web component with its own shadow DOM. Left alone it
   renders in Google's own Material theme and defaults to
   `color-scheme: light dark`, so on this page it came out BLACK against a
   cream form. These are the documented styling hooks; the colour-scheme
   pin is the one that actually stops it going dark. */

gmp-place-autocomplete {
    display: block;
    width: 100%;
    /* Without this the component follows the OS/browser preference and can
       render dark on a light page. */
    color-scheme: light;
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.4;
}

gmp-place-autocomplete::part(input) {
    padding: .7rem .8rem;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
}

/* Match the focus treatment the other fields use. */
gmp-place-autocomplete:focus-within {
    border-color: var(--plum);
    outline: 3px solid var(--plum-tint);
}

gmp-place-autocomplete::part(focus-ring) {
    border: none;
    outline: none;
}

/* The dropdown is rendered by the component too, so it needs the same
   surface as the rest of the shop or it reads as a foreign widget. */
gmp-place-autocomplete::part(prediction-list) {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
    color: var(--ink);
}

gmp-place-autocomplete::part(prediction-item) {
    color: var(--ink);
    font-family: var(--font-body);
}

gmp-place-autocomplete::part(prediction-item-match) {
    color: var(--plum);
    font-weight: 700;
}

/* The checkout's left column holds two cards that live in SEPARATE forms
   (address → rates, then rate → order), so sibling spacing cannot reach
   between them. The column owns the gap instead. */
.checkout-steps {
    display: grid;
    gap: 1.5rem;
    align-content: start;
}

.checkout-steps form { margin: 0; }

/* Numbered so the two cards read as one flow rather than two unrelated
   panels a shopper has to work out the order of. */
.step-number {
    display: inline-grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-right: .45rem;
    border-radius: 999px;
    background: var(--plum);
    color: #fff;
    font-family: var(--font-body);
    font-size: .85rem;
    font-weight: 700;
    vertical-align: middle;
}

.same-as-delivery {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 600;
    margin-bottom: 1rem;
    cursor: pointer;
}

.same-as-delivery input { width: auto; }

/* A completed step: quieter than the step being worked on, but still a
   CARD. An earlier attempt set the page background here, which dissolved
   the surface and left the panel looking like a stray border. The signal is
   the green tick and a soft sage edge instead. */
.panel--done {
    background: var(--card);
    border-color: #cfdcc9;
    box-shadow: none;
}

.step-number--done { background: var(--sage); }

.panel__action {
    float: right;
    font-family: var(--font-body);
    font-size: .875rem;
    font-weight: 600;
}

.confirmed-address { margin: 0; line-height: 1.6; color: var(--ink); }

/* ------------------------------------------------------------ shop orders */
/*
 * The admin order list and the single-order page.
 *
 * Both are working screens rather than browsing screens: someone opens them
 * because a customer is waiting on an answer. So the hierarchy is state
 * first (a pill you can read across a room), money second, and everything
 * else — supplier ids, session ids — subordinate to those.
 */

.order-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin: 0 0 1rem;
}

.order-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.order-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
}

.order-tab:hover { background: var(--plum-tint); color: var(--plum-dark); }

.order-tab.is-active {
    background: var(--plum);
    color: #fff;
}

.order-tab__count {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: rgba(58, 50, 68, 0.12);
}

.order-tab.is-active .order-tab__count { background: rgba(255, 255, 255, 0.25); }

.order-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-search input[type="search"] {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--card);
    color: var(--ink);
    min-width: 16rem;
}

.order-search input[type="search"]:focus {
    outline: none;
    border-color: var(--plum);
    box-shadow: 0 0 0 3px var(--plum-tint);
}

.order-search__clear { font-size: 0.9rem; color: var(--muted); }

/* Status pills. Only four tones, and each says something different:
   good = done, busy = in flight, bad = someone must act, muted = inert. */
.order-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

.order-pill--good  { background: var(--sage-tint);   color: var(--sage); }
.order-pill--busy  { background: var(--oak-tint);    color: #8a6427; }
.order-pill--bad   { background: var(--danger-tint); color: var(--danger); }
.order-pill--muted { background: var(--plum-tint);   color: var(--muted); }

.order-table .is-numeric { text-align: right; font-variant-numeric: tabular-nums; }

.order-row--attention { background: color-mix(in srgb, var(--danger-tint) 45%, transparent); }

.order-row__link {
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--plum-dark);
    text-decoration: none;
}

.order-row__link:hover { text-decoration: underline; }

.order-row__when,
.order-row__email,
.order-row__note {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.order-row__name { display: block; font-weight: 600; }

.order-count { margin: 0.75rem 0 0; font-size: 0.85rem; }
.order-empty { text-align: center; }
.order-empty p { margin: 0.25rem 0; }

/* ------------------------------------------------------- single order page */

.order-back { margin: 0 0 0.25rem; font-size: 0.9rem; }
.order-back a { color: var(--muted); text-decoration: none; }
.order-back a:hover { color: var(--plum-dark); }

.order-title__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.order-total {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/*
 * Two columns: the record on the left, everything actionable and everything
 * pulled live from Stripe/Printful on the right. Actions are pinned to the
 * top of the right rail because that is what someone came here to do.
 */
.order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1.25rem;
    align-items: start;
}

.order-main,
.order-side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

/* .form-card caps at 680px for forms; these are page furniture. */
.order-card {
    max-width: none;
    margin-top: 0;
    padding: 1.25rem;
}

.order-card__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
}

.order-card--actions { border-color: var(--plum); }
.order-card--actions form + form,
.order-card--actions form + .order-action { margin-top: 0.6rem; }

.order-items { font-size: 0.94rem; }
.order-items .is-numeric { text-align: right; font-variant-numeric: tabular-nums; }
.order-items__name { display: block; font-weight: 600; }
.order-items__sku { display: block; font-size: 0.8rem; color: var(--muted); }

.order-items tfoot th {
    text-align: left;
    font-weight: 400;
    color: var(--muted);
}

.order-items tfoot td,
.order-items tfoot th { border-bottom: none; padding: 0.3rem 1rem; }

.order-items tfoot tr:first-child th,
.order-items tfoot tr:first-child td { padding-top: 0.8rem; }

.order-items__total th,
.order-items__total td {
    font-weight: 700;
    color: var(--ink);
    font-size: 1.05rem;
    border-top: 1px solid var(--line) !important;
    padding-top: 0.6rem !important;
}

.order-items__refund td { color: var(--danger); }

.order-margin {
    margin: 0.9rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--line);
    font-size: 0.88rem;
    color: var(--muted);
}

.order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1.25rem;
}

.order-label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.35rem;
}

.order-label__source { text-transform: none; letter-spacing: 0; font-weight: 400; }

.order-value { margin: 0; line-height: 1.55; }

/* Definition lists for the live panels: label/value pairs read faster than
   sentences when someone is scanning for one number. */
.order-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.9rem;
    margin: 0;
    font-size: 0.9rem;
}

.order-facts dt { color: var(--muted); }
.order-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.order-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    font-weight: 700;
}

.order-panel__error {
    margin: 0;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-small);
    background: var(--danger-tint);
    color: var(--danger);
    font-size: 0.88rem;
}

.order-parcels { list-style: none; margin: 0.5rem 0 0; padding: 0; font-size: 0.88rem; }

.order-parcels li {
    padding: 0.5rem 0;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.6rem;
}

.order-parcels__carrier { font-weight: 700; width: 100%; }
.order-parcels__number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ----------------------------------------------------------- the timeline */

.order-timeline { list-style: none; margin: 0; padding: 0 0 0 1.25rem; position: relative; }

.order-timeline::before {
    content: '';
    position: absolute;
    left: 0.24rem;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 2px;
    background: var(--line);
}

.order-timeline__item { position: relative; padding: 0 0 1.1rem; }
.order-timeline__item:last-child { padding-bottom: 0; }

.order-timeline__item::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 0.4rem;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 3px var(--card);
}

.order-timeline__item--good::before { background: var(--sage); }
.order-timeline__item--bad::before { background: var(--danger); }
/* --plain has no rule on purpose: it is the muted default above. */

.order-timeline__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.order-timeline__type { font-weight: 700; font-size: 0.92rem; }
.order-timeline__head time { font-size: 0.8rem; color: var(--muted); }
.order-timeline__summary { margin: 0.15rem 0 0; font-size: 0.9rem; line-height: 1.5; }

.order-timeline__actor {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.order-note { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.order-note label,
.order-action label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 0.3rem;
    padding-top: 0.5rem;
}

.order-note textarea,
.order-action input[type="text"] {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.94rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--card);
    color: var(--ink);
    resize: vertical;
}

.order-note textarea:focus,
.order-action input[type="text"]:focus,
.order-action input[inputmode="decimal"]:focus {
    outline: none;
    border-color: var(--plum);
    box-shadow: 0 0 0 3px var(--plum-tint);
}

.order-note .btn { margin-top: 0.5rem; }

/*
 * Cancel and refund are folded away behind a summary on purpose. They are
 * irreversible and they are next to buttons people press all day; making
 * each one a deliberate two-step is worth the extra click.
 */
.order-action {
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    padding: 0.6rem 0.8rem;
}

.order-action[open] { border-color: var(--danger); background: color-mix(in srgb, var(--danger-tint) 30%, transparent); }

.order-action__summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--danger);
    list-style: none;
}

.order-action__summary::-webkit-details-marker { display: none; }
.order-action__summary::before { content: '▸ '; }
.order-action[open] .order-action__summary::before { content: '▾ '; }

.order-action__hint {
    margin: 0.5rem 0 0.7rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
}

.order-refund__row { display: flex; align-items: center; gap: 0.4rem; }
.order-refund__currency { color: var(--muted); font-weight: 700; }

.order-refund__row input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-body);
    font-size: 0.94rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--card);
    color: var(--ink);
}

@media (max-width: 900px) {
    .order-layout { grid-template-columns: minmax(0, 1fr); }
    /* Actions and live status come first on a phone — the record is what you
       scroll to, not what you came for. */
    .order-side { order: -1; }
    .order-title__meta { align-items: flex-start; }
}

@media (max-width: 640px) {
    .order-search { width: 100%; }
    .order-search input[type="search"] { min-width: 0; flex: 1; }
}

/* A second, unambiguous tap target per row: the order number is a link, but
   "which bit do I press" should never be a question on a list this dense. */
.order-row:hover { background: var(--paper); }

.order-row__go { text-align: right; white-space: nowrap; }
.order-row__go a { font-weight: 700; color: var(--plum-dark); text-decoration: none; }
.order-row__go a:hover { text-decoration: underline; }

/* ------------------------------------------------------------- pagination */
/*
 * Prev/next with a position readout. No numbered page links: with a search
 * box above it, "which page is the Nguyens on" is never the question — the
 * readout is there to say how much list is left, not to be navigated by.
 */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.pager__info {
    font-size: 0.88rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.pager__pages { white-space: nowrap; }

/* The ends of the list keep their buttons in place rather than removing
   them — a control that disappears makes the row jump under the cursor. */
.pager .is-disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 560px) {
    .pager__pages { display: none; }
}

/*
 * `hidden` has to win over the display rules above it. The UA stylesheet's
 * [hidden] { display: none } is only (0,1,0), so any author rule like
 * `.form-card .help-text { display: block }` beats it and a "hidden" element
 * renders as an empty gap. Anything toggled by the hidden attribute — the
 * child form's age hint, for one — depends on this.
 */
[hidden] { display: none !important; }

/* ── Fee agreement gate ────────────────────────────────────────────────
   A blocking overlay, not a dialog with a way out: a family that has not
   signed cannot subscribe, pay, or accept the camera terms, so offering a
   close button would only defer the same wall to the next click. The
   document scrolls inside the panel; the page behind it does not. */
.fee-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(28, 28, 28, 0.72);
    overflow-y: auto;
}

.fee-gate__panel {
    display: flex;
    flex-direction: column;
    width: min(56rem, 100%);
    max-height: min(90vh, 60rem);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.fee-gate__head {
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 1px solid var(--line);
}

.fee-gate__head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}

/* The only scrolling region: the agreement is long, and the accept control
   must stay in view rather than being hunted for at the bottom of it. */
.fee-gate__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.25rem 1.75rem;
}

.fee-gate__foot {
    padding: 1.25rem 1.75rem 1.5rem;
    border-top: 1px solid var(--line);
    background: var(--paper);
}

/* The shared accept form is a card in its own right on the standalone page;
   inside the panel it is already framed. */
.fee-gate__foot .form-card {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    margin: 0;
}

@media (max-width: 560px) {
    .fee-gate { padding: 0; }
    .fee-gate__panel { max-height: 100vh; border-radius: 0; }
    .fee-gate__head, .fee-gate__body, .fee-gate__foot { padding-left: 1rem; padding-right: 1rem; }
}

/* ------------------------------------------------------------ door access */

.flash--warning { background: var(--oak-tint); color: #7a5524; }

/* Page-level tabs for a section with several pages (Door access:
   Connection / Schedules / Door codes). Links, not a JS switcher. */
.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 1px solid var(--line);
    margin: 0 0 1.25rem;
}

.section-tabs__tab {
    padding: 0.55rem 0.9rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.section-tabs__tab:hover { color: var(--ink); }
.section-tabs__tab.is-active { color: var(--plum); border-bottom-color: var(--plum); }

.notice {
    background: var(--plum-tint);
    color: var(--plum-dark);
    border-radius: var(--radius-small);
    padding: 0.75rem 1rem;
    margin: 0 0 1rem;
    max-width: 680px;
}

.door-unavailable { border-style: dashed; }

.door-table td { vertical-align: top; }
.door-table tr.is-readonly td { color: var(--muted); }
.door-table tr.is-readonly td strong { color: var(--ink); }
.door-footnote { font-size: 0.86rem; max-width: 60rem; margin-top: 0.75rem; }

/* Configuration > Door access: the doors and how far each is in step. */
.door-device-table td { vertical-align: middle; }
.door-device-table .data-table__actions { white-space: nowrap; }
.door-device-table .data-table__actions .inline-form { display: inline-flex; margin: 0; }
.door-device-table__result td { padding-top: 0; }
.door-sync + .door-sync { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.door-sync__title { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; margin: 0 0 0.5rem; }
.door-sync__changes, .door-sync__notes { margin: 0 0 0.75rem; padding-left: 1.1rem; }
.door-sync__notes { font-size: 0.86rem; }
.door-sync__verb { display: inline-block; min-width: 9.5rem; color: var(--muted); }
.door-sync .checkbox { margin-right: 0.75rem; }
.door-window { white-space: nowrap; margin-left: 0.4rem; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li + li { margin-top: 0.15rem; }

/* A to-do list in a card, such as the digital app queue. `.form-card ul` is
   styled as a form's error list (red, bold), which made every waiting child
   look like an error. */
.form-card .task-list {
    margin: 0.5rem 0 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}
.form-card .task-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.6rem;
    padding: 0.4rem 0;
}
.form-card .task-list li + li { border-top: 1px solid var(--line); }

/* Seven cells, Monday first; the open days filled. */
.day-strip {
    display: inline-flex;
    gap: 2px;
    vertical-align: middle;
}

.day-strip__day {
    display: inline-grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 4px;
    font-size: 0.66rem;
    font-weight: 700;
    background: var(--paper);
    color: #b5adbd;
    border: 1px solid var(--line);
}

.day-strip__day.is-on { background: var(--plum); color: #fff; border-color: var(--plum); }

.code-schedule {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0.1rem 0 0.35rem;
}

.code-schedule > span:first-child { font-weight: 600; min-width: 5.5rem; }

.code-warning {
    margin: 0.4rem 0 0;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-small);
    background: var(--oak-tint);
    color: #7a5524;
    font-size: 0.86rem;
}

/* ---- schedule form */

/* The shared form rules list every input type the app used until now;
   time inputs arrived with door schedules, so they are styled here to match. */
.form-card input[type="time"] {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    padding: 0.6rem 0.75rem;
}

.form-card input[type="time"]:focus {
    border-color: var(--plum);
    outline: 3px solid var(--plum-tint);
}

.day-picker,
.schedule-choices,
.mode-picker,
.ratio-rule {
    border: 0;
    padding: 0;
    margin: 0 0 1.1rem;
    min-width: 0;
}

.day-picker legend,
.schedule-choices legend,
.mode-picker legend,
.ratio-rule legend {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
    padding: 0;
}

.day-picker__days { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.day-picker__presets { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }

/* Real checkboxes, restyled as toggle chips — keyboard and screen-reader
   behaviour stay the browser's. */
.form-card label.day-chip {
    position: relative;
    display: inline-block;
    margin: 0;
    font-weight: 700;
    cursor: pointer;
}

.day-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.day-chip span {
    display: inline-grid;
    place-items: center;
    min-width: 3.1rem;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-small);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}

.day-chip input:checked + span { background: var(--plum); border-color: var(--plum); color: #fff; }
.day-chip input:focus-visible + span { outline: 3px solid var(--oak); outline-offset: 2px; }

.schedule-summary {
    margin: 0.25rem 0 1.25rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-small);
    background: var(--sage-tint);
    color: var(--sage);
    font-weight: 600;
}

.schedule-summary.is-problem { background: var(--danger-tint); color: var(--danger); }
.schedule-summary:empty { display: none; }

/* ---- door codes */

.form-card .pin-input,
.pin-reveal__value {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    letter-spacing: 0.18em;
}

.pin-field__row { display: flex; gap: 0.5rem; align-items: center; }
.form-card .pin-field__row input { max-width: 12rem; }
.pin-field__status { display: block; min-height: 1.2em; font-size: 0.83rem; color: var(--sage); margin-top: 0.25rem; }

.pin-reveal { display: inline-flex; align-items: center; gap: 0.5rem; }
.pin-reveal__value { color: var(--muted); }
.pin-reveal__value.is-revealed { color: var(--ink); font-weight: 700; }
.pin-reveal__value.is-error { color: var(--danger); font-family: var(--font-body); letter-spacing: 0; font-size: 0.86rem; }

.form-card label.schedule-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    margin: 0 0 0.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: #fff;
    font-weight: 400;
    cursor: pointer;
}

.schedule-choice input { margin-top: 0.25rem; accent-color: var(--plum); transform: scale(1.15); }
.schedule-choice:has(input:checked) { border-color: var(--plum); background: var(--plum-tint); }
.schedule-choice__body { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; }
.schedule-choice__name { font-weight: 700; min-width: 6rem; }

/* ---- staff door access */

.form-card--wide { max-width: 760px; }

.form-card label.mode-option {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.8rem 0.9rem;
    margin: 0 0 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: #fff;
    font-weight: 400;
    cursor: pointer;
}

.mode-option input { margin-top: 0.3rem; accent-color: var(--plum); transform: scale(1.15); }
.mode-option:has(input:checked) { border-color: var(--plum); background: var(--plum-tint); }
.mode-option__body { display: flex; flex-direction: column; gap: 0.15rem; }
.mode-option__title { font-weight: 700; }
.mode-option__text { color: var(--muted); font-size: 0.9rem; }

.mode-section {
    border-left: 3px solid var(--plum-tint);
    padding: 0.25rem 0 0.25rem 1rem;
    margin: 0 0 1rem;
}

.door-card__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.form-card .door-card__head { margin-bottom: 0.5rem; }
.door-card__head .section__title { margin: 0; }

.door-card .dl,
.test-result .dl {
    display: grid;
    grid-template-columns: minmax(8rem, max-content) 1fr;
    gap: 0.45rem 1.25rem;
    margin: 0.75rem 0;
}

.door-card .dl dt,
.test-result .dl dt { color: var(--muted); }
.door-card .dl dd,
.test-result .dl dd { margin: 0; }

.door-alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-small);
    background: var(--danger-tint);
    color: var(--danger);
}

.door-alert p { margin: 0 0 0.5rem; }
.door-alert .muted { color: var(--danger); opacity: 0.8; }

.test-result {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-small);
}

.test-result p { margin: 0 0 0.35rem; }
.test-result--ok { background: var(--sage-tint); }
.test-result--ok > p { color: var(--sage); }
.test-result--bad { background: var(--danger-tint); color: var(--danger); }

.steps-list { margin: 0.5rem 0 0.75rem; padding-left: 1.3rem; }
.steps-list li + li { margin-top: 0.3rem; }

@media (max-width: 560px) {
    .door-window { display: block; margin: 0.25rem 0 0; }
    .code-schedule > span:first-child { min-width: 0; }
    .door-card .dl, .test-result .dl { grid-template-columns: 1fr; gap: 0.1rem; }
    .door-card .dl dd, .test-result .dl dd { margin-bottom: 0.5rem; }
}

/* ---------------------------------------------------------------- waitlist */

.waitlist-room { margin-bottom: 1.75rem; }
.waitlist-seats td { vertical-align: top; }

/* Next in line for a seat: name, Offer, and one muted line of why. */
.waitlist-candidates { margin: 0; padding-left: 1.1rem; }
.waitlist-candidates li + li { margin-top: 0.4rem; }

.waitlist-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.waitlist-filters select { max-width: 14rem; }

.waitlist-outcome input[type="text"] { max-width: 11rem; }

.waitlist-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem 1.5rem; margin: 0; }
.waitlist-facts dt { color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.waitlist-facts dd { margin: 0.1rem 0 0; }

/* The parent's waitlist check-in page (from their email). */
.check-in { max-width: 640px; }
.check-in__child { border: 0; padding: 0; margin: 0 0 1.25rem; }
.check-in__child legend { font-weight: 700; margin-bottom: 0.5rem; }
.check-in__choice { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0; font-weight: 500; }
.check-in__yes, .check-in__no { margin: 1rem 0; }
.check-in__small { font-size: 0.86rem; }

/* The waitlist form a family reaches from the public website's "Join the
   waitlist" button. The website shows it in a pop-up; opened on its own it
   is an ordinary page. Inside the pop-up (html.is-framed) the page's own
   chrome goes — the pop-up is the chrome — and nothing stretches to the
   viewport, so the height the page reports to the pop-up is its content's. */
body.signup-page { display: block; min-height: 0; }
.is-framed body.signup-page { background: var(--card); }
.signup { max-width: 640px; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.is-framed .signup { padding-top: 0.25rem; }
.signup__back { display: inline-block; margin-bottom: 1rem; font-size: 0.92rem; text-decoration: none; }
.is-framed .signup__back { display: none; }
.signup h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.55rem, 5vw, 2rem);
    line-height: 1.2;
    color: var(--plum-dark);
    margin: 0 0 0.5rem;
}
.signup h1:focus { outline: none; }
.signup__lead { font-size: 1.05rem; margin: 0 0 1rem; }
.signup__note {
    background: var(--plum-tint);
    border-radius: var(--radius-small);
    padding: 0.85rem 1rem;
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}
.signup fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
.signup legend {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    padding: 0;
    margin-bottom: 0.6rem;
}
.signup .form-row { margin-bottom: 0.9rem; }
.signup .form-row select,
.signup .form-row textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem; /* 16px: iOS zooms into anything smaller */
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    padding: 0.6rem 0.75rem;
}
.signup .form-row select:focus,
.signup .form-row textarea:focus { border-color: var(--plum); outline: 3px solid var(--plum-tint); }
/* An empty date input collapses on iOS Safari; give it a text input's height. */
.signup .form-row input[type="date"] { min-height: 2.75rem; -webkit-appearance: none; appearance: none; }
.signup .help-text { display: block; font-size: 0.83rem; color: var(--muted); margin-top: 0.3rem; }
.signup .field-error { color: var(--danger); font-size: 0.86rem; font-weight: 700; margin: 0.3rem 0 0; }
.signup [aria-invalid="true"] { border-color: var(--danger); }
.signup__child { position: relative; border-top: 1px solid var(--line) !important; padding-top: 1rem !important; }
.signup__remove { position: absolute; top: 0.85rem; right: 0; }
.signup__add { margin: -0.5rem 0 1.5rem; }
.signup__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup__submit { width: 100%; margin: 0.5rem 0 1rem; }
@media (min-width: 560px) { .signup__submit { width: auto; } }
.signup__small { font-size: 0.83rem; color: var(--muted); }
.signup__steps { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.signup__steps li { margin-bottom: 0.5rem; }
.signup__done-mark {
    width: 3rem; height: 3rem;
    border-radius: 50%;
    background: var(--sage-tint);
    color: var(--sage);
    display: grid;
    place-items: center;
    margin-bottom: 0.75rem;
}

/* Scheduling → Care patterns. A day set by hand reads as different from
   one that follows ParentApp; times stay on one line. */
.care-patterns td { white-space: nowrap; }
.care-patterns__set { font-weight: 700; color: var(--plum); }
.care-pattern-form select,
.care-pattern-form input { min-width: 0; }

/* A staff member's work profile: the week as a short list, and the
   weekday grid on its form. */
.availability-list { list-style: none; margin: 0 0 0.3rem; padding: 0; }
.availability-list__day { display: inline-block; width: 2.6rem; font-weight: 700; }
.availability-form td { white-space: nowrap; }
.availability-form input { min-width: 0; }

/* --------------------------------------------------------------- staff schedules
   The day page draws each room as a timeline: rows of absolutely placed
   cells and bars, positioned in % of the day by DayScheduleView, so a
   7:10 start sits where it should without a column per minute. On a
   phone the timeline keeps its width and scrolls inside its own box. */
.status--draft { background: var(--oak-tint); color: #7a5524; }
.rece-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--plum-tint);
    color: var(--plum-dark);
    vertical-align: middle;
}
.schedule-actions { margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.5rem; }
.schedule-actions > * + * { margin-left: 0; }
.schedule-alerts {
    border-radius: var(--radius-small);
    padding: 0.9rem 1.2rem;
    margin-bottom: 1rem;
}
.schedule-alerts ul { margin: 0; padding-left: 1.2rem; }
.schedule-alerts p { margin: 0; }
.schedule-alerts__title { font-size: 1rem; margin: 0 0 0.4rem; }
.schedule-alerts--hard { background: var(--danger-tint); color: var(--danger); }
.schedule-alerts--ok { background: var(--sage-tint); color: var(--sage); }
.schedule-alerts--soft { background: var(--oak-tint); color: #7a5524; }

/* Today board: right now, room by room. */
.today-board { margin-bottom: 1.5rem; }
.today-board__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.75rem; }
.today-board__head .panel__title { margin-bottom: 0; }
.today-board__source { margin: 0; font-size: 0.9rem; }
.panel ul.today-board__people { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.today-board__people li + li { margin-top: 0.2rem; }
.today-board__people .row-actions__link { margin-left: 0.5rem; font-size: 0.85rem; }
.today-board__centre { margin: 0.75rem 0 0; font-size: 0.9rem; }
.today-board__repair { margin: 0.75rem 0 0; }
.today-board__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0.75rem 0 0; font-size: 0.9rem; }
.schedule-repair { margin-bottom: 1.25rem; }
.schedule-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}
.schedule-figures > div {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    padding: 0.6rem 0.9rem;
}
.schedule-figures dt { font-size: 0.8rem; color: var(--muted); }
.schedule-figures dd { margin: 0; font-size: 1.3rem; font-weight: 700; }
.schedule-room { margin-bottom: 2rem; }
.schedule-room__meta { font-family: var(--font-body); font-size: 0.85rem; font-weight: 400; }

.timeline-wrap {
    overflow-x: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
}
.timeline { min-width: 760px; padding: 0.4rem 0.75rem 0.6rem; }
.timeline__row { display: flex; align-items: stretch; min-height: 1.9rem; }
.timeline__row + .timeline__row { border-top: 1px solid var(--line); }
.timeline__row--axis { min-height: 1.4rem; }
.timeline__row--person { min-height: 3.1rem; }
.timeline__label {
    flex: 0 0 13.5rem;
    padding: 0.3rem 0.6rem 0.3rem 0;
    font-size: 0.83rem;
    line-height: 1.3;
}
.timeline__name { display: block; font-weight: 700; }
.timeline__hours { display: block; font-size: 0.75rem; }
.timeline__actions { display: flex; flex-wrap: wrap; gap: 0 0.6rem; font-size: 0.75rem; }
.timeline__actions .row-actions__link { font-size: 0.75rem; }
.timeline__inline-form { display: inline; margin: 0; }
.timeline__inline-form button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.timeline__track { position: relative; flex: 1 1 auto; }
.timeline__tick {
    position: absolute;
    top: 0.2rem;
    font-size: 0.7rem;
    color: var(--muted);
    border-left: 1px solid var(--line);
    padding-left: 0.2rem;
    white-space: nowrap;
}
.timeline__cell {
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    border-right: 1px solid var(--card);
    background: var(--paper);
    overflow: hidden;
    white-space: nowrap;
}
.timeline__cell--reduced { background: var(--plum-tint); }
.timeline__cell--short { background: var(--danger); color: #fff; }
.timeline__cell--over { background: var(--oak-tint); }
.timeline__row--need .timeline__cell:not(.timeline__cell--short):not(.timeline__cell--over) { background: var(--sage-tint); color: var(--sage); }
.timeline__seg {
    position: absolute;
    top: 0.55rem;
    bottom: 0.55rem;
    border-radius: 6px;
    border-right: 1px solid var(--card);
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.timeline__seg-label { padding: 0 0.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline__seg--room { background: var(--plum); color: #fff; }
.timeline__seg--break_cover { background: var(--oak); color: #fff; }
.timeline__seg--float,
.timeline__seg--other_duties { background: var(--sage-tint); color: var(--sage); border: 1px dashed var(--sage); }
.timeline__seg--break_unpaid,
.timeline__seg--break_paid {
    background: repeating-linear-gradient(135deg, var(--line) 0 4px, var(--card) 4px 8px);
    color: var(--muted);
}
.timeline__seg--elsewhere { background: var(--plum-tint); color: var(--plum-dark); }
.timeline__empty { margin: 0.5rem 0; font-size: 0.85rem; }
.schedule-legend { font-size: 0.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; }
.schedule-legend__swatch {
    display: inline-block;
    width: 1.4rem;
    height: 0.8rem;
    border-radius: 3px;
    position: static;
    vertical-align: middle;
}
.schedule-week th { vertical-align: top; }
.schedule-week__day-status { margin-top: 0.25rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; font-weight: 400; }
.schedule-week__over { color: var(--danger); font-weight: 700; }
.staff-week th[scope="row"] { text-align: left; }

@media (max-width: 640px) {
    .timeline__label { flex-basis: 9.5rem; }
}

@media print {
    .no-print,
    .site-header,
    .site-footer,
    .flash { display: none !important; }
    body { background: #fff; }
    .printable .table-wrap { overflow: visible; }
    .printable .data-table { font-size: 11pt; }
}
