/* ============================================================================
   CASS-WWW site stylesheet. The design is fixed for every school; identity
   comes from content: the school's photos, name, and --primary (injected by
   the publish lambda into base.html). No school-specific values may ever
   appear in this file.
   Look: "school prospectus" - humanist sans display over a serif body, warm
   paper ground, one signature device (the crayon-stroke heading underline).
   ============================================================================ */

:root {
    /* The palette = THREE base colors (set at load from the "website"
       setting's palette; these are the "Forest" defaults). Everything else -
       soft text, alt section background, lines, footer, hero scrims - is
       DERIVED from them below, so one palette recolors the whole site. */
    --primary: #146c60;              /* accent: buttons, links, underline */
    --ink: #22303f;                  /* text */
    --paper: #fbfaf7;                /* background */
    --ink-soft: color-mix(in srgb, var(--ink) 75%, var(--paper));
    --mist: color-mix(in srgb, var(--paper) 95%, var(--ink));
    --line: color-mix(in srgb, var(--paper) 89%, var(--ink));
    --white: #ffffff;
    /* Optional header color (palette.header). Defaults blend the header
       into the page; when set, JS overrides these four - the text tones
       are derived from the header color's luminance, never configured. */
    --header-bg: var(--paper);
    --header-ink: var(--ink);
    --header-soft: var(--ink-soft);
    --header-active: var(--primary);
    --font-display: "Avenir Next", "Avenir", "Segoe UI", "Trebuchet MS", sans-serif;
    --font-body: "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
    --shell: 1080px;
    --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
}

h1, h2, h3, .brand, .btn, .nav-link {
    font-family: var(--font-display);
    line-height: 1.2;
}

img { max-width: 100%; display: block; }

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

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 60%, transparent);
    outline-offset: 2px;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 1.25rem; }
.shell-narrow { max-width: 760px; }
.center { text-align: center; }
.hidden { display: none; }
.page-loading { padding: 4rem 0; color: var(--ink-soft); }

/* ── Signature: crayon-stroke underline ─────────────────────────────────── */

.section-heading, .page-heading { position: relative; }
.section-heading::after, .page-heading::after {
    content: "";
    display: block;
    width: 3.5rem;
    height: 0.375rem;
    margin-top: 0.6rem;
    border-radius: 999px;
    background: var(--primary);
    transform: rotate(-1.4deg);
    opacity: 0.85;
}
.center .page-heading::after { margin-inline: auto; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid color-mix(in srgb, var(--header-bg) 89%, var(--header-ink));
    position: sticky;
    top: 0;
    z-index: 20;
}
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.25rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--header-ink);
    font-weight: 600;
    font-size: 1.15rem;
}
.brand-logo { height: 2.25rem; width: auto; }
.site-nav { display: flex; gap: 0.25rem; }
.nav-link {
    text-decoration: none;
    color: var(--header-soft);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: color 120ms ease, background 120ms ease;
}
.nav-link:hover { color: var(--header-ink); background: color-mix(in srgb, var(--header-ink) 9%, transparent); }
.nav-link.is-active { color: var(--header-active); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.6rem;
    background: none;
    border: 1px solid color-mix(in srgb, var(--header-bg) 80%, var(--header-ink));
    border-radius: 8px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 1px;
    background: var(--header-ink);
}

@media (max-width: 719px) {
    .nav-toggle { display: flex; }
    /* The dropdown matches the header colors - the links use the header
       text tones, so a paper background would swallow them on dark headers */
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 0.5rem 1.25rem 1rem;
        background: var(--header-bg);
        border-bottom: 1px solid color-mix(in srgb, var(--header-bg) 80%, var(--header-ink));
    }
    .site-nav.nav-open { display: flex; }
}

/* ── Sections ───────────────────────────────────────────────────────────── */

/* Menu anchor scrolling lands below the sticky header */
.section, .hero { scroll-margin-top: 4.5rem; }

.section { padding: 3.5rem 0; }
.section.alt { background: var(--mist); }
.section-heading {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin: 0 0 1.25rem;
}

