@charset "UTF-8";
/* ==========================================================================
   VVU Executive Appointment Management System
   Office of the Vice-Chancellor, Valley View University

   A purpose-built stylesheet, written by hand rather than generated from a
   utility framework. There is no build step: this file is the design system.

   Contents
     00  Typefaces
     01  Design tokens
     02  Reset and base
     03  Typography
     04  Application shell
     05  Sidebar
     06  Top bar
     07  Buttons
     08  Status, badges and chips
     09  Cards and panels
     10  Statistics
     11  Tables
     12  Forms
     13  Modals and drawers
     14  Toasts and inline messages
     15  Dropdowns and menus
     16  Tabs and segmented controls
     17  Timeline and schedule
     18  Calendar
     19  Charts
     20  Steppers
     21  Empty states and skeletons
     22  Pagination and toolbars
     23  Public portal
     24  Authentication
     25  Utilities
     26  Theme: colour, depth and card treatment
     27  Responsive
     28  Motion and print
   ========================================================================== */

/* ==========================================================================
   00  Typefaces

   Plus Jakarta Sans carries the whole interface: a modern geometric humanist
   with the sophistication the executive office asks for and the legibility a
   dense administrative screen needs.

   The variable font is served from assets/fonts rather than from Google's CDN,
   so the office keeps a working system when the campus link is down. One file
   carries every weight from 200 to 800.
   ========================================================================== */

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-normal-latin-ext.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;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-normal-latin.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: 'Plus Jakarta Sans';
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-italic-latin-ext.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;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-italic-latin.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;
}

/* ==========================================================================
   01  Design tokens

   Deep Navy carries institutional authority — the sidebar, the primary button,
   the display type. Royal Blue is the functional driver: links, focus, active
   navigation, selection. Institutional Gold is the prestige accent and is used
   with deliberate restraint — VIP marks, the institutional rule, gold-tier
   status. Surfaces stay cool and neutral so a long day of scheduling does not
   tire the eye; separation is carried by 1px lines rather than by shadow.
   ========================================================================== */

:root {
    /* Deep Navy — institutional authority: sidebar, primary buttons, titling */
    --navy-900: #19337A;
    --navy-800: #1E3A8A;
    --navy-700: #1557B0;   /* Royal Blue — the interactive voice */
    --navy-600: #1E5CB5;
    --navy-300: #A6C2EA;
    --navy-100: #DCE8FA;
    --navy-50:  #F0F5FD;

    /* Institutional Gold — prestige only, never decoration */
    --gold-800: #7A6115;
    --gold-700: #A5831C;
    --gold-600: #C9A227;
    --gold-300: #E6CE7C;
    --gold-200: #F2E5BB;
    --gold-100: #FBF6E7;

    /* Text */
    --ink-900: #101828;
    --ink-800: #1D2939;
    --ink-700: #344054;
    --ink-600: #475467;
    --ink-500: #667085;
    --ink-400: #98A2B3;
    --ink-300: #C3CAD5;

    /* Surfaces */
    --paper:     #F5F7FA;
    --surface:   #FFFFFF;
    --surface-2: #FCFDFE;
    --surface-3: #F2F4F7;
    --line:        #E4E7EC;
    --line-strong: #D0D5DD;
    --line-soft:   #EFF1F5;

    /* Status — soft-fill pairs: a pale ground, a legible foreground, a hairline */
    --ok:         #067647;  --ok-bg:      #ECFDF3;  --ok-line:      #A9EFC5;
    --warn:       #B54708;  --warn-bg:    #FFFAEB;  --warn-line:    #FEDF89;
    --danger:     #B42318;  --danger-bg:  #FEF3F2;  --danger-line:  #FECDCA;
    --info:       #1557B0;  --info-bg:    #EFF4FF;  --info-line:    #C7D7FE;
    --neutral:    #475467;  --neutral-bg: #F2F4F7;  --neutral-line: #E0E4EA;
    --violet:     #6941C6;  --violet-bg:  #F4F3FF;  --violet-line:  #D9D6FE;
    --teal:       #0E7090;  --teal-bg:    #F0F9FF;  --teal-line:    #B9E6FE;

    /* Radii — rounded, to balance the seriousness of the navy */
    --r-xs:   4px;
    --r-sm:   6px;
    --r:      8px;
    --r-lg:   12px;
    --r-xl:   16px;
    --r-pill: 999px;

    /* Elevation — tonal layers first, ambient shadow second */
    --shadow-xs: 0 1px 2px rgba(30, 58, 138, .04);
    --shadow-sm: 0 1px 3px rgba(30, 58, 138, .06), 0 1px 2px rgba(30, 58, 138, .04);
    --shadow-md: 0 4px 12px rgba(30, 58, 138, .07), 0 2px 4px -2px rgba(30, 58, 138, .04);
    --shadow-lg: 0 12px 32px rgba(30, 58, 138, .12), 0 4px 10px -6px rgba(30, 58, 138, .08);

    /* Typography — one family, used across display, interface and titling.
       Platform stacks remain as fallbacks for anyone who blocks web fonts. */
    --font-ui: "Plus Jakarta Sans", "Segoe UI Variable Text", "Segoe UI", -apple-system,
               BlinkMacSystemFont, system-ui, "Helvetica Neue", Arial, sans-serif;
    --font-display: var(--font-ui);
    /* Institutional titling — the University's name, marks, page headlines.
       The same face, set tighter, so the voice changes without the family. */
    --font-serif: var(--font-ui);
    --font-mono: "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;

    /* Metrics */
    --sidebar-w:  280px;
    --topbar-h:   64px;
    --content-max: 1440px;
    --bottomnav-h: 68px;

    --t-fast: 120ms;
    --t-base: 190ms;
    --t-slow: 320ms;
    --ease: cubic-bezier(.32, .72, .35, 1);
}

/* ==========================================================================
   02  Reset and base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;

    /* Nothing in this system is meant to be read by scrolling sideways: wide
       content (tables, toolbars) carries its own scroller. This stops a single
       stray element from making the whole page slide left and right on a
       handset. `clip` rather than `hidden` so the sticky sidebar and top bar
       keep working -- `hidden` here would make the page a scroll container. */
    overflow-x: clip;
}

/* `overflow: clip` is not understood by Safari before 16, nor by the older
   Android browsers, and an unknown value is simply dropped -- so on those
   handsets the rule above does nothing and the page can still be dragged
   sideways. They get `hidden` instead, on the two public shells only: those
   carry no sticky descendant, so making them clip horizontally costs nothing,
   whereas `hidden` on html or body would turn the page into a scroll
   container and unstick the staff sidebar and top bar. */
@supports not (overflow: clip) {
    .portal,
    .auth { overflow-x: hidden; }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink-700);
    font-family: var(--font-ui);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums;
}

img, svg, video { max-width: 100%; }
img { height: auto; border: 0; }

svg.icon {
    width: 1.05em;
    height: 1.05em;
    flex: 0 0 auto;
    vertical-align: -.16em;
}

svg.icon-lg { width: 1.35em; height: 1.35em; }
svg.icon-xl { width: 1.9em;  height: 1.9em; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

a {
    color: var(--navy-700);
    text-decoration: none;
    text-underline-offset: 2px;
}

a:hover { text-decoration: underline; }

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1.25rem 0;
}

::selection {
    background: var(--navy-100);
    color: var(--navy-900);
}

/* One consistent focus treatment across the whole application. */
:focus { outline: none; }

:focus-visible {
    outline: 2px solid var(--navy-600);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 12px;
    z-index: 200;
    padding: .6rem 1rem;
    background: var(--navy-800);
    color: #fff;
    border-radius: 0 0 var(--r) var(--r);
    font-weight: 600;
    transition: top var(--t-fast) var(--ease);
}

.skip-link:focus { top: 0; text-decoration: none; }

/* Visible only to screen readers. */
.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;
}

/* Thin, unobtrusive scrollbars. */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }

*::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border: 3px solid transparent;
    border-radius: var(--r-pill);
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover { background: var(--ink-300); background-clip: content-box; }

/* ==========================================================================
   03  Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--ink-900);
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.008em;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.03rem; }
h4 { font-size: .94rem; }

p { margin: 0 0 .85rem; }
p:last-child { margin-bottom: 0; }

/* The small capitalised label used above groups and in table headers. */
.eyebrow {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.lede {
    font-size: 1rem;
    color: var(--ink-500);
    line-height: 1.6;
}

/* A heading that stands on the page rather than inside a card, with the
   institutional rule beneath it. */
.section-title {
    position: relative;
    margin-bottom: 1.15rem;
    padding-bottom: .6rem;
    font-family: var(--font-serif);
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: .006em;
    color: var(--navy-900);
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 2px;
    background: var(--gold-600);
}

.muted   { color: var(--ink-400); }
.subtle  { color: var(--ink-500); }
.strong  { font-weight: 600; color: var(--ink-900); }
.small   { font-size: .82rem; }
.tiny    { font-size: .74rem; }
.numeric { font-variant-numeric: tabular-nums; }

.mono {
    font-family: var(--font-mono);
    font-size: .86em;
    letter-spacing: -.01em;
}

/* Appointment references read as identifiers, not prose. */
.reference {
    font-family: var(--font-mono);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--navy-700);
    white-space: nowrap;
}

.serif { font-family: var(--font-serif); }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   04  Application shell
   ========================================================================== */

.shell {
    display: flex;
    min-height: 100vh;
}

.shell__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.page {
    flex: 1 1 auto;
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 1.5rem 1.75rem 3.5rem;
}

.page--wide { max-width: none; }
.page--narrow { max-width: 940px; }

/* Page heading block: title, meta line, actions. */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}

.page-head__text { min-width: 0; }

.page-head h1 {
    font-size: 1.42rem;
    margin-bottom: .28rem;
}

.page-head__meta {
    color: var(--ink-500);
    font-size: .88rem;
}

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

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: .34rem;
    margin-bottom: .55rem;
    font-size: .78rem;
    color: var(--ink-400);
    flex-wrap: wrap;
}

.breadcrumbs a { color: var(--ink-500); }
.breadcrumbs a:hover { color: var(--navy-700); }
.breadcrumbs svg.icon { width: .82em; height: .82em; color: var(--ink-300); }
.breadcrumbs [aria-current] { color: var(--ink-700); font-weight: 600; }

/* Layout grids used across screens. */
.grid { display: grid; gap: 1.1rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar-right { grid-template-columns: minmax(0, 1fr) 344px; }

/* A short form should not be stretched to the height of the notes beside it;
   the dead space under the submit button reads as something missing. */
.grid--sidebar-right > form.card { align-self: start; }
.grid--sidebar-left  { grid-template-columns: 320px minmax(0, 1fr); }
.grid--dash { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }

/* A card with nothing in it should keep its own height rather than being
   stretched to a taller neighbour: a short message floating in a deep void
   reads as a fault rather than as "nothing to do today". */
.grid--dash > .card:has(.empty) { align-self: start; }

.stack { display: flex; flex-direction: column; gap: 1.1rem; }
.stack--tight { gap: .6rem; }
.stack--loose { gap: 1.6rem; }

.row {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.row--top { align-items: flex-start; }
.row--nowrap { flex-wrap: nowrap; }

/* ==========================================================================
   05  Sidebar
   ========================================================================== */

.sidebar {
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);
    background: var(--navy-900);
    color: #C7D4E6;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    /* The same weave as the masthead, over the institutional gradient. */
    background-image: url("../img/pattern-weave.svg"),
                      linear-gradient(178deg, #1E3A8A 0%, #1E3A8A 46%, #19337A 100%);
    background-size: 72px 72px, auto;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .95rem 1.05rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    position: relative;
}

/* The gold hairline that carries the institutional identity. */
.sidebar__brand::after {
    content: "";
    position: absolute;
    left: 1.05rem;
    right: 1.05rem;
    bottom: -1px;
    height: 2px;
    background: var(--gold-600);
}

.brandmark {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--navy-800);
    border-radius: var(--r-sm);
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
    overflow: hidden;
}

.brandmark img { width: 100%; height: 100%; object-fit: contain; }

.sidebar__brand-text { min-width: 0; }

.sidebar__brand-text .name {
    display: block;
    font-family: var(--font-serif);
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .012em;
    text-transform: uppercase;
    line-height: 1.2;
}

.sidebar__brand-text .office {
    display: block;
    font-size: .72rem;
    color: #93A9C8;
    margin-top: .12rem;
    line-height: 1.3;
}

.sidebar__nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .85rem .6rem 1.5rem;
}

.nav-group + .nav-group { margin-top: 1.1rem; }

.nav-group__label {
    padding: 0 .5rem .4rem;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #62789A;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .62rem;
    padding: .52rem .6rem;
    margin-bottom: 1px;
    border-radius: var(--r-sm);
    color: #C7D4E6;
    font-size: .875rem;
    font-weight: 500;
    position: relative;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.nav-item:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
    text-decoration: none;
}

.nav-item svg.icon {
    width: 1.05rem;
    height: 1.05rem;
    color: #8CA3C4;
    transition: color var(--t-fast) var(--ease);
}

.nav-item:hover svg.icon { color: #D6E2F2; }

.nav-item.is-active {
    background: rgba(255, 255, 255, .11);
    color: #fff;
    font-weight: 600;
}

.nav-item.is-active svg.icon { color: var(--gold-600); }

/* Active marker: a gold bar, not a coloured pill. */
.nav-item.is-active::before {
    content: "";
    position: absolute;
    left: -.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 62%;
    background: var(--gold-600);
    border-radius: 0 2px 2px 0;
}

.nav-item__count {
    margin-left: auto;
    min-width: 1.35rem;
    padding: 0 .34rem;
    height: 1.2rem;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, .14);
    border-radius: var(--r-pill);
    font-size: .7rem;
    font-weight: 700;
    color: #E3EBF6;
}

.nav-item__count--alert {
    background: var(--gold-600);
    color: #26200D;
}

.sidebar__foot {
    padding: .8rem 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .7rem;
    color: #6C82A4;
    line-height: 1.5;
}

.sidebar__foot a { color: #93A9C8; }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 58, 138, .45);
    backdrop-filter: blur(1px);
    z-index: 39;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease);
}

.sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   06  Top bar
   ========================================================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 0 1.25rem;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(1.6) blur(8px);
    border-bottom: 1px solid var(--line);
}

.topbar__toggle {
    display: none;
    width: 36px;
    height: 36px;
    place-items: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--ink-600);
}

.topbar__toggle:hover { background: var(--surface-3); }

.topbar__context { min-width: 0; }

.topbar__context .title {
    display: block;
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.2;
}

.topbar__context .date {
    display: block;
    font-size: .76rem;
    color: var(--ink-400);
}

.topbar__spacer { flex: 1 1 auto; }

.topbar__actions {
    display: flex;
    align-items: center;
    gap: .45rem;
}

/* Global search */
.global-search {
    position: relative;
    width: 274px;
    max-width: 34vw;
}

.global-search input {
    width: 100%;
    height: 36px;
    padding: 0 2rem 0 2.1rem;
    background: var(--surface-3);
    border: 1px solid transparent;
    border-radius: var(--r);
    font-size: .86rem;
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.global-search input::placeholder { color: var(--ink-400); }

.global-search input:focus {
    background: #fff;
    border-color: var(--navy-300);
    box-shadow: 0 0 0 3px var(--navy-50);
}

.global-search svg.icon {
    position: absolute;
    left: .65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-400);
    pointer-events: none;
}

.global-search kbd {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: .1rem .3rem;
    background: #fff;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: var(--r-xs);
    font-family: var(--font-mono);
    font-size: .66rem;
    color: var(--ink-400);
}

.search-results {
    position: absolute;
    top: calc(100% + .4rem);
    left: 0;
    right: 0;
    min-width: 340px;
    max-height: 66vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    z-index: 60;
    padding: .3rem;
}

.search-results__group {
    padding: .5rem .6rem .28rem;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.search-result {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .5rem .6rem;
    border-radius: var(--r-sm);
    color: var(--ink-700);
}

.search-result:hover,
.search-result.is-highlighted {
    background: var(--navy-50);
    text-decoration: none;
}

.search-result svg.icon { color: var(--ink-400); margin-top: .12rem; }
.search-result__title { font-weight: 600; font-size: .87rem; color: var(--ink-900); }
.search-result__meta  { font-size: .76rem; color: var(--ink-400); }

/* Icon button used in the top bar and table rows */
.icon-btn {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    color: var(--ink-500);
    position: relative;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.icon-btn:hover { background: var(--surface-3); color: var(--ink-900); }
.icon-btn.is-active { background: var(--navy-50); color: var(--navy-700); }

.icon-btn__dot {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    display: grid;
    place-items: center;
    background: var(--danger);
    color: #fff;
    border: 2px solid #fff;
    border-radius: var(--r-pill);
    font-size: .58rem;
    font-weight: 700;
    line-height: 1;
}

/* User chip */
.user-chip {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .28rem .55rem .28rem .3rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r);
    color: var(--ink-700);
    text-align: left;
    transition: background var(--t-fast) var(--ease);
}

.user-chip:hover { background: var(--surface-3); }

.user-chip__text { line-height: 1.15; }
.user-chip__name { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-900); }
.user-chip__role { display: block; font-size: .7rem; color: var(--ink-400); }
.user-chip svg.icon { color: var(--ink-400); }

.avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: var(--navy-100);
    color: var(--navy-800);
    border-radius: var(--r-pill);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .02em;
    overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 26px; height: 26px; font-size: .66rem; }
.avatar--lg { width: 46px; height: 46px; font-size: 1rem; }
.avatar--xl { width: 64px; height: 64px; font-size: 1.35rem; }
.avatar--gold { background: var(--gold-100); color: var(--gold-800); }
.avatar--solid { background: var(--navy-800); color: #fff; }

/* ==========================================================================
   07  Buttons
   ========================================================================== */

.btn {
    --btn-bg: var(--surface);
    --btn-fg: var(--ink-700);
    --btn-bd: var(--line-strong);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    min-height: 36px;
    padding: 0 .85rem;
    background: var(--btn-bg);
    color: var(--btn-fg);
    border: 1px solid var(--btn-bd);
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: .855rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease);
}

.btn:hover { text-decoration: none; }

/* A small, deliberate press response — feedback, not decoration. */
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:disabled,
.btn.is-disabled {
    opacity: .55;
    pointer-events: none;
}

.btn svg.icon { width: 1.02rem; height: 1.02rem; }

.btn--primary {
    --btn-bg: var(--navy-800);
    --btn-fg: #fff;
    --btn-bd: var(--navy-800);
    box-shadow: var(--shadow-xs);
}

.btn--primary:hover { --btn-bg: var(--navy-700); --btn-bd: var(--navy-700); }

.btn--secondary { --btn-bg: var(--surface); --btn-fg: var(--navy-800); --btn-bd: var(--line-strong); }
.btn--secondary:hover { --btn-bg: var(--navy-50); --btn-bd: var(--navy-300); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink-600); --btn-bd: transparent; }
.btn--ghost:hover { --btn-bg: var(--surface-3); --btn-fg: var(--ink-900); }

.btn--gold { --btn-bg: var(--gold-600); --btn-fg: #241C08; --btn-bd: var(--gold-600); }
.btn--gold:hover { --btn-bg: var(--gold-700); --btn-fg: #fff; --btn-bd: var(--gold-700); }

.btn--success { --btn-bg: var(--ok); --btn-fg: #fff; --btn-bd: var(--ok); }
.btn--success:hover { filter: brightness(.93); }

.btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--danger:hover { filter: brightness(.93); }

.btn--danger-quiet { --btn-bg: var(--surface); --btn-fg: var(--danger); --btn-bd: var(--danger-line); }
.btn--danger-quiet:hover { --btn-bg: var(--danger-bg); }

.btn--sm { min-height: 30px; padding: 0 .62rem; font-size: .79rem; gap: .32rem; }
.btn--sm svg.icon { width: .92rem; height: .92rem; }
.btn--lg { min-height: 44px; padding: 0 1.35rem; font-size: .95rem; }
.btn--block { width: 100%; }
.btn--icon { width: 36px; padding: 0; }
.btn--icon.btn--sm { width: 30px; }

.btn-group {
    display: inline-flex;
    border-radius: var(--r-sm);
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: var(--surface);
}

.btn-group .btn {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.btn-group .btn + .btn { border-left: 1px solid var(--line); }

/* In-button loading state, driven by the JS runtime. */
.btn.is-loading {
    pointer-events: none;
    color: transparent !important;
    position: relative;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .62s linear infinite;
    color: var(--btn-fg);
    opacity: .9;
}

.btn--primary.is-loading::after,
.btn--danger.is-loading::after,
.btn--success.is-loading::after { border-color: #fff; border-top-color: transparent; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   08  Status, badges and chips
   ========================================================================== */

/* Status is communicated by a dot plus a word — legible, printable and
   colour-blind safe, unlike a wall of coloured pills. */
.status {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink-700);
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neutral);
    box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--neutral) 16%, transparent);
    flex: 0 0 auto;
}

.status--pending::before        { background: var(--warn);   box-shadow: 0 0 0 2.5px var(--warn-bg); }
.status--info_requested::before { background: var(--violet); box-shadow: 0 0 0 2.5px var(--violet-bg); }
.status--confirmed::before      { background: var(--ok);     box-shadow: 0 0 0 2.5px var(--ok-bg); }
.status--rescheduled::before    { background: var(--teal);   box-shadow: 0 0 0 2.5px var(--teal-bg); }
.status--checked_in::before     { background: var(--info);   box-shadow: 0 0 0 2.5px var(--info-bg); }
.status--completed::before      { background: var(--ink-500); box-shadow: 0 0 0 2.5px var(--neutral-bg); }
.status--declined::before       { background: var(--danger); box-shadow: 0 0 0 2.5px var(--danger-bg); }
.status--cancelled::before      { background: var(--ink-300); box-shadow: 0 0 0 2.5px var(--neutral-bg); }
.status--no_show::before        { background: #92400E;       box-shadow: 0 0 0 2.5px var(--warn-bg); }
.status--overdue::before        { background: var(--danger); box-shadow: 0 0 0 2.5px var(--danger-bg); }
.status--in_progress::before    { background: var(--info);   box-shadow: 0 0 0 2.5px var(--info-bg); }
.status--waiting::before        { background: var(--warn);   box-shadow: 0 0 0 2.5px var(--warn-bg); }
.status--notified::before       { background: var(--teal);   box-shadow: 0 0 0 2.5px var(--teal-bg); }
.status--converted::before      { background: var(--ok);     box-shadow: 0 0 0 2.5px var(--ok-bg); }
.status--active::before         { background: var(--ok);     box-shadow: 0 0 0 2.5px var(--ok-bg); }
.status--suspended::before      { background: var(--danger); box-shadow: 0 0 0 2.5px var(--danger-bg); }
.status--invited::before        { background: var(--warn);   box-shadow: 0 0 0 2.5px var(--warn-bg); }

.status--cancelled, .status--completed { color: var(--ink-500); }

/* The filled variant, reserved for the single most important status on a page. */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .17rem .5rem;
    background: var(--neutral-bg);
    color: var(--neutral);
    border: 1px solid var(--neutral-line);
    border-radius: var(--r-sm);
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .015em;
    white-space: nowrap;
}

.badge svg.icon { width: .88rem; height: .88rem; }

.badge--ok      { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-line); }
.badge--warn    { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-line); }
.badge--danger  { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge--info    { background: var(--info-bg);   color: var(--info);   border-color: var(--info-line); }
.badge--violet  { background: var(--violet-bg); color: var(--violet); border-color: var(--violet-line); }
.badge--teal    { background: var(--teal-bg);   color: var(--teal);   border-color: var(--teal-line); }
.badge--gold    { background: var(--gold-100);  color: var(--gold-800); border-color: var(--gold-200); }
.badge--navy    { background: var(--navy-100);  color: var(--navy-800); border-color: #C7D6EA; }
.badge--solid   { background: var(--navy-800);  color: #fff; border-color: var(--navy-800); }
.badge--ghost   { background: transparent; }

.badge--priority-urgent { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge--priority-high   { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-line); }
.badge--priority-normal { background: var(--neutral-bg); color: var(--neutral); border-color: var(--neutral-line); }
.badge--priority-low    { background: transparent; color: var(--ink-400); border-color: var(--line); }

/* The private-appointment marker. */
.badge--private {
    background: #2A2A33;
    color: #F0EDE4;
    border-color: #2A2A33;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .22rem .55rem;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    font-size: .78rem;
    color: var(--ink-600);
}

.chip--removable { padding-right: .28rem; }

.chip__x {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 0;
    background: transparent;
    border-radius: 50%;
    color: var(--ink-400);
}

.chip__x:hover { background: var(--line); color: var(--ink-900); }

/* A small square of category colour. */
.swatch {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}

.dot-sep { color: var(--ink-300); padding: 0 .18rem; }

/* ==========================================================================
   09  Cards and panels
   ========================================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-xs);
}

.card--flush { border-radius: var(--r); overflow: hidden; }
.card--plain { box-shadow: none; }
.card--tint { background: var(--surface-2); }

.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .82rem 1.05rem;
    /* A hairline of tone, so the head reads as a header and not as more body. */
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border-bottom: 1px solid var(--line);
    border-radius: var(--r) var(--r) 0 0;
    flex-wrap: wrap;
}

.card__head h2,
.card__head h3 {
    font-size: .95rem;
    font-weight: 600;
}

.card__head-note {
    font-size: .78rem;
    color: var(--ink-400);
    margin-top: .1rem;
}

.card__body { padding: 1.05rem; }
.card__body--tight { padding: .7rem .85rem; }
.card__body--flush { padding: 0; }

.card__foot {
    padding: .7rem 1.05rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    border-radius: 0 0 var(--r) var(--r);
    font-size: .82rem;
    color: var(--ink-500);
}

/* A panel with the gold institutional rule at the top — used for the pages
   that represent the office itself (executive brief, confirmations). */
.card--crested { position: relative; overflow: hidden; }

.card--crested::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy-800) 0%, var(--navy-800) 62%, var(--gold-600) 62%, var(--gold-600) 100%);
}

