/* ==========================================================================
   Public website — site.css (Phase 14)
   Desktop-first (target 1280–1920px, correct at 1024px). There are NO mobile
   rules yet: every layout lives in a class so Phase 15 can add
   @media (max-width: …) overrides without rewriting anything here.
   Header/footer colours come from CMS settings via --header-* / --footer-*
   custom properties set on the element.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    --color-primary: #1d4ed8;
    --color-primary-dark: #1e3a8a;
    --color-primary-soft: #eff6ff;
    --color-accent: #f59e0b;
    --color-bg: #ffffff;
    --color-surface: #f8fafc;
    --color-surface-2: #f1f5f9;
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-border: #e2e8f0;
    --color-error: #b91c1c;
    --color-success: #15803d;

    --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -2px rgba(15, 23, 42, 0.04), 0 10px 20px -6px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 8px 12px -4px rgba(15, 23, 42, 0.06), 0 22px 40px -12px rgba(15, 23, 42, 0.18);

    /* Vertical rhythm: one section padding and one heading gap, fluid between 1024 and 1920px. */
    --section-y: clamp(44px, 4vw, 60px);
    --head-gap: clamp(24px, 2.4vw, 32px);

    /* ONE motion language for the whole site. */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --duration: 240ms;
    --duration-slow: 480ms;

    --container-max: 1200px;
    --gutter: 24px;

    /* Header / footer (overridden inline from CMS settings). */
    --header-bg: #ffffff;
    --header-fg: #0f172a;
    --footer-bg: #0f172a;
    --footer-fg: #e2e8f0;
    --header-height: 78px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--space-4); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1, h2 { letter-spacing: -0.02em; }
p { margin: 0 0 var(--space-4); }
strong, b { font-weight: 700; }
em, i { font-style: italic; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--color-primary-dark); }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
address { font-style: normal; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.icon { flex: none; width: 1.15em; height: 1.15em; }

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: 1000;
    padding: var(--space-2) var(--space-4);
    background: var(--color-text);
    color: #fff;
    border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-4); color: #fff; }

.site-main { flex: 1 0 auto; outline: none; }

/* ---------- 3. Layout ---------- */
.container {
    width: 100%;
    max-width: calc(var(--container-max) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ---------- 4. Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease),
                border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }

/* ---------- 5. Top bar ---------- */
.topbar {
    background: var(--header-fg);
    color: var(--header-bg);
    font-size: 0.85rem;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-5);
    min-height: 38px;
}
.topbar-text { margin: 0 auto 0 0; font-weight: 500; }
.topbar-contact {
    display: flex;
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}
.topbar-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; opacity: 0.9; }
.topbar-link:hover { color: inherit; opacity: 1; }

/* ---------- 6. Social icons ---------- */
.social-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: inherit;
    transition: background-color var(--duration) var(--ease), transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.social-link:hover { color: inherit; transform: translateY(-2px); }
.social-list-topbar .social-link { width: 28px; height: 28px; opacity: 0.9; }
.social-list-topbar .social-link .icon { width: 16px; height: 16px; }
.social-list-topbar .social-link:hover { opacity: 1; }
.social-list-footer .social-link { background: rgba(255, 255, 255, 0.08); }
.social-list-footer .social-link:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------- 7. Header ---------- */
.site-header {
    position: relative;
    z-index: 100;
    background: var(--header-bg);
    color: var(--header-fg);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    transition: box-shadow var(--duration) var(--ease);
}
.site-header.is-sticky { position: sticky; top: 0; }
.site-header.is-shrunk { box-shadow: var(--shadow-md); }

.header-inner {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.1vw, 20px);
    min-height: var(--header-height);
    padding-block: var(--space-3);
    transition: min-height var(--duration) var(--ease), padding var(--duration) var(--ease);
}
.site-header.is-shrunk .header-inner { min-height: 64px; padding-block: var(--space-2); }

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    flex: none;
    color: inherit;
}
.brand:hover { color: inherit; }
.brand-logo {
    height: var(--logo-h, 56px);
    width: auto;
    max-width: none;
    transition: height var(--duration) var(--ease);
}
.site-header.is-shrunk .brand-logo { height: calc(var(--logo-h, 56px) * 0.75); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-weight: 700;
    font-size: clamp(1rem, 1.35vw, 1.25rem);
    line-height: 1.2;
    max-width: 9.5em;
}
.brand-tagline { font-size: 0.8rem; opacity: 0.75; line-height: 1.3; margin-top: 2px; }

/* Menu */
.site-nav { margin-left: auto; min-width: 0; }
.nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-item { position: relative; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 10px clamp(6px, 0.55vw, 10px);
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: inherit;
    font-size: clamp(0.875rem, 0.9vw, 0.9375rem);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.nav-link .icon { width: 16px; height: 16px; opacity: 0.7; transition: transform var(--duration) var(--ease); }
.nav-link:hover,
.nav-item:focus-within > .nav-link { color: inherit; background: rgba(127, 127, 127, 0.12); }
.nav-item.is-active > .nav-link { color: var(--color-primary); }
.nav-item.is-active > .nav-link[aria-current="page"],
.nav-item.is-active > .nav-link { font-weight: 600; }

/* Dropdowns: open on hover AND keyboard focus (focus-within); Escape closes (site.js). */
.nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: var(--space-2);
    list-style: none;
    background: #fff;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility 0s linear var(--duration);
}
/* Invisible bridge so the pointer can travel from the link to the menu. */
.nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-item:nth-last-child(-n+2) > .nav-sub { left: auto; right: 0; }
.nav-item.has-children:hover > .nav-sub,
.nav-item.has-children:focus-within > .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
    transition-delay: 0s;
}
.nav-item.has-children:hover > .nav-link .icon,
.nav-item.has-children:focus-within > .nav-link .icon { transform: rotate(180deg); }
.nav-item.is-dismissed > .nav-sub { opacity: 0; visibility: hidden; transform: translateY(8px); }
.nav-item.is-dismissed > .nav-link .icon { transform: none; }
.nav-sub-link {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.925rem;
    white-space: nowrap;
}
.nav-sub-link:hover,
.nav-sub-link:focus-visible { background: var(--color-primary-soft); color: var(--color-primary); }
.nav-sub-link[aria-current="page"] { color: var(--color-primary); font-weight: 600; }

.header-cta { flex: none; }

/* Menu too long for one row (detected by site.js): logo + button on top, full-width menu row below. */
.site-header.is-stacked .header-inner { flex-wrap: wrap; row-gap: var(--space-2); }
.site-header.is-stacked .header-cta { margin-left: auto; }
.site-header.is-stacked .site-nav {
    order: 3;
    flex: 1 0 100%;
    margin-left: 0;
    padding-top: var(--space-2);
    border-top: 1px solid rgba(127, 127, 127, 0.18);
}
.site-header.is-stacked .nav-list { justify-content: flex-start; }

/* Layout variant: logo centred, menu on its own row below. */
.site-header-logo_center .header-inner {
    flex-direction: column;
    gap: var(--space-2);
    padding-block: var(--space-4) var(--space-2);
}
.site-header-logo_center .brand { flex-direction: column; text-align: center; }
.site-header-logo_center .brand-text { align-items: center; }
.site-header-logo_center .site-nav { margin-left: 0; }
.site-header-logo_center .nav-list { justify-content: center; }
.site-header-logo_center .header-cta { position: absolute; right: var(--gutter); top: var(--space-5); }
.site-header-logo_center .header-inner { position: relative; }
.site-header-logo_center.is-shrunk .brand-text { display: none; }

/* ---------- 8b. Header polish — desktop only (≥1024px; phones/tablets keep the rules above) ---------- */
@media (min-width: 1024px) {
    /* Top bar: soft gradient, live dot on the announcement, hairline dividers between groups. */
    .topbar {
        background: var(--header-fg);
        background: linear-gradient(90deg, var(--header-fg) 0%, color-mix(in srgb, var(--header-fg) 82%, var(--color-primary)) 100%);
        font-size: 0.8125rem;
        letter-spacing: 0.01em;
    }
    .topbar-inner { min-height: 42px; gap: var(--space-4); }
    .topbar-text { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
    .topbar-text::before {
        content: "";
        flex: none;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--color-accent);
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 60%, transparent);
        animation: topbar-pulse 2.4s var(--ease) infinite;
    }
    .topbar-contact { gap: 0; }
    .topbar-contact li { display: flex; align-items: center; }
    .topbar-contact li + li::before,
    .social-list-topbar::before {
        content: "";
        width: 1px;
        height: 16px;
        margin-inline: var(--space-4);
        background: currentColor;
        opacity: 0.2;
    }
    .topbar-link { gap: 8px; padding-block: 4px; opacity: 0.85; transition: opacity var(--duration) var(--ease); }
    .topbar-link .icon { width: 15px; height: 15px; opacity: 0.8; }
    .social-list-topbar { align-items: center; gap: 6px; flex-wrap: nowrap; }
    .social-list-topbar::before { margin-inline: 0 var(--space-2); }
    .social-list-topbar .social-link {
        width: 28px;
        height: 28px;
        opacity: 1;
        background: color-mix(in srgb, currentColor 10%, transparent);
    }
    .social-list-topbar .social-link .icon { width: 14px; height: 14px; }
    .social-list-topbar .social-link:hover { background: var(--color-primary); color: #fff; }

    /* Main bar: lifted with a soft shadow, frosted when it sticks. */
    .site-header {
        border-bottom-color: transparent;
        box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 6px 24px -12px rgba(15, 23, 42, 0.12);
    }
    .site-header.is-shrunk {
        background: color-mix(in srgb, var(--header-bg) 88%, transparent);
        -webkit-backdrop-filter: saturate(180%) blur(12px);
        backdrop-filter: saturate(180%) blur(12px);
        box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 10px 30px -12px rgba(15, 23, 42, 0.2);
    }
    .header-inner { gap: 12px; }

    /* Brand: name on one line, tagline as a small tracked caption. */
    .brand { gap: 14px; }
    .brand-text { gap: 4px; }
    .brand-name {
        max-width: none;
        white-space: nowrap;
        font-size: 1.1rem;
        font-weight: 800;
        letter-spacing: -0.015em;
        line-height: 1.1;
    }
    .brand-tagline {
        margin-top: 0;
        font-size: 0.6875rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        opacity: 0.6;
        white-space: nowrap;
    }

    /* Menu: no grey hover box — an accent bar grows under the link instead. */
    .nav-list { gap: 2px; }
    .nav-link {
        position: relative;
        gap: 4px;
        padding: 12px 7px;
        font-size: 0.875rem;
        opacity: 0.88;
        transition: color var(--duration) var(--ease), opacity var(--duration) var(--ease);
    }
    .nav-link::after {
        content: "";
        position: absolute;
        left: 7px;
        right: 7px;
        bottom: 4px;
        height: 2px;
        border-radius: 2px;
        background: var(--color-primary);
        transform: scaleX(0);
        transform-origin: center;
        transition: transform var(--duration) var(--ease);
    }
    .nav-link:hover,
    .nav-item:focus-within > .nav-link { background: none; opacity: 1; }
    .nav-link:hover::after,
    .nav-item:focus-within > .nav-link::after,
    .nav-item.is-active > .nav-link::after { transform: scaleX(1); }
    .nav-item.is-active > .nav-link { opacity: 1; }

    /* Dropdown: rounder, accent strip, items slide on hover. */
    .nav-sub {
        min-width: 232px;
        padding: 8px;
        border-color: rgba(15, 23, 42, 0.06);
        border-top: 3px solid var(--color-primary);
        border-radius: var(--radius-sm) var(--radius-sm) var(--radius-lg) var(--radius-lg);
        box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.25), 0 4px 10px -4px rgba(15, 23, 42, 0.08);
    }
    .nav-sub-link { padding: 10px 14px; transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), padding var(--duration) var(--ease); }
    .nav-sub-link:hover,
    .nav-sub-link:focus-visible { padding-left: 18px; }

    /* CTA: gradient pill with an arrow that nudges forward on hover. */
    .header-cta {
        gap: 8px;
        padding: 12px 20px;
        border-radius: var(--radius-pill);
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
        box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--color-primary) 70%, transparent);
        font-weight: 600;
        letter-spacing: 0.01em;
        transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
    }
    .header-cta::after { content: "→"; display: inline-block; transition: transform var(--duration) var(--ease); }
    .header-cta:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 26px -8px color-mix(in srgb, var(--color-primary) 80%, transparent);
    }
    .header-cta:hover::after { transform: translateX(3px); }
}
@keyframes topbar-pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 60%, transparent); }
    70%  { box-shadow: 0 0 0 7px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- 9. Error page ---------- */
.error-page { padding-block: var(--space-9); text-align: center; }
.error-page-inner { max-width: 640px; }
.error-page-code {
    margin: 0;
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--color-primary);
    opacity: 0.18;
}
.error-page-title { font-size: 2.25rem; margin: var(--space-4) 0 var(--space-3); }
.error-page-text { color: var(--color-text-muted); margin-bottom: var(--space-6); }

/* ---------- 10. Footer ---------- */
.site-footer {
    flex: none;
    /* Every page ends with a padded section, so no extra gap (it showed as a blank band). */
    margin-top: 0;
    background: var(--footer-bg);
    color: var(--footer-fg);
    font-size: 0.95rem;
}
.site-footer a { color: inherit; opacity: 0.85; }
.site-footer a:hover { color: inherit; opacity: 1; }
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
    gap: clamp(32px, 3.5vw, 48px);
    padding-block: clamp(44px, 4vw, 56px) clamp(32px, 3vw, 40px);
}
.footer-brand { display: inline-block; margin-bottom: var(--space-4); opacity: 1; }
.footer-logo { height: var(--logo-h, 56px); width: auto; max-width: none; }
.footer-name { font-size: 1.2rem; font-weight: 700; margin-bottom: var(--space-3); }
.footer-text { opacity: 0.78; max-width: 42ch; line-height: 1.65; }
.footer-about .social-list { margin-top: var(--space-5); }
.footer-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-4);
    opacity: 0.95;
}
.footer-title a { opacity: 1; }
.footer-link-list {
    columns: 2;
    column-gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}
.footer-link-list li { break-inside: avoid; margin-bottom: 10px; }
.footer-link { display: inline-block; transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease); }
.footer-link:hover { transform: translateX(3px); }
.footer-link[aria-current="page"] { opacity: 1; font-weight: 600; }
.footer-contact-item { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-3); }
.footer-contact-item .icon { margin-top: 3px; opacity: 0.7; }
.footer-contact-item a, .footer-contact-item span { overflow-wrap: anywhere; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.85rem; }
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    gap: var(--space-5);
    padding-block: 18px;
}
.footer-bottom p { margin: 0; opacity: 0.7; }

/* Footer polish — desktop only (≥1024px; phones/tablets keep the rules above).
   Rainbow top edge, soft glows, accent-underlined titles, sliding chevron links,
   icon tiles for contact details and brand-coloured social buttons. */
