/* SchoolRating.eu – shared styles (survey, results, admin).
   Fonts and photos are served from this site: no third-party requests, respondents stay anonymous. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/inter-cyr.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/inter-lat.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/serif-cyr.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/serif-lat.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f5f6f8;
  --bg-2: #eceef2;
  --card: #ffffff;
  --ink: #16202e;
  --ink-2: #414c5c;
  --muted: #5f6b7b;
  --line: #dde1e7;
  --line-2: #c9ced7;
  --primary: #1b3a5f;          /* institutional navy */
  --primary-ink: #ffffff;
  --primary-soft: #e8eef5;
  --primary-line: #a9bbd1;
  --navy-deep: #0f2440;
  --accent: #b8892c;           /* muted gold: rules and small marks only */
  --accent-ink: #85600f;       /* gold dark enough for small text on white (5:1) */
  --focus: #f0b429;
  --good: #1f6e43;
  --good-soft: #e2f1e8;
  --ok: #7f6110;
  --ok-soft: #f6efd9;
  --warn: #a8501a;
  --warn-soft: #fae8db;
  --bad: #a82828;
  --bad-soft: #f8e0e0;
  --neutral-soft: #eceef2;
  --shadow: 0 1px 2px rgba(16, 28, 45, .06), 0 4px 16px rgba(16, 28, 45, .05);
  --radius: 10px;
  --radius-sm: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b; --bg-2: #151b24; --card: #19202a; --ink: #e8ebef; --ink-2: #c0c7d1; --muted: #8f99a7;
    --line: #29313d; --line-2: #37404d; --primary: #8fb4e0; --primary-ink: #0d1a2b; --primary-soft: #1a2a3e;
    --primary-line: #34507a; --navy-deep: #0a1626; --accent: #d6aa4f; --accent-ink: #d6aa4f; --focus: #f0b429; --good: #6cc98f; --good-soft: #17301f;
    --ok: #e2c15e; --ok-soft: #2f2a15; --warn: #f0a36b; --warn-soft: #33231a; --bad: #f08585; --bad-soft: #351c1c; --neutral-soft: #222a35;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
    --ci-band: color-mix(in srgb, var(--primary) 42%, transparent);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--serif); font-weight: 650; letter-spacing: -.005em; }