/* Hero */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 26rem;
    overflow: hidden;
    /* Scrim over the photo: base color + strong/weak stops + direction,
       composed as a horizontal layer (follows the text's horizontal
       position) plus an optional vertical layer (top/bottom positions).
       The tone (light/dark), theme tint, position and backdrop variants
       below only retune these variables */
    --scrim-base: var(--ink);
    --scrim-hi: 72%;
    --scrim-lo: 25%;
    --scrim-dir: to right;
    --scrim-h: linear-gradient(var(--scrim-dir),
        color-mix(in srgb, var(--scrim-base) var(--scrim-hi), transparent),
        color-mix(in srgb, var(--scrim-base) var(--scrim-lo), transparent));
    --scrim-v: none;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--scrim-v), var(--scrim-h);
}
.hero-inner { position: relative; width: 100%; padding-top: 3rem; padding-bottom: 3rem; }
.hero-heading {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    margin: 0;
    max-width: 22ch;
}
.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    max-width: 46ch;
    margin: 0.9rem 0 0;
}
.hero:has(.hero-media) { color: var(--white); }
.hero:has(.hero-media) .btn { background: var(--white); color: var(--ink); }
.hero:has(.hero-media) .btn:hover { background: var(--mist); }
.hero:not(:has(.hero-media)) { background: var(--mist); }

/* Optional theme switch "tint hero image" (palette.tint): the hero scrim
   mixes the ACCENT into its base color, washing the photo with the theme
   color instead of the neutral ink/paper scrim */
body.hero-tint .hero {
    --scrim-base: color-mix(in srgb, var(--primary) 55%, var(--ink));
    --scrim-hi: 78%;
    --scrim-lo: 28%;
}
body.hero-tint .hero.hero-text-dark {
    --scrim-base: color-mix(in srgb, var(--primary) 22%, var(--paper));
    --scrim-hi: 85%;
    --scrim-lo: 35%;
}

/* Hero text tone "dark": dark text over a LIGHT overlay - for photos too
   bright for the default white-on-dark treatment (fields.textTone) */
.hero.hero-text-dark {
    --scrim-base: var(--paper);
    --scrim-hi: 85%;
    --scrim-lo: 35%;
}
.hero.hero-text-dark:has(.hero-media) { color: var(--ink); }
.hero.hero-text-dark:has(.hero-media) .btn { background: var(--primary); color: var(--white); }
.hero.hero-text-dark:has(.hero-media) .btn:hover { filter: brightness(1.12); background: var(--primary); }

/* Hero text position: horizontal (fields.textHorizontal left|center|right)
   and vertical (fields.textVertical top|middle|bottom) so the text block
   can be moved away from whatever the photo shows (faces usually sit in
   the middle third). Top/bottom sit higher/lower, not flush to the edge.
   The scrim follows the text so the strong end is always under it */
.hero-h-center .hero-inner { text-align: center; }
.hero-h-right .hero-inner { text-align: right; }
.hero-h-center .hero-heading, .hero-h-center .hero-sub { margin-left: auto; margin-right: auto; }
.hero-h-right .hero-heading, .hero-h-right .hero-sub { margin-left: auto; }
.hero-h-right { --scrim-dir: to left; }
.hero-h-center {
    --scrim-h: linear-gradient(to right,
        color-mix(in srgb, var(--scrim-base) var(--scrim-lo), transparent),
        color-mix(in srgb, var(--scrim-base) var(--scrim-hi), transparent),
        color-mix(in srgb, var(--scrim-base) var(--scrim-lo), transparent));
}
.hero-v-top, .hero-v-bottom {
    --scrim-hi: 50%;
    --scrim-lo: 12%;
}
.hero-v-top {
    align-items: flex-start;
    --scrim-v: linear-gradient(to bottom,
        color-mix(in srgb, var(--scrim-base) 55%, transparent),
        transparent 70%);
}
.hero-v-bottom {
    align-items: flex-end;
    --scrim-v: linear-gradient(to top,
        color-mix(in srgb, var(--scrim-base) 55%, transparent),
        transparent 70%);
}
.hero-v-top .hero-inner { padding-top: 2.5rem; padding-bottom: 5rem; }
.hero-v-bottom .hero-inner { padding-top: 5rem; padding-bottom: 2.5rem; }

/* Hero text backdrop "panel" (fields.textBackdrop): a translucent panel
   behind the text keeps it readable on busy photos; the full-image scrim
   is eased off so the photo stays bright around the panel */
