:root {
    color-scheme: light;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    color: #172944;
    background: #f6f8fc;
    --blue: #104eac;
    --muted: #526581;
    --line: #dce5f0;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #e58b26; outline-offset: 3px; }
.wrap { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand img { display: block; max-width: 100%; object-fit: contain; }
.header-inner nav, footer .wrap { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.header-inner nav a { color: #294667; font-size: 14px; }

.intro {
    background: radial-gradient(ellipse at 82% 5%, #255ba4 0, transparent 65%), #103366;
    color: white;
    padding: 25px 0 38px;
}
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #d5e4ff; }
.breadcrumb a { color: white; }
h1 { margin: 22px 0 9px; font-size: clamp(30px, 5vw, 46px); line-height: 1.25; }
.directory-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.directory-tabs a {
    padding: 10px 14px;
    border: 1px solid #a3b9d8;
    border-radius: 7px;
    color: white;
    font-size: 14px;
}
.directory-tabs a[aria-current="page"] { background: white; border-color: white; color: #103366; font-weight: 650; }
.filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
    gap: 15px;
    margin-top: 15px;
    padding: 20px;
    border-radius: 12px;
    background: white;
    color: #172944;
}
.filters-with-country { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; }
.field { display: grid; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.field input, .field select, .filters button, .reset {
    min-height: 46px;
    border-radius: 7px;
    padding: 0 13px;
    font: inherit;
}
.field input, .field select { width: 100%; border: 1px solid #bac9dd; background: white; color: inherit; font-weight: 400; }
.filters button { padding-inline: 22px; border: 1px solid var(--blue); background: var(--blue); color: white; cursor: pointer; font-weight: 650; }
.filters button:hover { background: #0b3d8b; }
.reset { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-size: 14px; }
.references { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 13px; font-size: 14px; line-height: 1.6; }
.references a { color: #e1ebfb; text-decoration: underline; text-underline-offset: 3px; }
.references a:hover { color: white; }

.results { padding-block: 30px 44px; }
.result-header, .result-header > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.result-header { justify-content: space-between; margin-bottom: 14px; }
.result-header h2 { font-size: 23px; margin: 0; }
.result-header span, .source { font-size: 13px; color: var(--muted); }
.schools, .empty { border: 1px solid var(--line); border-radius: 10px; background: white; }
.schools { list-style: none; padding: 0; margin: 0; }
.school {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}
.school-with-country { grid-template-columns: minmax(0, 1fr) minmax(94px, 18%) 20px; }
.school + .school { border-top: 1px solid var(--line); }
.school:hover, .school:focus-within { background-color: #edf4ff; }
.school:first-child { border-radius: 9px 9px 0 0; }
.school:last-child { border-radius: 0 0 9px 9px; }
.school:only-child { border-radius: 9px; }
.school-name { font-weight: 650; overflow-wrap: anywhere; }
.school-name::after { content: ""; position: absolute; inset: 0; }
.school span[lang] { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.country { justify-self: start; padding: 5px 9px; border-radius: 5px; background: #edf3fb; color: #274d7e; font-size: 13px; }
.arrow { color: var(--blue); text-align: right; }
.empty { padding: 34px 20px; text-align: center; }
.empty h3 { margin: 0 0 8px; }
.empty p { margin: 0; color: var(--muted); }
.pagination { display: flex; justify-content: center; gap: 12px; margin: 23px 0; }
.pagination a { padding: 10px 17px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.source { margin: 18px 0 0; line-height: 1.6; }
footer { padding-block: 23px; border-top: 1px solid var(--line); background: white; font-size: 14px; }

@media (max-width: 760px) {
    .wrap { width: calc(100% - 32px); }
    .filters, .filters-with-country { grid-template-columns: minmax(0, 1fr) auto; }
    .field { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
    .header-inner nav { gap: 12px; }
    .brand { max-width: 112px; }
    .school { padding-inline: 12px; gap: 9px; grid-template-columns: minmax(0, 1fr); }
    .school-with-country { grid-template-columns: minmax(0, 1fr) auto; }
    .country { max-width: 90px; }
    .arrow { display: none; }
}