@media (min-width: 1024px) {
    .site-footer {
        position: relative;
        overflow: hidden;
        background-color: var(--footer-bg);
        background-image:
            radial-gradient(700px 320px at 0% 0%, color-mix(in srgb, var(--color-primary) 22%, transparent), transparent 70%),
            radial-gradient(520px 300px at 100% 100%, color-mix(in srgb, var(--color-accent) 10%, transparent), transparent 70%),
            radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.5px);
        background-size: auto, auto, 24px 24px;
    }
    .site-footer::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #1d4ed8, #0d9488, #7c3aed, #d97706, #e11d48, #1d4ed8);
        background-size: 200% 100%;
        animation: footer-flow 12s linear infinite;
    }
    .footer-grid { position: relative; padding-block: 64px 48px; gap: 56px; }

    /* Brand column: logo on a soft halo, social buttons fill with their brand colour. */
    .footer-logo { filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35)); transition: transform 500ms var(--ease); }
    .footer-brand:hover .footer-logo { transform: rotate(-6deg) scale(1.05); }
    .footer-text { font-size: 0.95rem; opacity: 0.72; }
    .social-list-footer { gap: 10px; }
    .social-list-footer .social-link {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.06);
        opacity: 1;
        transition: background 300ms var(--ease), border-color 300ms var(--ease), transform 300ms var(--ease), box-shadow 300ms var(--ease);
    }
    .social-list-footer .social-link:hover {
        --brand: var(--color-primary);
        transform: translateY(-4px);
        border-color: transparent;
        background: var(--brand);
        color: #fff;
        box-shadow: 0 10px 20px -8px var(--brand);
    }
    .social-list-footer .social-link:has(.icon-social-facebook):hover  { --brand: #1877f2; }
    .social-list-footer .social-link:has(.icon-social-instagram):hover { --brand: #e1306c; background: linear-gradient(45deg, #f9a825, #e1306c 50%, #833ab4); }
    .social-list-footer .social-link:has(.icon-social-youtube):hover   { --brand: #ff0000; }
    .social-list-footer .social-link:has(.icon-social-linkedin):hover  { --brand: #0a66c2; }
    .social-list-footer .social-link:has(.icon-social-x):hover,
    .social-list-footer .social-link:has(.icon-social-threads):hover   { --brand: #000; }
    .social-list-footer .social-link:has(.icon-social-whatsapp):hover  { --brand: #25d366; }
    .social-list-footer .social-link:has(.icon-social-telegram):hover  { --brand: #229ed9; }

    /* Column titles with an accent bar. */
    .footer-title { position: relative; margin-bottom: 22px; padding-bottom: 12px; font-size: 0.8rem; letter-spacing: 0.14em; }
    .footer-title::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 28px;
        height: 2px;
        border-radius: 2px;
        background: var(--color-accent);
        transition: width 400ms var(--ease);
    }
    .footer-col:hover .footer-title::after { width: 56px; }

    /* Links: chevron slides in, text turns accent. */
    .footer-link-list li { margin-bottom: 12px; }
    .footer-link { position: relative; display: inline-flex; align-items: center; transition: color 300ms var(--ease), opacity 300ms var(--ease), transform 300ms var(--ease); }
    .footer-link::before {
        content: "›";
        position: absolute;
        left: -14px;
        font-weight: 700;
        color: var(--color-accent);
        opacity: 0;
        transform: translateX(-6px);
        transition: opacity 300ms var(--ease), transform 300ms var(--ease);
    }
    .site-footer .footer-link:hover { color: var(--color-accent); opacity: 1; transform: translateX(10px); }
    .footer-link:hover::before { opacity: 1; transform: none; }

    /* Contact: each icon in a tinted tile that lights up on hover. */
    .footer-contact-item { align-items: center; gap: 14px; margin-bottom: 14px; }
    .footer-contact-item .icon {
        box-sizing: border-box;
        width: 38px;
        height: 38px;
        margin: 0;
        padding: 9px;
        border-radius: 11px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.06);
        color: var(--color-accent);
        opacity: 1;
        transition: background 300ms var(--ease), color 300ms var(--ease), transform 300ms var(--ease);
    }
    .footer-contact-item:hover .icon { background: var(--color-accent); color: #fff; transform: rotate(-8deg); }
    .footer-contact-item:has(br) { align-items: flex-start; }

    /* Bottom bar: slightly darker strip. */
    .footer-bottom { position: relative; border-top-color: rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.18); }
    .footer-bottom-inner { padding-block: 20px; }
    .footer-bottom p { opacity: 0.6; }
}
@keyframes footer-flow { to { background-position: 200% 0; } }
@keyframes footer-pin { 0%, 60%, 100% { transform: translateY(0); } 75% { transform: translateY(-4px); } 88% { transform: translateY(0) scaleY(0.9); } }

/* ---------- 11. Typography scale ---------- */
h1 { font-size: clamp(2rem, 3vw, 2.875rem); }
h2 { font-size: clamp(1.5rem, 2vw, 2.125rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
.lead { font-size: 1.125rem; line-height: 1.6; color: var(--color-text-muted); }
.eyebrow {
    display: inline-block;
    margin-bottom: var(--space-3);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
}
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.prose { max-width: 72ch; line-height: 1.7; }
.prose p:last-child { margin-bottom: 0; }
.prose strong, .prose b { color: var(--color-text); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose h2, .prose h3, .prose h4 { margin: 1.6em 0 0.6em; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.2rem; }
.prose :is(h2, h3, h4):first-child { margin-top: 0; }
.prose ul, .prose ol { margin: 0 0 var(--space-4); padding-left: 1.4em; }
.prose li + li { margin-top: 6px; }
.prose blockquote { margin: 0 0 var(--space-4); padding-left: var(--space-4); border-left: 3px solid var(--color-primary); color: var(--color-text-muted); font-style: italic; }
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- 12. Grid utilities (12 columns) ---------- */
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.col-1 { grid-column: span 1; }  .col-2 { grid-column: span 2; }  .col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }  .col-5 { grid-column: span 5; }  .col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }  .col-8 { grid-column: span 8; }  .col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; } .col-11 { grid-column: span 11; } .col-12 { grid-column: span 12; }
.grid { display: grid; gap: var(--gutter); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.grid-2 { --cols: 2; }
.grid-3 { --cols: 3; }
.grid-4 { --cols: 4; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.container-narrow { max-width: calc(860px + 2 * var(--gutter)); }

/* ---------- 13. Sections ---------- */
.section { padding-block: var(--section-y); }
.section-tinted { background: var(--color-surface); }
.section-head { max-width: 760px; margin: 0 auto var(--head-gap); text-align: center; }
.section-head.is-left { margin-left: 0; text-align: left; }
/* A heading directly over its own intro text sits closer to it than to a card grid. */
.section-head:has(+ .block-body) { margin-bottom: var(--space-4); }
.section-title { margin-bottom: 0; }
/* Short accent rule under section headings: one consistent marker of hierarchy site-wide. */
.section-head .section-title::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
}
.section-head.is-left .section-title::after { margin-left: 0; }
.section-sub { margin: var(--space-3) 0 0; font-size: 1.05rem; color: var(--color-text-muted); }
.section-foot { margin-top: var(--space-6); text-align: center; }

/* ---------- 14. More buttons & links ---------- */
.btn-secondary { background: var(--color-surface-2); color: var(--color-text); }
.btn-secondary:hover { background: var(--color-border); color: var(--color-text); }
.btn-outline { background: transparent; color: var(--color-primary); border-color: currentColor; }
.btn-outline:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn-light { background: #fff; color: var(--color-primary-dark); }
.btn-light:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }
.btn-ghost { background: transparent; color: inherit; }
.btn-ghost:hover { background: rgba(127, 127, 127, 0.12); box-shadow: none; color: inherit; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.link-arrow .icon { transition: transform var(--duration) var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- 15. Cards & badges ---------- */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--color-surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-slow) var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex: 1; flex-direction: column; gap: var(--space-2); padding: 18px 20px 20px; }
.card-title { margin: 0; font-size: 1.0625rem; line-height: 1.4; }
.card-title a { color: inherit; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.card-title a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.card-text { margin: 0; color: var(--color-text-muted); font-size: 0.9375rem; line-height: 1.6; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-3); font-size: 0.8125rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.card-meta .icon { width: 16px; height: 16px; }
.card-foot { margin-top: auto; padding-top: var(--space-3); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.5;
    white-space: nowrap;
}
.badge-accent { background: #fef3c7; color: #92400e; }
.badge-muted { background: var(--color-surface-2); color: var(--color-text-muted); }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, currentColor); }

/* Styled stand-in when an item has no image (no third-party thumbnails). */
.media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary-soft), #e0e7ff);
    color: var(--color-primary);
}
.media-placeholder .icon { width: 40px; height: 40px; opacity: 0.5; }
.media-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.media-play span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    transition: transform var(--duration) var(--ease), background-color var(--duration) var(--ease);
}
.media-play .icon { width: 26px; height: 26px; margin-left: 3px; }
a:hover .media-play span, .card:hover .media-play span { transform: scale(1.08); background: var(--color-primary); }

/* ---------- 16. Slider / carousel ([data-slider], site.js) ---------- */
.slider { position: relative; --per-view: 1; --slide-gap: var(--gutter); }
/* Breathing room inside the clip so card shadows and the hover lift aren't cut off. */
.slider-viewport { overflow: hidden; margin-block: -8px -14px; padding-block: 8px 14px; }
.hero-slider .slider-viewport { margin-block: 0; padding-block: 0; }
.slider-track {
    position: relative;
    display: flex;
    gap: var(--slide-gap);
    transition: transform var(--duration-slow) var(--ease);
    will-change: transform;
}
.slide { flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--slide-gap)) / var(--per-view)); min-width: 0; }
.slider-per-2 { --per-view: 2; }
.slider-per-3 { --per-view: 3; }
.slider-per-4 { --per-view: 4; }
.slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--color-text);
    box-shadow: 0 0 0 1px var(--color-border), var(--shadow-md);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.slider-arrow:hover { background: var(--color-primary); color: #fff; }
.slider-arrow .icon { width: 22px; height: 22px; }
/* Overhang the cards by up to 24px, but never closer than 8px to the viewport edge (1024px screens). */
.slider-prev { left: max(-24px, calc((100% - 100vw) / 2 + 8px)); }
.slider-next { right: max(-24px, calc((100% - 100vw) / 2 + 8px)); }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--space-5); }
.slider-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: #cbd5e1;
    cursor: pointer;
    transition: width var(--duration) var(--ease), background-color var(--duration) var(--ease);
}
.slider-dot[aria-current="true"] { width: 28px; background: var(--color-primary); }
.slider.is-static .slider-arrow,
.slider.is-static .slider-dots { display: none; }
.js .slider:not(.is-ready) .slider-track { transition: none; }