.hero-text { display: inline-block; max-width: 100%; text-align: inherit; }
.hero-panel:has(.hero-media) { --scrim-hi: 34%; --scrim-lo: 8%; --scrim-v: none; }
.hero-panel:has(.hero-media) .hero-text {
    background: color-mix(in srgb, var(--scrim-base) 68%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-radius: 0.75rem;
    padding: 1.5rem 1.75rem;
}
.hero-panel.hero-text-dark:has(.hero-media) .hero-text { background: color-mix(in srgb, var(--scrim-base) 82%, transparent); }
@media (max-width: 599px) {
    .hero-text { display: block; }
    .hero-panel:has(.hero-media) .hero-text { padding: 1.1rem 1.25rem; }
    .hero-v-top .hero-inner { padding-top: 2rem; padding-bottom: 4rem; }
    .hero-v-bottom .hero-inner { padding-top: 4rem; padding-bottom: 2rem; }
}

/* Text section: heading full width, photo floated left/right with the text
   wrapping beside it and continuing full width below (flow-root contains
   the float so the section background always wraps it) */
.text-flow { display: flow-root; }
.text-flow p { margin: 0 0 1rem; }
.text-media { width: min(25%, 210px); margin: 0 0 1rem; }
.text-media.media-left { float: left; margin-right: 2rem; }
.text-media.media-right { float: right; margin-left: 2rem; }
.text-media img { width: 100%; border-radius: var(--radius); }
@media (max-width: 599px) {
    .text-media.media-left, .text-media.media-right { float: none; width: 100%; margin: 0 0 1rem; }
}

/* Cards */
.card-grid {
    --cols: 4; /* set per section by app.js: the column cap that balances the rows */
    display: grid;
    /* each column at least 14rem, and never more than --cols columns (the 1px keeps
       the auto-fit count from rounding down when --cols columns fit exactly) */
    grid-template-columns: repeat(auto-fit, minmax(max(14rem, calc((100% - (var(--cols) - 1) * 1.25rem) / var(--cols) - 1px)), 1fr));
    gap: 1.25rem;
}
.card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.4rem 1.5rem;
}
.section.alt .card { border-color: transparent; }
.card-icon { font-size: 1.75rem; line-height: 1; display: block; margin-bottom: 0.7rem; }
.card-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.4rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.card-link {
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    text-indent: -9999px;
    overflow: hidden;
}
.card:has(.card-link):hover {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
    box-shadow: 0 2px 10px rgba(15, 23, 32, 0.07);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}
.gallery-item { margin: 0; }
/* Photos open the lightbox; the +N badge overlays the last visible one */
.gallery-img-wrap { position: relative; cursor: pointer; }
.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
}
/* Captions sit under their photo, left-aligned with its left edge */
.gallery-caption, .media-caption {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    text-align: left;
}
@media (max-width: 719px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .gallery-grid { grid-template-columns: 1fr; } }

/* What's New teaser */
.news-teaser-list { display: grid; gap: 0.4rem; }
.news-teaser {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "title" "date" "excerpt";
    column-gap: 1.1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: background 120ms ease;
}
.news-teaser:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
/* Post photo as a small thumbnail on the left; date sits under the title */
.news-teaser.has-thumb {
    grid-template-columns: auto 1fr;
    grid-template-areas: "thumb title" "thumb date" "thumb excerpt";
}
.teaser-thumb {
    grid-area: thumb;
    align-self: center;
    position: relative; /* anchors the +N badge */
    width: 6.5rem;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
}
/* Compact +N badge on the small teaser thumbnail */
.teaser-thumb .img-count-badge {
    bottom: 0.25rem;
    right: 0.25rem;
    font-size: 0.68rem;
    padding: 0.05rem 0.4rem;
}
.teaser-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-date {
    grid-area: date;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0.1rem 0 0.35rem;
}
.news-title { grid-area: title; font-family: var(--font-display); font-weight: 600; }
.news-excerpt {
    grid-area: excerpt;
    color: var(--ink-soft);
    font-size: 0.95rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
@media (max-width: 479px) {
    .teaser-thumb { width: 5rem; }
}
.news-more { margin: 1.25rem 0 0; }

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 2rem;
}
.contact-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 0.5rem;
}
.contact-block p { margin: 0 0 0.25rem; }
.contact-name { font-weight: 600; }

/* ── Content pages + posts ──────────────────────────────────────────────── */

.page-article { padding-top: 3rem; }
.page-heading {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 1.5rem;
}
.page-article p { margin: 0 0 1rem; }

.content-image { margin: 1.5rem 0; }
.content-image img { border-radius: var(--radius); }

.attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0.75rem 0 0;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink);
    transition: border-color 120ms ease;
}
/* ── Icon font glue (fawesome folder is used AS-IS, never edited) ───────── */
/* fawesome/style.css declares the font woff2-first but no woff2 file
   ships. This LATER same-family declaration fully replaces its src list,
   so the browser never requests the woff2. */