/* Definition list used for record detail. */
.detail-list {
    display: grid;
    grid-template-columns: minmax(120px, 168px) minmax(0, 1fr);
    gap: 0;
    margin: 0;
}

.detail-list dt,
.detail-list dd {
    padding: .52rem 0;
    margin: 0;
    border-bottom: 1px solid var(--line-soft);
    min-width: 0;
}

.detail-list dt {
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-500);
    padding-right: .8rem;
}

.detail-list dd { color: var(--ink-800); font-size: .885rem; }
.detail-list > :nth-last-child(1),
.detail-list > :nth-last-child(2) { border-bottom: 0; }
.detail-list--compact dt, .detail-list--compact dd { padding: .38rem 0; font-size: .82rem; }

/* Small labelled facts, laid out inline. */
.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1.15rem 1.9rem;
}

.fact { min-width: 0; }

.fact__label {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin-bottom: .16rem;
}

.fact__value {
    display: block;
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink-900);
}

/* ==========================================================================
   10  Statistics
   ========================================================================== */

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: .8rem;
}

.stat {
    --stat-accent: var(--navy-800);

    display: block;
    position: relative;
    overflow: hidden;
    padding: .9rem 1rem .95rem 1.15rem;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    color: inherit;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease);
}

a.stat:hover {
    border-color: var(--navy-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
}

/* The accent bar carries the meaning; the numeral stays black. */
.stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: .7rem;
    bottom: .7rem;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--stat-accent);
    z-index: 1;
}

/* A wash of the same accent in the far corner, so a row of figures carries
   some light rather than reading as five identical white boxes. */
.stat::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -38px;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--stat-accent) 0%, transparent 70%);
    opacity: .085;
    pointer-events: none;
}

.stat--warn   { --stat-accent: var(--warn); }
.stat--ok     { --stat-accent: var(--ok); }
.stat--danger { --stat-accent: var(--danger); }
.stat--info   { --stat-accent: var(--info); }
.stat--gold   { --stat-accent: var(--gold-600); }
.stat--muted  { --stat-accent: var(--ink-300); }

.stat__label {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .715rem;
    font-weight: 700;
    letter-spacing: .085em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin-bottom: .3rem;
}

.stat__label svg.icon { width: .92rem; height: .92rem; }

.stat__value {
    font-family: var(--font-display);
    font-size: 1.72rem;
    font-weight: 600;
    line-height: 1.05;
    color: var(--ink-900);
    letter-spacing: -.02em;
}

.stat__value small {
    font-size: .82rem;
    font-weight: 500;
    color: var(--ink-400);
    letter-spacing: 0;
}

.stat__note {
    margin-top: .28rem;
    font-size: .765rem;
    color: var(--ink-400);
}

.stat__note strong { color: var(--ink-600); font-weight: 600; }

/* Compact progress meter used in reports and room utilisation. */
.meter {
    height: 6px;
    background: var(--surface-3);
    border-radius: var(--r-pill);
    overflow: hidden;
}

.meter__fill {
    height: 100%;
    background: var(--navy-700);
    border-radius: var(--r-pill);
    transition: width var(--t-slow) var(--ease);
}

.meter__fill--gold   { background: var(--gold-600); }
.meter__fill--ok     { background: var(--ok); }
.meter__fill--warn   { background: var(--warn); }
.meter__fill--danger { background: var(--danger); }

/* ==========================================================================
   11  Tables
   ========================================================================== */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .865rem;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: .55rem .85rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .085em;
    text-transform: uppercase;
    color: var(--ink-500);
    white-space: nowrap;
}

.table thead th.is-numeric,
.table td.is-numeric { text-align: right; }

.table thead th a {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    color: inherit;
}

.table thead th a:hover { color: var(--navy-700); text-decoration: none; }
.table thead th svg.icon { width: .8rem; height: .8rem; }

.table tbody td {
    padding: .68rem .85rem;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
    color: var(--ink-700);
}

.table tbody tr { transition: background var(--t-fast) var(--ease); }
.table tbody tr:hover { background: var(--navy-50); }
.table tbody tr:last-child td { border-bottom: 0; }

.table tbody tr.is-selected { background: var(--navy-50); }
.table tbody tr.is-muted td { color: var(--ink-400); }

/* A left edge marker for rows that need attention. */
.table tbody tr.is-flagged td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.table tbody tr.is-urgent td:first-child  { box-shadow: inset 3px 0 0 var(--danger); }
.table tbody tr.is-private td:first-child { box-shadow: inset 3px 0 0 #2A2A33; }

.table--compact tbody td { padding: .48rem .7rem; }
.table--compact thead th { padding: .44rem .7rem; }

.table td.is-actions {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}

.table .cell-primary {
    font-weight: 600;
    color: var(--ink-900);
}

.table .cell-sub {
    display: block;
    font-size: .77rem;
    color: var(--ink-400);
    margin-top: .08rem;
}

.table a.cell-link { color: var(--ink-900); font-weight: 600; }
.table a.cell-link:hover { color: var(--navy-700); }

/* Person cell: avatar + name + meta */
.person {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}

.person__text { min-width: 0; }
.person__name {
    display: block;
    font-weight: 600;
    color: var(--ink-900);
    overflow: hidden;
    text-overflow: ellipsis;
}

.person__meta {
    display: block;
    font-size: .765rem;
    color: var(--ink-400);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Row action cluster, revealed on hover on the desktop. */
.row-actions {
    display: inline-flex;
    align-items: center;
    gap: .18rem;
    opacity: .55;
    transition: opacity var(--t-fast) var(--ease);
}

tr:hover .row-actions,
.row-actions:focus-within { opacity: 1; }

.row-actions .icon-btn { width: 30px; height: 30px; }
.row-actions .icon-btn svg.icon { width: .95rem; height: .95rem; }

/* ==========================================================================
   12  Forms
   ========================================================================== */

.form { display: block; }

.field { margin-bottom: 1.05rem; }
.field:last-child { margin-bottom: 0; }

.field__label {
    display: block;
    margin-bottom: .3rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-800);
}

.field__label .req {
    color: var(--danger);
    margin-left: .1rem;
    font-weight: 700;
}

.field__label .optional {
    margin-left: .3rem;
    font-size: .74rem;
    font-weight: 500;
    color: var(--ink-400);
}

.field__hint {
    margin: -.06rem 0 .34rem;
    font-size: .78rem;
    color: var(--ink-400);
    line-height: 1.45;
}

.field__error {
    display: flex;
    align-items: flex-start;
    gap: .3rem;
    margin-top: .3rem;
    font-size: .785rem;
    font-weight: 500;
    color: var(--danger);
}

.field__error svg.icon { width: .92rem; height: .92rem; margin-top: .1rem; }

.field__count {
    float: right;
    font-size: .74rem;
    color: var(--ink-400);
    font-variant-numeric: tabular-nums;
}

.field__count.is-near { color: var(--warn); }
.field__count.is-over { color: var(--danger); font-weight: 600; }

.input,
.select,
.textarea {
    width: 100%;
    min-height: 38px;
    padding: .48rem .68rem;
    background: var(--surface);
    color: var(--ink-900);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    font-size: .885rem;
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
    appearance: none;
}

.input::placeholder,
.textarea::placeholder { color: var(--ink-300); }

.input:hover:not(:disabled),
.select:hover:not(:disabled),
.textarea:hover:not(:disabled) { border-color: var(--navy-300); }

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--navy-600);
    box-shadow: 0 0 0 3px var(--navy-50);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
    background: var(--surface-3);
    color: var(--ink-400);
    cursor: not-allowed;
}

.input[readonly] { background: var(--surface-3); color: var(--ink-600); }

.textarea {
    min-height: 92px;
    resize: vertical;
    line-height: 1.55;
}

.select {
    padding-right: 2.1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6B82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .58rem center;
    background-size: 1rem;
    cursor: pointer;
}

.is-invalid .input,
.is-invalid .select,
.is-invalid .textarea,
.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
    border-color: var(--danger);
    background: #FFFCFC;
}

.is-invalid .input:focus,
.input.is-invalid:focus { box-shadow: 0 0 0 3px var(--danger-bg); }

.is-valid .input,
.input.is-valid { border-color: var(--ok-line); }

/* Input with a leading icon or trailing affix */
.input-group { position: relative; display: flex; align-items: stretch; }

.input-group svg.icon.lead {
    position: absolute;
    left: .62rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-400);
    pointer-events: none;
}

.input-group.has-lead .input { padding-left: 2.1rem; }

.input-group__affix {
    display: inline-flex;
    align-items: center;
    padding: 0 .68rem;
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
    border-left: 0;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    font-size: .82rem;
    color: var(--ink-500);
    white-space: nowrap;
}

.input-group__affix--lead {
    border-left: 1px solid var(--line-strong);
    border-right: 0;
    border-radius: var(--r-sm) 0 0 var(--r-sm);
}

.input-group .input:not(:last-child) { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .input:not(:first-child) { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

.password-toggle {
    position: absolute;
    right: .3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--r-sm);
    color: var(--ink-400);
}

.password-toggle:hover { background: var(--surface-3); color: var(--ink-700); }

/* Checkboxes and radios */
.check {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    cursor: pointer;
    font-size: .875rem;
    line-height: 1.45;
}

.check input[type="checkbox"],
.check input[type="radio"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: .12rem 0 0;
    accent-color: var(--navy-800);
    cursor: pointer;
}

.check__text { min-width: 0; }
.check__title { font-weight: 500; color: var(--ink-800); }
.check__hint { display: block; font-size: .78rem; color: var(--ink-400); margin-top: .08rem; }

/* Selectable card — used for meeting mode, categories, room choice */
.choice {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .72rem .85rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r);
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease);
}

.choice:hover { border-color: var(--navy-300); background: var(--navy-50); }

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--surface-3);
    color: var(--ink-500);
    border-radius: var(--r-sm);
}

.choice__title { font-weight: 600; color: var(--ink-900); font-size: .885rem; }
.choice__hint { font-size: .78rem; color: var(--ink-400); }

.choice.is-selected {
    border-color: var(--navy-700);
    background: var(--navy-50);
    box-shadow: 0 0 0 1px var(--navy-700);
}

.choice.is-selected .choice__icon { background: var(--navy-800); color: #fff; }
.choice.is-disabled { opacity: .5; pointer-events: none; }

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .6rem;
}

/* Toggle switch, for settings */
.switch {
    display: flex;
    align-items: center;
    gap: .7rem;
    cursor: pointer;
}

.switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch__track {
    flex: 0 0 auto;
    width: 40px;
    height: 22px;
    background: var(--line-strong);
    border-radius: var(--r-pill);
    position: relative;
    transition: background var(--t-base) var(--ease);
}

.switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base) var(--ease);
}

.switch input:checked + .switch__track { background: var(--ok); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--navy-600); outline-offset: 2px; }
.switch__label { font-size: .875rem; color: var(--ink-800); }

/* Field layout helpers */
.field-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.field-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.fieldset {
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 1rem 1.05rem;
    margin: 0 0 1.15rem;
}

.fieldset legend {
    padding: 0 .4rem;
    margin-left: -.4rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-500);
}

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

.form-actions--end { justify-content: flex-end; }
.form-actions--split { justify-content: space-between; }

/* File input */
.filedrop {
    display: block;
    padding: 1.35rem 1rem;
    background: var(--surface-2);
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--r);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.filedrop:hover,
.filedrop.is-dragover { border-color: var(--navy-600); background: var(--navy-50); }
.filedrop input[type="file"] { position: absolute; opacity: 0; width: 0; height: 0; }
.filedrop svg.icon { color: var(--ink-400); margin-bottom: .3rem; }
.filedrop__title { font-weight: 600; color: var(--ink-800); font-size: .88rem; }
.filedrop__hint { font-size: .78rem; color: var(--ink-400); margin-top: .12rem; }

.file-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .7rem; }

.file-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .48rem .6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: .82rem;
}

.file-item svg.icon { color: var(--ink-400); }
.file-item__name { flex: 1 1 auto; min-width: 0; font-weight: 500; color: var(--ink-800); }
.file-item__size { color: var(--ink-400); font-size: .76rem; white-space: nowrap; }

/* ==========================================================================
   13  Modals and drawers
   ========================================================================== */

.modal-root {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: start center;
    padding: 4vh 1rem 6vh;
    overflow-y: auto;
    background: rgba(30, 58, 138, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease);
}

.modal-root.is-open { opacity: 1; pointer-events: auto; }

.modal {
    width: 100%;
    max-width: 560px;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-14px) scale(.985);
    opacity: 0;
    transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
    overflow: hidden;
}

.modal-root.is-open .modal { transform: none; opacity: 1; }

.modal--sm { max-width: 430px; }
.modal--lg { max-width: 760px; }
.modal--xl { max-width: 1020px; }

.modal__head {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: 1.05rem 1.15rem .85rem;
    border-bottom: 1px solid var(--line);
}

.modal__head-text { flex: 1 1 auto; min-width: 0; }
.modal__title { font-size: 1.03rem; font-weight: 600; color: var(--ink-900); }
.modal__sub { font-size: .82rem; color: var(--ink-400); margin-top: .14rem; }

.modal__close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--r-sm);
    color: var(--ink-400);
}

.modal__close:hover { background: var(--surface-3); color: var(--ink-900); }

.modal__body {
    padding: 1.15rem;
    max-height: 68vh;
    overflow-y: auto;
}

.modal__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    padding: .85rem 1.15rem;
    background: var(--surface-2);
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.modal__foot--split { justify-content: space-between; }

/* Confirmation dialog with an intent icon */
.confirm { display: flex; gap: .9rem; }

.confirm__icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--warn-bg);
    color: var(--warn);
}

.confirm__icon--danger { background: var(--danger-bg); color: var(--danger); }
.confirm__icon--info   { background: var(--info-bg);   color: var(--info); }
.confirm__icon--ok     { background: var(--ok-bg);     color: var(--ok); }
.confirm__body { min-width: 0; }
.confirm__body p { font-size: .885rem; color: var(--ink-600); }

/* Side drawer, used for filters on small screens and quick detail */
.drawer-root {
    position: fixed;
    inset: 0;
    z-index: 115;
    background: rgba(30, 58, 138, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease);
}

.drawer-root.is-open { opacity: 1; pointer-events: auto; }

.drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 92vw);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: translateX(102%);
    transition: transform var(--t-slow) var(--ease);
}

.drawer-root.is-open .drawer { transform: none; }

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .95rem 1.1rem;
    border-bottom: 1px solid var(--line);
}

.drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 1.1rem; }

.drawer__foot {
    padding: .85rem 1.1rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    display: flex;
    gap: .55rem;
}

/* ==========================================================================
   14  Toasts and inline messages
   ========================================================================== */

.toast-stack {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    width: min(384px, calc(100vw - 2.2rem));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .72rem .85rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--neutral);
    border-radius: var(--r);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    animation: toast-in var(--t-slow) var(--ease);
}

.toast.is-leaving { animation: toast-out var(--t-base) var(--ease) forwards; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateX(16px); }
}

.toast--success { border-left-color: var(--ok); }
.toast--error   { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warn); }
.toast--info    { border-left-color: var(--info); }

.toast__icon { flex: 0 0 auto; margin-top: .1rem; color: var(--neutral); }
.toast--success .toast__icon { color: var(--ok); }
.toast--error   .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--warn); }
.toast--info    .toast__icon { color: var(--info); }

.toast__body { flex: 1 1 auto; min-width: 0; }
.toast__title { font-size: .875rem; font-weight: 600; color: var(--ink-900); }
.toast__text { font-size: .81rem; color: var(--ink-500); margin-top: .06rem; }

.toast__close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--r-sm);
    color: var(--ink-300);
}

.toast__close:hover { background: var(--surface-3); color: var(--ink-700); }

/* Inline notice block */
.notice {
    display: flex;
    align-items: flex-start;
    gap: .68rem;
    padding: .8rem .95rem;
    background: var(--neutral-bg);
    border: 1px solid var(--neutral-line);
    border-left-width: 3px;
    border-radius: var(--r-sm);
    font-size: .865rem;
    color: var(--ink-700);
}

.notice svg.icon { flex: 0 0 auto; margin-top: .12rem; color: var(--neutral); }
.notice__title { font-weight: 600; color: var(--ink-900); margin-bottom: .12rem; }
.notice p { margin-bottom: .4rem; }
.notice p:last-child { margin-bottom: 0; }

.notice--ok     { background: var(--ok-bg);     border-color: var(--ok-line); }
.notice--ok svg.icon { color: var(--ok); }
.notice--warn   { background: var(--warn-bg);   border-color: var(--warn-line); }
.notice--warn svg.icon { color: var(--warn); }
.notice--danger { background: var(--danger-bg); border-color: var(--danger-line); }
.notice--danger svg.icon { color: var(--danger); }
.notice--info   { background: var(--info-bg);   border-color: var(--info-line); }
.notice--info svg.icon { color: var(--info); }
.notice--gold   { background: var(--gold-100);  border-color: var(--gold-200); }
.notice--gold svg.icon { color: var(--gold-700); }

/* Success confirmation flourish, used once per workflow completion. */
.success-mark {
    width: 56px;
    height: 56px;
    margin: 0 auto .9rem;
    display: grid;
    place-items: center;
    background: var(--ok-bg);
    border-radius: 50%;
    color: var(--ok);
    animation: pop var(--t-slow) var(--ease);
}

@keyframes pop {
    0%   { transform: scale(.72); opacity: 0; }
    60%  { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); }
}

/* ==========================================================================
   15  Dropdowns and menus
   ========================================================================== */

.dropdown { position: relative; }

.dropdown__panel {
    position: absolute;
    top: calc(100% + .35rem);
    right: 0;
    min-width: 212px;
    padding: .3rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    z-index: 70;
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
    transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.dropdown.is-open .dropdown__panel { opacity: 1; transform: none; pointer-events: auto; }
.dropdown__panel--left { right: auto; left: 0; }
.dropdown__panel--wide { min-width: 320px; }

.dropdown__header {
    padding: .5rem .6rem .4rem;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: .25rem;
}

.dropdown__label {
    padding: .45rem .6rem .25rem;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .48rem .6rem;
    background: transparent;
    border: 0;
    border-radius: var(--r-sm);
    color: var(--ink-700);
    font-size: .865rem;
    text-align: left;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.menu-item:hover { background: var(--navy-50); color: var(--navy-800); text-decoration: none; }
.menu-item svg.icon { color: var(--ink-400); }
.menu-item:hover svg.icon { color: var(--navy-700); }
.menu-item--danger { color: var(--danger); }
.menu-item--danger:hover { background: var(--danger-bg); color: var(--danger); }
.menu-item--danger svg.icon { color: var(--danger); }
.menu-item.is-disabled { opacity: .45; pointer-events: none; }
.menu-item__meta { margin-left: auto; font-size: .74rem; color: var(--ink-400); }

.menu-divider {
    height: 1px;
    background: var(--line-soft);
    margin: .3rem -.3rem;
}

/* Notification list inside the bell dropdown */
.notification {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .6rem;
    border-radius: var(--r-sm);
    color: var(--ink-700);
    position: relative;
}

.notification:hover { background: var(--surface-3); text-decoration: none; }

.notification__icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: var(--surface-3);
    border-radius: var(--r-sm);
    color: var(--ink-500);
}

.notification--info .notification__icon    { background: var(--info-bg);   color: var(--info); }
.notification--success .notification__icon { background: var(--ok-bg);     color: var(--ok); }
.notification--warning .notification__icon { background: var(--warn-bg);   color: var(--warn); }
.notification--danger .notification__icon  { background: var(--danger-bg); color: var(--danger); }

.notification__body { min-width: 0; flex: 1 1 auto; }
.notification__title { font-size: .845rem; font-weight: 600; color: var(--ink-900); }
.notification__text { font-size: .78rem; color: var(--ink-500); margin-top: .06rem; }
.notification__time { font-size: .72rem; color: var(--ink-300); margin-top: .16rem; }

.notification.is-unread { background: var(--navy-50); }

.notification.is-unread::after {
    content: "";
    position: absolute;
    right: .55rem;
    top: .78rem;
    width: 6px;
    height: 6px;
    background: var(--navy-700);
    border-radius: 50%;
}

/* ==========================================================================
   16  Tabs and segmented controls
   ========================================================================== */

.tabs {
    display: flex;
    gap: .1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.2rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .58rem .85rem;
    border: 0;
    background: transparent;
    color: var(--ink-500);
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.tab:hover { color: var(--ink-900); text-decoration: none; }

.tab.is-active {
    color: var(--navy-800);
    font-weight: 600;
    border-bottom-color: var(--navy-800);
}

.tab svg.icon { width: 1rem; height: 1rem; }

.tab__count {
    padding: 0 .32rem;
    min-width: 1.15rem;
    height: 1.15rem;
    display: inline-grid;
    place-items: center;
    background: var(--surface-3);
    border-radius: var(--r-pill);
    font-size: .7rem;
    font-weight: 700;
    color: var(--ink-500);
}

.tab.is-active .tab__count { background: var(--navy-100); color: var(--navy-800); }

.segmented {
    display: inline-flex;
    padding: 2px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: var(--r);
}

.segmented__item {
    padding: .32rem .72rem;
    border: 0;
    background: transparent;
    border-radius: var(--r-xs);
    font-size: .81rem;
    font-weight: 600;
    color: var(--ink-500);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.segmented__item:hover { color: var(--ink-900); text-decoration: none; }

.segmented__item.is-active {
    background: var(--surface);
    color: var(--navy-800);
    box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   17  Timeline and schedule
   ========================================================================== */

/* Today's schedule: a real timeline with a rail, not a list of cards. */
.schedule { position: relative; padding-left: 5.2rem; }

.schedule::before {
    content: "";
    position: absolute;
    left: 4.55rem;
    top: .55rem;
    bottom: .55rem;
    width: 1px;
    background: var(--line);
}

.schedule__item {
    position: relative;
    display: block;
    padding: .1rem 0 1.05rem;
    color: inherit;
}

.schedule__item:last-child { padding-bottom: .2rem; }

.schedule__time {
    position: absolute;
    left: -5.2rem;
    top: .08rem;
    width: 4.1rem;
    text-align: right;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-800);
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

.schedule__time small {
    display: block;
    font-size: .7rem;
    font-weight: 500;
    color: var(--ink-400);
}

/* The rail node, coloured by category or state. */
.schedule__node {
    position: absolute;
    left: -.72rem;
    top: .4rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--surface);
    border: 2.5px solid var(--navy-700);
    z-index: 1;
}

.schedule__card {
    padding: .68rem .85rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease);
}

a.schedule__item:hover .schedule__card {
    border-color: var(--navy-300);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.schedule__title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: .1rem;
}

.schedule__meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    font-size: .785rem;
    color: var(--ink-400);
}

.schedule__meta svg.icon { width: .88rem; height: .88rem; }

/* Unavailable / blocked stretches read differently from meetings. */
.schedule__item--block .schedule__card {
    background: repeating-linear-gradient(135deg, var(--surface-3), var(--surface-3) 7px, var(--surface-2) 7px, var(--surface-2) 14px);
    border-style: dashed;
    border-color: var(--line-strong);
}

.schedule__item--block .schedule__node { border-color: var(--ink-300); }
.schedule__item--block .schedule__title { color: var(--ink-500); font-weight: 600; }

.schedule__item--holiday .schedule__card {
    background: var(--gold-100);
    border-color: var(--gold-200);
}

.schedule__item--holiday .schedule__node { border-color: var(--gold-600); }

.schedule__item--private .schedule__card { border-color: #3A3A44; background: #FAFAFB; }
.schedule__item--private .schedule__node { border-color: #3A3A44; }

.schedule__item--now .schedule__node {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px var(--danger-bg);
}

.schedule__item--now .schedule__card { border-color: var(--danger-line); }

/* The "now" marker line */
.schedule__now {
    position: relative;
    height: 0;
    margin: 0 0 1rem -.2rem;
}

.schedule__now::before {
    content: "";
    position: absolute;
    left: -.55rem;
    right: 0;
    top: 0;
    border-top: 1.5px dashed var(--danger);
    opacity: .65;
}

.schedule__now span {
    position: absolute;
    left: -5.2rem;
    top: -.62rem;
    width: 4.1rem;
    text-align: right;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--danger);
}

/* Audit / history timeline */
.timeline { position: relative; padding-left: 1.5rem; }

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: .5rem;
    bottom: .5rem;
    width: 1px;
    background: var(--line);
}

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

.timeline__item::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: .38rem;
    margin-left: 1px;
    width: 9px;
    height: 9px;
    background: var(--surface);
    border: 2px solid var(--ink-300);
    border-radius: 50%;
}