h1 { font-size: clamp(1.75rem, 4.6vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-top: 1.6em; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 1em; }
small, .small { font-size: .88rem; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ layout */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.gov-strip { background: var(--navy-deep); color: #d5deea; font-size: .82rem; }
.gov-strip .wrap { display: flex; gap: 16px; align-items: center; min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
.gov-strip a { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.gov-strip .sp { flex: 1; }
@media (max-width: 640px) { .gov-strip .long { display: none; } }
.site-head { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: inset 0 -3px 0 var(--primary); }
.site-head .wrap { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { width: 38px; height: 38px; border-radius: 6px; background: var(--primary); display: grid; place-items: center; color: #fff; flex: none; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; letter-spacing: -.005em; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font); font-weight: 500; font-size: .74rem; color: var(--muted); letter-spacing: .02em; margin-top: 3px; }
.site-nav { display: flex; gap: 2px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 22px 12px 20px; font-size: .95rem; font-weight: 550; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.site-nav a:hover { color: var(--primary); }
.site-nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--accent); font-weight: 650; }
@media (max-width: 720px) { .brand-name small { display: none; } }
@media (max-width: 560px) { .site-nav a { padding: 22px 8px 20px; font-size: .88rem; } .brand-name { display: none; } .site-nav .opt-link { display: none; } }
main { padding: 28px 0 72px; }
main.content { padding-top: 0; }
.site-foot { background: var(--navy-deep); color: #c3cedc; padding: 40px 0 28px; font-size: .9rem; margin-top: 40px; }
.site-foot a { color: #fff; }
.site-foot .cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-foot h4 { color: #fff; font: 650 .8rem/1.3 var(--font); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot .base { border-top: 1px solid rgba(255,255,255,.14); margin-top: 28px; padding-top: 16px; font-size: .8rem; color: #93a2b6; display: flex; gap: 12px; flex-wrap: wrap; }
.site-foot .base .sp { flex: 1; }

/* ------------------------------------------------------------------ components */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.grid > .card + .card { margin-top: 0; }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

.btn { --b: var(--primary); appearance: none; font: 600 1rem/1.2 var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 6px; border: 1.5px solid var(--b); background: var(--b); color: var(--primary-ink);
  cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { box-shadow: 0 4px 14px color-mix(in srgb, var(--b) 30%, transparent); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; transform: none; }
.btn.secondary { background: transparent; color: var(--primary); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--bg-2); box-shadow: none; }
.btn.danger { --b: var(--bad); }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: .92rem; border-radius: 6px; }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }
.link-btn { appearance: none; background: none; border: 0; padding: 6px 4px; font: inherit; color: var(--ink-2); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: var(--line-2); cursor: pointer; }
.link-btn:hover { color: var(--ink); text-decoration-color: currentColor; }

label.field { display: block; }
label.field > span { display: block; font-size: .9rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line-2); border-radius: 12px; padding: 11px 14px;
  width: 100%; min-height: 48px; border-radius: 6px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; background: var(--neutral-soft); color: var(--ink-2);
  font-size: .82rem; font-weight: 600; white-space: nowrap; }
.chip.primary { background: var(--primary-soft); color: var(--primary); }
.chip svg { width: 14px; height: 14px; }
.note { background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--ink); border-radius: var(--radius-sm); padding: 14px 16px; }
.note.warn { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.note.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.err { color: var(--bad); font-weight: 600; margin-top: 10px; }
.banner { background: var(--ok-soft); color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); font-size: .92rem; }
.banner .wrap { padding: 9px 16px; display: flex; gap: 10px; align-items: center; }

.tier { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 650; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.tier::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tier-2 { color: var(--good); background: var(--good-soft); }
.tier-1 { color: var(--good); background: var(--good-soft); }
.tier-0 { color: var(--ink-2); background: var(--neutral-soft); }
.tier--1 { color: var(--warn); background: var(--warn-soft); }
.tier--2 { color: var(--bad); background: var(--bad-soft); }
.tier-na { color: var(--muted); background: var(--neutral-soft); }
.band-Добро { color: var(--good); } .band-Приемливо { color: var(--ok); } .band-Тревожно { color: var(--warn); } .band-Критично { color: var(--bad); }

/* interval bar: band = 90% interval, dot = score, dashed tick = reference (national) mean */
.ci { position: relative; height: 22px; min-width: 110px; }
.ci::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--line); border-radius: 2px; }
.ci .rng { position: absolute; top: 6px; height: 10px; border-radius: 6px; background: var(--ci-band, color-mix(in srgb, var(--primary) 28%, transparent)); }
.ci .dot { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--primary); border: 2.5px solid var(--card); box-shadow: 0 0 0 1px var(--primary); }
.ci .ref { position: absolute; top: 1px; height: 20px; border-left: 2px dashed var(--muted); opacity: .8; }
.ci.big { height: 30px; }
.ci.big::before { top: 14px; }
.ci.big .rng { top: 9px; height: 12px; }
.ci.big .dot { top: 6px; width: 18px; height: 18px; margin-left: -9px; }
.ci.big .ref { height: 28px; }

.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--line), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

dialog { border: 0; padding: 0; border-radius: var(--radius); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); width: min(460px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(10, 14, 20, .45); }
dialog .dlg { padding: 24px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px;
  font-weight: 600; z-index: 50; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

table.t { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.t th, table.t td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t th { font-size: .8rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
table.t tr:last-child td { border-bottom: 0; }

details.explain { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
details.explain summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.table-wrap { overflow-x: auto; }

/* ------------------------------------------------------------------ content pages (legal, about, methodology) */
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--focus); color: #000; padding: 10px 14px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
.todo { background: var(--ok-soft); color: var(--ok); border: 1px dashed color-mix(in srgb, var(--ok) 50%, transparent); border-radius: 4px; padding: 0 6px; font-size: .9em; font-weight: 600; }
.page-title { background: var(--card); border-bottom: 1px solid var(--line); padding: 40px 0 30px; }
.page-title .crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.page-title .crumbs a { color: var(--muted); }
.page-title h1 { margin: 0 0 10px; }
.page-title .lead { color: var(--ink-2); font-size: 1.1rem; max-width: 760px; margin: 0; }
.page-title .stamp { font-size: .85rem; color: var(--muted); margin-top: 14px; }
.doc { display: grid; gap: 40px; padding-top: 36px; }
@media (min-width: 960px) { .doc { grid-template-columns: 240px 1fr; } }
.doc .toc { font-size: .9rem; }
@media (min-width: 960px) { .doc .toc { position: sticky; top: 92px; align-self: start; } }
.doc .toc b { display: block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.doc .toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.doc .toc a { display: block; padding: 5px 0 5px 14px; color: var(--ink-2); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.doc .toc a:hover { color: var(--primary); border-left-color: var(--accent); }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin: 2em 0 .6em; padding-top: .2em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.4em 0 .4em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose b, .prose strong { color: var(--ink); }
.prose table.t { margin: 14px 0 20px; }
.prose table.t td { color: var(--ink-2); vertical-align: top; }
.prose .box { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: 16px 18px; margin: 18px 0; }
.prose .box.gold { border-left-color: var(--accent); }
.prose .box.red { border-left-color: var(--bad); }
.prose .box p:last-child { margin-bottom: 0; }
.prose dl.facts { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px 18px; margin: 14px 0 22px; }
.prose dl.facts dt { font-weight: 650; color: var(--ink); }
.prose dl.facts dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .prose dl.facts { grid-template-columns: 1fr; gap: 2px; } .prose dl.facts dd { margin-bottom: 10px; } }
.prose details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.prose details summary { cursor: pointer; font-weight: 650; color: var(--ink); }
.prose details[open] summary { margin-bottom: 8px; }
@media print { .gov-strip, .site-head, .site-foot, .doc .toc { display: none !important; } .doc { display: block; } }
.doc > * { min-width: 0; }
@media (max-width: 640px) { .prose .table-wrap table.t { min-width: 620px; } .prose .table-wrap { margin: 0 -16px; padding: 0 16px; } }
