/* Gestione anestesiologica in chirurgia ortopedica e vascolare — one system, colours from the event brochure. */
:root {
  --paper: #f3f7fc;
  --surface: #ffffff;
  --surface-2: #e7eff9;
  --ink: #0d1b33;
  --ink-2: #2d3b55;
  --muted: #56647e;
  --line: #d4dfed;
  --brand: #0b2f6b;
  --brand-ink: #ffffff;
  --on-brand: #ffffff;
  --accent: #1667b3;
  --accent-ink: #ffffff;
  --sky: #2a93d5;
  --sky-soft: #dcebf8;
  --signal: #b4501a;
  --signal-soft: #fbe6d8;
  --danger: #a1261b;
  --focus: #1667b3;

  --display: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 2px rgb(11 47 107 / .06), 0 10px 28px -14px rgb(11 47 107 / .28);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a1424; --surface: #101d33; --surface-2: #172742; --ink: #e9f0fa; --ink-2: #c4d0e2; --muted: #93a2bb;
    --line: #22355a; --brand: #0b2f6b; --accent: #6db7ee; --accent-ink: #061427; --sky: #6db7ee; --sky-soft: #132e52;
    --signal: #f39a63; --signal-soft: #3a2314; --danger: #f2877c; --focus: #6db7ee;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 28px -14px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, video, iframe { max-width: 100%; display: block; }
svg { flex: none; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: .002em; line-height: 1.02; margin: 0; text-wrap: balance; }
h3 { font: 600 1.1rem/1.3 var(--sans); margin: 0; }
p { margin: 0; }
small { font-size: .82em; }
figure { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.strong { font-weight: 600; text-decoration: none; }
.strong:hover { text-decoration: underline; }
.inline { display: inline; margin: 0; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; text-decoration: none; min-height: 44px; }
.text-link svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font: 700 1.2rem/1.1 var(--display); text-transform: uppercase; color: var(--brand); letter-spacing: .01em; }
.brand-text small { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a, .nav .linkbtn { padding: 8px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-size: .94rem; font-weight: 500; transition: background .15s, color .15s; min-height: 44px; display: inline-flex; align-items: center; }
.nav > a:hover, .nav .linkbtn:hover { background: var(--surface-2); color: var(--ink); }
.nav > a.on { color: var(--brand); box-shadow: inset 0 -3px 0 var(--sky); border-radius: 0; }
.nav .btn { margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--brand); border-radius: 999px; background: var(--brand); color: var(--brand-ink);
  font: 600 .95rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .15s, background .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgb(11 47 107 / .7); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1rem; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .86rem; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--sky-soft); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.linkbtn:hover { text-decoration-color: currentColor; }
.danger-text { color: var(--danger); }
.icon-btn { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); cursor: pointer; color: var(--ink-2); transition: background .15s, transform .15s; }
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }

