/* ===== Гимназия № 272 — дизайн-система ===== */
:root {
  --ink: #13233f;
  --ink-2: #1f3a64;
  --navy: #13233f;
  --gold: #c39432;
  --gold-2: #f0d58d;
  --gold-soft: #f3e8cf;
  --bg: #f7f4ee;
  --paper: #ffffff;
  --paper-2: #fbf9f5;
  --text: #1b2333;
  --muted: #5d6678;
  --line: #e6e0d3;
  --shadow-sm: 0 2px 8px rgba(19, 35, 63, .06);
  --shadow: 0 14px 40px rgba(19, 35, 63, .10);
  --radius: 20px;
  --head: "Playfair Display", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf7;
    --ink-2: #b8c7e6;
    --gold: #d9b45e;
    --gold-soft: #2a2516;
    --bg: #0e1524;
    --paper: #16203a;
    --paper-2: #131c33;
    --text: #e6eaf3;
    --muted: #9ca8be;
    --line: #26334f;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
    --shadow: 0 14px 40px rgba(0, 0, 0, .4);
  }
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #1a1406; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.section { padding: 80px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: var(--paper); border-block: 1px solid var(--line); }
.eyebrow { display: inline-block; font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 8px 0 0; }

/* ----- Шапка ----- */
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--gold); color: #1a1406; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.topbar { background: #0d1830; color: #c9d3e6; font-size: .84rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: var(--gold-2); }
.topbar span + span { margin-left: 20px; }
.topbar .pill { background: rgba(240,213,141,.14); color: var(--gold-2); border-radius: 999px; padding: 2px 10px; font-weight: 700; }