.timeline__item--ok::before     { border-color: var(--ok); }
.timeline__item--warn::before   { border-color: var(--warn); }
.timeline__item--danger::before { border-color: var(--danger); }
.timeline__item--info::before   { border-color: var(--info); }

.timeline__title { font-size: .865rem; font-weight: 600; color: var(--ink-900); }
.timeline__meta { font-size: .765rem; color: var(--ink-400); margin-top: .1rem; }
.timeline__body { font-size: .83rem; color: var(--ink-600); margin-top: .22rem; }

/* ==========================================================================
   18  Calendar
   ========================================================================== */

/* Colour does the finding here. Every appointment wears the colour of its
   category, mixed in the browser and handed to the chip as custom properties:

       --cal-colour  the category colour itself, for the rail and the dot
       --cal-wash    that colour at 12%, the ground the chip sits on
       --cal-edge    that colour at 32%, the hairline
       --cal-ink     that colour darkened, so the wording stays readable

   A chip with no category falls back to Royal Blue. Status is carried by the
   dot and by the treatment — dashed for pending, struck through for
   cancelled — so the two readings never fight for the same channel. */

.calendar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
}

.calendar__toolbar {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    flex-wrap: wrap;
}

.calendar__period {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--ink-900);
    min-width: 9rem;
    flex: 1 1 auto;
}

.calendar__nav { display: inline-flex; align-items: center; gap: .3rem; }

.calendar__tools {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
}

.calendar__filter-toggle.is-active {
    background: var(--info-bg);
    border-color: var(--navy-300);
    color: var(--navy-700);
}

/* ------------------------------------------------------------- filters */

/* Closed on a handset, where it would push the grid off the screen; open on
   the desk, where the colours are the fastest way to find anything. */
.cal-filters {
    display: flex;
    align-items: center;
    gap: .6rem 1rem;
    flex-wrap: wrap;
    padding: .6rem .85rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.cal-filters__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    flex: 1 1 auto;
    min-width: 0;
}

.cal-filters__foot {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    flex: 0 0 auto;
}

.cal-chip {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .28rem .6rem .28rem .45rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    font-size: .78rem;
    font-weight: 500;
    color: var(--ink-700);
    line-height: 1.3;
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
                opacity var(--t-fast) var(--ease);
}

.cal-chip:hover { border-color: var(--chip, var(--navy-300)); background: var(--surface-3); }

.cal-chip__key {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 3px;
    background: var(--chip, var(--navy-700));
}

.cal-chip__count {
    font-size: .68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink-400);
    padding-left: .1rem;
}

/* Switched off: the colour drains out of the key and the wording greys. */
.cal-chip.is-off {
    background: var(--surface-3);
    border-color: var(--line);
    color: var(--ink-400);
    text-decoration: line-through;
}

.cal-chip.is-off .cal-chip__key { background: var(--ink-300); }
.cal-chip.is-empty { opacity: .55; }
.cal-chip.is-empty:hover { opacity: 1; }

/* ------------------------------------------------------------- the foot */

.calendar__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
    padding: .55rem .85rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    font-size: .78rem;
    color: var(--ink-500);
}

.calendar__keys { display: inline-flex; gap: .85rem; flex-wrap: wrap; }
.calendar__key { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; color: var(--ink-400); }

.calendar__key kbd {
    display: inline-grid;
    place-items: center;
    min-width: 1.15rem;
    padding: .05rem .25rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: var(--r-xs);
    font-family: var(--font-mono);
    font-size: .66rem;
    color: var(--ink-600);
}

/* --------------------------------------------------------- month grid */

.cal-month { display: flex; flex-direction: column; }

.cal-month__dows {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.cal-month__dow {
    padding: .45rem .3rem;
    text-align: center;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.cal-month__dow.is-weekend { color: var(--ink-300); }
.cal-month__dow-short { display: none; }

.cal-month__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: minmax(112px, auto);
}

.cal-day {
    position: relative;
    padding: .3rem .34rem .34rem;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .18rem;
    transition: background var(--t-fast) var(--ease);
}

.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: var(--navy-50); }
.cal-day.is-weekend { background: var(--surface-2); }
.cal-day.is-outside { background: var(--surface-2); }
.cal-day.is-outside .cal-day__num { color: var(--ink-300); }
.cal-day.is-outside .cal-event { opacity: .62; }
.cal-day.is-nonworking { background: repeating-linear-gradient(135deg, #FCFDFE, #FCFDFE 6px, #F5F7FA 6px, #F5F7FA 12px); }
.cal-day.is-holiday { background: var(--gold-100); }
.cal-day.is-dragover { background: var(--navy-100); box-shadow: inset 0 0 0 2px var(--navy-600); }

/* Today is marked on the cell as well as on the numeral, so it is findable
   without hunting for the filled circle. */
.cal-day.is-today { background: var(--navy-50); box-shadow: inset 0 0 0 1.5px var(--navy-300); }

.cal-day__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .2rem;
}

.cal-day__num {
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-700);
    width: 1.55rem;
    height: 1.55rem;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.cal-day__num:hover { background: var(--navy-100); color: var(--navy-800); }
.cal-day.is-today .cal-day__num { background: var(--navy-800); color: #fff; }

.cal-day__tag {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--gold-800);
}

.cal-day__add {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    border-radius: var(--r-xs);
    color: var(--ink-300);
    opacity: 0;
    transition: opacity var(--t-fast) var(--ease);
}

.cal-day:hover .cal-day__add,
.cal-day__add:focus-visible { opacity: 1; }
.cal-day__add:hover { background: var(--navy-100); color: var(--navy-800); }

.cal-day__events { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }

/* ------------------------------------------------------ the event chip */

.cal-event {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .34rem;
    background: var(--surface-3);
    border: 1px solid transparent;
    border-left: 3px solid var(--ink-400);
    border-radius: var(--r-xs);
    font-size: .735rem;
    line-height: 1.3;
    color: var(--ink-800);
    cursor: grab;
    min-width: 0;
    transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease);
}

/* Painted by the browser from the category colour. */
.cal-event--tinted {
    background: var(--cal-wash, var(--navy-50));
    border-color: var(--cal-edge, transparent);
    border-left-color: var(--cal-colour, var(--navy-700));
    color: var(--cal-ink, var(--ink-800));
}

.cal-event:hover {
    background: var(--cal-wash-hover, var(--navy-100));
    text-decoration: none;
    transform: translateX(1px);
    box-shadow: var(--shadow-xs);
}

.cal-event:active { cursor: grabbing; }
.cal-event.is-dragging { opacity: .45; }

.cal-event__dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--cal-colour, var(--navy-700));
}

.cal-event__time { font-weight: 700; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.cal-event__title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event__lock { flex: 0 0 auto; display: inline-flex; opacity: .7; }
.cal-event__lock svg.icon { width: .72rem; height: .72rem; }

/* Status, read from the dot and from the treatment of the chip itself. */
.cal-event--pending .cal-event__dot     { background: var(--warn); box-shadow: 0 0 0 2px var(--warn-bg); }
.cal-event--pending                     { border-left-style: dashed; }
.cal-event--confirmed .cal-event__dot   { background: var(--ok); }
.cal-event--rescheduled .cal-event__dot { background: var(--info); }
.cal-event--checked_in .cal-event__dot  { background: var(--navy-700); box-shadow: 0 0 0 2px var(--navy-100); }
.cal-event--completed .cal-event__dot   { background: var(--ink-400); }
.cal-event--completed                   { opacity: .78; }
.cal-event--cancelled                   { background: var(--surface-3); border-color: var(--line); border-left-color: var(--ink-300); color: var(--ink-400); text-decoration: line-through; }
.cal-event--cancelled .cal-event__dot   { background: var(--ink-300); }
.cal-event--declined                    { background: var(--danger-bg); border-left-color: var(--danger); color: var(--danger); }
.cal-event--no_show .cal-event__dot     { background: #92400E; }

.cal-event--block {
    background: repeating-linear-gradient(135deg, #F2F4F7, #F2F4F7 5px, #E9EDF3 5px, #E9EDF3 10px);
    border-left-color: var(--ink-400);
    color: var(--ink-500);
    font-style: italic;
    cursor: default;
}

.cal-event--block .cal-event__dot { background: var(--ink-400); }
.cal-event--private { border-left-color: #3A3A44; }
.cal-event--private .cal-event__dot { background: #3A3A44; }

.cal-day__more {
    align-self: flex-start;
    font-size: .7rem;
    font-weight: 600;
    color: var(--navy-700);
    padding: .05rem .3rem;
    border: 0;
    background: transparent;
    border-radius: var(--r-xs);
}

.cal-day__more:hover { background: var(--navy-100); }

/* ------------------------------------------------- week and day: a time grid */

.cal-time-wrap {
    max-height: 72vh;
    overflow: auto;
    overscroll-behavior: contain;
}

.cal-time {
    display: grid;
    /* Fits the width it is given on a desk; on a handset the small-screen
       rules below impose a minimum so the grid scrolls instead of crushing. */
    grid-template-columns: 3.6rem repeat(var(--cal-cols, 7), minmax(0, 1fr));
    min-width: 100%;
}

.cal-time__corner {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 5;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
}

.cal-time__dayhead {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: .45rem .4rem .4rem;
    text-align: center;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line-soft);
    cursor: pointer;
}

.cal-time__dayhead.is-weekend { background: var(--surface-3); }
.cal-time__dayhead.is-holiday { background: var(--gold-100); }

.cal-time__dayhead .dow {
    display: block;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.cal-time__dayhead .num {
    display: inline-grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-top: .12rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink-800);
    border-radius: 50%;
}

.cal-time__dayhead.is-today .num { background: var(--navy-800); color: #fff; }

.cal-time__count {
    display: block;
    margin-top: .1rem;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--navy-700);
}

.cal-time__count.is-empty { color: var(--ink-300); }

/* The all-day rail above the hours, for blocked periods. */
.cal-time__allday-label {
    position: sticky;
    left: 0;
    z-index: 2;
    padding: .3rem .42rem 0 0;
    text-align: right;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-400);
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.cal-time__allday {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .25rem .25rem;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.cal-time__hour {
    position: sticky;
    left: 0;
    z-index: 2;
    padding: .18rem .42rem 0 0;
    text-align: right;
    font-size: .7rem;
    color: var(--ink-400);
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line-soft);
    height: 52px;
    font-variant-numeric: tabular-nums;
}

.cal-time__cell {
    position: relative;
    height: 52px;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    transition: background var(--t-fast) var(--ease);
    /* The half-hour, drawn rather than ruled, so the eye can place a 09:30. */
    background-image: linear-gradient(to bottom, transparent 0, transparent calc(50% - 1px),
                      var(--line-soft) calc(50% - 1px), var(--line-soft) 50%, transparent 50%);
}

.cal-time__cell:hover { background-color: var(--navy-50); }
.cal-time__cell.is-weekend { background-color: var(--surface-2); }
.cal-time__cell.is-nonworking { background-color: var(--surface-2); }
.cal-time__cell.is-blocked { background-color: #EDF1F5; }
.cal-time__cell.is-dragover { background-color: var(--navy-100); box-shadow: inset 0 0 0 2px var(--navy-600); }

.cal-slot-event {
    position: absolute;
    padding: .22rem .38rem;
    background: var(--cal-wash, var(--navy-50));
    border: 1px solid var(--cal-edge, var(--line));
    border-left: 3px solid var(--cal-colour, var(--navy-700));
    border-radius: var(--r-xs);
    font-size: .72rem;
    line-height: 1.25;
    color: var(--cal-ink, var(--ink-800));
    overflow: hidden;
    cursor: grab;
    z-index: 1;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.cal-slot-event:hover { z-index: 3; box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-1px); }
.cal-slot-event strong { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-slot-event span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-slot-event em { display: block; font-style: normal; font-size: .66rem; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-slot-event.is-dragging { opacity: .45; }

/* Where we are in the day. */
.cal-now {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--danger);
    z-index: 4;
    pointer-events: none;
}

.cal-now__bead {
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

/* ------------------------------------------------------ agenda / list */

.cal-agenda__day {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--line);
}

.cal-agenda__date {
    padding: .85rem .95rem;
    background: var(--surface-2);
    border-right: 1px solid var(--line);
}

.cal-agenda__date .dow { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-400); }
.cal-agenda__date .num { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--ink-900); line-height: 1.1; }
.cal-agenda__date .mon { display: block; font-size: .76rem; color: var(--ink-500); }
.cal-agenda__date.is-today .num { color: var(--navy-800); }

.cal-agenda__today {
    display: inline-block;
    margin-top: .3rem;
    padding: .1rem .4rem;
    background: var(--navy-800);
    border-radius: var(--r-pill);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
}

.cal-agenda__items { display: flex; flex-direction: column; gap: .35rem; padding: .6rem .7rem; }

/* One appointment, read as a line rather than as a chip. */
.cal-row {
    position: relative;
    display: grid;
    grid-template-columns: 4px 4.6rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding: .5rem .7rem .5rem 0;
    background: var(--cal-wash, var(--surface-2));
    border: 1px solid var(--cal-edge, var(--line));
    border-radius: var(--r);
    overflow: hidden;
    transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.cal-row:hover { text-decoration: none; box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.cal-row__rail { align-self: stretch; background: var(--cal-colour, var(--navy-700)); }

.cal-row__when {
    text-align: right;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.cal-row__when strong { display: block; font-size: .84rem; font-weight: 700; color: var(--cal-ink, var(--ink-900)); }
.cal-row__when span { display: block; font-size: .7rem; color: var(--ink-400); }

.cal-row__body { min-width: 0; }

.cal-row__title {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-row__lock { display: inline-flex; opacity: .6; }
.cal-row__lock svg.icon { width: .8rem; height: .8rem; }

.cal-row__meta {
    display: block;
    margin-top: .1rem;
    font-size: .76rem;
    color: var(--ink-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-row__status {
    flex: 0 0 auto;
    padding: .16rem .5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    font-size: .68rem;
    font-weight: 600;
    color: var(--ink-600);
    white-space: nowrap;
}

.cal-row.cal-event--cancelled .cal-row__title { text-decoration: line-through; color: var(--ink-400); }
.cal-row.cal-event--block { font-style: italic; }

/* Public availability picker */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: .45rem;
}

.slot {
    padding: .52rem .3rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    font-size: .84rem;
    font-weight: 600;
    color: var(--ink-800);
    text-align: center;
    font-variant-numeric: tabular-nums;
    transition: all var(--t-fast) var(--ease);
}

.slot:hover:not(:disabled) {
    border-color: var(--navy-600);
    background: var(--navy-50);
    color: var(--navy-800);
}

.slot.is-selected {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.slot:disabled,
.slot.is-unavailable {
    background: var(--surface-3);
    border-color: var(--line);
    color: var(--ink-300);
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Compact month picker for the public form */
.mini-cal { user-select: none; }

.mini-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.mini-cal__dow {
    text-align: center;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-400);
    padding-bottom: .25rem;
}

.mini-day {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-700);
    transition: all var(--t-fast) var(--ease);
}

.mini-day:hover:not(:disabled) { background: var(--navy-50); border-color: var(--navy-300); }
.mini-day.is-selected { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.mini-day.is-today { border-color: var(--gold-600); }
.mini-day:disabled { color: var(--ink-300); cursor: not-allowed; background: var(--surface-3); }
.mini-day.is-empty { visibility: hidden; }

/* Availability indicator under the numeral */
.mini-day__mark {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

.mini-day--open .mini-day__mark    { background: var(--ok); }
.mini-day--limited .mini-day__mark { background: var(--warn); }
.mini-day--full .mini-day__mark    { background: var(--danger); }
.mini-day.is-selected .mini-day__mark { background: #fff; }

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .9rem;
    font-size: .76rem;
    color: var(--ink-500);
}

.legend__item { display: inline-flex; align-items: center; gap: .32rem; }

.legend__key {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    flex: 0 0 auto;
}

/* Stacked, for a key read down a sidebar rather than across a footer. */
.legend--stacked { flex-direction: column; gap: .42rem; }
.legend--stacked .legend__item { font-size: .8rem; color: var(--ink-600); }

/* A round key, for the status dot the chips carry. */
.legend__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.select--sm { min-height: 30px; padding: .2rem 1.9rem .2rem .5rem; font-size: .78rem; background-position: right .4rem center; }

/* ==========================================================================
   19  Charts
   ========================================================================== */

.chart {
    position: relative;
    width: 100%;
}

.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__grid line { stroke: var(--line-soft); stroke-width: 1; }
.chart__axis line { stroke: var(--line-strong); stroke-width: 1; }

.chart__label {
    font-family: var(--font-ui);
    font-size: 10.5px;
    fill: var(--ink-400);
}

.chart__value {
    font-family: var(--font-ui);
    font-size: 10.5px;
    font-weight: 700;
    fill: var(--ink-700);
}

.chart__bar {
    transition: opacity var(--t-fast) var(--ease);
    cursor: default;
}

.chart__bar:hover { opacity: .82; }
.chart__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__area { opacity: .1; }
.chart__point { stroke: #fff; stroke-width: 1.6; }

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.1rem;
    margin-top: .7rem;
    font-size: .78rem;
    color: var(--ink-500);
}

.chart-legend__item { display: inline-flex; align-items: center; gap: .35rem; }

.chart-legend__key {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex: 0 0 auto;
}

.chart-legend__value { font-weight: 700; color: var(--ink-800); }

/* Horizontal distribution bars — often clearer than a pie chart. */
.dist { display: flex; flex-direction: column; gap: .58rem; }

.dist__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem .8rem; align-items: center; }
.dist__label { font-size: .83rem; color: var(--ink-700); display: flex; align-items: center; gap: .4rem; min-width: 0; }
.dist__value { font-size: .83rem; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.dist__track { grid-column: 1 / -1; height: 7px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.dist__fill { height: 100%; border-radius: var(--r-pill); background: var(--navy-700); transition: width var(--t-slow) var(--ease); }

/* Stacked single bar, for a status breakdown in one line. */
.stackbar {
    display: flex;
    height: 10px;
    border-radius: var(--r-pill);
    overflow: hidden;
    background: var(--surface-3);
}

.stackbar__seg { height: 100%; transition: width var(--t-slow) var(--ease); }

/* ==========================================================================
   20  Steppers
   ========================================================================== */

.stepper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 1.6rem;
    counter-reset: step;
}

.step {
    flex: 1 1 0;
    position: relative;
    padding: 0 .4rem;
    text-align: center;
    min-width: 0;
}

/* The connector between steps */
.step::before,
.step::after {
    content: "";
    position: absolute;
    top: 15px;
    height: 2px;
    background: var(--line);
    width: 50%;
}

.step::before { left: 0; }
.step::after { right: 0; }
.step:first-child::before,
.step:last-child::after { display: none; }
.step.is-done::before,
.step.is-done::after,
.step.is-current::before { background: var(--navy-700); }

.step__marker {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    margin: 0 auto .4rem;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    font-size: .82rem;
    font-weight: 700;
    color: var(--ink-400);
    transition: all var(--t-base) var(--ease);
}

.step__label {
    font-size: .785rem;
    font-weight: 600;
    color: var(--ink-400);
    line-height: 1.3;
}

.step__hint { font-size: .72rem; color: var(--ink-300); margin-top: .08rem; }

.step.is-current .step__marker {
    border-color: var(--navy-800);
    background: var(--navy-800);
    color: #fff;
    box-shadow: 0 0 0 4px var(--navy-50);
}

.step.is-current .step__label { color: var(--navy-800); }

.step.is-done .step__marker {
    border-color: var(--navy-700);
    background: var(--navy-700);
    color: #fff;
}

.step.is-done .step__label { color: var(--ink-600); }

.step-panel { display: none; }
.step-panel.is-active { display: block; animation: fade-slide var(--t-slow) var(--ease); }

@keyframes fade-slide {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: none; }
}

/* Review block shown at the last step */
.review-group + .review-group { margin-top: 1.15rem; }

.review-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-bottom: .35rem;
    margin-bottom: .5rem;
    border-bottom: 1px solid var(--line);
}

.review-group__head h3 { font-size: .84rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-500); }

/* ==========================================================================
   21  Empty states and skeletons
   ========================================================================== */

.empty {
    padding: 2.6rem 1.5rem;
    text-align: center;
}

.empty--tight { padding: 1.6rem 1rem; }

/* A lit disc with a ring around it, rather than a flat grey circle: an empty
   table should still look finished. */
.empty__icon {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 1.05rem;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 34% 26%, #FFFFFF 0%, var(--navy-100) 76%);
    border: 1px solid #D8E2F0;
    color: var(--navy-600);
    border-radius: 50%;
    box-shadow: inset 0 1px 0 #fff, var(--shadow-xs);
}

.empty__icon::after {
    content: "";
    position: absolute;
    inset: -8px;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.empty__icon svg.icon { width: 1.45rem; height: 1.45rem; }

.empty__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink-800);
    margin-bottom: .28rem;
}

.empty__text {
    font-size: .865rem;
    color: var(--ink-400);
    max-width: 42ch;
    margin: 0 auto .9rem;
    line-height: 1.55;
}

.empty__text:last-child { margin-bottom: 0; }

.skeleton {
    background: linear-gradient(90deg, var(--surface-3) 25%, #EDF1F6 37%, var(--surface-3) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.35s ease-in-out infinite;
    border-radius: var(--r-xs);
}

@keyframes shimmer {
    from { background-position: 100% 0; }
    to   { background-position: 0 0; }
}

.skeleton--text { height: .8rem; margin-bottom: .45rem; }
.skeleton--title { height: 1.15rem; width: 42%; margin-bottom: .7rem; }
.skeleton--line { height: .8rem; width: 100%; }
.skeleton--line-short { height: .8rem; width: 62%; }
.skeleton--block { height: 4.6rem; }
.skeleton--avatar { width: 32px; height: 32px; border-radius: 50%; }

.skeleton-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--line-soft);
}

.is-busy { position: relative; pointer-events: none; }

.is-busy::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .58);
    backdrop-filter: blur(.5px);
    z-index: 5;
    border-radius: inherit;
}

/* A slim progress bar at the top of the viewport during navigation. */
.route-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--gold-600);
    z-index: 300;
    transition: width var(--t-slow) var(--ease), opacity var(--t-base) var(--ease);
}

/* ==========================================================================
   22  Pagination and toolbars
   ========================================================================== */

.toolbar {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    padding: .7rem .85rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.toolbar__group { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.toolbar__spacer { flex: 1 1 auto; }

.toolbar .input,
.toolbar .select { width: auto; min-height: 32px; padding: .28rem .58rem; font-size: .83rem; }
.toolbar .select { padding-right: 1.9rem; }
.toolbar__search { position: relative; min-width: 200px; flex: 1 1 220px; max-width: 340px; }
.toolbar__search .input { width: 100%; padding-left: 2rem; }

.toolbar__search svg.icon {
    position: absolute;
    left: .58rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-400);
    pointer-events: none;
}

.filter-summary {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    padding: .55rem .85rem;
    border-bottom: 1px solid var(--line);
    background: var(--navy-50);
    font-size: .8rem;
    color: var(--ink-600);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .7rem .85rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    flex-wrap: wrap;
}

.pagination__info { font-size: .81rem; color: var(--ink-500); }
.pagination__info strong { color: var(--ink-800); font-weight: 600; }
.pagination__pages { display: flex; align-items: center; gap: .18rem; }

.page-link {
    min-width: 32px;
    height: 32px;
    padding: 0 .45rem;
    display: inline-grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-600);
    transition: all var(--t-fast) var(--ease);
}

.page-link:hover { border-color: var(--navy-300); color: var(--navy-800); background: var(--navy-50); text-decoration: none; }

.page-link.is-active {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
}

.page-link.is-disabled { opacity: .4; pointer-events: none; }
.page-ellipsis { padding: 0 .25rem; color: var(--ink-300); }

/* ==========================================================================
   23  Public portal
   ========================================================================== */

.portal { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }

.portal__masthead {
    position: relative;
    background-color: #1E3A8A;
    background-image: url("../img/pattern-weave.svg"),
                      linear-gradient(180deg, #2747A3 0%, #1E3A8A 100%);
    background-size: 72px 72px, auto;
    color: #fff;
}

/* The gold rule, graded rather than flat, so it catches the light at the join. */
.portal__masthead::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-800) 0%, var(--gold-600) 24%,
                var(--gold-300) 50%, var(--gold-600) 76%, var(--gold-800) 100%);
}

