:root {
  color-scheme: dark;
  --bg: #0c0d10;
  --panel: #14161b;
  --panel-2: #181b21;
  --line: #262a33;
  --line-2: #343945;
  --ink: #e6e8ec;
  --muted: #868d9b;
  --accent: #c9cfdb;
  --ok: #5fd08a;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px 20px 56px; }
a { color: inherit; text-underline-offset: 3px; }
.muted { color: var(--muted); font-size: .85rem; }

/* шапка */
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 6px; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.1; font-weight: 650; letter-spacing: -.01em; }
h1 .school { font-size: .42em; font-weight: 500; color: var(--muted); margin-left: .5em; letter-spacing: .02em; text-transform: uppercase; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 2px solid #aebfe8; outline-offset: 3px; }
.skip { position: absolute; z-index: 4; left: 12px; top: -80px; padding: 8px; background: var(--panel); }
.skip:focus { top: 10px; }
.icon { width: 16px; height: 16px; flex: none; vertical-align: middle; }
.clock, .control, .toolbar, .week-nav, .switch, .switch button, .status-info, .status-info > span, .status-info a {
  display: flex; align-items: center;
}
.clock { gap: 6px; font-size: .82rem; color: var(--muted); }
.clock time { color: var(--ink); font-variant-numeric: tabular-nums; }
.control, .switch, .day-choice, .status-info button {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 5px;
}
.control { justify-content: center; gap: 7px; padding: 6px 10px; font-size: .82rem; }
.control:hover:enabled, .day-choice:hover, .status-info button:hover { background: #21252c; }

.status { margin-top: 20px; padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 6px; background: var(--panel); }
.status.live { border-left-color: var(--ok); }
#official > p:not(.status-label) { margin: 6px 0 14px; color: var(--accent); }
.source-link { display: inline-block; padding: 8px 13px; border-radius: 5px; background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none; }
.source-link:hover { background: var(--ink); }
.status-label { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 550; letter-spacing: .14em; text-transform: uppercase; }
.status.live .status-label { color: var(--ok); }
.status h2 { font-size: 1.33rem; font-weight: 650; line-height: 1.25; margin: 4px 0; }
.status-info { flex-wrap: wrap; gap: 3px 15px; color: #a4abb8; font-size: .85rem; font-variant-numeric: tabular-nums; }
.status-info > span, .status-info a { gap: 5px; }
.status-info .icon { width: 14px; height: 14px; }
.status-info button { padding: 4px 9px; color: var(--ink); }
.progress { height: 3px; background: var(--line); margin-top: 12px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); transition: width .4s; }
.notice, .empty { color: var(--muted); font-size: .9rem; }
.toolbar { margin: 19px 0 12px; flex-wrap: wrap; gap: 8px 14px; }
.week-nav { gap: 10px; }
#week-range { font-size: .87rem; font-weight: 550; font-variant-numeric: tabular-nums; }
.arrow { width: 30px; height: 30px; padding: 0; }
.week-count { color: var(--muted); font-size: .8rem; }
.switch { margin-left: auto; padding: 2px; gap: 2px; }
.switch button { border: 0; background: transparent; padding: 5px 10px; gap: 6px; border-radius: 3px; color: #a6adbb; font-size: .8rem; }
.switch button[aria-pressed="true"] { background: #30353f; color: #f0f2f6; }
.switch button:hover, .open-day:hover { color: #fff; }
.switch .icon { height: 14px; width: 14px; }
.back { display: block; margin: -2px 0 12px; padding: 0; background: transparent; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: .82rem; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.grid.single { grid-template-columns: minmax(0, 1fr); }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; min-width: 0; }
.day.today { border-color: #78818e; }
.day-share { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 12px; padding-top: 7px; border-top: 1px solid var(--line); }
.share-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; border: 0; border-radius: 4px; background: transparent; padding: 5px 7px; margin-left: -7px; color: var(--accent); font-size: .82rem; }
.share-button:hover { background: var(--line); color: var(--ink); }
.share-feedback { font-size: .78rem; color: var(--muted); }
.share-text { box-sizing: border-box; width: 100%; padding: 8px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-radius: 4px; font: inherit; }
.day-head { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.day-head h2, .open-day { margin: 0; font-size: .84rem; font-weight: 650; line-height: 1.4; letter-spacing: .09em; text-transform: uppercase; }
.open-day { display: flex; align-items: center; justify-content: space-between; gap: 5px; width: 100%; border: 0; padding: 0; background: transparent; text-align: left; }
.open-day .icon { width: 13px; height: 13px; color: var(--muted); }
.day-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; color: var(--muted); font-size: .75rem; }
.day-meta > span:nth-child(2)::before { content: "·"; margin-right: 8px; }
.today-label { margin-left: auto; color: var(--ink); font-weight: 600; }
.lessons { list-style: none; padding: 0; margin: 0; }
.lesson { position: relative; padding: 10px 0 10px 12px; border-bottom: 1px solid var(--line); --subject-color: #939bad; }
.lesson:last-child { border-bottom: 0; padding-bottom: 1px; }
.lesson::before { content: ""; position: absolute; left: 0; width: 2px; top: 12px; bottom: 12px; background: var(--subject-color); background: color-mix(in srgb, var(--subject-color) 64%, #bdc5d6); }
.lesson:last-child::before { bottom: 3px; }
.l-time { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; color: #a5adba; font-size: .77rem; font-variant-numeric: tabular-nums; }
.l-time > :first-child { color: #c0c6d1; font-weight: 600; }
.l-name { font-size: 1rem; font-weight: 600; line-height: 1.25; margin: 3px 0; overflow-wrap: anywhere; }
.l-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: .79rem; color: #9da5b3; }
.l-info b { font-weight: 550; color: #d3d8e1; }
.current::before { width: 3px; background: var(--ok); }
.current .l-time > :first-child, .live-tag { color: var(--ok); }
.live-tag { font-weight: 600; }
.past .l-name { color: #aeb4bf; }
.daynav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.day-choice { padding: 7px 12px; font-weight: 550; line-height: 1.2; color: var(--accent); font-size: .84rem; }
.day-choice .date-number { margin-left: 6px; font-weight: 400; }
.day-choice[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.day-choice .abbr { display: none; }
@media (min-width: 641px) {
  .single .lesson { display: grid; grid-template-columns: 134px minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 15px; min-height: 57px; }
  .single .l-time { flex-direction: column; gap: 0; }
  .single .l-info { justify-content: flex-end; }
  .single .lesson:last-child { padding-bottom: 10px; }
  .single .lesson:last-child::before { bottom: 12px; }
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .wrap { padding: 20px 12px max(32px, env(safe-area-inset-bottom)); }
  .top { gap: 8px; align-items: center; padding-bottom: 14px; }
  .clock { font-size: .74rem; gap: 4px; }
  .clock .icon { display: none; }
  .status { margin-top: 14px; padding: 12px 14px; }
  .toolbar { gap: 7px; margin-block: 14px 8px; }
  .week-nav { gap: 6px; }
  #week-range { font-size: .8rem; }
  .week-count, .switch .icon { display: none; }
  .switch button { padding: 6px 8px; }
  .arrow { width: 28px; height: 30px; }
  .daynav { position: sticky; top: 0; z-index: 1; background: var(--bg); margin: 0 -12px 6px; padding: 6px 12px; flex-wrap: nowrap; overflow-x: auto; }
  .day-choice { flex: 1 0 auto; padding: 9px 5px; }
  .day-choice .abbr { display: inline; }
  .day-choice .full { display: none; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .day { padding: 12px; }
  .l-name { font-size: 1.03rem; }
}
/* подвал в стиле pitkadev.ee: лого, реквизиты, большая надпись, срезанная краем */
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(fonts/Geologica.woff2) format("woff2"); }
.foot {
  --f-text: #F2EFE8; --f-soft: #CFCBC2; --f-muted: #9E9B94; --f-line: #2C2D33; --f-accent: #FF8A4C;
  margin-top: auto; background: #16171B; border-top: 1px solid var(--line); color: var(--f-muted);
  font: 14px/1.5 Geologica, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden;
}
.foot-in { max-width: 1120px; margin: 0 auto; padding: clamp(48px, 6vw, 80px) 20px 0; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--f-text); text-decoration: none; font-weight: 700; font-size: 22px; line-height: 1; letter-spacing: -.035em; font-variation-settings: "SHRP" 100; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-frame { fill: none; stroke: var(--f-accent); stroke-width: 2.5; }
.logo-word span { margin-left: .2em; color: var(--f-muted); font-weight: 400; }
.foot-brand p { max-width: 28em; margin: 16px 0 0; }
.foot-brand details { margin-top: 16px; }
.foot-brand summary { width: fit-content; color: var(--f-soft); cursor: pointer; }
.foot-brand details a { color: var(--f-soft); }
.foot .link { display: inline-block; margin-top: 12px; color: var(--f-soft); text-decoration: underline; text-decoration-color: var(--f-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.foot .link:hover { color: var(--f-text); }
.req { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-content: start; }
.req dd { margin: 0; color: var(--f-soft); }
.req a, .foot-bottom a { color: var(--f-soft); text-underline-offset: 3px; }
.req a:hover, .foot-bottom a:hover { color: var(--f-text); text-decoration-color: var(--f-accent); }
.foot-bottom { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--f-line); }
.foot-word { height: .7em; margin: clamp(28px, 4vw, 56px) 0 0; overflow: hidden; color: #6A6A70; font-size: clamp(88px, 20.4vw, 262px); font-weight: 700; line-height: .86; letter-spacing: -.065em; white-space: nowrap; font-variation-settings: "SHRP" 100; user-select: none; }
.foot-word span { margin-left: .08em; font-weight: 300; }
@media (max-width: 640px) {
  .foot-in { padding: 44px 16px 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .req { grid-template-columns: 1fr; gap: 0; }
  .req dd + dt { margin-top: 10px; }
  .foot-bottom { flex-direction: column; }
  .foot-word { font-size: 24vw; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .progress span { transition: none; } }
@media print {
  @page { margin: 11mm; }
  :root { color-scheme: light; --bg: white; --panel: white; --ink: black; --muted: #444; --line: #bbb; }
  html, body { background: white; min-height: auto; display: block; }
  .wrap { padding: 0; max-width: none; }
  .clock, .status, .foot, .skip, .switch, .arrow, .back, .daynav, .day-share, .open-day .icon, .live-tag { display: none !important; }
  .top { padding-bottom: 8px; }
  .toolbar { margin: 8px 0; }
  .week-count { display: inline; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .day { padding: 6px 8px; break-inside: avoid; }
  .day-head { padding-bottom: 4px; }
  .day-meta, .l-time { font-size: 8pt; }
  .lesson { padding: 3px 0 3px 6px; }
  .lesson::before { display: none; }
  .l-name { margin: 1px 0; font-size: 9pt; }
  .l-info { font-size: 8pt; }
  .l-time, .l-time > :first-child, .current .l-time > :first-child, .l-info, .l-info b, .past .l-name { color: #333; }
  .single .lesson { min-height: 0; padding: 6px; }
  .single .l-info { justify-content: flex-start; }
}
