/*
 * SDFAS theme. Colors from sdfas.org (purple text, pink/orange/blue of the logo); text colors are
 * darkened where needed for WCAG AA contrast. Font: Figtree (SIL OFL, self-hosted: the CSP allows
 * no external font), close to the school's "Fort".
 */
@font-face {
    font-family: 'Figtree';
    font-style: normal;
    font-display: swap;
    font-weight: 300 900;
    src: url("../fonts/figtree-latin-wght-normal-Dj9csJy.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Figtree';
    font-style: normal;
    font-display: swap;
    font-weight: 300 900;
    src: url("../fonts/figtree-latin-ext-wght-normal-iZEjIKs.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --sdfas-purple: #5b4c7d;
    --sdfas-purple-dark: #463a63;
    --sdfas-purple-soft: #efecf6;
    --sdfas-pink: #e9506e;
    --sdfas-orange: #ee7f4b;
    --sdfas-blue: #0091ce;
    --sdfas-blue-text: #00739f;
    --sdfas-teal: #00abc2;
    --sdfas-gradient: linear-gradient(90deg, var(--sdfas-blue) 0%, var(--sdfas-purple) 40%, var(--sdfas-pink) 72%, var(--sdfas-orange) 100%);

    --na-brand: var(--sdfas-purple);
    --na-accent: var(--sdfas-pink);
    --na-ink: #2b2540;
    --na-muted: #6b6385;
    /* Page background, and the tiles on it (cards, lists, tables, menus, fields): clearly apart (2026-10-27). */
    --na-bg: #e9e5f1;
    --na-surface: #fff;
    --na-shadow: 0 1px 2px rgba(43, 37, 64, .08), 0 3px 10px rgba(43, 37, 64, .07);
    /* Accent for text and highlights (lightened in the dark themes), the avatar's gradient. */
    --na-accent-text: var(--sdfas-purple);
    --na-avatar: linear-gradient(135deg, var(--sdfas-blue), var(--sdfas-purple));

    --bs-body-font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bs-body-color: var(--na-ink);
    --bs-body-color-rgb: 43, 37, 64;
    --bs-body-bg: var(--na-surface);
    --bs-secondary-color: var(--na-muted);
    --bs-emphasis-color: var(--na-ink);
    --bs-link-color: var(--sdfas-blue-text);
    --bs-link-color-rgb: 0, 115, 159;
    --bs-link-hover-color: var(--sdfas-purple);
    --bs-link-hover-color-rgb: 91, 76, 125;
    --bs-primary: var(--sdfas-purple);
    --bs-primary-rgb: 91, 76, 125;
    --bs-border-color: #dcd7e6;
    --bs-border-radius: .5rem;
    --bs-border-radius-lg: .75rem;
}

body {
    background: var(--na-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5 {
    font-weight: 700;
    letter-spacing: -.01em;
}

h1 {
    color: var(--sdfas-purple);
}

/* ---- Header -------------------------------------------------------------------------------- */
.na-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    box-shadow: 0 4px 18px rgba(43, 37, 64, .06);
}

.na-navbar {
    --bs-navbar-nav-link-padding-x: .85rem;
    padding: .5rem 0;
}

.na-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--sdfas-purple);
    margin-right: 1.5rem;
}

.na-brand:hover,
.na-brand:focus {
    color: var(--sdfas-purple-dark);
}

.na-brand img {
    height: 36px;
    width: auto;
}

.na-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.na-brand-name {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -.01em;
}

.na-brand-school {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--na-muted);
}

.na-nav .nav-link {
    position: relative;
    color: var(--na-ink);
    font-weight: 600;
    padding: .5rem .85rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}

.na-nav .nav-link:hover,
.na-nav .nav-link:focus-visible,
.na-nav .nav-link.show {
    color: var(--sdfas-purple);
    background: var(--sdfas-purple-soft);
}

.na-nav .nav-link.active {
    color: var(--sdfas-purple);
    background: var(--sdfas-purple-soft);
}

/* Current section: a short pink bar under the label. */
.na-nav .nav-link.active::before {
    content: "";
    position: absolute;
    left: .85rem;
    right: .85rem;
    bottom: .2rem;
    height: 3px;
    border-radius: 3px;
    background: var(--sdfas-pink);
}

.na-lang {
    display: inline-flex;
    padding: 2px;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    background: #faf9fc;
}

.na-lang a {
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--na-muted);
    text-decoration: none;
}

.na-lang a:hover {
    color: var(--sdfas-purple);
}

.na-lang a.active {
    background: var(--sdfas-purple);
    color: #fff;
}

.na-user {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .2rem .5rem .2rem .2rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--na-ink);
    font-weight: 600;
    white-space: nowrap;
}

.na-user:hover,
.na-user[aria-expanded="true"] {
    background: var(--sdfas-purple-soft);
}

.na-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 800;
    color: #fff;
    background: var(--na-avatar);
}

.na-acting {
    background: var(--sdfas-orange);
    color: var(--na-ink);
}

.na-user-menu {
    min-width: 17rem;
}

.na-stripe {
    height: 4px;
    background: var(--sdfas-gradient);
}

@media (max-width: 1199.98px) {
    .na-nav {
        margin: .5rem 0;
    }

    .na-tools {
        padding: .5rem 0 .25rem;
        border-top: 1px solid var(--bs-border-color);
    }
}

@media (max-width: 575.98px) {
    .na-brand-school {
        display: none;
    }
}

/* ---- Footer -------------------------------------------------------------------------------- */
.na-footer {
    position: relative;
    padding: 1rem 0;
    background: #fff;
    font-size: .85rem;
    color: var(--na-muted);
}

.na-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--sdfas-gradient);
}

/* ---- Bootstrap components in the school's colors ------------------------------------------ */
.btn {
    font-weight: 600;
    border-radius: .55rem;
}

.btn-primary {
    --bs-btn-bg: var(--sdfas-purple);
    --bs-btn-border-color: var(--sdfas-purple);
    --bs-btn-hover-bg: var(--sdfas-purple-dark);
    --bs-btn-hover-border-color: var(--sdfas-purple-dark);
    --bs-btn-active-bg: color-mix(in srgb, var(--sdfas-purple-dark) 80%, #000);
    --bs-btn-active-border-color: color-mix(in srgb, var(--sdfas-purple-dark) 80%, #000);
    --bs-btn-disabled-bg: var(--sdfas-purple);
    --bs-btn-disabled-border-color: var(--sdfas-purple);
}

.btn-outline-primary {
    --bs-btn-color: var(--sdfas-purple);
    --bs-btn-border-color: var(--sdfas-purple);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--sdfas-purple);
    --bs-btn-hover-border-color: var(--sdfas-purple);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--sdfas-purple-dark);
    --bs-btn-active-border-color: var(--sdfas-purple-dark);
    --bs-btn-disabled-color: var(--sdfas-purple);
    --bs-btn-disabled-border-color: var(--sdfas-purple);
}

.btn-outline-secondary {
    --bs-btn-color: color-mix(in srgb, var(--na-ink) 85%, var(--na-muted));
    --bs-btn-border-color: color-mix(in srgb, var(--bs-border-color) 70%, var(--na-muted));
    --bs-btn-hover-color: var(--na-accent-text);
    --bs-btn-hover-bg: var(--sdfas-purple-soft);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--bs-border-color) 45%, var(--na-muted));
    --bs-btn-active-color: var(--na-accent-text);
    --bs-btn-active-bg: color-mix(in srgb, var(--sdfas-purple) 16%, var(--bs-body-bg));
    --bs-btn-active-border-color: color-mix(in srgb, var(--bs-border-color) 45%, var(--na-muted));
}

/* Bootstrap's cyan / yellow outlines are hard to read on white: school teal and orange, darkened. */
.btn-outline-info {
    --bs-btn-color: #00737f;
    --bs-btn-border-color: var(--sdfas-teal);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #00737f;
    --bs-btn-hover-border-color: #00737f;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #005f69;
    --bs-btn-active-border-color: #005f69;
}

.btn-outline-warning {
    --bs-btn-color: #a8471a;
    --bs-btn-border-color: var(--sdfas-orange);
    --bs-btn-hover-color: var(--na-ink);
    --bs-btn-hover-bg: var(--sdfas-orange);
    --bs-btn-hover-border-color: var(--sdfas-orange);
    --bs-btn-active-color: var(--na-ink);
    --bs-btn-active-bg: #e06d37;
    --bs-btn-active-border-color: #e06d37;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: color-mix(in srgb, var(--sdfas-purple) 50%, var(--bs-body-bg));
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--sdfas-purple) 22%, transparent);
}

.form-check-input:checked {
    background-color: var(--sdfas-purple);
    border-color: var(--sdfas-purple);
}

.form-label {
    font-weight: 600;
}

.dropdown-menu {
    --bs-dropdown-link-active-bg: var(--sdfas-purple);
    --bs-dropdown-link-hover-bg: var(--sdfas-purple-soft);
    --bs-dropdown-border-color: var(--bs-border-color);
    padding: .4rem;
    border-radius: .75rem;
    box-shadow: 0 12px 32px rgba(43, 37, 64, .14);
}

.dropdown-item {
    border-radius: .45rem;
    padding: .45rem .75rem;
}

.dropdown-header {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.card {
    --bs-card-border-color: var(--bs-border-color);
    --bs-card-border-radius: .75rem;
    --bs-card-inner-border-radius: calc(.75rem - 1px);
    box-shadow: var(--na-shadow);
}

a.card {
    transition: transform .15s, box-shadow .15s;
}

a.card:hover,
a.card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(43, 37, 64, .12);
}

.list-group {
    --bs-list-group-border-color: var(--bs-border-color);
    --bs-list-group-active-bg: var(--sdfas-purple);
    --bs-list-group-active-border-color: var(--sdfas-purple);
    box-shadow: var(--na-shadow);
}

.table-responsive.bg-white {
    border-color: var(--bs-border-color) !important;
    border-radius: .75rem !important;
    box-shadow: var(--na-shadow);
}

.table > thead th {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--na-muted);
}

.nav-tabs .nav-link.active {
    color: var(--sdfas-purple);
    font-weight: 600;
    border-top: 3px solid var(--sdfas-pink);
}

.progress {
    --bs-progress-bar-bg: var(--sdfas-purple);
}

.breadcrumb {
    --bs-breadcrumb-divider-color: #b0a8c6;
}

.alert {
    border-radius: .75rem;
}

/* Visible keyboard focus (WCAG 2.4.7), dark blue for contrast on white and on the purple. */
:focus-visible {
    outline: 3px solid var(--sdfas-blue-text);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 2000;
    background: #fff;
    padding: .5rem 1rem;
    border-radius: .5rem;
    box-shadow: 0 4px 16px rgba(43, 37, 64, .2);
}

.login-card {
    max-width: 26rem;
}

.audit-detail {
    font-family: var(--bs-font-monospace);
    font-size: .8rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 32rem;
}

