/* AAF eVote — pupil and staff sign-in, in the light glass dashboard style. */
:root {
    --lg-bg: #e9ecef;
    --lg-card: rgba(255, 255, 255, .78);
    --lg-edge: rgba(255, 255, 255, .95);
    --lg-ink: #111418;
    --lg-text: #2b3036;
    --lg-muted: #6b737c;
    --lg-line: #e2e5e9;
    --lg-field: #f3f5f7;
    --lg-green: #2e8b3a;
    --lg-green-2: #46b04f;
    --lg-green-dk: #1d6229;
    --lg-blue: #3aa0f0;
    --lg-orange: #f39c12;
    --lg-red: #d64545;
    --lg-shadow: 0 1px 1px rgba(16, 24, 40, .04), 0 18px 50px rgba(16, 24, 40, .12);
    --lg-inset: inset 0 1px 0 rgba(255, 255, 255, .95);
    --lg-blur: blur(22px) saturate(150%);
    --lg-ease: cubic-bezier(.22, 1, .36, 1);
    --lg-font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.lg {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    font-family: var(--lg-font); font-size: 16px; line-height: 1.5; color: var(--lg-text);
    background: linear-gradient(180deg, #eef0f2, #e4e8eb) fixed;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- drifting colour blobs ---------- */
.lg-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.lg-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: lg-drift 22s ease-in-out infinite alternate; }
.lg-bg i:nth-child(1) { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: rgba(70, 176, 79, .38); }
.lg-bg i:nth-child(2) { width: 38vw; height: 38vw; right: -10vw; top: 6vh; background: rgba(58, 160, 240, .30); animation-duration: 26s; animation-delay: -6s; }
.lg-bg i:nth-child(3) { width: 40vw; height: 40vw; left: 34vw; bottom: -22vw; background: rgba(243, 156, 18, .22); animation-duration: 30s; animation-delay: -12s; }
@keyframes lg-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(4vw, 3vh) scale(1.08); }
    100% { transform: translate(-3vw, 5vh) scale(.95); }
}

/* ---------- layout ---------- */
.lg-shell {
    position: relative; z-index: 1; flex: 1;
    width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 24px 8px;
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: stretch;
    min-height: calc(100vh - 44px);
}
.lg-shell > * { min-width: 0; }

/* ---------- welcome panel ---------- */
.lg-hero {
    position: relative; overflow: hidden; isolation: isolate;
    border-radius: 30px; padding: 34px 34px 30px; color: #fff;
    display: flex; flex-direction: column; gap: 26px;
    background: #1d6229;
    box-shadow: var(--lg-shadow);
    animation: lg-rise .8s var(--lg-ease) both;
}
.lg-hero::before { /* school photo, slowly zooming */
    content: ""; position: absolute; inset: -4%; z-index: -2;
    background: var(--photo) center / cover no-repeat;
    animation: lg-zoom 28s ease-in-out infinite alternate;
}
.lg-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(80% 60% at 0% 0%, rgba(70, 176, 79, .55), transparent 70%),
        linear-gradient(160deg, rgba(20, 70, 30, .62) 0%, rgba(17, 40, 22, .86) 70%, rgba(12, 28, 16, .94) 100%);
}
@keyframes lg-zoom { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }

.lg-hero__top { display: flex; align-items: center; gap: 14px; }
.lg-hero__logo {
    flex: none; display: flex; align-items: center; padding: 8px 14px; border-radius: 20px;
    background: rgba(255, 255, 255, .96); box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
    animation: lg-float 6s ease-in-out infinite;
}
.lg-hero__logo img { height: 52px; width: auto; max-width: 230px; object-fit: contain; }
.lg-hero__school { font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; opacity: .92; line-height: 1.35; }
@keyframes lg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.lg-hero__mid { margin-top: auto; }
.lg-hero__title { margin: 14px 0 8px; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; font-weight: 700; letter-spacing: -.015em; }
.lg-hero__when { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 15px; opacity: .9; }
.lg-hero__when svg { width: 18px; height: 18px; }
.lg-sep { opacity: .6; }

