/*
  SchoolCloud public site (signed-out pages). Loaded only by Views/Shared/_PublicLayout.cshtml.
  Lives in css/public/ on purpose: production bundles every top-level /css/*.css into every page,
  and this file must never reach the signed-in screens.

  Colours come from the signed-in app (separate/color.css): slate #253939 and teal #538E96.
  Links and buttons that carry text use darker shades so the text meets 4.5:1 contrast.
*/
:root {
    --sc-slate: #253939;
    --sc-teal: #538E96;          /* borders, stripes and focus rings only (3.7:1 on white, too light for text) */
    --sc-teal-strong: #3f7a83;   /* links and buttons */
    --sc-teal-tint: #e8f1f2;
    --sc-green: #3d7d47;         /* primary button */
    --sc-text: #1f2d2d;
    --sc-muted: #5b6d6d;
    --sc-border: #e1e8e8;
    --sc-surface: #f4f7f7;
    --sc-white: #ffffff;
    --sc-error: #b42318;
    --sc-error-tint: #fdecea;

    --sc-radius: 12px;
    --sc-radius-sm: 7px;
    --sc-shadow: 0 10px 30px rgba(20, 40, 40, .14);
    --sc-font: 'Lato', Calibri, Arial, sans-serif;

    --sc-space-1: 4px;
    --sc-space-2: 8px;
    --sc-space-3: 12px;
    --sc-space-4: 16px;
    --sc-space-5: 24px;
    --sc-space-6: 32px;
    --sc-space-7: 48px;
    --sc-space-8: 64px;

    --sc-container: 1140px;
}

/* ---------- Base ---------- */
.sc-public *,
.sc-public *::before,
.sc-public *::after { box-sizing: border-box; }

.sc-public {
    margin: 0;
    font-family: var(--sc-font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--sc-text);
    background: var(--sc-white);
    -webkit-font-smoothing: antialiased;
    /* Sticky footer: on short pages the footer sits at the bottom of the window, not mid-page. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.sc-public > main { flex: 1 0 auto; display: flex; flex-direction: column; }
.sc-public img { max-width: 100%; height: auto; }
/* Links have no underline at rest. To stay distinguishable without colour alone (WCAG 1.4.1) they are bold, and
   the underline returns on hover and keyboard focus. */
.sc-public a {
    color: var(--sc-teal-strong);
    font-weight: 700;
    text-decoration: none;
    text-underline-offset: 3px;
}
.sc-public a:hover,
.sc-public a:focus-visible { color: var(--sc-slate); text-decoration: underline; }
.sc-public :focus-visible { outline: 3px solid var(--sc-teal); outline-offset: 2px; }
.sc-public h1, .sc-public h2, .sc-public h3 { line-height: 1.2; margin: 0 0 var(--sc-space-3); color: var(--sc-text); }
.sc-public h1 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 900; }
.sc-public h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 900; }
.sc-public h3 { font-size: 18px; font-weight: 700; }
.sc-public p { margin: 0 0 var(--sc-space-4); }

.sc-container {
    width: 100%;
    max-width: var(--sc-container);
    margin: 0 auto;
    padding-inline: var(--sc-space-4);
}
.sc-section { padding-block: var(--sc-space-8); }
.sc-section-surface { background: var(--sc-surface); }
.sc-section-head { max-width: 720px; margin-bottom: var(--sc-space-6); }
.sc-eyebrow {
    display: block;
    margin-bottom: var(--sc-space-2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sc-teal-strong);
}
/* On the home page the eyebrow sits inside the h1, so the heading names what SchoolCloud is. Keep the body's
   line height there so it looks like a standalone eyebrow. */
.sc-public h1 .sc-eyebrow { line-height: 1.55; }
.sc-lead { font-size: 18px; color: var(--sc-muted); }

/* ---------- Buttons ---------- */
.sc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sc-space-2);
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--sc-radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}
.sc-public a.sc-button,
.sc-public a.sc-button:hover,
.sc-public a.sc-brand,
.sc-public a.sc-brand:hover { text-decoration: none; }
.sc-button-primary { width: 100%; background: var(--sc-green); color: var(--sc-white); }
/* White text on link buttons too (e.g. "Request a new link" on the Choose password page): `.sc-public a` and its
   hover/:focus-visible rule out-rank .sc-button-primary and would turn the text teal, then slate. */
