:root {
    --navy-950: #061d2d;
    --navy-900: #082f49;
    --navy-800: #0c3b5d;
    --navy-700: #155174;
    --blue-600: #0875b9;
    --blue-100: #dceffc;
    --teal-700: #0f6f69;
    --teal-600: #13877f;
    --teal-100: #d9f2ee;
    --gold-500: #e5a624;
    --gold-100: #fff3d3;
    --ink: #142b3d;
    --muted: #607588;
    --subtle: #8393a2;
    --surface: #ffffff;
    --canvas: #f3f6f9;
    --canvas-blue: #eaf2f7;
    --line: #d7e1e9;
    --line-strong: #bdccd8;
    --danger: #a5232b;
    --danger-bg: #fcebed;
    --success: #08665f;
    --success-bg: #dcf4ef;
    --warning: #76510a;
    --warning-bg: #fff2ce;
    --shadow-sm: 0 1px 2px rgba(6, 29, 45, .05), 0 5px 16px rgba(6, 29, 45, .04);
    --shadow-md: 0 15px 40px rgba(6, 29, 45, .09);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --content: 1180px;
}

* { box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 85% 5%, rgba(8, 117, 185, .065), transparent 24rem),
        var(--canvas);
    color: var(--ink);
    font-family: "Segoe UI", Inter, Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-600); text-underline-offset: 3px; }