@font-face {
    font-family: "cassmind_www";
    src: url("fawesome/fonts/cassmind_www.ttf") format("truetype"),
        url("fawesome/fonts/cassmind_www.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: block;
}
/* Glyph classes - fawesome/style.css defines only the base .icon.
   Codepoints from fawesome/cassmind-www.icomoon.json. */
.icon-map-pin:before { content: "\f110"; }
.icon-mail:before { content: "\f3bb"; }
.icon-phone:before { content: "\f16f"; }
.icon-calendar:before { content: "\f009"; }
.icon-link:before { content: "\f416"; }
.icon-pdf:before { content: "\f7bf"; }

.attachment:hover { border-color: var(--primary); }
.attachment-static { cursor: default; }
.attachment-static:hover { border-color: var(--line); }
.attachment-icon { color: var(--primary); }
/* Icon before inline links in post/page text: fa-link = external link,
   fa-file-pdf = document, fa-angle-right = internal page */
.link-icon { color: var(--primary); margin-right: 0.3em; display: inline-block; }
.link-icon i, .attachment-icon i { font-size: 0.92em; }
/* Icon font glyphs used across the chrome */
.icon-line i { color: var(--primary); margin-right: 0.45em; font-size: 0.92em; }
.site-footer .icon-line i { color: inherit; opacity: 0.75; }
.contact-label i { color: var(--primary); margin-right: 0.45em; font-size: 0.95em; }
.post-meta i { margin-right: 0.4em; font-size: 0.95em; vertical-align: -0.05em; }

.post-list { display: grid; gap: 2.5rem; }
.post { border-top: 1px solid var(--line); padding-top: 1.75rem; }
.post:first-child { border-top: 0; padding-top: 0; }
.post-title { font-size: 1.35rem; font-weight: 600; margin: 0; }
.post-title-link { color: inherit; text-decoration: none; }
.post-title-link:hover { color: var(--primary); }
.post-meta { color: var(--ink-soft); font-size: 0.9rem; margin: 0.25rem 0 1rem; }
.author-link { color: inherit; }
.author-link:hover { color: var(--primary); }
/* "Showing posts by X" banner above the filtered blog list */
.filter-note {
    background: var(--mist);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    margin: 0 0 1.75rem;
}
.post-more-link { font-size: 0.9rem; }
/* Blog list shows only the post's FIRST photo; a +N badge marks the rest.
   On the list the photo is a link to the post's own page (an <a>); on the
   post page it is a lightbox trigger (a <div>) - same wrapper class */
.post-images { margin: 0 0 1rem; }
.post-images img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}
.post-img-wrap { position: relative; display: block; cursor: pointer; }
.img-count-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    pointer-events: none;
}
/* Desktop: the photo floats at half width, alternating side per post, with
   the text wrapping around it (mobile keeps it full width above the text) */
@media (min-width: 600px) {
    .post { display: flow-root; }
    .post-images { width: 50%; }
    .post:nth-of-type(odd) .post-images { float: left; margin-right: 2rem; }
    .post:nth-of-type(even) .post-images { float: right; margin-left: 2rem; }
    /* Single post page: the main photo always floats left */
    .post-images.post-media-left { float: left; margin-right: 2rem; margin-left: 0; }
    .post-images img { aspect-ratio: auto; }
}

/* ── Single post page ───────────────────────────────────────────────────── */

.post-back { margin: 0 0 1.5rem; }
.post-single { border-top: 0; padding-top: 0; }
.post-single .page-heading { margin-bottom: 0; }
/* Remaining photos: thumbnail gallery under the article */
.post-thumbs {
    clear: both;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.25rem 0 0;
}
.post-thumb {
    flex: 0 1 calc((100% - 1.8rem) / 4);
    aspect-ratio: 4 / 3;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 599px) {
    .post-thumb { flex-basis: calc((100% - 0.6rem) / 2); }
}

/* ── Lightbox (photo browser) ───────────────────────────────────────────── */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 12, 14, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
}
/* .hidden is defined earlier in this file - at equal specificity the flex
   rule above would win, so hide must be re-stated here or close never works */
.lightbox.hidden { display: none; }
.lightbox-locked { overflow: hidden; }
.lightbox-figure {
    position: relative; /* caption anchors to the image box below */
    margin: 0;
    max-width: min(92vw, 1100px);
    text-align: center;
}
.lightbox-img {
    max-width: 100%;
    /* the caption bar overlays the image, so only close-button headroom
       is reserved */
    max-height: calc(100vh - 6rem);
    border-radius: var(--radius);
    display: block;
    margin: 0 auto;
}
/* One bar attached to the image bottom: "1 / 2 - caption", left-aligned,
   solid dark background (nothing bleeds through) carrying the image's
   bottom rounded corners. Overlaid - the image never shifts */