.sc-public .sc-button-primary,
.sc-public .sc-button-primary:focus-visible { color: var(--sc-white); }
.sc-public .sc-button-primary:hover { background: #336a3c; color: var(--sc-white); }
.sc-button-teal { background: var(--sc-teal-strong); color: var(--sc-white); }
.sc-public .sc-button-teal,
.sc-public .sc-button-teal:hover,
.sc-public .sc-button-teal:focus-visible { color: var(--sc-white); }
.sc-public .sc-button-teal:hover { background: #356a72; }
.sc-button-outline { background: transparent; border-color: var(--sc-teal-strong); color: var(--sc-teal-strong); }

/* ---------- Header ---------- */
.sc-header {
    background: var(--sc-slate);
    border-bottom: 5px solid var(--sc-teal);
    color: var(--sc-white);
}
.sc-header-inner {
    display: flex;
    align-items: center;
    gap: var(--sc-space-5);
    min-height: 68px;
}
.sc-brand {
    display: inline-flex;
    flex-shrink: 0;              /* never squeeze the wordmark under the menu */
    align-items: center;
    gap: var(--sc-space-2);
    margin-right: auto;
    font-size: 21px;
    font-weight: 900;
    text-decoration: none;
}
.sc-public .sc-header .sc-brand { color: var(--sc-white); }
.sc-brand img { width: 31px; height: 30px; }
.sc-nav { display: flex; gap: var(--sc-space-5); }
.sc-public .sc-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;            /* a taller click area; the header's own height doesn't change */
    color: #d9e7e7;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.sc-public .sc-nav a:hover { color: var(--sc-white); }
.sc-public .sc-nav a:hover span { text-decoration: underline; }
.sc-nav-icon { width: 16px; height: 16px; flex: none; }
/* Current page: white text and a teal bar under the label (desktop), a tinted row (phone menu). */
.sc-public .sc-nav a[aria-current="page"] { color: var(--sc-white); }
.sc-public .sc-nav-desktop a[aria-current="page"] span { box-shadow: inset 0 -3px 0 var(--sc-teal); }
.sc-public .sc-nav-mobile a[aria-current="page"] { background: rgba(255, 255, 255, .08); }

/* "Skip to content": off-screen until it receives keyboard focus. */
.sc-public .sc-skip {
    position: absolute;
    left: var(--sc-space-4);
    top: -60px;
    z-index: 100;
    padding: var(--sc-space-2) var(--sc-space-4);
    border-radius: var(--sc-radius-sm);
    background: var(--sc-white);
    color: var(--sc-slate);
    box-shadow: var(--sc-shadow);
}
.sc-public .sc-skip:focus { top: var(--sc-space-2); }
.sc-public > main:focus { outline: none; }

/* The <details> menu replaces the desktop nav on narrow screens (see "Narrow screens"). */
.sc-menu { display: none; position: relative; }
.sc-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--sc-space-2);
    min-height: 44px;
    padding: 0 var(--sc-space-2);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.sc-menu-toggle::-webkit-details-marker { display: none; }
.sc-menu-bars,
.sc-menu-bars::before,
.sc-menu-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.sc-menu-bars { position: relative; }
.sc-menu-bars::before,
.sc-menu-bars::after { content: ""; position: absolute; left: 0; }
.sc-menu-bars::before { top: -6px; }
.sc-menu-bars::after { top: 6px; }
.sc-nav-mobile {
    position: absolute;
    right: 0;
    top: calc(100% + 13px);
    z-index: 10;
    flex-direction: column;
    gap: 0;
    min-width: 220px;
    padding: var(--sc-space-2) 0;
    background: var(--sc-slate);
    border: 1px solid var(--sc-teal);
    border-radius: var(--sc-radius-sm);
    box-shadow: var(--sc-shadow);
}
.sc-public .sc-nav-mobile a { padding: var(--sc-space-3) var(--sc-space-4); }

/* ---------- Announcement bar (home page) ---------- */
/* A slim tinted bar between the header and the hero. One line (45px) on a desktop screen, so the home page
   still fits 1920×1080; it wraps on narrower screens. Temporary: remove it once people know the new look. */
.sc-announce {
    padding-block: 10px;
    border-bottom: 1px solid #c9dcdf;
    background: var(--sc-teal-tint);
    font-size: 14px;
    text-align: center;
}
.sc-public .sc-announce p { margin: 0; }
/* "What changed?": a button that reads as a link. Darker than the usual link teal (4.2:1 on this tint) and
   underlined, so it doesn't rely on colour. 24px tall to meet the WCAG 2.5.8 target size. */
.sc-announce-more {
    min-height: 24px;
    padding: 0 var(--sc-space-1);
    border: 0;
    background: none;
    color: #2f5f66;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.sc-announce-more:hover { color: var(--sc-slate); }
/* The details it opens share the school popover's box (.sc-school-pop, below). Layout: the key answer first
   and larger, then "still the same" (check marks) beside "what's new" (dots) as short phrases to scan, a
   tinted help note, and "Got it" at the end. */
.sc-whats-new { font-size: 15px; text-align: start; overscroll-behavior: contain; }   /* scrolling inside it never moves the page behind */
.sc-whats-new-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sc-space-4); margin-bottom: var(--sc-space-3); }
.sc-public .sc-whats-new h2 { margin: 0; font-size: 22px; }
.sc-whats-new-lead { font-size: 17px; }
/* Three classes to out-rank ".sc-public .sc-announce p", which zeroes paragraph margins inside the bar. */
.sc-public .sc-whats-new .sc-whats-new-where { margin-top: var(--sc-space-2); }
.sc-whats-new-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sc-space-5); margin-top: var(--sc-space-4); }
/* Small uppercase labels, like the site's eyebrows (4.9:1 on white). */
.sc-public .sc-whats-new h3 {
    margin: 0 0 var(--sc-space-2);
    color: var(--sc-teal-strong);
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
/* The plain list's text lines up with the check list's (26px in). */
.sc-whats-new ul:not(.sc-checklist) { margin: 0; padding-left: 26px; }
.sc-whats-new ul li { margin-bottom: 6px; }
.sc-whats-new li::marker { color: var(--sc-teal-strong); }
.sc-whats-new .sc-note { margin-top: var(--sc-space-3); background: var(--sc-surface); }
.sc-whats-new-done { margin-top: var(--sc-space-4); }
@media (max-width: 560px) {
    .sc-whats-new-cols { grid-template-columns: minmax(0, 1fr); row-gap: var(--sc-space-3); }
}

/* ---------- Hero ---------- */
/* Kept tight so the whole home page (header, announcement bar, hero with the sign-in card, footer) fits
   1920×1080 at 100%. The soft tint lets the white sign-in card stand out. On the home page the hero grows to
   fill the space between header and footer, so the tint has no white band under it. */
.sc-hero {
    display: flex;
    align-items: center;
    padding-block: var(--sc-space-6);
    background: linear-gradient(120deg, #ffffff 0%, #f3f8f8 45%, var(--sc-teal-tint) 100%);
}
/* :only-of-type, not :only-child: the home page's announcement bar and structured-data <script> are also children
   of main, so the hero is never an only child there. */
.sc-public > main > .sc-hero:only-of-type { flex: 1 0 auto; }
.sc-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: var(--sc-space-7);
    align-items: center;
}
.sc-hero-copy p { font-size: 18px; color: var(--sc-muted); max-width: 560px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: var(--sc-space-2); padding: 0; margin: 0; list-style: none; }
.sc-chip {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--sc-teal-tint);
    color: #2f5f66;
    font-size: 13px;
    font-weight: 700;
}