/* Hero variant (home banner slider): full-width slides, controls over the image. */
.hero-slider { --slide-gap: 0px; background: var(--color-text); }
.hero-slide {
    position: relative;
    display: flex;
    align-items: center;
    height: clamp(420px, 60vh, 600px);
    overflow: hidden;
    background-color: var(--color-primary-dark);
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero-slide-media, .hero-slide-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.45) 55%, rgba(15, 23, 42, 0.15) 100%);
}
.hero-slide.align-center::after { background: rgba(15, 23, 42, 0.55); }
.hero-slide.align-right::after { background: linear-gradient(270deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.45) 55%, rgba(15, 23, 42, 0.15) 100%); }
.hero-slide-inner { position: relative; z-index: 1; width: 100%; }
.hero-slide-content { max-width: 620px; }
.hero-slide.align-center .hero-slide-content { margin-inline: auto; text-align: center; }
.hero-slide.align-right .hero-slide-content { margin-left: auto; text-align: right; }
.hero-slide-title { margin-bottom: var(--space-4); color: #fff; font-size: clamp(2.25rem, 3.6vw, 3.375rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25); }
.hero-slide-sub { margin-bottom: var(--space-6); font-size: clamp(1.05rem, 1.2vw, 1.175rem); line-height: 1.6; opacity: 0.92; }
.js .hero-slide .hero-slide-content { transition: opacity var(--duration-slow) var(--ease) 120ms, transform var(--duration-slow) var(--ease) 120ms; }
.js .hero-slide:not(.is-active) .hero-slide-content { opacity: 0; transform: translateY(16px); }
.hero-slider .slider-arrow { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; }
.hero-slider .slider-arrow:hover { background: rgba(255, 255, 255, 0.32); }
/* Arrows line up with the content edge (not the viewport edge) and share the dots' centre line. */
.hero-slider { --hero-edge: max(var(--gutter), calc((100% - var(--container-max)) / 2)); }
.hero-slider .slider-arrow { top: auto; bottom: var(--space-6); width: 44px; height: 44px; transform: none; }
.hero-slider .slider-prev { left: auto; right: calc(var(--hero-edge) + 44px + var(--space-3)); }
.hero-slider .slider-next { right: var(--hero-edge); }
.hero-slider .slider-dots { position: absolute; left: 0; right: 0; bottom: calc(var(--space-6) + 17px); z-index: 3; margin: 0; }
.hero-slider .slider-dot { background: rgba(255, 255, 255, 0.45); }
.hero-slider .slider-dot[aria-current="true"] { background: #fff; }

/* ---------- 17. Notice ticker ([data-ticker], site.js) ---------- */
.ticker { display: flex; align-items: stretch; background: var(--color-primary-dark); color: #fff; overflow: hidden; }
.ticker-label {
    flex: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-5);
    background: var(--color-accent);
    color: #1f2937;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.ticker-viewport {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}
.ticker:not(.is-ready) .ticker-viewport { overflow-x: auto; }
.ticker-track { display: flex; width: max-content; }
.ticker.is-ready .ticker-track { animation: ticker-scroll var(--ticker-duration, 40s) linear infinite; }
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; margin: 0; padding: 0 0 0 var(--space-6); list-style: none; }
.ticker-item { display: flex; align-items: center; gap: var(--space-3); padding: 13px var(--space-7) 13px 0; white-space: nowrap; font-size: 0.95rem; }
.ticker-item::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); flex: none; }
.ticker-item a { color: #fff; }
.ticker-item a:hover { color: #fde68a; }
.ticker-date { opacity: 0.7; font-size: 0.85rem; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 18. Lightbox (built by site.js for [data-lightbox] links) ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 96px;
    background: rgba(2, 6, 23, 0.92);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox-stage { display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; margin: 0; }
.lightbox-media { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.lightbox-img { max-width: 100%; max-height: calc(100vh - 200px); width: auto; border-radius: var(--radius-md); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.lightbox-frame { width: min(1100px, calc(100vw - 192px)); aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-md); background: #000; }
.lightbox-caption { max-width: 70ch; margin-top: var(--space-4); color: #e2e8f0; text-align: center; }
.lightbox-caption:empty { display: none; }
.lightbox-counter { position: absolute; top: 30px; left: 32px; margin: 0; color: #cbd5e1; font-size: 0.9rem; }
.lightbox-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background-color var(--duration) var(--ease);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox-btn .icon { width: 24px; height: 24px; }
.lightbox-btn[hidden] { display: none; }
.lightbox-close { top: 20px; right: 24px; }
.lightbox-prev { top: 50%; left: 24px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 24px; transform: translateY(-50%); }
body.has-lightbox { overflow: hidden; }

/* ---------- 19. Accordion (<details>, animated by site.js) ---------- */
.accordion { display: flex; flex-direction: column; gap: var(--space-3); max-width: 860px; margin-inline: auto; }
.accordion { gap: 10px; }
.accordion-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.accordion-item[open] { border-color: transparent; box-shadow: var(--shadow-md); }
.accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 16px 22px;
    font-size: 1rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}
.accordion-trigger::-webkit-details-marker { display: none; }
.accordion-trigger:hover { color: var(--color-primary); }
.accordion-trigger .icon { flex: none; color: var(--color-primary); transition: transform var(--duration) var(--ease); }
.accordion-item[open] > .accordion-trigger .icon { transform: rotate(180deg); }
.accordion-panel { padding: 0 22px 18px; color: var(--color-text-muted); font-size: 0.9375rem; line-height: 1.65; }
.accordion-panel p:last-child { margin-bottom: 0; }

/* ---------- 20. Scroll reveal, lazy backgrounds, counters ---------- */
.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease);
}
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
[data-bg] { background-color: var(--color-surface-2); }
.stat-value { font-variant-numeric: tabular-nums; }

/* ---------- 21. Forms & alerts ---------- */
.form { display: grid; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-card { padding: clamp(28px, 3vw, 40px); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.form-title { margin-bottom: 6px; font-size: clamp(1.375rem, 1.7vw, 1.625rem); }
.form-intro { margin-bottom: var(--space-5); color: var(--color-text-muted); font-size: 0.9375rem; }
.form-title + .alert { margin-top: var(--space-4); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field-label { font-size: 0.875rem; font-weight: 600; }
.field-label .req { color: var(--color-error); }
.field-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    background: #fff;
    color: inherit;
    font: inherit;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.field-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.15); }
.field-input::placeholder { color: #94a3b8; }
/* Inputs, selects and file pickers share one height so side-by-side fields line up. */
input.field-input, select.field-input { min-height: 46px; }
select.field-input {
    appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' 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 14px center;
    background-size: 18px;
    cursor: pointer;
}
textarea.field-input { min-height: 128px; resize: vertical; }
.field-input[aria-invalid="true"] { border-color: var(--color-error); }
.field-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.15); }
.field-error { margin: 0; color: var(--color-error); font-size: 0.85rem; }
.field-help { margin: 0; color: var(--color-text-muted); font-size: 0.85rem; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--color-primary); }
.form-actions { display: flex; align-items: center; gap: var(--space-4); }
/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    padding: var(--space-4) var(--space-5);
    border: 1px solid;
    border-radius: var(--radius-md);
}
.alert p { margin: 0; }
.alert .icon { margin-top: 3px; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: var(--color-primary-soft); border-color: #bfdbfe; color: var(--color-primary-dark); }

/* ---------- 22. Tables, pagination, filter tabs ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.table thead th { background: var(--color-surface); color: var(--color-text-muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { border-top: 2px solid var(--color-border); border-bottom: 0; font-weight: 700; background: var(--color-surface); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: var(--space-6); }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    background: #fff;
}
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination [aria-current="page"] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pagination .is-disabled { opacity: 0.4; }

.filter-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: var(--space-6); }
.filter-tab {
    padding: 7px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.filter-tab:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-tab[aria-current="page"] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---------- 23. Blocks (public/includes/blocks.php) ---------- */
.block { padding-block: var(--section-y); }
.block.is-tinted { background: var(--color-surface); }
.block.is-dark { background: var(--color-primary-dark); color: #fff; }
.block.is-flush { padding-block: 0; }
/* Two neighbouring blocks on the same background share one gap instead of two. */
.block:not(.is-tinted):not(.is-dark):not(.is-flush) + .block:not(.is-tinted):not(.is-dark):not(.is-flush),
.block.is-tinted + .block.is-tinted { padding-top: 0; }
/* Same for page sections (forms, live lists, related…) placed next to blocks: no 128px double gaps. */
:is(.block, .section):not(.is-tinted, .is-dark, .is-flush, .section-tinted) + .section:not(.section-tinted),
.section:not(.section-tinted) + .block:not(.is-tinted, .is-dark, .is-flush),
:is(.block.is-tinted, .section-tinted) + .section-tinted,
.section-tinted + .block.is-tinted { padding-top: 0; }
/* Device visibility from the CMS (show_on_desktop / show_on_mobile). Phase 15 adds the mobile rules. */
.hide-desktop { display: none !important; }
.block-body { margin-inline: auto; }
.is-dark .section-title { color: #fff; }
.is-dark .section-sub { color: rgba(255, 255, 255, 0.75); }
.grid-fixed {
    grid-template-columns: repeat(var(--count, 1), calc((100% - (var(--cols) - 1) * var(--gutter)) / var(--cols)));
    justify-content: center;
}
.slider-track { align-items: stretch; }
.slide > .card, .slide > .testimonial { height: 100%; }

/* Text + image */
.ti-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.ti-split.is-image-left .ti-media { order: -1; }
.ti-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.ti-text .section-title { margin-bottom: var(--space-4); }
.ti-text .lead { margin-bottom: var(--space-4); }
.ti-text .btn { margin-top: var(--space-5); }
.ti-centered { max-width: calc(960px + 2 * var(--gutter)); text-align: center; }
.ti-centered .prose { margin-inline: auto; }
.ti-centered .ti-media { margin-top: var(--space-6); }
.ti-wide { position: relative; padding-block: clamp(56px, 6vw, 88px); background-size: cover; background-position: center; color: #fff; }
.ti-wide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.35)); }
.ti-wide .container { position: relative; }
.ti-wide-content { max-width: 620px; }
.ti-wide .section-title { color: #fff; }
.ti-wide .lead { color: rgba(255, 255, 255, 0.85); }

/* Feature cards */
.feature-card .card-body { gap: 10px; padding: var(--space-5); }
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.card:hover .feature-icon { background: var(--color-primary); color: #fff; }
.feature-symbol { display: none; } /* shown on desktop only (feature card polish) */
.card-link-icon { margin-top: auto; padding-top: 4px; color: var(--color-primary); }

/* Stats: a compact band, not a full-height section. */
.block-stats { padding-block: clamp(36px, 3.5vw, 48px); }
.block-stats .section-head { margin-bottom: var(--space-5); }
.stats-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); text-align: center; }
.stat { padding: var(--space-2) var(--space-5); }
.stat:not(:first-child) { border-left: 1px solid rgba(255, 255, 255, 0.14); }
.stat-value { margin: 0; font-size: clamp(2rem, 2.8vw, 2.75rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.stat-icon { display: none; } /* shown on desktop only (stats polish) */
.stat-label { margin: 6px 0 0; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.78; }

/* Check list */
.list-intro { margin-bottom: var(--space-5); }
.check-list { display: grid; gap: 10px var(--space-4); max-width: 860px; margin: 0 auto; padding: 0; list-style: none; }
.check-list.is-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 10px var(--space-4);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: 0.9375rem;
}
.check-list .icon { margin-top: 3px; color: var(--color-success); }

/* Timeline */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline-steps { position: relative; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: var(--gutter); }
.timeline-steps::before {
    content: "";
    position: absolute;
    top: 24px;
    left: calc(100% / var(--cols, 4) / 2);
    right: calc(100% / var(--cols, 4) / 2);
    height: 2px;
    background: var(--color-border);
}
.timeline-steps .timeline-item { position: relative; padding: 0 var(--space-3); text-align: center; }
.timeline-marker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    margin-bottom: var(--space-3);
    padding: 0 12px;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 0 0 6px var(--color-surface);
}
.timeline-title { margin-bottom: 6px; font-size: 1.0625rem; }
.timeline-text { margin: 0; color: var(--color-text-muted); font-size: 0.9375rem; }
.timeline-vertical { position: relative; max-width: 760px; margin-inline: auto; padding-left: 44px; }
.timeline-vertical::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 11px; width: 2px; background: var(--color-border); }
.timeline-vertical .timeline-item { position: relative; padding-bottom: var(--space-5); }
.timeline-vertical .timeline-item::before {
    content: "";
    position: absolute;
    top: 6px;
    left: -39px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-soft);
}
.timeline-vertical .timeline-marker { min-width: 0; height: auto; margin-bottom: var(--space-2); padding: 2px 12px; font-size: 0.8rem; box-shadow: none; }

/* Call to action */
.cta-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding: clamp(32px, 3.5vw, 48px) clamp(32px, 4.5vw, 56px);
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background-color: var(--color-primary-dark);
    background-image: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary));
    background-size: cover;
    background-position: center;
    color: #fff;
}
.cta-panel.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 58, 138, 0.94), rgba(29, 78, 216, 0.72)); }
.cta-panel::after { content: ""; position: absolute; top: -90px; right: -60px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, 0.07); pointer-events: none; }
.cta-panel > * { position: relative; z-index: 1; }
.cta-title { margin-bottom: var(--space-2); color: #fff; font-size: clamp(1.5rem, 2vw, 2rem); }
.cta-text { margin: 0; max-width: 60ch; opacity: 0.88; }
.cta-panel .btn { flex: none; }

/* Contact cards + map */
.contact-intro { margin-bottom: var(--space-5); text-align: center; }
.contact-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: var(--gutter); }
/* Icon above the text: four cards in a row leave too little width for a side icon (emails broke mid-word). */
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.contact-card > div { min-width: 0; max-width: 100%; }
.contact-card-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    color: var(--color-primary);
}
.contact-card-label { margin: 0 0 4px; color: var(--color-text-muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-card-value { margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.55; overflow-wrap: break-word; }
.map-frame { aspect-ratio: 21 / 9; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Date tile (notices, events) */
.date-badge {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.date-badge-day { font-size: 1.3rem; font-weight: 800; }
.date-badge-month { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* Notices */
.notice-list { display: flex; flex-direction: column; gap: var(--space-3); max-width: 900px; margin-inline: auto; }
/* Home teaser: two compact columns instead of a tall single stack (the Notice Board page keeps one column). */
.page-home .notice-list:has(> .notice-item:nth-child(2)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
}
.notice-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 120px;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.notice-item:hover { box-shadow: var(--shadow-md); }
.notice-item:target { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12); }
.notice-body { flex: 1; min-width: 0; }
.notice-title { margin: 6px 0 4px; font-size: 1rem; line-height: 1.4; }
.notice-title a { color: inherit; }
.notice-title a:hover { color: var(--color-primary); }
.notice-text { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.6; }
.notice-text p { margin-bottom: var(--space-2); }
.notice-text p:last-child { margin-bottom: 0; }

/* Feed cards */
.event-card .date-badge { position: absolute; top: 12px; left: 12px; z-index: 2; width: 50px; height: 50px; background: #fff; color: var(--color-text); box-shadow: var(--shadow-md); }
.event-card .date-badge-day { font-size: 1.15rem; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.album-count {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}
.album-count .icon { width: 14px; height: 14px; }
.video-card .card-media { display: block; }
.achievement-who { margin: 0; color: var(--color-primary); font-size: 0.875rem; font-weight: 600; }

/* Testimonials */
.testimonial {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: var(--space-5);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.testimonial-quote { flex: 1; margin: 0; color: var(--color-text); font-size: 0.975rem; font-style: italic; line-height: 1.7; }
.testimonial-quote p:last-child { margin-bottom: 0; }
.stars { display: flex; gap: 2px; color: var(--color-accent); }
.stars .icon { width: 16px; height: 16px; }
.stars .is-off { color: #cbd5e1; }
.person { display: flex; align-items: center; gap: var(--space-3); padding-top: 14px; border-top: 1px solid var(--color-border); }
.person-name { display: block; font-size: 0.95rem; font-weight: 700; }
.person-role { display: block; color: var(--color-text-muted); font-size: 0.8125rem; }
.avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 700;
}

/* Leadership messages (Principal, Prabandhak) */
.leader-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); align-items: stretch; }
.leader-grid.is-single { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin-inline: auto; }
.leader-card {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: var(--space-5);
    align-items: start;
    padding: var(--space-6) var(--space-6) var(--space-5);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
/* Large faint quote mark behind the text. */
.leader-card::after {
    content: "\201C";
    position: absolute;
    top: -18px;
    right: 18px;
    color: var(--color-primary-soft);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9rem;
    line-height: 1;
    pointer-events: none;
}
.leader-photo {
    position: relative;
    z-index: 1;
    width: 112px;
    height: 112px;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-soft), #e0e7ff);
    box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--color-border);
}
.leader-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
/* No photo uploaded yet: a neutral person silhouette (never initials). */
.leader-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--color-primary); opacity: 0.6; }
.leader-placeholder .icon { width: 52px; height: 52px; }
.leader-body { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; height: 100%; }
.leader-message { flex: 1; margin: 0; color: var(--color-text); font-size: 0.975rem; font-style: italic; line-height: 1.75; }
.leader-message p { margin-bottom: var(--space-3); }
.leader-message p:last-child { margin-bottom: 0; }
.leader-person { display: flex; flex-direction: column; gap: 2px; margin: var(--space-5) 0 0; padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.leader-name { font-size: 1.0625rem; font-weight: 700; }
.leader-role { color: var(--color-primary); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

/* Faculty directory */
.staff-group + .staff-group { margin-top: var(--space-7); }
.staff-group-title { margin-bottom: var(--space-5); padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); font-size: 1.125rem; }
.staff-card { text-align: center; }
.staff-card .card-body { align-items: center; gap: 6px; padding-top: var(--space-4); }
/* Round portrait instead of a full-width square: same photo, a third of the card height. */
.staff-photo {
    flex: none;
    width: 112px;
    height: 112px;
    aspect-ratio: 1;
    margin: var(--space-5) auto 0;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--color-border);
}
.staff-photo img { object-position: center 25%; }
.staff-initials { font-size: 2rem; font-weight: 800; letter-spacing: 0.02em; }
.staff-role { margin: 0; color: var(--color-primary); font-size: 0.875rem; font-weight: 600; }
.staff-dept, .staff-qual { margin: 0; color: var(--color-text-muted); font-size: 0.85rem; }
.staff-bio { margin: 4px 0 0; color: var(--color-text-muted); font-size: 0.85rem; font-style: italic; line-height: 1.6; }

/* ---------- 24. Page hero, breadcrumbs, intro (public/includes/pages.php) ---------- */
.page-hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(40px, 4vw, 56px);
    background-color: var(--color-primary-dark);
    background-image: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary));
    background-size: cover;
    background-position: center;
    color: #fff;
}
.page-hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.45)); }
.page-hero::after { content: ""; position: absolute; top: -120px; right: -80px; width: 380px; height: 380px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); pointer-events: none; }
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-title { max-width: 24ch; margin: 0; color: #fff; font-size: clamp(2rem, 3vw, 2.75rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; }
.page-hero-sub { max-width: 62ch; margin: var(--space-3) 0 0; color: rgba(255, 255, 255, 0.86); font-size: 1.075rem; line-height: 1.6; }
.page-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); color: rgba(255, 255, 255, 0.88); font-size: 0.9rem; }
.page-hero-meta .badge { background: rgba(255, 255, 255, 0.16); color: #fff; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--space-4); padding: 0; list-style: none; color: rgba(255, 255, 255, 0.72); font-size: 0.8125rem; font-weight: 500; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.breadcrumbs a { color: #fff; opacity: 0.85; }
.breadcrumbs a:hover { color: #fff; opacity: 1; }
.page-intro-text { font-size: 1.075rem; }
.page-intro + .block:not(.is-tinted):not(.is-dark):not(.is-flush) { padding-top: 0; }
.session-banner { background: var(--color-accent); color: #1f2937; font-weight: 600; }
.session-banner-inner { display: flex; align-items: center; justify-content: center; gap: var(--space-3); min-height: 52px; }

/* Academics live lists */
.live-lists { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: var(--gutter); }
/* One panel alone (e.g. only "Classes offered") matches the 860px content column instead of spanning the page. */
.live-lists:has(> .live-panel:only-child) { max-width: 860px; margin-inline: auto; }
.live-panel { padding: 20px 22px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.live-panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 1.0625rem; }
.live-panel-title .icon { color: var(--color-primary); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--color-primary-soft); color: var(--color-primary-dark); font-size: 0.875rem; font-weight: 600; }
.chip small { color: var(--color-text-muted); font-size: 0.8rem; font-weight: 400; }

/* Contact: form beside the map */
.contact-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-6); align-items: stretch; }
.contact-layout .map-frame { height: 100%; min-height: 420px; aspect-ratio: auto; box-shadow: var(--shadow-sm); }