/* The uploaded mark sits on white with a little air around it. */
.portal__identity .brandmark {
    width: 46px;
    height: 46px;
    padding: 4px;
    border-radius: var(--r);
    box-shadow: 0 3px 10px -3px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .55);
}

.portal__masthead-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: .95rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal__identity { display: flex; align-items: center; gap: .8rem; min-width: 0; }

.portal__identity .name {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
    line-height: 1.15;
}

.portal__identity .office {
    display: block;
    font-size: .8rem;
    color: #A9BEDA;
    margin-top: .1rem;
}

.portal__nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .3rem;
    min-width: 0;
}

.portal__nav a,
.portal__signin {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .7rem;
    border-radius: var(--r-sm);
    color: #C7D4E6;
    font-size: .85rem;
    font-weight: 500;
    white-space: nowrap;
}

.portal__nav a:hover,
.portal__signin:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.portal__nav a.is-active { background: rgba(255, 255, 255, .13); color: #fff; }

/* Each portal link carries a long label and a short one; only the short one
   survives the handset, where four full labels would never sit on a line. */
.portal__nav-short { display: none; }

.portal__body { flex: 1 1 auto; }

.portal__inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3.5rem;
}

.portal__inner--narrow { max-width: 800px; }

/* The heading band on portal inner pages.

   It carries the same furniture as the home hero — the gold rule, the title in
   the institutional face — at a quieter weight, with the diary and clock set
   into the right margin, so the request and status pages do not open on bare
   grey. */
.portal-head {
    position: relative;
    overflow: hidden;
    padding: 1.8rem 2rem 1.9rem;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
}

.portal-head::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy-800) 0%, var(--navy-800) 58%,
                var(--gold-600) 58%, var(--gold-300) 100%);
}

.portal-head::after {
    content: "";
    position: absolute;
    right: 1.5rem;
    bottom: -.6rem;
    width: 228px;
    height: 171px;
    background: url("../img/art-schedule.svg") right bottom / contain no-repeat;
    pointer-events: none;
}

.portal-head > * { position: relative; z-index: 1; }

.portal-head h1 {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: .004em;
    color: var(--navy-900);
    margin-bottom: .5rem;
}

.portal-head .lede { max-width: 48ch; }

/* Room for the illustration only where there is room for it. */
@media (min-width: 901px) {
    .portal-head { padding-right: 16.5rem; }
}

@media (max-width: 900px) {
    .portal-head { padding: 1.4rem 1.3rem 1.5rem; }
    .portal-head::after { display: none; }
    .portal-head h1 { font-size: 1.4rem; }
}

.portal__foot {
    background: #19337A;
    color: #8AA0C0;
    font-size: .8rem;
    padding: 1.6rem 1.5rem;
}

.portal__foot-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.4rem;
}

.portal__foot h4 {
    color: #E3EBF6;
    font-size: .78rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    margin-bottom: .5rem;
}

.portal__foot a { color: #A9BEDA; }
.portal__foot-base {
    max-width: 1160px;
    margin: 1.4rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .75rem;
    color: #6E85A8;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero — the portal's front door.

   A dark institutional panel rather than a white card. The portico line work
   stands behind the text on the right, the weave keeps a large navy field from
   going flat, and the gold rule ties it back to the masthead above. */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 3.2rem 3rem 3.4rem;
    border-radius: var(--r-lg);
    background:
        radial-gradient(125% 150% at 84% 6%, rgba(45, 84, 142, .78) 0%, rgba(18, 48, 92, 0) 60%),
        linear-gradient(152deg, #2747A3 0%, #1E3A8A 48%, #19337A 100%);
    box-shadow: var(--shadow-lg);
    color: #C7D4E6;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url("../img/pattern-weave.svg");
    background-size: 72px 72px;
}

.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -1%;
    bottom: -4%;
    width: clamp(250px, 36%, 424px);
    aspect-ratio: 4 / 3;
    background: url("../img/art-portico.svg") center bottom / contain no-repeat;
    pointer-events: none;
}

.hero__text {
    position: relative;
    z-index: 1;
    max-width: 40rem;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1.15rem;
    padding: .32rem .8rem .32rem .62rem;
    background: rgba(217, 196, 141, .11);
    border: 1px solid rgba(217, 196, 141, .3);
    border-radius: var(--r-pill);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold-300);
}

.hero__eyebrow svg.icon { width: .92rem; height: .92rem; }

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(1.85rem, 1.25rem + 1.9vw, 2.6rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: .004em;
    color: #fff;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.hero__rule {
    width: 58px;
    height: 3px;
    margin-bottom: 1.25rem;
    background: linear-gradient(90deg, var(--gold-600), rgba(217, 196, 141, .1));
}

.hero p {
    font-size: 1.01rem;
    color: #B4C6E0;
    line-height: 1.66;
    max-width: 44ch;
    margin-bottom: 1.75rem;
}

.hero__actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
}

/* On navy the navy button would vanish and a white one would shout, so gold
   leads here and the second action is a glass outline. */
.hero .btn--primary {
    --btn-bg: var(--gold-600);
    --btn-fg: #201803;
    --btn-bd: var(--gold-600);
    box-shadow: 0 10px 24px -12px rgba(176, 141, 63, .9);
}

.hero .btn--primary:hover { --btn-bg: var(--gold-300); --btn-bd: var(--gold-300); }

.hero .btn--secondary {
    --btn-bg: rgba(255, 255, 255, .07);
    --btn-fg: #E7EEF8;
    --btn-bd: rgba(255, 255, 255, .26);
}

.hero .btn--secondary:hover { --btn-bg: rgba(255, 255, 255, .15); --btn-bd: rgba(255, 255, 255, .46); }

/* "Before you request" — an icon strip beneath the hero, carrying the five
   things the office would otherwise have to repeat on the telephone. */
.infostrip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.infostrip__item {
    padding: 1.3rem 1.2rem 1.35rem;
    background: var(--surface);
    transition: background var(--t-base) var(--ease);
}

.infostrip__item:hover { background: var(--navy-50); }

.infostrip__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: .85rem;
    border-radius: 50%;
    color: var(--navy-700);
    background: radial-gradient(circle at 32% 26%, #FFFFFF 0%, var(--navy-100) 76%);
    border: 1px solid #D3DFEF;
    box-shadow: inset 0 1px 0 #fff, var(--shadow-xs);
}

.infostrip__icon svg.icon { width: 1.05rem; height: 1.05rem; }

.infostrip__item strong {
    display: block;
    margin-bottom: .22rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.35;
}

.infostrip__note {
    display: block;
    font-size: .81rem;
    color: var(--ink-500);
    line-height: 1.5;
}

/* A labelled fact with an icon, used down the side of portal pages. */
.info-line {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .55rem 0;
    border-bottom: 1px solid #DAE3F0;
    font-size: .86rem;
}

.info-line:last-child { border-bottom: 0; }
.info-line svg.icon { color: var(--navy-600); margin-top: .16rem; flex: 0 0 auto; }
.info-line strong { display: block; color: var(--ink-900); font-weight: 600; }
.info-line span { color: var(--ink-500); }

/* How it works — four steps, numbered in the institutional face. */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
    gap: 1rem;
}

.guide {
    position: relative;
    overflow: hidden;
    padding: 1.5rem 1.25rem 1.35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    transition: transform var(--t-base) var(--ease),
                box-shadow var(--t-base) var(--ease),
                border-color var(--t-base) var(--ease);
}

.guide:hover {
    transform: translateY(-2px);
    border-color: var(--navy-300);
    box-shadow: var(--shadow-md);
}

/* A wash in the corner, so there is depth behind the numeral. */
.guide::before {
    content: "";
    position: absolute;
    left: -34px;
    top: -50px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--navy-50) 0%, rgba(241, 245, 250, 0) 70%);
}

.guide__step {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: .8rem;
    background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
    color: #fff;
    border-radius: 50%;
    font-family: var(--font-serif);
    font-size: .92rem;
    font-weight: 600;
    box-shadow: 0 6px 14px -6px rgba(30, 58, 138, .65);
}

/* The gold ring says these are one sequence, not four separate cards. */
.guide__step::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid var(--gold-300);
    border-radius: 50%;
    opacity: .6;
}

.guide h3 { position: relative; font-size: .95rem; margin-bottom: .35rem; }
.guide p { position: relative; font-size: .845rem; color: var(--ink-500); line-height: 1.58; margin: 0; }

/* Status tracker */
.tracker {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 1.35rem;
    position: relative;
}

.tracker::before {
    content: "";
    position: absolute;
    left: 5px;
    top: .7rem;
    bottom: .7rem;
    width: 2px;
    background: var(--line);
}

.tracker__step { position: relative; padding: .35rem 0 1rem; }
.tracker__step:last-child { padding-bottom: 0; }

.tracker__step::before {
    content: "";
    position: absolute;
    left: -1.35rem;
    top: .55rem;
    width: 12px;
    height: 12px;
    background: var(--surface);
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    z-index: 1;
}

.tracker__step.is-done::before { background: var(--ok); border-color: var(--ok); }
.tracker__step.is-current::before { background: var(--navy-800); border-color: var(--navy-800); box-shadow: 0 0 0 4px var(--navy-100); }
.tracker__step.is-failed::before { background: var(--danger); border-color: var(--danger); }
.tracker__title { font-size: .9rem; font-weight: 600; color: var(--ink-400); }
.tracker__step.is-done .tracker__title,
.tracker__step.is-current .tracker__title,
.tracker__step.is-failed .tracker__title { color: var(--ink-900); }
.tracker__meta { font-size: .79rem; color: var(--ink-400); margin-top: .1rem; }

/* Confirmation panel with the reference and QR code */
.confirmation {
    text-align: center;
    padding: 2.2rem 1.8rem;
}

.confirmation__reference {
    display: inline-block;
    margin: .9rem 0 1.1rem;
    padding: .7rem 1.4rem;
    background: var(--navy-50);
    border: 1px dashed var(--navy-300);
    border-radius: var(--r);
    font-family: var(--font-mono);
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--navy-800);
}

.qr-panel {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    padding: .95rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
}

.qr-panel svg,
.qr-panel img { width: 168px; height: 168px; display: block; }
.qr-panel figcaption { font-size: .76rem; color: var(--ink-400); max-width: 20ch; text-align: center; }

/* --------------------------------------------------------------------------
   The public homepage, laid out as a landing page.

   A photographic banner with the invitation over it, the practical facts
   lifted across its lower edge, a strip of assurances, the office's own
   description beside a picture, the four steps, and a closing invitation.

   Every photograph is optional. Where the office has uploaded none, each
   section falls back to the institutional gradients and the drawn artwork, so
   a fresh installation still looks finished rather than broken.
   -------------------------------------------------------------------------- */

.lp { display: flex; flex-direction: column; gap: 3.5rem; }

/* ------------------------------------------------------------- the banner */

.lp-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--r-xl);
    padding: 3.4rem 3rem 5rem;
    color: #fff;
    background-color: var(--navy-800);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-lg);
}

/* Without a photograph the panel carries the institutional light instead. */
.lp-hero:not(.lp-hero--photo) {
    background-image:
        radial-gradient(120% 120% at 88% -10%, rgba(30, 92, 181, .55) 0%, rgba(30, 58, 138, 0) 60%),
        radial-gradient(90% 90% at 0% 110%, rgba(201, 162, 39, .22) 0%, rgba(30, 58, 138, 0) 58%),
        linear-gradient(150deg, rgba(18, 55, 97, .93) 0%, rgba(30, 58, 138, .90) 55%, rgba(24, 46, 110, .95) 100%),
        url("../img/art-campus.svg");
    background-position: center, center, center, right bottom;
    background-size: cover, cover, cover, 58% auto;
    background-repeat: no-repeat;
}

/* The wash that keeps the wording legible over whatever is uploaded. */
.lp-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(115deg, #19337A 0%, rgba(30, 58, 138, .82) 46%, rgba(21, 87, 176, .55) 100%);
}

.lp-hero:not(.lp-hero--photo) .lp-hero__scrim { opacity: .35 !important; }

/* A photograph with a bright sky can swallow the headline whatever the
   overlay is set to, so the side the copy sits on is darkened on its own.
   It fades out well before the middle, leaving the picture itself open. */
.lp-hero--photo::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(24, 46, 110, .74) 0%, rgba(24, 46, 110, .5) 34%,
                                        rgba(24, 46, 110, .12) 62%, rgba(24, 46, 110, 0) 78%);
}

.lp-hero__inner { position: relative; max-width: 41rem; }

.lp-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .9rem;
    margin-bottom: 1.4rem;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .26);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #E6EEFA;
    backdrop-filter: blur(6px);
}

.lp-pill svg.icon { width: .9rem; height: .9rem; }

.lp-hero h1 {
    margin: 0 0 1.1rem;
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    line-height: 1.14;
    letter-spacing: -.028em;
    font-weight: 700;
    color: #fff;
}

/* The accent word, underlined by hand, on the homepage banner. */
.lp-underline {
    position: relative;
    white-space: nowrap;
    color: #9CC2F5;
}

.lp-underline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -.12em;
    height: .12em;
    border-radius: var(--r-pill);
    background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
}

.lp-hero p {
    margin: 0 0 1.9rem;
    font-size: 1.02rem;
    line-height: 1.65;
    color: #C8D6EA;
    max-width: 44ch;
}

.lp-hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* The floating fact, sitting over the top-right of the picture. */
.lp-hero__chip {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem 1.1rem .7rem .75rem;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .95);
    box-shadow: var(--shadow-lg);
    color: var(--ink-700);
    font-size: .76rem;
    line-height: 1.35;
}

.lp-hero__chip strong { display: block; font-size: .84rem; color: var(--navy-900); font-weight: 700; }

.lp-hero__chip-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: var(--r-pill);
    background: var(--navy-50);
    color: var(--navy-700);
}

/* ------------------------------- the facts, lifted across the banner's edge */

.lp-bar {
    position: relative;
    z-index: 2;
    margin: -3.75rem 1.75rem 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.15rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
}

.lp-bar__item { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }

.lp-bar__label {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink-400);
}

.lp-bar__value { font-size: .95rem; font-weight: 600; color: var(--navy-900); }
.lp-bar__value.is-open { color: var(--ok); }
.lp-bar__value.is-closed { color: var(--danger); }
.lp-bar__cta { white-space: nowrap; }

/* --------------------------------------------------------- the assurances */

.lp-assure {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.lp-assure__card {
    padding: 1.35rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.lp-assure__card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.lp-assure__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: .85rem;
    border-radius: 13px;
    background: linear-gradient(150deg, var(--navy-50), var(--navy-100));
    color: var(--navy-700);
}

.lp-assure__icon svg.icon { width: 1.3rem; height: 1.3rem; }
.lp-assure__card strong { display: block; font-size: .92rem; color: var(--navy-900); margin-bottom: .25rem; }
.lp-assure__card span { font-size: .82rem; line-height: 1.55; color: var(--ink-500); }

/* ------------------------------------ the office's description, and a picture */

.lp-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 3rem;
    align-items: center;
}

.lp-eyebrow {
    margin: 0 0 .6rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--navy-700);
}

.lp-eyebrow--centre { text-align: center; }

.lp-split h2 {
    margin: 0 0 .9rem;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.15;
    letter-spacing: -.025em;
    color: var(--navy-900);
}

.lp-lede { font-size: .98rem; line-height: 1.65; color: var(--ink-600); margin: 0 0 1.3rem; }

.lp-ticks {
    list-style: none;
    margin: 0 0 1.3rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem 1.2rem;
}

.lp-ticks li {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--ink-800);
}

.lp-tick {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: var(--r-pill);
    color: #fff;
}

.lp-tick svg.icon { width: .8rem; height: .8rem; stroke-width: 3; }

.lp-split__figure {
    min-height: 420px;
    border-radius: var(--r-xl);
    background-color: var(--navy-100);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-lg);
}

.lp-split__figure.is-drawn {
    background-image:
        linear-gradient(150deg, rgba(21, 87, 176, .10), rgba(30, 58, 138, .06)),
        url("../img/art-portico.svg");
    background-size: cover;
}

/* -------------------------------------------------------------- the steps */

.lp-heading {
    margin: 0 0 2.2rem;
    text-align: center;
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    letter-spacing: -.022em;
    color: var(--navy-900);
}

.lp-steps__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    position: relative;
}

/* The dotted thread that ties the steps together, as on the reference. */
.lp-steps__grid::before {
    content: "";
    position: absolute;
    top: 46px;
    left: 12%;
    right: 12%;
    border-top: 2px dashed var(--navy-100);
    z-index: 0;
}

.lp-step {
    position: relative;
    z-index: 1;
    padding: 1.5rem 1.25rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.lp-step__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto .9rem;
    border-radius: var(--r-pill);
    background: linear-gradient(150deg, var(--navy-700), var(--navy-800));
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(21, 87, 176, .8);
}

.lp-step__icon svg.icon { width: 1.4rem; height: 1.4rem; }

.lp-step__no {
    display: block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    color: var(--gold-700);
    margin-bottom: .3rem;
}

.lp-step h3 { margin: 0 0 .35rem; font-size: .96rem; color: var(--navy-900); }
.lp-step p { margin: 0; font-size: .82rem; line-height: 1.6; color: var(--ink-500); }

.lp-steps__note { margin: 1.6rem 0 0; text-align: center; font-size: .85rem; color: var(--ink-500); }

/* ------------------------------------------------- the closing invitation */

.lp-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--r-xl);
    padding: 2.6rem 3rem;
    color: #fff;
    background-color: var(--navy-800);
    background-size: cover;
    background-position: center;
}

.lp-cta__scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(115deg, rgba(30, 58, 138, .90) 0%, rgba(21, 87, 176, .78) 100%);
}

.lp-cta:not(.lp-cta--photo) .lp-cta__scrim {
    background: linear-gradient(115deg, #1E3A8A 0%, #1557B0 100%);
}

.lp-cta__inner { display: flex; align-items: center; gap: 1.5rem; }
.lp-cta__text { flex: 1 1 auto; min-width: 0; }
.lp-cta h2 { margin: 0 0 .3rem; font-size: 1.5rem; letter-spacing: -.02em; color: #fff; }
.lp-cta p { margin: 0; font-size: .92rem; line-height: 1.6; color: #CBDAF0; max-width: 62ch; }

.lp-cta__mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    color: #fff;
}

/* Two button treatments that only make sense over a photograph. */
.btn--ghost-light {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .38);
    color: #fff;
    backdrop-filter: blur(6px);
}

.btn--ghost-light:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .6); }