/* ---------- Cards and the sign-in card ---------- */
.sc-card {
    background: var(--sc-white);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    padding: var(--sc-space-5);
}
.sc-signin {
    max-width: 440px;
    width: 100%;
    justify-self: end;
    padding: var(--sc-space-5) var(--sc-space-6);
    /* Stands out from the page: the header's teal stripe across the top, a tinted border, a deeper shadow. */
    border: 1px solid #c9dcdf;
    border-top: 6px solid var(--sc-teal);
    box-shadow: 0 18px 44px rgba(20, 40, 40, .18);
}
/* 32px below: the old 16px plus the 16px the subtitle's stray margin used to add (see .sc-signin-sub). */
.sc-signin-head { display: flex; align-items: center; gap: var(--sc-space-3); margin-bottom: var(--sc-space-6); }
.sc-signin-badge {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--sc-teal-tint);
    color: var(--sc-teal-strong);
}
.sc-signin-badge svg { width: 22px; height: 22px; }
.sc-public .sc-signin-head h2,
.sc-public .sc-signin-head h1 { margin: 0; }
.sc-button-block { width: 100%; margin-top: var(--sc-space-3); }
/* .sc-public scope so this beats `.sc-public p`. Its 16px bottom margin made the text block taller than it
   looks and put the lock badge 9px below the middle of the heading and subtitle. */
.sc-public .sc-signin-sub { margin: 2px 0 0; font-size: 14px; color: var(--sc-muted); }
.sc-signin h2 { font-size: 22px; margin-bottom: var(--sc-space-3); }
/* Email and password boxes: icon inside, light tint, white with a teal ring when focused. */
.sc-input-wrap { position: relative; }
.sc-input-wrap > svg {
    position: absolute;
    left: 13px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--sc-teal-strong);
    pointer-events: none;
}
.sc-input-wrap > .sc-input { padding-left: 42px; }
.sc-signin .sc-input { background: #f5f9f9; }
.sc-signin .sc-input:focus { background: var(--sc-white); }
.sc-signin .sc-field { margin-bottom: var(--sc-space-3); }
/* A single centred card (Forgot Password, Choose password). */
.sc-narrow { margin-inline: auto; }
.sc-public .sc-narrow h1 { font-size: 26px; }
/* The school's logo at the top of its invitation card (Views/Public/ChoosePassword.cshtml). */
.sc-choose-school-logo { display: block; max-width: 100%; max-height: 72px; margin: 0 auto var(--sc-space-4); }
.sc-field { margin-bottom: var(--sc-space-4); }
.sc-field label {
    display: block;
    margin-bottom: var(--sc-space-1);
    font-size: 14px;
    font-weight: 700;
}
.sc-input {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #7f9090;   /* 3.3:1 against white (WCAG 1.4.11 asks for 3:1 on input borders) */
    border-radius: var(--sc-radius-sm);
    background: var(--sc-white);
    color: var(--sc-text);
    font-family: inherit;
    font-size: 16px;
}
.sc-input:focus { border-color: var(--sc-teal-strong); box-shadow: 0 0 0 3px rgba(83, 142, 150, .3); }
.sc-public .sc-input:focus-visible { outline: none; }   /* the box-shadow ring above replaces the default outline */
.sc-row-end { display: flex; justify-content: flex-end; margin: calc(-1 * var(--sc-space-2)) 0 var(--sc-space-4); font-size: 14px; }
/* 2px of padding takes the link's click area past 24px (WCAG 2.5.8); the matching negative margin keeps the
   card's height. */
.sc-public .sc-row-end a { padding-block: 2px; margin-block: -2px; font-weight: 700; }
.sc-divider {
    display: flex;
    align-items: center;
    gap: var(--sc-space-3);
    margin: var(--sc-space-3) 0;
    color: var(--sc-muted);
    font-size: 13px;
}
.sc-divider::before,
.sc-divider::after { content: ""; flex: 1; height: 1px; background: var(--sc-border); }
/* .sc-public scope so this beats `.sc-public p`, which otherwise zeroes the top margin. */
.sc-public .sc-signin-note { margin: var(--sc-space-4) 0 0; font-size: 13px; color: var(--sc-muted); }

/* Validation messages from Html.ValidationSummary / ValidationMessageFor */
.sc-public .validation-summary-valid,
.sc-public .field-validation-valid { display: none; }
.signin-errors .validation-summary-errors,
.sc-public .validation-summary-errors {
    margin-bottom: var(--sc-space-4);
    padding: var(--sc-space-3) var(--sc-space-4);
    border: 1px solid #f4c7c3;
    border-radius: var(--sc-radius-sm);
    background: var(--sc-error-tint);
    color: var(--sc-error);
    font-size: 14px;
}
.sc-public .validation-summary-errors ul { margin: 0; padding-left: 18px; }
.sc-public .field-validation-error { display: block; margin-top: var(--sc-space-1); color: var(--sc-error); font-size: 14px; }
.sc-notice {
    margin-bottom: var(--sc-space-4);
    padding: var(--sc-space-3) var(--sc-space-4);
    border: 1px solid #b7d8bd;
    border-radius: var(--sc-radius-sm);
    background: #edf7ef;
    color: #24542c;
}

/* "Sign in with" buttons. Both use the site's own font and text colour (Lato 700, like the "Sign in" button
   above) so they read as a pair. Every other published brand rule is kept:
   - Microsoft redlines: 21px logo, 12px before the text, white fill, 1px #8C8C8C border. Not followed: its
     Segoe UI 15px weight 600 in #5E5E5E.
   - Google branding guidelines, light theme: standard-colour G (20px), 10px before the text, white fill, 1px
     #747775 border. Not followed: its Google Sans Medium 14/20.
   Both buttons are the same size, because Google's must be at least as prominent as any other provider's.
   Hover and pressed use plain greys: the G may only sit on a white, neutral or dark fill. */
.sso-form { margin: 0 0 var(--sc-space-2); }
.sc-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--sc-radius-sm);
    background: var(--sc-white);
    color: var(--sc-text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}