/* ---------- Common bits ---------- */
.eyebrow { font: 500 .74rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 16px; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.18rem); color: var(--ink-2); max-width: 62ch; margin-top: 18px; }
.body-text { color: var(--ink-2); max-width: 64ch; margin-top: 16px; }
.meta-line { font: 400 .86rem/1.5 var(--mono); color: var(--muted); margin-top: 14px; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 6px; background: var(--brand); color: #fff; font: 700 .9rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.chip-fsc { background: var(--sky); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 500 .74rem/1 var(--mono); white-space: nowrap; }
.pill svg { width: 14px; height: 14px; }
.pill-slide { background: var(--sky-soft); color: var(--accent); }
.pill-video { background: var(--signal-soft); color: var(--signal); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.section-label { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-bottom: 20px; }
.section-label.spaced { margin-top: 56px; }
.empty { border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 40px 24px; text-align: center; display: grid; gap: 6px; justify-items: center; color: var(--muted); background: var(--surface); }
.empty strong { color: var(--ink); font: 700 1.4rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.empty .btn { margin-top: 12px; }
.notice { padding: 16px; border-radius: var(--r); background: var(--surface-2); }
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 .78rem/1 var(--mono); color: var(--muted); white-space: nowrap; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-on { color: var(--accent); }
.status-on::before { background: var(--sky); }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%); }
.hero-grid { min-height: min(calc(100svh - 68px), 860px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-top: 56px; padding-bottom: 56px; }
.display { font-size: clamp(2.8rem, 6.4vw, 5.6rem); line-height: .94; text-transform: uppercase; color: var(--brand); letter-spacing: -.005em; }
.display span { display: block; }
.display-accent { color: var(--sky); }
.hero-date { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; padding: 10px 22px 10px 14px; border-radius: 999px; background: var(--brand); color: #fff; }
.hero-date svg { width: 28px; height: 28px; }
.hero-date strong { font: 700 1.5rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; margin-right: 8px; }
.hero-date em { font-style: normal; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.hero-venue { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-weight: 600; color: var(--brand); text-transform: uppercase; font-size: .92rem; letter-spacing: .02em; }
.hero-venue svg { width: 24px; height: 24px; color: var(--brand); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-art { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1172 / 703; background: var(--brand); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
[data-enter] { animation: enter .8s var(--ease) both; }
.hero-art[data-enter] { animation-delay: .12s; }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Blocks ---------- */
.block { padding: clamp(64px, 9vw, 112px) 0; }
.block-tight { padding: 40px 0 88px; }
.block-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.block-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 36px; }
.block-head h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); text-transform: uppercase; color: var(--brand); }
.block-head p { color: var(--muted); max-width: 52ch; }
.block-head .section-label { margin-bottom: 0; text-transform: none; color: var(--ink); font-size: clamp(1.6rem, 2.6vw, 2rem); }
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-head h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); max-width: 24ch; text-transform: uppercase; color: var(--brand); }
.page-head-tight { padding-top: 36px; }
.page-head-tight h1 { font-size: clamp(2rem, 4vw, 3.2rem); text-transform: none; }

/* Hub: the five sections of the course */
.hub { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hub-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; min-height: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.hub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--sky) 45%, var(--line)); }
.hub-main { grid-row: span 2; background: var(--brand); color: #fff; border-color: var(--brand); justify-content: flex-end; }
.hub-main .hub-text { color: rgb(255 255 255 / .82); }
.hub-main .hub-count { color: #fff; border-color: rgb(255 255 255 / .3); }
.hub-main .hub-ic { background: rgb(255 255 255 / .12); color: #fff; width: 64px; height: 64px; }
.hub-main .hub-ic svg { width: 32px; height: 32px; }
.hub-main .hub-title { font-size: 2.6rem; }
.hub-ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--sky-soft); color: var(--brand); }
.hub-ic svg { width: 26px; height: 26px; }
.hub-title { font: 700 1.6rem/1 var(--display); text-transform: uppercase; letter-spacing: .01em; margin-top: auto; }
.hub-text { color: var(--ink-2); font-size: .93rem; }
.hub-count { font: 500 .78rem/1 var(--mono); color: var(--accent); padding-top: 12px; border-top: 1px solid var(--line); }
.hub-card:nth-child(2) { grid-column: 2 / span 2; }
.hub-card:nth-child(5) { grid-column: 3 / span 2; }

/* Sessions overview */
.session-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.session-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto 32px; gap: 24px; align-items: center; padding: 26px 8px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s var(--ease); }
.session-row:hover { background: var(--paper); }
.session-when { display: grid; gap: 4px; font: 400 .85rem/1.3 var(--mono); color: var(--muted); }
.session-when strong { font: 700 1.3rem/1 var(--display); text-transform: uppercase; color: var(--brand); letter-spacing: .02em; }
.session-main { display: grid; gap: 8px; justify-items: start; }
.session-title { font: 700 clamp(1.5rem, 2.4vw, 2rem)/1.05 var(--display); text-transform: uppercase; color: var(--ink); letter-spacing: .005em; }
.session-mod { font-size: .9rem; color: var(--ink-2); }
.session-meta { font: 400 .82rem/1.5 var(--mono); color: var(--muted); text-align: right; }
.go { color: var(--sky); display: grid; }
.go svg { width: 24px; height: 24px; transition: transform .2s var(--ease); }
.session-row:hover .go svg { transform: translateX(4px); }