.lightbox-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    text-align: left;
    font-size: 0.92rem;
    padding: 0.5rem 0.8rem;
    border-radius: 0 0 var(--radius) var(--radius);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-family: var(--font-display);
    line-height: 1;
    padding: 0.5rem 0.9rem;
    opacity: 0.8;
    transition: opacity 120ms ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-close { top: 0.75rem; right: 0.9rem; font-size: 2.2rem; }
.lightbox-prev, .lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}
.lightbox-prev { left: 0.35rem; }
.lightbox-next { right: 0.35rem; }
@media (max-width: 599px) {
    .lightbox-prev, .lightbox-next { font-size: 2.4rem; }
    .lightbox-img { max-height: calc(100vh - 7rem); }
}
.pin-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    margin-bottom: 0.4rem;
}

/* ── Buttons + links ────────────────────────────────────────────────────── */

.btn-row { margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.97rem;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    transition: background 120ms ease;
}
.btn:hover { background: color-mix(in srgb, var(--primary) 85%, black); }
.text-link { font-family: var(--font-display); font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--ink);
    color: color-mix(in srgb, var(--white) 82%, var(--ink));
    margin-top: 3rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 2rem;
    padding-top: 2.75rem;
    padding-bottom: 2rem;
}
.footer-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 0.4rem;
}
.site-footer p { margin: 0 0 0.25rem; }
.site-footer a { color: var(--white); }
.footer-nav { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-legal {
    border-top: 1px solid color-mix(in srgb, var(--white) 15%, transparent);
    padding-top: 1rem;
    padding-bottom: 1.5rem;
    font-size: 0.85rem;
}
.footer-legal a {
    color: inherit;
    text-decoration: none;
}
.footer-legal a:hover {
    text-decoration: underline;
}

/* ── Closure notice band (auto "school closed", under the header) ─────── */
/* Fed by publicSetting closureNotice. Deliberately NOT themed: a solid
   alert red with white text so nobody can overlook it; the calendar
   exception type color (Snow Day etc.) only tints the top stripe. */
.closure-notice {
    background: #c62828;
    color: #ffffff;
    border-top: 5px solid var(--notice-color, #ffffff);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.closure-notice-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    /* top/bottom only - the shell's side padding must survive on mobile */
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.closure-notice-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c62828;
    background: #ffffff;
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    white-space: nowrap;
}
.closure-notice-text { font-size: 1.25rem; line-height: 1.4; color: #ffffff; }
.closure-notice-reason { font-family: var(--font-display); font-weight: 800; }
.closure-notice-dates { font-family: var(--font-display); font-weight: 700; }
.closure-notice-dates::before { content: "\00b7"; margin: 0 0.4rem; font-weight: 400; }
.closure-notice-note { color: rgba(255, 255, 255, 0.9); }
.closure-notice-note::before { content: "\00b7"; margin: 0 0.4rem; }
@media (max-width: 599px) {
    .closure-notice-text { font-size: 1.05rem; }
}

/* ── Preview bar (above the header while ?preview=CODE is active) ─────── */
/* Un-themed like the closure notice: staff must always notice they are
   looking at unpublished content. The invalid variant is neutral gray. */
.preview-bar {
    background: #1e3a5f;
    color: #ffffff;
}
.preview-bar-invalid { background: #4b5563; }
.preview-bar-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    font-size: 0.95rem;
}
.preview-bar-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e3a5f;
    background: #ffffff;
    border-radius: 999px;
    padding: 0.25rem 0.8rem;
    white-space: nowrap;
}
.preview-bar-invalid .preview-bar-badge { color: #4b5563; }
.preview-bar-text { flex: 1 1 auto; }
.preview-bar-exit {
    font: inherit;
    font-size: 0.85rem;
    color: #ffffff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    padding: 0.25rem 0.8rem;
    cursor: pointer;
}
.preview-bar-exit:hover { background: rgba(255, 255, 255, 0.12); }

/* ── Offline ("coming soon") page: website.offline = 1 and no preview ──── */
.offline-page { padding-top: 5rem; padding-bottom: 6rem; }
.offline-kicker {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0 0 0.5rem;
}
.offline-contact { margin-top: 2rem; display: inline-block; text-align: left; }
.offline-contact .icon-line { margin: 0.35rem 0; }