.sc-sso svg { flex: none; }
.sc-sso-google { border: 1px solid #747775; }
.sc-sso-google svg { width: 20px; height: 20px; margin-right: 10px; }
.sc-sso-microsoft { border: 1px solid #8C8C8C; }
.sc-sso-microsoft svg { width: 21px; height: 21px; margin-right: 12px; }
.sc-sso:hover { background: #f2f2f2; }
.sc-sso:active { background: #e8e8e8; }

/* ---------- Feature tiles ---------- */
.sc-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sc-space-4);
    padding: 0;
    margin: 0;
    list-style: none;
}
.sc-tile { height: 100%; }
.sc-tile p { margin: 0; color: var(--sc-muted); font-size: 15px; }
.sc-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: var(--sc-space-3);
    border-radius: 10px;
    background: var(--sc-teal-tint);
    color: var(--sc-teal-strong);
}
.sc-icon svg { width: 22px; height: 22px; }

/* ---------- Two-column text block ---------- */
.sc-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sc-space-7);
    align-items: start;
}

/* ---------- Testimonials ---------- */
.sc-quotes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sc-space-4);
    padding: 0;
    margin: 0;
    list-style: none;
}
/* Seven quotes: the first spans both columns, so the other six fill three rows with none left alone. */
.sc-quotes > li:first-child { grid-column: 1 / -1; }
.sc-quotes > li:first-child blockquote { max-width: 75ch; }
/* Logo, quote, then attribution. The quote grows so every attribution sits at the bottom of its card. */
.sc-quote { display: flex; flex-direction: column; height: 100%; margin: 0; }
/* .sc-public prefix: out-ranks the base `.sc-public img { height: auto }` rule. */
.sc-public .sc-quote-logo { display: block; align-self: flex-start; height: 56px; width: auto; max-width: 180px; object-fit: contain; object-position: left center; margin-bottom: var(--sc-space-4); }
.sc-quote blockquote {
    flex: 1;
    margin: 0 0 var(--sc-space-4);
    padding-left: var(--sc-space-4);
    border-left: 3px solid var(--sc-teal);
    color: var(--sc-text);
    font-size: 16px;
    line-height: 1.6;
}
.sc-quote figcaption { padding-top: var(--sc-space-3); border-top: 1px solid var(--sc-border); font-size: 14px; color: var(--sc-teal-strong); }
.sc-quote figcaption strong { display: block; font-size: 16px; color: var(--sc-text); }

/* ---------- School logo grid (Our Schools) ---------- */
/* Flex rather than grid so a short last row is centred: the logo count rarely fills every row. */
.sc-logo-grid {
    --logo-cols: 6;
    --logo-gap: var(--sc-space-4);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--logo-gap);
    padding: 0;
    margin: 0;
    list-style: none;
}
.sc-logo-grid > li { flex: 0 0 calc((100% - (var(--logo-cols) - 1) * var(--logo-gap)) / var(--logo-cols)); }
.sc-logo-tile {
    display: grid;
    /* One fixed cell the size of the tile, so the logo's height:100% resolves (an auto row wouldn't). */
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 0;               /* without this, a tall logo stretches the tile past 4:3 */
    overflow: hidden;
    padding: var(--sc-space-3);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    background: var(--sc-white);
    cursor: pointer;
}
.sc-logo-tile:hover { border-color: var(--sc-teal); }
/* No published logo: the name stands in, grey like the logos until hovered or focused. */
.sc-logo-text { color: var(--sc-muted); font-size: 15px; font-weight: 700; line-height: 1.3; text-align: center; }
.sc-logo-tile:hover .sc-logo-text,
.sc-logo-tile:focus-visible .sc-logo-text { color: var(--sc-teal-strong); }
/* Grey until hovered or focused, like schoolcloud.school. .sc-public prefix out-ranks `.sc-public img`. */
.sc-public .sc-logo-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;         /* each logo keeps its shape inside the fixed 4:3 tile */
    filter: grayscale(1);
    opacity: .75;
}
.sc-public .sc-logo-tile:hover img,
.sc-public .sc-logo-tile:focus-visible img { filter: none; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
    .sc-public .sc-logo-tile img { transition: filter .2s, opacity .2s; }
}