/* Rationale */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); text-transform: uppercase; color: var(--brand); }
.split-art { border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.split-art img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; transition: transform .6s var(--ease); }
.split-art:hover img { transform: scale(1.025); }
.goals { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.goals li { display: grid; gap: 4px; padding: 14px; border-radius: var(--r); background: var(--sky-soft); font-size: .84rem; color: var(--ink-2); }
.goals strong { font: 700 1.3rem/1 var(--display); color: var(--brand); }
.objectives { margin: 56px 0 0; padding: 0; list-style: none; counter-reset: o; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.objectives li { counter-increment: o; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.objectives li::before { content: counter(o, decimal-leading-zero); font: 700 1.4rem/1.1 var(--display); color: var(--sky); }

/* Faculty */
.block-brand { background: var(--brand); color: #fff; }
.block-brand .block-head h2 { color: #fff; }
.block-brand .block-head p { color: rgb(255 255 255 / .75); }
.faculty-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; }
.faculty-roles { display: grid; gap: 32px; align-content: start; }
.faculty-roles h3 { font: 500 .74rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #9fd0f2; margin-bottom: 12px; }
.faculty-roles ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 1.05rem; font-weight: 500; }
.faculty-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.faculty-list li { padding: 14px 0; border-bottom: 1px solid rgb(255 255 255 / .16); font: 600 1.4rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }

/* Info */
.info-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.info-art { border-radius: 24px; overflow: hidden; aspect-ratio: 1166 / 644; box-shadow: var(--shadow); }
.info-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.info-art:hover img { transform: scale(1.025); }
.info-list h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); text-transform: uppercase; color: var(--brand); margin-bottom: 24px; }
.info-list dl { margin: 0 0 28px; display: grid; gap: 0; }
.info-list dl > div { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.info-list dt { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--brand); font-size: .92rem; }
.info-list dt svg { width: 22px; height: 22px; }
.info-list dd { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- Programme ---------- */
.day-jump { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.day-jump a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 14px; border-radius: 999px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; transition: transform .15s var(--ease); }
.day-jump a:hover { transform: translateY(-1px); }
.day-jump svg { width: 22px; height: 22px; }
.day { scroll-margin-top: 80px; }
.day-head { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-radius: var(--r-lg); background: var(--brand); color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); text-transform: uppercase; margin-bottom: 28px; }
.day-head svg { width: 36px; height: 36px; }
.day-head small { display: block; font: 400 .9rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.prog-session { margin-bottom: 40px; }
.prog-session-head { display: grid; gap: 8px; justify-items: start; padding-bottom: 14px; border-bottom: 2px solid var(--brand); }
.prog-session-head h3 { font: 700 clamp(1.4rem, 2.4vw, 1.8rem)/1.05 var(--display); text-transform: uppercase; color: var(--brand); }
.prog-session-head h3 a { text-decoration: none; }
.prog-session-head h3 a:hover { text-decoration: underline; }
.prog-mod { color: var(--accent); font-weight: 500; font-size: .93rem; }
.prog-list { list-style: none; margin: 0; padding: 0; }
.prog-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 16px 10px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s var(--ease); }
a.prog-row:hover { background: var(--surface); }
a.prog-row:hover .prog-title { color: var(--accent); }
.prog-time { font: 500 .86rem/1.3 var(--mono); color: var(--muted); white-space: nowrap; }
.prog-body { display: grid; gap: 4px; }
.prog-title { font-weight: 500; color: var(--ink); transition: color .15s; }
.prog-speaker { color: var(--accent); font-weight: 600; font-size: .93rem; }
.prog-sum { color: var(--muted); font-size: .88rem; font-style: italic; }
.prog-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.prog-plain .prog-title { color: var(--ink-2); }
.prog-break { background: var(--sky-soft); border-bottom: 0; margin: 6px 0; border-radius: var(--r-sm); grid-template-columns: 132px 1fr; }
.prog-break .prog-time, .prog-break .prog-title { color: var(--brand); font-weight: 600; }
.prog-list-lg .prog-row { padding: 20px 10px; }
.prog-list-lg .prog-title { font-size: 1.08rem; }

/* ---------- Talk page ---------- */
.talk-when { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font: 500 .88rem/1.3 var(--mono); color: var(--muted); margin-bottom: 14px; }
.talk-speaker { margin-top: 14px; font-size: 1.15rem; font-weight: 600; color: var(--accent); }
.talk-jump { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.talk-jump a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .92rem; font-weight: 500; background: var(--paper); transition: border-color .15s, transform .15s var(--ease); }
.talk-jump a:hover { border-color: var(--sky); transform: translateY(-1px); }
.talk-jump svg { width: 18px; height: 18px; color: var(--accent); }
.talk-jump b { font: 600 .75rem/1 var(--mono); background: var(--sky-soft); color: var(--accent); padding: 4px 7px; border-radius: 999px; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; padding-top: 48px; padding-bottom: 96px; align-items: start; }
.talk-sec { margin-bottom: 56px; scroll-margin-top: 96px; }
.pdf-frame { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); margin-bottom: 16px; }
.pdf-frame iframe { width: 100%; height: 100%; border: 0; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.player video, .player iframe { width: 100%; height: 100%; border: 0; }
.player-sm { max-width: 560px; }
.player-wait img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.player-wait span { position: absolute; inset: auto 16px 16px 16px; display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; }
.player-wait svg { width: 28px; height: 28px; }
.lesson-side { position: sticky; top: 92px; display: grid; gap: 16px; }
.side-box { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: var(--surface); }
.side-h { font: 500 .74rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.mini-prog { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .9rem; }
.mini-prog li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 6px 0; }
.mini-prog span { font: 400 .78rem/1.6 var(--mono); color: var(--muted); }
.mini-prog a { text-decoration: none; color: var(--ink-2); }
.mini-prog a:hover { color: var(--accent); }
.mini-prog a[aria-current] { color: var(--brand); font-weight: 600; }
.mini-prog em { color: var(--muted); font-style: normal; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .92rem; }
.toc a { display: block; padding: 6px 0; text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--accent); }
.toc .lv3 a { padding-left: 14px; font-size: .88rem; }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.files a { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.files a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--sky) 45%, var(--line)); }
.file-name { flex: 1; min-width: 0; }
.files strong { display: block; font-weight: 600; line-height: 1.3; }
.files small { color: var(--muted); font-family: var(--mono); }
.file-ext { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: var(--sky-soft); color: var(--brand); font: 700 .78rem/1 var(--mono); }
.file-dl { font-weight: 600; color: var(--accent); font-size: .9rem; }