.btn--light { background: #fff; border-color: #fff; color: var(--navy-800); white-space: nowrap; }
.btn--light:hover { background: var(--navy-50); border-color: var(--navy-50); color: var(--navy-900); }

/* The primary action stands on a dark panel here, so it wears the gold
   rather than the navy it carries everywhere else against white. */
.lp-hero .btn--primary { background: var(--gold-600); border-color: var(--gold-600); color: #241C08; }
.lp-hero .btn--primary:hover { background: var(--gold-300); border-color: var(--gold-300); color: #241C08; }

.lp-hero .btn--primary.is-disabled {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .32);
    color: #DCE6F5;
}

/* The three homepage photographs on the settings screen. */
.portal-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

.portal-image {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface-2);
}

.portal-image__preview {
    height: 132px;
    background: var(--navy-50);
    background-size: cover;
    background-position: center;
}

.portal-image__preview.is-empty {
    display: grid;
    place-items: center;
    gap: .3rem;
    align-content: center;
    color: var(--ink-400);
    font-size: .76rem;
    border-bottom: 1px dashed var(--line-strong);
}

.portal-image__body { padding: .9rem 1rem 1rem; }
.filedrop--sm { padding: .8rem; text-align: center; }
.filedrop--sm .filedrop__title { font-size: .82rem; }
.filedrop--sm .filedrop__hint { font-size: .72rem; }

/* ------------------------------------------ the homepage on smaller screens */

@media (max-width: 1080px) {
    .lp-assure { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-steps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-steps__grid::before { display: none; }
    .lp-split { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .lp-split__figure { min-height: 300px; }
    .portal-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .lp-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-bar__cta { grid-column: 1 / -1; justify-content: center; }
}

@media (max-width: 780px) {
    .lp { gap: 2.5rem; }
    .lp-hero { padding: 2.5rem 1.6rem 4.5rem; }
    /* The accent word cannot be broken, so the headline is set smaller here
       rather than letting "Vice-Chancellor" run off the side. */
    .lp-hero h1 { font-size: clamp(1.5rem, 6.4vw, 2.05rem); }
    .lp-hero__chip { display: none; }
    .lp-hero__actions .btn { width: 100%; justify-content: center; }
    .lp-bar { margin: -3rem .75rem 0; padding: 1rem; }
    .lp-cta { padding: 2rem 1.5rem; }
    .lp-cta__inner { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
    .lp-cta__inner .btn { width: 100%; justify-content: center; }
    .portal-images { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
    .lp-assure { grid-template-columns: minmax(0, 1fr); }
    .lp-steps__grid { grid-template-columns: minmax(0, 1fr); }
    .lp-ticks { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   24  Authentication
   ========================================================================== */

/* The sign-in screen is the first thing anyone sees of the system, so it is
   built as a piece of the institution rather than as a form on a page: the
   campus at full bleed under a deep navy veil, and a single centred column
   standing on it — the crest and name, a bold greeting, then the form drawn
   in fine white outline so the scene shows through every control. */

.auth {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    color: #fff;
    background:
        url("../img/art-campus.svg") center bottom / cover no-repeat,
        linear-gradient(150deg, #1A63C0 0%, #12467F 46%, #0B1F3A 100%);
    background-color: #0B1F3A;
}

/* The photograph the office uploads, drawn full-bleed behind everything. */
.auth__photo {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* The veil. Always laid down, over the photograph or the drawn campus, and
   its strength is the figure set in Settings. A floor of tint is kept under
   it so white text holds its contrast even when the setting is turned low. */
.auth__scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(8, 36, 66, .82) 0%, rgba(9, 40, 72, .78) 45%, rgba(5, 22, 42, .94) 100%);
    pointer-events: none;
}

.auth::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(9, 42, 78, .52);
    pointer-events: none;
}

/* --------------------------------------------------------- the column */

.auth__panel {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.5rem 2rem;
}

/* Crest | name — one line, centred, divided by a hairline as on the
   reference design. */
.auth__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    margin-bottom: 2.4rem;
    max-width: 100%;
}

.auth__mark {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .06);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: #fff;
}

.auth__mark--image {
    padding: 10px;
    background: rgba(255, 255, 255, .95);
    border-color: rgba(255, 255, 255, .8);
}

.auth__mark img { width: 100%; height: 100%; object-fit: contain; }

.auth__brand-rule {
    flex: 0 0 auto;
    width: 1px;
    align-self: stretch;
    min-height: 52px;
    background: rgba(255, 255, 255, .45);
}

.auth__brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    text-align: left;
}

.auth__kicker {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .78);
}

.auth__wordmark {
    margin-top: .1rem;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
}

.auth__tagline {
    margin-top: .2rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold-300);
}

/* --------------------------------------------------------- the form */

.auth__card {
    width: min(100%, 440px);
    text-align: center;
}

.auth__card h1 {
    /* Allowed to run wider than the form, so a longer heading stays on one line. */
    margin: 0 calc((100% - min(92vw, 680px)) / 2) .55rem;
    font-size: clamp(2rem, 1.3rem + 2.4vw, 2.85rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.01em;
    color: #fff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.auth__card > p {
    margin: 0 auto 2.2rem;
    max-width: 30rem;
    font-size: .92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .78);
}

.auth__card > p strong { color: #fff; }

.auth__card h1 + form { display: block; margin-top: 2.4rem; }

.auth__card form { text-align: left; }

.auth__card .field { margin-bottom: 1.35rem; }

.auth__card .field__label {
    color: rgba(255, 255, 255, .88);
    font-weight: 600;
}

.auth__card .field__label .req { color: var(--gold-300); }
.auth__card .field__hint { color: rgba(255, 255, 255, .62); }

.auth__card .field__error {
    color: #FFC9C2;
}

/* Every text box is an outlined frame on the scene. */
.auth__card .input {
    min-height: 54px;
    padding: .7rem 1rem;
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 2px;
    box-shadow: none;
    transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}

.auth__card .input::placeholder { color: rgba(255, 255, 255, .85); font-weight: 600; }
.auth__card .input:hover:not(:disabled) { border-color: rgba(255, 255, 255, .85); }

.auth__card .input:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .14);
}

.auth__card .is-invalid .input,
.auth__card .input.is-invalid {
    background: rgba(255, 255, 255, .04);
    border-color: #FF8A7A;
    box-shadow: none;
}

/* Browser autofill would otherwise paint the box pale yellow. */
.auth__card .input:-webkit-autofill,
.auth__card .input:-webkit-autofill:hover,
.auth__card .input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px rgba(12, 42, 74, .96) inset;
    transition: background-color 9999s ease-out;
}

/* The framed field with its icon cell: [ icon | input ]. */
.auth-box { position: relative; }

.auth-box__icon {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 56px;
    display: grid;
    place-items: center;
    pointer-events: none;
    color: rgba(255, 255, 255, .9);
}

.auth-box__icon::after {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    right: 0;
    width: 1px;
    background: rgba(255, 255, 255, .5);
}

.auth-box__icon svg.icon { width: 1.2rem; height: 1.2rem; }

.auth__card .auth-box .input { padding-left: 74px; }
.auth__card .input-group .input { padding-right: 3rem; border-radius: 2px; }

.auth__card .password-toggle {
    right: .5rem;
    color: rgba(255, 255, 255, .8);
    background: transparent;
}

.auth__card .password-toggle:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* "Keep me signed in" at the start of the line, the forgotten-password
   link at its end. */
.auth__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    margin: -.1rem 0 2rem;
}

.auth__remember { margin: 0; font-size: .84rem; }

.auth__remember .check__title { font-weight: 500; color: rgba(255, 255, 255, .92); }

.auth__card .auth__remember input[type="checkbox"] {
    accent-color: #fff;
}

.auth__forgot {
    font-size: .84rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .92);
}

.auth__forgot:hover { color: #fff; text-decoration: underline; }

/* The buttons: a white outline, centred, in tracked capitals. */
.auth__card .btn--primary {
    display: flex;
    width: auto;
    min-width: 210px;
    min-height: 50px;
    margin: 0 auto;
    padding: .7rem 2rem;
    justify-content: center;
    border-radius: 2px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .9);
    box-shadow: none;
}

.auth__card .btn--primary:hover {
    color: var(--navy-800);
    background: #fff;
    border-color: #fff;
}

.auth__card .btn--primary svg.icon { width: .95rem; height: .95rem; }

.auth__card .btn--ghost {
    color: rgba(255, 255, 255, .88);
    background: transparent;
    border-color: transparent;
}

.auth__card .btn--ghost:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* Notices sit on the scene as frosted panels. */
.auth__card .notice {
    margin-top: 2rem;
    text-align: left;
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(6px);
}

.auth__card .notice__title { color: #fff; }
.auth__card .notice svg.icon { color: var(--gold-300); }

/* A quiet rule with a word in it, between the form and the alternatives. */
.auth__or {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 2.2rem 0 1.1rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}

.auth__or::before,
.auth__or::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(255, 255, 255, .22);
}

.auth__meta {
    margin-top: 2.2rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(255, 255, 255, .2);
    font-size: .85rem;
    color: rgba(255, 255, 255, .72);
    text-align: left;
}

.auth__meta a { font-weight: 600; color: #fff; }
.auth__meta a:hover { text-decoration: underline; }

/* The way in for a member of the public. */
.auth__public {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    font-size: .82rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .72);
}

.auth__public svg.icon { flex: 0 0 auto; margin-top: .15rem; color: var(--gold-300); }
.auth__public strong { display: block; color: #fff; font-weight: 600; }
.auth__public a { color: #fff; font-weight: 600; text-decoration: underline; }

.auth__card .tiny.muted { color: rgba(255, 255, 255, .6); text-align: left; }

.auth__foot {
    position: relative;
    padding: 1.25rem 1.5rem 1.6rem;
    text-align: center;
    font-size: .73rem;
    line-height: 1.7;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .55);
}

/* ------------------------------------------ demonstration account helper */

.demo-accounts {
    margin-top: 0;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .07);
    border-radius: 4px;
    overflow: hidden;
    backdrop-filter: blur(6px);
}

.demo-accounts__head {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem .9rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--gold-300);
    border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.demo-accounts__head svg.icon { width: .95rem; height: .95rem; }

.demo-account {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .5rem .85rem;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    text-align: left;
    font-size: .82rem;
    color: rgba(255, 255, 255, .85);
    transition: background var(--t-fast) var(--ease);
}

.demo-account:last-child { border-bottom: 0; }
.demo-account:hover { background: rgba(255, 255, 255, .08); }
.demo-account strong { display: block; color: #fff; font-size: .85rem; font-weight: 600; }
.demo-account span { font-size: .76rem; color: rgba(255, 255, 255, .65); }
.demo-account .avatar { color: var(--gold-800); font-size: .66rem; }

/* The address is one long unbroken token; let it wrap rather than push the
   row -- and the card -- wider than the screen. */
.demo-account > span { min-width: 0; overflow-wrap: anywhere; }

.demo-account__use {
    flex: 0 0 auto;
    margin-left: auto;
    padding: .2rem .65rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 2px;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.demo-account:hover .demo-account__use { background: #fff; border-color: #fff; color: var(--navy-800); }

/* The one-time code box, framed like the other fields. */
.auth__card .code-input {
    color: #fff;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 2px;
}

.auth__card .code-input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .14);
}

.auth__card .strength__bar { background: rgba(255, 255, 255, .2); }

/* One-time code entry */
.code-input {
    width: 100%;
    padding: .8rem;
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .38em;
    text-align: center;
    text-transform: uppercase;
    border: 1px solid var(--line-strong);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--navy-800);
}

.code-input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px var(--navy-50); }

/* Password strength indicator */
.strength { margin-top: .45rem; }

.strength__bars { display: flex; gap: 3px; }

.strength__bar {
    height: 4px;
    flex: 1 1 0;
    background: var(--line);
    border-radius: var(--r-pill);
    transition: background var(--t-base) var(--ease);
}

.strength__text { font-size: .76rem; margin-top: .28rem; color: var(--ink-400); }
.strength.is-weak .strength__bar:nth-child(-n+1) { background: var(--danger); }
.strength.is-weak .strength__text { color: var(--danger); }
.strength.is-fair .strength__bar:nth-child(-n+2) { background: var(--warn); }
.strength.is-fair .strength__text { color: var(--warn); }
.strength.is-good .strength__bar:nth-child(-n+3) { background: #0E7090; }
.strength.is-good .strength__text { color: #0E7090; }
.strength.is-strong .strength__bar { background: var(--ok); }
.strength.is-strong .strength__text { color: var(--ok); }

/* ==========================================================================
   25  Utilities
   ========================================================================== */

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .4rem; }
.mt-2 { margin-top: .8rem; }
.mt-3 { margin-top: 1.2rem; }
.mt-4 { margin-top: 1.8rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .4rem; }
.mb-2 { margin-bottom: .8rem; }
.mb-3 { margin-bottom: 1.2rem; }
.mb-4 { margin-bottom: 1.8rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-0 { padding: 0 !important; }
.pt-2 { padding-top: .8rem; }
.pb-2 { padding-bottom: .8rem; }

.flex-1 { flex: 1 1 auto; min-width: 0; }
.flex-none { flex: 0 0 auto; }
.w-full { width: 100%; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.relative { position: relative; }
.gap-1 { gap: .4rem; }
.gap-2 { gap: .8rem; }
.gap-3 { gap: 1.2rem; }

/* Preview beside its upload form. A grid rather than a flex row, so the form
   cannot wrap underneath the thumbnail when the hint text runs long. */
.branding-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
}

@media (max-width: 720px) {
    .branding-row { grid-template-columns: minmax(0, 1fr); }
}

/* The sign-in image, previewed at roughly the shape it will take on the page. */
.login-image-preview {
    position: relative;
    flex: 0 0 auto;
    width: 196px;
    height: 136px;
    display: grid;
    place-items: center;
    gap: .3rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface-3) center / cover no-repeat;
    color: var(--ink-400);
    font-size: .78rem;
    box-shadow: var(--shadow-xs);
}

.login-image-preview.is-empty { border-style: dashed; }

.login-image-preview__scrim {
    position: absolute;
    inset: 0;
    /* The same overlay the sign-in page lays down, so the preview is true. */
    background:
        radial-gradient(115% 85% at 50% 8%, rgba(30, 58, 138, .52) 0%, rgba(24, 46, 110, .96) 100%),
        linear-gradient(155deg, rgba(21, 87, 176, .60) 0%, rgba(30, 58, 138, .92) 52%, rgba(24, 46, 110, 1) 100%);
}

.login-image-preview__label {
    position: relative;
    z-index: 1;
    font-family: var(--font-serif);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
}
.divider { height: 1px; background: var(--line); margin: 1rem 0; }
.divider--soft { background: var(--line-soft); }

/* Vertical rule between inline facts. */
.vr { width: 1px; align-self: stretch; background: var(--line); margin: 0 .3rem; }

/* Scrollable region with a soft fade at the bottom. */
.scroll-y { overflow-y: auto; }
.scroll-y--md { max-height: 340px; }
.scroll-y--lg { max-height: 520px; }

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    padding: .1rem .34rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r-xs);
    font-size: .74rem;
    font-weight: 600;
    color: var(--ink-400);
}

.copy-btn:hover { background: var(--surface-3); color: var(--navy-700); border-color: var(--line); }
.copy-btn.is-copied { color: var(--ok); }

/* ==========================================================================
   26  Theme: colour, depth and card treatment

   A layer over the structural rules above. Everything here is presentation.

   The house style is "blueprint precision": tonal layers and 1px lines do the
   separating, ambient shadow appears only where something lifts (hover, menus,
   modals), and colour is carried by the component rather than painted onto the
   page. Navy is structure, Royal Blue is interaction, Gold is prestige.

   It sits before the responsive and print rules so both still have the last
   word.
   ========================================================================== */

/* -------------------------------------------------------------- surfaces */

body {
    background: var(--paper);
    background-attachment: fixed;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-600);
    letter-spacing: 0;
}

/* ------------------------------------------------------------ typography */

h1, h2, h3, h4, h5, h6 {
    color: var(--navy-900);
    font-weight: 700;
    letter-spacing: -.02em;
}

h1 { font-size: 1.75rem; line-height: 1.22; }
h2 { font-size: 1.3rem;  line-height: 1.3; }
h3 { font-size: 1.06rem; line-height: 1.35; font-weight: 600; }
h4 { font-size: .95rem;  line-height: 1.4;  font-weight: 600; }

.lede { font-size: 1rem; color: var(--ink-500); line-height: 1.62; }

.eyebrow,
.fact__label,
.stat__label,
.nav-group__label,
.dropdown__label,
.search-results__group {
    font-size: .715rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* A section heading stands on the page under a short institutional rule. */
.section-title {
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--navy-900);
}

.section-title::after {
    width: 38px;
    height: 2px;
    border-radius: var(--r-pill);
    background: var(--gold-600);
}

.reference { letter-spacing: .01em; color: var(--navy-700); }

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