/* The audit log (2026-11-21): readable view (.audit-human) or technical view, both in the page. */
.audit-human .av-t, [data-controller="audit-view"]:not(.audit-human) .av-h { display: none !important; }
.audit-badge { font-weight: 600; font-size: .78rem; white-space: normal; text-align: left; }
.audit-lines { display: grid; grid-template-columns: max-content 1fr; gap: .1rem .6rem; margin: 0; font-size: .82rem; max-width: 34rem; }
.audit-lines dt { font-weight: 600; color: var(--bs-secondary-color); }
.audit-lines dd { margin: 0; word-break: break-word; }
.audit-before { text-decoration: line-through; color: var(--bs-secondary-color); }
.audit-after { font-weight: 600; }

.form-card {
    max-width: 44rem;
}

.cycle-badge { color: #fff; }
.cycle-badge.cycle-1 { background: #8e24aa; }
.cycle-badge.cycle-2 { background: #1565c0; }
.cycle-badge.cycle-3 { background: #2e7d32; }
.cycle-badge.cycle-4 { background: #bf360c; }

/* Google accounts explorer: units and groups, scrolled on their own. */
.dx-side { max-height: 22rem; overflow-y: auto; }

/* Class list: the students' Google group, edited in place. */
.cl-group { min-width: 16rem; }

.calendar-kind { color: #fff; }
.calendar-kind.kind-holiday { background: #c8102e; }
.calendar-kind.kind-break { background: #6a1b9a; }
.calendar-kind.kind-staff_day { background: #455a64; }
.calendar-kind.kind-early_release { background: #8d6e00; }
.calendar-kind.kind-event { background: var(--sdfas-purple); }

@media print {
    .na-navbar, footer, form, .btn, .breadcrumb { display: none !important; }
    .week-grid > .col { flex: 0 0 20%; max-width: 20%; }
}

/* Quick assignment (school/quick_assign): long lists scroll inside their column. */
.quick-assign-list { max-height: 26rem; overflow-y: auto; }

/* A person's timetable, class filter (class_filter_controller.js): chosen classes stand out, the rest is greyed. */
.tt-slot { transition: opacity .15s ease, background-color .15s ease; }
.tt-match { background: var(--bs-primary-bg-subtle); box-shadow: inset 4px 0 0 var(--bs-primary); }
.tt-dimmed { opacity: .35; }
/* A division's break (BreakScheduler) in a list of slots (import previews): muted, it is not a lesson. */
.tt-break { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
/* Announcements of Nexus's banner: keep the line breaks typed. */
.announcement-text { white-space: pre-line; overflow-wrap: anywhere; }

/*
 * A teacher's week (school/timetable/_grid.html.twig), the same table as Nexus's "My timetable":
 * lessons purple, activities beige, breaks teal with stripes; dark equivalents at the end of the file.
 */
.tt-grid { table-layout: fixed; min-width: 44rem; background: var(--bs-body-bg); }
.tt-grid th, .tt-grid td { border: 1px solid var(--bs-border-color); vertical-align: top; padding: .35rem .45rem; }
.tt-grid thead th { background: var(--bs-tertiary-bg); text-align: center; }
.tt-grid .tt-time { width: 6.5rem; white-space: nowrap; font-size: .8rem; color: var(--bs-secondary-color); font-weight: normal; }
.tt-grid td.tt-lesson { background: var(--sdfas-purple-soft); border-left: 4px solid var(--sdfas-purple); }
.tt-grid td.tt-activity { background: #fbfaf6; border-left: 4px solid #c9b98b; }
.tt-grid td.tt-break-cell {
    background: repeating-linear-gradient(135deg, #d3f2ea 0 8px, #e6f8f3 8px 16px);
    border-left: 4px solid #0f9d7a;
    color: #0a5444;
    font-weight: 600;
}
.tt-grid td.tt-break-cell .tt-meta { color: #2f7a68; font-weight: normal; }
.tt-grid td.tt-today { box-shadow: inset 0 0 0 2px rgba(91, 76, 125, .25); }
.tt-grid th.tt-today { color: var(--sdfas-purple); }
.tt-grid .tt-meta { font-size: .8rem; color: var(--bs-secondary-color); }
.tt-break-badge { background: #0f9d7a; color: #fff; font-weight: normal; }

/*
 * Flash messages (base.html.twig): floating at the top of the window (2026-11-19), so they are seen
 * even when the page opens on a #section further down; they close on a click anywhere; success and
 * info fade away after a few seconds, warnings and errors stay until closed.
 */
.na-flashes {
    position: fixed; top: 4.5rem; left: 50%; transform: translateX(-50%); z-index: 1080;
    width: min(36rem, calc(100% - 2rem)); display: flex; flex-direction: column; gap: .5rem; pointer-events: none;
}
.na-flash { cursor: pointer; pointer-events: auto; margin-bottom: 0; }
.na-flash-success, .na-flash-info { animation: na-flash-out .5s ease 6s forwards; }
.na-flash-success:hover, .na-flash-info:hover { animation-play-state: paused; }
@keyframes na-flash-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .na-flash-success, .na-flash-info { animation-duration: 0s; animation-delay: 8s; } }

/*
 * Assessment calendar (2026-11-20, assessments/index.html.twig): week grid classes × days; a cell is
 * amber when full, red-striped when blocked, grey on a day without school; an assessment has a bar of
 * its subject's colour (assessments/_macros.html.twig); events by kind.
 */
.as-grid { min-width: 52rem; table-layout: fixed; }
.as-grid .as-class-col { width: 7rem; }
.as-grid th.as-today, .as-grid td.as-today { box-shadow: inset 0 3px 0 var(--sdfas-purple); }
.as-cell { font-size: .85rem; }
.as-full { background: color-mix(in srgb, #f59f00 12%, var(--bs-body-bg)); }
.as-blocked { background: repeating-linear-gradient(135deg, color-mix(in srgb, #e03131 10%, var(--bs-body-bg)) 0 8px, var(--bs-body-bg) 8px 16px); }
.as-off { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.as-off-label { font-style: italic; }
.as-item { border-left: 4px solid #6c757d; padding: .1rem .4rem; margin-bottom: .3rem; background: var(--bs-tertiary-bg); border-radius: 0 .3rem .3rem 0; }
.as-item-title { font-weight: 600; line-height: 1.25; }
.as-item-meta { font-size: .75rem; color: var(--bs-secondary-color); }
.as-event { font-size: .75rem; padding: .05rem .35rem; border-radius: .3rem; margin-bottom: .25rem; }
.as-event-blocking { background: #f8d7da; color: #842029; }
.as-event-limiting { background: #fff3cd; color: #664d03; }
.as-event-info { background: #e7f1ff; color: #084298; }
[data-bs-theme="dark"] .as-event-blocking { background: #4a1d22; color: #f1aeb5; }
[data-bs-theme="dark"] .as-event-limiting { background: #4a3b0b; color: #ffe69c; }
[data-bs-theme="dark"] .as-event-info { background: #102a4c; color: #9ec5fe; }
.as-gauge { font-weight: 600; }
.as-allow summary { cursor: pointer; color: var(--bs-link-color); list-style: none; }
.as-allow summary::-webkit-details-marker { display: none; }

/*
 * ---- Colour themes -------------------------------------------------------------------------------
 * <html data-na-theme="…" data-bs-theme="light|dark"> (base.html.twig, theme_controller.js; list in
 * AppExtension::THEMES). Each theme sets the same variables: accent (--sdfas-purple and its dark
 * and soft shades), highlight (--sdfas-pink: the bar under the current menu entry), ink, muted text,
 * page background, borders, links, the header stripe and the avatar. The dark themes start from the
 * shared dark base below. Declared after :root, so these values win. A colour written as a literal
 * elsewhere in this file needs its counterpart here.
 * The same eight themes are in every app of the platform (same block in each app.css); the page
 * background is always clearly apart from the tiles (--na-bg / --na-surface).
 */

/* Ocean: deep sea blue and lagoon teal on a cool white. */
[data-na-theme="ocean"] {
    --sdfas-purple: #0e6496;
    --sdfas-purple-dark: #0a4c73;
    --sdfas-purple-soft: #e2eff7;
    --sdfas-pink: #13a3b4;
    --sdfas-gradient: linear-gradient(90deg, #0a4c73 0%, #0e6496 35%, #13a3b4 70%, #7fd6c8 100%);
    --na-avatar: linear-gradient(135deg, #13a3b4, #0e6496);
    --na-ink: #13303f;
    --na-muted: #557082;
    --na-bg: #d9e8f2;
    --bs-body-color-rgb: 19, 48, 63;
    --bs-primary-rgb: 14, 100, 150;
    --bs-border-color: #cddce7;
    --bs-link-color: #0b6f7c;
    --bs-link-color-rgb: 11, 111, 124;
    --bs-link-hover-color: #0e6496;
    --bs-link-hover-color-rgb: 14, 100, 150;
}

/* Forest: pine green and warm wheat on a sage-tinted white. */
[data-na-theme="forest"] {
    --sdfas-purple: #2d6a4f;
    --sdfas-purple-dark: #1f4d39;
    --sdfas-purple-soft: #e3f0e8;
    --sdfas-pink: #c98b4a;
    --sdfas-gradient: linear-gradient(90deg, #1f4d39 0%, #2d6a4f 35%, #74a57f 68%, #d9a865 100%);
    --na-avatar: linear-gradient(135deg, #74a57f, #2d6a4f);
    --na-ink: #1d2b24;
    --na-muted: #5b6e63;
    --na-bg: #dde9de;
    --bs-body-color-rgb: 29, 43, 36;
    --bs-primary-rgb: 45, 106, 79;
    --bs-border-color: #d0ddd2;
    --bs-link-color: #2a6b6a;
    --bs-link-color-rgb: 42, 107, 106;
    --bs-link-hover-color: #2d6a4f;
    --bs-link-hover-color-rgb: 45, 106, 79;
}

/* Sand: terracotta and saffron on a warm paper white. */
[data-na-theme="sand"] {
    --sdfas-purple: #a4472a;
    --sdfas-purple-dark: #7f341d;
    --sdfas-purple-soft: #f6e8df;
    --sdfas-pink: #e0a032;
    --sdfas-gradient: linear-gradient(90deg, #7f341d 0%, #a4472a 35%, #d08c60 68%, #e9c46a 100%);
    --na-avatar: linear-gradient(135deg, #d08c60, #a4472a);
    --na-ink: #3a2a21;
    --na-muted: #78665b;
    --na-bg: #efe2d0;
    --bs-body-color-rgb: 58, 42, 33;
    --bs-primary-rgb: 164, 71, 42;
    --bs-border-color: #e6d8c8;
    --bs-link-color: #9a4a12;
    --bs-link-color-rgb: 154, 74, 18;
    --bs-link-hover-color: #7f341d;
    --bs-link-hover-color-rgb: 127, 52, 29;
}

/* Staff list: the Teacher tag opens the pop-up of the person's classes (a button that looks like the other tags). */
.cb-teacher-badge { cursor: pointer; font-weight: 600; }
.cb-teacher-badge:hover, .cb-teacher-badge:focus-visible { border-color: var(--sdfas-purple) !important; color: var(--sdfas-purple) !important; }
/* In the pop-up, a line between two classes. */
.cb-class-start > td { border-top: 2px solid var(--bs-border-color); }

/*
 * Student tags: a pill tinted with the tag's colour (--tag, set inline from StudentTag::COLORS), mixed
 * with the theme's page and ink colours so that it reads in light and dark themes alike.
 */
.cb-tag {
    display: inline-flex; align-items: center; gap: .35em; padding: .15em .6em; border-radius: 999px;
    font-size: .8rem; font-weight: 600; line-height: 1.4; white-space: nowrap; vertical-align: middle;
    color: color-mix(in srgb, var(--tag) 72%, var(--bs-body-color));
    background: color-mix(in srgb, var(--tag) 14%, var(--bs-body-bg));
    border: 1px solid color-mix(in srgb, var(--tag) 38%, var(--bs-body-bg));
}
.cb-tag::before { content: ''; width: .55em; height: .55em; border-radius: 50%; background: var(--tag); flex: none; }
.cb-tag-lg { font-size: 1.15rem; padding: .2em .8em; }
.cb-tag-x { border: 0; background: none; padding: 0 0 0 .15em; color: inherit; font-size: 1.05em; line-height: 1; opacity: .65; }
.cb-tag-x:hover, .cb-tag-x:focus-visible { opacity: 1; }
/* Hours count of a timetable (2026-11-16): the "+" / "−" of the other hours' detail; no animation (a tbody). */
.tt-hours-toggle { padding: 0 .4em; line-height: 1.3; font-weight: 700; }
.tt-hours-toggle::before { content: '+'; }
.tt-hours-toggle[aria-expanded="true"]::before { content: '−'; }
.tt-hours .collapsing { transition: none; height: auto !important; }
/* A group the student was removed from (2026-11-16, history of the student record). */
.cb-tag-removed { opacity: .6; font-weight: 500; }
/* Filing the student groups (2026-11-08): drop zones, pills dragged, category handles. */
.ga-zone { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .5rem; border: 1px dashed var(--bs-border-color); border-radius: .5rem; }
.ga-zone.ga-over, .ga-category.ga-over > .card-body, .ga-sub.ga-over { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.ga-zone .ga-empty { display: none; }
.ga-zone:not(:has(.ga-pill)) .ga-empty { display: inline; }
.ga-pill { display: inline-flex; align-items: center; gap: .35rem; cursor: grab; }
.ga-pill .ga-move { width: auto; max-width: 11rem; }
.ga-dragging { opacity: .45; }
.ga-handle { cursor: grab; user-select: none; font-size: 1.15rem; line-height: 1.2; color: var(--bs-secondary-color); }
.ga-sub { padding: .5rem .75rem; border-left: 3px solid var(--bs-border-color); }
/* Folded category (2026-11-08): only its header. */
.ga-category.ga-folded .ga-body { display: none; }
.ga-chevron { display: inline-block; transition: transform .15s; }
.ga-category:not(.ga-folded) .ga-chevron { transform: rotate(90deg); }
/* A block folded by default (fold_controller.js), e.g. a group's sessions. */
.cb-chevron { display: inline-block; transition: transform .15s; }
[data-controller~="fold"]:not(.cb-folded) .cb-chevron { transform: rotate(90deg); }
/* Colour picker of the tag form: the radios are hidden behind pills. */
.cb-swatches { display: flex; flex-wrap: wrap; gap: .4rem; }
.cb-swatch {
    display: inline-flex; align-items: center; gap: .4em; padding: .3em .75em; border-radius: 999px; cursor: pointer; font-size: .875rem;
    color: color-mix(in srgb, var(--tag) 72%, var(--bs-body-color));
    background: color-mix(in srgb, var(--tag) 12%, var(--bs-body-bg));
    border: 2px solid transparent;
}
.cb-swatch::before { content: ''; width: .8em; height: .8em; border-radius: 50%; background: var(--tag); }
.btn-check:checked + .cb-swatch { border-color: var(--tag); font-weight: 600; }
.btn-check:focus-visible + .cb-swatch { outline: 2px solid var(--tag); outline-offset: 2px; }
/* A tag's page: the list scrolls under a sticky header; members are tinted in "All students". */
.cb-tag-table { max-height: 65vh; overflow-y: auto; }
.cb-tag-table thead th { position: sticky; top: 0; z-index: 1; background: var(--bs-body-bg); }
.cb-tag-check { width: 2.25rem; }
.cb-tag-member > td { background: color-mix(in srgb, var(--bs-success) 7%, var(--bs-body-bg)); }
/* A group's page (2026-11-21): its facts in a row, "Cancel this date" opening its reason. */
.tg-cancel > summary { list-style: none; }
.tg-cancel > summary::-webkit-details-marker { display: none; }

/* Office hours settings (2026-11-03): a teacher's room field, only once they are ticked. */
.oh-teacher .oh-room { display: none; width: 7rem; }
.oh-teacher:has(.form-check-input:checked) .oh-room { display: block; }

/* Duties (2026-11-04): the summary grid, the person picker, a duty in a timetable (amber, striped). */
.duty-grid th, .duty-grid td { min-width: 8.5rem; }
.duty-grid td:not(:has(.duty-cell ul)) { background: var(--bs-tertiary-bg); }
/* The + of a cell, the − of a name, the popup to add someone, the status line kept in view. */
.duty-plus { padding: 0 .55rem; font-weight: 700; line-height: 1.4; }
.duty-minus { padding: 0 .35rem; line-height: 1.2; color: var(--bs-danger); border: 1px solid transparent; }
.duty-minus:hover, .duty-minus:focus-visible { border-color: var(--bs-danger); }
.duty-cell[aria-busy="true"] { opacity: .5; }
.duty-popup { position: fixed; z-index: 1060; width: 18rem; max-width: calc(100vw - 16px); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .2); }
.duty-popup-list { max-height: 14rem; overflow-y: auto; }
.duty-popup-list .list-group-item { cursor: pointer; }
.duty-status { position: sticky; top: .5rem; z-index: 1055; margin-bottom: .5rem; }
.picker-suggestions { position: absolute; z-index: 1050; left: 0; right: 0; max-height: 18rem; overflow-y: auto; box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15); }
.picker-suggestions .list-group-item { cursor: pointer; }
.duty-person { min-width: 16rem; }
.tt-grid td.tt-duty-cell { background: repeating-linear-gradient(135deg, #fff4d6 0 8px, #ffeab0 8px 16px); border-left: 4px solid #e8a200; color: #6b4a00; font-weight: 600; }
.tt-grid td.tt-duty-cell .tt-meta { color: #8a6100; font-weight: normal; }
.tt-duty-badge { background: #e8a200; color: #222; font-weight: normal; }
/* A teacher's timetable (2026-11-05): an empty cell adds a slot (slot-add controller), "+" on hover. */
.tt-grid td.tt-empty { cursor: pointer; text-align: center; vertical-align: middle; }
.tt-grid td.tt-empty .tt-empty-plus { visibility: hidden; color: var(--na-accent-text, #5b4c7d); font-weight: 700; font-size: 1.1rem; }
.tt-grid td.tt-empty:hover, .tt-grid td.tt-empty:focus-visible { background: var(--bs-tertiary-bg); outline: 2px dashed var(--bs-border-color); outline-offset: -3px; }
.tt-grid td.tt-empty:hover .tt-empty-plus, .tt-grid td.tt-empty:focus-visible .tt-empty-plus { visibility: visible; }

/* Timetables page (2026-11-05): ticked teachers, and their common free time on a real time scale. */
.tt-check { width: 2.5rem; }
.tt-selection { min-height: 2.5rem; }
.tt-chip { display: inline-flex; align-items: center; font-weight: normal; font-size: .9rem; padding: .35rem .5rem .35rem .75rem; }
.tt-chip .btn-close { width: .6em; height: .6em; }
.cg-grid { display: flex; gap: 4px; overflow-x: auto; }
.cg-axis { flex: 0 0 3.2rem; }
.cg-day { flex: 1 0 8.5rem; }
.cg-head { height: 2rem; font-weight: 600; text-align: center; }
.cg-col { position: relative; height: var(--cg-height); background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .25rem; }
.cg-axis .cg-col { background: none; border: 0; }
.cg-hour { position: absolute; right: .3rem; transform: translateY(-50%); font-size: .75rem; color: var(--bs-secondary-color); }
.cg-block { position: absolute; left: 2px; right: 2px; border-radius: .2rem; overflow: hidden; }
.cg-busy { background: repeating-linear-gradient(135deg, #e9ecef 0 6px, #dee2e6 6px 12px); }
.cg-short { background: #f1f8f2; }
.cg-run { background: #2f9e44; color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); z-index: 2; }
.cg-near { background: #d3f9d8; border: 2px dashed #2f9e44; color: #1b5e2a; z-index: 1; }
.cg-semi-part { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(255, 193, 7, .85) 0 6px, rgba(47, 158, 68, .2) 6px 12px); }
.cg-label { position: relative; display: block; padding: .15rem .35rem; font-size: .78rem; line-height: 1.25; }
.cg-run .cg-label { text-shadow: 0 0 3px rgba(0, 0, 0, .45); }
.cg-swatch { display: inline-block; width: 1.1rem; height: .8rem; vertical-align: middle; border-radius: .15rem; }
.cg-swatch.cg-run, .cg-swatch.cg-near { position: static; }
.cg-swatch.cg-semi { background: repeating-linear-gradient(135deg, #ffc107 0 4px, #2f9e44 4px 8px); }
.cg-warning { color: #8a6100; }
[data-bs-theme="dark"] .cg-busy { background: repeating-linear-gradient(135deg, #2b3035 0 6px, #343a40 6px 12px); }
[data-bs-theme="dark"] .cg-short { background: #1a2a1e; }
[data-bs-theme="dark"] .cg-near { background: #1e3a24; color: #b2f2bb; }
[data-bs-theme="dark"] .cg-warning { color: #f5cf6b; }
/* A teacher's week, faint over the grid while their name is hovered (2026-11-16, cg_ghost_controller.js). */
.cg-person { cursor: pointer; }
.cg-person-dot { display: inline-block; width: .6rem; height: .6rem; margin-right: .35rem; border-radius: 50%; background: var(--cg-ghost); vertical-align: middle; }
.cg-ghost { z-index: 3; pointer-events: none; background: color-mix(in srgb, var(--cg-ghost) 22%, transparent); border: 2px solid var(--cg-ghost); color: var(--bs-body-color); }
.cg-ghost-personal { border-style: dashed; }
.cg-ghost .cg-label { font-size: .72rem; font-weight: 600; }
.cg-grid.cg-ghosting .cg-block:not(.cg-ghost) { opacity: .35; }

/* A slot the teacher added in Nexus (2026-11-05): blue; inside a lesson's cell, a blue mark on its own block. */
.tt-grid td.tt-personal-cell { background: #e7f1ff; border-left: 4px solid #1c7ed6; color: #0b3d75; }
.tt-grid .tt-personal { border-left: 3px solid #1c7ed6; padding-left: .35rem; }
.tt-personal-badge { background: #1c7ed6; color: #fff; font-weight: normal; }
.tt-personal-dates { background: #fff; color: #0b3d75; border: 1px solid #1c7ed6; font-weight: normal; cursor: help; }
/* A session of a student group the teacher leads (2026-11-07): violet. */
.tt-grid td.tt-group-cell { background: #f3f0ff; border-left: 4px solid #7048e8; color: #3b2a7a; }
.tt-group-badge { background: #7048e8; color: #fff; font-weight: normal; }
/* Learning centers (2026-11-16): a session the teacher comes to help at; the badge also marks a lesson someone comes to. */
.tt-grid td.tt-lc-cell { background: #ebfbee; border-left: 4px solid #2f9e44; color: #1b4d2a; }
.tt-lc-badge { background: #2f9e44; color: #fff; font-weight: normal; cursor: help; }

/* The lesson times of the "Search by time" popup (2026-11-06): buttons in rows, easy to tap. */
.tt-periods { display: flex; flex-wrap: wrap; gap: .4rem; }
.tt-period { font-variant-numeric: tabular-nums; }

/* Students' photos (2026-11-06): the photo board, made for a phone (3 tiles a row, more on a wide screen), and the small photos of the lists. */
.ph-classes { display: flex; flex-wrap: wrap; gap: .5rem; }
.ph-class { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .75rem; }
.ph-tile {
    display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 100%; padding: .35rem; border: 0;
    border-radius: .75rem; background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; text-align: center;
    box-shadow: 0 0 0 1px var(--bs-border-color);
}
button.ph-tile:active { transform: scale(.97); }
.ph-tile.ph-missing { box-shadow: 0 0 0 2px var(--bs-warning-border-subtle); }
.ph-frame { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: .55rem; background: var(--bs-tertiary-bg); }
.ph-frame img { width: 100%; height: 100%; object-fit: cover; }
/* The groups page by category (2026-11-08): folded cards, a search with suggestions. */
.gl-search { max-width: 32rem; }
.gl-suggestions { z-index: 1050; }
.gl-cat > summary { cursor: pointer; list-style: none; }
.gl-cat > summary::-webkit-details-marker { display: none; }
.gl-cat > summary::before { content: "\25B8"; display: inline-block; width: 1em; transition: transform .15s; }
.gl-cat[open] > summary::before { transform: rotate(90deg); }
.gl-sub > summary { font-weight: 600; background: var(--bs-tertiary-bg); }
/* The "No Media Release" list (2026-11-08, SchoolSettings): a red frame around the photo. */
.ph-tile.ph-no-media .ph-frame { box-shadow: inset 0 0 0 4px #dc3545; }
.ph-tile.ph-no-media .ph-frame img { padding: 4px; border-radius: .55rem; }
.ph-no-media-key { display: inline-block; width: .9em; height: .9em; border: 3px solid #dc3545; border-radius: .2em; vertical-align: -.1em; }
/* Health information on a student's record (2026-11-15). */
.health-card { border-left: 4px solid var(--bs-danger); }
.health-text { white-space: pre-line; }
.health-list dt { font-weight: 500; color: var(--bs-secondary-color); }
.ph-none { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 600; color: var(--bs-secondary-color); }
.ph-camera { position: absolute; right: .3rem; bottom: .2rem; font-size: 1.1rem; }
.ph-name { font-size: .8rem; line-height: 1.2; overflow-wrap: anywhere; }
.ph-preview { width: 100%; height: auto; border-radius: .55rem; background: var(--bs-tertiary-bg); touch-action: none; cursor: grab; }
.ph-preview:active { cursor: grabbing; }
.ph-thumb { width: 2.25rem; height: 2.25rem; border-radius: 50%; object-fit: cover; background: var(--bs-tertiary-bg); flex: none; }
.ph-frame.ph-portrait { width: 9rem; height: 9rem; }
.ph-portrait .ph-none { font-size: 2.5rem; }

/* Sortable table headers (table_sort_controller.js): the header text is a button; an arrow on the sorted column. */
.th-sort { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: inherit; text-align: inherit; white-space: nowrap; }
.th-sort::after { content: "↕"; margin-left: .3rem; opacity: .35; font-size: .8em; }
th[aria-sort="ascending"] .th-sort::after { content: "↑"; opacity: .9; }
th[aria-sort="descending"] .th-sort::after { content: "↓"; opacity: .9; }
.th-sort:hover, .th-sort:focus-visible { text-decoration: underline; }


/* The account menu's theme picker: a preview tile per theme (its own colours, whatever the current theme). */
.na-user-menu { min-width: 21rem; }
/* Phone / tablet (folded navbar): the account menu opens in the flow, under the name, full width. */
@media (max-width: 991.98px) {
    .na-tools { flex-wrap: wrap; }
    .na-tools > .dropdown { display: contents; }
    .na-tools .na-user-menu { position: static; flex-basis: 100%; min-width: 0; margin-top: .25rem; box-shadow: none; }
}
.na-themes { padding: .25rem .5rem .4rem; }
.na-themes-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.na-theme-auto {
    display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border: 1px solid var(--bs-border-color);
    border-radius: 999px; background: none; color: var(--na-muted); font-size: .75rem; font-weight: 600;
}
.na-theme-auto svg { width: .9rem; height: .9rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.na-theme-auto:hover { color: var(--na-accent-text); border-color: var(--na-accent-text); }
.na-theme-auto[aria-pressed="true"] { color: #fff; background: var(--sdfas-purple); border-color: var(--sdfas-purple); }
/* Four light themes on the first row, four dark ones on the second. */
.na-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.na-swatch {
    display: flex; flex-direction: column; gap: .3rem; padding: .3rem; border: 0; border-radius: .7rem;
    background: none; color: var(--bs-body-color); font-size: .75rem; font-weight: 600; text-align: center;
    transition: background-color .15s;
}
.na-swatch:hover { background: var(--bs-tertiary-bg); }
.na-swatch-preview {
    position: relative; display: block; height: 3.1rem; overflow: hidden; border-radius: .55rem;
    background: var(--sw-bg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
    transition: transform .15s, box-shadow .15s;
}
.na-swatch:hover .na-swatch-preview { transform: translateY(-1px); }
.na-swatch-bar { position: absolute; inset: 0 0 auto; height: .45rem; background: var(--sw-bar); }
.na-swatch-card {
    position: absolute; left: .4rem; right: .4rem; bottom: .35rem; top: .85rem; display: flex; flex-direction: column;
    justify-content: center; gap: .22rem; padding: 0 .35rem; border-radius: .3rem; background: var(--sw-surface);
}
.na-swatch-line { display: block; height: .22rem; width: 75%; border-radius: 1rem; background: var(--sw-accent); }
.na-swatch-line.short { width: 45%; background: var(--sw-muted); }
.na-swatch-check {
    position: absolute; right: .25rem; top: .6rem; display: none; place-items: center; width: 1.1rem; height: 1.1rem;
    border-radius: 50%; background: var(--sw-accent); color: var(--sw-surface);
}
.na-swatch-check svg { width: .75rem; height: .75rem; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.na-swatch[aria-checked="true"] .na-swatch-preview { box-shadow: 0 0 0 2px var(--bs-body-bg), 0 0 0 4px var(--sw-accent); }
.na-swatch[aria-checked="true"] .na-swatch-check { display: grid; }
.na-swatch-sdfas { --sw-bg: #e9e5f1; --sw-surface: #fff; --sw-accent: #5b4c7d; --sw-muted: #e9506e; --sw-bar: linear-gradient(90deg, #0091ce, #5b4c7d 40%, #e9506e 72%, #ee7f4b); }
.na-swatch-ocean { --sw-bg: #d9e8f2; --sw-surface: #fff; --sw-accent: #0e6496; --sw-muted: #13a3b4; --sw-bar: linear-gradient(90deg, #0a4c73, #0e6496 35%, #13a3b4 70%, #7fd6c8); }
.na-swatch-forest { --sw-bg: #dde9de; --sw-surface: #fff; --sw-accent: #2d6a4f; --sw-muted: #c98b4a; --sw-bar: linear-gradient(90deg, #1f4d39, #2d6a4f 35%, #74a57f 68%, #d9a865); }
.na-swatch-sand { --sw-bg: #efe2d0; --sw-surface: #fff; --sw-accent: #a4472a; --sw-muted: #e0a032; --sw-bar: linear-gradient(90deg, #7f341d, #a4472a 35%, #d08c60 68%, #e9c46a); }
.na-swatch-night { --sw-bg: #0b0a10; --sw-surface: #25212f; --sw-accent: #c9bdf0; --sw-muted: #e9506e; --sw-bar: linear-gradient(90deg, #0091ce, #5b4c7d 40%, #e9506e 72%, #ee7f4b); }
.na-swatch-slate { --sw-bg: #060b16; --sw-surface: #1c2740; --sw-accent: #7cc4f5; --sw-muted: #a78bfa; --sw-bar: linear-gradient(90deg, #38bdf8, #818cf8 50%, #c084fc); }
.na-swatch-emerald { --sw-bg: #050f0b; --sw-surface: #15261f; --sw-accent: #6ee7b7; --sw-muted: #5eead4; --sw-bar: linear-gradient(90deg, #059669, #10b981 40%, #14b8a6 70%, #5eead4); }
.na-swatch-ember { --sw-bg: #100a06; --sw-surface: #241a14; --sw-accent: #fbbf77; --sw-muted: #f87171; --sw-bar: linear-gradient(90deg, #f59e0b, #f97316 50%, #ef4444); }
/* While the theme changes: a short cross-fade of the colours (theme_controller.js). */
html.na-theming, html.na-theming * {
    transition: background-color .3s ease, border-color .3s ease, color .3s ease, fill .3s ease !important;
}

/*
 * ---- Dark themes ---------------------------------------------------------------------------------
 * The shared base (Night: the school's purple, lightened for contrast on a dark background), on top
 * of Bootstrap's dark theme; Slate, Emerald and Ember below change its colours. The -rgb twins of the
 * secondary / tertiary backgrounds are set too: Bootstrap's bg-body-secondary / bg-body-tertiary
 * utilities read them.
 */
[data-bs-theme="dark"] {
    --sdfas-purple-soft: #2f2942;
    --na-accent-text: #c9bdf0;
    --na-ink: #e8e4f1;
    --na-muted: #a8a1bc;
    --na-bg: #0b0a10;
    --na-surface: #25212f;
    --na-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 3px 10px rgba(0, 0, 0, .35);

    --bs-body-color: var(--na-ink);
    --bs-body-color-rgb: 232, 228, 241;
    --bs-body-bg: var(--na-surface);
    --bs-body-bg-rgb: 37, 33, 47;
    --bs-secondary-color: var(--na-muted);
    --bs-emphasis-color: #fff;
    --bs-secondary-bg: #332e40;
    --bs-secondary-bg-rgb: 51, 46, 64;
    --bs-tertiary-bg: #2c2838;
    --bs-tertiary-bg-rgb: 44, 40, 56;
    --bs-link-color: #5ec4ef;
    --bs-link-color-rgb: 94, 196, 239;
    --bs-link-hover-color: var(--na-accent-text);
    --bs-link-hover-color-rgb: 201, 189, 240;
    --bs-border-color: #3d374d;
}
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] .na-brand,
[data-bs-theme="dark"] .na-nav .nav-link:hover,
[data-bs-theme="dark"] .na-nav .nav-link.active,
[data-bs-theme="dark"] .na-nav .nav-link.show,
[data-bs-theme="dark"] .na-lang a:hover,
[data-bs-theme="dark"] .nav-tabs .nav-link.active { color: var(--na-accent-text); }
[data-bs-theme="dark"] .na-header,
[data-bs-theme="dark"] .na-footer { background: var(--bs-body-bg); box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
[data-bs-theme="dark"] .na-lang { background: var(--bs-tertiary-bg); }
[data-bs-theme="dark"] .bg-white { background-color: var(--bs-body-bg) !important; }
[data-bs-theme="dark"] :focus-visible { outline-color: #5ec4ef; }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: var(--na-accent-text); --bs-btn-border-color: color-mix(in srgb, var(--na-accent-text) 60%, transparent); }
[data-bs-theme="dark"] .btn-outline-secondary { --bs-btn-color: var(--na-ink); --bs-btn-border-color: #4a445c; --bs-btn-hover-color: var(--na-accent-text); --bs-btn-hover-border-color: #5d5673; --bs-btn-active-color: var(--na-accent-text); --bs-btn-active-bg: #3a3350; }
[data-bs-theme="dark"] .btn-outline-info { --bs-btn-color: #3bc9db; }
[data-bs-theme="dark"] .btn-outline-warning { --bs-btn-color: #ffa94d; }
[data-bs-theme="dark"] .na-swatch-preview { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
[data-bs-theme="dark"] .na-theme-auto[aria-pressed="true"] { color: var(--bs-body-bg); background: var(--na-accent-text); border-color: var(--na-accent-text); }

/* Cerebro. */
/* The super admin badge in the header: dark text on the orange, whatever the theme's ink. */
[data-bs-theme="dark"] .na-acting { color: #1d1a26; }
[data-bs-theme="dark"] .skip-link:focus { background: var(--bs-body-bg); }
/* Neutral chips (Google, functions, codes…): Bootstrap keeps them light-grey with black text in the dark theme. */
[data-bs-theme="dark"] .text-bg-light { color: var(--na-ink) !important; background-color: var(--bs-tertiary-bg) !important; }
/* A teacher's week (.tt-grid), as in Nexus. */
[data-bs-theme="dark"] .tt-grid td.tt-lesson { background: color-mix(in srgb, var(--na-accent-text) 12%, var(--bs-body-bg)); border-left-color: color-mix(in srgb, var(--na-accent-text) 70%, transparent); }
[data-bs-theme="dark"] .tt-grid td.tt-activity { background: #2a2720; }
[data-bs-theme="dark"] .tt-grid td.tt-break-cell { background: repeating-linear-gradient(135deg, #0f3a31 0 8px, #134539 8px 16px); border-left-color: #2ec4a0; color: #a5f0dd; }
[data-bs-theme="dark"] .tt-grid td.tt-break-cell .tt-meta { color: #7fd6c0; }
[data-bs-theme="dark"] .tt-grid td.tt-duty-cell { background: repeating-linear-gradient(135deg, #3d2f05 0 8px, #4a3906 8px 16px); border-left-color: #ffc533; color: #ffe08a; }
[data-bs-theme="dark"] .tt-grid td.tt-duty-cell .tt-meta { color: #f5cf6b; }
[data-bs-theme="dark"] .tt-grid td.tt-personal-cell { background: #10263f; border-left-color: #4dabf7; color: #a5d8ff; }
[data-bs-theme="dark"] .tt-personal-dates { background: transparent; color: #a5d8ff; border-color: #4dabf7; }
[data-bs-theme="dark"] .tt-grid td.tt-group-cell { background: #231a45; border-left-color: #9775fa; color: #d0bfff; }
[data-bs-theme="dark"] .tt-grid td.tt-lc-cell { background: #13301c; border-left-color: #51cf66; color: #b2f2bb; }
[data-bs-theme="dark"] .tt-grid th.tt-today { color: var(--na-accent-text); }
[data-bs-theme="dark"] .tt-grid td.tt-today { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--na-accent-text) 30%, transparent); }

/* Slate: midnight blue, sky and violet; on the dark base above. */
[data-na-theme="slate"] {
    --sdfas-purple: #2f6fb0;
    --sdfas-purple-dark: #255a91;
    --sdfas-purple-soft: #1d2f4a;
    --sdfas-pink: #a78bfa;
    --sdfas-gradient: linear-gradient(90deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
    --na-avatar: linear-gradient(135deg, #38bdf8, #818cf8);
    --na-accent-text: #7cc4f5;
    --na-ink: #e2e8f0;
    --na-muted: #94a3b8;
    --na-bg: #060b16;
    --na-surface: #1c2740;
    --bs-body-color-rgb: 226, 232, 240;
    --bs-body-bg-rgb: 28, 39, 64;
    --bs-primary-rgb: 47, 111, 176;
    --bs-secondary-bg: #2a3856;
    --bs-secondary-bg-rgb: 42, 56, 86;
    --bs-tertiary-bg: #243150;
    --bs-tertiary-bg-rgb: 36, 49, 80;
    --bs-border-color: #33425f;
    --bs-link-color: #7dd3fc;
    --bs-link-color-rgb: 125, 211, 252;
    --bs-link-hover-color: #c4b5fd;
    --bs-link-hover-color-rgb: 196, 181, 253;
}
[data-na-theme="slate"] .na-header,
[data-na-theme="slate"] .na-footer { box-shadow: 0 4px 18px rgba(0, 0, 0, .45); }

/* Emerald: emerald and teal on a deep green-black; on the dark base above. */
[data-na-theme="emerald"] {
    --sdfas-purple: #1f7a5c;
    --sdfas-purple-dark: #17614a;
    --sdfas-purple-soft: #173a2e;
    --sdfas-pink: #5eead4;
    --sdfas-gradient: linear-gradient(90deg, #059669 0%, #10b981 40%, #14b8a6 70%, #5eead4 100%);
    --na-avatar: linear-gradient(135deg, #14b8a6, #059669);
    --na-accent-text: #6ee7b7;
    --na-ink: #e2f1ea;
    --na-muted: #93b3a6;
    --na-bg: #050f0b;
    --na-surface: #15261f;
    --bs-body-color-rgb: 226, 241, 234;
    --bs-body-bg-rgb: 21, 38, 31;
    --bs-primary-rgb: 31, 122, 92;
    --bs-secondary-bg: #21382f;
    --bs-secondary-bg-rgb: 33, 56, 47;
    --bs-tertiary-bg: #1b2f27;
    --bs-tertiary-bg-rgb: 27, 47, 39;
    --bs-border-color: #2a4439;
    --bs-link-color: #5eead4;
    --bs-link-color-rgb: 94, 234, 212;
    --bs-link-hover-color: #a7f3d0;
    --bs-link-hover-color-rgb: 167, 243, 208;
}

/* Ember: amber and orange on a warm charcoal; on the dark base above. */
[data-na-theme="ember"] {
    --sdfas-purple: #b45309;
    --sdfas-purple-dark: #92400e;
    --sdfas-purple-soft: #3d2a1c;
    --sdfas-pink: #f97316;
    --sdfas-gradient: linear-gradient(90deg, #f59e0b 0%, #f97316 50%, #ef4444 100%);
    --na-avatar: linear-gradient(135deg, #f59e0b, #ea580c);
    --na-accent-text: #fbbf77;
    --na-ink: #f3e9e1;
    --na-muted: #b9a596;
    --na-bg: #100a06;
    --na-surface: #241a14;
    --bs-body-color-rgb: 243, 233, 225;
    --bs-body-bg-rgb: 36, 26, 20;
    --bs-primary-rgb: 180, 83, 9;
    --bs-secondary-bg: #34261d;
    --bs-secondary-bg-rgb: 52, 38, 29;
    --bs-tertiary-bg: #2c2019;
    --bs-tertiary-bg-rgb: 44, 32, 25;
    --bs-border-color: #45332a;
    --bs-link-color: #fcd34d;
    --bs-link-color-rgb: 252, 211, 77;
    --bs-link-hover-color: #fdba74;
    --bs-link-hover-color-rgb: 253, 186, 116;
}
/* Parents tab of a student (2026-11-17, parent_row_controller.js): the e-mail of a filled row is required. */
.parent-email-required .form-label::after { content: " *"; color: var(--bs-danger); }

/*
 * Platform UI components (2026-11-17, the same block in every app, first used on Attendance's
 * "Planned absences/tardiness"): tabs as big buttons on a band, the active one filled with the theme
 * colour; filters on a light band; lists in cards with a coloured left border and a tinted header.
 * Theme colours only (--sdfas-purple, --na-surface, Bootstrap variables): they follow the eight themes.
 *
 *   <nav aria-label="…"><ul class="nav ui-tabs"> <li class="nav-item"><a class="nav-link active" aria-current="page">
 *       [<svg viewBox="0 0 24 24" aria-hidden="true">…</svg>] Label [<span class="badge rounded-pill ui-count">3</span>]</a></li> … </ul></nav>
 *   (or <nav class="ui-tabs"><a class="ui-tab active">…</a></nav>)
 *   <form class="ui-filters"> <div>label + field</div> … <button class="btn btn-sm btn-outline-primary">…</button> </form>
 *   <section class="card ui-section [ui-section-teal|ui-section-rose|ui-section-amber|ui-section-blue]">
 *       <div class="card-header ui-section-head">[svg] <h2 class="h5 mb-0">Title</h2> <span class="badge rounded-pill ui-section-count">n</span></div> … </section>
 */
.ui-tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .4rem; margin: 0 0 1rem; list-style: none; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-radius: .85rem; }
.ui-tabs .nav-item { display: flex; }
.ui-tabs .nav-link, .ui-tab {
    display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border: 0; border-radius: .6rem;
    color: var(--bs-body-color); background: transparent; font-weight: 600; text-decoration: none; transition: background-color .15s, color .15s;
}
.ui-tabs .nav-link:hover, .ui-tab:hover { background: var(--bs-body-bg); color: var(--bs-body-color); }
.ui-tabs .nav-link.active, .ui-tab.active, .ui-tabs .nav-link[aria-selected="true"] {
    background: var(--sdfas-purple); color: #fff; box-shadow: 0 .25rem .6rem color-mix(in srgb, var(--sdfas-purple) 35%, transparent);
}
.ui-tabs svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ui-count { background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); }
.ui-tabs .active .ui-count, .ui-tabs .active.ui-count, .ui-tabs .nav-link.active .badge { background: rgba(255, 255, 255, .25); color: #fff; border-color: transparent; }
.ui-tabs-sm .nav-link, .ui-tabs-sm .ui-tab { padding: .4rem .8rem; font-size: .9rem; }
.ui-filters {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; padding: .75rem 1rem; margin-bottom: 1.25rem;
    background: var(--na-surface); border: 1px solid var(--bs-border-color); border-radius: .75rem;
}
.ui-filters > * { margin-bottom: 0; }
.ui-filters .form-label { font-size: .85rem; margin-bottom: .2rem; }
.ui-filter-grow { flex: 1 1 14rem; max-width: 22rem; }
.ui-section { --ui-accent: var(--sdfas-purple); border: 1px solid color-mix(in srgb, var(--ui-accent) 35%, var(--bs-border-color)); border-left: .4rem solid var(--ui-accent); overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.ui-section-teal { --ui-accent: #0c8599; }
.ui-section-rose { --ui-accent: #d6336c; }
.ui-section-amber { --ui-accent: #e67700; }
.ui-section-blue { --ui-accent: #1c7ed6; }
.ui-section-head { display: flex; align-items: center; gap: .6rem; background: color-mix(in srgb, var(--ui-accent) 18%, var(--bs-body-bg)); border-bottom: 2px solid color-mix(in srgb, var(--ui-accent) 45%, transparent); }
.ui-section-head h2, .ui-section-head h3 { font-weight: 600; }
/* Body lightly tinted so the white cards nested in a section (periods, headings…) stand out. */
.ui-section > .card-body { background: color-mix(in srgb, var(--ui-accent) 4%, var(--bs-body-bg)); }
.ui-section > .card-body .card { border-color: color-mix(in srgb, var(--ui-accent) 25%, var(--bs-border-color)); }
.ui-section-head svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: var(--ui-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ui-section-count { background: var(--ui-accent); color: #fff; }
.ui-section .table { margin-bottom: 0; }
.ui-section .table > :not(caption) > * > :first-child { padding-left: 1rem; }
[data-bs-theme="dark"] .ui-section-teal { --ui-accent: #3bc9db; }
[data-bs-theme="dark"] .ui-section-rose { --ui-accent: #f06595; }
[data-bs-theme="dark"] .ui-section-amber { --ui-accent: #ffa94d; }
[data-bs-theme="dark"] .ui-section-blue { --ui-accent: #74c0fc; }
[data-bs-theme="dark"] .ui-section-teal .ui-section-count, [data-bs-theme="dark"] .ui-section-rose .ui-section-count,
[data-bs-theme="dark"] .ui-section-amber .ui-section-count, [data-bs-theme="dark"] .ui-section-blue .ui-section-count { color: #111; }
@media (max-width: 575.98px) {
    .ui-tabs .nav-item { flex: 1 1 calc(50% - .4rem); }
    .ui-tabs .nav-link, .ui-tab { flex: 1 1 auto; justify-content: center; padding: .5rem .6rem; }
}

/* "Copied" bubble of clipboard_controller.js (2026-11-17): above the button, with a small arrow. */
.copy-bubble {
    position: fixed; z-index: 1090; max-width: calc(100vw - 16px); padding: .35rem .7rem; border-radius: .5rem;
    background: #2f9e44; color: #fff; font-size: .85rem; font-weight: 600; box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .2);
    opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; pointer-events: none;
}
.copy-bubble.show { opacity: 1; transform: none; }
.copy-bubble::after {
    content: ""; position: absolute; left: calc(var(--copy-arrow, 50%) - 6px); border: 6px solid transparent;
}
.copy-bubble-above::after { top: 100%; border-top-color: #2f9e44; }
.copy-bubble-below::after { bottom: 100%; border-bottom-color: #2f9e44; }

/* Reports of meetings about a student (2026-11-19): the text as typed, line breaks kept. */
.report-text { white-space: pre-line; overflow-wrap: anywhere; }
.report-item > summary { cursor: pointer; }

/* ---- Card menus of the header (2026-11-20, as Nexus's "Tools" and "My apps"; _card_menu.html.twig, card_menu_controller.js): illustrated cards over the blurred page. The same block is in every app of the platform except Nexus. ---- */
.nx-menu-button { background: none; border: 0; }
.nx-menu-button[aria-expanded="true"] { color: #fff !important; background: var(--sdfas-purple); border-radius: .5rem; }
.nx-menu-button .nx-badge { background: var(--sdfas-pink); }
.nx-tools-empty { color: #fff; margin: 0; }
body.nx-tools-open { overflow: hidden; }
.nx-tools {
    position: fixed; inset: 0; z-index: 1050; overflow-y: auto;
    background: rgba(43, 37, 64, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: grid; place-items: start center;
    padding: calc(4.5rem + env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    animation: nx-tools-fade .2s ease both;
}
.nx-tools[hidden] { display: none; }
.nx-tools-panel { width: min(48rem, 100%); }
.nx-tools-head { display: flex; align-items: center; gap: 1rem; color: #fff; margin-bottom: 1rem; }
.nx-tools-head h2 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.nx-tools-hint { font-size: .85rem; opacity: .85; margin-left: auto; }
.nx-tools-close {
    width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; display: grid; place-items: center;
    background: rgba(255, 255, 255, .18); color: #fff;
}
.nx-tools-close:hover { background: rgba(255, 255, 255, .3); }
.nx-tools-close svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.nx-tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.nx-tool {
    --c: #5b4c7d; --c2: #8e6fd1;
    position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem;
    background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; border-radius: 1.1rem;
    box-shadow: 0 1px 2px rgba(43, 37, 64, .08), 0 8px 30px rgba(43, 37, 64, .16);
    transition: transform .18s ease, box-shadow .18s ease;
    animation: nx-tools-pop .35s ease both;
}
.nx-tool:nth-child(2) { animation-delay: .05s; }
.nx-tool:nth-child(3) { animation-delay: .1s; }
.nx-tool:nth-child(4) { animation-delay: .15s; }
.nx-tool:hover, .nx-tool:focus-visible { color: var(--bs-body-color); transform: translateY(-4px); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 35%, transparent); }
.nx-tool:focus-visible { outline: 3px solid var(--sdfas-pink); outline-offset: 3px; }
.nx-tool[aria-current="page"] { box-shadow: 0 0 0 3px var(--c), 0 8px 30px rgba(43, 37, 64, .16); }
.nx-tool-office_hours { --c: #0091ce; --c2: #00abc2; }
.nx-tool-assessments { --c: #5b4c7d; --c2: #8e6fd1; }
.nx-tool-incidents { --c: #e8590c; --c2: #e9506e; }
.nx-tool-groups { --c: #0ca678; --c2: #5fc84a; }
.nx-tool-compass { --c: #1565c0; --c2: #42a5f5; }
.nx-tool-cerebro { --c: #6a1b9a; --c2: #c2185b; }
.nx-tool-attendance { --c: #0b7285; --c2: #22b8cf; }
.nx-tool-nurse { --c: #c92a2a; --c2: #f06595; }
.nx-tool-lc { --c: #e67700; --c2: #fab005; }
.nx-tool-sandbox { --c: #495057; --c2: #868e96; }
.nx-tool-nexus { --c: #5b4c7d; --c2: #e9506e; }
.nx-tool-parents { --c: #d6336c; --c2: #f783ac; }
/* Cerebro's features, Attendance's kiosks. */
.nx-tool-announcements { --c: #e8590c; --c2: #fd7e14; }
.nx-tool-breaks { --c: #2b8a3e; --c2: #69db7c; }
.nx-tool-duties { --c: #1864ab; --c2: #4dabf7; }
.nx-tool-report_cards { --c: #364fc7; --c2: #748ffc; }
.nx-tool-notifications { --c: #9c36b5; --c2: #da77f2; }
.nx-tool-community_service { --c: #5c940d; --c2: #94d82d; }
.nx-tool-signatures { --c: #c2410c; --c2: #f59e0b; }
.nx-tool-welcoming { --c: #0b7285; --c2: #3bc9db; }
.nx-tool-dismissal { --c: #c2255c; --c2: #f06595; }
/* Quick links of the home page (2026-11-21): the same cards, in a grid of the page. */
.nx-tool-students { --c: #5b4c7d; --c2: #8e6fd1; }
.nx-tool-photos { --c: #d6336c; --c2: #f783ac; }
.nx-tool-timetables { --c: #0b7285; --c2: #22b8cf; }
.ch-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: 1rem; }
.ch-quick .nx-tool { box-shadow: 0 1px 2px rgba(43, 37, 64, .06), 0 4px 18px rgba(43, 37, 64, .08); }
.ch-quick .nx-tool:hover, .ch-quick .nx-tool:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 30%, transparent); }
@media (prefers-reduced-motion: reduce) { .ch-quick .nx-tool { animation: none; transition: none; } .ch-quick .nx-tool:hover { transform: none; } }
.nx-tool-ill {
    flex: none; width: 4rem; height: 4rem; border-radius: 1rem; position: relative; overflow: hidden;
    display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--c), var(--c2));
}
.nx-tool-ill::after { content: ""; position: absolute; width: 70%; height: 70%; right: -18%; top: -18%; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.nx-tool-ill svg { width: 54%; height: 54%; position: relative; z-index: 1; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nx-tool-text { display: grid; gap: .25rem; min-width: 0; }
.nx-tool-name { font-weight: 700; font-size: 1.1rem; }
.nx-tool-desc { color: var(--bs-secondary-color); font-size: .9rem; line-height: 1.35; }
.nx-tool-meta {
    width: fit-content; margin-top: .25rem; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
    color: color-mix(in srgb, var(--c) 85%, #000); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.nx-tool-meta[hidden] { display: none; }
.nx-tool-badge {
    position: absolute; top: .75rem; right: .75rem; min-width: 1.5rem; height: 1.5rem; padding: 0 .45rem; border-radius: .75rem;
    display: grid; place-items: center; background: var(--sdfas-pink); color: #fff; font-size: .8rem; font-weight: 800;
}
[data-bs-theme="dark"] .nx-tool-meta { color: color-mix(in srgb, var(--c) 55%, #fff); background: color-mix(in srgb, var(--c) 25%, transparent); }
[data-bs-theme="dark"] .nx-tools { background: rgba(5, 3, 10, .62); }
@keyframes nx-tools-fade { from { opacity: 0; } }
@keyframes nx-tools-pop { from { opacity: .4; transform: translateY(10px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .nx-tools, .nx-tool { animation: none; transition: none; } }
/* Phone: one card per row, the picture beside the text. */
@media (max-width: 575.98px) {
    .nx-tools { padding-top: calc(1.5rem + env(safe-area-inset-top, 0px)); }
    .nx-tools-hint { display: none; }
    .nx-tools-head .nx-tools-close { margin-left: auto; }
    .nx-tools-grid { grid-template-columns: 1fr; gap: .75rem; }
    .nx-tool { flex-direction: row; align-items: center; padding: 1rem; }
    .nx-tool-ill { width: 3.25rem; height: 3.25rem; }
    .nx-tool-badge { top: .5rem; right: .5rem; }
}

/* The menu's entries with their icon (2026-11-20, as in Nexus; _nav_icon.html.twig). */
.na-nav-link { display: inline-flex; align-items: center; gap: .4rem; }
.na-nav-icon { width: 1.05rem; height: 1.05rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* A student's identity in a tile (2026-11-21, school/student/show.html.twig). */
.st-id {
    position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1.5rem 1.25rem 1.25rem; border-radius: 1rem; background: var(--na-surface); overflow: hidden;
    box-shadow: 0 1px 2px rgba(43, 37, 64, .06), 0 4px 18px rgba(43, 37, 64, .08);
}
.st-id:not(.ui-hero)::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--sdfas-gradient); }
.st-id-main { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; min-width: 0; }
.st-id-main > div:last-child { min-width: 0; }
.st-id .ph-frame.ph-portrait { width: 8rem; height: 8rem; border-radius: 1rem; box-shadow: 0 0 0 4px var(--na-surface), 0 0 0 6px var(--sdfas-purple-soft); }
.st-id.ui-hero { overflow: visible; }
.st-id .st-id-main > div:last-child { flex: 1 1 20rem; }
.st-id .ph-tile { box-shadow: none; background: none; }
.st-id-fact { display: flex; align-items: center; gap: .5rem; margin-top: .2rem; }
.st-id-fact svg { width: 1.05rem; height: 1.05rem; flex: none; fill: none; stroke: var(--na-muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-id-edit { flex: none; }
@media (max-width: 575.98px) {
    .st-id { flex-direction: column; }
    .st-id-main { flex-direction: column; align-items: center; text-align: center; width: 100%; }
    .st-id-fact { justify-content: center; }
    .st-id-main .d-flex.flex-wrap { justify-content: center; }
    .st-id-edit { position: absolute; top: 1rem; right: 1rem; }
}

/* A student's groups in tiles (2026-11-21, Groups tab of the record): the colour as a band on the left. */
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: .75rem; }
.sg-tile {
    display: flex; flex-direction: column; gap: .3rem; padding: .8rem 1rem .8rem 1.1rem; border-radius: .85rem;
    background: color-mix(in srgb, var(--tag) 6%, var(--na-surface)); border: 1px solid color-mix(in srgb, var(--tag) 22%, var(--bs-border-color));
    border-left: 5px solid var(--tag); box-shadow: 0 1px 2px rgba(43, 37, 64, .05);
}
.sg-head { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.sg-dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--tag); flex: none; }
.sg-name { font-weight: 700; color: color-mix(in srgb, var(--tag) 60%, var(--bs-body-color)); min-width: 0; overflow-wrap: anywhere; }
.sg-name a { color: inherit; text-decoration: none; }
.sg-name a:hover, .sg-name a:focus-visible { text-decoration: underline; }
.sg-cat { font-size: .8rem; color: var(--bs-secondary-color); }
.sg-since { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--bs-secondary-color); }
.sg-since svg { width: .95rem; height: .95rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sg-x { border: 0; background: none; padding: 0 .2rem; font-size: 1.25rem; line-height: 1; color: var(--bs-secondary-color); border-radius: .35rem; }
.sg-x:hover, .sg-x:focus-visible { color: var(--bs-danger); background: var(--bs-danger-bg-subtle); }
.sg-empty { padding: 1rem; border: 1px dashed var(--bs-border-color); border-radius: .85rem; color: var(--bs-secondary-color); text-align: center; }
.sg-past li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.sg-years { display: flex; flex-direction: column; gap: .6rem; }
.sg-year { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; padding: .6rem .9rem; border-radius: .75rem; background: var(--bs-tertiary-bg); }
.sg-year-label { min-width: 6.5rem; font-size: .85rem; font-weight: 600; color: var(--bs-secondary-color); }

/* Opening the parents' accounts in bulk (2026-11-21): the figures of the summary. */
.pab-stat { height: 100%; padding: .8rem 1rem; border-radius: .85rem; background: var(--bs-tertiary-bg); }
.pab-num { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.pab-main { background: color-mix(in srgb, var(--bs-primary) 13%, var(--na-surface)); color: var(--na-accent-text); }
.pab-warn .pab-num { color: var(--bs-warning-text-emphasis); }
.columns-list { columns: 16rem; }

/* The role matrix by category (2026-11-21): folding header rows, the permissions indented below. */
.role-matrix .rm-cat-head { background: var(--bs-tertiary-bg); }
.role-matrix .rm-cat-head > * { background: transparent; border-top: 2px solid var(--bs-border-color); }
.rm-cat-toggle { padding: 0; font-weight: 600; white-space: nowrap; text-align: left; color: var(--bs-body-color); text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.rm-cat-toggle:hover { color: var(--sdfas-purple); }
.role-perm-cat { height: 100%; padding: .6rem .8rem; border: 1px solid var(--bs-border-color); border-radius: .6rem; background: var(--bs-tertiary-bg); }

/* School settings home (2026-11-21): "To check", then the four cards of the section. */
.sh-checks { border-left: .3rem solid var(--bs-warning); }
.sh-checks.sh-ok { border-left-color: var(--bs-success); }
.sh-checks.sh-ok h2 { color: var(--bs-success-text-emphasis); }
.sh-checks ul { padding-left: 1.2rem; }
.sh-checks li + li { margin-top: .25rem; }
.sh-card .sh-link { display: block; font-weight: 600; text-decoration: none; }
.sh-card .sh-link:hover { text-decoration: underline; }
.sh-card .sh-info { font-size: .875rem; color: var(--bs-secondary-color); }
.sh-card .sh-count { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.sh-card .sh-count:last-child { border-bottom: 0; }
.sh-card .sh-num { color: var(--bs-body-color); font-variant-numeric: tabular-nums; }

/* Roll call required, after a group's name in the lists (2026-11-23). */
.tg-roll-call { color: var(--na-accent-text, #5b4c7d); vertical-align: -2px; }

/*
 * Pages of a record (2026-11-23, first the student group's, then the student, staff, class and year
 * records): a header in the page's accent colour (--accent: the theme's, or the group's colour set on
 * .ui-page), facts as tiles with icons (_ui.html.twig), tinted cards, small section titles. The darker
 * mix (--accent-strong) keeps white text readable on light colours (amber). Theme variables only: right
 * in the light and the dark themes. tg-*: what only the group page has (day chips, calendar leaves).
 */
.ui-page { --accent: var(--na-accent-text); --accent-strong: color-mix(in srgb, var(--accent) 72%, #000); --accent-text: color-mix(in srgb, var(--accent) 70%, var(--bs-body-color)); }
.ui-ico { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; flex: none; }
.ui-hero {
    padding: 1.25rem 1.4rem; border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--bs-border-color)); border-left: 6px solid var(--accent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--bs-body-bg)) 0%, var(--bs-body-bg) 75%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px color-mix(in srgb, var(--accent) 12%, transparent);
}
.ui-hero-title { margin: 0; font-size: 1.75rem; font-weight: 700; color: color-mix(in srgb, var(--accent) 55%, var(--bs-emphasis-color)); }
.ui-hero-desc { margin-top: .3rem; color: var(--bs-secondary-color); }
.ui-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr)); gap: .6rem; font-size: .9rem; }
.ui-fact { display: flex; align-items: flex-start; gap: .65rem; padding: .6rem .75rem; border-radius: .7rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); }
.ui-fact-ico { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--accent) 18%, var(--bs-body-bg)); color: var(--accent-text); }
.ui-fact dt { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); }
.ui-fact dd { margin: 0; font-weight: 600; }
.ui-page .card { border-color: color-mix(in srgb, var(--accent) 20%, var(--bs-border-color)); }
.ui-page .card-header { background: color-mix(in srgb, var(--accent) 8%, var(--bs-body-bg)); }
.ui-page .card-header h2 .ui-ico, .ui-page .card-body > h2 .ui-ico { margin-right: .35rem; color: var(--accent-text); }
.ui-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; vertical-align: middle; background: color-mix(in srgb, var(--accent) 15%, var(--bs-body-bg)); color: var(--accent-text); }
.ui-section-title { margin-bottom: .6rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); }
.tg-session { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .8rem; padding: .75rem .9rem; border-radius: .75rem; border: 1px solid var(--bs-border-color-translucent); background: var(--bs-body-bg); }
.tg-session + .tg-session { margin-top: .5rem; }
.tg-session-ico { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: .65rem; flex: none; background: var(--accent-strong); color: #fff; font-size: 1.1rem; }
.tg-days { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.tg-day { display: inline-flex; align-items: center; justify-content: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; font-size: .72rem; font-weight: 700; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); }
.tg-day.on { background: var(--accent-strong); color: #fff; }
.tg-session-label { margin-left: .4rem; font-weight: 600; }
.ui-meta { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .4rem; font-size: .85rem; color: var(--bs-secondary-color); }
.ui-meta > span { display: inline-flex; align-items: center; gap: .3rem; }
.tg-max-input { max-width: 8rem; }
/* Students by weekday (2026-11-24): a member's day chips, each day's count against the limit. */
.tg-days-cell { white-space: nowrap; }
.tg-day-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; padding: .15rem .45rem; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.3; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-secondary-color); }
button.tg-day-chip { cursor: pointer; }
button.tg-day-chip:hover { border-color: var(--accent, var(--bs-primary)); color: var(--bs-body-color); }
.tg-day-chip.is-on { background: var(--accent-strong, var(--bs-primary)); border-color: var(--accent-strong, var(--bs-primary)); color: #fff; }
span.tg-day-chip:not(.is-on) { opacity: .45; }
.tg-day-chip:disabled { opacity: .6; }
.tg-day-count { display: inline-flex; align-items: stretch; overflow: hidden; border-radius: .55rem; border: 1px solid var(--bs-border-color); font-size: .82rem; background: var(--bs-body-bg); }
.tg-day-count-d { padding: .2rem .5rem; font-weight: 700; background: color-mix(in srgb, var(--accent, var(--bs-primary)) 14%, var(--bs-body-bg)); color: var(--accent-text, var(--bs-body-color)); }
.tg-day-count-n { padding: .2rem .5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tg-day-count.is-full { border-color: var(--bs-success); }
.tg-day-count.is-full .tg-day-count-n { color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); }
.tg-day-count.is-over { border-color: var(--bs-danger); }
.tg-day-count.is-over .tg-day-count-n { color: var(--bs-danger-text-emphasis); background: var(--bs-danger-bg-subtle); }
/* A tile changed in place (2026-11-24, the "Places" of a group): the whole tile opens its window. */
.ui-fact-edit { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ui-fact-edit:hover, .ui-fact-edit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 .15rem color-mix(in srgb, var(--accent) 25%, transparent); }
.ui-fact-link { all: unset; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; cursor: pointer; }
.ui-fact-link:focus-visible { outline: none; }
.ui-fact-pen { width: .95rem; height: .95rem; fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.ui-fact-edit:hover .ui-fact-pen { opacity: 1; }
.tg-leaf { display: inline-flex; flex-direction: column; align-items: center; width: 2.9rem; flex: none; overflow: hidden; line-height: 1; border-radius: .55rem; background: var(--bs-body-bg); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--bs-border-color)); }
.tg-leaf-m { width: 100%; padding: .2rem 0; text-align: center; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: var(--accent-strong); color: #fff; }
.tg-leaf-d { padding: .22rem 0 .28rem; font-size: 1.15rem; font-weight: 700; }
.tg-date-cancelled .tg-leaf { filter: grayscale(1); opacity: .5; }
.ui-page .min-w-0 { min-width: 0; }
.ui-page { overflow-wrap: anywhere; }
.ui-hero-title { color: var(--accent-text); }
.ui-btn-surface { background: var(--bs-body-bg); }
.ui-btn-quiet { color: var(--bs-secondary-color); border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); }
.ui-btn-quiet:hover, .tg-cancel[open] > .ui-btn-quiet { color: var(--bs-danger-text-emphasis); border-color: var(--bs-danger-border-subtle); background: var(--bs-danger-bg-subtle); }
.ui-pill { display: inline; white-space: normal; line-height: 1.9; }
.ui-pill .ui-ico { margin-right: .3rem; }
.tg-session { flex-wrap: wrap; }
.tg-session > .flex-grow-1 { flex: 1 1 12rem; }
.tg-session > form, .tg-session > details { margin-left: auto; }
.ui-chip { font-weight: 600; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 14%, var(--bs-body-bg)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--bs-body-bg)); }
.st-id.ui-hero .st-id-main { flex: 1 1 auto; flex-wrap: nowrap; align-items: flex-start; }
@media (max-width: 575.98px) { .st-id.ui-hero .st-id-main { flex-wrap: wrap; } }

/*
 * Lists and feature pages (2026-11-24): .ui-page with a tone (the colour of the feature's card in the
 * Features menu), the title's icon in a gradient badge, the introduction as a soft callout, the table
 * headers in the accent colour; .ui-list: roomier rows.
 */
.ui-tone-people { --accent: #1864ab; }
.ui-tone-groups { --accent: #0ca678; }
.ui-tone-classes { --accent: #0b7285; }
.ui-tone-announcements { --accent: #e8590c; }
.ui-tone-breaks { --accent: #2b8a3e; }
.ui-tone-duties { --accent: #1864ab; }
.ui-tone-office_hours { --accent: #0091ce; }
.ui-tone-report_cards { --accent: #364fc7; }
.ui-tone-assessments { --accent: #7048e8; }
.ui-tone-notifications { --accent: #9c36b5; }
.ui-tone-community_service { --accent: #5c940d; }
.ui-tone-signatures { --accent: #c2410c; }
/* Signatures (2026-11-29): statuses, progress, the choices of who signs, the fields editor. */
.sg-status { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid transparent; }
.sg-status-draft { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.sg-status-sent, .sg-status-waiting { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.sg-status-opened { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.sg-status-signed { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.sg-status-cancelled { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.sg-progress { display: inline-block; width: 6rem; height: .45rem; border-radius: 999px; background: var(--bs-secondary-bg); overflow: hidden; vertical-align: middle; margin-right: .4rem; }
.sg-progress span { display: block; height: 100%; background: var(--bs-success); }
.sg-pick summary { cursor: pointer; }
.sg-checks > div { columns: 2 12rem; column-gap: 1.25rem; }
.sg-checks .form-check { break-inside: avoid; }
.sg-copy-list { columns: 2 18rem; }
.sg-side { position: sticky; top: 1rem; }
.sg-pages { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.sg-page { position: relative; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); background: #fff; }
.sg-canvas { display: block; width: 100%; height: 100%; }
.sg-layer { position: absolute; inset: 0; touch-action: none; }
.sg-armed .sg-layer { cursor: crosshair; }
.sg-page-number { position: absolute; right: .4rem; bottom: -1.3rem; font-size: .75rem; color: var(--bs-secondary-color); }
.sg-field { position: absolute; display: flex; align-items: center; padding: 0 .3rem; overflow: hidden; border: 1.5px dashed var(--accent); border-radius: .25rem; background: color-mix(in srgb, var(--accent) 14%, transparent); color: color-mix(in srgb, var(--accent) 75%, #000); font-size: .72rem; font-weight: 600; cursor: move; touch-action: none; user-select: none; }
.sg-field.is-selected { border-style: solid; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 24%, transparent); }
.sg-field-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.sg-field-signature, .sg-field-initials { border-color: #1d4ed8; background: rgba(29, 78, 216, .1); color: #1e3a8a; }
.sg-field-prefill { border-color: #7c3aed; background: rgba(124, 58, 237, .1); color: #4c1d95; }
.sg-handle { position: absolute; right: -1px; bottom: -1px; width: .7rem; height: .7rem; background: var(--accent); border-radius: .15rem 0 .2rem 0; cursor: nwse-resize; }
.sg-tool.active { background: var(--accent); border-color: var(--accent); color: #fff; }
/* The signing pages, signatures.sdfas.org (2026-11-29). */
.sp-body { background: #f4f1ee; }
.sp-header { background: #fff; border-bottom: 3px solid #c2410c; padding: .6rem 0; }
.sp-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: #1f2933; text-decoration: none; }
.sp-card { background: #fff; border-radius: 1rem; padding: 1.5rem; box-shadow: 0 2px 12px rgba(0, 0, 0, .06); }
.sp-doc { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; margin-bottom: .6rem; border-radius: .8rem; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .06); color: inherit; text-decoration: none; }
a.sp-doc:hover { box-shadow: 0 2px 10px rgba(194, 65, 12, .25); }
.sp-doc-ico { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; flex: none; background: #ffedd5; color: #c2410c; font-size: 1.1rem; }
.sp-doc.is-done .sp-doc-ico { background: #dcfce7; color: #15803d; }
.sp-doc.is-closed { opacity: .7; }
.sp-doc-title { display: block; font-weight: 700; }
.sp-doc-meta { display: block; font-size: .85rem; color: #52606d; }
.sp-message { background: #fff; border-left: 4px solid #c2410c; border-radius: .5rem; padding: .75rem 1rem; }
.sp-steps { display: flex; flex-wrap: wrap; gap: .5rem; }
.sp-steps span { padding: .25rem .7rem; border-radius: 999px; background: #fff; font-size: .85rem; font-weight: 600; color: #7c2d12; }
.sp-pages .sg-page { max-width: 100%; }
.sp-layer { touch-action: auto; }
.sp-field { position: absolute; display: flex; align-items: center; justify-content: center; border-radius: .2rem; background: rgba(255, 237, 213, .75); outline: 1.5px solid #f59e0b; }
.sp-field.is-done { background: rgba(220, 252, 231, .6); outline-color: #16a34a; }
.sp-check .sp-field.is-required:not(.is-done) { outline: 2px solid #dc2626; background: rgba(254, 226, 226, .8); }
.sp-field input[type="text"] { width: 100%; height: 100%; border: 0; background: transparent; font-size: clamp(.6rem, 1.4vw, .9rem); padding: 0 .25rem; color: #13286b; }
.sp-field input[type="text"]:focus { outline: none; background: rgba(255, 255, 255, .8); }
.sp-field input[type="checkbox"] { width: 80%; height: 80%; margin: 0; }
.sp-field-yesno { gap: 2px; }
.sp-field-yesno button { flex: 1; height: 100%; border: 0; border-radius: .2rem; background: rgba(255, 255, 255, .7); font-size: clamp(.55rem, 1.2vw, .8rem); font-weight: 600; }
.sp-field-yesno button[aria-pressed="true"] { background: #13286b; color: #fff; }
.sp-fixed { font-size: clamp(.55rem, 1.3vw, .85rem); color: #13286b; white-space: nowrap; overflow: hidden; }
.sp-field-date, .sp-field-prefill { background: rgba(237, 233, 254, .6); outline-color: #a78bfa; }
.sp-draw { width: 100%; height: 100%; border: 0; background: transparent; font-weight: 700; color: #c2410c; font-size: clamp(.6rem, 1.4vw, .9rem); }
.sp-field img { max-width: 100%; max-height: 100%; cursor: pointer; mix-blend-mode: multiply; }
@media (min-width: 768px) { .sp-finish { position: sticky; bottom: .5rem; } }
.sp-code { width: 8rem; letter-spacing: .3em; font-weight: 700; text-align: center; }
.sp-pad { border: 0; border-radius: 1rem; padding: 1.25rem; width: min(640px, 96vw); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.sp-pad::backdrop { background: rgba(0, 0, 0, .45); }
.sp-pad-canvas { display: block; width: 100%; height: auto; aspect-ratio: 600 / 220; border: 2px dashed #f59e0b; border-radius: .6rem; background: #fff; touch-action: none; }
/* The Community Service poster form (2026-11-24): weeks as chips by month, groups, the poster just made. */
.cs-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: .6rem 1rem; }
.cs-month-name { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); margin-bottom: .25rem; }
.cs-week { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-body-color); cursor: pointer; user-select: none; }
.cs-week:hover { border-color: var(--accent); }
.cs-week.is-past { color: var(--bs-secondary-color); }
.cs-week.is-now { box-shadow: 0 0 0 .15rem color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-check:checked + .cs-week { background: var(--accent-strong, var(--accent)); border-color: var(--accent-strong, var(--accent)); color: #fff; }
.btn-check:focus-visible + .cs-week { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-groups { columns: 2 16rem; column-gap: 1.5rem; }
.cs-groups .form-check { break-inside: avoid; }
.cs-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .4rem; vertical-align: -.05rem; }
.cs-fresh { padding: .75rem 1rem; border-radius: .7rem; border: 1px solid var(--bs-success-border-subtle); background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
/* Community Service › Participations (2026-11-24). */
.cp-count { display: inline-block; min-width: 2.4rem; padding: .15rem .55rem; border-radius: 999px; font-weight: 700; font-size: 1rem; background: color-mix(in srgb, var(--accent) 16%, var(--bs-body-bg)); color: var(--accent-text); font-variant-numeric: tabular-nums; }
.cp-absent { display: inline-block; min-width: 2rem; padding: .1rem .5rem; border-radius: 999px; font-weight: 600; background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.cp-ini { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: .5rem; vertical-align: middle; font-size: .8rem; font-weight: 700; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.cp-group { display: inline-flex; align-items: center; gap: .3rem; margin: .1rem .2rem .1rem 0; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; border: 1px solid color-mix(in srgb, var(--g) 45%, var(--bs-border-color)); background: color-mix(in srgb, var(--g) 12%, var(--bs-body-bg)); }
.cp-group b { font-variant-numeric: tabular-nums; }
.cp-details summary { list-style: none; }
.cp-details summary::-webkit-details-marker { display: none; }
.cp-items { margin-top: .4rem; min-width: 17rem; text-align: start; }
.cp-item { display: flex; gap: .5rem; align-items: baseline; padding: .15rem 0; font-size: .82rem; border-bottom: 1px dashed var(--bs-border-color); }
.cp-item-date { min-width: 6.5rem; font-variant-numeric: tabular-nums; }
.cp-item-group { flex: 1; color: var(--bs-secondary-color); }
.cp-item-status { font-weight: 600; }
.cp-item.is-present .cp-item-status { color: var(--bs-success-text-emphasis); }
.cp-item.is-late .cp-item-status { color: var(--bs-warning-text-emphasis); }
.cp-item.is-absent .cp-item-status { color: var(--bs-danger-text-emphasis); }
.ui-title { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; font-weight: 700; }
.ui-title-ico {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.6rem; height: 2.6rem;
    border-radius: .8rem; font-size: 1.3rem; color: #fff;
    background: linear-gradient(135deg, var(--accent-strong), color-mix(in srgb, var(--accent) 70%, #fff));
    box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.ui-intro { padding: .65rem .95rem; border-left: 4px solid var(--accent); border-radius: .5rem; background: color-mix(in srgb, var(--accent) 7%, var(--bs-body-bg)); }
.ui-page .table > thead th { color: var(--accent-text); }
.ui-list .table > tbody > tr > td { padding-top: .55rem; padding-bottom: .55rem; }

/* The hidden attribute always wins (2026-12-01): Bootstrap's d-flex / d-block (display: ... !important)
   kept elements with hidden on screen, e.g. the install banner that would not close. */
[hidden] {
    display: none !important;
}
