/* ===== Отечественная история — К. А. Соловьёв ===== */
:root {
  --ink: #12100d;
  --ink-2: #1c1814;
  --paper: #f4ede1;
  --paper-2: #ebe1cf;
  --gold: #c9a45a;
  --gold-2: #e5c983;
  --red: #a3322a;
  --text: #2a241d;
  --muted: #7b6f60;
  --line: rgba(42, 36, 29, .14);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hdr: 72px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-variant-numeric: lining-nums; font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.muted { color: var(--muted); }
.kicker { font: 600 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }

/* ===== Шапка ===== */
.hdr { position: fixed; inset: 0 0 auto; height: var(--hdr); z-index: 50; display: flex; align-items: center; gap: 24px; padding: 0 clamp(16px, 4vw, 48px); color: var(--paper); transition: background .4s, box-shadow .4s; }
.hdr.solid, body:not(.home) .hdr, .hdr.menu-open { background: rgba(18, 16, 13, .92); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 rgba(201, 164, 90, .18); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; flex: none; box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px rgba(18,16,13,.6), 0 6px 20px rgba(201,164,90,.25); }
.brand-t { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-t b { font: 600 21px/1.1 var(--serif); letter-spacing: .01em; white-space: nowrap; }
.brand-t small { font-size: 12.5px; opacity: .78; letter-spacing: .02em; line-height: 1.3; }
.brand-t small .nw { white-space: nowrap; }
.hdr-nav { display: flex; align-items: center; gap: 6px; }
.hdr-nav a, .mega-btn { font: 500 15px/1 var(--sans); color: inherit; text-decoration: none; padding: 10px 14px; border-radius: 999px; background: none; border: 0; cursor: pointer; transition: background .2s; }
.hdr-nav a:hover, .mega-btn:hover, .hdr-nav a[aria-current] { background: rgba(244, 237, 225, .1); }
.burger { display: none; width: 48px; height: 48px; border: 0; background: rgba(244,237,225,.1); border-radius: 50%; cursor: pointer; position: relative; flex: none; }
.burger span { position: absolute; left: 14px; right: 14px; height: 2px; background: var(--paper); transition: transform .3s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 17px; } .burger span:nth-child(2) { top: 23px; } .burger span:nth-child(3) { top: 29px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mega { position: absolute; top: var(--hdr); left: 0; right: 0; background: rgba(18,16,13,.98); border-top: 1px solid rgba(201,164,90,.2); box-shadow: 0 30px 60px rgba(0,0,0,.4); max-height: calc(100vh - var(--hdr)); max-height: calc(100dvh - var(--hdr)); overflow: auto; overscroll-behavior: contain; }
.mega:not([hidden]) { animation: drop .35s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
.mega-in { max-width: 1280px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 40px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.mega-h { font: 600 22px/1.2 var(--serif); color: var(--gold-2); margin-bottom: 10px; }
.mega-col a { display: block; padding: 6px 0; font-size: 15px; color: rgba(244,237,225,.85); text-decoration: none; line-height: 1.35; }
.mega-col a:hover, .mega-col a[aria-current] { color: var(--gold-2); }
.mega-mobile { display: none; }

/* ===== Кнопки ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; min-height: 50px; border-radius: 999px; font: 600 15px/1.2 var(--sans); letter-spacing: .02em; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s, background .25s; cursor: pointer; border: 0; text-align: center; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--ink); box-shadow: 0 10px 30px rgba(201,164,90,.35); }
.btn-ghost { color: var(--paper); box-shadow: inset 0 0 0 1px rgba(244,237,225,.35); }
.btn-ghost:hover { background: rgba(244,237,225,.08); }

/* ===== Первый экран ===== */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; color: var(--paper); background: var(--ink); overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos); transform: scale(1.08); transform-origin: 50% 0; filter: saturate(.85) contrast(1.05) brightness(.62); animation: kenburns 24s ease-out forwards; }
@keyframes kenburns { to { transform: scale(1); } }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(18,16,13,.9) 0%, rgba(18,16,13,.55) 45%, rgba(18,16,13,.15) 75%), linear-gradient(180deg, rgba(18,16,13,.5), transparent 22%, transparent 62%, var(--ink)); }
.hero-grain { position: absolute; inset: -50%; z-index: -1; opacity: .08; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } 100% { transform: translate(0,0); } }
.hero-in { position: relative; max-width: 1280px; width: 100%; margin: 0 auto; padding: calc(var(--hdr) + 40px) clamp(20px, 5vw, 64px) 80px; }
.hero-k { font: 600 13px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold-2); margin: 0 0 24px; }
.hero-h { font: 600 clamp(52px, 10.5vw, 176px)/.86 var(--serif); letter-spacing: -.02em; margin: 0 0 30px; }
.hero-h .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-h .ln span { display: inline-block; transform: translateY(105%); animation: rise 1.2s var(--ease) forwards; }
.hero-h .ln:nth-child(2) span { animation-delay: .14s; font-style: italic; font-weight: 500; background: linear-gradient(100deg, var(--gold-2) 0%, #fff3d0 45%, var(--gold) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
@keyframes rise { to { transform: none; } }
.hero-sub { font-size: clamp(17px, 1.6vw, 21px); max-width: 560px; color: rgba(244,237,225,.85); margin: 0 0 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-intro { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: rgba(244,237,225,.7); }
.hero-year { position: absolute; right: clamp(-20px, -1vw, 0px); bottom: -.16em; font: 700 clamp(120px, 24vw, 400px)/1 var(--serif); color: transparent; -webkit-text-stroke: 1px rgba(229,201,131,.28); letter-spacing: -.04em; pointer-events: none; user-select: none; z-index: -1; }
.era-credit { position: absolute; right: 16px; bottom: 12px; margin: 0; font-size: 11px; letter-spacing: .03em; color: rgba(244,237,225,.55); z-index: 3; max-width: 60%; text-align: right; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { animation: fadeup 1s var(--ease) forwards; opacity: 0; transform: translateY(18px); transition: none; }
.hero .hero-k { animation-delay: .05s; } .hero .hero-sub { animation-delay: .45s; } .hero .hero-cta { animation-delay: .6s; } .hero .hero-intro { animation-delay: .75s; }
@keyframes fadeup { to { opacity: 1; transform: none; } }

/* ===== Чипы лекций ===== */
.chip { display: inline-flex; flex-direction: column; gap: 3px; max-width: 340px; padding: 10px 16px 11px; border-radius: 14px; text-decoration: none; background: rgba(18,16,13,.6); box-shadow: inset 0 0 0 1px rgba(229,201,131,.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .25s, box-shadow .25s, transform .25s var(--ease); color: var(--paper); }
.chip:hover { background: rgba(201,164,90,.22); box-shadow: inset 0 0 0 1px var(--gold-2); transform: translateY(-2px); }
.chip-k { font: 700 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.chip-t { font-size: 14px; line-height: 1.3; }
.chip-t::after { content: ' ↓'; color: var(--gold-2); }

/* ===== Лента времени: листается кнопками, ползунком и свайпом ===== */
.tl { position: relative; background: var(--ink); color: var(--paper); scroll-margin-top: var(--hdr); }
.tl-view { position: relative; height: calc(100vh - var(--hdr) - 112px); height: calc(100svh - var(--hdr) - 112px); min-height: 520px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tl-track { display: flex; height: 100%; width: calc(var(--n) * 100%); transform: translate3d(calc(var(--i, 0) * -100% / var(--n) + var(--drag, 0px)), 0, 0); transition: transform .85s var(--ease); will-change: transform; }
.tl-track.dragging { transition: none; }
.era { position: relative; flex: 0 0 calc(100% / var(--n)); height: 100%; overflow: hidden; isolation: isolate; }
.era-art { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.era-art img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos); transform: scale(1.04); transform-origin: var(--pos); filter: saturate(.9) brightness(.76); transition: transform 7s ease-out; backface-visibility: hidden; }
.era.on .era-art img { transform: scale(1); }
.era-shade { position: absolute; inset: 0; z-index: -1; transform: translateZ(0); background: linear-gradient(90deg, rgba(18,16,13,.94) 0%, rgba(18,16,13,.8) 32%, rgba(18,16,13,.25) 62%, rgba(18,16,13,.15) 100%), linear-gradient(0deg, rgba(18,16,13,.7), transparent 30%); }
.era-body { position: relative; height: 100%; max-width: 860px; padding: 3vh clamp(76px, 7vw, 110px) 40px; display: flex; flex-direction: column; justify-content: center; }
.era-roman { font: 700 clamp(64px, min(11vw, 17vh), 190px)/.8 var(--serif); letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 1.2px var(--gold); margin-bottom: 8px; white-space: nowrap; }
.era-years { font: 600 14px/1 var(--sans); letter-spacing: .28em; color: var(--gold-2); margin: 0 0 12px; }
.era-title { font: 600 clamp(36px, min(5.2vw, 8.5vh), 82px)/.98 var(--serif); margin: 0 0 min(24px, 2.6vh); letter-spacing: -.01em; }
.era-dates { list-style: none; margin: 0 0 min(26px, 2.8vh); padding: 0; display: grid; gap: 8px; max-width: 560px; }
.era-dates li { display: grid; grid-template-columns: 74px 1fr; gap: 16px; align-items: baseline; padding-bottom: min(9px, 1vh); border-bottom: 1px solid rgba(229,201,131,.18); }
.era-dates b { font: 600 24px/1 var(--serif); color: var(--gold-2); }
.era-dates span { font-size: 15.5px; color: rgba(244,237,225,.9); line-height: 1.4; }
.era-lec { display: flex; flex-wrap: wrap; gap: 8px; }
.era-lec-h { width: 100%; font: 700 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(244,237,225,.6); margin-bottom: 4px; }
.era-body > * { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.era:not(.on) .era-body > * { opacity: 0; transform: translateX(40px); }
.era.on .era-body > :nth-child(2) { transition-delay: .08s; } .era.on .era-body > :nth-child(3) { transition-delay: .14s; } .era.on .era-body > :nth-child(4) { transition-delay: .2s; } .era.on .era-body > :nth-child(5) { transition-delay: .26s; }
.tl-arrow { position: absolute; top: 50%; z-index: 5; width: 60px; height: 60px; margin-top: -30px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; font: 600 26px/1 var(--sans); color: var(--ink); background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .25s var(--ease), opacity .3s; }
.tl-arrow:hover { transform: scale(1.08); }
.tl-arrow[disabled] { opacity: 0; pointer-events: none; }
.tl-prev { left: clamp(10px, 2vw, 28px); }
.tl-next { right: clamp(10px, 2vw, 28px); }
.tl-next.nudge { animation: nudge 1.6s ease-in-out 2.5s 3; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

.tl-bar { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 28px; padding: 14px clamp(20px, 5vw, 72px) 10px; background: var(--ink); border-top: 1px solid rgba(201,164,90,.18); min-height: 112px; }
.tl-year { grid-row: 1 / 3; display: flex; align-items: baseline; gap: 8px; min-width: 132px; }
.tl-year-n { font: 700 46px/1 var(--serif); color: var(--gold-2); font-variant-numeric: tabular-nums; }
.tl-year-l { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: rgba(244,237,225,.5); }
.tl-slider { position: relative; padding-top: 22px; }
.tl-range { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; margin: 0; cursor: pointer; position: relative; z-index: 2; }
.tl-range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold-2) 0 var(--fill, 0%), rgba(244,237,225,.18) var(--fill, 0%)); }
.tl-range::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(244,237,225,.18); }
.tl-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--gold-2); }
.tl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -13px; border-radius: 50%; background: var(--gold-2); border: 4px solid var(--ink); box-shadow: 0 0 0 2px var(--gold-2), 0 4px 14px rgba(0,0,0,.5); }
.tl-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold-2); border: 4px solid var(--ink); box-shadow: 0 0 0 2px var(--gold-2); }
.tl-ticks { position: absolute; left: 15px; right: 15px; top: 0; list-style: none; margin: 0; padding: 0; height: 18px; pointer-events: none; }
.tl-ticks li { position: absolute; left: calc(var(--p) * 100%); transform: translateX(-50%); font: 600 14px/1 var(--serif); color: rgba(244,237,225,.45); white-space: nowrap; transition: color .3s, transform .3s; }
.tl-ticks li.on { color: var(--gold-2); transform: translateX(-50%) scale(1.2); }
.tl-hint { grid-column: 2; margin: 2px 0 0; font-size: 13px; color: rgba(244,237,225,.55); }