/* The school's details: a native popover, centred in the top layer, closed by Escape or a click outside.
   The home page's "What changed?" details (.sc-whats-new) use the same box. */
.sc-school-pop,
.sc-whats-new {
    width: min(560px, calc(100% - 32px));
    max-height: min(80vh, 640px);
    overflow: auto;
    margin: auto;
    padding: var(--sc-space-6);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    background: var(--sc-white);
    color: var(--sc-text);
    box-shadow: var(--sc-shadow);
}
.sc-public .sc-school-pop h3 { font-size: 20px; }
.sc-school-pop p { color: var(--sc-muted); font-size: 15px; }
.sc-school-pop-actions { display: flex; flex-wrap: wrap; gap: var(--sc-space-2); margin-top: var(--sc-space-4); }
.sc-school-pop::backdrop,
.sc-whats-new::backdrop { background: rgba(20, 40, 40, .35); }
/* While a school's details are open, the page behind the dimmed backdrop ignores the mouse. A popover's backdrop
   doesn't catch clicks, so a click on another logo used to close these details and open that school's. Now a
   click outside only closes them (the popover's own light dismiss); the details stay clickable. A modal
   <dialog> would also block the page, but opening one without JavaScript is too new for older Safari. Browsers
   without popovers don't match :popover-open, so this rule doesn't apply there. */
.sc-public:has(.sc-school-pop:popover-open) > :is(.sc-skip, header, main, footer) { pointer-events: none; }
.sc-school-pop:popover-open { pointer-events: auto; }
/* Popover fallback: browsers without the popover API ignore the attribute and render the details in place,
   so style a school's details as a caption under the logo and drop its Close button. */
@supports not selector(:popover-open) {
    .sc-school-pop { width: auto; max-height: none; margin: var(--sc-space-2) 0 0; padding: 0; border: 0; box-shadow: none; background: none; font-size: 14px; }
    .sc-school-pop-close { display: none; }
    /* The announcement bar says enough on its own: no button that can't open anything. */
    .sc-announce-more,
    .sc-whats-new { display: none; }
}

/* ---------- Inner pages ---------- */
.sc-page-head {
    padding-block: var(--sc-space-7);
    background: var(--sc-surface);
    border-bottom: 1px solid var(--sc-border);
}
.sc-page-head p:last-child { margin-bottom: 0; }
/* A short notice, e.g. "Features vary by school" on /Features. */
.sc-note {
    max-width: 820px;
    margin-top: var(--sc-space-5);
    padding: var(--sc-space-3) var(--sc-space-4);
    border-left: 4px solid var(--sc-teal);
    border-radius: var(--sc-radius-sm);
    background: var(--sc-white);
    font-size: 15px;
}
.sc-note p { margin: 0; }
.sc-grid {
    display: grid;
    gap: var(--sc-space-4);
    padding: 0;
    margin: 0;
    list-style: none;
}
.sc-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* A featured card that spans the whole row (the PASI card on /Features), with the teal edge of .sc-note; its text keeps a readable line length. */
.sc-card-wide { grid-column: 1 / -1; border-left: 4px solid var(--sc-teal); }
.sc-card-wide p { max-width: 75ch; }
.sc-grid > .sc-card p:last-child { margin-bottom: 0; }
.sc-public .sc-tile-title { font-size: 18px; font-weight: 700; }
.sc-checklist { margin: 0; padding: 0; list-style: none; }   /* role="list" in the markup keeps it a list for VoiceOver */
.sc-checklist li { position: relative; margin-bottom: var(--sc-space-2); padding-left: 26px; }
/* A teal check mark drawn with two borders. */
.sc-checklist li::before {
    content: "";
    position: absolute;
    top: .3em;
    left: 6px;
    width: 6px;
    height: 11px;
    border: solid var(--sc-teal-strong);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.school-card-logo { display: block; max-height: 56px; width: auto; max-width: 180px; margin-bottom: var(--sc-space-3); }
.school-card-text { font-size: 15px; color: var(--sc-muted); overflow-wrap: anywhere; }
.school-card-text p:last-child { margin-bottom: 0; }

.sc-stats { display: grid; gap: var(--sc-space-4); padding: 0; margin: 0; list-style: none; }
.sc-stats strong { display: block; font-size: 40px; font-weight: 900; line-height: 1; color: var(--sc-teal-strong); }
.sc-stats span { color: var(--sc-muted); }   /* 4.8:1 on the tint */
.sc-stats .sc-card { border-color: #c9dcdf; border-left: 4px solid var(--sc-teal); background: var(--sc-teal-tint); }
/* Team on /About: all five in one row on desktop, each card led by a portrait (2:3, from schoolcloud.school). */
.sc-team { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sc-person { padding: var(--sc-space-4); font-size: 14px; }
.sc-public .sc-person-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    margin-bottom: var(--sc-space-3);
    border-radius: var(--sc-radius-sm);
    background: var(--sc-surface);
}
/* Contact Us: the email, phone and map links are the visible text, padded to a comfortable tap target (WCAG 2.5.8). */
.sc-public .sc-contact-link { display: inline-block; padding-block: 4px; font-size: 17px; }
/* Contact Us: the "Book a demo" form beside the contact cards (stacked at 960px and narrower). */
.sc-contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--sc-space-5);
    align-items: start;
}
/* --demo-pad is the card's padding; the header band and the action footer bleed to the card's edges by it. */
.sc-demo-card { --demo-pad: var(--sc-space-6); overflow: hidden; padding: var(--demo-pad); border-top: 6px solid var(--sc-teal); }
.sc-demo-head {
    display: flex;
    align-items: flex-start;
    gap: var(--sc-space-4);
    margin: calc(-1 * var(--demo-pad)) calc(-1 * var(--demo-pad)) var(--sc-space-5);
    padding: var(--sc-space-5) var(--demo-pad);
    border-bottom: 1px solid #c9dcdf;
    background: var(--sc-teal-tint);
}
/* Solid teal, like the contact icons beside it (white on #3f7a83 is 4.9:1). */
.sc-demo-badge {
    display: grid;
    flex: none;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--sc-teal-strong);
    color: var(--sc-white);
}
.sc-demo-badge svg { width: 26px; height: 26px; }
.sc-public .sc-demo-head h2 { margin: 2px 0 var(--sc-space-1); }
/* "Book a demo" links open at #book-a-demo. The heading sits 32px below the card's top (6px border, 24px band
   padding, 2px margin), so 48px leaves the card's top 16px below the window, level with the sticky panel beside it. */