.card {
    /* A column, so that where cards sit side by side in a grid the footer
       lands on the floor of the card rather than halfway up it. */
    display: flex;
    flex-direction: column;
    border-radius: var(--r-xl);
    border-color: var(--line);
    background: var(--surface);
    box-shadow: none;
    transition: box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.card > .card__body { flex: 1 1 auto; }
.card > .table-wrap { flex: 1 1 auto; }

/* Level 2: only what can be acted on lifts under the pointer. */
a.card:hover,
.card--interactive:hover {
    border-color: var(--navy-300);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.card__head {
    padding: 1.05rem 1.25rem;
    background: transparent;
    border-bottom-color: var(--line);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.card__head h2,
.card__head h3 {
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--navy-900);
}

.card__head-note { font-size: .82rem; color: var(--ink-500); }

.card__body { padding: 1.25rem; }
.card__body--tight { padding: .85rem 1rem; }
.card__body--flush { padding: 0; }

.card__foot {
    background: var(--surface-3);
    border-top-color: var(--line);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
    padding: .85rem 1.25rem;
}

.card--tint { background: var(--surface-3); }
.card--flush { border-radius: var(--r-xl); }

/* The office's own pages carry the navy-and-gold rule across the top. */
.card--crested::before {
    height: 3px;
    background: linear-gradient(90deg, var(--navy-800) 0%, var(--navy-700) 62%,
                var(--gold-600) 62%, var(--gold-300) 100%);
}

/* ------------------------------------------------------------- page head */

/* The page opens on its title, not on another box: display type, a line of
   context beneath it, and the actions kept to the right. */
.page-head {
    position: static;
    overflow: visible;
    padding: 0;
    margin-bottom: 1.75rem;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    align-items: flex-end;
}

.page-head::before { display: none; }

.page-head h1 {
    font-size: 2rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--navy-900);
    margin-bottom: .35rem;
}

.page-head__meta { color: var(--ink-500); font-size: .95rem; }

.breadcrumbs { font-size: .8rem; }

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

.page { padding: 2rem 2rem 4rem; }

.grid--dash,
.grid--sidebar-right,
.grid--sidebar-left { align-items: start; }

.grid { gap: 1.5rem; }
.stack { gap: 1.5rem; }
.stack--tight { gap: .75rem; }

/* A list row is "text on the left, actions on the right". The text carries
   min-width: 0 and wraps inside itself, so the row must not break the pair
   apart the moment the text is long — the buttons stay on the right. */
.row--between:has(> .flex-1) { flex-wrap: nowrap; }
.row--between > .row.flex-none { flex-wrap: nowrap; }

/* ------------------------------------------------------------------ stats */

.stat-row { gap: 1.5rem; }

.stat {
    padding: 1.25rem 1.35rem 1.3rem;
    border-radius: var(--r-xl);
    border-color: var(--line);
    background: var(--surface);
    box-shadow: none;
}

/* No rail, no wash: the tile is a clean white surface and the accent lives in
   the icon chip, exactly as the follow-up cards do. */
.stat::before,
.stat::after { display: none; }

a.stat:hover {
    border-color: var(--navy-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat__label {
    gap: .55rem;
    margin-bottom: .65rem;
    color: var(--ink-500);
    font-size: .715rem;
    letter-spacing: .05em;
}

.stat__label svg.icon {
    width: 2rem;
    height: 2rem;
    padding: .45rem;
    border-radius: var(--r);
    color: var(--stat-accent);
    background: color-mix(in srgb, var(--stat-accent) 10%, #FFFFFF);
    box-shadow: none;
}

.stat--warn   { --stat-accent: var(--warn); }
.stat--ok     { --stat-accent: var(--ok); }
.stat--danger { --stat-accent: var(--danger); }
.stat--info   { --stat-accent: var(--info); }
.stat--gold   { --stat-accent: var(--gold-700); }
.stat--muted  { --stat-accent: var(--ink-400); }
.stat { --stat-accent: var(--navy-700); }

/* The views set these as spans, so they are made block here rather than in a
   hundred templates: label, figure and note read down the tile, never across. */
.stat__value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--navy-900);
}

.stat__value small { display: inline; }
.stat__note { display: block; margin-top: .4rem; font-size: .8rem; color: var(--ink-500); }

/* --------------------------------------------------------------- sidebar */

.sidebar {
    background: var(--navy-800);
    background-image: none;
    border-right: 1px solid rgba(255, 255, 255, .06);
    color: #94A6C2;
}

.sidebar__brand {
    padding: 1.35rem 1.5rem 1.4rem;
    gap: .85rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.sidebar__brand::after { display: none; }

.sidebar .brandmark {
    width: 40px;
    height: 40px;
    border-radius: var(--r);
    background: #fff;
    color: var(--navy-800);
    font-family: var(--font-ui);
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: .01em;
    padding: 3px;
}

.sidebar__brand-text .name {
    font-family: var(--font-ui);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.01em;
    text-transform: none;
    color: #fff;
}

.sidebar__brand-text .office {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: #8CA0BF;
}

/* The one action the office reaches for most, given the top of the menu. */
.sidebar__action { padding: 1.25rem 1.25rem .35rem; }

.sidebar__action .btn {
    width: 100%;
    min-height: 44px;
    background: var(--navy-700);
    border-color: var(--navy-700);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(24, 46, 110, .35);
}

.sidebar__action .btn:hover { background: #1963C6; border-color: #1963C6; }

.sidebar__nav { padding: .85rem .9rem 1.5rem; }

.nav-group + .nav-group { margin-top: 1.4rem; }

.nav-group__label {
    padding: 0 .65rem .45rem;
    font-size: .655rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: #6981A6;
}

.nav-item {
    padding: .68rem .75rem;
    margin-bottom: 2px;
    border-radius: var(--r);
    color: #B8C7DD;
    font-size: .9rem;
    font-weight: 500;
    box-shadow: none;
}

.nav-item svg.icon { width: 1.15rem; height: 1.15rem; color: #8CA0BF; }

.nav-item:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.nav-item:hover svg.icon { color: #DCE8FA; }

/* Active navigation is a solid Royal Blue tab — the same language as the
   primary action, so "where I am" and "what I can do" read as one system. */
.nav-item.is-active {
    background: var(--navy-700);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(24, 46, 110, .28);
}

.nav-item.is-active svg.icon { color: #fff; }
.nav-item.is-active::before { display: none; }

.nav-item__count {
    background: rgba(255, 255, 255, .14);
    color: #E3EBF6;
    font-size: .7rem;
    font-weight: 700;
    height: 1.3rem;
    min-width: 1.4rem;
}

.nav-item.is-active .nav-item__count { background: rgba(255, 255, 255, .22); color: #fff; }

.nav-item__count--alert { background: var(--gold-600); color: #241C08; }

.sidebar__foot {
    padding: 1rem 1.4rem 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .72rem;
    color: #6981A6;
}

.sidebar__foot a { color: #A9BEDA; font-weight: 500; }

/* ---------------------------------------------------------------- top bar */

.topbar {
    padding: 0 2rem;
    gap: 1rem;
    background: var(--surface);
    backdrop-filter: none;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
}

.topbar__context .title {
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--navy-900);
}

.topbar__context .date { font-size: .78rem; color: var(--ink-500); }

.topbar__toggle { border-radius: var(--r); border-color: var(--line); }

.global-search input {
    height: 40px;
    border-radius: var(--r);
    background: var(--surface-3);
    border-color: var(--line);
    font-size: .875rem;
}

.global-search input:focus {
    background: #fff;
    border-color: var(--navy-700);
    box-shadow: 0 0 0 4px var(--info-bg);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--r-pill);
    color: var(--ink-500);
}

.icon-btn:hover { background: var(--surface-3); color: var(--navy-800); }
.icon-btn.is-active { background: var(--info-bg); color: var(--navy-700); }

.user-chip { border-radius: var(--r-pill); padding: .25rem .7rem .25rem .3rem; }
.user-chip:hover { background: var(--surface-3); }
.user-chip__name { font-size: .84rem; font-weight: 600; }
.user-chip__role { font-size: .72rem; color: var(--ink-500); }

.avatar { background: var(--info-bg); color: var(--navy-700); font-weight: 700; }
.avatar--solid { background: var(--navy-800); color: #fff; }
.avatar--gold { background: var(--gold-100); color: var(--gold-800); }

.search-results { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: .4rem; }
.search-result { border-radius: var(--r); }
.search-result:hover,
.search-result.is-highlighted { background: var(--info-bg); }

/* ------------------------------------------------------- controls, forms */

.btn {
    min-height: 40px;
    padding: 0 1.05rem;
    border-radius: var(--r);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: none;
}

.btn--sm { min-height: 34px; padding: 0 .75rem; font-size: .8rem; border-radius: var(--r); }
.btn--lg { min-height: 48px; padding: 0 1.6rem; font-size: .95rem; }
.btn--icon { width: 40px; border-radius: var(--r); }
.btn--icon.btn--sm { width: 34px; }

/* Primary: solid Deep Navy. Flat — the authority is in the colour. */
.btn--primary {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
    box-shadow: 0 1px 2px rgba(30, 58, 138, .1);
}

.btn--primary:hover { background: #19337A; border-color: #19337A; }

/* Secondary: a Royal Blue ghost. */
.btn--secondary {
    background: var(--surface);
    border-color: var(--navy-700);
    color: var(--navy-700);
}

.btn--secondary:hover { background: var(--info-bg); border-color: var(--navy-700); color: var(--navy-700); }

/* Tertiary: text only, for the low-priority action in a cluster. */
.btn--ghost { color: var(--ink-500); }
.btn--ghost:hover { background: var(--surface-3); color: var(--navy-800); }

.btn--gold { background: var(--gold-600); border-color: var(--gold-600); color: #241C08; }
.btn--gold:hover { background: var(--gold-700); border-color: var(--gold-700); color: #fff; }

.btn-group { border-radius: var(--r); border-color: var(--line-strong); }

.input,
.select,
.textarea {
    min-height: 40px;
    padding: .55rem .8rem;
    border-radius: var(--r);
    border-color: var(--line);
    font-size: .9rem;
}

.input:hover:not(:disabled),
.select:hover:not(:disabled),
.textarea:hover:not(:disabled) { border-color: var(--line-strong); }

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--navy-700);
    box-shadow: 0 0 0 4px var(--info-bg);
}

.is-invalid .input:focus,
.input.is-invalid:focus { box-shadow: 0 0 0 4px var(--danger-bg); }

.field { margin-bottom: 1.25rem; }

.field__label {
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink-800);
    margin-bottom: .4rem;
}

.field__hint { font-size: .8rem; color: var(--ink-500); }

.input-group__affix { border-color: var(--line); border-radius: 0 var(--r) var(--r) 0; }
.input-group__affix--lead { border-radius: var(--r) 0 0 var(--r); border-color: var(--line); }
.input-group .input:not(:last-child) { border-radius: var(--r) 0 0 var(--r); }
.input-group .input:not(:first-child) { border-radius: 0 var(--r) var(--r) 0; }

.check input[type="checkbox"],
.check input[type="radio"] { accent-color: var(--navy-700); }

.choice { border-radius: var(--r-lg); border-color: var(--line); padding: .85rem 1rem; }
.choice:hover { border-color: var(--navy-300); background: var(--navy-50); }
.choice__icon { border-radius: var(--r); background: var(--surface-3); }

.choice.is-selected {
    border-color: var(--navy-700);
    background: var(--info-bg);
    box-shadow: 0 0 0 1px var(--navy-700);
}

.choice.is-selected .choice__icon { background: var(--navy-700); color: #fff; }

/* Title-over-hint pairs are written as sibling spans in the templates; they
   are stacked here rather than wrapped in extra markup on every page. */
.choice__title,
.choice__hint,
.filedrop__title,
.filedrop__hint,
.notification__title,
.notification__text,
.notification__time { display: block; }

.switch input:checked + .switch__track { background: var(--navy-700); }

.filedrop { border-radius: var(--r-lg); background: var(--surface-3); border-color: var(--line-strong); }
.filedrop:hover,
.filedrop.is-dragover { border-color: var(--navy-700); background: var(--info-bg); }

.file-item { border-radius: var(--r); }
.fieldset { border-radius: var(--r-lg); padding: 1.15rem 1.25rem; }

/* ----------------------------------------------------- badges and status */

/* Status reads as a soft-filled pill: the dot keeps it legible in print and
   for anyone who cannot separate the hues. */
.status {
    padding: .25rem .65rem .25rem .55rem;
    background: var(--neutral-bg);
    border-radius: var(--r-pill);
    font-size: .775rem;
    font-weight: 600;
    color: var(--neutral);
}

.status::before { box-shadow: none; width: 6px; height: 6px; }

.status--pending        { background: var(--warn-bg);    color: var(--warn); }
.status--info_requested { background: var(--violet-bg);  color: var(--violet); }
.status--confirmed      { background: var(--ok-bg);      color: var(--ok); }
.status--rescheduled    { background: var(--info-bg);    color: var(--info); }
.status--checked_in     { background: var(--info-bg);    color: var(--info); }
.status--completed      { background: var(--neutral-bg); color: var(--ink-500); }
.status--declined       { background: var(--danger-bg);  color: var(--danger); }
.status--cancelled      { background: var(--danger-bg);  color: var(--danger); }
.status--no_show        { background: var(--warn-bg);    color: #92400E; }
.status--overdue        { background: var(--danger-bg);  color: var(--danger); }
.status--in_progress    { background: var(--info-bg);    color: var(--info); }
.status--waiting        { background: var(--warn-bg);    color: var(--warn); }
.status--notified       { background: var(--teal-bg);    color: var(--teal); }
.status--converted      { background: var(--ok-bg);      color: var(--ok); }
.status--active         { background: var(--ok-bg);      color: var(--ok); }
.status--suspended      { background: var(--danger-bg);  color: var(--danger); }
.status--invited        { background: var(--warn-bg);    color: var(--warn); }

.status--rescheduled::before { background: var(--info); }
.status--cancelled::before   { background: var(--danger); }

.badge {
    padding: .2rem .6rem;
    border-radius: var(--r-pill);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: 0;
}

.badge--solid { background: var(--navy-800); border-color: var(--navy-800); }
.badge--navy  { background: var(--info-bg); color: var(--navy-700); border-color: var(--info-line); }
.badge--gold  { background: var(--gold-100); color: var(--gold-800); border-color: var(--gold-200); }

.chip { border-radius: var(--r-pill); background: var(--surface-3); border-color: var(--line); }

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

/* Clean-room tables: no vertical rules, an uppercase label row, and hairlines
   between records. */
.table thead th {
    padding: .8rem 1.1rem;
    background: var(--surface-3);
    border-bottom-color: var(--line);
    color: var(--ink-500);
    font-size: .715rem;
    font-weight: 600;
    letter-spacing: .05em;
}

.table thead th a:hover { color: var(--navy-700); }

.table tbody td {
    padding: .95rem 1.1rem;
    border-bottom-color: var(--line);
    font-size: .875rem;
    color: var(--ink-600);
}

.table tbody tr:hover { background: var(--surface-3); }
.table tbody tr.is-selected { background: var(--info-bg); }
.table .cell-primary { color: var(--navy-900); font-weight: 600; }
.table a.cell-link { color: var(--navy-900); }
.table a.cell-link:hover { color: var(--navy-700); }
.table .cell-sub { color: var(--ink-500); font-size: .79rem; }

.person__name { color: var(--navy-900); }
.person__meta { color: var(--ink-500); }

.toolbar {
    padding: .85rem 1.1rem;
    background: var(--surface);
    border-bottom-color: var(--line);
}

.toolbar .input,
.toolbar .select { min-height: 38px; font-size: .85rem; border-radius: var(--r); }

.filter-summary { background: var(--info-bg); border-bottom-color: var(--line); }

.pagination {
    padding: .95rem 1.1rem;
    background: var(--surface);
    border-top-color: var(--line);
}

.pagination__info { color: var(--ink-500); font-size: .84rem; }

.page-link {
    min-width: 36px;
    height: 36px;
    border-radius: var(--r);
    border-color: var(--line-strong);
    color: var(--ink-600);
}

.page-link:hover { background: var(--info-bg); border-color: var(--navy-300); color: var(--navy-700); }
.page-link.is-active { background: var(--navy-800); border-color: var(--navy-800); }

/* ------------------------------------------------- tabs and segmentation */

.tabs { gap: .35rem; margin-bottom: 1.5rem; }

.tab {
    padding: .7rem .95rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink-500);
}

.tab:hover { color: var(--navy-800); }

.tab.is-active {
    color: var(--navy-700);
    font-weight: 700;
    border-bottom-color: var(--navy-700);
}

.tab.is-active .tab__count { background: var(--info-bg); color: var(--navy-700); }

.segmented { border-radius: var(--r); background: var(--surface-3); border-color: var(--line); }
.segmented__item { border-radius: var(--r-sm); font-size: .83rem; padding: .38rem .8rem; }
.segmented__item.is-active { background: var(--surface); color: var(--navy-800); box-shadow: var(--shadow-xs); }

/* -------------------------------------------------- menus, modals, notes */

.dropdown__panel { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: .4rem; }
.menu-item { border-radius: var(--r); padding: .58rem .7rem; font-size: .875rem; }
.menu-item:hover { background: var(--info-bg); color: var(--navy-700); }
.menu-item:hover svg.icon { color: var(--navy-700); }

.notification { border-radius: var(--r); }
.notification.is-unread { background: var(--info-bg); }
.notification.is-unread::after { background: var(--navy-700); }
.notification__icon { border-radius: var(--r); }

.modal { border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.modal-root { background: rgba(24, 46, 110, .45); }
.modal__head { padding: 1.25rem 1.4rem 1rem; }
.modal__title { font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy-900); }
.modal__body { padding: 1.4rem; }
.modal__foot { padding: 1rem 1.4rem; background: var(--surface-3); }
.modal__close { border-radius: var(--r); }

.drawer { box-shadow: var(--shadow-lg); }
.drawer__foot { background: var(--surface-3); }

.toast { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: .85rem 1rem; }
.notice { border-radius: var(--r-lg); padding: .95rem 1.1rem; font-size: .875rem; }
.notice--info { background: var(--info-bg); border-color: var(--info-line); }

/* ------------------------------------------------ schedule and calendar */

/* Same again for the schedule: the rail entries are spans in the templates. */
.schedule__card { display: block; border-radius: var(--r-lg); border-color: var(--line); }
.schedule__node { border-color: var(--navy-700); }
a.schedule__item:hover .schedule__card { border-color: var(--navy-300); box-shadow: var(--shadow-md); }
.schedule__title { display: block; color: var(--navy-900); }
.schedule__meta { display: flex; color: var(--ink-500); }
.schedule__meta + .schedule__meta { margin-top: .15rem; }

.calendar { border-radius: var(--r-xl); border-color: var(--line); overflow: hidden; }
.calendar__toolbar { background: var(--surface); border-bottom-color: var(--line); padding: .95rem 1.1rem; }
.calendar__period { font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy-900); }
.cal-filters { padding: .7rem 1.1rem; }
.cal-chip { border-radius: var(--r-pill); }
.cal-month__dows { background: var(--surface-3); border-bottom-color: var(--line); }
.cal-month__dow { font-size: .7rem; letter-spacing: .05em; font-weight: 600; }
.cal-day:hover { background: var(--surface-3); }
.cal-day.is-today,
.cal-day.is-today:hover { background: var(--info-bg); box-shadow: inset 0 0 0 1.5px var(--navy-300); }
.cal-day.is-today .cal-day__num { background: var(--navy-700); }
.cal-day.is-dragover { background: var(--info-bg); box-shadow: inset 0 0 0 2px var(--navy-700); }
.cal-event { border-radius: var(--r-sm); }
.cal-time__dayhead.is-today .num { background: var(--navy-700); }
/* background-COLOR, not the shorthand: the shorthand would wipe out the
   half-hour rule drawn into the cell as a gradient. */
.cal-time__cell:hover { background-color: var(--surface-3); }
.cal-time__cell.is-dragover { background-color: var(--info-bg); box-shadow: inset 0 0 0 2px var(--navy-700); }
.cal-slot-event { border-radius: var(--r-sm); }
.cal-agenda__date { background: var(--surface-3); }
.cal-agenda__date .num { color: var(--navy-900); font-weight: 700; letter-spacing: -.02em; }
.cal-row { border-radius: var(--r-lg); }

.slot { border-radius: var(--r); border-color: var(--line-strong); min-height: 40px; }
.slot:hover:not(:disabled) { border-color: var(--navy-700); background: var(--info-bg); color: var(--navy-700); }
.slot.is-selected { background: var(--navy-800); border-color: var(--navy-800); }

.mini-day { border-radius: var(--r); }
.mini-day:hover:not(:disabled) { background: var(--info-bg); border-color: var(--navy-300); }
.mini-day.is-selected { background: var(--navy-700); border-color: var(--navy-700); }
.mini-day.is-today { border-color: var(--gold-600); }

/* The bars are written as spans in the templates, so they are given a box
   here — an inline span ignores the height that makes a bar a bar. */
.meter,
.dist__track { display: block; }

.meter__fill,
.dist__fill,
.stackbar__seg { display: block; }

.stackbar { display: flex; }
.meter__fill { background: var(--navy-700); }
.dist__fill { background: var(--navy-700); }

/* --------------------------------------------------------------- steppers */

/* Completed steps take Royal Blue, the step in hand takes Navy, and what is
   still to come is a light grey stroke. */
.step::before,
.step::after { top: 17px; height: 2px; background: var(--line); }

.step.is-done::before,
.step.is-done::after,
.step.is-current::before { background: var(--navy-700); }

.step__marker {
    width: 36px;
    height: 36px;
    border-width: 2px;
    border-color: var(--line-strong);
    font-size: .85rem;
    margin-bottom: .55rem;
}

.step__label { font-size: .82rem; font-weight: 600; }

.step.is-current .step__marker {
    background: var(--navy-800);
    border-color: var(--navy-800);
    box-shadow: 0 0 0 4px var(--info-bg);
}

.step.is-current .step__label { color: var(--navy-800); }

.step.is-done .step__marker { background: var(--navy-700); border-color: var(--navy-700); }
.step.is-done .step__label { color: var(--ink-600); }

.tracker__step.is-current::before {
    background: var(--navy-800);
    border-color: var(--navy-800);
    box-shadow: 0 0 0 4px var(--info-bg);
}

/* --------------------------------------------------------- empty states */

.empty__icon {
    background: var(--info-bg);
    border-color: var(--info-line);
    color: var(--navy-700);
    box-shadow: none;
}

.empty__icon::after { border-color: var(--line); }
.empty__title { font-size: 1.06rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy-900); }
.empty__text { color: var(--ink-500); }

.skeleton { border-radius: var(--r-sm); }
.route-progress { background: var(--navy-700); height: 3px; }

/* ----------------------------------------------------------- public portal */

/* The portal masthead is white — the University's mark against paper, with the
   institutional rule beneath it — so the front door reads as the University's
   own site rather than as the back-office application. */
.portal__masthead {
    background-color: var(--surface);
    background-image: none;
    color: var(--navy-900);
    border-bottom: 1px solid var(--line);
}

.portal__masthead::after { display: none; }

.portal__masthead-inner { padding: 1rem 2rem; max-width: 1280px; }

.portal__identity .brandmark {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--r-lg);
    background: var(--navy-800);
    color: #fff;
    box-shadow: none;
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: .9rem;
}

.portal__identity .brandmark img { padding: 5px; background: #fff; border-radius: var(--r-lg); }

.portal__identity .name {
    font-family: var(--font-ui);
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: .01em;
    color: var(--navy-900);
}

.portal__identity .office {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-500);
}

.portal__nav a,
.portal__signin {
    padding: .55rem .85rem;
    border-radius: var(--r);
    color: var(--ink-600);
    font-size: .9rem;
    font-weight: 500;
}

.portal__nav a:hover { background: var(--surface-3); color: var(--navy-800); }
.portal__nav a.is-active { background: var(--info-bg); color: var(--navy-700); font-weight: 600; }

/* The staff door is a bordered button, kept apart from the portal's own links. */
.portal__signin {
    margin-left: .5rem;
    border: 1px solid var(--line-strong);
    color: var(--navy-800);
    font-weight: 600;
}

.portal__signin:hover { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

.portal__inner { max-width: 1280px; padding: 2.5rem 2rem 4rem; }

.portal-head {
    border-radius: var(--r-xl);
    background: var(--surface);
    border-color: var(--line);
    box-shadow: none;
    padding: 2.25rem 2.25rem 2.35rem;
}

.portal-head::before {
    height: 3px;
    background: linear-gradient(90deg, var(--navy-800) 0%, var(--navy-700) 58%,
                var(--gold-600) 58%, var(--gold-300) 100%);
}

.portal-head h1 {
    font-family: var(--font-ui);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--navy-900);
}

/* Hero — the portal's front door: a deep navy field, the request in display
   type with the office picked out in gold. */
.hero {
    border-radius: var(--r-xl);
    padding: 3.75rem 3.25rem 4rem;
    background:
        radial-gradient(120% 140% at 82% 4%, rgba(30, 92, 181, .40) 0%, rgba(30, 58, 138, 0) 62%),
        linear-gradient(150deg, #2747A3 0%, #1E3A8A 52%, #19337A 100%);
    box-shadow: var(--shadow-lg);
    color: #B8C7DD;
}

.hero::before { opacity: .5; }

.hero__eyebrow {
    background: rgba(201, 162, 39, .12);
    border-color: rgba(201, 162, 39, .38);
    color: var(--gold-300);
    font-size: .7rem;
    letter-spacing: .09em;
    padding: .38rem .9rem .38rem .7rem;
}

.hero h1 {
    font-family: var(--font-ui);
    font-size: clamp(2rem, 1.3rem + 2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: #fff;
}

.hero h1 .accent { color: var(--gold-600); }
.hero__rule { background: linear-gradient(90deg, var(--gold-600), rgba(201, 162, 39, .06)); }
.hero p { color: #AEC0DA; font-size: 1.02rem; }

.hero .btn--primary {
    background: var(--navy-700);
    border-color: var(--navy-700);
    color: #fff;
    box-shadow: 0 8px 20px -12px rgba(21, 87, 176, .9);
}

.hero .btn--primary:hover { background: #1963C6; border-color: #1963C6; }

.hero .btn--secondary {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .3);
    color: #EAF1FA;
}

.hero .btn--secondary:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); color: #fff; }

/* The hero carries a glass panel of the facts a visitor needs before they
   start: when the office can see them, and how much notice it needs. */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
    gap: 3rem;
    align-items: center;
}

.hero__text { max-width: 38rem; }
.hero h1 .accent { white-space: nowrap; }
.hero__aside { position: relative; z-index: 1; }

.hero__card {
    padding: 1.5rem 1.6rem 1.6rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--r-xl);
    backdrop-filter: blur(6px);
    box-shadow: 0 16px 40px -24px rgba(0, 0, 0, .8);
}

.hero__card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .9rem;
    margin-bottom: .35rem;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.hero__card-head strong {
    display: block;
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #fff;
}

.hero__card-head span {
    display: block;
    margin-top: .12rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #9DB2D2;
}

.hero__card-head svg.icon { color: var(--gold-600); flex: 0 0 auto; }

.hero__card-list { margin: 0; }

.hero__card-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.hero__card-list > div:last-child { border-bottom: 0; }
.hero__card-list dt { font-size: .875rem; color: #AEC0DA; margin: 0; }
.hero__card-list dd { margin: 0; font-size: .875rem; font-weight: 600; color: #fff; text-align: right; }
.hero__card-list > div.is-closed dt,
.hero__card-list > div.is-closed dd { color: #FDA29B; }

.hero__card-note {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin: 1rem 0 0;
    padding: .85rem .95rem;
    background: rgba(255, 255, 255, .06);
    border-radius: var(--r-lg);
    font-size: .8rem;
    line-height: 1.55;
    color: #AEC0DA;
}

.hero__card-note svg.icon { color: var(--navy-300); flex: 0 0 auto; margin-top: .16rem; }

/* With a panel in the right half, the portico would only crowd it. */
.hero:has(.hero__aside)::after { display: none; }

@media (max-width: 1080px) {
    .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .hero__text { max-width: none; }
}

.portal__nav a, .portal__signin { display: inline-flex; align-items: center; gap: .4rem; }
.portal__nav a svg.icon, .portal__signin svg.icon { width: 1rem; height: 1rem; }

.infostrip { border-radius: var(--r-xl); box-shadow: none; }
.infostrip__item { padding: 1.5rem 1.4rem; }
.infostrip__item:hover { background: var(--surface-3); }

.infostrip__icon {
    border-radius: var(--r-lg);
    background: var(--info-bg);
    border-color: var(--info-line);
    color: var(--navy-700);
    box-shadow: none;
}

.info-line { border-bottom-color: var(--line); }
.info-line svg.icon { color: var(--navy-700); }

/* How it works — four numbered steps, the numeral ghosted into the corner. */
.guide {
    border-radius: var(--r-xl);
    border-color: var(--line);
    box-shadow: none;
    padding: 1.75rem 1.5rem 1.6rem;
}

.guide:hover { border-color: var(--navy-300); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.guide::before { display: none; }

.guide__step {
    width: 44px;
    height: 44px;
    margin-bottom: 1.1rem;
    background: var(--navy-800);
    border-radius: var(--r-lg);
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: none;
}

.guide__step::after { display: none; }

/* The ghosted numeral that carries the sequence across the four cards. */
.guide__ghost {
    position: absolute;
    right: .5rem;
    top: -.75rem;
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.05em;
    color: var(--surface-3);
    pointer-events: none;
    user-select: none;
}

.guide h3 { font-size: 1.06rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy-900); }
.guide p { color: var(--ink-500); font-size: .875rem; }

.portal__foot { background: var(--navy-800); color: #8CA0BF; padding: 2.5rem 2rem; }
.portal__foot-inner { max-width: 1280px; }
.portal__foot h4 { color: #fff; font-size: .78rem; letter-spacing: .07em; }
.portal__foot-base { max-width: 1280px; border-top-color: rgba(255, 255, 255, .1); }

.confirmation__reference {
    border-radius: var(--r-lg);
    background: var(--info-bg);
    border: 1px dashed var(--navy-300);
    color: var(--navy-700);
}

.qr-panel { border-radius: var(--r-lg); }

/* ------------------------------------------------------------ signing in */

/* The sign-in screen is designed in full in section 24; only the one-time
   code field needs the theme's shape and colour here. */
.code-input { border-radius: var(--r-lg); color: var(--navy-800); }
.code-input:focus { border-color: var(--navy-700); box-shadow: 0 0 0 4px var(--info-bg); }

.login-image-preview { border-radius: var(--r-lg); }

/* ----------------------------------------------------------- print sheets */

/* Anything meant to leave the building on paper — the visitor's pass, the
   Vice-Chancellor's briefing sheet — is laid out as a sheet: a letterhead, the
   document, a footer rule. On screen it sits on the desk; on paper it is the
   page itself, with no furniture of its own. */
.is-print-page { background: var(--paper); }

.sheet {
    max-width: 860px;
    margin: 2rem auto 3rem;
    padding: 2.25rem 2.5rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-md);
}

.sheet__letterhead {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.1rem;
    border-bottom: 2px solid var(--navy-800);
    position: relative;
}

/* The gold half of the institutional rule. */
.sheet__letterhead::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 96px;
    height: 2px;
    background: var(--gold-600);
}

.sheet__letterhead .brandmark {
    width: 46px;
    height: 46px;
    border-radius: var(--r);
    background: var(--navy-800);
    color: #fff;
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: .82rem;
    padding: 0;
}

.sheet__letterhead .brandmark img { padding: 4px; background: #fff; border-radius: var(--r); }

.sheet__identity { min-width: 0; flex: 1 1 auto; }

.sheet__identity .name {
    display: block;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--navy-900);
    line-height: 1.2;
}

.sheet__identity .office {
    display: block;
    margin-top: .1rem;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-500);
}

.sheet__kind {
    flex: 0 0 auto;
    align-self: flex-start;
    padding: .3rem .7rem;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-500);
    white-space: nowrap;
}

.sheet__body { padding-top: 1.5rem; }

.sheet__foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
    padding-top: .85rem;
    border-top: 1px solid var(--line);
    font-size: .72rem;
    color: var(--ink-400);
}

@media (max-width: 780px) {
    .sheet { margin: 1rem; padding: 1.35rem 1.15rem 1.15rem; }
    .sheet__letterhead { flex-wrap: wrap; gap: .75rem; }
    .sheet__kind { order: 3; width: 100%; text-align: center; }
}

/* ------------------------------------------------------- appointment pass */

/* The sheet a visitor brings with them: a navy header carrying the reference,
   the essentials beside the code, then the full record beneath. */
.pass { overflow: hidden; }

.pass__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.75rem 2rem;
    background: var(--navy-800);
    color: #AEC0DA;
}

.pass__title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #fff;
    margin-bottom: .3rem;
}

.pass__sub {
    margin: 0;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #9DB2D2;
}

.pass__dot { padding: 0 .3rem; color: var(--gold-600); }

.pass__ref { text-align: right; }

.pass__ref-label {
    display: block;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #9DB2D2;
    margin-bottom: .2rem;
}

.pass__ref-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: #fff;
}

/* The record on the left, the code on the right — the shape the visitor and
   the reception desk both expect. */
.pass__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 2rem;
}

.pass__facts { min-width: 0; }

/* Status, date and time across the full width — three columns, never
   two-and-a-stray — with a rule under them before the record begins. */
.pass__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    padding-bottom: 1.35rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.pass__summary .fact__value { font-size: 1rem; }

/* A code given a box of its own fills that box: the wrapper sets the size,
   the symbol follows it, so it can never spill over the panel's corners. */
.qr-panel > div > svg,
.qr-panel > div > img { width: 100%; height: 100%; display: block; }
.pass__facts .detail-list { grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); }
.pass__qr { margin: 0; }

/* The instruction the visitor most needs, given the width of the sheet. */
.pass .notice { margin-top: 1.25rem; }

@media (max-width: 720px) {
    .pass__body { grid-template-columns: minmax(0, 1fr); }
    .pass__qr { justify-self: center; }
}

@media (max-width: 560px) {
    .pass__facts .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pass__qr figcaption {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-500);
    max-width: none;
}

@media (max-width: 780px) {
    .pass__head { padding: 1.35rem 1.25rem; }
    .pass__title { font-size: 1.3rem; }
    .pass__ref { text-align: left; }
    .pass__ref-value { font-size: 1.05rem; }
}

/* ---------------------------------------------------------- error pages */

/* One centred panel, the status code set large: the reader should see what
   happened before they read a word. */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2.5rem 0;
}

.error-page__card { width: 100%; max-width: 620px; }
.error-page__card .card__body { padding: 3rem 2.5rem 2.75rem; text-align: center; }

.error-page__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 1.75rem;
}

