:root {
  color-scheme: dark;
  --bg: #080d0b;
  --bg-2: #0c1310;
  --panel: #101914;
  --panel-2: #141f19;
  --line: #25372e;
  --line-soft: #1b2922;
  --text: #eef4f0;
  --muted: #94a69c;
  --green: #47c984;
  --green-dark: #183c2a;
  --gold: #d6ae57;
  --gold-soft: #f0d792;
  --danger: #eb7d73;
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 72% -10%, rgba(32, 81, 55, .28), transparent 34%), var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 30; left: 16px; top: -60px; padding: 10px 14px; border-radius: 8px; color: #07110b; background: var(--green); font-weight: 800; transition: top .2s; }
.skip-link:focus { top: 14px; }

.site-header { min-height: 76px; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; background: rgba(8, 13, 11, .78); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 11px 4px 11px 4px; color: var(--gold-soft); font-family: Georgia, serif; font-size: 23px; font-weight: 700; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.offline-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.offline-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(71, 201, 132, .09); }

main { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.hero { min-height: 410px; padding: 76px 0 66px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .5fr); align-items: center; gap: 48px; border-bottom: 1px solid var(--line-soft); }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 11px; font-weight: 850; letter-spacing: .18em; }
.hero h1 { max-width: 760px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(45px, 6.2vw, 78px); line-height: .99; letter-spacing: -.045em; font-weight: 500; }
.hero h1 em { color: var(--gold-soft); font-weight: inherit; }
.hero-copy > p:last-child { max-width: 660px; margin: 28px 0 0; color: var(--muted); font-size: 17px; }
.hero-monogram { justify-self: end; width: 230px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; display: grid; place-content: center; text-align: center; position: relative; background: radial-gradient(circle, rgba(71, 201, 132, .09), transparent 66%); }
.hero-monogram::before, .hero-monogram::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(214, 174, 87, .18); }
.hero-monogram::before { inset: 17px; }
.hero-monogram::after { inset: 34px; }
.hero-monogram span { color: var(--gold-soft); font: 700 76px/.8 Georgia, serif; }
.hero-monogram small { margin-top: 13px; color: var(--muted); font-size: 10px; letter-spacing: .16em; line-height: 1.45; text-transform: uppercase; }

.overview { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line-soft); }
.overview > div { min-height: 118px; padding: 24px 28px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; justify-content: center; }
.overview > div:first-child { padding-left: 0; }
.overview > div:last-child { border-right: 0; }
.overview strong { font-family: Georgia, serif; color: var(--gold-soft); font-size: 31px; line-height: 1; font-weight: 500; }
.overview span { margin-top: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .09em; }
.mini-track { width: 100%; height: 3px; margin-top: 12px; overflow: hidden; background: var(--line); }
.mini-track i { display: block; width: 0; height: 100%; background: var(--green); transition: width .4s; }

.catalog-section { padding: 70px 0 86px; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.catalog-heading h2, .publish-note h2 { margin: 0; font: 500 clamp(30px, 4vw, 43px)/1.1 Georgia, serif; letter-spacing: -.025em; }
.search { width: min(380px, 100%); height: 48px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--muted); background: var(--bg-2); }
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(71, 201, 132, .09); }
.search svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.search input::placeholder { color: #72847a; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; }
.filter { border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; }
.filter span { margin-left: 5px; color: #6d8176; }
.filter:hover { color: var(--text); border-color: #3a5547; }
.filter.active { color: #07130c; border-color: var(--green); background: var(--green); font-weight: 800; }
.filter.active span { color: #244d35; }

.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.course-card { min-height: 270px; padding: 26px; border: 1px solid var(--line-soft); border-radius: var(--radius); display: flex; flex-direction: column; background: linear-gradient(145deg, rgba(20, 31, 25, .82), rgba(12, 19, 16, .88)); transition: border-color .2s, transform .2s, background .2s; }
.course-card:hover { transform: translateY(-2px); border-color: #3a5547; background: linear-gradient(145deg, rgba(23, 37, 29, .94), rgba(13, 22, 17, .96)); }
.course-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.discipline { color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.lesson { color: var(--gold); font: 700 13px Georgia, serif; }
.course-card h3 { margin: 28px 0 9px; max-width: 500px; font: 500 25px/1.15 Georgia, serif; letter-spacing: -.015em; }
.course-card .description { margin: 0; color: var(--muted); font-size: 14px; }
.course-footer { margin-top: auto; padding-top: 30px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; }
.meta-line { display: flex; flex-wrap: wrap; gap: 12px; color: #84968c; font-size: 12px; }
.meta-line span + span::before { content: "·"; margin-right: 12px; color: #53665b; }
.course-progress { margin-top: 12px; }
.course-progress-label { display: flex; justify-content: space-between; color: #7f9388; font-size: 11px; }
.course-progress-label b { color: var(--text); font-weight: 700; }
.progress-track { height: 4px; margin-top: 7px; overflow: hidden; background: #1f3027; border-radius: 99px; }
.progress-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #7be1aa); border-radius: inherit; }
.open-course { min-height: 42px; padding: 0 16px; border: 1px solid #4a694f; border-radius: 10px; display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--gold-soft); background: rgba(214, 174, 87, .04); font-size: 13px; font-weight: 800; }
.open-course:hover { color: #09110d; border-color: var(--gold); background: var(--gold); }
.open-course span { font-size: 17px; }
.empty-state { padding: 56px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

.publish-note { margin-bottom: 74px; padding: 34px; border: 1px solid rgba(214, 174, 87, .25); border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; background: linear-gradient(120deg, rgba(214, 174, 87, .07), rgba(71, 201, 132, .04)); }
.note-icon { width: 46px; height: 46px; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: var(--gold-soft); font-size: 22px; }
.publish-note h2 { font-size: 29px; }
.publish-note p:last-child { margin: 10px 0 0; max-width: 770px; color: var(--muted); }
footer { width: min(var(--max), calc(100% - 48px)); min-height: 90px; margin: 0 auto; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #708278; font-size: 12px; }
footer span { color: var(--gold); font-family: Georgia, serif; font-size: 16px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-monogram { display: none; }
  .overview { grid-template-columns: repeat(2, 1fr); }
  .overview > div:nth-child(2) { border-right: 0; }
  .overview > div:first-child { padding-left: 28px; }
  .course-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .site-header { min-height: 66px; padding-inline: 18px; }
  .offline-badge { font-size: 0; }
  main, footer { width: min(100% - 32px, var(--max)); }
  .hero { padding: 58px 0 48px; }
  .hero h1 { font-size: clamp(42px, 13vw, 60px); }
  .hero-copy > p:last-child { font-size: 15px; }
  .overview > div { padding: 20px; min-height: 100px; }
  .overview > div:first-child { padding-left: 20px; }
  .catalog-section { padding: 54px 0 66px; }
  .catalog-heading { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { white-space: nowrap; }
  .course-card { padding: 21px; min-height: 288px; }
  .course-footer { grid-template-columns: 1fr; }
  .open-course { justify-content: center; }
  .publish-note { padding: 24px; grid-template-columns: 1fr; }
  footer { flex-direction: column; justify-content: center; align-items: flex-start; }
  footer p { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