#book-a-demo { scroll-margin-top: var(--sc-space-7); }
.sc-public .sc-demo-intro { margin: 0; color: var(--sc-muted); }   /* #5b6d6d on the tint is 4.8:1 */
/* Two groups, "About you" and "About your school", each with a legend (read out with every field in the group). */
.sc-demo-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.sc-demo-form fieldset + fieldset { margin-top: var(--sc-space-3); }
/* The divider is the legend's own underline: a border on the fieldset would run through the legend. */
.sc-demo-form legend { width: 100%; margin-bottom: var(--sc-space-4); padding: 0 0 var(--sc-space-2); border-bottom: 1px solid var(--sc-border); color: var(--sc-text); font-size: 18px; font-weight: 700; }
/* Step number before each group's name; decorative (aria-hidden), so the legend still reads "About you". */
.sc-step {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-right: var(--sc-space-2);
    border-radius: 50%;
    background: var(--sc-teal-strong);
    color: var(--sc-white);
    font-size: 14px;
    vertical-align: 2px;
}
/* Tinted fields, white when focused: the same treatment as the sign-in card. */
.sc-demo-form .sc-input { background: #f5f9f9; }
.sc-demo-form .sc-input:focus { background: var(--sc-white); }
.sc-demo-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sc-space-3) var(--sc-space-4);
    margin: var(--sc-space-4) calc(-1 * var(--demo-pad)) calc(-1 * var(--demo-pad));
    padding: var(--sc-space-5) var(--demo-pad);
    border-top: 1px solid var(--sc-border);
    background: var(--sc-surface);
}
.sc-public .sc-demo-actions .sc-signin-note { flex: 1 1 240px; margin: 0; }
/* Every error in one list, linking to its field; focused when the page comes back (see ContactUs.cshtml). */
.sc-error-summary {
    margin-bottom: var(--sc-space-5);
    padding: var(--sc-space-4);
    border: 2px solid var(--sc-error);
    border-radius: var(--sc-radius-sm);
    background: var(--sc-error-tint);
}
.sc-error-summary:focus { outline: 3px solid rgba(180, 35, 24, .35); outline-offset: 2px; }
.sc-public .sc-error-summary h3 { margin-bottom: var(--sc-space-2); color: var(--sc-error); font-size: 16px; }
.sc-error-summary ul { margin: 0; padding-left: 20px; }
.sc-public .sc-error-summary a { color: var(--sc-error); }
.sc-demo-sent:focus { outline: none; }
/* Contact cards: their own column with its own heading, kept in view beside the long form on wide screens. */
.sc-contact-aside {
    position: sticky;
    top: var(--sc-space-4);
    padding: var(--sc-space-5);
    border: 1px solid #c9dcdf;
    border-top: 6px solid var(--sc-teal);   /* the same accent as the form card beside it */
    border-radius: var(--sc-radius);
    background: var(--sc-teal-tint);
}
.sc-public .sc-aside-title { margin-bottom: var(--sc-space-4); font-size: 20px; }
.sc-contact-cards { display: grid; gap: var(--sc-space-3); margin: 0; padding: 0; list-style: none; }
/* Icon beside the text, in a solid teal circle (white on #3f7a83 is 4.9:1). */
.sc-contact-card {
    display: flex;
    align-items: flex-start;
    gap: var(--sc-space-4);
    padding: var(--sc-space-4);
    border-color: #c9dcdf;
    box-shadow: 0 2px 8px rgba(20, 40, 40, .06);
}
.sc-contact-card .sc-icon {
    flex: none;
    width: 44px;
    height: 44px;
    margin: 0;
    border-radius: 50%;
    background: var(--sc-teal-strong);
    color: var(--sc-white);
}
.sc-contact-body { min-width: 0; overflow-wrap: anywhere; }
.sc-public .sc-contact-body h3 { margin-bottom: var(--sc-space-1); font-size: 17px; }
.sc-contact-body p { margin: 0 0 var(--sc-space-2); }
.sc-contact-body p:last-child { margin-bottom: 0; }
.sc-contact-label { color: var(--sc-muted); font-size: 14px; }
.sc-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sc-space-4); }
.sc-field-wide { grid-column: 1 / -1; }
.sc-required { color: var(--sc-error); }
.sc-hint { display: block; margin-top: var(--sc-space-1); color: var(--sc-muted); font-size: 13px; }
/* Read by screen readers, not shown. */
.sc-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
textarea.sc-input { min-height: 120px; resize: vertical; }
/* Separate rules: a browser that doesn't know :user-invalid would drop a combined selector list. */
.sc-input[aria-invalid="true"] { border-color: var(--sc-error); }
.sc-input:user-invalid { border-color: var(--sc-error); }
.sc-public .sc-demo-submit { width: auto; min-width: 220px; }
/* Hidden trap field (PublicController.ContactUs): moved off-screen rather than display:none, which some bots skip. */
.sc-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* "Contact your school" appears as soon as a parent or student picks their role. Browsers without :has()
   get the same message from the server when they submit. */
