.main-area:has(> .school-reports-public) {
    background-color: #fff;
}

.school-reports {
    --reports-ink: #173648;
    --reports-muted: #496272;
    --reports-accent: #176454;
    --reports-line: #d8e6e9;
    max-width: 1190px;
    margin-inline: auto;
    padding: clamp(24px, 5vw, 48px) clamp(12px, 3vw, 30px);
    color: var(--reports-ink);
}
.school-reports h1 { font-size: clamp(1.65rem, 4vw, 2.4rem); margin: 0 0 18px; }
.school-reports h2 { font-size: 1.25rem; margin: 0 0 14px; }
.school-reports a:not([aria-current]) { color: var(--reports-accent); }
.school-reports :is(a, [tabindex]):focus-visible { outline: 2px solid var(--reports-accent); outline-offset: 3px; }
.school-reports-crumb, .school-reports-meta { color: var(--reports-muted); font-size: .9rem; }
.school-reports-crumb { margin-bottom: 8px; }
.school-reports-tabs, .school-reports-years {
    display: flex; flex-wrap: wrap; gap: 6px; padding-block: 4px; margin-bottom: 14px;
}
.school-reports :is(.school-reports-tabs, .school-reports-years) a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px;
    border: 1px solid var(--reports-line); border-radius: 6px; line-height: 1.35;
}
.school-reports :is(.school-reports-tabs, .school-reports-years) a[aria-current] {
    color: #fff; background: var(--reports-accent); border-color: var(--reports-accent);
}
.school-reports-panel {
    padding: clamp(14px, 3vw, 24px); margin-bottom: 16px; min-width: 0;
    background: white; border: 1px solid var(--reports-line, #d8e6e9); border-radius: 10px;
}
.school-reports-panel > :last-child { margin-bottom: 0; }
.school-reports.school-reports-public.school-reports-linked { padding-block-start: 28px; }
.school-reports-linked:not(.school-reports-portal) { max-width: 1152px; padding-inline: 16px; }
.school-reports-linked .school-reports-assessment-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0 auto 15px;
}
.school-reports-linked.school-reports-portal .school-reports-assessment-toolbar {
    width: min(1120px, calc(100% - 32px));
}
.school-reports-linked .school-reports-assessment-toolbar h1 {
    margin: 0;
    font: 600 clamp(1.6rem, 4vw, 2.25rem)/1.2 "Mitr", sans-serif;
    overflow-wrap: anywhere;
}
#reports-assessment-cards { scroll-margin-block-start: 170px; }
.school-reports .school-reports-assessment-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    margin-inline-start: auto;
    padding: 6px 12px;
    border: 1px solid var(--reports-line);
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
}
.school-reports .school-reports-assessment-back:hover {
    background: #f3f8f8;
    border-color: var(--reports-accent);
}
.school-achievement-dashboard {
    --achievement-blue: #2267c7;
    --achievement-teal: #159f9d;
    --achievement-line: #d2e3f3;
}
.school-achievement-dashboard :is([id^="subject-area-"], [id^="school-achievement-"]) { scroll-margin-top: 145px; }
.school-achievement-navigation { display: grid; gap: 10px; margin-bottom: 16px; }
.school-achievement-nav-row {
    display: grid;
    grid-template-columns: minmax(155px, 17%) minmax(0, 1fr);
    border: 1px solid var(--achievement-line);
    border-radius: 8px;
    background: #fff;
}
.school-reports .school-achievement-dashboard .school-achievement-nav-label {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-inline-end: 1px solid var(--achievement-line);
    border-radius: 8px 0 0 8px;
    background: #f1f8fd;
    color: var(--achievement-blue);
    font-size: .875rem;
    font-weight: 600;
}
.school-achievement-nav-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
.school-achievement-dashboard .school-achievement-nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 5px 9px;
    border: 1px solid var(--achievement-line);
    border-radius: 6px;
    background: #f5faff;
    color: #19314b;
    font-size: .8rem;
    line-height: 1.4;
}
.school-achievement-dashboard .school-achievement-nav-links a:is(:hover, [aria-current]),
.school-achievement-dashboard .school-achievement-nav-label[aria-current] {
    background: #e7f3ff;
    color: var(--achievement-blue);
}
.school-achievement-dashboard .school-achievement-nav-links a[aria-current] {
    border-inline-start: 4px solid var(--achievement-blue);
    padding-inline-start: 6px;
}
.school-achievement-panel {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--achievement-line);
    border-radius: 8px;
    background: #fff;
}
.school-achievement-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: #f2f9fb;
}
.school-achievement-dashboard h2 { margin: 0 0 5px; font-size: 1.25rem; }
.school-achievement-dashboard h3 { margin: 4px 0 12px; font-size: 1rem; line-height: 1.45; }
.school-achievement-dashboard h4 { margin: 14px 0 6px; font-size: .9rem; }
.school-achievement-dashboard p { margin: 0; color: var(--reports-muted); }
.school-achievement-dashboard small { color: var(--reports-muted); font-size: .8rem; }
.school-achievement-highlight {
    min-width: 148px;
    padding: 8px 14px;
    border: 1px solid #7acbca;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}
.school-achievement-highlight strong { display: block; color: #087f80; font-size: 1.8rem; line-height: 1.2; }
.school-achievement-kpis, .school-achievement-grid { display: grid; gap: 10px; margin-top: 12px; }
.school-achievement-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.school-achievement-kpis strong { display: block; font-size: 1.28rem; line-height: 1.45; }
.school-achievement-kpis p { font-size: .85rem; }
.school-achievement-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); align-items: start; }
.school-achievement-bars { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.school-achievement-bars li {
    display: grid;
    grid-template-columns: minmax(4.5rem, 19%) minmax(0, 1fr) 4.3rem;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
}
.school-achievement-bars strong { text-align: end; font-variant-numeric: tabular-nums; }
.school-achievement-track { display: block; height: 14px; background: #e8f0f5; border-radius: 9px; overflow: hidden; }
.school-achievement-track i { display: block; height: 100%; background: var(--achievement-teal); border-radius: inherit; }
.school-achievement-distribution { display: flex; height: 21px; overflow: hidden; border-radius: 7px; background: #e8f0f5; margin-bottom: 8px; }
.school-achievement-distribution span { flex: 0 1 auto; background: #ff786c; }
.school-achievement-distribution span:nth-child(5) { background: #2b7bd5; }
.school-achievement-distribution span:nth-child(6) { background: #64cfca; }
.school-achievement-distribution span:nth-child(7) { background: var(--achievement-teal); }
.school-achievement-distribution-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.school-achievement-distribution-list > div { display: flex; justify-content: space-between; gap: 4px; border-bottom: 1px dashed var(--achievement-line); padding: 5px 0; font-size: .85rem; }
.school-achievement-distribution-list dd { margin: 0; }
.school-achievement-table { white-space: nowrap; font-size: .875rem; }
.school-achievement-table thead th { background: #edf6fd; }
.school-achievement-table tbody th { background: #fff; }
.school-achievement-dashboard .school-achievement-detail { margin-top: 12px; }
.school-achievement-dashboard ol { padding-inline-start: 22px; margin-bottom: 0; }
.school-achievement-dashboard li + li { margin-top: 4px; }
.school-achievement-bars li + li { margin-top: 0; }
@media (max-width: 850px) {
    .school-achievement-grid { grid-template-columns: minmax(0, 1fr); }
    .school-achievement-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .school-achievement-nav-row { grid-template-columns: minmax(0, 1fr); }
    .school-achievement-dashboard .school-achievement-nav-label {
        border-inline-end: 0;
        border-bottom: 1px solid var(--achievement-line);
        border-radius: 8px 8px 0 0;
    }
    .school-achievement-distribution-list { grid-template-columns: minmax(0, 1fr); }
}
.school-reports-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); gap: 10px;
    padding: 0; list-style: none;
}
.school-reports-cards li {
    min-width: 0; padding: 10px 13px; border: 1px solid var(--reports-line);
    border-radius: 6px; background: #f6faf9;
}
.school-reports-cards a { display: block; line-height: 1.55; font-weight: 600; overflow-wrap: anywhere; }
.school-reports-cards + p { margin-top: 12px; }
.school-reports-scroll { overflow-x: auto; }
.school-reports-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.school-reports-table :is(th, td) { padding: 8px 10px; border-bottom: 1px solid var(--reports-line); vertical-align: top; }
.school-reports-table th { text-align: start; background: #edf5f1; }
.school-reports-table td { overflow-wrap: anywhere; }
.school-reports-table tr:last-child td { border-bottom: 0; }
.school-reports-bar {
    position: relative; isolation: isolate; min-width: 64px; padding: 1px 6px;
    border-radius: 4px; background: #f1f6f4; color: #153c32;
}
.school-reports-bar span { position: absolute; z-index: -1; inset: 0 auto 0 0; border-radius: inherit; background: #c6e5da; }
.school-reports-news { padding: 0; list-style: none; }
.school-reports-news li {
    display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
    gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--reports-line);
}
.school-reports-news li > :first-child { color: var(--reports-muted); }
.school-reports-admin {
    padding-inline: clamp(12px, 2vw, 32px);
    overflow-wrap: anywhere;
}
.school-reports-admin :is(.school-reports-admin-heading > *, .school-reports-fields > label) { min-width: 0; }
.school-reports-admin .btn { max-width: 100%; white-space: normal; }
.school-reports-admin-heading {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 14px;
}
.school-reports-admin-list tbody th[scope="row"] { font-weight: 400; }
.school-reports-admin-heading :is(h1, h2, h3) { margin: 0; }
.school-reports-admin :is(h2, h3) { font-size: 1.15rem; }
.school-reports-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.school-reports-wide { display: block; margin-block: 12px; }
.school-reports-table-editor { border: 1px solid #d8e6e9; border-radius: 6px; margin-bottom: 8px; }
.school-reports-table-editor summary { cursor: pointer; padding: 9px 12px; }
.school-reports-table-editor > div { padding: 0 12px 12px; }
.school-reports-table-editor label { display: block; }
.school-reports-publish { margin-inline-end: 12px; }
.school-report-view { display: inline-block; margin-inline-start: 6px; }
.school-reports [hidden] { display: none !important; }
.school-drive-filters, .school-drive-previews { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.school-drive-filters label { min-width: 0; display: grid; gap: 4px; }
.school-drive-filters select {
    width: 100%; min-width: 0; min-height: 42px; padding: 6px 9px;
    border: 1px solid var(--reports-line); border-radius: 6px; color: var(--reports-ink); background: #fff;
}
.school-drive-selection {
    display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; padding: 12px;
    border-radius: 6px; background: #f3f8fc;
}
.school-drive-selection dd { margin: 0; }
.school-drive-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.school-drive-actions :is(a, button) {
    display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px;
    border: 1px solid var(--reports-line); border-radius: 6px; color: var(--reports-accent); background: white; font: inherit;
}
.school-drive-actions button { cursor: pointer; background: #edf5f1; }
.school-reports .school-drive-actions .school-drive-upload { color: #fff; background: var(--reports-accent); border-color: var(--reports-accent); }
.school-drive-upload-dialog {
    width: min(420px, calc(100% - 28px)); max-height: calc(100% - 28px); margin: auto;
    padding: 20px; border: 1px solid #c7d7ee; border-radius: 12px;
    background: #fff; color: #24324c; box-shadow: 0 18px 42px rgba(31, 41, 55, .24);
}
.school-drive-upload-dialog::backdrop { background: rgba(15, 23, 42, .34); backdrop-filter: blur(4px); }
.school-reports .school-drive-upload-dialog h2 { margin: 0 0 6px; font-size: 1.1rem; }
.school-drive-upload-dialog p { margin: 0 0 12px; color: #5f6e86; font-size: .9rem; }
.school-drive-upload-dialog input {
    width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #c7d7ee;
    border-radius: 10px; background: #f4f8fc; color: inherit; font: inherit;
}
.school-drive-upload-dialog input:focus-visible { outline: 2px solid #3478dd; outline-offset: 1px; }
.school-drive-upload-dialog .school-drive-upload-message { margin: 8px 0 0; color: #a12736; }
.school-drive-upload-message:empty { display: none; }
.school-drive-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.school-drive-dialog-actions button {
    min-height: 40px; padding: 6px 14px; border: 1px solid #c7d7ee;
    border-radius: 10px; background: #f4f8fc; color: inherit;
    font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
}
.school-drive-dialog-actions [data-drive-upload-confirm] { background: #e1f8fb; border-color: #86cddb; color: #165876; }
.school-drive-dialog-actions button:disabled { opacity: .6; cursor: wait; }
.school-drive-previews { margin-top: 16px; }
.school-drive-previews h3 { font-size: 1rem; margin-bottom: 8px; }
.school-drive-previews iframe { width: 100%; height: 340px; border: 1px solid var(--reports-line); border-radius: 6px; }
.school-reports-admin-actions, .school-drive-admin-field { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.school-drive-admin-item { padding: 8px 0; border-top: 1px solid #d8e6e9; }
.school-drive-admin-item label { margin: 0; }
.school-drive-admin-field input { flex: 1 1 260px; min-width: 0; }
@media (max-width: 600px) {
    .school-reports-news li, .school-reports-fields { grid-template-columns: minmax(0, 1fr); }
    .school-reports-table { min-width: 480px; }
    .school-drive-filters, .school-drive-previews { grid-template-columns: minmax(0, 1fr); }
    .school-drive-selection { gap: 3px 10px; }
}