.error-page__code {
    margin: 0;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--navy-800);
}

.error-page__title {
    margin: .85rem 0 .75rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.error-page__lede { max-width: 46ch; margin: 0 auto; }
.error-page__help { max-width: 52ch; margin: .75rem auto 0; }

.error-page__reference {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--surface-3);
    border-radius: var(--r-lg);
}

.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .65rem;
    margin-top: 2rem;
}

.error-page__debug { margin-top: 2rem; text-align: left; }

@media (max-width: 780px) {
    .error-page { min-height: 0; padding: 1rem 0 2rem; }
    .error-page__card .card__body { padding: 2rem 1.25rem; }
    .error-page__code { font-size: 2.75rem; }
    .error-page__title { font-size: 1.3rem; }
    .error-page__actions .btn { width: 100%; }
}

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

/* On a handset the primary destinations move to the foot of the screen, where
   a thumb can reach them; the full menu stays available behind "More". */
.bottomnav { display: none; }

.bottomnav__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    padding: .3rem .2rem;
    border: 0;
    background: transparent;
    color: var(--ink-500);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .01em;
    border-radius: var(--r);
    min-width: 0;
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.bottomnav__item svg.icon { width: 1.3rem; height: 1.3rem; }
.bottomnav__item:hover { text-decoration: none; color: var(--navy-800); }

.bottomnav__item.is-active { color: var(--navy-700); }

.bottomnav__item.is-active svg.icon {
    background: var(--info-bg);
    border-radius: var(--r-pill);
    padding: .2rem .85rem;
    width: 2.8rem;
    height: 1.7rem;
}

.bottomnav__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottomnav__count {
    position: absolute;
    top: .3rem;
    right: 50%;
    margin-right: -1.35rem;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    background: var(--danger);
    color: #fff;
    border-radius: var(--r-pill);
    font-size: .6rem;
    font-weight: 700;
    line-height: 1;
}

/* ==========================================================================
   27  Responsive
   ========================================================================== */

@media (max-width: 1280px) {
    .grid--sidebar-right,
    .grid--dash { grid-template-columns: minmax(0, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .global-search { width: 210px; }
    .page { padding: 1.75rem 1.5rem 3.5rem; }
    .topbar { padding: 0 1.5rem; }
    .portal__inner,
    .portal__masthead-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* On a tablet the sidebar keeps its presence but gives the schedule its width
   back: the menu condenses to its icons, and the label follows the pointer as
   a tooltip. */
@media (min-width: 961px) and (max-width: 1180px) {
    :root { --sidebar-w: 84px; }

    .sidebar__brand { justify-content: center; padding: 1.35rem .75rem; }
    .sidebar__brand-text { display: none; }
    .sidebar__action { padding: 1rem .85rem .35rem; }
    .sidebar__action .btn span { display: none; }
    .sidebar__action .btn { padding: 0; }
    .sidebar__nav { padding: .85rem .85rem 1.5rem; }
    .nav-group__label { display: none; }
    .nav-group + .nav-group {
        margin-top: .75rem;
        padding-top: .75rem;
        border-top: 1px solid rgba(255, 255, 255, .09);
    }

    .nav-item { justify-content: center; padding: .7rem 0; position: relative; }
    .nav-item > span:not(.nav-item__count) { display: none; }

    .nav-item__count {
        position: absolute;
        top: .25rem;
        right: .55rem;
        min-width: 1.05rem;
        height: 1.05rem;
        font-size: .62rem;
    }

    /* The label as a tooltip, so an icon-only rail is still readable. */
    .nav-item::after {
        content: attr(data-label);
        position: absolute;
        left: calc(100% + .55rem);
        top: 50%;
        transform: translateY(-50%);
        padding: .35rem .6rem;
        background: var(--navy-900);
        color: #fff;
        border-radius: var(--r);
        font-size: .78rem;
        font-weight: 500;
        white-space: nowrap;
        box-shadow: var(--shadow-md);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--t-fast) var(--ease);
        z-index: 60;
    }

    .nav-item:hover::after,
    .nav-item:focus-visible::after { opacity: 1; }

    /* No room for the colophon on a rail; the portal link keeps its icon. */
    .sidebar__foot {
        padding: .9rem .5rem 1.1rem;
        text-align: center;
        font-size: 0;
    }

    .sidebar__foot br { display: none; }
    .sidebar__foot a { font-size: 0; }
    .sidebar__foot a svg.icon { width: 1.15rem; height: 1.15rem; }
}

@media (max-width: 1080px) {
    .hero { padding: 2.4rem 1.9rem 2.6rem; }
    /* The portico would crowd the text at this width, so it steps back. */
    .hero::after { width: 46%; opacity: .4; }
    .grid--sidebar-left { grid-template-columns: minmax(0, 1fr); }
}

/* On a handset the crest stacks above the name, and the column takes the
   full width less its gutters. */
@media (max-width: 560px) {
    .auth__panel { padding: 2.5rem 1rem 1.5rem; }
    .auth__brand { flex-direction: column; gap: .8rem; margin-bottom: 2rem; text-align: center; }
    .auth__brand-rule { display: none; }
    .auth__brand-text { align-items: center; text-align: center; }
    .auth__wordmark { font-size: 1.35rem; }
    .auth__card { width: 100%; }
    .auth__row { flex-direction: column; align-items: flex-start; }
    .auth__card .btn--primary { width: 100%; }
}

@media (max-width: 960px) {
    /* The sidebar becomes an off-canvas drawer. */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-102%);
        transition: transform var(--t-slow) var(--ease);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.is-open { transform: none; }
    .topbar__toggle { display: grid; }
    .topbar { padding: 0 1rem; gap: .6rem; }
    .page { padding: 1.25rem 1rem calc(var(--bottomnav-h) + 2.25rem); }
    .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
    .global-search { display: none; }

    /* The primary destinations move to the foot of the screen. */
    .bottomnav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 36;
        display: flex;
        align-items: stretch;
        gap: .15rem;
        height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
        padding: .35rem .45rem calc(.35rem + env(safe-area-inset-bottom));
        background: var(--surface);
        border-top: 1px solid var(--line);
        box-shadow: 0 -2px 12px rgba(30, 58, 138, .05);
    }

    .bottomnav__item { position: relative; }
    .modal-root { padding: 0; place-items: end stretch; }

    .modal {
        max-width: none;
        border-radius: var(--r-lg) var(--r-lg) 0 0;
        transform: translateY(28px);
        max-height: 94vh;
        display: flex;
        flex-direction: column;
    }

    .modal__body { max-height: none; flex: 1 1 auto; }
    .cal-month__grid { grid-auto-rows: minmax(78px, auto); }
    .schedule { padding-left: 4.3rem; }
    .schedule::before { left: 3.7rem; }
    .schedule__time { left: -4.3rem; width: 3.3rem; font-size: .76rem; }
    .schedule__now span { left: -4.3rem; width: 3.3rem; }
}

@media (max-width: 780px) {
    body { font-size: 15px; }

    .page-head { flex-direction: column; align-items: stretch; margin-bottom: 1.35rem; }
    .page-head h1 { font-size: 1.5rem; }
    .page-head__meta { font-size: .9rem; }
    .page-head__actions { width: 100%; }

    /* Two to a row rather than one long row that runs off the screen. */
    .page-head__actions .btn {
        flex: 1 1 calc(50% - .3rem);
        min-width: calc(50% - .3rem);
        padding: 0 .7rem;
    }

    .page-head__actions .btn--icon { flex: 0 0 auto; min-width: 40px; }

    .grid, .stack { gap: 1rem; }
    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
    .stat { padding: 1rem; }
    .stat__value { font-size: 1.6rem; }
    .stat__label svg.icon { width: 1.75rem; height: 1.75rem; }
    .card__head, .card__body { padding: 1rem; }
    .card__foot { padding: .8rem 1rem; }
    .portal-head { padding: 1.6rem 1.35rem 1.7rem; }
    .portal__masthead-inner { padding: .8rem 1rem; }
    .portal__foot { padding: 2rem 1rem; }

    /* Tables become stacked cards: each cell carries its own label.
       This is a different layout, not a squeezed one. */
    .table--responsive thead { display: none; }

    .table--responsive tbody tr {
        display: block;
        padding: .8rem .85rem;
        margin-bottom: .6rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r);
        box-shadow: var(--shadow-xs);
    }

    .table--responsive tbody tr:hover { background: var(--surface); }

    .table--responsive tbody td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        padding: .3rem 0;
        border: 0;
        text-align: right;
    }

    .table--responsive tbody td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: .7rem;
        font-weight: 700;
        letter-spacing: .07em;
        text-transform: uppercase;
        color: var(--ink-400);
        text-align: left;
    }

    .table--responsive tbody td[data-label=""]::before,
    .table--responsive tbody td.is-stacked::before { display: none; }

    .table--responsive tbody td.is-stacked {
        display: block;
        text-align: left;
        padding-bottom: .5rem;
        margin-bottom: .35rem;
        border-bottom: 1px solid var(--line-soft);
    }

    .table--responsive tbody td.is-actions {
        justify-content: flex-start;
        padding-top: .6rem;
        margin-top: .35rem;
        border-top: 1px solid var(--line-soft);
        width: auto;
    }

    .table--responsive tbody td.is-actions::before { display: none; }
    .table--responsive .row-actions { opacity: 1; gap: .3rem; }
    .table--responsive tbody tr.is-flagged td:first-child,
    .table--responsive tbody tr.is-urgent td:first-child,
    .table--responsive tbody tr.is-private td:first-child { box-shadow: none; }
    .table--responsive tbody tr.is-flagged { border-left: 3px solid var(--warn); }
    .table--responsive tbody tr.is-urgent { border-left: 3px solid var(--danger); }
    .table--responsive tbody tr.is-private { border-left: 3px solid #2A2A33; }

    .detail-list { grid-template-columns: minmax(0, 1fr); }
    .detail-list dt { padding-bottom: .06rem; border-bottom: 0; }
    .detail-list dd { padding-top: 0; }
    .detail-list > :nth-last-child(2) { border-bottom: 0; }

    .field-row, .field-row--2, .field-row--3 { grid-template-columns: minmax(0, 1fr); }
    .stepper { gap: 0; }
    .step__label { font-size: 0; }
    .step__hint { display: none; }
    .step.is-current .step__label { font-size: .74rem; }
    .cal-agenda__day { grid-template-columns: minmax(0, 1fr); }
    .cal-agenda__date { border-right: 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: .5rem; }
    .cal-agenda__date .num { font-size: 1.1rem; }
    .toolbar { padding: .6rem .7rem; }
    .toolbar__search { max-width: none; }
    .pagination { justify-content: center; }
    .portal__inner { padding: 1.4rem 1rem 2.5rem; }
    .hero { padding: 1.9rem 1.3rem 2.1rem; }
    .hero h1 { font-size: 1.62rem; }
    .hero p { font-size: .94rem; }
    .hero__actions .btn { width: 100%; }
    .hero::after { display: none; }
    .toast-stack { left: .7rem; right: .7rem; bottom: .7rem; width: auto; }
    .confirmation__reference { font-size: 1.05rem; padding: .6rem 1rem; }
}

/* The portal masthead below the desk. The four labels stop fitting beside the
   University mark at about this width; before this they were shrunk until
   the wording wrapped inside each button and the row scrolled sideways under
   the thumb, which reads as the whole page sliding about.

   Instead the mark and the staff door keep the first line, and the portal's
   own links take a line of their own beneath. */
@media (max-width: 960px) {
    .portal__masthead-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "identity signin"
            "nav      nav";
        align-items: center;
        gap: .7rem .6rem;
        padding: .85rem 1.25rem;
    }

    .portal__identity { grid-area: identity; }

    .portal__signin {
        grid-area: signin;
        justify-self: end;
        margin-left: 0;
    }

    .portal__nav {
        grid-area: nav;
        margin-left: 0;
        flex-wrap: wrap;
        gap: .25rem;
    }
}

/* On a handset even the long labels will not sit on one line, so each link
   falls back to its short label and the three share the width equally. */
@media (max-width: 480px) {
    .portal__masthead-inner { padding: .8rem 1rem; gap: .75rem .5rem; }

    .portal__nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .35rem;
    }

    .portal__nav a {
        justify-content: center;
        padding: .5rem .35rem;
        font-size: .82rem;
        text-align: center;
        /* Let a scaled-up label wrap inside its third rather than push the
           row past the edge of the screen. */
        white-space: normal;
    }

    .portal__nav-long { display: none; }
    .portal__nav-short { display: inline; }

    .portal__identity .brandmark { width: 38px; height: 38px; }
    .portal__identity .name { font-size: .92rem; }
    .portal__identity .office { font-size: .64rem; letter-spacing: .05em; }
}

/* Narrower still: the office line under the mark is the first thing to go. */
@media (max-width: 380px) {
    .portal__identity .office { display: none; }
    .portal__signin { padding: .45rem .6rem; font-size: .8rem; }
    .portal__nav a { font-size: .78rem; padding: .5rem .2rem; }
}


@media (max-width: 560px) {
    .stat-row { grid-template-columns: minmax(0, 1fr); }
    .facts { gap: .9rem 1.2rem; }
    .page-head h1 { font-size: 1.35rem; }

    /* The top bar keeps only what a handset needs: the menu, where you are,
       notifications and the account. Everything else has a home below. */
    .topbar__context .date { display: none; }
    .topbar__context .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .topbar__actions > .btn { display: none; }
    .user-chip__text { display: none; }
    .user-chip { padding: .25rem; }
    .user-chip > svg.icon { display: none; }
    .bottomnav__item { font-size: .64rem; }
    .modal__foot { flex-direction: column-reverse; align-items: stretch; }
    .modal__foot .btn { width: 100%; }
}

/* ------------------------------------------- the calendar on a small screen */

/* The filter panel is a panel on the desk and a drawer on a handset: it is
   worth its height beside a month, and never worth it above one. */
.cal-filters.is-collapsed { display: none; }

@media (max-width: 900px) {
    .calendar__toolbar { padding: .7rem .8rem; gap: .5rem; }
    .calendar__period { width: 100%; order: -1; min-width: 0; }
    .calendar__tools { margin-left: auto; }
}

@media (max-width: 700px) {
    .calendar__toolbar { padding: .65rem .7rem; }
    .calendar__period { font-size: 1rem; }
    .calendar__nav { flex: 0 0 auto; }
    /* Four view names will not sit beside the date on a handset, and the
       calendar clips its own overflow, so "Agenda" simply disappeared off the
       edge. The row takes the full width instead and shares it four ways. */
    .calendar__tools { width: 100%; margin-left: 0; }

    .calendar__tools .segmented {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        flex: 1 1 auto;
        min-width: 0;
    }

    .calendar__tools .segmented__item { padding: .4rem .2rem; font-size: .78rem; }
    .cal-filters { padding: .6rem .7rem; }
    .cal-filters__foot { width: 100%; }
    .cal-filters__foot .select { flex: 1 1 auto; }
    .calendar__keys { display: none; }

    /* Month: there is no room for wording in a cell this size, so each
       appointment becomes a dot in its category colour and the day itself
       becomes the way through to the detail. */
    .cal-month__dow-long { display: none; }
    .cal-month__dow-short { display: inline; }
    .cal-month__grid { grid-auto-rows: minmax(64px, auto); }

    .cal-day { padding: .25rem .15rem; gap: .22rem; align-items: center; }
    .cal-day.has-events { cursor: pointer; }
    .cal-day__head { justify-content: center; }
    .cal-day__add { display: none; }
    .cal-day__tag { display: none; }
    .cal-day__num { width: 1.7rem; height: 1.7rem; font-size: .82rem; }

    .cal-day__events {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
        max-width: 100%;
    }

    .cal-event {
        width: 7px;
        height: 7px;
        min-width: 0;
        padding: 0;
        gap: 0;
        border: 0;
        border-radius: 50%;
        background: var(--cal-colour, var(--navy-700));
        overflow: hidden;
    }

    .cal-event:hover { transform: none; box-shadow: none; background: var(--cal-colour, var(--navy-700)); }
    .cal-event--block { background: var(--ink-400); }
    .cal-event--cancelled { background: var(--ink-300); }
    .cal-event__dot,
    .cal-event__time,
    .cal-event__title,
    .cal-event__lock { display: none; }

    .cal-day__more { align-self: center; font-size: .62rem; padding: 0 .2rem; }

    /* Week: seven columns will not fit, so the grid keeps its own scroller
       with the hours pinned to the left edge. */
    .cal-time { grid-template-columns: 3.3rem repeat(var(--cal-cols, 7), minmax(90px, 1fr)); }
    .cal-time-wrap { max-height: 66vh; }
    .cal-time__hour { font-size: .62rem; padding-right: .3rem; white-space: nowrap; }
    .cal-day__more-word { display: none; }
    .cal-time__dayhead { padding: .35rem .25rem; }
    .cal-time__dayhead .num { width: 1.45rem; height: 1.45rem; font-size: .8rem; }
    .cal-slot-event { font-size: .68rem; padding: .18rem .3rem; }
    .cal-slot-event em { display: none; }

    /* Agenda: the row keeps the time and the title; the status goes under. */
    .cal-agenda__items { padding: .5rem .55rem; }
    .cal-row { grid-template-columns: 4px 3.9rem minmax(0, 1fr); gap: .55rem; padding-right: .55rem; }
    .cal-row__status { grid-column: 2 / -1; justify-self: start; margin-top: -.2rem; }
    .cal-row__when strong { font-size: .8rem; }
}

@media (max-width: 420px) {
    .cal-month__grid { grid-auto-rows: minmax(56px, auto); }
    .cal-day__num { width: 1.5rem; height: 1.5rem; font-size: .76rem; }
    .cal-event { width: 6px; height: 6px; }
    .calendar__foot { font-size: .72rem; }
    .cal-row { grid-template-columns: 4px minmax(0, 1fr); }
    .cal-row__when { text-align: left; grid-column: 2; }
    .cal-row__body { grid-column: 2; }
    .cal-row__status { grid-column: 2; }
}

/* A fixed action bar so the Secretary can act with one thumb. */
.mobile-actions { display: none; }

@media (max-width: 960px) {
    /* It sits directly above the bottom navigation, never over it. */
    .mobile-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
        z-index: 35;
        display: flex;
        gap: .5rem;
        padding: .6rem .8rem;
        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(8px);
        border-top: 1px solid var(--line);
    }

    .mobile-actions .btn { flex: 1 1 0; min-height: 44px; }

    /* Room for both bars when a page carries its own actions. */
    .shell__main:has(.mobile-actions) .page {
        padding-bottom: calc(var(--bottomnav-h) + 5.25rem);
    }
}