.header {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.header.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; transition: height .3s var(--ease); }
.header.scrolled .container { height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { width: 44px; height: 44px; }
.brand b { font-family: var(--head); font-size: 1.18rem; color: var(--ink); display: block; line-height: 1.1; }
.brand small { color: var(--muted); font-size: .76rem; }

.nav { display: flex; gap: 2px; }
.nav a {
  position: relative; text-decoration: none; font-weight: 650; font-size: .9rem; padding: 9px 11px; border-radius: 999px;
  color: var(--text); transition: background .2s, color .2s; white-space: nowrap;
}
.nav a:hover { background: var(--gold-soft); }
.nav a.active { background: var(--ink); color: var(--bg); }
.burger { display: none; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; width: 44px; height: 44px; cursor: pointer; color: var(--ink); place-items: center; }

@media (max-width: 1240px) {
  .burger { display: grid; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw); flex-direction: column; gap: 4px;
    background: var(--paper); padding: 90px 18px 24px; box-shadow: var(--shadow);
    transform: translateX(105%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s; z-index: 70; overflow-y: auto;
  }
  .nav.open { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
  .nav a { border-radius: 14px; padding: 14px 16px; font-size: 1.02rem; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(8,14,28,.45); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 65; }
  .nav-backdrop.open { opacity: 1; pointer-events: auto; }
  .burger { position: relative; z-index: 75; }
  /* при открытом меню снимаем размытие: иначе фиксированное меню «зажимается» внутри шапки */
  .header.menu-open { -webkit-backdrop-filter: none; backdrop-filter: none; z-index: 80; background: var(--bg); }
  .nav { height: 100vh; height: 100dvh; }
  .nav a.active { background: var(--ink); color: var(--bg); }
  .topbar .hide-sm { display: none; }
}

/* ----- Кнопки ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-weight: 700; line-height: 1.2;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--gold { background: var(--gold); color: #1a1406; box-shadow: 0 8px 24px rgba(195,148,50,.3); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--line { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn--line:hover { border-color: var(--gold); }
.btn--sm { padding: 9px 16px; font-size: .9rem; }

/* ----- Обложки ----- */
.hero { position: relative; color: #fff; overflow: hidden; background: #13233f; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center 40%; animation: heroZoom 18s ease-out both; }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1.02); } }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10,20,40,.94) 0%, rgba(10,20,40,.72) 48%, rgba(10,20,40,.28) 100%); }
.hero .container { position: relative; padding: 96px 0 110px; }
.hero h1 { color: #fff; max-width: 780px; }
.hero h1 em { font-style: italic; color: var(--gold-2); }
.hero p { font-size: 1.18rem; max-width: 620px; color: #dfe5f1; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.badge-jubilee {
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(240,213,141,.5);
  color: var(--gold-2); border-radius: 999px; padding: 6px 16px; font-weight: 650; font-size: .88rem; margin-bottom: 22px;
  background: rgba(10,20,40,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero-fade > * { animation: fadeUp .8s var(--ease) both; }
.hero-fade > *:nth-child(2) { animation-delay: .08s; }
.hero-fade > *:nth-child(3) { animation-delay: .16s; }
.hero-fade > *:nth-child(4) { animation-delay: .24s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.page-hero { background: #13233f; color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden; }
.page-hero.has-img { background-size: cover; background-position: center; }
.page-hero.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,20,40,.94), rgba(10,20,40,.7)); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero::before {
  content: ""; position: absolute; right: -90px; top: -130px; width: 440px; height: 440px; border-radius: 50%;
  border: 60px solid rgba(195,148,50,.12); z-index: 1;
}
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { color: #c8d1e2; max-width: 680px; margin: 0; font-size: 1.12rem; }
.crumbs { font-size: .85rem; color: #9fb0cf; margin-bottom: 14px; }
.crumbs a { text-decoration: none; color: var(--gold-2); }
.page-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.page-nav a { text-decoration: none; color: #e7ecf6; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 7px 14px; font-size: .88rem; font-weight: 600; transition: background .2s; }
.page-nav a:hover { background: rgba(255,255,255,.12); }
@media (max-width: 640px) {
  .page-hero::before { width: 200px; height: 200px; border-width: 28px; right: -70px; top: -70px; }
  .hero__bg::after { background: linear-gradient(180deg, rgba(10,20,40,.9) 0%, rgba(10,20,40,.8) 60%, rgba(10,20,40,.65) 100%); }
  .hero .container { padding: 64px 0 96px; }
  .section { padding: 56px 0; }
}

/* ----- Цифры ----- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: -56px; position: relative; z-index: 2; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.stat b { font-family: var(--head); font-size: 2.3rem; color: var(--gold); display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .93rem; }
.stats--flat { margin-top: 0; }
.stats--flat .stat { box-shadow: none; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ----- Сетки ----- */
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.split--rev > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 28px; } .split--rev > :first-child { order: 0; } }
.photo-frame { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; background: var(--gold-soft) center/cover; position: relative; }
.photo-frame figcaption, .photo-credit { position: absolute; right: 12px; bottom: 10px; font-size: .72rem; color: #fff; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 6px; }
.photo-stack { position: relative; }
.photo-stack { padding: 0 0 34px; }
.photo-stack .photo-frame:nth-child(2) { position: absolute; width: 42%; aspect-ratio: 1; right: 16px; bottom: 0; border: 6px solid var(--paper); box-shadow: var(--shadow); }
.section:not(.section--alt) .photo-stack .photo-frame:nth-child(2) { border-color: var(--bg); }
@media (max-width: 900px) { .photo-stack { padding: 0; } .photo-stack .photo-frame:nth-child(2) { display: none; } }

/* ----- Плитки ----- */
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.tile .icon { width: 50px; height: 50px; border-radius: 14px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; margin-bottom: 16px; }
.tile h3 { margin-bottom: 8px; }
.tile p { color: var(--muted); margin: 0; }
.tile ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
a.tile { text-decoration: none; display: block; }
a.tile:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow); }
a.tile .go { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--ink-2); font-size: .92rem; }
.tile--navy { background: linear-gradient(140deg, #13233f, #24457a); border: 0; color: #dbe3f1; }
.tile--navy h3 { color: #fff; }
.tile--navy p { color: #c8d1e2; }

/* ----- Лента новостей (главная) ----- */
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.feed-layout > * { min-width: 0; }
@media (max-width: 1000px) { .feed-layout { grid-template-columns: minmax(0, 1fr); } }
.feed-tools { position: sticky; top: 76px; z-index: 5; background: var(--bg); background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 12px 0 14px; margin-bottom: 8px; }
.header.scrolled ~ main .feed-tools { top: 64px; }
.search {
  width: 100%; padding: 13px 18px 13px 46px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238a93a6' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 17px center no-repeat;
  color: var(--text); font: inherit;
}
.search:focus { outline: 2px solid var(--gold); border-color: transparent; }
.chips { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 12px; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--paper); color: var(--text); padding: 8px 15px; border-radius: 999px; font-weight: 650; font-size: .88rem; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { opacity: .6; font-weight: 600; margin-left: 4px; }

.post {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin-bottom: 22px; box-shadow: var(--shadow-sm); transition: box-shadow .3s;
}
.post:hover { box-shadow: var(--shadow); }
.post__head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 0; }
.post__head img { width: 42px; height: 42px; }
.post__head b { display: block; font-size: .95rem; color: var(--ink); line-height: 1.2; }
.post__head small { color: var(--muted); font-size: .82rem; }
.post__tag { margin-left: auto; font-size: .74rem; font-weight: 750; letter-spacing: .04em; color: var(--gold); background: var(--gold-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.post__body { padding: 14px 22px 4px; }
.post__title { font-family: var(--head); font-size: 1.42rem; line-height: 1.25; color: var(--ink); margin: 0 0 10px; }
.post__text { color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.post__text.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.post__more { background: none; border: 0; padding: 4px 0; color: var(--ink-2); font-weight: 750; cursor: pointer; }
.post__more:hover { color: var(--gold); }
.post__text a { color: var(--ink-2); }
.photos { display: grid; gap: 3px; margin-top: 14px; background: var(--line); }
.photos button { padding: 0; border: 0; cursor: zoom-in; position: relative; overflow: hidden; background: var(--gold-soft); display: block; width: 100%; height: 100%; min-height: 0; }
.photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.photos button:hover img { transform: scale(1.03); }
.photos.n1 { grid-template-columns: 1fr; }
.photos.n1 { aspect-ratio: 4/3; max-height: 560px; }
.photos.n2 { grid-template-columns: 1fr 1fr; aspect-ratio: 2/1.05; }
.photos.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16/10; }
.photos.n3 button:first-child { grid-row: span 2; }
.photos.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 4/3; }
.photos .more-n { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10,20,40,.55); color: #fff; font-size: 1.8rem; font-weight: 800; font-family: var(--head); }
.post__video { margin: 14px 22px 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--paper-2); border: 1px dashed var(--line); text-decoration: none; color: var(--ink); font-weight: 650; }
.post__video span { width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: #1a1406; display: grid; place-items: center; flex: none; }
.post__foot { display: flex; align-items: center; gap: 16px; padding: 14px 22px 16px; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); margin-top: 16px; }
.post__foot a { margin-left: auto; text-decoration: none; font-weight: 700; color: var(--ink-2); }
.post__foot a:hover { color: var(--gold); }
.post__foot .like { color: #d0485e; font-weight: 700; }

.sidebar { display: grid; gap: 18px; position: sticky; top: 90px; }
@media (max-width: 1000px) { .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.widget { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.widget h4 { font-size: 1.1rem; margin-bottom: 12px; }
.widget ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.widget li { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.widget li span:first-child { color: var(--muted); }
.widget a { color: var(--ink-2); font-weight: 650; text-decoration: none; }
.widget a.btn--gold { color: #1a1406; }
.widget a.btn--line { color: var(--ink); }
.widget--event { padding: 0; overflow: hidden; }
.widget--event img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.widget--event div { padding: 16px 20px 20px; }
.now-lesson { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); font-size: .88rem; font-weight: 650; color: var(--ink); }

/* ----- Табло звонков ----- */
.board { --acc: #f0d58d; background: radial-gradient(1200px 600px at 85% -10%, #24457a 0%, transparent 60%), linear-gradient(160deg, #0b152b 0%, #13233f 60%, #0e1a33 100%); color: #e6ebf5; padding: 44px 0 48px; position: relative; overflow: hidden; }
.board[data-mode="break"] { --acc: #7fe0b0; }
.board[data-mode="off"], .board[data-mode="after"] { --acc: #a9b7d3; }
.board__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: stretch; }
@media (max-width: 1000px) { .board__grid { grid-template-columns: 1fr; } }
.board__main { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); border-radius: 28px; padding: 28px 30px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; flex-direction: column; gap: 26px; }
.board__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.board__clock { font-family: var(--body); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.board__sec { color: rgba(255,255,255,.45); font-size: .55em; margin-left: 2px; }
.board__date { margin-top: 8px; color: #aab6cc; font-size: 1rem; }
.board__tools { display: flex; gap: 8px; flex-wrap: wrap; }
.board__tools .btn[aria-pressed="true"] { background: rgba(240,213,141,.16); border-color: var(--gold-2); color: var(--gold-2); }
.board__core { display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: center; }
@media (max-width: 640px) { .board__core { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 20px; } .board__main { padding: 22px 18px; } }
.ring { position: relative; width: 230px; height: 230px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 10; }
.ring__fg { fill: none; stroke: var(--acc); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .4s; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--acc) 45%, transparent)); }
.ring__txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring__txt b { font-size: 3rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; line-height: 1; }
.ring__txt small { margin-top: 8px; color: #aab6cc; font-size: .82rem; max-width: 150px; line-height: 1.3; }
.board__eyebrow { color: var(--acc); }
.board__status h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); margin: 4px 0 10px; }
.board__subj { font-size: 1.2rem; color: var(--acc); font-weight: 700; margin: 0 0 6px; }
.board__next { color: #c8d1e2; font-size: 1.05rem; margin: 0; }
.track-wrap { margin-top: auto; }
.track { position: relative; height: 46px; border-radius: 14px; background: rgba(255,255,255,.05); }
.track .seg { position: absolute; top: 6px; bottom: 6px; border-radius: 9px; background: rgba(255,255,255,.13); display: grid; place-items: center; transition: background .4s; overflow: hidden; }
.track .seg span { font-size: .78rem; font-weight: 800; color: rgba(255,255,255,.75); }
.track .seg.extra { background: rgba(240,213,141,.18); }
.track .seg.past { background: rgba(255,255,255,.05); }
.track .seg.past span { color: rgba(255,255,255,.3); }
.track .seg.now { background: var(--acc); box-shadow: 0 0 22px color-mix(in srgb, var(--acc) 50%, transparent); }
.track .seg.now span { color: #13233f; }
.needle { position: absolute; top: -6px; bottom: -6px; width: 2px; background: #fff; border-radius: 2px; box-shadow: 0 0 10px #fff; transition: left 1s linear; }
.needle::before { content: ""; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.track__scale { margin-top: 10px; color: #8f9cb6; font-size: .84rem; text-transform: none; }
.board__side { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); border-radius: 28px; padding: 26px 22px; }
.board__side h2 { color: #fff; font-size: 1.4rem; margin-bottom: 14px; }
.board__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board__list li span small { display: block; color: inherit; opacity: .6; font-size: .78rem; }
.board__list li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; color: #dfe5f1; transition: background .3s; }
.board__list li b { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: .85rem; }
.board__list li time { font-variant-numeric: tabular-nums; color: #aab6cc; font-size: .92rem; }
.board__list li.past { opacity: .4; }
.board__list li.now { background: var(--acc); color: #13233f; }
.board__list li.now b { background: rgba(19,35,63,.15); }
.board__list li.now time { color: #13233f; font-weight: 700; }
.board__list li.soon { outline: 1px dashed var(--acc); }
.board:fullscreen { display: flex; align-items: center; padding: 40px; }
.board:fullscreen .board__tools #sound-btn { display: none; }
.board:fullscreen .ring { width: 300px; height: 300px; }
.board:fullscreen .ring__txt b { font-size: 4rem; }

.bell-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bell-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; font-size: .95rem; font-variant-numeric: tabular-nums; transition: background .3s; }
.bell-list li span:first-child { color: var(--muted); }
.bell-list li.past { opacity: .45; }
.bell-list li.now { background: var(--ink); color: var(--bg); font-weight: 700; }
.bell-list li.now span:first-child { color: inherit; }
.bell-list li.soon { background: var(--gold-soft); }
.bell-list--mini li { padding: 6px 10px; font-size: .9rem; }
.day-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.day-tabs .chip { flex: 1; padding: 9px 6px; text-align: center; }
.day-tabs .chip .day-full { display: none; }
.bell-mini__status { font-weight: 750; color: var(--ink); line-height: 1.35; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); font-variant-numeric: tabular-nums; }
.bell-mini__status.lesson { background: var(--ink); color: var(--bg); }
.bell-mini__day { font-size: .82rem; color: var(--muted); margin: 14px 0 8px; text-transform: none; }
.bar--live { margin: 10px 0 0; height: 6px; }
.bar--live i { transition: width 1s linear; }

/* ----- Документы ----- */
.doc-groups { columns: 3 340px; column-gap: 22px; }
.doc-group { break-inside: avoid; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px 14px; margin-bottom: 22px; }
.doc-group h3 { padding: 0 6px; margin-bottom: 10px; }
.doc { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 12px; text-decoration: none; color: var(--text); font-size: .94rem; font-weight: 550; line-height: 1.35; transition: background .2s; }
.doc:hover { background: var(--gold-soft); }
.doc__ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); font-size: .7rem; font-weight: 800; font-style: italic; font-family: var(--head); }
.doc__ic.pdf { background: #fbe9e7; color: #b3261e; border-color: transparent; font-style: normal; font-family: var(--body); font-size: .62rem; }
/* каталог: подписи, счётчики, свёрнутые списки */
.doc > span:last-child { display: flex; flex-direction: column; }
.doc small { color: var(--muted); font-size: .76rem; font-weight: 500; margin-top: 2px; }
.doc-count { display: inline-block; vertical-align: middle; margin-left: 6px; font-family: var(--body); font-size: .72rem; font-weight: 800; color: var(--gold); background: var(--gold-soft); border-radius: 999px; padding: 2px 8px; }
.doc-sub { margin: 14px 8px 4px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.doc-more { margin: 6px 0; border-top: 1px solid var(--line); }
.doc-more summary { cursor: pointer; list-style: none; padding: 12px 8px; font-weight: 700; font-size: .92rem; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.doc-more summary::-webkit-details-marker { display: none; }
.doc-more summary::before { content: "›"; font-size: 1.3rem; line-height: 1; color: var(--gold); transition: transform .2s; }
.doc-more[open] summary::before { transform: rotate(90deg); }
.doc-more .doc { padding-left: 18px; }
table.facts th { width: 260px; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--ink); background: var(--paper-2); }
table.facts td a { color: var(--ink-2); }
@media (max-width: 640px) { table.facts th, table.facts td { display: block; width: auto; } table.facts th { border-bottom: 0; padding-bottom: 2px; } }

/* форма обращения */
.form { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: grid; gap: 16px; box-shadow: var(--shadow-sm); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } .form { padding: 20px; } }
.form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--ink); }
.form input:not([type=checkbox]), .form select, .form textarea { font: inherit; font-weight: 500; color: var(--text); background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; transition: border-color .2s, box-shadow .2s; }
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.form .form__check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--muted); }
.form .form__check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.form .btn { justify-self: start; }

mark { background: var(--gold-2); color: #1a1406; border-radius: 3px; padding: 0 2px; }

/* ----- Счётчик ----- */
.countdown { display: inline-flex; gap: 10px; align-items: center; margin-top: 26px; padding: 10px 16px 10px 12px; border-radius: 16px; background: rgba(10,20,40,.45); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #dfe5f1; font-size: .9rem; text-decoration: none; transition: background .2s; }
.countdown:hover { background: rgba(10,20,40,.65); }
.countdown b { font-family: var(--head); font-size: 1.6rem; color: var(--gold-2); line-height: 1; }
.countdown small { display: block; color: #aab6cc; font-size: .78rem; }

/* ----- Партнёры ----- */
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.partner { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.partner .flag { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.partner b { display: block; color: var(--ink); margin: 6px 0 4px; line-height: 1.3; }
.partner span { color: var(--muted); font-size: .88rem; }

@media print {
  .topbar, .header, .footer, .to-top, .page-nav, .nav-backdrop, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .page-hero { background: #fff !important; color: #000; padding: 20px 0; }
  .page-hero h1, .page-hero p { color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.post__tag--pin { background: var(--ink); color: var(--gold-2); }
.period-badge { display: inline-block; margin-left: 8px; vertical-align: middle; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #13233f; background: var(--gold-2); border-radius: 999px; padding: 3px 9px; }
.tile.period--now { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.tile.period--past { opacity: .55; }
tr.period--now td { background: var(--gold-soft); }
tr.period--past td { color: var(--muted); }
.vk-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); min-height: 660px; }
.vk-box iframe { border-radius: 12px; }
.skeleton { background: linear-gradient(90deg, var(--line) 25%, var(--paper-2) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.updated { font-size: .84rem; color: var(--muted); }
.updated a { color: var(--ink-2); }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; margin-right: 6px; box-shadow: 0 0 0 0 rgba(47,191,113,.6); animation: pulse 2s infinite; vertical-align: 1px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47,191,113,0); } 100% { box-shadow: 0 0 0 0 rgba(47,191,113,0); } }

/* ----- Лайтбокс ----- */
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(5,9,18,.94); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .25s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-height: 86vh; max-width: min(92vw, 1400px); border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); transition: opacity .2s; }
.lightbox .lb-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; cursor: pointer; transition: background .2s; }
.lightbox .lb-btn:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-prev { left: 18px; } .lightbox .lb-next { right: 18px; }
.lightbox .lb-close { position: absolute; top: 16px; right: 16px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.5rem; cursor: pointer; }
.lightbox .lb-cap { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #dfe5f1; font-size: .9rem; text-align: center; width: min(90vw, 800px); }
.lightbox .lb-cap a { color: var(--gold-2); }
@media (max-width: 640px) { .lightbox .lb-btn { width: 42px; height: 42px; top: auto; bottom: 64px; transform: none; } }

/* ----- Галерея ----- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.masonry { columns: 4 250px; column-gap: 14px; }
.masonry figure { margin: 0 0 14px; break-inside: avoid; border-radius: 16px; overflow: hidden; position: relative; cursor: zoom-in; background: var(--gold-soft); }
.masonry img { width: 100%; transition: transform .6s var(--ease); }
.masonry figure:hover img { transform: scale(1.05); }
.masonry figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; color: #fff; font-size: .84rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.78)); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s;
}
.masonry figure:hover figcaption { opacity: 1; transform: none; }
@media (hover: none) { .masonry figcaption { opacity: 1; transform: none; } }

/* ----- История ----- */
.timeline { position: relative; margin: 0; padding: 0 0 0 34px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold), var(--line)); }
.timeline li { position: relative; margin-bottom: 30px; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 6px var(--gold-soft); }
.timeline b { font-family: var(--head); font-size: 1.45rem; color: var(--ink); display: block; line-height: 1.2; }
.timeline h4 { font-family: var(--body); font-size: 1.02rem; margin: 4px 0 4px; }
.timeline p { color: var(--muted); margin: 0; }
.timeline--wide { columns: 2 380px; column-gap: 60px; }
.timeline--wide::before { display: none; }
.timeline--wide li { break-inside: avoid; padding-bottom: 4px; }
.timeline--wide li::after { content: ""; position: absolute; left: -26px; top: 30px; bottom: -26px; width: 2px; background: linear-gradient(var(--gold), var(--line)); opacity: .5; }
.timeline--wide li:last-child::after { display: none; }
.quote { border-left: 4px solid var(--gold); padding: 6px 0 6px 22px; font-family: var(--head); font-size: 1.45rem; font-style: italic; color: var(--ink); margin: 26px 0; }
.quote cite { display: block; font-family: var(--body); font-style: normal; font-size: .9rem; color: var(--muted); margin-top: 8px; }
.sources { font-size: .86rem; color: var(--muted); }
.sources a { color: var(--ink-2); }

/* ----- Люди ----- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.person { display: flex; gap: 16px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; transition: border-color .2s, transform .2s var(--ease); }
.person:hover { border-color: var(--gold); transform: translateY(-2px); }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(140deg, #13233f, #2b4f88); color: var(--gold-2); display: grid; place-items: center; font-family: var(--head); font-size: 1.2rem; font-weight: 700; }
.avatar--lg { width: 76px; height: 76px; font-size: 1.6rem; }
.person b { display: block; color: var(--ink); line-height: 1.3; }
.person span { color: var(--muted); font-size: .88rem; display: block; }
.person .tag { display: inline-block; margin-top: 6px; font-size: .74rem; font-weight: 750; color: var(--gold); background: var(--gold-soft); border-radius: 999px; padding: 2px 9px; }
.leader { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 26px; padding: 28px; box-shadow: var(--shadow-sm); }
.leader img { width: 140px; height: 140px; border-radius: 22px; object-fit: cover; background: var(--gold-soft); }
@media (max-width: 640px) { .leader { grid-template-columns: 1fr; } }

/* ----- Таблицы ----- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--paper-2); font-weight: 750; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--paper-2); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; color: var(--ink); }
tr.now td { background: var(--gold-soft); }

/* ----- Аккордеон ----- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: var(--gold); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 750; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--gold); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; color: var(--muted); }

/* ----- Шаги ----- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 22px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -16px; left: 22px; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #1a1406; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 6px var(--bg); }
.step h3 { font-size: 1.1rem; margin-top: 8px; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

.callout { display: flex; gap: 18px; align-items: center; background: var(--gold-soft); border-radius: 20px; padding: 22px 26px; color: var(--ink); }
.callout b { font-family: var(--head); font-size: 1.25rem; }
.callout .btn { margin-left: auto; }
@media (max-width: 640px) { .callout { flex-direction: column; align-items: flex-start; } .callout .btn { margin-left: 0; } }

.bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #e2bd62); border-radius: 999px; width: 0; transition: width 1.4s var(--ease); }
.reveal.in .bar i { width: var(--w); }

/* ----- Контакты ----- */
.contact-list { display: grid; gap: 14px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.contact-item .icon { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; }
.contact-item small { display: block; color: var(--muted); font-size: .82rem; }
.contact-item a, .contact-item b { font-weight: 700; color: var(--ink); text-decoration: none; }
.map { width: 100%; height: 100%; min-height: 460px; border: 0; border-radius: var(--radius); background: var(--gold-soft); }

.cta { background: linear-gradient(120deg, #13233f, #24457a); color: #fff; border-radius: 28px; padding: 46px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; right: -60px; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; border: 44px solid rgba(240,213,141,.12); }
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { margin: 0; color: #c8d1e2; }
.cta > * { position: relative; z-index: 1; }

/* ----- Подвал ----- */
.footer { background: #0b152b; color: #aeb9cf; padding: 60px 0 28px; font-size: .95rem; }
.footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
@media (max-width: 900px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer .cols { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; font-family: var(--head); font-size: 1.1rem; margin: 0 0 12px; }
.footer a { text-decoration: none; color: #d6deec; }
.footer a:hover { color: var(--gold-2); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.footer .brand b { color: #fff; }
.footer .brand small { color: #93a1bb; }
.footer .bottom { border-top: 1px solid #1f2d4c; margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .84rem; color: #7f8daa; }
.footer .note { margin-top: 14px; font-size: .84rem; color: #8592ad; max-width: 380px; }

.to-top { position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s; z-index: 50; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Браузеры без aspect-ratio (iOS 14 и старше): задаём высоту явно */
@supports not (aspect-ratio: 1 / 1) {
  .photos.n1 { height: 360px; }
  .photos.n2, .photos.n4 { height: 340px; }
  .photos.n3 { height: 380px; }
  .photo-frame { height: 340px; }
  .photo-stack .photo-frame:nth-child(2) { height: 200px; }
  .widget--event img { height: 200px; }
}

/* Узкие телефоны (iPhone SE и подобные) */
.brand { min-width: 0; }
.brand > span { min-width: 0; }
.burger { flex: none; }
.stat span, .tile p, .person b, .doc span { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
@media (max-width: 400px) {
  .container { width: calc(100% - 28px); }
  .brand img { width: 38px; height: 38px; }
  .brand b { font-size: 1.05rem; }
  .brand small { display: none; }
  .header .container { gap: 10px; }
  .stats { gap: 10px; }
  .stat { padding: 16px; }
  .stat b { font-size: 1.8rem; }
  .stat span { font-size: .85rem; }
  .topbar span + span { margin-left: 12px; }
  .post__head, .post__body { padding-left: 16px; padding-right: 16px; }
  .post__foot { padding-left: 16px; padding-right: 16px; }
  .post__title { font-size: 1.25rem; }
  .board__clock { font-size: 2.4rem; }
  .ring { width: 200px; height: 200px; }
  .ring__txt b { font-size: 2.5rem; }
}

.split > *, .grid > *, .feed-layout > *, .board__grid > * { min-width: 0; }
.contact-item a, .contact-item b, .widget a, .footer a, table.facts td { overflow-wrap: anywhere; }