/* ===== Блоки главной ===== */
.blk { padding: clamp(64px, 10vw, 130px) 0; position: relative; }
.blk-in { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
.blk-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-bottom: 40px; }
.blk-head .kicker { width: 100%; }
.blk-head h2, .page-hero h1 { font: 600 clamp(42px, 6vw, 92px)/.95 var(--serif); margin: 0; letter-spacing: -.015em; }
.lead { font-size: 19px; color: var(--muted); max-width: 640px; margin: 12px 0 0; }
.more { margin-left: auto; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.news-list { display: grid; border-top: 1px solid var(--line); }
.news { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.news time { font: 600 22px/1.2 var(--serif); color: var(--red); }
.news p { margin: 0 0 8px; font-size: 18px; } .news p:last-child { margin: 0; }
.blk-sections { background: var(--paper-2); }
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 260px; padding: 28px 26px; border-radius: 22px; text-decoration: none; background: var(--paper); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 0 0 1px var(--line); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s, background .4s, color .4s; }
.card::before { content: ''; position: absolute; inset: auto -40% -60% auto; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(201,164,90,.35), transparent 70%); opacity: 0; transition: opacity .5s; }
.card:hover { transform: translateY(-6px); background: var(--ink); color: var(--paper); box-shadow: 0 30px 60px rgba(18,16,13,.25); }
.card:hover::before { opacity: 1; }
.card-n { font: 600 15px/1 var(--serif); color: var(--gold); }
.card-k { font: 600 clamp(28px, 2.4vw, 36px)/1.02 var(--serif); margin-top: auto; }
.card-t { font-size: 15px; opacity: .75; line-height: 1.45; }
.card-go { position: absolute; top: 24px; right: 26px; font-size: 22px; transition: transform .4s var(--ease); }
.card:hover .card-go { transform: translateX(6px); color: var(--gold-2); }