/* status pill */
.lg-pill {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 14px 7px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lg-pill__dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #c9ced4; }
.lg-pill--open .lg-pill__dot { background: #6ee07a; }
.lg-pill--open .lg-pill__dot::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: #6ee07a;
    animation: lg-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
.lg-pill--not_started .lg-pill__dot { background: #ffc35a; }
.lg-pill--ended .lg-pill__dot { background: #ff8a80; }
@keyframes lg-ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

/* three steps */
.lg-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lg-steps li {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    font-size: 13.5px; color: rgba(255, 255, 255, .82);
    animation: lg-slide .7s var(--lg-ease) both; animation-delay: calc(.35s + var(--i) * .12s);
    transition: background .25s, transform .25s var(--lg-ease);
}
.lg-steps li:hover { background: rgba(255, 255, 255, .2); transform: translateX(4px); }
.lg-steps b { display: block; color: #fff; font-size: 15px; font-weight: 600; }
.lg-steps__ic {
    flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
    background: #fff; color: var(--lg-green); box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}
.lg-steps__ic svg { width: 22px; height: 22px; }
@keyframes lg-slide { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

/* ---------- form card ---------- */
.lg-card {
    align-self: center;
    background: var(--lg-card); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
    border: 1px solid var(--lg-edge); border-radius: 30px; box-shadow: var(--lg-shadow), var(--lg-inset);
    padding: 40px 40px 30px;
    animation: lg-rise .8s var(--lg-ease) .08s both;
}
@keyframes lg-rise { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }

.lg-head { text-align: center; margin-bottom: 26px; }
.lg-head__ic {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 22px; display: grid; place-items: center;
    color: #fff; background: linear-gradient(145deg, var(--lg-green-2), var(--lg-green));
    box-shadow: 0 12px 26px rgba(46, 139, 58, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
    animation: lg-pop .7s var(--lg-ease) .25s both;
}
.lg-head__ic svg { width: 30px; height: 30px; stroke-width: 1.9; }
@keyframes lg-pop { 0% { opacity: 0; transform: scale(.6) rotate(-8deg); } 60% { transform: scale(1.06) rotate(2deg); } 100% { opacity: 1; transform: none; } }
.lg-head h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--lg-ink); }
.lg-head p { margin: 0; color: var(--lg-muted); font-size: 15.5px; }

/* alerts */
.lg-alert {
    display: flex; gap: 10px; align-items: flex-start;
    border-radius: 16px; padding: 12px 14px; margin: 0 0 18px; font-size: 15px; line-height: 1.4;
    animation: lg-rise .5s var(--lg-ease) both;
}
.lg-alert svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.lg-alert--error { background: #fdeeee; color: #a42d2d; }
.lg-alert--info { background: #e8f3fd; color: #155083; }
.lg-alert--shake { animation: lg-shake .5s ease both; }

/* fields */
.lg-form { display: grid; gap: 18px; }
.lg-field, .lg-check, .lg-btn { animation: lg-rise .6s var(--lg-ease) both; animation-delay: calc(.3s + var(--i) * .08s); }
.lg-label { display: block; font-weight: 600; font-size: 14.5px; color: var(--lg-ink); margin: 0 0 8px 6px; }
.lg-input {
    position: relative; display: flex; align-items: center;
    background: var(--lg-field); border-radius: 999px;
    box-shadow: inset 0 0 0 1.5px transparent;
    transition: background .2s, box-shadow .25s var(--lg-ease), transform .2s var(--lg-ease);
}
.lg-input:hover { background: #eef1f4; }
.lg-input:focus-within {
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--lg-green), 0 0 0 5px rgba(70, 176, 79, .16), 0 8px 22px rgba(16, 24, 40, .08);
}
.lg-input__ic {
    position: absolute; left: 20px; width: 22px; height: 22px; color: #9aa1a9; pointer-events: none;
    transition: color .2s, transform .3s var(--lg-ease);
}
.lg-input:focus-within .lg-input__ic, .lg-input.has-value .lg-input__ic { color: var(--lg-green); }
.lg-input:focus-within .lg-input__ic { transform: scale(1.1); }
.lg-input input {
    width: 100%; min-width: 0; height: 60px; border: 0; outline: 0; background: transparent;
    padding: 0 20px 0 56px; font: 500 18px/1 var(--lg-font); color: var(--lg-ink);
    border-radius: 999px;
}
.lg-input input::placeholder { color: #a8afb6; font-weight: 400; }
.lg-input--code input { letter-spacing: .32em; text-transform: uppercase; font-weight: 600; }
.lg-input--code input::placeholder { letter-spacing: .2em; }
.lg-input input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px transparent inset; transition: background-color 9999s; }
.lg-input:has(.lg-eye) input { padding-right: 62px; }

.lg-eye {
    position: absolute; right: 8px; width: 46px; height: 46px; border: 0; border-radius: 50%;
    background: transparent; color: #7b828b; cursor: pointer; display: grid; place-items: center;
    transition: background .2s, color .2s;
}
.lg-eye:hover { background: rgba(17, 20, 24, .06); color: var(--lg-ink); }
.lg-eye:focus-visible { outline: 2px solid var(--lg-green); outline-offset: 2px; }
.lg-eye svg { width: 22px; height: 22px; grid-area: 1 / 1; transition: opacity .2s, transform .3s var(--lg-ease); }
.lg-eye__shut { opacity: 0; transform: scale(.6) rotate(-20deg); }
.lg-eye.is-on .lg-eye__open { opacity: 0; transform: scale(.6) rotate(20deg); }
.lg-eye.is-on .lg-eye__shut { opacity: 1; transform: none; }

.lg-help { display: flex; align-items: center; gap: 10px; margin: 8px 0 0 8px; font-size: 13.5px; color: var(--lg-muted); }
.lg-field.is-missing .lg-input { box-shadow: inset 0 0 0 2px var(--lg-red), 0 0 0 5px rgba(214, 69, 69, .12); }
.lg-field.is-missing .lg-input__ic { color: var(--lg-red); }
.lg-field.shake { animation: lg-shake .45s ease; }
@keyframes lg-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* passcode progress dots */
.lg-dots { display: inline-flex; gap: 5px; flex: none; }
.lg-dots i { width: 9px; height: 9px; border-radius: 50%; background: #d6dade; transition: background .2s, transform .3s var(--lg-ease); }
.lg-dots i.on { background: var(--lg-green-2); transform: scale(1.25); }
.lg-dots.full i { background: var(--lg-green); animation: lg-bounce .5s var(--lg-ease); }
.lg-dots.full i:nth-child(2) { animation-delay: .05s; } .lg-dots.full i:nth-child(3) { animation-delay: .1s; } .lg-dots.full i:nth-child(4) { animation-delay: .15s; }
@keyframes lg-bounce { 50% { transform: translateY(-4px) scale(1.3); } }

/* checkbox */
.lg-check { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14.5px; color: var(--lg-text); padding: 2px 6px; user-select: none; }
.lg-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lg-check__box {
    flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--lg-field);
    box-shadow: inset 0 0 0 1.5px #cfd4d9; display: grid; place-items: center; transition: background .2s, box-shadow .2s;
}
.lg-check__box svg { width: 16px; height: 16px; color: #fff; stroke-width: 2.6; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .3s var(--lg-ease); }
.lg-check input:checked + .lg-check__box { background: var(--lg-green); box-shadow: none; }
.lg-check input:checked + .lg-check__box svg { stroke-dashoffset: 0; }
.lg-check input:focus-visible + .lg-check__box { box-shadow: 0 0 0 4px rgba(70, 176, 79, .25); }

/* main button */
.lg-btn {
    position: relative; overflow: hidden; margin-top: 6px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 62px; border: 0; border-radius: 999px; cursor: pointer;
    font: 600 18.5px/1 var(--lg-font); color: #fff;
    background: linear-gradient(135deg, var(--lg-green-2), var(--lg-green) 55%, var(--lg-green-dk));
    box-shadow: 0 12px 26px rgba(46, 139, 58, .32), inset 0 1px 0 rgba(255, 255, 255, .3);
    transition: transform .25s var(--lg-ease), box-shadow .25s var(--lg-ease), filter .2s;
}
.lg-btn::before { /* light sweep */
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg); animation: lg-sheen 4.5s ease-in-out 1.4s infinite;
}
@keyframes lg-sheen { 0% { left: -60%; } 30%, 100% { left: 130%; } }
.lg-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(46, 139, 58, .38), inset 0 1px 0 rgba(255, 255, 255, .3); }
.lg-btn:active { transform: translateY(0) scale(.985); }
.lg-btn:focus-visible { outline: 3px solid rgba(46, 139, 58, .45); outline-offset: 3px; }
.lg-btn__arrow { width: 22px; height: 22px; stroke-width: 2.2; transition: transform .3s var(--lg-ease); }
.lg-btn:hover .lg-btn__arrow { transform: translateX(5px); }
.lg-btn__spin {
    display: none; width: 24px; height: 24px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: lg-spin .8s linear infinite;
}
.lg-btn.is-busy { pointer-events: none; filter: saturate(.85); }
.lg-btn.is-busy .lg-btn__text, .lg-btn.is-busy .lg-btn__arrow { display: none; }
.lg-btn.is-busy .lg-btn__spin { display: block; }
@keyframes lg-spin { to { transform: rotate(360deg); } }

/* switch link */
.lg-switch {
    margin: 22px auto 0; display: flex; align-items: center; justify-content: center; gap: 10px;
    width: fit-content; max-width: 100%; padding: 10px 16px; border-radius: 999px;
    color: var(--lg-green-dk); font-weight: 600; font-size: 15px; text-decoration: none; text-align: center;
    transition: background .2s, color .2s;
    animation: lg-rise .6s var(--lg-ease) .6s both;
}
.lg-switch svg { width: 20px; height: 20px; flex: none; }
.lg-switch:hover { background: rgba(46, 139, 58, .09); }
.lg-switch__go { transition: transform .25s var(--lg-ease); }
.lg-switch:hover .lg-switch__go { transform: translateX(4px); }

.lg-foot { position: relative; z-index: 1; text-align: center; font-size: 13px; color: #59616b; padding: 12px 16px 16px; }
.lg-foot a { color: #3c434a; text-decoration: none; font-weight: 500; }
.lg-foot a:hover { color: var(--lg-green-dk); text-decoration: underline; }

/* ---------- big, bold typing for young readers ---------- */
.is-pupil .lg-input input { height: 70px; font-size: 26px; font-weight: 700; color: #0b0d10; padding-left: 60px; letter-spacing: .04em; }
.is-pupil .lg-input--code input { font-size: 28px; font-weight: 800; letter-spacing: .3em; }
.is-pupil .lg-input--code input[type=password] { font-size: 30px; letter-spacing: .22em; }
.is-pupil .lg-input input::placeholder { font-size: 20px; font-weight: 500; letter-spacing: .04em; color: #b3b9bf; }
.is-pupil .lg-input__ic { width: 26px; height: 26px; left: 21px; }
.is-pupil .lg-input:focus-within { box-shadow: inset 0 0 0 3px var(--lg-green), 0 0 0 6px rgba(70, 176, 79, .18), 0 8px 22px rgba(16, 24, 40, .08); }
.is-pupil .lg-input input { caret-color: var(--lg-green); }
.is-pupil .lg-label { font-size: 16px; }
.is-staff .lg-input input { font-weight: 600; }

/* ---------- teacher sign up ---------- */
.lg-input select {
    width: 100%; min-width: 0; height: 60px; border: 0; outline: 0; background: transparent; cursor: pointer;
    padding: 0 48px 0 56px; font: 600 16px/1 var(--lg-font); color: var(--lg-ink); border-radius: 999px;
    -webkit-appearance: none; appearance: none; text-overflow: ellipsis;
}
.lg-input--select::after {
    content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px; pointer-events: none;
    border-right: 2px solid #8a929a; border-bottom: 2px solid #8a929a; transform: rotate(45deg);
}
.lg-opt { font-weight: 400; color: #8a929a; font-size: 13px; margin-left: 4px; }
.lg-switch + .lg-switch { margin-top: 4px; }
.lg-switch--soft { color: #4b535b; font-weight: 500; }
.is-register .lg-form { gap: 14px; }
.is-register .lg-input input, .is-register .lg-input select { height: 54px; }

/* ---------- terms & privacy pages ---------- */
.lg-legal { display: block; min-height: 100vh; }
.lgl { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 28px 18px 40px; }
.lgl-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.lgl-back { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px 9px 10px; border-radius: 999px; background: rgba(255, 255, 255, .8); color: var(--lg-ink); font-weight: 600; text-decoration: none; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.lgl-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lgl-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .7); box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.lgl-tabs a { padding: 8px 16px; border-radius: 999px; color: #3c434a; font-weight: 600; font-size: 14px; text-decoration: none; }
.lgl-tabs a.is-on { background: var(--lg-ink); color: #fff; }
.lgl-card { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 28px; padding: 34px 40px 40px; box-shadow: 0 1px 1px rgba(16, 24, 40, .04), 0 18px 44px rgba(16, 24, 40, .1); }
.lgl-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(70, 176, 79, .12); color: var(--lg-green-dk); font-size: 12.5px; font-weight: 600; margin-bottom: 12px; }
.lgl-badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lgl-body { color: #2b3036; font-size: 15.5px; line-height: 1.7; }
.lgl-body h2 { font-size: 30px; line-height: 1.2; color: var(--lg-ink); margin: 6px 0 4px; letter-spacing: -.02em; }
.lgl-body h3 { font-size: 18px; color: var(--lg-ink); margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid #e6e9ec; }
.lgl-body p { margin: 0 0 10px; }
.lgl-body ul { margin: 0 0 12px; padding-left: 20px; }
.lgl-body li { margin: 4px 0; }
.lgl-body em { color: #59616b; }
.lgl-body a { color: var(--lg-green-dk); font-weight: 600; }
.lgl-foot { text-align: center; color: #59616b; font-size: 13px; margin-top: 22px; }
@media (max-width: 640px) { .lgl-card { padding: 24px 20px 28px; border-radius: 22px; } .lgl-body h2 { font-size: 24px; } }

/* agree box on sign-up + legal links on sign-in pages */
.lg-agree { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--lg-field); cursor: pointer; font-size: 14px; line-height: 1.5; color: #2b3036; transition: box-shadow .2s; }
.lg-agree input { position: absolute; opacity: 0; pointer-events: none; }
.lg-agree__box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1.5px #b9c0c7; transition: background .2s, box-shadow .2s; }
.lg-agree__box svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.lg-agree input:checked + .lg-agree__box { background: var(--lg-green); box-shadow: none; }
.lg-agree input:checked + .lg-agree__box svg { opacity: 1; transform: none; }
.lg-agree input:focus-visible + .lg-agree__box { box-shadow: 0 0 0 4px rgba(70, 176, 79, .25), inset 0 0 0 1.5px var(--lg-green); }
.lg-agree a { color: var(--lg-green-dk); font-weight: 600; }
.lg-field.is-missing .lg-agree { box-shadow: inset 0 0 0 2px #e5484d; }
.lg-legal-links { text-align: center; font-size: 13px; color: #59616b; margin-top: 10px; }
.lg-legal-links a { color: #3c434a; text-decoration: none; font-weight: 500; }
.lg-legal-links a:hover { color: var(--lg-green-dk); text-decoration: underline; }

/* single school: shown, not chosen */
.lg-input--fixed { cursor: default; }
.lg-input--fixed .lg-input__ic { color: var(--lg-green); }
.lg-fixed { flex: 1; min-width: 0; height: 54px; display: flex; align-items: center; padding: 0 48px 0 56px; font: 600 16px/1.2 var(--lg-font); color: var(--lg-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-fixed__ok { position: absolute; right: 20px; top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: none; stroke: var(--lg-green); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- welcome panel stays in view while a long form scrolls (desktop) ---------- */
@media (min-width: 901px) {
    .lg-shell { align-items: start; }
    .lg-hero { position: sticky; top: 24px; height: auto; min-height: min(max(calc(100vh - 100px), 520px), 860px); } /* grows instead of clipping when the content is taller */
/* countdown inside the welcome panel: a little more compact than on light pages */
.lg-hero .cd { margin-top: 14px; }
.lg-hero .cd__u { min-width: 64px; padding: 8px 8px 7px; border-radius: 14px; }
.lg-hero .cd__u b { font-size: 26px; }
.lg-hero .cd__bar { margin-top: 10px; }
    .lg-card { align-self: center; }
    .is-register .lg-card { align-self: start; }
}

/* ---------- tablet & phone ---------- */
@media (max-width: 900px) {
    .lg-shell { grid-template-columns: 1fr; max-width: 560px; padding: 16px 16px 4px; gap: 14px; min-height: 0; }
    .lg-hero { padding: 20px 22px; gap: 14px; border-radius: 26px; }
    .lg-hero__top { flex-wrap: wrap; gap: 10px 14px; }
    .lg-hero__logo { padding: 6px 10px; border-radius: 16px; }
    .lg-hero__logo img { height: 40px; max-width: 190px; }
    .lg-switch { font-size: 14px; gap: 8px; padding: 10px 12px; }
    .lg-hero__school { font-size: 12.5px; }
    .lg-hero__mid { margin-top: 0; }
    .lg-hero__title { font-size: 22px; margin: 10px 0 4px; }
    .lg-hero__when { font-size: 13.5px; }
    .lg-steps { display: none; }
    .lg-card { padding: 28px 22px 22px; border-radius: 26px; align-self: stretch; }
    .lg-head { margin-bottom: 20px; }
    .lg-head__ic { width: 56px; height: 56px; border-radius: 19px; margin-bottom: 12px; }
    .lg-head h1 { font-size: 26px; }
}
@media (max-width: 380px) {
    .lg-hero__when .lg-sep { display: none; }
    .lg-input input { font-size: 17px; }
    .is-pupil .lg-input input { font-size: 23px; }
    .is-pupil .lg-input--code input { font-size: 25px; letter-spacing: .24em; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Terms / Privacy pop-up on teacher sign-up */
.lgd { width: min(760px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 26px; background: #fff; color: var(--lg-ink); box-shadow: 0 30px 80px rgba(16, 24, 32, .28); overflow: hidden; }
.lgd[open] { display: flex; flex-direction: column; animation: lgdIn .22s ease-out; }
.lgd::backdrop { background: rgba(20, 28, 36, .45); backdrop-filter: blur(4px); }
@keyframes lgdIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.lgd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lgd-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 20px; border-bottom: 1px solid #e6e9ec; }
.lgd-tabs { display: flex; gap: 6px; padding: 4px; background: #eef0f2; border-radius: 999px; }
.lgd-tabs button { border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; color: #59616b; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.lgd-tabs button.is-on { background: #fff; color: var(--lg-ink); box-shadow: 0 2px 8px rgba(16, 24, 32, .1); }
.lgd-x { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #eef0f2; cursor: pointer; display: grid; place-items: center; }
.lgd-x svg { width: 18px; height: 18px; fill: none; stroke: var(--lg-ink); stroke-width: 2; stroke-linecap: round; }
.lgd-body { flex: 1; overflow-y: auto; padding: 8px 28px 24px; font-size: 15px; }
.lgd-body h2 { display: none; }
.lgd-body > p:first-of-type + p, .lgd-body > p:first-of-type { margin-top: 14px; }
.lgd-body h3:first-of-type { border-top: 0; }
.lgd-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid #e6e9ec; background: #f7f8f9; }
.lgd-hint { margin-right: auto; font-size: 13.5px; color: #59616b; }
.lgd-btn { border: 0; font: inherit; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 999px; cursor: pointer; background: var(--lg-green, #46b04f); color: #fff; }
.lgd-btn--ghost { background: transparent; color: #2b3036; }
.lgd-btn:focus-visible, .lgd-tabs button:focus-visible, .lgd-x:focus-visible { outline: 3px solid rgba(70, 176, 79, .45); outline-offset: 2px; }
@media (max-width: 640px) { .lgd { border-radius: 22px; } .lgd-body { padding: 4px 18px 20px; } .lgd-tabs button { padding: 8px 12px; font-size: 13px; } }


/* ---------- School registration + platform landing (multi-school, Nov 2026) ---------- */
@media (min-width: 901px) { .is-wide .lg-shell { grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.25fr); max-width: 1240px; } }
.lg-group { margin: 10px 0 -2px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lg-green); }
.lg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .lg-row { grid-template-columns: 1fr; } }
.lg-link { color: var(--lg-ink); font-weight: 600; word-break: break-all; }
.lg-file { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--lg-field); border: 1.5px dashed var(--lg-line); cursor: pointer; transition: border-color .2s; }
.lg-file:hover { border-color: var(--lg-green); }
.lg-file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lg-file__pic { width: 56px; height: 56px; border-radius: 14px; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; color: var(--lg-muted); }
.lg-file__pic svg { width: 26px; height: 26px; }
.lg-file__pic img { width: 100%; height: 100%; object-fit: contain; }
.lg-file__txt { display: flex; flex-direction: column; font-size: 13px; color: var(--lg-muted); } .lg-file__txt b { color: var(--lg-ink); font-size: 14.5px; }
/* platform landing: find your school */
.pl-search { margin-top: 6px; }
.pl-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; max-height: 360px; overflow: auto; }
.pl-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--lg-field); color: var(--lg-ink); text-decoration: none; font-weight: 600; transition: background .2s, transform .2s; }
.pl-list a:hover { background: #fff; transform: translateY(-1px); box-shadow: var(--lg-shadow); }
.pl-list img, .pl-list .pl-ini { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; background: #fff; flex: none; display: grid; place-items: center; font-size: 15px; color: var(--lg-green); }
.pl-list small { display: block; font-weight: 400; color: var(--lg-muted); font-size: 12.5px; }
.pl-empty { color: var(--lg-muted); font-size: 14px; margin-top: 12px; }
.pl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
@media (max-width: 480px) { .pl-actions { grid-template-columns: 1fr; } }
.lg-hero__motto { display: block; font-size: 12.5px; font-weight: 400; opacity: .85; letter-spacing: 0; text-transform: none; margin-top: 2px; }
.lg-note { margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--lg-field); color: var(--lg-muted); font-size: 13.5px; text-align: center; }

/* Staff sign-in: "keep me signed in" and "forgot password" on one line */
.lg-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lg-row-between .lg-check { margin: 0; }
.lg-forgot { font-size: .9rem; font-weight: 600; color: var(--lg-green, #1c75bc); text-decoration: none; }
.lg-forgot:hover, .lg-forgot:focus-visible { text-decoration: underline; }
/* Welcome panel: keep the headline block in the middle of the panel */
.lg-hero__mid { margin: auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.lg-hero__mid .lg-hero__when { justify-content: center; }
.lg-hero__mid .lg-hero__when, .lg-hero__mid > p { max-width: 34em; }
.lg-hero__mid .cd { align-self: center; display: flex; flex-direction: column; align-items: center; }
.lg-hero__mid .cd__label, .lg-hero__mid .cd__units { justify-content: center; }
.lg-hero__mid .cd__bar { width: 100%; margin-left: auto; margin-right: auto; }
/* School list: soft hover lift that is not cut off by the scrolling list */
.pl-list { padding: 4px 6px 10px; margin-left: -6px; margin-right: -6px; }
.pl-list a { border: 1px solid transparent; transition: background .2s, border-color .2s, box-shadow .2s, transform .2s; }
.pl-list a:hover, .pl-list a:focus-visible { background: #fff; border-color: rgba(28, 117, 188, .18); box-shadow: 0 2px 4px rgba(11, 37, 69, .05), 0 6px 16px rgba(11, 37, 69, .08); transform: translateY(-1px); }
.pl-actions .lg-switch { white-space: nowrap; }
.pl-list { max-height: none; overflow: visible; }
.pl-list.is-long { max-height: 380px; overflow: auto; }