a:hover { color: var(--navy-800); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 10px;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    background: white;
    color: var(--navy-900);
    font-weight: 800;
    transform: translateY(-150%);
    transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header { color: white; box-shadow: 0 4px 18px rgba(6, 29, 45, .14); }
.header-inner { width: min(var(--content), calc(100% - 48px)); margin: 0 auto; }

.institution-bar { background: var(--navy-950); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.institution-inner {
    min-height: 31px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, .7);
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.secure-label { display: inline-flex; gap: 7px; align-items: center; }
.secure-label > span { color: #51d3ac; font-size: .58rem; }

.masthead { background: linear-gradient(120deg, var(--navy-900), #0b3c5c 72%, #0e4b69); }
.masthead-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 15px; color: white; text-decoration: none; min-width: 0; }
.brand:hover { color: white; }
.brand-mark {
    position: relative;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    background: rgba(255, 255, 255, .98);
    color: var(--navy-900);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .1);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .045em;
}
.brand-mark::after { content: ""; position: absolute; bottom: 7px; width: 19px; height: 2px; border-radius: 2px; background: var(--gold-500); }
.brand-copy { display: grid; line-height: 1.22; }
.brand-copy strong { font-size: 1.14rem; letter-spacing: -.015em; }
.brand-copy small { margin-top: 4px; color: rgba(255, 255, 255, .68); font-size: .78rem; }
.portal-label { color: rgba(255, 255, 255, .75); font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.user-panel { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
    color: white;
    font-weight: 850;
}
.user-copy { display: grid; min-width: 135px; margin-right: 6px; line-height: 1.25; }
.user-copy strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.user-copy small { margin-top: 3px; color: rgba(255, 255, 255, .62); font-size: .72rem; }
.utility-link, .signout-button {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .83);
    font-size: .82rem;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}
.utility-link:hover, .signout-button:hover { color: white; text-decoration: underline; }
.signout-button { padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 8px; }
.signout-button:hover { background: rgba(255, 255, 255, .09); text-decoration: none; }

.primary-nav { background: white; color: var(--ink); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.nav-link {
    position: relative;
    flex: 0 0 auto;
    padding: 15px 13px 14px;
    color: #435c70;
    font-size: .85rem;
    font-weight: 720;
    text-decoration: none;
    white-space: nowrap;
}
.nav-link:hover { color: var(--navy-900); background: #f7fafc; }
.nav-link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.nav-link.active { color: var(--navy-900); }
.nav-link.active::after { background: var(--teal-600); }

.page-shell { width: min(var(--content), calc(100% - 48px)); flex: 1 0 auto; margin: 0 auto; padding: 48px 0 72px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin-bottom: 28px; }
.page-heading > div { max-width: 790px; }
.page-heading h1 { margin: 0; color: var(--navy-950); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -.042em; }
.page-heading .muted { margin: 10px 0 0; max-width: 730px; font-size: 1.02rem; }
.dashboard-heading { margin-bottom: 32px; }
.eyebrow { margin: 0 0 8px; color: var(--teal-700); font-size: .73rem; font-weight: 850; letter-spacing: .145em; text-transform: uppercase; }
.muted { color: var(--muted); }

.notice, .alert { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; border: 1px solid transparent; border-radius: 12px; font-weight: 700; }
.notice { margin-bottom: 26px; box-shadow: var(--shadow-sm); }
.notice.success { background: var(--success-bg); border-color: #bee7df; color: var(--success); }
.notice.warning { background: var(--warning-bg); border-color: #efdba7; color: var(--warning); }
.notice-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; border-radius: 50%; background: currentColor; color: white; font-size: .75rem; }
.notice.success .notice-icon { background: var(--success); }
.notice.warning .notice-icon { background: var(--warning); }
.alert { margin: 20px 0; background: var(--danger-bg); border-color: #f1c7ca; color: var(--danger); }
.alert > span:first-child { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: var(--danger); color: white; font-size: .75rem; }

.card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-sm); }
.card h2 { margin: 0 0 7px; color: var(--navy-950); font-size: 1.45rem; line-height: 1.25; letter-spacing: -.025em; }
.card > p:first-of-type:not(.eyebrow) { margin-top: 0; }
.setup-section { margin-top: 24px; }
.narrow { max-width: 690px; margin: 0 auto; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.metric {
    --metric-accent: var(--blue-600);
    position: relative;
    min-height: 170px;
    overflow: hidden;
    padding: 23px 24px 20px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: linear-gradient(145deg, white, #f8fbfd);
    box-shadow: var(--shadow-sm);
}
.metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--metric-accent); }
.metric::after { content: ""; position: absolute; right: -45px; bottom: -60px; width: 150px; height: 150px; border-radius: 50%; background: color-mix(in srgb, var(--metric-accent) 8%, transparent); }
.metric-blue { --metric-accent: #1678b8; }
.metric-teal { --metric-accent: #12877f; }
.metric-gold { --metric-accent: #d39416; }
.metric-indigo { --metric-accent: #5b63b7; }
.metric-rose { --metric-accent: #b84e63; }
.metric-green { --metric-accent: #3d8560; }
.metric-heading { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: .84rem; font-weight: 760; }
.metric-symbol { color: var(--metric-accent); font-size: .7rem; font-weight: 900; letter-spacing: .06em; }
.metric strong { position: relative; z-index: 1; display: block; margin-top: 11px; color: var(--navy-950); font-size: 2.35rem; line-height: 1; letter-spacing: -.04em; }
.metric small { position: relative; z-index: 1; display: block; margin-top: 12px; color: var(--subtle); font-size: .75rem; }

.status-chip { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; background: var(--teal-100); color: var(--success); font-size: .72rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.status-chip.inactive { background: var(--danger-bg); color: #8f2027; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #15a27f; box-shadow: 0 0 0 3px rgba(21, 162, 127, .13); }

.feature-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-left: 4px solid var(--teal-600); }
.feature-card p:last-child { margin-bottom: 0; color: var(--muted); }
.registry-card { padding-bottom: 12px; }
.section-title { display: flex; justify-content: space-between; margin-bottom: 14px; }
.section-title p:last-child { margin: 5px 0 0; }
.record-row { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 17px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.record-row:hover { color: var(--navy-900); background: #f8fbfd; }
.record-row strong, .record-row small { display: block; }
.record-row small { margin-top: 3px; color: var(--muted); }
.row-action { color: var(--blue-600); font-size: .83rem; font-weight: 800; white-space: nowrap; }
.empty, .empty-state { color: var(--muted); }
.empty { padding: 24px 0; }
.empty-state { display: flex; align-items: center; gap: 18px; padding: 25px 4px 30px; border-top: 1px solid var(--line); }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 3px 0 0; }
.empty-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 46px; border-radius: 13px; background: var(--canvas-blue); color: var(--navy-700); font-size: .68rem; font-weight: 900; }

.primary, .secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 9px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.primary { border: 1px solid var(--navy-800); background: var(--navy-800); color: white; box-shadow: 0 6px 14px rgba(8, 47, 73, .14); }
.primary:hover { background: var(--navy-950); color: white; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(8, 47, 73, .2); }
.secondary { border: 1px solid var(--line-strong); background: white; color: var(--navy-800); }
.secondary:hover { border-color: var(--navy-700); background: #f7fafc; }
.button-link { text-decoration: none; }

.stack { display: grid; gap: 18px; margin-top: 25px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
label { color: #31495b; font-size: .83rem; font-weight: 760; }
input[type="email"], input[type="password"], input[type="text"], input[type="date"], input[type="number"], input[type="file"], select, textarea {
    display: block;
    width: 100%;
    min-height: 45px;
    margin-top: 7px;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: white;
    color: var(--ink);
    outline: 0;
    transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { min-height: 90px; resize: vertical; }
input[type="file"] { padding: 9px; border-style: dashed; background: #f8fafc; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(8, 117, 185, .12); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 550; }
.check input { flex: 0 0 auto; }
fieldset { padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
legend { padding: 0 8px; font-weight: 800; }
.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.action-row { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.danger-zone { margin-top: 24px; border-color: #efc8cb; }

.auth-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .72fr); gap: clamp(36px, 7vw, 90px); align-items: center; min-height: 570px; }
.welcome-panel { padding: 56px 4vw 56px 0; }
.welcome-panel h1 { max-width: 740px; margin: 17px 0 24px; color: var(--navy-950); font-size: clamp(2.8rem, 6vw, 5rem); line-height: .99; letter-spacing: -.057em; }
.welcome-panel > p:last-child { max-width: 620px; color: var(--muted); font-size: 1.12rem; }
.login-card { padding: 34px; box-shadow: var(--shadow-md); }
.login-card h2 { font-size: 1.75rem; }
.login-card .help { margin: 18px 0 0; color: var(--muted); font-size: .8rem; }
.auth-card { max-width: 540px; margin: 70px auto; }

.security-page { display: grid; grid-template-columns: minmax(0, .8fr) minmax(420px, 1fr); gap: clamp(36px, 7vw, 92px); align-items: center; max-width: 1040px; margin: 12px auto; }
.security-intro { padding: 28px 0; }
.security-mark { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 25px; border-radius: 18px; background: var(--teal-100); color: var(--teal-700); }
.security-mark svg { width: 33px; height: 33px; fill: currentColor; }
.security-intro h1 { margin: 0; color: var(--navy-950); font-size: clamp(2.25rem, 5vw, 3.8rem); line-height: 1.03; letter-spacing: -.05em; }
.security-intro > p:not(.eyebrow) { max-width: 510px; margin: 20px 0 0; color: var(--muted); font-size: 1.05rem; }
.security-guidance { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.security-guidance strong { color: var(--navy-900); font-size: .9rem; }
.security-guidance ul { display: grid; gap: 9px; margin: 14px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .88rem; }
.security-guidance li { position: relative; padding-left: 25px; }
.security-guidance li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--teal-700); font-weight: 900; }
.security-form-card { padding: 35px; box-shadow: var(--shadow-md); }
.form-heading { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.form-heading h2 { font-size: 1.65rem; }
.form-heading p:last-child { margin: 7px 0 0; }
.security-form-card .primary { width: 100%; margin-top: 2px; }
.form-security-note { display: flex; justify-content: center; gap: 7px; margin: 20px 0 0; color: var(--subtle); font-size: .75rem; text-align: center; }
.form-security-note span { color: #28a27d; font-size: .55rem; }

.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f5f8fa; color: #667b8b; font-size: .7rem; font-weight: 850; letter-spacing: .085em; text-transform: uppercase; white-space: nowrap; }
tbody tr:hover { background: #f9fbfc; }
td { color: #31495b; font-size: .88rem; }
td small { display: block; margin-top: 3px; color: var(--muted); }
td a { color: var(--blue-600); font-weight: 800; }

.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 22px; color: var(--blue-600); font-weight: 800; text-decoration: none; }
.details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.details-grid dl { margin: 20px 0 0; }
.details-grid dt { color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .085em; text-transform: uppercase; }
.details-grid dd { margin: 3px 0 17px; }
.classification { margin-top: 24px; color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }

.configuration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.criterion { margin-bottom: 18px; }
.criterion-heading { display: flex; justify-content: space-between; gap: 20px; }
.submit-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 24px; border: 1px solid #badbeb; border-radius: 16px; background: #eaf5fa; }
.submit-panel p { margin: 0; }
.review-result { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 16px; }
.rating-badge { min-width: 94px; color: var(--blue-600); font-size: 2rem; font-weight: 900; text-align: center; }
.rating-badge small { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; }
.text-metric { margin-top: 16px !important; font-size: 1.25rem !important; }
.program-block { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.program-block:last-child { border-bottom: 0; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding: 12px 0 6px; }
.inline-form select { min-width: 0; }
.mini-form { display: flex; align-items: end; gap: 8px; margin-top: 9px; }
.mini-form select, .mini-form input, .mini-form textarea { min-width: 120px; margin-top: 0; }
.mini-form.vertical { min-width: 220px; flex-direction: column; align-items: stretch; }
.document-type-form { grid-template-columns: 1fr 1.2fr .7fr 1fr auto; }
.document-version { align-items: flex-start; }
.document-version > span:last-child { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.error-list { color: var(--danger); font-size: .85rem; font-weight: 700; }
.report-filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; }
.report-filters input, .report-filters select { min-width: 0; }

.organization-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.organization-summary article { display: grid; gap: 3px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow-sm); }
.organization-summary strong { color: var(--navy-950); font-size: 2rem; line-height: 1; }
.organization-summary span { color: var(--muted); font-size: .82rem; font-weight: 760; }
.table-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 22px 24px 16px; }
.table-section-heading h2 { margin-top: 4px; font-size: 1.35rem; }
.table-section-heading a { color: var(--blue-600); font-size: .84rem; font-weight: 800; }
.geography-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.geography-grid article { display: grid; gap: 5px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfe; }
.geography-grid strong { color: var(--navy-900); }
.geography-grid span, .geography-grid small { color: var(--muted); }
.geography-grid span { font-size: .83rem; font-weight: 750; }
.geography-grid small { line-height: 1.45; }
.school-form, .teacher-form { display: grid; gap: 20px; }
.school-form fieldset, .teacher-form fieldset { display: grid; gap: 15px; }
.field-help { margin: -2px 0 1px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.map-link { display: flex; align-items: center; gap: 12px; margin-top: 2px; padding: 14px 16px; border: 1px solid #badbeb; border-radius: 11px; background: #f0f9fc; color: var(--navy-800); text-decoration: none; }
.map-link:hover { border-color: var(--blue-600); background: #e8f5fa; }
.map-link > span:nth-child(2) { flex: 1; }
.map-link strong, .map-link small { display: block; }
.map-link small { margin-top: 2px; color: var(--muted); }
.map-link.compact { max-width: 520px; margin-top: 18px; }
.map-pin { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); font-size: .62rem; }
.registry-filters { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(170px, .42fr)) auto; gap: 13px; align-items: end; margin-bottom: 20px; padding: 18px; }
.heading-actions { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.school-profile { margin-top: 20px; }
.school-profile h2 { margin-bottom: 4px; }
.form-callout { display: flex; gap: 12px; padding: 15px 17px; border-left: 4px solid var(--blue-600); border-radius: 8px; background: var(--canvas-blue); color: var(--muted); font-size: .82rem; }
.form-callout strong { flex: 0 0 auto; color: var(--navy-900); }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: #eaf0f4; color: var(--muted); }
.footer-inner { width: min(var(--content), calc(100% - 48px)); min-height: 86px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: .75rem; }
.footer-inner strong, .footer-inner small { display: block; }
.footer-inner strong { color: #40596b; }
.footer-inner small { margin-top: 3px; }
.footer-classification { font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }

@media (max-width: 1050px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .document-type-form { grid-template-columns: 1fr 1fr; }
    .user-copy { display: none; }
    .geography-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .header-inner, .page-shell, .footer-inner { width: min(100% - 30px, var(--content)); }
    .institution-inner { min-height: 28px; }
    .masthead-inner { min-height: 76px; }
    .brand-mark { width: 45px; height: 45px; flex-basis: 45px; }
    .brand-copy strong { font-size: 1rem; }
    .brand-copy small { font-size: .7rem; }
    .user-avatar, .utility-link { display: none; }
    .nav-inner { width: 100%; padding: 0 15px; }
    .page-shell { padding: 34px 0 52px; }
    .auth-grid, .security-page, .details-grid { grid-template-columns: 1fr; }
    .auth-grid { gap: 12px; min-height: auto; }
    .welcome-panel { padding: 25px 0 12px; }
    .welcome-panel h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
    .login-card { padding: 28px; }
    .security-page { gap: 8px; }
    .security-intro { padding: 8px 0 24px; }
    .security-intro h1 { font-size: 2.6rem; }
    .security-guidance { display: none; }
    .configuration-grid { grid-template-columns: 1fr; }
    .form-grid, .role-grid { grid-template-columns: 1fr; }
    .feature-card, .page-heading, .submit-panel, .review-result { align-items: flex-start; flex-direction: column; }
    .page-heading { gap: 16px; }
    .rating-badge { text-align: left; }
    .inline-form { grid-template-columns: 1fr; }
    .document-type-form { grid-template-columns: 1fr; }
    .document-version { align-items: flex-start; flex-direction: column; }
    .document-version > span:last-child { justify-content: flex-start; }
    .organization-summary { grid-template-columns: 1fr; }
    .geography-grid { grid-template-columns: 1fr; }
    .registry-filters { grid-template-columns: 1fr; }
    .table-section-heading, .form-callout { align-items: flex-start; flex-direction: column; }
    .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 20px 0; }
}

@media (max-width: 560px) {
    .institution-inner > span:first-child { display: none; }
    .institution-inner { justify-content: flex-end; }
    .portal-label { display: none; }
    .brand-copy small { display: none; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric { min-height: 150px; }
    .security-form-card { padding: 25px 21px; }
    .security-mark { width: 52px; height: 52px; }
    .record-row { align-items: flex-start; }
    .row-action { font-size: 0; }
    .row-action span { font-size: 1rem; }
    .report-filters { grid-template-columns: 1fr; }
    .mini-form { align-items: stretch; flex-direction: column; }
}

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