/* =====================================================================
   .NET Evenings · design system
   Палитра и геометрия в духе innowise.com: белый фон, почти чёрный текст,
   красный акцент #C63031, прямые углы, тонкие линии, пастельная сетка в хиро.
   ===================================================================== */

:root {
  --font-sans: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Manrope Variable', 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono Variable', ui-monospace, 'Cascadia Code', Consolas, 'Courier New', monospace;

  --bg: #ffffff;
  --surface: #f5f5f7;
  --surface-2: #ebebee;
  --ink: #191b1d;
  --ink-2: #333333;
  --ink-3: #5f6368;
  --ink-4: #9a9ea3;
  --line: #e3e5e8;
  --line-2: #c4c4c4;

  --red: #c63031;
  --red-600: #a9272a;
  --red-700: #8d1f22;
  --red-50: #fbeaea;
  --red-100: #f5d2d2;

  --green: #1f8a4c;
  --green-50: #e6f4ec;
  --amber: #b26a00;
  --amber-50: #fff3df;
  --blue: #2e5aac;
  --blue-50: #e9effb;
  --violet: #6b4fbb;
  --violet-50: #efeaff;

  --radius: 0px;
  --radius-sm: 2px;
  --shadow-1: 0 1px 2px rgba(25, 27, 29, .06), 0 12px 32px -16px rgba(25, 27, 29, .18);
  --shadow-2: 0 2px 4px rgba(25, 27, 29, .06), 0 24px 56px -24px rgba(25, 27, 29, .28);

  --container: 1200px;
  --header-h: 72px;

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-sans);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--font-mono); }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1:focus, h1:focus-visible { outline: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 820px; }
.container--wide { max-width: 1400px; }
.page { min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; }
.page__body { flex: 1; padding: 0 0 80px; }
.pt { padding-top: 40px; }
.pt-sm { padding-top: 24px; }
.section { padding: 56px 0; }
.section--tight { padding: 32px 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.ml-auto { margin-left: auto; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---------- Typography ---------- */
.display { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; letter-spacing: -0.03em; }
.display em { font-style: normal; color: var(--red); }
.page-title { font-size: clamp(32px, 4vw, 48px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.section-title { font-size: clamp(26px, 3vw, 36px); font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 14px; }
.section-title::before { content: ''; display: inline-block; width: 28px; height: 3px; background: var(--red); transform: translateY(-10px); flex: none; }
.h3 { font-size: 22px; font-weight: 600; }
.h4 { font-size: 17px; font-weight: 600; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow .dot { color: var(--red); }
.lead { font-size: 19px; line-height: 1.5; color: var(--ink-2); }
.kicker { font-size: 14px; color: var(--ink-3); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand__dot { width: 8px; height: 8px; background: var(--red); display: inline-block; transform: translateY(-1px); }
.brand__by { font: 500 12px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav__link { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; font-size: 15px; font-weight: 500; white-space: nowrap; color: var(--ink-2); border-bottom: 2px solid transparent; transition: color .15s; }
.nav__link:hover { color: var(--ink); }
.nav__link.active { color: var(--ink); border-bottom-color: var(--red); }
.nav__link .count { margin-left: 8px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--red); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 4px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; }
.user-chip:hover { background: var(--surface-2); color: var(--ink); }
.user-chip__role { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.logout-form { display: inline; }
.logout-form button { background: none; border: 0; padding: 0 8px; height: 40px; cursor: pointer; color: var(--ink-3); font-size: 14px; }
.logout-form button:hover { color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-3); font-size: 13.5px; }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  font: 500 15px/1 var(--font-sans);
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.btn:hover { color: var(--ink); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-600); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--outline { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); background: #fff; }
.btn--danger { background: var(--red-50); color: var(--red-700); }
.btn--danger:hover { background: var(--red-100); color: var(--red-700); }
.btn--link { background: none; padding: 0; height: auto; color: var(--red); border: 0; }
.btn--link:hover { background: none; color: var(--red-700); text-decoration: underline; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--xs { height: 30px; padding: 0 10px; font-size: 13px; }
.btn--lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .45; pointer-events: none; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-3); }
.icon-btn:hover { color: var(--ink); border-color: var(--ink); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }
.icon-btn--danger:hover { color: var(--red); border-color: var(--red); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field__label { font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--ink-2); }
.field__label .req { color: var(--red); }
.field__hint { font-size: 12.5px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; font: 400 15px/1.45 var(--font-sans);
  padding: 11px 14px; border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(198, 48, 49, .12); }
.input.invalid, .textarea.invalid, .select.invalid { border-color: var(--red); }
.input--code { font-family: var(--font-mono); font-size: 14px; }
.input--big { font-size: 28px; letter-spacing: .35em; text-align: center; font-family: var(--font-mono); padding: 14px; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.textarea--mono { font-family: var(--font-mono); font-size: 13.5px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23191b1d' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--red); flex: none; cursor: pointer; }
.check--boxed { padding: 12px 14px; border: 1px solid var(--line); background: #fff; transition: border-color .15s, background .15s; }
.check--boxed:hover { border-color: var(--line-2); }
.check--boxed.is-on { border-color: var(--ink); background: var(--surface); }
.validation-message { color: var(--red); font-size: 13px; }
.validation-errors { margin: 0 0 16px; padding: 12px 16px; list-style: none; background: var(--red-50); color: var(--red-700); font-size: 14px; border-left: 3px solid var(--red); }
.validation-errors li + li { margin-top: 4px; }
.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 500; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track { width: 40px; height: 22px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.toggle__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; transition: transform .15s; }
.toggle input:checked + .toggle__track { background: var(--red); }
.toggle input:checked + .toggle__track::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Badges & pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; background: currentColor; }
.badge--plain::before { display: none; }
.lvl-beginner { color: var(--green); background: var(--green-50); }
.lvl-intermediate { color: var(--amber); background: var(--amber-50); }
.lvl-advanced { color: var(--red); background: var(--red-50); }
.lvl-all { color: var(--blue); background: var(--blue-50); }
.lvl-movie { color: var(--violet); background: var(--violet-50); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface); color: var(--ink-2); }
.pill--outline { background: #fff; border: 1px solid var(--line-2); }
.st-draft { background: var(--surface); color: var(--ink-3); }
.st-submitted { background: var(--amber-50); color: var(--amber); }
.st-accepted { background: var(--green-50); color: var(--green); }
.st-rework { background: var(--red-50); color: var(--red); }
.pill--red { background: var(--red); color: #fff; }
.pill--dark { background: var(--ink); color: #fff; }
.points { display: inline-flex; align-items: baseline; gap: 3px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.points small { font-weight: 500; color: var(--ink-4); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; font-size: 12px; font-weight: 500; color: var(--ink-3); border: 1px solid var(--line); background: #fff; }

/* ---------- Avatar ---------- */
.avatar { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 var(--font-display); color: #fff; letter-spacing: .02em; flex: none; }
.avatar--lg { width: 48px; height: 48px; font-size: 16px; }
.avatar--sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar--xl { width: 64px; height: 64px; font-size: 22px; }
.speaker { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.speaker__name { white-space: nowrap; }

/* ---------- Cards ---------- */
.card { background: var(--surface); padding: 24px; }
.card--white { background: #fff; border: 1px solid var(--line); }
.card--pad-lg { padding: 32px; }
.card--accent { border-top: 3px solid var(--red); }
.card--dark { background: var(--ink); color: #fff; }
.card--dark .muted { color: rgba(255, 255, 255, .6); }
.card__title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.card-link { display: block; transition: background .15s; }
.card-link:hover { background: var(--surface-2); color: inherit; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 16px; border-left: 3px solid var(--ink); background: var(--surface); font-size: 14.5px; margin-bottom: 20px; }
.alert--error { border-color: var(--red); background: var(--red-50); color: var(--red-700); }
.alert--success { border-color: var(--green); background: var(--green-50); color: #155f36; }
.alert--info { border-color: var(--blue); background: var(--blue-50); color: #203f7a; }
.alert--warn { border-color: var(--amber); background: var(--amber-50); color: #6f4300; }
.alert p:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--ink); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: var(--surface); }
.table .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table--compact td { padding: 10px 12px; }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 80px 24px; max-width: 520px; margin: 0 auto; }
.empty-state__code { font-family: var(--font-display); font-size: 96px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--surface-2); margin-bottom: 8px; }
.empty-state__title { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.empty-state__text { color: var(--ink-3); margin-bottom: 28px; }
.empty-state__meta { font-size: 13px; color: var(--ink-4); }
.empty { padding: 48px 24px; text-align: center; color: var(--ink-3); background: var(--surface); }
.empty strong { color: var(--ink); display: block; font-size: 18px; margin-bottom: 6px; font-family: var(--font-display); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 64px; border-bottom: 1px solid var(--line); }
.hero__mesh { position: absolute; inset: -20%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(42% 46% at 82% 18%, rgba(190, 210, 255, .95) 0%, rgba(190, 210, 255, 0) 70%),
    radial-gradient(38% 42% at 66% 88%, rgba(255, 205, 216, .9) 0%, rgba(255, 205, 216, 0) 70%),
    radial-gradient(34% 38% at 8% 86%, rgba(204, 244, 228, .95) 0%, rgba(204, 244, 228, 0) 70%),
    radial-gradient(30% 34% at 30% 10%, rgba(255, 236, 200, .8) 0%, rgba(255, 236, 200, 0) 70%);
  filter: blur(30px); }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr); gap: 48px; align-items: center; }
.hero__text .display { margin: 18px 0 22px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero__meta { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__value { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.stat__label { font-size: 13px; color: var(--ink-3); }

/* Карточка ближайшего занятия */
.next-card { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-2); padding: 28px; position: relative; }
.next-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--red); }
.next-card__date { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 14px; }
.next-card__day { font-family: var(--font-display); font-size: 64px; font-weight: 800; letter-spacing: -0.05em; line-height: .9; }
.next-card__month { font-size: 15px; color: var(--ink-3); line-height: 1.3; }
.next-card__title { font-size: 22px; font-weight: 600; margin-bottom: 14px; line-height: 1.25; }
.next-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.countdown { font-size: 13px; color: var(--ink-3); }
.countdown strong { color: var(--ink); font-weight: 600; }

/* ---------- Filters ---------- */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 28px 0 8px; }
.chip { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink-2); transition: all .15s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-4); }
.chip.is-active .n { color: rgba(255, 255, 255, .6); }
.filters__spacer { flex: 1; }

/* ---------- Timeline / schedule ---------- */
.month { margin-top: 40px; }
.month__title { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.month__title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.session { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 20px 16px; margin: 0 -16px; border-bottom: 1px solid var(--line); transition: background .15s; position: relative; }
.session:hover { background: var(--surface); }
.session.is-past { opacity: .55; }
.session.is-past:hover { opacity: .85; }
.session.is-next { background: linear-gradient(90deg, rgba(198, 48, 49, .06), transparent 60%); }
.session.is-next::before { content: ''; position: absolute; left: 0; top: 0; bottom: -1px; width: 3px; background: var(--red); }
.session.is-movie .session__title { color: var(--ink-2); font-weight: 500; }
.session__date { display: flex; flex-direction: column; line-height: 1; }
.session__day { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.04em; }
.session__wd { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.session__main { min-width: 0; }
.session__title { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; display: block; }
.session__title:hover { color: var(--red); }
.session__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.session__hw { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); }
.session__actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.session__next-tag { position: absolute; top: -1px; right: 16px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; }
.film-icon { width: 18px; height: 18px; color: var(--violet); }

/* ---------- Speakers ---------- */
.speakers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.speaker-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); }
.speaker-card__name { font-weight: 600; }
.speaker-card__count { font-size: 13px; color: var(--ink-3); }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.page-head__text { max-width: 760px; }
.page-head .eyebrow { margin-bottom: 10px; }
.page-head .lead { margin: 12px 0 0; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.breadcrumbs { display: flex; gap: 8px; font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs span::before { content: '/'; margin-right: 8px; color: var(--line-2); }

/* ---------- Lecture page ---------- */
.lecture-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.lecture-aside { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fact { background: #fff; padding: 16px; }
.fact__label { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.fact__value { font-weight: 600; font-size: 15px; }
.notes-box { border: 1px dashed var(--line-2); padding: 16px; font-size: 14px; color: var(--ink-2); background: #fffdf7; }

/* ---------- Markdown ---------- */
.md { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .9em; }
.md .md-h { color: var(--ink); margin: 1.4em 0 .5em; }
.md h1.md-h { font-size: 26px; } .md h2.md-h { font-size: 22px; } .md h3.md-h { font-size: 18px; } .md h4.md-h, .md h5.md-h, .md h6.md-h { font-size: 16px; }
.md ul.md-list, .md ol.md-list { margin: 0 0 .9em; padding-left: 1.4em; }
.md li { margin: .25em 0; }
.md li.md-task { list-style: none; margin-left: -1.4em; display: flex; gap: 8px; align-items: flex-start; }
.md li.md-task input { margin-top: 5px; accent-color: var(--red); }
.md .md-inline-code { font-size: .9em; padding: 2px 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.md .md-code { margin: 0 0 1em; padding: 16px 18px; background: #1b1d21; color: #e8eaed; font-size: 13.5px; line-height: 1.55; overflow-x: auto; position: relative; border-left: 3px solid var(--red); }
.md .md-code code { font-family: var(--font-mono); white-space: pre; }
.md .md-code[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 12px; font: 600 10.5px/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.md .md-quote { margin: 0 0 1em; padding: 4px 18px; border-left: 3px solid var(--red); color: var(--ink-3); }
.md .md-quote p:last-child { margin-bottom: 0; }
.md .md-hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.md .md-table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 14px; }
.md .md-table th, .md .md-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.md .md-table th { background: var(--surface); font-weight: 600; }
.md a { color: var(--red); text-decoration: underline; text-decoration-color: rgba(198, 48, 49, .35); text-underline-offset: 2px; }
.md a:hover { text-decoration-color: var(--red); }
.md strong { color: var(--ink); }
.md--sm { font-size: 14.5px; }

/* ---------- Homework: tasks ---------- */
.hw-head { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; margin-bottom: 36px; }
.hw-summary { background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--header-h) + 24px); }
.hw-summary__row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 8px; }
.hw-summary__row span:first-child { color: var(--ink-3); }
.progress { height: 6px; background: var(--surface-2); position: relative; overflow: hidden; }
.progress__bar { position: absolute; inset: 0 auto 0 0; background: var(--red); transition: width .3s; }
.progress--md { height: 10px; }
.progress--lg { height: 14px; }

/* ---------- Прогресс по курсу (кабинет) ---------- */
.course-progress { background: var(--ink); color: #fff; padding: 26px 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: end; margin-bottom: 32px; }
.course-progress__title { font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 10px; }
.course-progress__value { font-family: var(--font-display); font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.course-progress__value small { font-size: 18px; font-weight: 500; color: rgba(255,255,255,.6); letter-spacing: 0; }
.course-progress .progress { background: rgba(255,255,255,.14); margin-top: 16px; }
.course-progress__facts { display: flex; gap: 24px; flex-wrap: wrap; font-size: 13.5px; color: rgba(255,255,255,.75); margin-top: 14px; }
.course-progress__facts b { color: #fff; font-weight: 600; }
.course-progress__rank { text-align: right; }
.course-progress__rank a { color: #fff; }
.course-progress__rank .num { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1; }

/* ---------- Рейтинг ---------- */
.leaderboard__rank { font-size: 18px; width: 64px; }
.leaderboard tr.is-me td { background: var(--red-50); }
.leaderboard tr.is-top-1 .leaderboard__rank, .leaderboard tr.is-top-2 .leaderboard__rank, .leaderboard tr.is-top-3 .leaderboard__rank { font-size: 22px; }

/* ---------- Обсуждение сдачи ---------- */
.discussion { margin-top: 40px; border-top: 2px solid var(--ink); padding-top: 24px; }
.discussion__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.discussion__empty { padding: 20px 22px; background: var(--surface); color: var(--ink-3); font-size: 14.5px; }
.discussion__list { display: flex; flex-direction: column; gap: 14px; }
.comment { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; }
.comment__body { background: var(--surface); padding: 12px 16px 10px; border-left: 3px solid var(--line-2); min-width: 0; }
.comment--reviewer .comment__body { border-left-color: var(--red); background: #fff8f8; }
.comment--mine .comment__body { border-left-color: var(--ink); }
.comment__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; margin-bottom: 6px; }
.comment__author { font-weight: 700; }
.comment__anchor { font-size: 12px; font-weight: 600; color: var(--red); background: #fff; border: 1px solid var(--red-100); padding: 1px 8px; white-space: nowrap; }
.comment__quote { display: block; font-size: 13px; color: var(--ink-2); border-left: 2px solid var(--line-2); padding: 2px 10px; margin: 0 0 8px; background: #fff; }
.comment__actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--ink-3); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }
.link-btn--danger { color: var(--red); }
.discussion__composer { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.composer__reply { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 13.5px; background: var(--surface); padding: 8px 12px; border-left: 3px solid var(--ink); }
.composer__bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.comment__count { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.comment__count.is-fresh { color: var(--red); font-weight: 600; }

/* ---------- Предпросмотр ДЗ глазами студента ---------- */
.preview-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--amber-50); border-left: 3px solid var(--amber); padding: 12px 16px; margin-bottom: 24px; font-size: 14.5px; color: #6f4300; }
.preview-banner .ml-auto { margin-left: auto; }
.stat-bar { display: flex; height: 10px; background: var(--surface-2); overflow: hidden; }
.stat-bar span { display: block; height: 100%; }
.stat-bar .ok { background: var(--green); }
.stat-bar .wait { background: var(--amber); }
.stat-bar .rework { background: var(--red); }
.task { background: #fff; border: 1px solid var(--line); margin-bottom: 20px; transition: border-color .15s; scroll-margin-top: 90px; }
.task:hover { border-color: var(--line-2); }
.task.is-text { border: 0; background: var(--surface); }
.task.is-done { border-color: var(--line); }
.task__head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.task.is-text .task__head { border-bottom: 0; padding-bottom: 8px; }
.task__num { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font: 700 14px/1 var(--font-display); }
.task.is-done .task__num { background: var(--green); }
.task__num--text { background: var(--surface-2); color: var(--ink-3); }
.task__titles { flex: 1; min-width: 0; }
.task__title { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.3; }
.task__sub { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.task__body { padding: 22px 24px 24px; }
.task__answer { margin-top: 20px; }
.task__answer-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.task__answer-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.options { display: flex; flex-direction: column; gap: 8px; }
.option { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; font-size: 15px; }
.option:hover { border-color: var(--line-2); }
.option.is-on { border-color: var(--ink); background: var(--surface); }
.option input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--red); flex: none; cursor: pointer; }
.option.is-correct { border-color: var(--green); background: var(--green-50); }
.option.is-wrong { border-color: var(--red); background: var(--red-50); }
.option.is-readonly { cursor: default; }
.option__mark { margin-left: auto; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.option.is-correct .option__mark { color: var(--green); }
.option.is-wrong .option__mark { color: var(--red); }
.answer-ro { padding: 14px 16px; background: var(--surface); white-space: pre-wrap; font-size: 15px; line-height: 1.55; }
.answer-ro--empty { color: var(--ink-4); font-style: italic; }
.answer-ro a { color: var(--red); text-decoration: underline; word-break: break-all; }
.code-editor { border: 1px solid var(--line-2); background: #fff; position: relative; }
.code-editor__bar { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.code-editor__bar .lang { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.code-editor__host { width: 100%; }
.code-editor__loading { position: absolute; inset: 36px 0 0; display: flex; align-items: center; justify-content: center; color: var(--ink-4); font-size: 13px; background: #fff; }
.review-box { margin-top: 20px; padding: 18px 20px; background: #fff8f8; border: 1px solid var(--red-100); }
.review-box__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.review-box--neutral { background: var(--surface); border-color: var(--line); }
.review-box--neutral .review-box__head { color: var(--ink-3); }
.review-box--top { margin: 0 0 20px; }
.review-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: start; }
.score-input { display: flex; align-items: center; gap: 8px; }
.score-input .input { width: 80px; text-align: center; font-family: var(--font-mono); }
.autocheck { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.autocheck--ok { color: var(--green); }
.autocheck--bad { color: var(--red); }
.sticky-bar { position: sticky; bottom: 0; z-index: 10; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 16px 0; margin-top: 24px; }
.sticky-bar__inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.save-state { font-size: 13px; color: var(--ink-3); }
.save-state.is-saving { color: var(--amber); }
.save-state.is-saved { color: var(--green); }
.verdict { display: grid; grid-template-columns: 1fr; gap: 8px; }
.verdict__opt { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line-2); cursor: pointer; font-weight: 600; background: #fff; transition: all .15s; white-space: nowrap; }
.verdict__opt:hover { border-color: var(--ink); }
.verdict__opt input { accent-color: var(--red); }
.verdict__opt.is-on.ok { border-color: var(--green); background: var(--green-50); color: var(--green); }
.verdict__opt.is-on.rework { border-color: var(--red); background: var(--red-50); color: var(--red); }
.timeline { border-left: 2px solid var(--line); padding-left: 20px; display: flex; flex-direction: column; gap: 18px; }
.timeline__item { position: relative; }
.timeline__item::before { content: ''; position: absolute; left: -26px; top: 6px; width: 10px; height: 10px; background: var(--ink); }
.timeline__item.ok::before { background: var(--green); }
.timeline__item.rework::before { background: var(--red); }
.timeline__meta { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }

/* ---------- Admin: builder ---------- */
.builder { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; align-items: start; }
.builder__list { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; padding-right: 4px; }
.block-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 12px; background: #fff; border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; text-align: left; width: 100%; }
.block-item:hover { border-color: var(--line-2); }
.block-item.is-active { border-color: var(--ink); background: var(--surface); }
.block-item__num { font: 700 12px/1 var(--font-mono); color: var(--ink-4); }
.block-item__title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-item__type { font-size: 12px; color: var(--ink-3); }
.block-item__tools { display: flex; gap: 4px; }
.add-block { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 8px; }
.add-block button { height: 34px; font-size: 12.5px; padding: 0 8px; }
.editor-pane { background: #fff; border: 1px solid var(--line); padding: 28px; }
.editor-pane__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.option-editor { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.option-editor .input { flex: 1; }
.option-editor label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.preview-box { border: 1px dashed var(--line-2); padding: 16px 18px; background: var(--surface); }
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.admin-row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.kpi { background: var(--surface); padding: 18px 20px; }
.kpi__value { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.kpi__label { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.kpi--red .kpi__value { color: var(--red); }

/* ---------- Auth layout ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth__brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 56px; background: var(--surface); }
.auth__brand .hero__mesh { opacity: .95; }
.auth__brand > :not(.hero__mesh) { position: relative; z-index: 1; }
.auth__statement { font-family: var(--font-display); font-size: clamp(32px, 3.6vw, 52px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; max-width: 14ch; }
.auth__statement em { font-style: normal; color: var(--red); }
.auth__bullets { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; color: var(--ink-2); font-size: 15px; }
.auth__bullets div::before { content: '—'; color: var(--red); margin-right: 10px; }
.auth__panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth__form { width: 100%; max-width: 420px; }
.auth__form .page-title { font-size: 34px; margin-bottom: 8px; }
.auth__form .lead { font-size: 15.5px; margin-bottom: 28px; color: var(--ink-3); }
.auth__alt { margin-top: 24px; font-size: 14px; color: var(--ink-3); display: flex; flex-direction: column; gap: 8px; }
.auth__alt a { color: var(--red); font-weight: 500; }
.code-boxes { display: flex; gap: 10px; }

/* ---------- Dev outbox ---------- */
.mail { border: 1px solid var(--line); margin-bottom: 16px; }
.mail__head { padding: 12px 16px; background: var(--surface); font-size: 13.5px; display: flex; gap: 16px; flex-wrap: wrap; }
.mail__body { padding: 16px; white-space: pre-wrap; font-family: var(--font-mono); font-size: 13px; }
.mail__code { font-family: var(--font-mono); font-size: 28px; letter-spacing: .3em; font-weight: 700; padding: 10px 16px; background: var(--ink); color: #fff; display: inline-block; margin-top: 8px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(25, 27, 29, .5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .15s ease-out; }
.modal { background: #fff; width: 100%; max-width: 480px; padding: 28px; box-shadow: var(--shadow-2); border-top: 3px solid var(--red); animation: rise .18s ease-out; }
.modal__title { font-size: 22px; margin-bottom: 10px; }
.modal__text { color: var(--ink-2); margin-bottom: 24px; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 120; background: var(--ink); color: #fff; padding: 12px 18px; font-size: 14px; box-shadow: var(--shadow-2); animation: rise .2s ease-out; display: flex; gap: 12px; align-items: center; }
.toast.is-error { background: var(--red); }
.toast.is-success { background: var(--green); }

/* ---------- Blazor bits ---------- */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; background: var(--amber-50); color: #6f4300; border-top: 2px solid var(--amber); padding: 12px 24px; font-size: 14px; }
#blazor-error-ui .reload { color: var(--red); font-weight: 600; margin-left: 8px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
.loading { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 14px; padding: 24px 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; height: 14px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .lecture-grid { grid-template-columns: 1fr; }
  .lecture-aside { position: static; }
  .hw-head { grid-template-columns: 1fr; }
  .hw-summary { position: static; }
  .builder { grid-template-columns: 1fr; }
  .builder__list { position: static; max-height: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__brand { display: none; }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .container { padding: 0 16px; }
  .site-header__inner { gap: 12px; }
  .nav { display: none; }
  .brand__by { display: none; }
  .brand { font-size: 19px; }
  .hero { padding: 44px 0 40px; }
  .session { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 16px 8px; margin: 0 -8px; }
  .session__actions { grid-column: 2; justify-content: flex-start; }
  .session__day { font-size: 28px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .course-progress { grid-template-columns: 1fr; padding: 20px; }
  .course-progress__rank { text-align: left; }
  .hide-sm { display: none; }
  .review-row { grid-template-columns: 1fr; }
  .verdict { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .page-head { margin-bottom: 24px; }
  .task__head, .task__body { padding-left: 16px; padding-right: 16px; }
  .editor-pane { padding: 18px; }
  .next-card__day { font-size: 52px; }
}
@media print {
  .site-header, .site-footer, .sticky-bar, .btn { display: none !important; }
}