.sc-family-note {
    display: none;
    margin: 0 0 var(--sc-space-4);
    padding: var(--sc-space-3) var(--sc-space-4);
    border-left: 4px solid var(--sc-teal);
    border-radius: var(--sc-radius-sm);
    background: var(--sc-surface);
    font-weight: 700;
}
.sc-demo-form:has(option.sc-family-role:checked) .sc-family-note { display: block; }
/* The form ends at that note for them: no school questions and no "Request a demo" button. */
.sc-demo-form:has(option.sc-family-role:checked) :is(.sc-school-fields, .sc-demo-actions) { display: none; }
/* "Specify your role" and "Specify your school type" sit under their list and show only while its "Other" is
   chosen. Browsers without :has() drop this rule and always show them; the server requires a role only for "Other". */
.sc-specified-role,
.sc-specified-school-type { grid-column: 2; }
.sc-demo-form:not(:has(option.sc-other-role:checked)) .sc-specified-role,
.sc-demo-form:not(:has(option.sc-other-school-type:checked)) .sc-specified-school-type { display: none; }
.sc-person h3 { margin-bottom: 0; }
.sc-person-title { color: var(--sc-muted); font-size: 14px; }
.sc-person p { overflow-wrap: anywhere; }
/* Contact lines on a team card. The labels share a column so the numbers line up, and the email (its label is
   for screen readers only) runs the full width. Rows are 24px tall and each tap-to-call link fills its row:
   the two links sit one above the other, and as plain inline text they were about 17px tall. */
.sc-person-contact {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: var(--sc-space-1);
    margin: 0;
    line-height: 24px;
    overflow-wrap: anywhere;
}
.sc-person-contact dt { color: var(--sc-muted); }
.sc-person-contact dd { margin: 0; }
.sc-person-contact a { display: inline-block; }
.sc-person-contact .sc-email { grid-column: 1 / -1; }
/* A finger needs more room than a mouse to pick the right number. */
@media (pointer: coarse) {
    .sc-person-contact { line-height: 32px; }
}
/* The filler inside a team email (Views/Public/About.cshtml). It has to be display: none, not moved off-screen:
   only then do screen readers skip it and copied text leave it out. */
.sc-email-filler { display: none; }

.sc-cta-band { padding-block: var(--sc-space-7); background: var(--sc-teal-tint); }
.sc-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sc-space-4); }
.sc-cta-inner p { margin: 0; color: var(--sc-muted); }