/* ==========================================================================
   28  Motion and print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    html { scroll-behavior: auto; }
}

@media print {
    :root { --paper: #fff; }

    body { background: #fff; font-size: 10.5pt; line-height: 1.5; color: #000; }

    .sidebar,
    .topbar,
    .bottomnav,
    .mobile-actions,
    .toast-stack,
    .page-head__actions,
    .toolbar,
    .pagination,
    .row-actions,
    .portal__nav,
    .portal__signin,
    .no-print { display: none !important; }

    .page { padding: 0; max-width: none; }
    .card { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
    .card__head { background: #f2f2f2; }
    .table thead th { background: #eee; color: #000; }
    .table tbody td { border-bottom: 1px solid #ccc; }

    a { color: #000; text-decoration: none; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }

    .print-only { display: block !important; }
    .status::before { box-shadow: none; }

    /* ------------------------------------------------------- print sheets */

    /* On paper the sheet is the page: no card, no shadow, no rounded corners,
       and no margins of its own beyond the @page rule. */
    .sheet {
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }

    .sheet__letterhead {
        padding-bottom: 8pt;
        border-bottom: 1.5pt solid #1E3A8A;
        break-inside: avoid;
        break-after: avoid;
    }

    .sheet__letterhead::after { background: #C9A227; }
    .sheet__letterhead .brandmark {
        background: #1E3A8A;
        color: #fff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .sheet__identity .name { font-size: 12pt; }
    .sheet__identity .office { font-size: 7.5pt; }
    .sheet__kind { border-color: #bbb; color: #444; font-size: 7pt; }
    .sheet__body { padding-top: 12pt; }

    .sheet__foot {
        margin-top: 14pt;
        padding-top: 6pt;
        border-top: 1px solid #bbb;
        font-size: 7.5pt;
        color: #555;
    }

    /* Inside a sheet the document is the page: a card would only draw a box
       around the paper. The letterhead already carries the institutional rule,
       so the crest above the briefing sheet goes too. */
    .sheet .card {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .sheet .card--crested::before { display: none; }
    .sheet .card > .card__body { padding: 0 !important; }

    /* The pass is the exception: it keeps its navy band and a hairline, which
       is what makes it recognisable at the reception desk. Only its header is
       protected from a page break, never the whole document. */
    .pass {
        border: 1px solid #999;
        border-radius: 0;
    }

    .pass__head {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        background: #1E3A8A !important;
        color: #fff !important;
        padding: 12pt 14pt;
        break-inside: avoid;
        break-after: avoid;
    }

    .pass__title { color: #fff !important; font-size: 15pt; margin-bottom: 2pt; }
    .pass__ref-value { color: #fff !important; font-size: 12pt; }
    .pass__sub,
    .pass__ref-label { color: #C3D0E4 !important; }

    .sheet .pass > .card__body { padding: 14pt !important; }
    .pass__body { gap: 14pt; margin-bottom: 12pt; break-inside: avoid; }
    .pass__qr figcaption { color: #444; }

    /* A record should not be torn in half by a page break. */
    .facts,
    .fact,
    .qr-panel,
    .notice,
    .timeline__item,
    .detail-list dt,
    .detail-list dd { break-inside: avoid; }

    .detail-list dt { color: #444; }
    .detail-list dd { color: #000; }
    .qr-panel { border-color: #999; }
    .divider { background: #bbb; }

    /* Soft fills carry meaning on these sheets — a pending pass should look
       pending on paper too — so they are printed rather than dropped. */
    .status,
    .badge,
    .notice,
    .status::before {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    @page { size: A4; margin: 14mm 14mm 12mm; }
}

.print-only { display: none; }

/* ==========================================================================
   Public portal — refreshed presentation

   The public pages now share the sign-in screen's language: a deep navy
   masthead, the campus photograph under a navy veil, frosted panels and fine
   white outlines on the dark, and soft lifted white sheets for the forms.
   Nothing here changes what a page says; it is presentation only, layered
   last so it settles the earlier rules without rewriting them.
   ========================================================================== */

.portal {
    --veil: linear-gradient(180deg, rgba(30, 58, 138, .86) 0%, rgba(30, 58, 138, .80) 55%, rgba(24, 46, 110, .94) 100%);
    background: #F3F6FB;
}

/* ---------------------------------------------------------------- masthead */

.portal__masthead {
    position: sticky;
    top: 0;
    z-index: 40;
    color: #fff;
    background: rgba(30, 58, 138, .92);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
}

/* The institutional gold rule, back under the masthead as a hairline. */
.portal__masthead::after {
    display: block;
    height: 2px;
    opacity: .85;
    background: linear-gradient(90deg, rgba(201, 162, 39, 0) 0%, var(--gold-600) 22%,
                var(--gold-300) 50%, var(--gold-600) 78%, rgba(201, 162, 39, 0) 100%);
}

.portal__masthead-inner { padding: .85rem 2rem; }

.portal__identity .brandmark {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 8px 20px -10px rgba(0, 0, 0, .7);
    color: var(--navy-800);
}

.portal__identity .brandmark img { border-radius: 50%; padding: 6px; }

.portal__identity .name { color: #fff; letter-spacing: .06em; text-transform: uppercase; font-size: .98rem; }
.portal__identity .office { color: var(--gold-300); letter-spacing: .12em; font-size: .66rem; }

.portal__nav a {
    position: relative;
    color: rgba(255, 255, 255, .78);
    background: transparent;
    border-radius: 2px;
}

.portal__nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.portal__nav a.is-active { color: #fff; background: transparent; font-weight: 600; }

/* The current page is marked with a short gold line under its name. */
.portal__nav a.is-active::after {
    content: "";
    position: absolute;
    left: .85rem;
    right: .85rem;
    bottom: .15rem;
    height: 2px;
    border-radius: 2px;
    background: var(--gold-600);
}

/* The staff door: a white outline, as on the sign-in screen. */
.portal__signin {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 2px;
    background: transparent;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.portal__signin:hover { color: var(--navy-800); background: #fff; border-color: #fff; }

/* ------------------------------------------------------------ the footer */

.portal__foot {
    position: relative;
    padding: 3rem 2rem 1.6rem;
    color: rgba(255, 255, 255, .62);
    background:
        linear-gradient(180deg, rgba(24, 46, 110, .96), rgba(24, 46, 110, .99)),
        var(--portal-photo, none) center / cover no-repeat,
        #19337A;
}

.portal__foot::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(201, 162, 39, 0), var(--gold-600), rgba(201, 162, 39, 0));
}

.portal__foot-inner { max-width: 1280px; }
.portal__foot h4 { color: var(--gold-300); letter-spacing: .14em; }
.portal__foot a { color: #fff; }
.portal__foot a:hover { color: var(--gold-300); }
.portal__foot-base { max-width: 1280px; border-top-color: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .45); }

/* ------------------------------------------------- shared form surfaces */

.portal .card {
    border: 1px solid rgba(30, 58, 138, .08);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 22px 44px -28px rgba(30, 58, 138, .35);
}

.portal .card__head { border-bottom-color: rgba(30, 58, 138, .07); }

.portal .btn--primary {
    background: linear-gradient(180deg, #2747A3 0%, #1E3A8A 100%);
    border-color: #1E3A8A;
    letter-spacing: .02em;
    box-shadow: 0 10px 22px -14px rgba(30, 58, 138, .9);
}

.portal .btn--primary:hover {
    background: linear-gradient(180deg, #2747A3 0%, #19337A 100%);
    border-color: #19337A;
}

.portal .input:focus,
.portal .select:focus,
.portal .textarea:focus {
    border-color: var(--navy-700);
    box-shadow: 0 0 0 3px rgba(21, 87, 176, .14);
}

/* ======================================================== inner pages */

/* The campus band every inner page opens on. The heading stands on it in
   white and the first sheet of the page is lifted over its lower edge. */
.portal--inner .portal__body {
    position: relative;
    isolation: isolate;
}

.portal--inner .portal__body::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 340px;
    z-index: -1;
    background:
        var(--veil),
        var(--portal-photo, url("../img/art-campus.svg")) center 42% / cover no-repeat,
        linear-gradient(150deg, #1A63C0 0%, #2747A3 46%, #1E3A8A 100%);
}

.portal--inner .portal-head {
    padding: .75rem 0 1.25rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #fff;
}

.portal--inner .portal-head::before { display: none; }

/* The diary-and-clock drawing stays in the corner of the band. */
.portal--inner .portal-head::after { bottom: -1.2rem; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }

.portal--inner .portal-head h1 {
    margin-bottom: .55rem;
    font-size: clamp(1.9rem, 1.3rem + 2vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -.015em;
    color: #fff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

.portal--inner .portal-head .lede { color: rgba(255, 255, 255, .8); }

.portal--inner .portal-head .breadcrumbs,
.portal--inner .portal-head .breadcrumbs a { color: rgba(255, 255, 255, .7); }
.portal--inner .portal-head .breadcrumbs a:hover { color: #fff; }
.portal--inner .portal-head .breadcrumbs [aria-current],
.portal--inner .portal-head .breadcrumbs li:last-child,
.portal--inner .portal-head .breadcrumbs span:last-child { color: var(--gold-300); }
.portal--inner .portal-head .breadcrumbs svg.icon { color: rgba(255, 255, 255, .45); }

/* The step indicator on the request form. */
.portal .stepper .step.is-current .step__marker {
    background: var(--navy-800);
    border-color: var(--navy-800);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, .35);
}

.portal .stepper .step.is-done .step__marker {
    background: var(--gold-600);
    border-color: var(--gold-600);
    color: #241C08;
}

/* ============================================================ homepage */

.portal--home .portal__inner { padding-top: 0; }

/* The banner runs edge to edge, like the sign-in screen. */
.portal--home .lp-hero {
    margin-inline: calc(50% - 50vw);
    min-height: min(82vh, 760px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem max(2rem, calc(50vw - 640px + 2rem)) 7.5rem;
    border-radius: 0;
    box-shadow: none;
    background-position: center 40%;
}

.portal--home .lp-hero__scrim {
    background: linear-gradient(100deg, rgba(24, 46, 110, .95) 0%, rgba(30, 58, 138, .86) 42%, rgba(30, 58, 138, .62) 100%);
}

.portal--home .lp-hero--photo::after {
    background: linear-gradient(180deg, rgba(24, 46, 110, 0) 55%, rgba(24, 46, 110, .55) 100%);
}

.portal--home .lp-hero__inner { max-width: 58rem; }

.portal--home .lp-pill {
    border-radius: 2px;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .4);
    color: var(--gold-300);
    letter-spacing: .16em;
}

.portal--home .lp-hero h1 {
    font-size: clamp(2.2rem, 1.2rem + 3.6vw, 3.9rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -.025em;
    text-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}

.portal--home .lp-underline { color: #fff; }
.portal--home .lp-underline::after { height: .09em; bottom: -.08em; }

.portal--home .lp-hero p { font-size: 1.08rem; color: rgba(255, 255, 255, .82); max-width: 50ch; }

.portal--home .lp-hero__actions .btn { min-height: 52px; padding-inline: 1.6rem; border-radius: 2px; letter-spacing: .04em; }

.portal--home .lp-hero .btn--primary {
    background: var(--gold-600);
    border-color: var(--gold-600);
    color: #1E1705;
    box-shadow: 0 16px 30px -16px rgba(201, 162, 39, .9);
}

.portal--home .lp-hero .btn--primary:hover { background: var(--gold-300); border-color: var(--gold-300); }

/* The second action in fine white outline, as on the sign-in screen. */
.portal--home .lp-hero .btn--ghost-light {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .85);
    backdrop-filter: none;
}

.portal--home .lp-hero .btn--ghost-light:hover { background: #fff; border-color: #fff; color: var(--navy-800); }

.portal--home .lp-hero__chip {
    top: auto;
    bottom: 8.5rem;
    right: max(2rem, calc(50vw - 640px + 2rem));
    border-radius: 4px;
    color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .8);
}

.portal--home .lp-hero__chip strong { color: #fff; }
.portal--home .lp-hero__chip-icon { border-radius: 4px; background: var(--gold-600); color: #1E1705; }

/* The facts, lifted across the banner's lower edge. */
.portal--home .lp-bar {
    margin: -5.5rem auto 0;
    width: min(100%, 1180px);
    padding: 1.4rem 1.75rem;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 30px 60px -30px rgba(24, 46, 110, .55), 0 2px 6px rgba(24, 46, 110, .06);
}

.portal--home .lp-bar::before {
    content: "";
    position: absolute;
    inset: 0 1.75rem auto;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--navy-800), var(--navy-700) 60%, var(--gold-600) 60%, var(--gold-300));
}

.portal--home .lp-bar__label { color: var(--gold-700); letter-spacing: .14em; }
.portal--home .lp-bar__value { font-size: 1.02rem; font-weight: 700; }
.portal--home .lp-bar__cta { border-radius: 2px; min-height: 46px; }

/* Assurances: white sheets with a navy medallion and a gold edge on hover. */
.portal--home .lp-assure__card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(30, 58, 138, .07);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 36px -26px rgba(30, 58, 138, .4);
    transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.portal--home .lp-assure__card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
    transition: transform var(--t-slow) var(--ease);
}

.portal--home .lp-assure__card:hover { transform: translateY(-4px); box-shadow: 0 26px 48px -28px rgba(30, 58, 138, .55); }
.portal--home .lp-assure__card:hover::after { transform: scaleX(1); }

.portal--home .lp-assure__icon,
.portal--home .lp-step__icon {
    color: #fff;
    background: linear-gradient(150deg, #1A63C0 0%, #1E3A8A 100%);
    box-shadow: 0 12px 22px -12px rgba(30, 58, 138, .9), inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.portal--home .lp-assure__icon { border-radius: 12px; }

/* The office and its matters, beside the photograph. */
.portal--home .lp-eyebrow { color: var(--gold-700); letter-spacing: .18em; }

.portal--home .lp-split h2,
.portal--home .lp-heading {
    font-weight: 800;
    letter-spacing: -.025em;
    color: var(--navy-900);
}

.portal--home .lp-split__figure {
    border-radius: 18px;
    box-shadow: 0 40px 70px -40px rgba(24, 46, 110, .7);
}

/* The four steps. */
.portal--home .lp-step {
    border: 1px solid rgba(30, 58, 138, .07);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 36px -26px rgba(30, 58, 138, .4);
    transition: transform var(--t-base) var(--ease);
}

.portal--home .lp-step:hover { transform: translateY(-4px); }
.portal--home .lp-step__no { color: var(--gold-700); letter-spacing: .14em; }

/* The closing invitation, full-bleed over the photograph like the banner. */
.portal--home .lp-cta {
    margin-inline: calc(50% - 50vw);
    margin-bottom: -4rem;
    padding: 4.5rem max(2rem, calc(50vw - 640px + 2rem));
    border-radius: 0;
}

.portal--home .lp-cta__scrim { background: var(--veil); }
.portal--home .lp-cta:not(.lp-cta--photo) .lp-cta__scrim { background: linear-gradient(115deg, #1E3A8A 0%, #2747A3 100%); }

.portal--home .lp-cta h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem); font-weight: 800; }
.portal--home .lp-cta p { color: rgba(255, 255, 255, .8); }

.portal--home .lp-cta__mark {
    border-radius: 50%;
    width: 64px;
    height: 64px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .55);
    color: var(--gold-300);
}

.portal--home .lp-cta .btn {
    min-height: 50px;
    border-radius: 2px;
    color: #fff;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .9);
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .8rem;
    font-weight: 700;
}

.portal--home .lp-cta .btn:hover { color: var(--navy-800); background: #fff; border-color: #fff; }

/* ------------------------------------------------- smaller screens */

@media (max-width: 900px) {
    .portal--inner .portal__body::before { height: 300px; }
    .portal--home .lp-hero { min-height: 0; padding: 4rem 1.5rem 7rem; }
    .portal--home .lp-bar { margin-top: -4.5rem; }
}

@media (max-width: 780px) {
    .portal__masthead-inner { padding: .7rem 1rem; }
    .portal--home .lp-hero { padding: 3rem 1.25rem 6.5rem; }
    .portal--home .lp-hero h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
    .portal--home .lp-bar { margin: -4.25rem .25rem 0; width: auto; padding: 1.2rem 1.1rem; }
    .portal--home .lp-bar::before { inset: 0 1.1rem auto; }
    .portal--home .lp-cta { padding: 3rem 1.25rem; margin-bottom: -3rem; }
    .portal--home .lp-cta .btn { width: 100%; justify-content: center; }
    .portal--inner .portal-head h1 { font-size: 1.85rem; }
    .portal__foot { padding: 2.25rem 1.25rem 1.4rem; }
}

/* A page whose own heading row stands on the band (the tracking page). */
.portal--inner .portal-title { color: #fff; padding: .5rem 0 .75rem; }
.portal--inner .portal-title h1 {
    margin: .2rem 0 .35rem;
    font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -.015em;
    color: #fff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.portal--inner .portal-title .lede { color: rgba(255, 255, 255, .8); }
.portal--inner .portal-title .breadcrumbs,
.portal--inner .portal-title .breadcrumbs a { color: rgba(255, 255, 255, .7); }
.portal--inner .portal-title .breadcrumbs a:hover { color: #fff; }
.portal--inner .portal-title .breadcrumbs li:last-child,
.portal--inner .portal-title .breadcrumbs span:last-child { color: var(--gold-300); }
.portal--inner .portal-title .btn--secondary {
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 2px;
}
.portal--inner .portal-title .btn--secondary:hover { color: var(--navy-800); background: #fff; border-color: #fff; }
/* ==========================================================================
   Homepage — framed hero

   A light, open front door: a white masthead, the campus photograph in a
   rounded frame under only a soft veil, the invitation centred on it, and two
   white strips laid across the frame's lower edge — the facts with the
   primary action, then the four things to know before requesting.
   ========================================================================== */

/* ------------------------------------------------------ the framed hero */

.portal--home .portal__body { background: #fff; }
.portal--home .portal__inner { padding-top: .25rem; }

.portal--home .lp-hero {
    margin-inline: 0;
    min-height: min(78vh, 700px);
    padding: 5.5rem 2rem 13.5rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 32px;
    box-shadow: none;
    background-position: center 38%;
}

/* A soft veil: deeper behind the words, light enough to keep the picture. */
.portal--home .lp-hero__scrim {
    background:
        radial-gradient(55% 50% at 50% 42%, rgba(24, 46, 110, .55) 0%, rgba(24, 46, 110, .18) 100%),
        linear-gradient(180deg, rgba(24, 46, 110, .25) 0%, rgba(24, 46, 110, .05) 40%, rgba(24, 46, 110, .45) 100%);
}

.portal--home .lp-hero--photo::after { background: none; }

.portal--home .lp-hero__inner {
    max-width: 52rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portal--home .lp-pill {
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .45);
    letter-spacing: .14em;
}

.portal--home .lp-hero h1 {
    margin-bottom: 1.1rem;
    font-size: clamp(2.3rem, 1.3rem + 3.4vw, 4rem);
    line-height: 1.08;
    letter-spacing: -.03em;
    text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
}

.portal--home .lp-underline::after { display: none; }

.portal--home .lp-hero p {
    margin: 0 auto 2rem;
    max-width: 52ch;
    color: rgba(255, 255, 255, .92);
    text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.portal--home .lp-hero__actions { justify-content: center; gap: .8rem; }

/* Both actions are pills: white for the first, white outline for the second. */
.portal--home .lp-hero__actions .btn {
    min-height: 50px;
    padding-inline: 1.7rem;
    border-radius: 999px;
    letter-spacing: .01em;
}

.portal--home .lp-hero .btn--primary {
    color: var(--navy-900);
    background: #fff;
    border-color: #fff;
    box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .6);
}

.portal--home .lp-hero .btn--primary:hover { background: var(--gold-300); border-color: var(--gold-300); color: #1E1705; }

.portal--home .lp-hero .btn--ghost-light {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border: 1.5px solid rgba(255, 255, 255, .85);
    backdrop-filter: blur(4px);
}

.portal--home .lp-hero .btn--ghost-light:hover { background: #fff; color: var(--navy-900); }

/* The earliest date is carried by the strip below, so the floating chip
   steps aside to leave the centre of the frame clear. */
.portal--home .lp-hero__chip { display: none; }

/* --------------------------------------- strip one: the facts and the action */

.portal--home .lp-bar {
    margin: -11.25rem auto 0;
    width: calc(100% - 7rem);
    max-width: 1120px;
    padding: .9rem .9rem .9rem 1.6rem;
    gap: 1rem;
    background: #fff;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 50px -28px rgba(24, 46, 110, .55);
}

.portal--home .lp-bar::before { display: none; }

.portal--home .lp-bar__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: .65rem;
    align-items: center;
}

.portal--home .lp-bar__icon {
    grid-row: span 2;
    display: grid;
    place-items: center;
    color: var(--navy-800);
}

.portal--home .lp-bar__icon svg.icon { width: 1.15rem; height: 1.15rem; }

.portal--home .lp-bar__label { color: var(--ink-500); letter-spacing: .1em; font-size: .64rem; }
.portal--home .lp-bar__value { font-size: .92rem; font-weight: 700; color: var(--navy-900); }
.portal--home .lp-bar__value.is-open { color: var(--ok); }
.portal--home .lp-bar__value.is-closed { color: var(--danger); }

@media (min-width: 901px) {
    .portal--home .lp-bar { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto; }
    .portal--home .lp-bar__value { white-space: nowrap; }
}

.portal--home .lp-bar__cta {
    min-height: 52px;
    padding-inline: 2rem;
    border-radius: 999px;
    background: var(--navy-900);
    border-color: var(--navy-900);
    box-shadow: none;
}

/* -------------------------------- strip two: the four things to know */

.portal--home .lp-assure {
    position: relative;
    z-index: 2;
    margin: calc(-3.5rem + .9rem) auto 0;
    width: calc(100% - 7rem);
    max-width: 1120px;
    gap: 0;
    padding: .5rem;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 50px -28px rgba(24, 46, 110, .45), 0 0 0 1px rgba(30, 58, 138, .05);
}

.portal--home .lp-assure__card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: .85rem;
    align-items: center;
    padding: 1rem 1.1rem;
    background: transparent;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
}

.portal--home .lp-assure__card + .lp-assure__card { box-shadow: inset 1px 0 0 rgba(30, 58, 138, .08); }

.portal--home .lp-assure__card:hover {
    transform: none;
    background: var(--surface-2);
    box-shadow: none;
}

.portal--home .lp-assure__card::after { display: none; }

.portal--home .lp-assure__icon {
    grid-row: span 2;
    width: 46px;
    height: 46px;
    margin: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--navy-900);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, .08);
}

.portal--home .lp-assure__icon svg.icon { width: 1.15rem; height: 1.15rem; }

.portal--home .lp-assure__card strong { margin: 0 0 .1rem; font-size: .88rem; line-height: 1.3; }
.portal--home .lp-assure__card span:not(.lp-assure__icon) { font-size: .78rem; line-height: 1.45; }

/* ------------------------------------------------- smaller screens */

@media (max-width: 1080px) {
    .portal--home .lp-bar,
    .portal--home .lp-assure { width: calc(100% - 3rem); }
    .portal--home .lp-assure { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal--home .lp-assure__card:nth-child(3) { box-shadow: none; }
}

@media (max-width: 900px) {
    .portal--home .lp-hero { min-height: 0; padding: 4.5rem 1.5rem 15rem; border-radius: 24px; }
    .portal--home .lp-bar { margin-top: -13rem; padding: 1.1rem; }
    .portal--home .lp-bar__cta { width: 100%; }
}

@media (max-width: 780px) {
    .portal--home .portal__inner { padding-left: .75rem; padding-right: .75rem; }
    .portal--home .lp-hero { padding: 3.25rem 1.25rem 17rem; border-radius: 20px; }
    .portal--home .lp-hero h1 { font-size: clamp(1.85rem, 8.4vw, 2.5rem); }
    .portal--home .lp-bar { margin-top: -15.5rem; width: calc(100% - 1.5rem); }
    .portal--home .lp-assure { width: calc(100% - 1.5rem); margin-top: calc(-2.5rem + .75rem); grid-template-columns: minmax(0, 1fr); }
    .portal--home .lp-assure__card + .lp-assure__card { box-shadow: inset 0 1px 0 rgba(30, 58, 138, .08); }
    .portal--home .lp-assure__card:nth-child(3) { box-shadow: inset 0 1px 0 rgba(30, 58, 138, .08); }
}

/* Homepage hero: full width, with a fixed overlay so the words always read. */
.portal--home .portal__inner { padding-top: 0; }

.portal--home .lp-hero {
    margin-inline: calc(50% - 50vw);
    border-radius: 0;
    padding-inline: max(1.5rem, calc(50vw - 640px + 2rem));
}

/* The overlay is laid down regardless of the strength set in Settings:
   an even navy tint, deepened behind the words and at the foot. */
.portal--home .lp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(60% 55% at 50% 45%, rgba(24, 46, 110, .45) 0%, rgba(24, 46, 110, 0) 100%),
        linear-gradient(180deg, rgba(24, 46, 110, .62) 0%, rgba(24, 46, 110, .55) 45%, rgba(24, 46, 110, .78) 100%);
    pointer-events: none;
}

.portal--home .lp-hero h1 { text-shadow: 0 4px 24px rgba(0, 0, 0, .45); }
.portal--home .lp-hero p { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }

@media (max-width: 900px) {
    .portal--home .lp-hero { border-radius: 0; padding-inline: 1.25rem; }
}

/* Homepage headline: a little lighter and smaller. */
.portal--home .lp-hero h1 {
    font-size: clamp(2rem, 1.15rem + 2.7vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.12;
}

@media (max-width: 780px) {
    .portal--home .lp-hero h1 { font-size: clamp(1.65rem, 7.4vw, 2.15rem); }
}

/* Portal header in royal blue (#1E3A8A) rather than navy. */
.portal__masthead {
    background: rgba(30, 58, 138, .97);
    border-bottom-color: rgba(255, 255, 255, .14);
}

.portal__nav a { color: rgba(255, 255, 255, .88); }
.portal__nav a:hover { background: rgba(255, 255, 255, .14); }
.portal__signin { border-color: rgba(255, 255, 255, .8); }
.portal__signin:hover { color: #1E3A8A; }