.prose { font: 400 1.075rem/1.75 var(--serif); color: var(--ink); max-width: 72ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h1, .prose h2 { font: 600 1.6rem/1.2 var(--serif); margin-top: 2em; text-transform: none; color: var(--ink); }
.prose h3 { font: 600 1.25rem/1.3 var(--serif); margin-top: 1.6em; }
.prose .section-label { margin-top: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2rem); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--sky) 30%, var(--line)); background: var(--sky-soft); border-radius: var(--r); font-family: var(--sans); font-size: .95rem; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--brand); color: #e9f0fa; padding: 16px; border-radius: var(--r); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; background: var(--surface-2); }
.prose img { border-radius: var(--r); }
.prose a { color: var(--accent); }

.refs .block-head { margin-bottom: 20px; }
.ref-list { margin: 0; padding: 0 0 0 1.6em; display: grid; gap: 18px; }
.ref::marker { font-family: var(--mono); color: var(--muted); font-size: .85rem; }
.ref-cite { font: 400 1rem/1.55 var(--serif); }
.ref-note { color: var(--ink-2); font-size: .9rem; margin-top: 4px; }
.ref-src { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.ref-actions { display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: .86rem; }
.ref-actions a, .ref-actions .linkbtn { color: var(--accent); min-height: 32px; display: inline-flex; align-items: center; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.pager-link { display: grid; gap: 4px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; background: var(--surface); transition: transform .2s var(--ease), box-shadow .2s; }
.pager-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pager-link span { font: 400 .8rem/1.3 var(--mono); color: var(--muted); }
.pager-link strong { font-weight: 600; line-height: 1.35; }
.pager-next { text-align: right; grid-column: 2; }

/* ---------- Slides, videos, materials ---------- */
.slide-session { margin-bottom: 48px; }
.slide-session-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: clamp(1.4rem, 2.4vw, 1.8rem); text-transform: uppercase; color: var(--brand); padding-bottom: 14px; border-bottom: 2px solid var(--brand); }
.slide-session-h a { text-decoration: none; }
.slide-list { list-style: none; margin: 0; padding: 0; }
.slide-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 16px 10px; border-bottom: 1px solid var(--line); }
.slide-main { display: grid; gap: 2px; text-decoration: none; }
.slide-main strong { font-weight: 500; }
.slide-main span { color: var(--accent); font-weight: 600; font-size: .92rem; }
.slide-main:hover strong { color: var(--accent); }
.slide-files { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.video-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; }
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand); }
.video-thumb img, .video-thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.video-card:hover .video-thumb img, .video-card:hover .video-thumb video { transform: scale(1.03); }
.video-state { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgb(11 47 107 / .88); color: #fff; font-weight: 600; font-size: .88rem; }
.video-state svg { width: 20px; height: 20px; }
.video-meta { display: grid; gap: 6px; padding: 18px 20px 22px; }
.video-meta strong { font-weight: 600; line-height: 1.35; }
.video-meta .muted { font-size: .9rem; }
.mat-group { margin-bottom: 36px; }
.mat-h { display: grid; gap: 4px; font: 600 1.15rem/1.3 var(--sans); margin-bottom: 14px; }
.mat-h a { text-decoration: none; color: var(--brand); }
.mat-h small { font: 400 .82rem/1.3 var(--mono); color: var(--muted); }

/* ---------- Forms ---------- */
.stack { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .lookup label { font-weight: 500; font-size: .92rem; }
.field label small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 140px; }
.field-row .grow { flex: 3 1 240px; }
input:not([type=checkbox]):not([type=file]):not([type=hidden]), textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.mono { font-family: var(--mono) !important; font-size: .9rem !important; }
.check { display: flex; gap: 10px; align-items: center; font-size: .95rem; min-height: 44px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-actions { display: flex; gap: 12px; padding-top: 4px; }
.alert { padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); font-size: .92rem; }
.flash { padding: 12px 16px; border-radius: var(--r-sm); background: var(--sky-soft); color: var(--brand); font-weight: 500; margin-bottom: 20px; }
.filters { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 24px; }
.filters .field { flex: 1 1 220px; }
.filters-export { margin-left: auto; font-size: .9rem; align-self: center; }
.filters-export a { color: var(--accent); }
.search-big { display: flex; gap: 8px; margin-top: 24px; max-width: 680px; }
.search-big input { flex: 1; min-height: 52px !important; }
.search-big .btn { min-height: 52px; }

/* ---------- Auth ---------- */
.auth { min-height: calc(100svh - 68px - 200px); display: grid; place-items: center; padding: 48px var(--gutter); }
.auth-card { width: 100%; max-width: 420px; padding: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); display: grid; gap: 16px; }
.auth-card h1 { font-size: 2.4rem; text-transform: uppercase; color: var(--brand); }