/* О преподавателе */
.blk-about { background: var(--ink); color: var(--paper); overflow: hidden; }
.blk-about::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 15% 40%, rgba(201,164,90,.14), transparent 65%); pointer-events: none; }
.about { position: relative; display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-photo { position: relative; }
.about-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 50% 25%; border-radius: 200px 200px 24px 24px; box-shadow: 0 0 0 1px rgba(229,201,131,.4), 0 0 0 10px rgba(229,201,131,.06), 0 40px 80px rgba(0,0,0,.5); }
.about-text h2 { font: 600 clamp(36px, 4.6vw, 64px)/1 var(--serif); margin: 0 0 24px; }
.about-text p { font-size: 17.5px; color: rgba(244,237,225,.85); margin: 0 0 14px; max-width: 720px; }
.about-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ===== Внутренние страницы ===== */
.page-hero { background: var(--ink); color: var(--paper); padding: calc(var(--hdr) + clamp(36px, 6vw, 88px)) 0 clamp(36px, 5vw, 64px); position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 120% at 90% 0%, rgba(201,164,90,.18), transparent 60%); pointer-events: none; }
.page-hero-in { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); position: relative; z-index: 1; }
.page-hero h1 { overflow-wrap: anywhere; hyphens: auto; }
.page-hero .lead { color: rgba(244,237,225,.7); }
.page-hero .lead a { color: var(--gold-2); }
.wrap { max-width: 1280px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(16px, 5vw, 64px) 100px; }
.wrap.narrow { max-width: 980px; }
.page-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.page-grid.single { grid-template-columns: minmax(0, 1fr); max-width: 1000px; }
.side { position: sticky; top: calc(var(--hdr) + 24px); }
.side-d summary { display: none; }
.side nav { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.side a { text-decoration: none; padding: 8px 0 8px 18px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); font-size: 15px; line-height: 1.35; transition: color .2s, border-color .2s; }
.side a:hover { color: var(--text); }
.side a[aria-current] { color: var(--text); border-color: var(--gold); font-weight: 600; }
.sheet { background: #fbf7ef; border-radius: 24px; padding: clamp(22px, 4.5vw, 64px); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(42,36,29,.25); min-width: 0; }
.prose { font-size: 17.5px; line-height: 1.72; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 1.6em 0 .5em; }
.prose h2 { font-size: 34px; } .prose h3 { font-size: 27px; } .prose h4 { font-size: 22px; }
.prose p { margin: 0 0 .85em; }
.prose a { color: #7a4f12; text-decoration-color: rgba(201,164,90,.6); text-underline-offset: 3px; }
.prose a:hover { color: var(--red); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--gold); font-weight: 700; }
.prose img { display: block; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); margin: 8px 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 15px; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.prose blockquote { margin: 1em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 22px; font-style: italic; }
.prose a.file { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); text-decoration: none; color: var(--text); font-weight: 600; transition: box-shadow .2s, transform .2s; }
.prose a.file::before { content: '↓'; display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--gold-2); font-weight: 700; }
.prose a.file:hover { box-shadow: 0 0 0 1px var(--gold); transform: translateY(-1px); }
.prose-index p { padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.updated { margin-top: 40px !important; font-size: 13px; color: var(--muted); }
.contact { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 20px; }
.contact-photo { width: 160px; height: 200px; object-fit: cover; border-radius: 100px 100px 16px 16px; flex: none; box-shadow: 0 0 0 1px var(--line); }
.contact-name { font: 600 34px/1.1 var(--serif); margin-bottom: 24px !important; }
.big-link { font: 600 26px/1.3 var(--serif); text-decoration: none !important; color: var(--text) !important; border-bottom: 1px solid var(--gold); word-break: break-all; }

/* Лекции */
.tabs { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.tabs a { padding: 12px 20px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(244,237,225,.3); text-decoration: none; font-weight: 600; font-size: 15px; transition: background .2s; }
.tabs a:hover { background: rgba(244,237,225,.1); }
.lec-group { margin-bottom: 72px; scroll-margin-top: calc(var(--hdr) + 20px); }
.lec-gh { font: 600 clamp(28px, 3.4vw, 46px)/1.05 var(--serif); margin: 0 0 24px; }
.lec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.lec { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px 24px 22px; border-radius: 20px; background: #fbf7ef; text-decoration: none; box-shadow: 0 0 0 1px var(--line); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s, background .35s, color .35s; min-height: 210px; }
.lec:hover { transform: translateY(-4px); background: var(--ink); color: var(--paper); box-shadow: 0 24px 50px rgba(18,16,13,.25); }
.lec-num { position: absolute; right: 16px; top: -8px; font: 700 96px/1 var(--serif); color: transparent; -webkit-text-stroke: 1px rgba(201,164,90,.45); }
.lec-era { font: 700 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.lec-t { font: 600 24px/1.15 var(--serif); max-width: 78%; position: relative; }
.lec-meta { font-size: 13px; color: var(--muted); margin-top: auto; }
.lec:hover .lec-meta { color: rgba(244,237,225,.6); }
.lec-dl { font-weight: 700; font-size: 14px; color: var(--red); }
.lec:hover .lec-dl { color: var(--gold-2); }

/* Подвал */
.ftr { background: var(--ink); color: rgba(244,237,225,.8); padding: 56px 0 calc(36px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(201,164,90,.2); }
.ftr-in { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; font-size: 15px; }
.ftr-big { font: 600 32px/1.1 var(--serif); color: var(--paper); margin-bottom: 10px; }
.ftr a { color: var(--gold-2); }
.ftr-small { font-size: 13px; color: rgba(244,237,225,.5); }

/* ===== Планшеты ===== */
@media (max-width: 1100px) {
  .mega-in { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Телефоны ===== */
@media (max-width: 860px) {
  :root { --hdr: 64px; }
  body { font-size: 17px; }
  .hdr { gap: 12px; }
  .hdr-nav { display: none; }
  .burger { display: block; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-t b { font-size: 19px; }
  .brand-t small { display: flex; flex-wrap: wrap; font-size: 12px; line-height: 1.3; }
  .brand-t small .bn { order: 1; } .brand-t small .bm { order: 2; } .brand-t small .bc { display: none; }
  .brand-t small .bd { order: 3; flex-basis: 100%; white-space: nowrap; }
  .mega-in { grid-template-columns: 1fr 1fr; gap: 22px; padding-top: 20px; }
  .mega-mobile { display: block; grid-column: 1 / -1; }
  .mega-col a { padding: 9px 0; font-size: 16px; }

  /* первый экран: картина сверху целиком, текст ниже */
  .hero { display: block; min-height: 0; padding-top: var(--hdr); }
  .hero-art { position: relative; inset: auto; height: 46svh; min-height: 260px; }
  .hero-art img { object-position: var(--mpos); filter: saturate(.9) brightness(.85); }
  .hero::before { background: linear-gradient(180deg, transparent 0, transparent calc(var(--hdr) + 30svh), var(--ink) calc(var(--hdr) + 46svh)); }
  .hero-in { padding: 18px 20px 48px; }
  .hero-k { font-size: 11px; letter-spacing: .16em; margin-bottom: 14px; }
  .hero-h { font-size: clamp(44px, 13.5vw, 72px); margin-bottom: 18px; }
  .hero-sub { font-size: 17px; margin-bottom: 26px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-intro { margin-top: 28px; }
  .hero-intro span { width: 100%; }
  .chip { max-width: 100%; }
  .hero-year { display: none; }
  .hero > .era-credit { top: calc(var(--hdr) + max(46svh, 260px) - 22px); bottom: auto; right: 10px; max-width: 80%; text-shadow: 0 1px 3px rgba(0,0,0,.8); }

  /* лента: картина сверху, текст ниже, листание свайпом */
  .tl-view { height: auto; min-height: 0; }
  .tl-track { height: auto; align-items: stretch; }
  .era { height: auto; display: flex; flex-direction: column; background: var(--ink); }
  .era-art { position: relative; inset: auto; height: 42svh; min-height: 240px; flex: none; }
  .era-art img { object-position: var(--mpos); transform-origin: var(--mpos); }
  .era-shade { top: auto; height: 42svh; min-height: 240px; top: 0; background: linear-gradient(0deg, var(--ink) 0%, rgba(18,16,13,0) 35%); }
  .era-body { height: auto; padding: 14px 20px 26px; justify-content: flex-start; }
  .era-roman { font-size: 64px; }
  .era-title { font-size: 36px; }
  .era-dates li { grid-template-columns: 62px 1fr; gap: 10px; }
  .era-dates b { font-size: 21px; }
  .era-dates span { font-size: 15.5px; }
  .era-credit { top: calc(max(42svh, 240px) - 22px); bottom: auto; right: 10px; font-size: 10.5px; max-width: 85%; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
  .era:not(.on) .era-body > * { transform: none; }
  .tl-arrow { top: calc(21svh); width: 52px; height: 52px; margin-top: -26px; font-size: 22px; }
  .tl-bar { position: sticky; bottom: 0; z-index: 6; grid-template-columns: auto 1fr; column-gap: 14px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); min-height: 0; box-shadow: 0 -10px 30px rgba(0,0,0,.4); }
  .tl-year { min-width: 0; }
  .tl-year-n { font-size: 34px; }
  .tl-year-l { display: none; }
  .tl-ticks li { font-size: 0; }
  .tl-ticks li.on { font-size: 13px; transform: translateX(-50%); }
  .tl-slider { padding-top: 18px; }
  .tl-hint { font-size: 12px; }

  .news { grid-template-columns: 1fr; gap: 6px; }
  .news time { font-size: 20px; }
  .news p { font-size: 17px; }
  .more { margin-left: 0; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { min-height: 0; padding: 22px 20px; }
  .card-k { margin-top: 18px; }
  .about { grid-template-columns: 1fr; text-align: left; }
  .about-photo { max-width: 260px; }
  .about-links .btn { width: 100%; }

  .page-grid { grid-template-columns: 1fr; }
  .side { position: static; order: -1; }
  .side-d { background: #fbf7ef; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
  .side-d summary { display: block; padding: 14px 18px; font-weight: 600; cursor: pointer; list-style: none; }
  .side-d summary::after { content: ' ▾'; color: var(--gold); }
  .side-d nav { border: 0; padding: 0 18px 12px; }
  .side-d a { border: 0; padding: 9px 0; margin: 0; border-top: 1px solid var(--line); }
  .side-d a[aria-current] { color: var(--red); }
  .sheet { border-radius: 18px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 28px; } .prose h3 { font-size: 23px; }
  .contact { flex-direction: column; }
  .contact-name { font-size: 28px; }
  .big-link { font-size: 22px; }
  .lec-grid { grid-template-columns: 1fr; }
  .lec { min-height: 0; }
  .ftr-in { grid-template-columns: 1fr; }
}
@media (max-width: 430px) { .mega-in { grid-template-columns: 1fr; } }
@media (max-width: 370px) { .brand-t b { font-size: 17px; } .brand-t small { font-size: 10.5px; } .brand-mark { width: 36px; height: 36px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-grain { display: none; }
}

/* ---- исправления ленты ---- */
.era-dates b, .tl-year-n, .tl-ticks li, .hero-year, .lec-num, .news time, .card-n, .era-years { font-variant-numeric: lining-nums tabular-nums; }
.tl-view { height: calc(100vh - var(--hdr) - 100px); height: calc(100svh - var(--hdr) - 100px); min-height: 500px; }
.tl-bar { min-height: 100px; padding-top: 10px; padding-bottom: 10px; }
.tl-hint { font-size: 12.5px; line-height: 1.3; }
@media (min-width: 861px) { .era-body { padding-left: clamp(96px, 8.5vw, 124px); } .tl-prev { left: 16px; } .tl-next { right: 16px; } .tl-arrow { width: 56px; height: 56px; margin-top: -28px; } }
.tl-year-n { font-size: 40px; }
.era-body { justify-content: safe center; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(229,201,131,.35) transparent; padding-top: 2.5vh; padding-bottom: 3vh; max-width: 900px; }
.era-roman { font-size: clamp(52px, min(10vw, 13vh), 170px); margin-bottom: 4px; }
.era-title { font-size: clamp(34px, min(4.8vw, 7.4vh), 78px); }
.era-dates { gap: 4px; }
.era-dates li { padding-bottom: min(7px, .8vh); }
.era-lec { display: grid; grid-template-columns: repeat(2, minmax(0, 330px)); gap: 8px; }
.era-lec-h { grid-column: 1 / -1; }
.era-lec .chip { max-width: none; }
.era[data-many] .era-roman { font-size: clamp(44px, min(8vw, 10vh), 130px); }
.era[data-many] .era-dates span { font-size: 15px; }
.era[data-many] .chip { padding: 8px 14px 9px; }
.era[data-many] .chip-t { font-size: 13.5px; }
@media (max-width: 860px) {
  .era-body { overflow: visible; justify-content: flex-start; }
  .era-lec { grid-template-columns: 1fr; }
  .era-roman, .era[data-many] .era-roman { font-size: 58px; }
  .tl-year-n { font-size: 32px; }
}

/* контакты: кнопка письма */
.contact-card { display: grid; gap: 18px; margin-bottom: 28px; }
.contact-name { margin: 0 !important; }
.mail-btn { display: inline-flex; align-items: center; gap: 12px; justify-self: start; padding: 16px 26px; min-height: 56px; border-radius: 999px; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--ink) !important; text-decoration: none !important; font: 700 17px/1.2 var(--sans); box-shadow: 0 10px 30px rgba(201,164,90,.35); transition: transform .25s var(--ease); }
.mail-btn:hover { transform: translateY(-2px); color: var(--ink) !important; }
.mail-btn svg { flex: none; }
.contact-hint { font-size: 15px; color: var(--muted); margin: -6px 0 0 !important; }
.contact-line { margin: 0 !important; }
@media (max-width: 860px) { .mail-btn { justify-self: stretch; justify-content: center; } }

/* телефон: высота ленты = высоте текущей эпохи, без пустоты снизу */
@media (max-width: 860px) {
  .tl-track { align-items: flex-start; }
  .tl-view { transition: height .5s var(--ease); }
}

/* ---- затемнение без задержки: никаких фильтров на картине, слои в явном порядке ---- */
.era { isolation: isolate; }
.era-art { z-index: 0; }
.era-art img { filter: none !important; transform: none !important; transition: none !important; will-change: auto; }
.era-shade { z-index: 1; transform: none; background:
  linear-gradient(90deg, rgba(18,16,13,.95) 0%, rgba(18,16,13,.82) 32%, rgba(18,16,13,.35) 62%, rgba(18,16,13,.28) 100%),
  linear-gradient(0deg, rgba(18,16,13,.72), transparent 30%); }
.era-body { z-index: 2; }
.era-credit { z-index: 3; }
.tl-track { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
@media (max-width: 860px) {
  .era-shade { background: linear-gradient(0deg, var(--ink) 0%, rgba(18,16,13,.18) 38%, rgba(18,16,13,.18) 100%); }
}

/* ===== Общие дополнения для трёх сайтов (история, культурология, магистратура) ===== */
.era-roman.long { font-size: clamp(40px, min(6.4vw, 10vh), 120px) !important; letter-spacing: -.02em; }
/* много пунктов на ленте: подписи у всех, кроме текущего, — точки */
.tl-ticks.dense li { font-size: 0; width: 6px; height: 6px; top: 6px; border-radius: 50%; background: rgba(244,237,225,.32); }
.tl-ticks.dense li.on { font-size: 14px; width: auto; height: auto; top: 0; background: none; transform: translateX(-50%); }
.tl-ticks.dense li:first-child.on { transform: none; left: 0; }
.tl-ticks.dense li:last-child.on { transform: translateX(-100%); }
.hero-year-t { font-size: clamp(100px, 17vw, 300px); }
/* перекрёстные ссылки на другие сайты */
.ftr-fam { margin: 14px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.ftr-fam .muted-l { opacity: .6; font-size: 13px; }
/* карточки курсов с картинами (магистратура) */
.courses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.course { position: relative; display: block; min-height: 380px; border-radius: 18px; overflow: hidden; color: var(--paper); text-decoration: none; background: var(--ink); isolation: isolate; box-shadow: 0 20px 50px rgba(18,16,13,.18); }
.course-art { position: absolute; inset: 0; z-index: -2; }
.course-art img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos); transition: transform 1.2s var(--ease); }
.course:hover .course-art img { transform: scale(1.05); }
.course-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18,16,13,.08) 0%, rgba(18,16,13,.35) 40%, rgba(18,16,13,.92) 100%); }
.course-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 30px 30px; display: flex; flex-direction: column; gap: 8px; }
.course-k { font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); }
.course-t { font: 600 clamp(26px, 2.4vw, 34px)/1.12 var(--serif); }
.course-d { font-size: 15px; line-height: 1.5; opacity: .85; max-width: 46ch; }
.course-go { margin-top: 6px; font-weight: 700; font-size: 15px; color: var(--gold-2); transition: transform .3s var(--ease); }
.course:hover .course-go { transform: translateX(6px); }
.course .era-credit { position: absolute; top: 12px; right: 14px; bottom: auto; left: auto; font-size: 11px; opacity: .6; max-width: 60%; text-align: right; }
.course .card-n { color: var(--gold-2); }
@media (max-width: 860px) {
  .courses { grid-template-columns: 1fr; gap: 16px; }
  .course { min-height: 300px; }
  .course-art img { object-position: var(--mpos, var(--pos)); }
  .course-body { padding: 22px; }
}
/* таблицы со старых сайтов: абзацы внутри ячеек без отступов, даты не переносятся */
.prose td p, .prose th p { margin: 0; }
.prose td p + p, .prose th p + p { margin-top: .4em; }
.prose td, .prose th { min-width: 3.6em; }
.prose td:first-child { min-width: 0; }
.prose table h4 { margin: 0; font: inherit; font-weight: 600; }
/* культурология: даты длинные («XVI–XI вв. до н. э.») — колонка шире, шрифт мельче */
.site-cult .era-dates { max-width: 620px; }
.site-cult .era-dates li { grid-template-columns: 158px 1fr; }
.site-cult .era-dates b { font-size: 19px; line-height: 1.15; }
@media (max-width: 860px) {
  .site-cult .era-dates li { grid-template-columns: 112px 1fr; }
  .site-cult .era-dates b { font-size: 16px; }
}
/* подпись текущего пункта на плотной ленте — над точками */
.tl-ticks.dense li.on { top: -14px; }
@media (max-width: 860px) {
  .site-cult .tl-year { flex-direction: column; gap: 2px; }
  .site-cult .tl-year-l { display: block; font-size: 9.5px; letter-spacing: .12em; white-space: nowrap; }
  .site-cult .tl-year-n { font-size: 30px; }
}
.course { min-height: 440px; }
.course-shade { background: linear-gradient(180deg, rgba(18,16,13,0) 0%, rgba(18,16,13,.25) 30%, rgba(18,16,13,.82) 58%, rgba(18,16,13,.95) 100%); }
.course .era-credit { text-shadow: 0 1px 3px rgba(0,0,0,.9); opacity: .8; }
@media (max-width: 860px) { .course { min-height: 360px; } }