/* ---------- 25. Detail pages: news, event, album (public/includes/details.php) ---------- */
.detail-cover { margin: 0 0 var(--space-5); overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.detail-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 460px; object-fit: cover; }
/* Lead and body share one measure so their right edges line up. */
.detail-lead { max-width: 720px; margin-bottom: var(--space-5); padding-left: var(--space-4); border-left: 3px solid var(--color-accent); color: var(--color-text); font-weight: 500; }
.detail-body { max-width: 720px; font-size: 1.0625rem; }
.detail-back { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-6); font-size: 0.9375rem; font-weight: 600; }
.detail-back .icon { width: 18px; height: 18px; }
.detail-back:hover .icon { transform: translateX(-3px); }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 3.5vw, 48px); align-items: start; }
.event-aside { position: sticky; top: 110px; }
.event-panel { padding: 22px; background: #fff; border: 1px solid var(--color-border); border-top: 4px solid var(--event-color, var(--color-primary)); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.event-panel-status { margin-bottom: var(--space-4); }
.event-facts { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.event-fact { display: flex; align-items: center; gap: var(--space-3); }
.event-fact-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--color-primary-soft); color: var(--color-primary); }
.event-fact-swatch::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--dot, var(--color-primary)); }
.event-fact-label { display: block; color: var(--color-text-muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.event-fact-value { display: block; font-size: 0.9375rem; font-weight: 600; }
.album-intro { margin: 0 auto var(--space-6); color: var(--color-text-muted); text-align: center; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.photo-tile { margin: 0; }
.photo-tile a { display: block; overflow: hidden; border-radius: var(--radius-md); background: var(--color-surface-2); box-shadow: var(--shadow-sm); }
.photo-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform var(--duration-slow) var(--ease); }
.photo-tile a:hover img, .photo-tile a:focus-visible img { transform: scale(1.05); }
.photo-caption { margin-top: var(--space-2); color: var(--color-text-muted); font-size: 0.85rem; }
.album-subtitle { margin: var(--space-7) 0 var(--space-4); font-size: 1.25rem; }
.album-foot { text-align: center; }
.related-section .card-title { font-size: 1.15rem; }

/* ---------- 26. Public forms + careers (public/includes/forms.php) ---------- */
.form-card { scroll-margin-top: 110px; }
.form-card .alert { margin-bottom: var(--space-5); }
.form-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form-legend { width: 100%; margin-bottom: var(--space-4); padding: 0 0 var(--space-2); border-bottom: 1px solid var(--color-border); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary-dark); }
.field-file { padding: 4px 6px; background: var(--color-surface); color: var(--color-text-muted); font-size: 0.92rem; cursor: pointer; }
.field-file::file-selector-button {
    margin-right: var(--space-3);
    padding: 4px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--color-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.field-file:hover::file-selector-button { border-color: var(--color-primary); color: var(--color-primary); }
.form-actions .field-help { margin-left: auto; }
.form-contact-list { display: grid; gap: var(--space-3); margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.form-contact-list li { display: flex; align-items: center; gap: var(--space-3); font-weight: 600; }
.form-contact-list .icon { color: var(--color-primary); }
.form-solo { margin-inline: auto; }
.job-list { display: grid; gap: var(--space-3); }
.job-summary > span { display: grid; gap: var(--space-2); }
.job-title { font-size: 1.0625rem; font-weight: 700; }
.job-summary .card-meta { margin: 0; font-weight: 400; color: var(--color-text-muted); font-size: 0.85rem; }
.accordion-item[open] > .job-summary .card-meta .icon, .job-summary .card-meta .icon { transform: none; color: inherit; }
.job-subtitle { margin: var(--space-5) 0 var(--space-3); color: var(--color-text); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.job-item .check-list { margin: 0; max-width: none; }
.job-apply { margin: var(--space-5) 0 0; }

/* ---------- 27. Check Result (public/includes/result.php) ---------- */
.result-form-card .form-intro { margin-bottom: var(--space-5); }
.result-card { margin-bottom: var(--space-6); padding: clamp(28px, 3vw, 40px); background: #fff; border: 1px solid var(--color-border); border-top: 5px solid var(--color-primary); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.result-card-head { margin-bottom: var(--space-5); text-align: center; }
.result-card-head .eyebrow { margin-bottom: var(--space-2); }
.result-card-title { margin: 0; font-size: 1.5rem; }
.result-student { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin: 0 0 var(--space-5); padding: 18px 20px; background: var(--color-surface); border-radius: var(--radius-md); }
.result-student dt { color: var(--color-text-muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.result-student dd { margin: 4px 0 0; font-weight: 700; font-size: 1rem; }
.result-summary { display: flex; align-items: baseline; justify-content: center; gap: var(--space-3); margin-top: var(--space-5); }
.result-percent { color: var(--color-primary); font-size: 2.5rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.result-percent-label { color: var(--color-text-muted); font-weight: 600; }
.result-note { margin: var(--space-5) 0 0; color: var(--color-text-muted); font-size: 0.85rem; text-align: center; }
.result-again { text-align: center; }
.result-again .link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* ---------- 28. Inner-page card accents (every page except Home) ----------
   Cards in a row cycle through four accents (blue, teal, violet, amber). --ac-rgb drives borders,
   bars and tinted shadows; --ac-ink is the darker shade used for text and icons (AA contrast on white);
   --ac-soft is the pale wash. Values are set on the grid's children so cards inside slides inherit them. */
.site:not(.page-home) { --ac-rgb: 29, 78, 216; --ac-ink: #1e40af; --ac-soft: #eff6ff; }
.site:not(.page-home) :is(.grid, .slider-track, .contact-grid, .live-lists, .leader-grid) > :nth-child(4n+2) { --ac-rgb: 13, 148, 136; --ac-ink: #0f766e; --ac-soft: #f0fdfa; }
.site:not(.page-home) :is(.grid, .slider-track, .contact-grid, .live-lists, .leader-grid) > :nth-child(4n+3) { --ac-rgb: 124, 58, 237; --ac-ink: #6d28d9; --ac-soft: #f5f3ff; }
.site:not(.page-home) :is(.grid, .slider-track, .contact-grid, .live-lists, .leader-grid) > :nth-child(4n+4) { --ac-rgb: 217, 119, 6; --ac-ink: #b45309; --ac-soft: #fffbeb; }

/* Cards: accent top bar, faint wash toward the foot, accent-tinted shadow. */
.site:not(.page-home) .card {
    border-color: rgba(var(--ac-rgb), 0.14);
    background: linear-gradient(180deg, #fff 0%, #fff 60%, var(--ac-soft) 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 14px -8px rgba(var(--ac-rgb), 0.22);
}
.site:not(.page-home) .card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    height: 3px;
    background: linear-gradient(90deg, rgb(var(--ac-rgb)), rgba(var(--ac-rgb), 0.4));
    pointer-events: none;
    transform-origin: left;
    transition: transform var(--duration-slow) var(--ease);
}
/* Over a photo the bar only draws in on hover. */
.site:not(.page-home) .card:not(.staff-card):has(> .card-media)::before { transform: scaleX(0); }
.site:not(.page-home) .card:hover::before,
.site:not(.page-home) .card:not(.staff-card):has(> .card-media):hover::before { transform: scaleX(1); }
.site:not(.page-home) .card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--ac-rgb), 0.32);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05), 0 22px 40px -18px rgba(var(--ac-rgb), 0.45);
}
.site:not(.page-home) .card-title { transition: color var(--duration) var(--ease); }
.site:not(.page-home) .card:hover .card-title { color: var(--ac-ink); }
.site:not(.page-home) .feature-icon { background: var(--ac-soft); color: var(--ac-ink); box-shadow: inset 0 0 0 1px rgba(var(--ac-rgb), 0.16); }
.site:not(.page-home) .card:hover .feature-icon { background: linear-gradient(135deg, rgb(var(--ac-rgb)), rgba(var(--ac-rgb), 0.78)); color: #fff; box-shadow: 0 6px 14px -6px rgba(var(--ac-rgb), 0.6); }
.site:not(.page-home) .card-link-icon { color: var(--ac-ink); }
.site:not(.page-home) .card .media-placeholder { background: linear-gradient(135deg, var(--ac-soft), rgba(var(--ac-rgb), 0.16)); color: var(--ac-ink); }
.site:not(.page-home) .achievement-who { color: var(--ac-ink); }
.site:not(.page-home) .event-card .date-badge { box-shadow: inset 0 -3px 0 rgb(var(--ac-rgb)), var(--shadow-md); }
.site:not(.page-home) .event-card .date-badge-month { color: var(--ac-ink); }

/* Staff: accent band behind the portrait, accent ring. */
.site:not(.page-home) .staff-card { background: linear-gradient(180deg, var(--ac-soft) 0, rgba(var(--ac-rgb), 0.08) 84px, #fff 84px); }
.site:not(.page-home) .staff-photo { box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(var(--ac-rgb), 0.35); }
.site:not(.page-home) .staff-card:hover .staff-photo { box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgb(var(--ac-rgb)); }
.site:not(.page-home) .staff-role { color: var(--ac-ink); }

/* Notices: colour follows the notice type (alert = red, general = slate, others = blue). */
.site:not(.page-home) .notice-item { --n-rgb: 29, 78, 216; --n-ink: #1e40af; border-left: 4px solid rgb(var(--n-rgb)); background: linear-gradient(90deg, rgba(var(--n-rgb), 0.05), #fff 45%); }
.site:not(.page-home) .notice-item:has(.badge-danger) { --n-rgb: 220, 38, 38; --n-ink: #b91c1c; }
.site:not(.page-home) .notice-item:has(.badge-muted) { --n-rgb: 100, 116, 139; --n-ink: #475569; }
.site:not(.page-home) .notice-item .date-badge { background: rgba(var(--n-rgb), 0.1); color: var(--n-ink); }
.site:not(.page-home) .notice-item:hover { border-color: rgba(var(--n-rgb), 0.3); border-left-color: rgb(var(--n-rgb)); box-shadow: 0 16px 32px -18px rgba(var(--n-rgb), 0.45); }

/* Contact cards and info panels. */
.site:not(.page-home) .contact-card {
    border-color: rgba(var(--ac-rgb), 0.16);
    background: linear-gradient(180deg, var(--ac-soft), #fff 65%);
    transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.site:not(.page-home) .contact-card:hover { border-color: rgba(var(--ac-rgb), 0.34); box-shadow: 0 18px 34px -18px rgba(var(--ac-rgb), 0.45); }
.site:not(.page-home) .contact-card-icon { background: linear-gradient(135deg, rgb(var(--ac-rgb)), rgba(var(--ac-rgb), 0.78)); color: #fff; box-shadow: 0 6px 14px -6px rgba(var(--ac-rgb), 0.55); }
.site:not(.page-home) .live-panel { border-top: 3px solid rgb(var(--ac-rgb)); background: linear-gradient(180deg, var(--ac-soft), #fff 80px); }
.site:not(.page-home) .live-panel-title .icon { color: var(--ac-ink); }
.site:not(.page-home) .live-panel .chip { background: #fff; color: var(--ac-ink); box-shadow: inset 0 0 0 1px rgba(var(--ac-rgb), 0.25); }

/* Check lists and accordions (FAQ, job openings). */
.site:not(.page-home) .check-list li {
    border-left: 3px solid var(--color-success);
    background: linear-gradient(90deg, #f0fdf4, #fff 40%);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.site:not(.page-home) .check-list li:hover { transform: translateX(3px); box-shadow: var(--shadow-md); }
.site:not(.page-home) .accordion-item { transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease); }
.site:not(.page-home) .accordion-item:hover { border-color: rgba(29, 78, 216, 0.28); }
.site:not(.page-home) .accordion-item[open] {
    border-color: rgba(29, 78, 216, 0.2);
    background: linear-gradient(180deg, var(--color-primary-soft), #fff 72px);
    box-shadow: inset 3px 0 0 var(--color-primary), 0 18px 36px -20px rgba(29, 78, 216, 0.45);
}
.site:not(.page-home) .accordion-trigger > .icon { padding: 3px; border-radius: 50%; background: var(--color-primary-soft); box-sizing: content-box; }

/* Form, result and event panels: a thin tri-colour strip on top, soft wash below. */
.site:not(.page-home) .form-card {
    background:
        linear-gradient(90deg, #1d4ed8, #7c3aed 55%, #0d9488) top / 100% 4px no-repeat,
        linear-gradient(180deg, #fff 0%, #fff 70%, #f8fafc 100%);
    border-color: rgba(29, 78, 216, 0.12);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04), 0 24px 48px -28px rgba(29, 78, 216, 0.35);
}
.site:not(.page-home) .result-card { background: linear-gradient(180deg, var(--color-primary-soft), #fff 140px); }
.site:not(.page-home) .result-student { background: linear-gradient(135deg, #f8fafc, var(--color-primary-soft)); box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.08); }
.site:not(.page-home) .event-panel { background: linear-gradient(180deg, var(--color-surface), #fff 110px); }
.site:not(.page-home) .event-fact-icon { box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.14); }

/* Testimonials, leadership cards and photo tiles (when placed on inner pages). */
.site:not(.page-home) .testimonial {
    border-top: 3px solid rgb(var(--ac-rgb));
    background: linear-gradient(180deg, var(--ac-soft), #fff 90px);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.site:not(.page-home) .testimonial:hover { transform: translateY(-3px); box-shadow: 0 20px 38px -18px rgba(var(--ac-rgb), 0.45); }
.site:not(.page-home) .leader-card { border-top-color: rgb(var(--ac-rgb)); background: linear-gradient(180deg, var(--ac-soft), #fff 120px); }
.site:not(.page-home) .leader-card::after { color: rgba(var(--ac-rgb), 0.12); }
.site:not(.page-home) .leader-role { color: var(--ac-ink); }
.site:not(.page-home) .photo-tile a { transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease); }
.site:not(.page-home) .photo-tile a:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.25), var(--shadow-lg); }

/* ---------- 29. Home page only: colour on hover/tap + entrance animations ----------
   Everything here is prefixed with .page-home, so no other page changes. Cards stay as they are at
   rest and light up in one of four accents (blue, teal, violet, amber) when hovered, focused or tapped.
   Entrance animations run only when scroll-reveal is on (html.reveal-ready: the admin setting
   "Fade sections in on scroll" and no reduced-motion preference). They use fill-mode "backwards"
   so the hover lift still works once a card has arrived. */
.page-home { --ac-rgb: 29, 78, 216; --ac-ink: #1e40af; --ac-soft: #eff6ff; --n-rgb: 29, 78, 216; --n-ink: #1e40af; }
.page-home :is(.grid, .slider-track, .leader-grid) > :nth-child(4n+2) { --ac-rgb: 13, 148, 136; --ac-ink: #0f766e; --ac-soft: #f0fdfa; }
.page-home :is(.grid, .slider-track, .leader-grid) > :nth-child(4n+3) { --ac-rgb: 124, 58, 237; --ac-ink: #6d28d9; --ac-soft: #f5f3ff; }
.page-home :is(.grid, .slider-track, .leader-grid) > :nth-child(4n+4) { --ac-rgb: 217, 119, 6; --ac-ink: #b45309; --ac-soft: #fffbeb; }
.page-home .notice-item:has(.badge-danger) { --n-rgb: 220, 38, 38; --n-ink: #b91c1c; }
.page-home .notice-item:has(.badge-muted) { --n-rgb: 100, 116, 139; --n-ink: #475569; }
.page-home :is(.card, .notice-item, .testimonial, .leader-card) { -webkit-tap-highlight-color: transparent; }

/* Cards: accent bar draws in, colour wash, lift and tinted glow. */
.page-home .card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    height: 4px;
    background: linear-gradient(90deg, rgb(var(--ac-rgb)), rgba(var(--ac-rgb), 0.45));
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-slow) var(--ease);
}
.page-home .card:is(:hover, :focus-within, :active) {
    transform: translateY(-6px);
    background: linear-gradient(160deg, var(--ac-soft), #fff 62%);
    border-color: rgba(var(--ac-rgb), 0.35);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05), 0 24px 44px -20px rgba(var(--ac-rgb), 0.55);
}
.page-home .card:active { transform: translateY(-2px) scale(0.985); transition-duration: 120ms; }
.page-home .card:is(:hover, :focus-within, :active)::before { transform: scaleX(1); }
.page-home .card-title { transition: color var(--duration) var(--ease); }
.page-home .card:is(:hover, :focus-within, :active) .card-title { color: var(--ac-ink); }
.page-home .card:is(:hover, :focus-within, :active) .badge:not(.badge-dot) { background: rgb(var(--ac-rgb)); color: #fff; }
.page-home .feature-icon { transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration-slow) var(--ease), box-shadow var(--duration) var(--ease); }
.page-home .card:is(:hover, :focus-within, :active) .feature-icon {
    background: linear-gradient(135deg, rgb(var(--ac-rgb)), rgba(var(--ac-rgb), 0.75));
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(var(--ac-rgb), 0.7);
    transform: rotate(-6deg) scale(1.08);
}
.page-home .card-link-icon .icon { transition: transform var(--duration) var(--ease); }
.page-home .card:is(:hover, :focus-within, :active) .card-link-icon { color: var(--ac-ink); }
.page-home .card:is(:hover, :focus-within, :active) .card-link-icon .icon { transform: translateX(5px); }
.page-home .card:is(:hover, :focus-within, :active) .achievement-who { color: var(--ac-ink); }
.page-home .event-card .date-badge { transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.page-home .event-card:is(:hover, :focus-within, :active) .date-badge { box-shadow: inset 0 -3px 0 rgb(var(--ac-rgb)), var(--shadow-md); transform: translateY(-2px); }

/* Notices: type colour (alert red, general slate, others blue) shows on hover/tap. */
.page-home .notice-item { transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease), background-color var(--duration) var(--ease); }
.page-home .notice-item .date-badge { transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease); }
.page-home .notice-item:is(:hover, :focus-within, :active) {
    transform: translateY(-3px);
    border-color: rgba(var(--n-rgb), 0.35);
    background-color: rgba(var(--n-rgb), 0.04);
    box-shadow: inset 4px 0 0 rgb(var(--n-rgb)), 0 18px 34px -18px rgba(var(--n-rgb), 0.5);
}
.page-home .notice-item:is(:hover, :focus-within, :active) .date-badge { background: rgb(var(--n-rgb)); color: #fff; transform: scale(1.06); }
.page-home .notice-item:is(:hover, :focus-within, :active) .notice-title { color: var(--n-ink); }

/* Testimonials and leadership cards. */
.page-home :is(.testimonial, .leader-card) { transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease), background-color var(--duration) var(--ease); }
.page-home .testimonial:is(:hover, :focus-within, :active) {
    transform: translateY(-5px);
    border-color: rgba(var(--ac-rgb), 0.35);
    background-color: var(--ac-soft);
    box-shadow: inset 0 4px 0 rgb(var(--ac-rgb)), 0 22px 40px -20px rgba(var(--ac-rgb), 0.5);
}
.page-home .testimonial:is(:hover, :focus-within, :active) .avatar { background: rgb(var(--ac-rgb)); color: #fff; }
.page-home .leader-card:is(:hover, :focus-within, :active) {
    transform: translateY(-4px);
    border-top-color: rgb(var(--ac-rgb));
    background-color: var(--ac-soft);
    box-shadow: 0 24px 44px -22px rgba(var(--ac-rgb), 0.5);
}
.page-home .leader-photo { transition: box-shadow var(--duration) var(--ease), transform var(--duration-slow) var(--ease); }
.page-home .leader-card:is(:hover, :focus-within, :active) .leader-photo { box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgb(var(--ac-rgb)); transform: scale(1.04); }
.page-home .leader-card:is(:hover, :focus-within, :active)::after { color: rgba(var(--ac-rgb), 0.16); }

/* Stats: numbers glow amber on hover/tap. */
.page-home .stat-value { transition: color var(--duration) var(--ease), transform var(--duration) var(--ease); }
.page-home .stat:is(:hover, :active) .stat-value { color: #fcd34d; transform: scale(1.06); }

/* Stats polish — desktop only (≥1024px; phones/tablets keep the rules above).
   Each figure is a vivid gradient card (colour cycles every 4) with a floating glow blob,
   a light sweep that passes every few seconds, and a lift + coloured glow on hover. */
@media (min-width: 1024px) {
    .block-stats.is-dark {
        padding-block: clamp(40px, 3.6vw, 56px);
        background-color: var(--color-primary-dark);
        background-image:
            radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.5px),
            radial-gradient(600px 300px at 12% 0%, color-mix(in srgb, var(--color-primary) 50%, transparent), transparent 70%),
            linear-gradient(135deg, var(--color-primary-dark) 0%, color-mix(in srgb, var(--color-primary-dark) 65%, #020617) 100%);
        background-size: 22px 22px, auto, auto;
    }
    .block-stats .section-head { margin-bottom: var(--space-5); }
    .stats-grid { gap: clamp(14px, 1.4vw, 20px); }

    .stat,
    .stat:not(:first-child) {
        --c1: #6366f1;
        --c2: #8b5cf6;
        position: relative;
        isolation: isolate;
        padding: clamp(16px, 1.5vw, 22px) var(--space-4);
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 16px;
        background: linear-gradient(140deg, var(--c1) 0%, var(--c2) 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 18px 40px -18px var(--c2);
        overflow: hidden;
        transition: transform 420ms var(--ease), box-shadow 420ms var(--ease);
    }
    .stat:nth-child(4n+2) { --c1: #10b981; --c2: #0891b2; }
    .stat:nth-child(4n+3) { --c1: #f59e0b; --c2: #ea580c; }
    .stat:nth-child(4n+4) { --c1: #ec4899; --c2: #e11d48; }

    /* Glow blob drifting in the top-right corner. */
    .stat::after {
        content: "";
        position: absolute;
        z-index: -1;
        top: -45%;
        right: -25%;
        width: 75%;
        aspect-ratio: 1;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 70%);
        animation: stat-float 7s ease-in-out infinite alternate;
    }
    .stat:nth-child(2)::after { animation-delay: -2s; }
    .stat:nth-child(3)::after { animation-delay: -4s; }
    .stat:nth-child(4)::after { animation-delay: -6s; }

    /* Diagonal light sweep, staggered card by card. */
    .stat::before {
        content: "";
        position: absolute;
        z-index: 1;
        inset: 0;
        width: auto;
        height: auto;
        left: 0;
        border-radius: 0;
        background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.32) 50%, transparent 65%);
        transform: translateX(-120%);
        animation: stat-shine 6s var(--ease) infinite;
        pointer-events: none;
    }
    .stat:nth-child(2)::before { animation-delay: 0.6s; }
    .stat:nth-child(3)::before { animation-delay: 1.2s; }
    .stat:nth-child(4)::before { animation-delay: 1.8s; }

    .stat:hover {
        transform: translateY(-5px) rotate(-1deg);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 28px 50px -16px var(--c2), 0 0 0 4px color-mix(in srgb, var(--c1) 30%, transparent);
    }

    .stat-value {
        position: relative;
        z-index: 2;
        font-size: clamp(1.875rem, 2.2vw, 2.25rem);
        text-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    }
    .page-home .stat:is(:hover, :active) .stat-value { color: #fff; transform: scale(1.1); }
    .stat-label {
        position: relative;
        z-index: 2;
        display: inline-block;
        margin-top: 8px;
        padding: 3px 10px;
        border-radius: var(--radius-pill);
        background: rgba(255, 255, 255, 0.18);
        font-size: 0.68rem;
        letter-spacing: 0.14em;
        opacity: 1;
    }

    /* Icon tile on the left, number + label beside it — keeps the cards short. */
    .stat,
    .stat:not(:first-child) {
        display: grid;
        grid-template-columns: auto auto;
        justify-content: center;
        align-items: center;
        column-gap: 16px;
        text-align: left;
    }
    .stat-icon {
        position: relative;
        z-index: 2;
        grid-row: 1 / span 2;
        display: grid;
        place-items: center;
        width: 54px;
        height: 54px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.22);
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 18px -8px rgba(0, 0, 0, 0.35);
        animation: stat-bob 3.2s ease-in-out infinite;
        transition: transform 420ms var(--ease), background-color 420ms var(--ease);
    }
    .stat:nth-child(2) .stat-icon { animation-delay: -0.8s; }
    .stat:nth-child(3) .stat-icon { animation-delay: -1.6s; }
    .stat:nth-child(4) .stat-icon { animation-delay: -2.4s; }
    .stat-icon .icon { width: 28px; height: 28px; color: #fff; }
    .stat:hover .stat-icon { animation-play-state: paused; transform: rotate(-10deg) scale(1.12); background: rgba(255, 255, 255, 0.32); }
    .stat-value { align-self: end; line-height: 1; }
    .page-home .stat:is(:hover, :active) .stat-value { transform: scale(1.06); transform-origin: left center; }
    .stat-label { align-self: start; justify-self: start; }
}
@keyframes stat-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
@keyframes stat-float {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-30%, 25%) scale(1.25); }
}
@keyframes stat-shine {
    0%, 55% { transform: translateX(-120%); }
    80%, 100% { transform: translateX(120%); }
}

/* Feature cards ("Why families choose us") — desktop only (≥1024px; phones/tablets keep the rules above).
   Accent-coloured icon tile with a pulsing halo, the 01/02/03 number as an outlined watermark,
   a soft glow in the corner and a round arrow button. Colours come from the card's --ac-* accent. */
@media (min-width: 1024px) {
    .page-home .feature-card {
        border-radius: 20px;
        border-color: rgba(var(--ac-rgb), 0.14);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px -18px rgba(var(--ac-rgb), 0.35);
        transition: transform 420ms var(--ease), box-shadow 420ms var(--ease), border-color 420ms var(--ease), background-color 420ms var(--ease);
    }
    /* Corner glow that swells on hover. */
    .page-home .feature-card::after {
        content: "";
        position: absolute;
        right: -70px;
        bottom: -70px;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(var(--ac-rgb), 0.16) 0%, rgba(var(--ac-rgb), 0) 70%);
        pointer-events: none;
        transition: transform 600ms var(--ease);
    }
    .page-home .feature-card:is(:hover, :focus-within)::after { transform: scale(1.8); }
    .page-home .feature-card .card-body { position: relative; z-index: 1; gap: 10px; padding: 24px 22px 22px; }

    /* Every card on one row, however many the admin adds; 5th card gets its own colour. */
    .page-home .block-cards .grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 20px;
    }
    .page-home .block-cards .grid > :nth-child(5n) { --ac-rgb: 225, 29, 72; --ac-ink: #be123c; --ac-soft: #fff1f2; }
    .page-home .grid > :nth-child(4) .feature-symbol::before { animation-delay: 2.7s; }
    .page-home .grid > :nth-child(5) .feature-symbol::before { animation-delay: 3.6s; }

    /* Icon tile + halo. */
    .page-home .feature-symbol {
        position: relative;
        display: grid;
        place-items: center;
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
        border-radius: 16px;
        background: linear-gradient(135deg, rgb(var(--ac-rgb)) 0%, rgba(var(--ac-rgb), 0.72) 100%);
        color: #fff;
        box-shadow: 0 12px 22px -10px rgba(var(--ac-rgb), 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transition: transform 500ms var(--ease), border-radius 500ms var(--ease);
    }
    .page-home .feature-symbol::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        border: 2px solid rgba(var(--ac-rgb), 0.45);
        animation: feature-halo 2.8s var(--ease) infinite;
    }
    .page-home .grid > :nth-child(2) .feature-symbol::before { animation-delay: 0.9s; }
    .page-home .grid > :nth-child(3) .feature-symbol::before { animation-delay: 1.8s; }
    .page-home .feature-symbol .icon { width: 25px; height: 25px; }
    .page-home .feature-card:is(:hover, :focus-within) .feature-symbol { transform: rotate(-8deg) scale(1.08); border-radius: 50%; }

    /* 01 / 02 / 03 as an outlined watermark in the top-right corner. */
    .page-home .feature-card .feature-icon,
    .page-home .feature-card:is(:hover, :focus-within, :active) .feature-icon {
        position: absolute;
        top: 14px;
        right: 18px;
        width: auto;
        height: auto;
        margin: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        color: transparent;
        -webkit-text-stroke: 1.5px rgba(var(--ac-rgb), 0.22);
        font-size: 3.25rem;
        font-weight: 800;
        line-height: 1;
        letter-spacing: -0.04em;
        transition: transform 500ms var(--ease), -webkit-text-stroke-color 500ms var(--ease), color 500ms var(--ease);
    }
    .page-home .feature-card:is(:hover, :focus-within, :active) .feature-icon {
        color: rgba(var(--ac-rgb), 0.08);
        -webkit-text-stroke-color: rgba(var(--ac-rgb), 0.5);
        transform: translateY(-4px) scale(1.06);
    }

    .page-home .feature-card .card-title { font-size: 1.05rem; letter-spacing: -0.01em; }

    /* Arrow becomes a round button that fills with the accent colour. */
    .page-home .feature-card .card-link-icon {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        margin-top: auto;
        padding: 0;
        border-radius: 50%;
        background: var(--ac-soft);
        color: var(--ac-ink);
        transition: background-color 420ms var(--ease), color 420ms var(--ease), box-shadow 420ms var(--ease);
    }
    .page-home .feature-card .card-text { margin-bottom: 8px; font-size: 0.9rem; }
    .page-home .feature-card:is(:hover, :focus-within, :active) .card-link-icon {
        background: rgb(var(--ac-rgb));
        color: #fff;
        box-shadow: 0 8px 16px -6px rgba(var(--ac-rgb), 0.6);
    }
}
@keyframes feature-halo {
    0%   { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.45); opacity: 0; }
}

/* Academics + Facilities + About cards — desktop only (≥1024px; phones/tablets keep the rules above).
   Gradient icon tile with a dashed orbit ring + travelling dot, the 01–04 number as an outlined
   watermark, and a 3D flip of the icon on hover. Colours come from the card's --ac-* accent. */
@media (min-width: 1024px) {
    .site:is(.page-academics, .page-facilities, .page-about) .feature-card {
        border-radius: 20px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 30px -20px rgba(var(--ac-rgb), 0.4);
        transition: transform 420ms var(--ease), box-shadow 420ms var(--ease), border-color 420ms var(--ease);
    }
    .site:is(.page-academics, .page-facilities, .page-about) .feature-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05), 0 28px 48px -20px rgba(var(--ac-rgb), 0.55);
    }
    .site:is(.page-academics, .page-facilities, .page-about) .feature-card .card-body { position: relative; gap: 10px; padding: 32px 26px 28px; }

    /* Icon tile, orbit ring and dot. */
    .site:is(.page-academics, .page-facilities, .page-about) .feature-symbol {
        position: relative;
        display: grid;
        place-items: center;
        width: 60px;
        height: 60px;
        margin: 6px 0 14px 6px;
        border-radius: 50%;
        background: linear-gradient(135deg, rgb(var(--ac-rgb)) 0%, rgba(var(--ac-rgb), 0.7) 100%);
        color: #fff;
        box-shadow: 0 14px 24px -10px rgba(var(--ac-rgb), 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3);
        perspective: 400px;
    }
    .site:is(.page-academics, .page-facilities, .page-about) .feature-symbol::before {
        content: "";
        position: absolute;
        inset: -8px;
        border-radius: 50%;
        border: 1.5px dashed rgba(var(--ac-rgb), 0.45);
        animation: acad-spin 16s linear infinite;
    }
    .site:is(.page-academics, .page-facilities, .page-about) .feature-symbol::after {
        content: "";
        position: absolute;
        top: -11px;
        left: calc(50% - 3.5px);
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgb(var(--ac-rgb));
        box-shadow: 0 0 0 3px #fff, 0 0 10px rgba(var(--ac-rgb), 0.8);
        transform-origin: 3.5px 41px; /* centre of the 60px tile */
        animation: acad-spin 5s linear infinite;
    }
    .site:is(.page-academics, .page-facilities, .page-about) .grid > :nth-child(2) .feature-symbol::after { animation-delay: -1.25s; }
    .site:is(.page-academics, .page-facilities, .page-about) .grid > :nth-child(3) .feature-symbol::after { animation-delay: -2.5s; }
    .site:is(.page-academics, .page-facilities, .page-about) .grid > :nth-child(4) .feature-symbol::after { animation-delay: -3.75s; }
    .site:is(.page-academics, .page-facilities, .page-about) .grid > :nth-child(5) .feature-symbol::after { animation-delay: -0.6s; }
    .site:is(.page-academics, .page-facilities, .page-about) .grid > :nth-child(6) .feature-symbol::after { animation-delay: -3.1s; }
    .site:is(.page-academics, .page-facilities, .page-about) .feature-symbol .icon { width: 28px; height: 28px; transition: transform 800ms var(--ease); }
    .site:is(.page-academics, .page-facilities, .page-about) .feature-card:hover .feature-symbol .icon { transform: rotateY(360deg) scale(1.1); }

    /* 01–04 as an outlined watermark. */
    .site:is(.page-academics, .page-facilities, .page-about) .feature-card .feature-icon,
    .site:is(.page-academics, .page-facilities, .page-about) .feature-card:hover .feature-icon {
        position: absolute;
        top: 18px;
        right: 22px;
        width: auto;
        height: auto;
        margin: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        color: transparent;
        -webkit-text-stroke: 1.5px rgba(var(--ac-rgb), 0.22);
        font-size: 3.75rem;
        font-weight: 800;
        line-height: 1;
        letter-spacing: -0.04em;
        transition: transform 500ms var(--ease), color 500ms var(--ease), -webkit-text-stroke-color 500ms var(--ease);
    }
    .site:is(.page-academics, .page-facilities, .page-about) .feature-card:hover .feature-icon {
        color: rgba(var(--ac-rgb), 0.1);
        -webkit-text-stroke-color: rgba(var(--ac-rgb), 0.55);
        transform: translateY(-4px) scale(1.06);
    }
    .site:is(.page-academics, .page-facilities, .page-about) .feature-card .card-title { font-size: 1.15rem; letter-spacing: -0.01em; }
}
@keyframes acad-spin { to { transform: rotate(360deg); } }

/* Student Life page — desktop only (≥1024px; phones/tablets keep the rules above). Pure styling on
   the CMS content: a taller hero with floating confetti and a spinning dashed ring, the title rising
   in over an accent rule; "Beyond the classroom" cards with a bobbing gradient icon tile, pulse ring,
   corner glow and a number pill; "Moments" albums with a darkening overlay and a "+" that pops in.
   Colours come from each card's --ac-* accent. Reduced motion stops every animation (section 30). */
@media (min-width: 1024px) {
    /* Hero */
    .site.page-student-life .page-hero { padding-block: clamp(72px, 7vw, 108px); }
    .site.page-student-life .page-hero::after {
        top: -140px;
        right: -60px;
        width: 420px;
        height: 420px;
        background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 70%);
        animation: sl-float 9s ease-in-out infinite alternate;
    }
    .site.page-student-life .page-hero-inner::before {
        content: "";
        position: absolute;
        top: 50%;
        right: calc(var(--gutter) + 40px);
        width: 300px;
        height: 190px;
        margin-top: -95px;
        background:
            radial-gradient(circle, #fbbf24 0 9px, transparent 10px) 18% 22% / 40px 40px no-repeat,
            radial-gradient(circle, #34d399 0 6px, transparent 7px) 72% 12% / 30px 30px no-repeat,
            radial-gradient(circle, #f472b6 0 11px, transparent 12px) 88% 64% / 40px 40px no-repeat,
            radial-gradient(circle, #60a5fa 0 7px, transparent 8px) 40% 82% / 30px 30px no-repeat,
            radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 4px, transparent 5px) 56% 44% / 20px 20px no-repeat,
            radial-gradient(circle, #a78bfa 0 5px, transparent 6px) 4% 70% / 20px 20px no-repeat;
        z-index: -1; /* behind the title text, whatever its length */
        pointer-events: none;
        animation: sl-float 7s ease-in-out infinite alternate;
    }
    .site.page-student-life .page-hero-inner::after {
        content: "";
        position: absolute;
        right: calc(var(--gutter) + 220px);
        bottom: -36px;
        width: 96px;
        height: 96px;
        border: 2px dashed rgba(255, 255, 255, 0.35);
        border-radius: 50%;
        z-index: -1; /* behind the title text, whatever its length */
        pointer-events: none;
        animation: acad-spin 22s linear infinite;
    }
    .site.page-student-life .page-hero-title { font-size: clamp(2.5rem, 3.6vw, 3.25rem); }
    .site.page-student-life .page-hero-title::after {
        content: "";
        display: block;
        width: 72px;
        height: 4px;
        margin-top: 18px;
        border-radius: var(--radius-pill);
        background: linear-gradient(90deg, var(--color-accent), rgba(255, 255, 255, 0.9));
        animation: home-bar 800ms var(--ease) 450ms backwards;
    }
    .site.page-student-life .page-hero-sub { font-size: 1.2rem; }
    .site.page-student-life .page-hero-inner > * { animation: sl-rise 700ms var(--ease) backwards; }
    .site.page-student-life .page-hero-title { animation-delay: 120ms; }
    .site.page-student-life .page-hero-sub { animation-delay: 240ms; }

    /* Tinted sections: soft dots and colour glows. */
    .site.page-student-life .block.is-tinted {
        background-color: var(--color-surface);
        background-image:
            radial-gradient(rgba(29, 78, 216, 0.07) 1px, transparent 1.5px),
            radial-gradient(520px 320px at 8% 0%, rgba(124, 58, 237, 0.07), transparent 70%),
            radial-gradient(520px 320px at 92% 100%, rgba(13, 148, 136, 0.07), transparent 70%);
        background-size: 22px 22px, auto, auto;
    }

    /* "Beyond the classroom" cards */
    .site.page-student-life .feature-card {
        border-radius: 22px;
        text-align: center;
        transition: transform 420ms var(--ease), box-shadow 420ms var(--ease), border-color 420ms var(--ease);
    }
    .site.page-student-life .feature-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05), 0 28px 48px -20px rgba(var(--ac-rgb), 0.55);
    }
    .site.page-student-life .feature-card::after {
        content: "";
        position: absolute;
        top: -70px;
        right: -70px;
        width: 170px;
        height: 170px;
        border-radius: 50%;
        background: rgba(var(--ac-rgb), 0.09);
        pointer-events: none;
        transition: transform 600ms var(--ease);
    }
    .site.page-student-life .feature-card:hover::after { transform: scale(1.7); }
    .site.page-student-life .feature-card .card-body { position: relative; z-index: 1; align-items: center; gap: 10px; padding: 40px 26px 30px; }
    .site.page-student-life .feature-symbol {
        position: relative;
        display: grid;
        place-items: center;
        width: 72px;
        height: 72px;
        margin-bottom: 12px;
        border-radius: 24px;
        background: linear-gradient(135deg, rgb(var(--ac-rgb)) 0%, rgba(var(--ac-rgb), 0.68) 100%);
        color: #fff;
        box-shadow: 0 16px 26px -12px rgba(var(--ac-rgb), 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
        animation: sl-bob 4.5s ease-in-out infinite;
    }
    .site.page-student-life .feature-symbol::before {
        content: "";
        position: absolute;
        inset: -7px;
        border-radius: 29px;
        border: 2px solid rgba(var(--ac-rgb), 0.4);
        animation: sl-pulse 2.8s ease-out infinite;
    }
    .site.page-student-life .grid > :nth-child(2) .feature-symbol,
    .site.page-student-life .grid > :nth-child(2) .feature-symbol::before { animation-delay: -1.1s; }
    .site.page-student-life .grid > :nth-child(3) .feature-symbol,
    .site.page-student-life .grid > :nth-child(3) .feature-symbol::before { animation-delay: -2.2s; }
    .site.page-student-life .grid > :nth-child(4) .feature-symbol,
    .site.page-student-life .grid > :nth-child(4) .feature-symbol::before { animation-delay: -3.3s; }
    .site.page-student-life .feature-symbol .icon { width: 32px; height: 32px; }
    .site.page-student-life .feature-card:hover .feature-symbol .icon { animation: sl-wiggle 700ms var(--ease); }
    .site.page-student-life .feature-card .feature-icon,
    .site.page-student-life .feature-card:hover .feature-icon {
        position: absolute;
        top: 16px;
        left: 18px;
        width: auto;
        height: auto;
        margin: 0;
        padding: 3px 10px;
        border-radius: var(--radius-pill);
        background: var(--ac-soft);
        color: var(--ac-ink);
        box-shadow: inset 0 0 0 1px rgba(var(--ac-rgb), 0.18);
        font-size: 0.75rem;
        letter-spacing: 0.04em;
    }
    .site.page-student-life .feature-card .card-title { font-size: 1.25rem; letter-spacing: -0.01em; }
    .site.page-student-life .feature-card .card-text { max-width: 26ch; }

    /* "Moments" albums */
    .site.page-student-life .album-card { border-radius: 22px; }
    .site.page-student-life .album-card .card-media::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.45));
        pointer-events: none;
        transition: background-color 420ms var(--ease);
    }
    .site.page-student-life .album-card:hover .card-media::after { background-color: rgba(15, 23, 42, 0.2); }
    .site.page-student-life .album-card .card-media::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 2;
        width: 58px;
        height: 58px;
        margin: -29px 0 0 -29px;
        border-radius: 50%;
        background:
            linear-gradient(var(--ac-ink), var(--ac-ink)) center / 20px 2.5px no-repeat,
            linear-gradient(var(--ac-ink), var(--ac-ink)) center / 2.5px 20px no-repeat,
            #fff;
        box-shadow: 0 12px 26px -8px rgba(15, 23, 42, 0.5);
        opacity: 0;
        transform: scale(0.6);
        pointer-events: none;
        transition: opacity 320ms var(--ease), transform 420ms var(--ease);
    }
    .site.page-student-life .album-card:hover .card-media::before { opacity: 1; transform: scale(1); }
    .site.page-student-life .album-card .media-placeholder .icon { animation: sl-bob 3.5s ease-in-out infinite; }
    .site.page-student-life .album-card .card-body { padding: 20px 24px 24px; }
    .site.page-student-life .album-card .card-title { font-size: 1.15rem; }

    /* Entrance: cards rise in one after another; heading underline draws in. */
    .reveal-ready .site.page-student-life .reveal.is-visible .grid > * { animation: home-rise 640ms var(--ease) backwards; }
    .reveal-ready .site.page-student-life .reveal.is-visible .grid > :nth-child(2) { animation-delay: 100ms; }
    .reveal-ready .site.page-student-life .reveal.is-visible .grid > :nth-child(3) { animation-delay: 200ms; }
    .reveal-ready .site.page-student-life .reveal.is-visible .grid > :nth-child(n+4) { animation-delay: 300ms; }
    .reveal-ready .site.page-student-life .reveal.is-visible .section-head .section-title::after { animation: home-bar 700ms var(--ease) 200ms backwards; }
}
@keyframes sl-float { from { transform: translateY(0) rotate(0); } to { transform: translateY(-16px) rotate(4deg); } }
@keyframes sl-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes sl-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes sl-pulse { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes sl-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) scale(1.1); } 60% { transform: rotate(9deg) scale(1.1); } }

/* Banner: slow zoom on the active slide. Ticker: the bell rings now and then. */
.page-home .hero-slide.is-active .hero-slide-media img { animation: home-zoom 14s ease-out both; }
.page-home .ticker-label .icon { transform-origin: 50% 10%; animation: home-bell 4s ease-in-out infinite; }
/* The call-to-action gradient drifts slowly (plain gradient panels only, not photo ones). */
.page-home .cta-panel:not(.has-image) { background-size: 200% 200%; animation: home-drift 14s ease-in-out infinite alternate; }

/* Entrance: cards rise in one after another; heading underline draws in. */
.reveal-ready .page-home .reveal.is-visible :is(.grid, .slider-track, .notice-list, .leader-grid, .stats-grid) > * {
    animation: home-rise 640ms var(--ease) backwards;
}
.reveal-ready .page-home .reveal.is-visible :is(.grid, .slider-track, .notice-list, .leader-grid, .stats-grid) > :nth-child(2) { animation-delay: 90ms; }
.reveal-ready .page-home .reveal.is-visible :is(.grid, .slider-track, .notice-list, .leader-grid, .stats-grid) > :nth-child(3) { animation-delay: 180ms; }
.reveal-ready .page-home .reveal.is-visible :is(.grid, .slider-track, .notice-list, .leader-grid, .stats-grid) > :nth-child(4) { animation-delay: 270ms; }
.reveal-ready .page-home .reveal.is-visible :is(.grid, .slider-track, .notice-list, .leader-grid, .stats-grid) > :nth-child(n+5) { animation-delay: 340ms; }
.reveal-ready .page-home .reveal.is-visible .section-head .section-title::after { animation: home-bar 700ms var(--ease) 200ms backwards; }

@keyframes home-rise { from { opacity: 0; transform: translateY(22px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes home-bar { from { width: 0; opacity: 0; } }
@keyframes home-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes home-bell { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(16deg); } 88% { transform: rotate(-14deg); } 92% { transform: rotate(9deg); } 96% { transform: rotate(-5deg); } }
@keyframes home-drift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Text + image polish — desktop only (≥1024px; phones/tablets keep the rules in section 23).
   Pure styling: the title, text, image and button all still come from the CMS. The image sits on an
   offset gradient panel with a dotted patch at the opposite corner (mirrored for image_left), the
   title gets an accent rule, the first paragraph reads as a lead, and the button glows on hover. */
@media (min-width: 1024px) {
    .ti-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(56px, 6vw, 96px); }
    .ti-split.is-image-left { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }

    .ti-split .ti-text { max-width: 560px; }
    .ti-split .section-title {
        margin-bottom: var(--space-5);
        font-size: clamp(2rem, 2.6vw, 2.6rem);
        line-height: 1.15;
        letter-spacing: -0.02em;
    }
    .ti-split .section-title::after {
        content: "";
        display: block;
        width: 56px;
        height: 4px;
        margin-top: 18px;
        border-radius: var(--radius-pill);
        background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    }
    .ti-split .lead { font-size: 1.2rem; }
    .ti-split .prose { color: var(--color-text-muted); font-size: 1.05rem; line-height: 1.8; }
    .ti-split .prose > p:first-child { margin-bottom: var(--space-4); color: var(--color-text); font-size: 1.2rem; font-weight: 500; line-height: 1.6; }
    .ti-split .ti-text .btn { margin-top: var(--space-6); padding: 13px 28px; font-size: 1rem; }
    .ti-split .ti-text .btn-primary { box-shadow: 0 10px 24px -10px rgba(29, 78, 216, 0.6); }
    .ti-split .ti-text .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(29, 78, 216, 0.7); }
    .ti-split .ti-text .btn svg { transition: transform var(--duration) var(--ease); }
    .ti-split .ti-text .btn:hover svg { transform: translateX(4px); }

    .ti-split .ti-media { position: relative; isolation: isolate; }
    .ti-split .ti-media::before,
    .ti-split .ti-media::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
    .ti-split .ti-media::before {
        inset: 22px -22px -22px 22px;
        border-radius: 22px;
        background: linear-gradient(135deg, var(--color-primary-soft) 0%, color-mix(in srgb, var(--color-accent) 22%, #fff) 100%);
    }
    .ti-split .ti-media::after {
        top: -22px;
        left: -22px;
        width: 120px;
        height: 120px;
        background: radial-gradient(color-mix(in srgb, var(--color-primary) 35%, transparent) 2px, transparent 2.5px) 0 0 / 16px 16px;
    }
    .ti-split.is-image-left .ti-media::before { inset: 22px 22px -22px -22px; }
    .ti-split.is-image-left .ti-media::after { left: auto; right: -22px; }
    .ti-split .ti-media img {
        border-radius: 20px;
        box-shadow: 0 30px 60px -24px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.04);
        transition: transform 500ms var(--ease), box-shadow 500ms var(--ease);
    }
    .ti-split .ti-media:hover img { transform: translateY(-6px); box-shadow: 0 40px 70px -26px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(15, 23, 42, 0.04); }
}

/* Home "Notice board" auto-scroll — desktop (≥1024px, two rows) and phones (≤767px, three notices).
   site.js (initNoticeScroll) wraps the list in .notice-scroll, adds an aria-hidden copy after it, and
   sets the window height, --notice-shift (one list + gap) and --notice-time. The padding leaves room
   for the hover lift and shadows (under the 16px phone gutter); the mask fades notices in at the
   bottom and out at the top. Hover / tap / focus pauses. */
@media (min-width: 1024px), (max-width: 767px) {
    .notice-scroll {
        box-sizing: content-box;
        overflow: hidden;
        margin: -14px -10px;
        padding: 14px 10px;
        -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
        mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
    }
    .notice-scroll-track {
        display: flex;
        flex-direction: column;
        gap: var(--space-3);
        animation: notice-up var(--notice-time, 20s) linear infinite;
    }
    .notice-scroll:is(:hover, :focus-within) .notice-scroll-track { animation-play-state: paused; }
}
@keyframes notice-up { to { transform: translateY(var(--notice-shift, -50%)); } }

/* Achievement cards — desktop only (≥1024px): the title always takes two lines' height and the
   recipient line one, so the recipient and description start at the same height in every card. */
@media (min-width: 1024px) {
    .achievement-card .card-title { min-height: 2.8em; min-height: 2lh; }
    .achievement-card .achievement-who { min-height: 1lh; }
}

/* Home "Latest news" — desktop only (≥1024px). Shorter images and a tighter body so the whole
   section (heading, cards, button) fits on one screen; titles keep two lines' height and excerpts
   are clamped to two lines so every card's text lines up. A soft shade on the image foot finishes
   it off; the existing home-card hover (accent bar, lift, glow) is kept as is. */
@media (min-width: 1024px) {
    .page-home .block-news .card-media { aspect-ratio: 2 / 1; }
    .page-home .block-news .card-media::after {
        content: "";
        position: absolute;
        inset: auto 0 0;
        height: 40%;
        background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.18));
        pointer-events: none;
    }
    .page-home .block-news .card-body { gap: 10px; padding: 18px 24px 22px; }
    .page-home .block-news .card-title { min-height: 2.8em; min-height: 2lh; font-size: 1.125rem; line-height: 1.4; }
    .page-home .block-news .card-text {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }
    .page-home .block-news .section-foot { margin-top: var(--space-5); }
}

/* Home "Our achievers" — desktop only (≥1024px). Same treatment as Latest news so the section fits
   on one screen, and the slider arrows move up to the middle of the image row so they no longer
   cover the badge / text. With 4 cards per view and 2:1 images, the image's middle sits a quarter
   of a slide's width down; margin-top in % resolves against the slider's width, so that is exact. */
@media (min-width: 1024px) {
    .page-home .block-achievements .card-media { aspect-ratio: 2 / 1; }
    .page-home .block-achievements .card-media::after {
        content: "";
        position: absolute;
        inset: auto 0 0;
        height: 40%;
        background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.14));
        pointer-events: none;
    }
    .page-home .block-achievements .card-body { gap: 8px; padding: 16px 24px 20px; }
    .page-home .block-achievements .card-text {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }
    .page-home .block-achievements .slider-per-4 .slider-arrow {
        top: 0;
        margin-top: calc((100% - 3 * var(--slide-gap)) / 16);
    }
    .page-home .block-achievements .slider-dots { margin-top: var(--space-4); }
    .page-home .block-achievements .section-foot { margin-top: var(--space-5); }
}

/* ---------- 30. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ---------- 31. Print ---------- */
@media print {
    .topbar, .site-nav, .header-cta, .skip-link, .social-list { display: none !important; }
    .site-header { position: static !important; box-shadow: none !important; border: 0; }
    .site-footer { margin-top: var(--space-6); background: none; color: #000; }
    /* Check Result: a browser print shows just the result card (there is no download button). */
    .page-result .page-hero, .page-result .page-intro, .page-result .block, .page-result .site-footer, .result-again { display: none !important; }
    .result-card { box-shadow: none; break-inside: avoid; }
}

/* ==========================================================================
   32. Phones (≤767px) — Phase 15. Every mobile rule lives in this one block;
   nothing above is changed, so the desktop view stays exactly as it was.
   ========================================================================== */
@media (max-width: 767px) {
    /* ---- Foundations ---- */
    :root { --gutter: 16px; --m-header-h: 60px; }
    html, body { font-size: 16px; }
    body { overflow-x: hidden; }
    .hide-desktop { display: revert !important; }
    .hide-mobile { display: none !important; }

    /* ---- Header: compact sticky bar, logo left, hamburger right ---- */
    .topbar { display: none; }
    .site-header,
    .site-header.is-sticky { position: sticky; top: 0; }
    .header-inner,
    .site-header.is-shrunk .header-inner,
    .site-header-logo_center .header-inner {
        position: relative;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: var(--space-3);
        min-height: var(--m-header-h);
        padding-block: 8px;
    }
    .brand,
    .site-header-logo_center .brand { flex: 1 1 auto; flex-direction: row; min-width: 0; gap: 10px; text-align: left; }
    .site-header-logo_center .brand-text { align-items: flex-start; }
    .brand-logo,
    .site-header.is-shrunk .brand-logo { height: 40px; }
    .brand-text,
    .site-header-logo_center.is-shrunk .brand-text { display: flex; min-width: 0; }
    .brand-name { max-width: none; overflow: hidden; font-size: 1rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
    .brand-tagline { overflow: hidden; font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }

    .nav-toggle[hidden] {
        flex: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-left: auto;
        margin-right: -6px;
        padding: 0;
        border: 0;
        border-radius: var(--radius-md);
        background: none;
        color: inherit;
        cursor: pointer;
    }
    /* Three bars from one element; they turn into an X when open. */
    .nav-toggle-bar,
    .nav-toggle-bar::before,
    .nav-toggle-bar::after {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform var(--duration) var(--ease), background-color var(--duration) var(--ease);
    }
    .nav-toggle-bar { position: relative; }
    .nav-toggle-bar::before,
    .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
    .nav-toggle-bar::before { top: -7px; }
    .nav-toggle-bar::after { top: 7px; }
    .is-nav-open .nav-toggle-bar { background: transparent; }
    .is-nav-open .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
    .is-nav-open .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

    /* Slide-in drawer under the bar. */
    .site-nav,
    .site-header.is-stacked .site-nav,
    .site-header-logo_center .site-nav {
        position: fixed;
        top: var(--m-header-h);
        right: 0;
        bottom: 0;
        z-index: 1;
        order: 0;
        flex: none;
        width: min(320px, 86vw);
        margin: 0;
        padding: var(--space-2) var(--gutter) 96px;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-top: 1px solid rgba(127, 127, 127, 0.18);
        background: var(--header-bg);
        box-shadow: -18px 0 40px -20px rgba(15, 23, 42, 0.35);
        visibility: hidden;
        transform: translateX(100%);
        transition: transform var(--duration) var(--ease), visibility 0s linear var(--duration);
    }
    .is-nav-open .site-nav { visibility: visible; transform: none; transition-delay: 0s; }
    body.has-nav-open { overflow: hidden; }
    body.has-nav-open::after {
        content: "";
        position: fixed;
        inset: var(--m-header-h) 0 0 0;
        z-index: 90;
        background: rgba(15, 23, 42, 0.45);
    }

    .nav-list,
    .site-header.is-stacked .nav-list,
    .site-header-logo_center .nav-list { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 0; }
    .nav-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        border-bottom: 1px solid rgba(127, 127, 127, 0.16);
    }
    .nav-link {
        width: 100%;
        min-height: 48px;
        padding: 12px 4px;
        border-radius: 0;
        font-size: 1rem;
        text-align: left;
        white-space: normal;
    }
    .nav-link .icon { display: none; }
    .nav-link:hover,
    .nav-item:focus-within > .nav-link { background: none; }
    .nav-sub-toggle[hidden] {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: var(--radius-md);
        background: none;
        color: inherit;
        cursor: pointer;
    }
    .nav-sub-toggle .icon { width: 20px; height: 20px; transition: transform var(--duration) var(--ease); }
    .nav-item.is-open > .nav-sub-toggle .icon { transform: rotate(90deg); }

    /* Sub-menus: in the flow, closed until tapped (hover/focus rules no longer apply). */
    .nav-sub,
    .nav-item:nth-last-child(-n+2) > .nav-sub,
    .nav-item.has-children:hover > .nav-sub,
    .nav-item.has-children:focus-within > .nav-sub,
    .nav-item.is-dismissed > .nav-sub {
        position: static;
        grid-column: 1 / -1;
        min-width: 0;
        margin: 0 0 var(--space-2);
        padding: 0 0 0 var(--space-3);
        border: 0;
        border-left: 2px solid var(--color-primary-soft);
        border-radius: 0;
        background: none;
        color: inherit;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }
    .nav-sub { display: none; }
    .nav-sub::before { display: none; }
    .nav-item.is-open > .nav-sub { display: block; }
    .nav-sub-link { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; color: inherit; font-size: 0.95rem; white-space: normal; }

    /* "Apply Now" lives at the foot of the open drawer. */
    .header-cta { display: none; }
    .site-header.is-nav-open .header-cta {
        position: fixed;
        top: auto;
        right: var(--gutter);
        bottom: var(--gutter);
        z-index: 2;
        display: flex;
        width: calc(min(320px, 86vw) - 2 * var(--gutter));
        min-height: 48px;
        margin: 0;
    }
    /* ---- Card grids: one card per row (inline --cols / --count only set variables, so this wins) ---- */
    .grid,
    .grid-fixed { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
    .feature-card .card-body { padding: 20px; }

    /* ---- Text + image: stacked, image first ---- */
    .ti-split,
    .ti-split.is-image-left { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
    .ti-split .ti-media { order: -1; }
    .ti-media img { aspect-ratio: 16 / 10; box-shadow: var(--shadow-md); }
    .ti-centered .ti-media { margin-top: var(--space-5); }
    .ti-text .btn { margin-top: var(--space-4); }
    /* Side-by-side layouts on phones: the image sits on a small offset gradient panel with a dotted
       patch at the top-left, the title gets an accent rule, the first paragraph reads as a lead and
       the button spans the width with a soft glow. Offsets stay under the 16px gutter (no side scroll). */
    .ti-split { gap: 30px; }
    .ti-split .ti-media { position: relative; isolation: isolate; margin: 0 10px 10px 0; }
    .ti-split .ti-media::before,
    .ti-split .ti-media::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
    .ti-split .ti-media::before {
        inset: 10px -10px -10px 10px;
        border-radius: 18px;
        background: linear-gradient(135deg, var(--color-primary-soft) 0%, color-mix(in srgb, var(--color-accent) 24%, #fff) 100%);
    }
    .ti-split .ti-media::after {
        top: -10px;
        left: -10px;
        width: 72px;
        height: 72px;
        background: radial-gradient(color-mix(in srgb, var(--color-primary) 35%, transparent) 1.6px, transparent 2px) 0 0 / 12px 12px;
    }
    .ti-split .ti-media img { border-radius: 16px; box-shadow: 0 18px 34px -18px rgba(15, 23, 42, 0.4); }
    .ti-split .section-title { margin-bottom: var(--space-4); font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.015em; }
    .ti-split .section-title::after {
        content: "";
        display: block;
        width: 44px;
        height: 3px;
        margin-top: 12px;
        border-radius: var(--radius-pill);
        background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    }
    .ti-split .prose { color: var(--color-text-muted); line-height: 1.75; }
    .ti-split .prose > p:first-child { margin-bottom: var(--space-3); color: var(--color-text); font-size: 1.05rem; font-weight: 500; line-height: 1.6; }
    .ti-split .ti-text .btn { width: 100%; min-height: 48px; margin-top: var(--space-5); font-size: 1rem; }
    .ti-split .ti-text .btn-primary { box-shadow: 0 10px 22px -10px rgba(29, 78, 216, 0.6); }
    /* ---- Type scale & section rhythm ---- */
    :root { --section-y: 36px; --head-gap: 20px; }
    h1 { font-size: 1.75rem; }
    h2, .section-title { font-size: 1.4rem; }
    h3 { font-size: 1.125rem; }
    .section-sub { font-size: 0.95rem; }
    .lead { font-size: 1rem; }
    .section-head .section-title::after { width: 36px; margin-top: 10px; }
    .section-foot { margin-top: var(--space-5); }
    .btn { min-height: 44px; }

    /* ---- Home banner: shorter, dots only (swipe changes the slide) ---- */
    .hero-slide { height: auto; min-height: 440px; padding: 40px 0 64px; }
    .hero-slide::after,
    .hero-slide.align-center::after,
    .hero-slide.align-right::after { background: linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.82)); }
    .hero-slide-content,
    .hero-slide.align-right .hero-slide-content { max-width: none; margin: 0; text-align: left; }
    .hero-slide-title { margin-bottom: var(--space-3); font-size: 1.75rem; }
    .hero-slide-sub { margin-bottom: var(--space-5); font-size: 1rem; }
    .hero-slide .btn-lg { padding: 12px 22px; font-size: 1rem; }
    .slider-arrow,
    .hero-slider .slider-arrow { display: none; }
    .hero-slider .slider-dots { bottom: 22px; }
    /* Dots stay small but get a 44px tap area. */
    .slider-dot { position: relative; }
    .slider-dot::after { content: ""; position: absolute; inset: -17px -6px; }

    /* ---- Notice ticker: one tight line ---- */
    .ticker-label { padding: 0 var(--space-3); font-size: 0.7rem; letter-spacing: 0.06em; }
    .ticker-item { padding: 10px var(--space-6) 10px 0; font-size: 0.875rem; }
    .ticker-list { padding-left: var(--space-4); }

    /* ---- Stats 2x2 ---- */
    .block-stats { padding-block: 32px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-5); }
    .stat { padding: 0 var(--space-2); }
    .stat:not(:first-child) { border-left: 0; }
    .stat:nth-child(2n) { border-left: 1px solid rgba(255, 255, 255, 0.14); }
    .stat-value { font-size: 1.875rem; }
    .stat-label { font-size: 0.7rem; }

    /* ---- Carousels: one card per view ---- */
    .slider-per-2,
    .slider-per-3,
    .slider-per-4 { --per-view: 1; --slide-gap: var(--space-4); }
    .slider-dots { margin-top: var(--space-4); }

    /* ---- Compact cards ---- */
    /* Feature cards: number badge beside the title instead of above it. */
    .feature-card .card-body {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 4px;
        align-content: start;
        padding: 16px;
    }
    .feature-card .card-body > * { grid-column: 2; }
    .feature-card .feature-icon { grid-column: 1; grid-row: 1 / span 3; width: 38px; height: 38px; margin: 0; border-radius: 10px; font-size: 0.8rem; }
    .feature-card .card-link-icon { padding-top: 2px; }
    .card-title { font-size: 1rem; line-height: 1.35; }
    .card-text { font-size: 0.875rem; line-height: 1.55; }

    /* News, events, albums, videos, achievements: thumbnail left, text right. */
    .card:is(.news-card, .event-card, .album-card, .video-card, .achievement-card) { flex-direction: row; }
    .card:is(.news-card, .event-card, .album-card, .video-card, .achievement-card) > .card-media { flex: none; width: 112px; min-height: 112px; aspect-ratio: auto; }
    .card:is(.news-card, .event-card, .album-card, .video-card, .achievement-card) .card-body { gap: 4px; padding: 12px 14px; }
    .card:is(.news-card, .event-card, .album-card, .video-card, .achievement-card) .card-meta { gap: 4px 10px; font-size: 0.75rem; }
    /* Cards that open a detail page show a two-line teaser; the full text is one tap away. */
    .card:has(.card-title a):is(.news-card, .event-card, .album-card) .card-text {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .event-card .date-badge { top: 8px; left: 8px; width: 42px; height: 42px; }
    .event-card .date-badge-day { font-size: 1rem; }
    .event-card .date-badge-month { font-size: 0.6rem; }
    .album-count { left: 8px; bottom: 8px; padding: 2px 8px; font-size: 0.72rem; }
    .media-play span { width: 40px; height: 40px; }
    .media-play .icon { width: 18px; height: 18px; }
    .card .media-placeholder .icon { width: 28px; height: 28px; }

    /* Faculty: two per row, small portraits. */
    .staff-group .grid,
    .staff-group .grid-fixed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
    .staff-group + .staff-group { margin-top: var(--space-6); }
    .staff-group-title { margin-bottom: var(--space-4); font-size: 1rem; }
    .staff-photo { width: 76px; height: 76px; margin-top: var(--space-4); }
    .site:not(.page-home) .staff-card { background: linear-gradient(180deg, var(--ac-soft) 0, rgba(var(--ac-rgb), 0.08) 56px, #fff 56px); }
    .staff-initials { font-size: 1.4rem; }
    .staff-card .card-body { gap: 4px; padding: 10px 10px 14px; }
    .staff-card .card-title { font-size: 0.9375rem; }
    .staff-role { font-size: 0.78rem; }
    .staff-dept, .staff-qual, .staff-bio { font-size: 0.75rem; }

    /* Notices: one column (also the Home teaser), smaller date tile. */
    .notice-list,
    .page-home .notice-list:has(> .notice-item:nth-child(2)) { display: flex; gap: 10px; }
    .notice-item { gap: var(--space-3); padding: 14px; }
    .notice-item .date-badge { width: 46px; height: 46px; }
    .notice-item .date-badge-day { font-size: 1.1rem; }
    .notice-title { margin: 4px 0 2px; font-size: 0.95rem; }
    .notice-text { font-size: 0.875rem; }

    /* Leadership messages: one card per row, photo above the full-width message. */
    .leader-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
    .leader-card { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: 20px 18px 18px; }
    .leader-card::after { top: -10px; right: 12px; font-size: 6rem; }
    .leader-photo { width: 88px; height: 88px; }
    .leader-message { font-size: 0.95rem; line-height: 1.7; }
    /* Name + role sit beside the photo; the message (and "Read full message") run full width below.
       .leader-body becomes display: contents so its children join the card's grid. */
    .leader-card { grid-template-columns: 88px minmax(0, 1fr); column-gap: var(--space-4); row-gap: var(--space-3); }
    .leader-body { display: contents; }
    .leader-photo { grid-column: 1; grid-row: 1; }
    .leader-person {
        position: relative;
        z-index: 1;
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        margin: 0;
        padding: 0;
        border-top: 0;
    }
    .leader-name { font-size: 1.05rem; line-height: 1.3; }
    .leader-message { position: relative; z-index: 1; grid-column: 1 / -1; padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
    .leader-more { grid-column: 1 / -1; }
    /* Home shows a five-line preview that fades out; "Read full message" opens it in place.
       The About page keeps the complete message. */
    .page-home .leader-message:not(.is-expanded) {
        flex: none;
        max-height: calc(0.95rem * 1.7 * 5 + var(--space-3)); /* 5 lines + the divider padding */
        overflow: hidden;
        -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
        mask-image: linear-gradient(180deg, #000 55%, transparent);
    }
    .page-home .leader-more.is-needed[hidden] {
        display: inline-flex;
        align-items: center;
        align-self: flex-start;
        min-height: 44px;
        margin-top: 2px;
        padding: 0;
        border: 0;
        background: none;
        color: var(--color-primary);
        font-size: 0.9rem;
        font-weight: 700;
        cursor: pointer;
    }

    /* Testimonials, contact cards, panels. */
    .testimonial { gap: 12px; padding: 18px; }
    .testimonial-quote { font-size: 0.925rem; }
    .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .contact-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
    .contact-card-value { font-size: 0.9rem; }
    .live-lists { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
    .live-panel { padding: 16px; }
    .check-list.is-two-col { grid-template-columns: minmax(0, 1fr); }
    .check-list { gap: 8px; }
    .check-list li { padding: 10px 12px; font-size: 0.9rem; }
    .map-frame { aspect-ratio: 4 / 3; }

    /* ---- Timeline: vertical list ---- */
    .timeline-steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
    .timeline-steps::before { top: 20px; bottom: 20px; left: 19px; right: auto; width: 2px; height: auto; }
    .timeline-steps .timeline-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; padding: 0; text-align: left; }
    .timeline-steps .timeline-marker { grid-row: 1 / span 2; min-width: 0; width: 40px; height: 40px; margin: 0; padding: 0; font-size: 0.66rem; box-shadow: 0 0 0 4px var(--color-surface); }
    .timeline-steps .timeline-item > :not(.timeline-marker) { grid-column: 2; }
    .timeline-vertical { padding-left: 36px; }
    .timeline-vertical::before { left: 9px; }
    .timeline-vertical .timeline-item::before { left: -33px; }

    /* ---- Call to action: stacked, full-width button ---- */
    .cta-panel { flex-direction: column; align-items: stretch; gap: var(--space-5); padding: 28px 20px; }
    .cta-panel::after { width: 180px; height: 180px; top: -60px; right: -60px; }
    .cta-title { font-size: 1.375rem; }
    .cta-text { font-size: 0.95rem; }
    .cta-panel .btn { width: 100%; }

    /* ---- Inner-page hero & breadcrumbs ---- */
    .page-hero { padding-block: 28px 32px; }
    .page-hero::after { width: 200px; height: 200px; top: -80px; right: -80px; }
    .page-hero-title { font-size: 1.75rem; }
    .page-hero-sub { margin-top: var(--space-2); font-size: 0.975rem; }
    .page-hero-meta { gap: 6px var(--space-3); font-size: 0.82rem; }
    .breadcrumbs ol { flex-wrap: nowrap; margin-bottom: var(--space-3); overflow: hidden; white-space: nowrap; }
    .breadcrumbs li { flex: none; }
    .breadcrumbs li:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .session-banner-inner { min-height: 44px; font-size: 0.875rem; text-align: center; }
    .page-intro-text { font-size: 1rem; }

    /* ---- Listings: sideways filter tabs, compact pagination ---- */
    .filter-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin: 0 calc(-1 * var(--gutter)) var(--space-5);
        padding: 2px var(--gutter) 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .filter-tabs::-webkit-scrollbar { display: none; }
    .filter-tab { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; }
    .pagination { gap: 4px; margin-top: var(--space-5); }
    .pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 10px; }

    /* ---- Detail pages ---- */
    .detail-cover { margin: calc(-1 * var(--section-y)) calc(-1 * var(--gutter)) var(--space-5); border-radius: 0; box-shadow: none; }
    .detail-cover img { max-height: none; aspect-ratio: 16 / 10; }
    .detail-lead { font-size: 1rem; }
    .detail-body { font-size: 1rem; }
    .event-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
    .event-aside { position: static; }
    .event-panel { padding: 18px; }
    .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .photo-caption { font-size: 0.78rem; }
    .album-subtitle { margin-top: var(--space-6); font-size: 1.125rem; }

    /* Lightbox: edge to edge, big close button; swipe changes the photo. */
    .lightbox { padding: 64px 0 72px; }
    .lightbox-img { max-height: calc(100vh - 150px); border-radius: 0; box-shadow: none; }
    .lightbox-frame { width: 100vw; border-radius: 0; }
    .lightbox-caption { padding-inline: var(--gutter); font-size: 0.9rem; }
    .lightbox-counter { top: 22px; left: var(--gutter); }
    .lightbox-close { top: 8px; right: 8px; width: 52px; height: 52px; }
    .lightbox-prev,
    .lightbox-next { top: auto; bottom: 12px; width: 48px; height: 48px; transform: none; }
    .lightbox-prev { left: var(--gutter); }
    .lightbox-next { right: var(--gutter); }

    /* ---- Forms: one column, full-width submit, map under the form ---- */
    .form-card { padding: 22px 18px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .form { gap: 16px; }
    .field-input { font-size: 16px; } /* 16px stops iOS zooming into the field */
    .form-actions { flex-direction: column; align-items: stretch; gap: var(--space-3); }
    .form-actions .btn { width: 100%; min-height: 48px; }
    .form-actions .field-help { margin-left: 0; text-align: center; }
    .check { gap: 12px; }
    .check input { width: 22px; height: 22px; margin-top: 1px; }
    .contact-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
    .contact-layout .map-frame { min-height: 0; height: auto; aspect-ratio: 4 / 3; }
    .accordion-trigger { min-height: 52px; padding: 14px 16px; font-size: 0.95rem; }
    .accordion-panel { padding: 0 16px 16px; }
    .job-summary .card-meta { gap: 4px 10px; font-size: 0.78rem; }

    /* ---- Check Result ---- */
    .result-card { padding: 22px 16px; }
    .result-card-title { font-size: 1.25rem; }
    .result-student { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: 14px 16px; }
    .table-wrap { -webkit-overflow-scrolling: touch; }
    .result-table { min-width: 480px; }
    .table th, .table td { padding: 10px 12px; }
    .result-summary { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
    .result-percent { font-size: 2.25rem; }

    /* ---- Footer: brand, then links (2 columns), then contact ---- */
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); padding-block: 36px 24px; }
    .footer-about { text-align: center; }
    .footer-brand { margin-inline: auto; }
    .footer-text { margin-inline: auto; }
    .footer-about .social-list { justify-content: center; }
    .footer-about .social-link { width: 44px; height: 44px; }
    .footer-title { margin-bottom: var(--space-3); }
    .footer-link { display: inline-flex; align-items: center; min-height: 36px; }
    .footer-link-list li { margin-bottom: 4px; }
    .footer-contact-item a, .footer-contact-item span { overflow-wrap: break-word; }
    .footer-bottom-inner { flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; }

    /* ---- Footer motion (phones): flowing rainbow top edge, soft glows, floating logo, bobbing
       social buttons that fill with their brand colour on tap, accent-barred titles, chevron links,
       accent contact icons, and each column rising in as it scrolls into view (site.js
       initFooterReveal). No cards. Reduced motion stops every animation (section 30). ---- */
    .site-footer {
        position: relative;
        overflow: hidden;
        background-color: var(--footer-bg);
        background-image:
            radial-gradient(360px 240px at 0% 0%, color-mix(in srgb, var(--color-primary) 24%, transparent), transparent 70%),
            radial-gradient(320px 240px at 100% 62%, color-mix(in srgb, var(--color-accent) 10%, transparent), transparent 70%),
            radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.5px);
        background-size: auto, auto, 20px 20px;
    }
    .site-footer::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #1d4ed8, #0d9488, #7c3aed, #d97706, #e11d48, #1d4ed8);
        background-size: 200% 100%;
        animation: footer-flow 10s linear infinite;
    }
    .footer-logo { filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4)); animation: sl-bob 5s ease-in-out infinite; }

    .social-list-footer { gap: 12px; }
    .social-list-footer .social-link {
        --brand: var(--color-primary);
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.06);
        opacity: 1;
        -webkit-tap-highlight-color: transparent;
        transition: background 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
    }
    .social-list-footer li { animation: sl-bob 3.6s ease-in-out infinite; }
    .social-list-footer li:nth-child(2) { animation-delay: -0.9s; }
    .social-list-footer li:nth-child(3) { animation-delay: -1.8s; }
    .social-list-footer li:nth-child(4) { animation-delay: -2.7s; }
    .social-list-footer li:nth-child(n+5) { animation-delay: -3.2s; }
    .social-list-footer .social-link:is(:hover, :active, :focus-visible) {
        border-color: transparent;
        background: var(--brand);
        color: #fff;
        box-shadow: 0 10px 20px -8px var(--brand);
    }
    .social-list-footer .social-link:has(.icon-social-facebook)  { --brand: #1877f2; }
    .social-list-footer .social-link:has(.icon-social-instagram) { --brand: #e1306c; }
    .social-list-footer .social-link:has(.icon-social-youtube)   { --brand: #ff0000; }
    .social-list-footer .social-link:has(.icon-social-linkedin)  { --brand: #0a66c2; }
    .social-list-footer .social-link:has(.icon-social-x),
    .social-list-footer .social-link:has(.icon-social-threads)   { --brand: #000; }
    .social-list-footer .social-link:has(.icon-social-whatsapp)  { --brand: #25d366; }
    .social-list-footer .social-link:has(.icon-social-telegram)  { --brand: #229ed9; }
    .social-list-footer .social-link:has(.icon-social-instagram):is(:hover, :active, :focus-visible) { background: linear-gradient(45deg, #f9a825, #e1306c 50%, #833ab4); }

    .footer-title { position: relative; margin-bottom: 16px; padding-bottom: 10px; letter-spacing: 0.14em; }
    .footer-title::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 28px;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, var(--color-accent), rgba(255, 255, 255, 0.6));
    }

    .footer-link { position: relative; padding-left: 14px; -webkit-tap-highlight-color: transparent; transition: color 300ms var(--ease), opacity 300ms var(--ease), transform 300ms var(--ease); }
    .footer-link::before { content: "›"; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; transition: transform 300ms var(--ease); }
    .site-footer .footer-link:is(:hover, :active) { color: var(--color-accent); opacity: 1; transform: translateX(4px); }

    .footer-contact-item .icon { color: var(--color-accent); opacity: 1; }
    .footer-contact-item:first-child .icon { transform-origin: 50% 90%; animation: footer-pin 2.6s ease-in-out infinite; }

    .footer-bottom { background: rgba(0, 0, 0, 0.18); border-top-color: rgba(255, 255, 255, 0.08); }

    /* Entrance: hidden only once site.js has added .footer-anim; each part rises in on .is-in. */
    .footer-anim :is(.footer-col, .footer-bottom):not(.is-in) { opacity: 0; }
    .footer-anim .is-in { animation: sl-rise 700ms var(--ease) backwards; }
    .footer-anim .is-in .footer-title::after { animation: home-bar 700ms var(--ease) 250ms backwards; }
    .footer-anim .is-in .footer-link-list li { animation: sl-rise 520ms var(--ease) backwards; }
    .footer-anim .is-in .footer-link-list li:nth-child(2) { animation-delay: 60ms; }
    .footer-anim .is-in .footer-link-list li:nth-child(3) { animation-delay: 120ms; }
    .footer-anim .is-in .footer-link-list li:nth-child(4) { animation-delay: 180ms; }
    .footer-anim .is-in .footer-link-list li:nth-child(5) { animation-delay: 240ms; }
    .footer-anim .is-in .footer-link-list li:nth-child(6) { animation-delay: 300ms; }
    .footer-anim .is-in .footer-link-list li:nth-child(n+7) { animation-delay: 360ms; }
    .footer-anim .is-in .footer-contact-item { animation: sl-rise 520ms var(--ease) backwards; }
    .footer-anim .is-in .footer-contact-item:nth-child(2) { animation-delay: 90ms; }
    .footer-anim .is-in .footer-contact-item:nth-child(3) { animation-delay: 180ms; }
    .footer-anim .is-in .footer-contact-item:nth-child(n+4) { animation-delay: 270ms; }

    /* ---- Error page ---- */
    .error-page { padding-block: 56px; }
    .error-page-code { font-size: 4.5rem; }
    .error-page-title { font-size: 1.5rem; }
}

/* Stats polish — phones only (≤767px; desktop has its own block above).
   2×2 grid of gradient cards (colour cycles every 4) with an icon tile, a light sweep and a
   floating glow — the same family as the desktop cards, sized for small screens. */
@media (max-width: 767px) {
    .block-stats.is-dark {
        background-color: var(--color-primary-dark);
        background-image:
            radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.5px),
            radial-gradient(320px 200px at 0% 0%, color-mix(in srgb, var(--color-primary) 50%, transparent), transparent 70%),
            linear-gradient(160deg, var(--color-primary-dark) 0%, color-mix(in srgb, var(--color-primary-dark) 65%, #020617) 100%);
        background-size: 18px 18px, auto, auto;
    }
    .stats-grid { gap: 12px; row-gap: 12px; }
    .stat,
    .stat:not(:first-child),
    .stat:nth-child(2n) {
        --c1: #6366f1;
        --c2: #8b5cf6;
        position: relative;
        isolation: isolate;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 16px 8px 14px;
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 16px;
        background: linear-gradient(140deg, var(--c1) 0%, var(--c2) 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 24px -14px var(--c2);
        overflow: hidden;
        transition: transform 200ms var(--ease);
    }
    .stat:nth-child(4n+2) { --c1: #10b981; --c2: #0891b2; }
    .stat:nth-child(4n+3) { --c1: #f59e0b; --c2: #ea580c; }
    .stat:nth-child(4n+4) { --c1: #ec4899; --c2: #e11d48; }
    .stat:active { transform: scale(0.97); }

    /* Floating glow + light sweep. */
    .stat::after {
        content: "";
        position: absolute;
        z-index: -1;
        top: -40%;
        right: -30%;
        width: 80%;
        aspect-ratio: 1;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 70%);
        animation: stat-float 7s ease-in-out infinite alternate;
    }
    .stat::before {
        content: "";
        position: absolute;
        z-index: 1;
        inset: 0;
        background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
        transform: translateX(-120%);
        animation: stat-shine 6s var(--ease) infinite;
        pointer-events: none;
    }
    .stat:nth-child(2)::before { animation-delay: 0.6s; }
    .stat:nth-child(3)::before { animation-delay: 1.2s; }
    .stat:nth-child(4)::before { animation-delay: 1.8s; }

    .stat-icon {
        position: relative;
        z-index: 2;
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        margin-bottom: 8px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.22);
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
        animation: stat-bob 3.2s ease-in-out infinite;
    }
    .stat:nth-child(2) .stat-icon { animation-delay: -0.8s; }
    .stat:nth-child(3) .stat-icon { animation-delay: -1.6s; }
    .stat:nth-child(4) .stat-icon { animation-delay: -2.4s; }
    .stat-icon .icon { width: 20px; height: 20px; color: #fff; }

    .stat-value { position: relative; z-index: 2; font-size: 1.75rem; line-height: 1.1; text-shadow: 0 3px 12px rgba(0, 0, 0, 0.2); }
    .page-home .stat:is(:hover, :active) .stat-value { color: #fff; transform: none; }
    .stat-label {
        position: relative;
        z-index: 2;
        margin-top: 6px;
        padding: 2px 8px;
        border-radius: var(--radius-pill);
        background: rgba(255, 255, 255, 0.18);
        font-size: 0.6rem;
        letter-spacing: 0.1em;
        opacity: 1;
        text-align: center;
    }
}

/* Feature cards (home "Why families choose us" + About "What guides us") — phones only (≤767px; desktop has its own block above).
   Accent icon tile with a pulsing halo in place of the number badge, the number as a small
   outlined watermark, an accent stripe down the left edge and a round arrow button. */
@media (max-width: 767px) {
    .site:is(.page-home, .page-about) .block-cards .grid { gap: 14px; }
    .site:is(.page-home, .page-about) .block-cards .grid > :nth-child(5n) { --ac-rgb: 225, 29, 72; --ac-ink: #be123c; --ac-soft: #fff1f2; }
    .site:is(.page-home, .page-about) .feature-card {
        border-radius: 18px;
        border-color: rgba(var(--ac-rgb), 0.16);
        background: linear-gradient(120deg, var(--ac-soft) 0%, #fff 55%);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 22px -16px rgba(var(--ac-rgb), 0.45);
    }
    /* Accent stripe on the left (replaces the top bar that only showed on hover). */
    .site:is(.page-home, .page-about) .feature-card::before,
    .site:is(.page-home, .page-about) .feature-card:is(:hover, :focus-within, :active)::before {
        top: 14px;
        bottom: 14px;
        left: 0;
        right: auto;
        width: 4px;
        height: auto;
        border-radius: 0 4px 4px 0;
        background: linear-gradient(180deg, rgb(var(--ac-rgb)), rgba(var(--ac-rgb), 0.45));
        transform: none;
    }
    .site:is(.page-home, .page-about) .feature-card .card-body {
        position: relative;
        grid-template-columns: 46px minmax(0, 1fr);
        column-gap: 14px;
        padding: 16px 16px 16px 18px;
    }

    /* Icon tile + halo in column 1. */
    .site:is(.page-home, .page-about) .feature-symbol {
        position: relative;
        grid-column: 1;
        grid-row: 1 / span 3;
        display: grid;
        place-items: center;
        width: 46px;
        height: 46px;
        border-radius: 14px;
        background: linear-gradient(135deg, rgb(var(--ac-rgb)) 0%, rgba(var(--ac-rgb), 0.72) 100%);
        color: #fff;
        box-shadow: 0 10px 18px -10px rgba(var(--ac-rgb), 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transition: transform 300ms var(--ease);
    }
    .site:is(.page-home, .page-about) .feature-symbol::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        border: 2px solid rgba(var(--ac-rgb), 0.45);
        animation: feature-halo 2.8s var(--ease) infinite;
    }
    .site:is(.page-home, .page-about) .grid > :nth-child(2) .feature-symbol::before { animation-delay: 0.6s; }
    .site:is(.page-home, .page-about) .grid > :nth-child(3) .feature-symbol::before { animation-delay: 1.2s; }
    .site:is(.page-home, .page-about) .grid > :nth-child(4) .feature-symbol::before { animation-delay: 1.8s; }
    .site:is(.page-home, .page-about) .grid > :nth-child(5) .feature-symbol::before { animation-delay: 2.4s; }
    .site:is(.page-home, .page-about) .feature-symbol .icon { width: 22px; height: 22px; }
    .site:is(.page-home, .page-about) .feature-card:active .feature-symbol { transform: rotate(-8deg) scale(1.06); }

    /* Number: small outlined watermark, top-right. */
    .site:is(.page-home, .page-about) .feature-card .feature-icon,
    .site:is(.page-home, .page-about) .feature-card:is(:hover, :focus-within, :active) .feature-icon {
        position: absolute;
        top: 10px;
        right: 14px;
        grid-column: auto;
        grid-row: auto;
        width: auto;
        height: auto;
        margin: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        color: transparent;
        -webkit-text-stroke: 1px rgba(var(--ac-rgb), 0.35);
        font-size: 1.75rem;
        font-weight: 800;
        line-height: 1;
        transform: none;
    }
    .site:is(.page-home, .page-about) .feature-card .card-title { padding-right: 40px; }
    .site:is(.page-home, .page-about) .feature-card .card-text { font-size: 0.875rem; }

    /* Round arrow button. */
    .site:is(.page-home, .page-about) .feature-card .card-link-icon {
        display: grid;
        place-items: center;
        width: 30px;
        height: 30px;
        margin-top: 6px;
        padding: 0;
        border-radius: 50%;
        background: rgba(var(--ac-rgb), 0.12);
        color: var(--ac-ink);
    }
    .site:is(.page-home, .page-about) .feature-card .card-link-icon .icon { width: 16px; height: 16px; }
    .site:is(.page-home, .page-about) .feature-card:active .card-link-icon { background: rgb(var(--ac-rgb)); color: #fff; }
}

/* Text + image ("Our story", home welcome) — phones only (≤767px; desktop has its own block above).
   The text becomes a white card overlapping the image, the image floats gently, the first paragraph
   reads as a highlighted lead and the button gets a gradient with a light sweep. */
@media (max-width: 767px) {
    .ti-split .ti-media { animation: ti-float 6s ease-in-out infinite; }
    .ti-split .ti-media img { border-radius: 20px; }
    .ti-split .ti-text {
        position: relative;
        z-index: 1;
        margin: -44px 10px 0;
        padding: 22px 18px 20px;
        border: 1px solid rgba(15, 23, 42, 0.06);
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.35);
    }
    /* Small accent chip on the card's top edge. */
    .ti-split .ti-text::before {
        content: "";
        position: absolute;
        top: -3px;
        left: 18px;
        width: 48px;
        height: 6px;
        border-radius: var(--radius-pill);
        background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    }
    .ti-split .section-title { font-size: 1.45rem; line-height: 1.25; }
    .ti-split .prose > p:first-child {
        margin-bottom: 12px;
        padding: 12px 14px;
        border-left: 4px solid var(--color-primary);
        border-radius: 4px 12px 12px 4px;
        background: linear-gradient(90deg, var(--color-primary-soft), rgba(239, 246, 255, 0.2));
        color: var(--color-text);
        font-weight: 500;
    }
    .ti-split .prose > p:first-child:last-child { margin-bottom: 0; }
    .ti-split .ti-text .btn-primary {
        position: relative;
        overflow: hidden;
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    }
    .ti-split .ti-text .btn-primary::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
        transform: translateX(-120%);
        animation: stat-shine 5s var(--ease) infinite;
        pointer-events: none;
    }
}
@keyframes ti-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* About page — phones only (≤767px). Scoped to .page-about so Home and desktop are untouched.
   Hero with rounded foot + glass breadcrumb pill, a cleaner "Our story" card with a quote-style lead,
   number pills on the guide cards, and centred leader cards (photo, name, role chip, then message). */
@media (max-width: 767px) {
    /* ---- Hero ---- */
    .site.page-about .page-hero {
        padding-block: 30px 44px;
        border-radius: 0 0 28px 28px;
        text-align: center;
    }
    .site.page-about .page-hero-inner { display: flex; flex-direction: column; align-items: center; }
    .site.page-about .breadcrumbs ol {
        justify-content: center;
        margin-bottom: 14px;
        padding: 5px 14px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: var(--radius-pill);
        background: rgba(255, 255, 255, 0.1);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        font-size: 0.78rem;
    }
    .site.page-about .page-hero-title { font-size: 2rem; letter-spacing: -0.02em; }
    .site.page-about .page-hero-title::after {
        content: "";
        display: block;
        width: 44px;
        height: 4px;
        margin: 12px auto 0;
        border-radius: var(--radius-pill);
        background: linear-gradient(90deg, var(--color-accent), #fff);
    }
    .site.page-about .page-hero-sub { max-width: 30ch; margin-top: 12px; font-size: 0.95rem; line-height: 1.55; }

    /* ---- Our story ---- */
    .site.page-about .block-text_image { padding-top: 32px; }
    .site.page-about .ti-split .ti-text { margin: -40px 12px 0; padding: 24px 20px 22px; }
    .site.page-about .ti-split .prose > p:first-child {
        position: relative;
        padding: 6px 0 0 34px;
        border: 0;
        border-radius: 0;
        background: none;
        color: var(--color-text);
        font-size: 1.02rem;
        font-weight: 500;
        line-height: 1.7;
    }
    .site.page-about .ti-split .prose > p:first-child::before {
        content: "\201C";
        position: absolute;
        top: 0;
        left: -2px;
        color: var(--color-accent);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 3.2rem;
        line-height: 1;
    }

    /* ---- What guides us ---- */
    .site.page-about .block-cards .section-head { margin-bottom: 18px; }
    .site.page-about .feature-card .card-body { align-items: center; padding: 18px 16px 18px 20px; }
    .site.page-about .feature-card .card-title { padding-right: 44px; font-size: 1.05rem; }
    .site.page-about .feature-card .card-text { color: var(--color-text-muted); line-height: 1.55; }
    /* Number as a small accent pill instead of the outlined watermark. */
    .site.page-about .feature-card .feature-icon,
    .site.page-about .feature-card:is(:hover, :focus-within, :active) .feature-icon {
        top: 14px;
        right: 14px;
        padding: 3px 8px;
        border-radius: var(--radius-pill);
        background: rgba(var(--ac-rgb), 0.12);
        color: var(--ac-ink);
        -webkit-text-stroke: 0;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.06em;
    }

    /* ---- Leadership ---- */
    .site.page-about .leader-grid { gap: 18px; }
    .site.page-about .leader-card {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        row-gap: 14px;
        padding: 26px 20px 22px;
        border-radius: 20px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 30px -20px rgba(var(--ac-rgb, 29, 78, 216), 0.55);
        text-align: center;
    }
    .site.page-about .leader-card::after { top: -8px; right: 14px; font-size: 6.5rem; }
    .site.page-about .leader-photo {
        grid-column: 1;
        grid-row: 1;
        width: 96px;
        height: 96px;
        box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(var(--ac-rgb, 29, 78, 216), 0.35), 0 12px 24px -12px rgba(15, 23, 42, 0.45);
    }
    .site.page-about .leader-person { grid-column: 1; grid-row: 2; align-items: center; gap: 6px; }
    .site.page-about .leader-name { font-size: 1.15rem; }
    .site.page-about .leader-role {
        padding: 4px 12px;
        border-radius: var(--radius-pill);
        background: rgba(var(--ac-rgb, 29, 78, 216), 0.1);
        font-size: 0.7rem;
    }
    .site.page-about .leader-message {
        justify-self: stretch;
        padding-top: 16px;
        color: var(--color-text);
        font-size: 0.94rem;
        line-height: 1.75;
        text-align: left;
    }
    .site.page-about .leader-message p:first-child { font-weight: 600; }
}

/* Home banner watch, first slide only (block_hero_clock + initHeroClock): silver case with crown, white dial,
   date window at 3 o'clock, red seconds hand, glass glare. Right side on desktop, top corner on phones. */
.hero-clock {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: var(--hero-edge);
    width: clamp(150px, 15vw, 200px);
    aspect-ratio: 1;
    padding: 8px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, #f8fafc, #94a3b8, #e2e8f0, #64748b, #f1f5f9, #94a3b8, #f8fafc);
    box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(15, 23, 42, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(-50%) scale(0.92);
    transition: opacity 500ms var(--ease), transform 500ms var(--ease);
    pointer-events: none;
}
.hero-clock.is-ready { opacity: 1; transform: translateY(-50%); }
.hero-clock::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.08) 38%, transparent 55%);
    pointer-events: none;
}
.hc-crown {
    position: absolute;
    top: 50%;
    right: -9px;
    z-index: -1;
    width: 12px;
    height: 22%;
    border-radius: 3px;
    background: repeating-linear-gradient(180deg, #cbd5e1 0 2px, #64748b 2px 3px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: translateY(-50%);
}
.hc-face {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 30%, #ffffff 0%, #f1f5f9 62%, #dbe2ea 100%);
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.45), 0 0 0 2px #0f172a;
}
.hc-dial { fill: none; stroke: rgba(15, 23, 42, 0.08); stroke-width: 1; }
.hc-tick-h { stroke: #0f172a; stroke-width: 3.4; stroke-linecap: round; }
.hc-tick-m { stroke: #94a3b8; stroke-width: 1.2; }
.hc-num { fill: #0f172a; font-size: 22px; font-weight: 700; text-anchor: middle; }
.hc-date-box { fill: #fff; stroke: #94a3b8; stroke-width: 1; }
.hc-date { fill: #0f172a; font-size: 11px; font-weight: 700; text-anchor: middle; }
.hc-hand { stroke-linecap: round; }
.hc-hour { stroke: #0f172a; stroke-width: 6.5; }
.hc-min { stroke: #1e293b; stroke-width: 4.2; }
.hc-sec { stroke: #dc2626; stroke-width: 1.8; }
.hc-pin { fill: #0f172a; }
.hc-pin-dot { fill: #dc2626; }

/* Tablets: smaller, still on the right. Phones: compact watch in the top corner. */
@media (max-width: 1023px) {
    .hero-clock { width: 130px; }
}
@media (max-width: 767px) {
    .hero-clock { top: 14px; right: 18px; width: 78px; padding: 4px; }
    .hero-clock, .hero-clock.is-ready { transform: none; }
    .hero-clock::after { inset: 4px; }
    .hc-crown { right: -6px; width: 8px; }
    .hc-num, .hc-date-box, .hc-date { display: none; }
}
@media print {
    .hero-clock { display: none; }
}