/* ---------- Teacher area ---------- */
[data-area=teacher] .topbar { background: var(--brand); border-bottom-color: var(--brand); backdrop-filter: none; }
[data-area=teacher] .brand-text strong, [data-area=teacher] .nav > a, [data-area=teacher] .nav .linkbtn { color: #fff; }
[data-area=teacher] .brand-text small { color: rgb(255 255 255 / .7); }
[data-area=teacher] .nav > a:hover, [data-area=teacher] .nav .linkbtn:hover { background: rgb(255 255 255 / .1); }
[data-area=teacher] .nav > a.on { box-shadow: inset 0 -3px 0 var(--sky); }
[data-area=teacher] .menu-btn { background: transparent; color: #fff; border-color: rgb(255 255 255 / .3); }
.t-head { padding: 40px 0 24px; }
.t-head-in { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.t-head h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); color: var(--brand); }
.t-head .crumbs { margin-bottom: 10px; }
.t-head .muted { margin-top: 6px; }
.t-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.narrow { max-width: 640px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; margin-bottom: 24px; scroll-margin-top: 140px; }
.panel-h { font: 700 1.6rem/1.1 var(--display); text-transform: uppercase; color: var(--brand); }
.panel-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); display: grid; gap: 12px; justify-items: start; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.panel .table-wrap { border: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th { text-align: left; font: 500 .74rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > a { margin-left: 12px; color: var(--accent); }
.move { display: inline-flex; gap: 4px; }
.t-lessons, .t-refs { margin: 0; padding: 0; list-style: none; display: grid; }
.t-lessons li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.t-lessons li:last-child { border-bottom: 0; }
.t-time { font: 500 .82rem/1 var(--mono); color: var(--muted); margin-right: 10px; }
.t-lesson-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; grid-column: 1; }
.t-lessons .move { grid-column: 2; grid-row: 1 / span 2; }
.t-refs li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; align-items: start; font: 400 .95rem/1.5 var(--serif); }
.t-files { list-style: none; margin: 0; padding: 0; }
.t-files li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.t-files small { display: block; color: var(--muted); font-family: var(--mono); }
.t-file-actions { display: inline-flex; gap: 16px; align-items: center; white-space: nowrap; }
.t-file-actions a { color: var(--accent); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; position: sticky; top: 68px; z-index: 5; background: var(--paper); padding: 10px 0; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--ink-2); min-height: 40px; display: inline-flex; align-items: center; }
.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.editor-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 8px 14px; font: 500 .85rem var(--sans); color: var(--muted); cursor: pointer; min-height: 36px; }
.seg button[aria-selected=true] { background: var(--brand); color: #fff; }
.preview { min-height: 300px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); max-width: none; }
.drop { position: relative; display: grid; place-items: center; min-height: 140px; border: 2px dashed var(--line); border-radius: var(--r-lg); background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; text-align: center; padding: 16px; }
.drop:hover, .drop.over { border-color: var(--sky); background: var(--sky-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-text { display: grid; gap: 4px; pointer-events: none; }
.drop-text small { color: var(--muted); }
.drop-sm { min-height: 96px; }
.upload { display: grid; gap: 14px; justify-items: start; }
.upload .drop, .upload .field-row, .upload .progress { width: 100%; }
.progress { position: relative; height: 28px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress .bar { position: absolute; inset: 0; background: var(--sky); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.progress .pct { position: relative; display: block; text-align: center; font: 500 .8rem/28px var(--mono); color: var(--ink); }
.lookup { padding: 18px; border-radius: var(--r); background: var(--sky-soft); display: grid; gap: 8px; }
.lookup-row { display: flex; gap: 8px; }
.lookup-row input { flex: 1; }

/* ---------- Footer ---------- */
.foot { padding: 48px 0; background: var(--brand); color: #fff; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 32px; font-size: .9rem; }
.foot-brand { display: flex; gap: 16px; align-items: start; }
.foot-brand img { width: 48px; height: 48px; border-radius: 50%; }
.foot p { color: rgb(255 255 255 / .75); margin-top: 6px; max-width: 52ch; }
.foot a { color: #fff; }
.foot-col strong { display: block; }
.foot-links { display: grid; gap: 0 20px; grid-template-columns: repeat(2, auto); align-content: start; }
.foot-links a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav > a, .nav .linkbtn { padding: 8px 9px; font-size: .9rem; }
  .brand-text small { display: none; }
}
@media (max-width: 1080px) {
  .lesson-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lesson-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-main { grid-row: auto; grid-column: 1 / -1; min-height: 200px; }
  .hub-card:nth-child(2), .hub-card:nth-child(5) { grid-column: auto; }
  .hub-card:nth-child(5) { grid-column: 1 / -1; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-links { grid-column: 1 / -1; grid-template-columns: repeat(3, auto); justify-content: start; }
}
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { display: none; position: fixed; inset: 68px 0 0 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 20px var(--gutter); background: var(--surface); overflow-y: auto; }
  [data-area=teacher] .nav { background: var(--brand); }
  .nav.open { display: flex; }
  .nav > a, .nav .linkbtn { min-height: 52px; font-size: 1.15rem; }
  .nav > a.on { box-shadow: inset 3px 0 0 var(--sky); padding-left: 16px; }
  .nav .btn { margin: 8px 0 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 40px; }
  .split, .info-grid, .faculty-grid, .t-grid { grid-template-columns: minmax(0, 1fr); }
  .objectives { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .display { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .hero-date { padding: 10px 18px 10px 12px; }
  .hero-date strong { font-size: 1.25rem; }
  .hero-date em { display: none; }
  .hero-actions .btn { width: 100%; }
  .hub { grid-template-columns: minmax(0, 1fr); }
  .hub-card { min-height: 0; }
  .hub-card:nth-child(5) { grid-column: auto; }
  .session-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 22px 0; }
  .session-when { grid-auto-flow: column; justify-content: start; gap: 12px; align-items: baseline; }
  .session-meta { text-align: left; }
  .go { display: none; }
  .goals { grid-template-columns: minmax(0, 1fr); }
  .faculty-list { grid-template-columns: minmax(0, 1fr); }
  .info-list dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .prog-row, .slide-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 16px 4px; }
  .prog-badges, .slide-files { justify-content: flex-start; }
  .prog-break { grid-template-columns: auto 1fr; padding: 12px; }
  .video-grid { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { grid-column: 1; }
  .panel { padding: 20px; }
  .lookup-row, .search-big { flex-direction: column; }
  .table th:nth-child(4), .table td:nth-child(4), .table th:nth-child(5), .table td:nth-child(5) { display: none; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .foot-links { grid-template-columns: repeat(2, auto); }
  .pdf-frame { aspect-ratio: 3 / 4; }
  .brand-text strong { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .foot, .lesson-side, .pager, .player, .ref-actions, .talk-jump { display: none !important; }
  body { background: #fff; }
  .lesson-grid { display: block; }
}