/* ---------- Long-form text (Privacy, Terms) ---------- */
/* Privacy and Terms: text left-aligned with the page title, an "On this page" list in a sticky column on the right. */
.sc-legal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: var(--sc-space-7);
    align-items: start;
}
.sc-toc {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: var(--sc-space-4);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: var(--sc-space-4) var(--sc-space-5);
    border: 1px solid var(--sc-border);
    border-left: 4px solid var(--sc-teal);
    border-radius: var(--sc-radius-sm);
    background: var(--sc-surface);
    font-size: 14px;
}
.sc-public .sc-toc h2 { margin: 0 0 var(--sc-space-2); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--sc-teal-strong); }
.sc-toc ol { margin: 0; padding-left: 20px; }
.sc-toc li { padding-block: 3px; }
.sc-public .sc-toc a { font-weight: 400; color: var(--sc-text); }
.sc-public .sc-toc a:hover { color: var(--sc-teal-strong); }
.sc-legal > .sc-prose { grid-column: 1; grid-row: 1; }
.sc-prose { max-width: 760px; }   /* keeps lines to a readable length */
.sc-public .sc-prose h2 { margin-top: var(--sc-space-6); font-size: 22px; scroll-margin-top: var(--sc-space-4); }
.sc-prose ul { padding-left: 22px; margin: 0 0 var(--sc-space-4); }
.sc-prose li { margin-bottom: var(--sc-space-2); }
.sc-prose p, .sc-prose li { overflow-wrap: anywhere; }
.sc-table-wrap { overflow-x: auto; margin-bottom: var(--sc-space-4); border: 1px solid var(--sc-border); border-radius: var(--sc-radius-sm); }
.sc-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.sc-table th, .sc-table td { padding: var(--sc-space-2) var(--sc-space-3); border-bottom: 1px solid var(--sc-border); text-align: left; vertical-align: top; }
.sc-table thead th { background: var(--sc-surface); font-weight: 700; }
.sc-table tbody tr:last-child td { border-bottom: 0; }
/* Highlights unconfirmed text in Privacy and Terms; the Cypress RELEASE GATE fails while any remains. */
mark.confirm { background: #fff3c4; color: #5c4400; padding: 0 3px; border-radius: 3px; }

/* ---------- Footer: a compact site map ---------- */
.sc-footer {
    background: var(--sc-slate);
    border-top: 5px solid var(--sc-teal);
    color: #cfe0e0;
    font-size: 15px;
}
.sc-footer-inner {
    display: grid;
    justify-items: center;
    gap: var(--sc-space-3);
    padding-block: var(--sc-space-5);
    text-align: center;
}
.sc-footer ul { margin: 0; padding: 0; list-style: none; }
.sc-footer-nav { display: flex; flex-wrap: wrap; justify-content: center; }
.sc-footer-nav li { display: flex; align-items: center; }
/* A small dot between links: drawn, not typed, so screen readers don't read it out. */
.sc-footer-nav li + li::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-inline: var(--sc-space-3);
    border-radius: 50%;
    background: rgba(207, 224, 224, .5);
}
.sc-public .sc-footer-nav a { display: inline-block; padding-block: 4px; font-weight: 700; }
.sc-footer-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--sc-space-2) var(--sc-space-5);
    font-size: 14px;
}
.sc-footer-meta p { margin: 0; }
.sc-public .sc-footer-meta a { font-weight: 700; }
/* The second content wins where alt text is supported ("/ \"\""), so screen readers skip the dot. */
.sc-footer-tagline::before { content: "·"; content: "·" / ""; margin-inline: var(--sc-space-2); }
.sc-footer-social { display: flex; gap: var(--sc-space-2); }
.sc-public .sc-footer-social a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(207, 224, 224, .35);
    border-radius: 50%;
}
.sc-public .sc-footer-social a:hover,
.sc-public .sc-footer-social a:focus-visible { border-color: var(--sc-white); background: rgba(255, 255, 255, .08); }
.sc-footer-social svg { width: 18px; height: 18px; }
.sc-public .sc-footer a { color: #cfe0e0; }
.sc-public .sc-footer a:hover,
.sc-public .sc-footer a:focus-visible { color: var(--sc-white); }

/* ---------- Narrow screens ---------- */
/* The brand, the nav links with icons and the header button needed about 1045px when the nav had six links
   (measured 2026-11-13; it has five now, so there is slack). The Menu replaces the nav at 1100px and below. */
@media (max-width: 1100px) {
    .sc-nav-desktop { display: none; }
    .sc-menu { display: block; }
    .sc-header-cta { white-space: nowrap; }
}
/* Five team cards across only while the window is at least 1140px wide (the container's full width): any
   narrower and the cards shrink until a contact line wraps or an email breaks mid-word. */
@media (max-width: 1139px) {
    .sc-team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .sc-tiles,
    .sc-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sc-logo-grid { --logo-cols: 4; }
    .sc-legal { grid-template-columns: minmax(0, 1fr); gap: var(--sc-space-5); }
    .sc-toc { grid-column: 1; position: static; max-height: none; }
    .sc-legal > .sc-prose { grid-row: 2; }
    .sc-contact-layout { grid-template-columns: minmax(0, 1fr); }
    .sc-contact-aside { position: static; }
    .sc-contact-cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 760px) {
    .sc-section { padding-block: var(--sc-space-7); }
    .sc-header-inner { gap: var(--sc-space-3); }
    .sc-brand { font-size: 19px; }
    .sc-header-cta { min-height: 40px; padding: 8px 10px; font-size: 14px; white-space: nowrap; }

    .sc-hero { padding-block: var(--sc-space-5) var(--sc-space-7); }
    .sc-hero-grid,
    .sc-split { grid-template-columns: minmax(0, 1fr); gap: var(--sc-space-6); }
    .sc-signin { order: -1; justify-self: stretch; max-width: none; padding: var(--sc-space-5); }
    .sc-tiles,
    .sc-grid-2,
    .sc-grid-3,
    .sc-quotes { grid-template-columns: minmax(0, 1fr); }
    .sc-page-head { padding-block: var(--sc-space-6); }
    .sc-logo-grid { --logo-cols: 3; --logo-gap: var(--sc-space-3); }
    .sc-team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sc-space-3); }
    .sc-school-pop,
    .sc-whats-new { padding: var(--sc-space-5); }
    /* The links wrap here, so drop the dots (one would start the second line) and space the links out. */
    .sc-footer-nav { column-gap: var(--sc-space-5); }
    .sc-footer-nav li + li::before { content: none; }
    .sc-footer-tagline { display: block; }
    .sc-footer-tagline::before { content: none; }
    .sc-form-grid { grid-template-columns: minmax(0, 1fr); }
    .sc-specified-role,
    .sc-specified-school-type { grid-column: auto; }
    .sc-demo-card { --demo-pad: var(--sc-space-5); }
    .sc-public .sc-demo-submit { width: 100%; }
}
/* Team cards on phones: one per row with the photo beside the details (two narrow columns broke the emails mid-word). */
@media (max-width: 560px) {
    .sc-team { grid-template-columns: minmax(0, 1fr); }
    .sc-person { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: var(--sc-space-4); align-items: start; }
    .sc-public .sc-person-photo { grid-row: 1 / span 3; margin-bottom: 0; }
}
/* Phones: keep brand, menu and the header button on one line (common widths are 390 to 414px). The "Menu"
   word is hidden visually but stays for screen readers. */
@media (max-width: 440px) {
    .sc-logo-grid { --logo-cols: 2; }
    .sc-header .sc-brand { font-size: 17px; }
    .sc-menu-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}
@media (max-width: 380px) {
    .sc-brand span { display: none; }
}
