:root {
  --ink-950: #0a2530;
  --ink-900: #0d2c3a;
  --ink-800: #173d4b;
  --ink-700: #315664;
  --ink-600: #4c6e78;
  --ink-500: #718b93;
  --paper: #f7f8f4;
  --surface: #ffffff;
  --surface-soft: #eff3ef;
  --line: #dce5df;
  --line-strong: #c9d7cf;
  --teal-700: #087a6d;
  --teal-600: #109988;
  --teal-500: #25b5a1;
  --teal-100: #dff5ef;
  --amber-500: #e8a33c;
  --amber-100: #fff0d6;
  --rose-100: #fbe7e4;
  --blue-100: #e4effa;
  --violet-100: #ece9f9;
  --coral-100: #fdebe2;
  --shadow-sm: 0 1px 2px rgba(10, 37, 48, 0.04), 0 8px 24px rgba(10, 37, 48, 0.05);
  --shadow-lg: 0 18px 55px rgba(10, 37, 48, 0.13);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --content: 1200px;
  --header-h: 72px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink-900);
  background: var(--paper);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.nav-open,
body.search-open { overflow: hidden; }

a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
img, svg { display: block; }

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: var(--ink-950);
  color: white;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid rgba(16, 153, 136, .38);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid rgba(201, 215, 207, .8);
  background: rgba(247, 248, 244, .91);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  text-decoration: none;
}

.brand img { flex: 0 0 auto; }
.brand-name {
  color: var(--ink-950);
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -.035em;
}
.brand-name span { color: var(--teal-700); }

.main-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.main-nav a {
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.main-nav a:hover,
.main-nav a.active { color: var(--ink-950); background: #e9efea; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: #e9efea; }
.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.menu-button { display: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--ink-900);
  border-radius: 12px;
  background: var(--ink-900);
  color: white;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(10, 37, 48, .12);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); background: var(--ink-800); box-shadow: 0 12px 24px rgba(10,37,48,.16); }
.button:active { transform: translateY(0); }
.button-secondary { background: transparent; color: var(--ink-900); box-shadow: none; }
.button-secondary:hover { background: #e9efea; box-shadow: none; }
.button-teal { border-color: var(--teal-700); background: var(--teal-700); }
.button-teal:hover { background: #076c61; }
.button-small { min-height: 40px; padding: 0 15px; border-radius: 10px; font-size: 14px; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.page-wrap { width: min(var(--content), calc(100% - 48px)); margin: 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--teal-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 3px; background: var(--amber-500); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 54px;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(circle at 76% 34%, rgba(37,181,161,.13), transparent 28%),
    radial-gradient(circle at 15% 100%, rgba(232,163,60,.10), transparent 30%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .75fr);
  align-items: center;
  gap: clamp(48px, 8vw, 105px);
}
.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink-950);
  font-size: clamp(48px, 6vw, 78px);
  line-height: .99;
  letter-spacing: -.061em;
}
.hero-copy h1 .accent { color: var(--teal-700); }
.hero-copy .lead {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--ink-700);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.6;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
  color: var(--ink-600);
  font-size: 13px;
  font-weight: 650;
}
.trust-line span { display: inline-flex; align-items: center; gap: 7px; }
.trust-line svg { width: 17px; height: 17px; fill: none; stroke: var(--teal-700); stroke-width: 2.2; }

.lesson-preview {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(201,215,207,.8);
  border-radius: 28px;
  background: rgba(255,255,255,.73);
  box-shadow: var(--shadow-lg);
  transform: rotate(1.2deg);
}
.lesson-preview::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 22px -22px -22px 22px;
  border-radius: 28px;
  background: var(--teal-100);
  transform: rotate(-3deg);
}
.preview-window { overflow: hidden; border-radius: 18px; background: white; }
.preview-bar { display: flex; align-items: center; gap: 7px; height: 46px; padding: 0 17px; border-bottom: 1px solid var(--line); }
.preview-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d1ddd6; }
.preview-bar span { margin-left: auto; color: var(--ink-500); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.preview-body { padding: 25px 27px 28px; }
.preview-kicker { color: var(--teal-700); font-size: 12px; font-weight: 800; }
.preview-body h2 { margin: 6px 0 11px; font-size: 24px; line-height: 1.2; letter-spacing: -.035em; }
.preview-body p { margin: 0; color: var(--ink-600); font-size: 14px; line-height: 1.6; }
.preview-rule { height: 1px; margin: 20px 0; background: var(--line); }
.preview-question { padding: 17px; border-radius: 13px; background: #f0f5f1; }
.preview-question strong { display: block; margin-bottom: 8px; font-size: 13px; }
.preview-option { display: flex; align-items: center; gap: 9px; margin-top: 8px; color: var(--ink-700); font-size: 12px; }
.preview-option i { width: 15px; height: 15px; border: 1px solid var(--line-strong); border-radius: 50%; background: white; }
.preview-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; color: var(--ink-500); font-size: 12px; font-weight: 700; }
.mini-progress { width: 110px; height: 6px; overflow: hidden; border-radius: 6px; background: #dce7e0; }
.mini-progress span { display: block; width: 64%; height: 100%; background: var(--teal-500); }

.stat-strip { padding: 18px 0 70px; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.7);
}
.stat { padding: 24px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat strong { display: block; color: var(--ink-950); font-size: 29px; line-height: 1; letter-spacing: -.04em; }
.stat span { display: block; margin-top: 8px; color: var(--ink-600); font-size: 13px; }

.section { padding: 88px 0; }
.section-tint { background: #eef3ef; }
.section-dark { color: white; background: var(--ink-950); }
.section-head { max-width: 720px; margin-bottom: 42px; }
.section-head.center { margin-right: auto; margin-left: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2,
.page-hero h1 {
  margin: 0;
  color: var(--ink-950);
  font-size: clamp(35px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.section-dark .section-head h2 { color: white; }
.section-head p { margin: 17px 0 0; color: var(--ink-600); font-size: 18px; }
.section-dark .section-head p { color: #bcd0d7; }

.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.method-card { position: relative; min-height: 250px; padding: 27px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.method-card .step { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--teal-700); background: var(--teal-100); font-weight: 850; }
.method-card h3 { margin: 35px 0 9px; font-size: 20px; letter-spacing: -.025em; }
.method-card p { margin: 0; color: var(--ink-600); font-size: 14px; }
.method-card .corner { position: absolute; right: -28px; bottom: -38px; width: 105px; height: 105px; border: 18px solid rgba(16,153,136,.08); border-radius: 50%; }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.course-card {
  display: flex;
  flex-direction: column;
  min-height: 285px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.course-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 16px 34px rgba(10,37,48,.1); }
.course-top { display: flex; align-items: center; justify-content: space-between; }
.course-number { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; font-size: 14px; font-weight: 850; }
.color-mint .course-number { background: var(--teal-100); color: var(--teal-700); }
.color-blue .course-number { background: var(--blue-100); color: #376c9a; }
.color-amber .course-number { background: var(--amber-100); color: #9a6618; }
.color-violet .course-number { background: var(--violet-100); color: #63529a; }
.color-coral .course-number { background: var(--coral-100); color: #9b5d3e; }
.color-rose .course-number { background: var(--rose-100); color: #9e514b; }
.course-number.color-mint { background: var(--teal-100); color: var(--teal-700); }
.course-number.color-blue { background: var(--blue-100); color: #376c9a; }
.course-number.color-amber { background: var(--amber-100); color: #9a6618; }
.course-number.color-violet { background: var(--violet-100); color: #63529a; }
.course-number.color-coral { background: var(--coral-100); color: #9b5d3e; }
.course-number.color-rose { background: var(--rose-100); color: #9e514b; }
.weight { color: var(--ink-500); font-size: 12px; font-weight: 750; }
.course-card h3 { margin: 30px 0 10px; font-size: 21px; line-height: 1.25; letter-spacing: -.03em; }
.course-card p { margin: 0 0 24px; color: var(--ink-600); font-size: 14px; line-height: 1.55; }
.course-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-600); font-size: 12px; font-weight: 700; }
.course-meta .arrow { color: var(--teal-700); font-size: 18px; }

.practice-split { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 75px; }
.practice-copy h2 { margin: 0; font-size: clamp(36px,4.5vw,58px); line-height: 1.04; letter-spacing: -.05em; }
.practice-copy p { color: #bcd0d7; font-size: 18px; }
.practice-copy .button { margin-top: 13px; border-color: white; background: white; color: var(--ink-950); }
.practice-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.practice-card { padding: 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.06); }
.practice-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.practice-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; background: rgba(80,207,187,.16); color: #79e3d2; }
.practice-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.practice-card strong { display: block; }
.practice-card span { display: block; margin-top: 4px; color: #aac1c9; font-size: 13px; }
.practice-card b { color: #79e3d2; font-size: 24px; }

.home-cta { padding: 88px 0; }
.cta-box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 45px; padding: 46px 50px; border-radius: 25px; background: var(--teal-100); }
.cta-box h2 { margin: 0; font-size: clamp(30px,4vw,45px); line-height: 1.1; letter-spacing: -.04em; }
.cta-box p { margin: 11px 0 0; color: var(--ink-700); }

.page-hero { padding: 70px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero .breadcrumbs { margin-bottom: 20px; color: var(--ink-500); font-size: 13px; font-weight: 700; }
.page-hero p { max-width: 720px; margin: 17px 0 0; color: var(--ink-600); font-size: 18px; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 27px; }

.catalog { padding: 55px 0 95px; }
.chapter-panel { margin-bottom: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.chapter-panel summary { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px; padding: 22px 24px; list-style: none; cursor: pointer; }
.chapter-panel summary::-webkit-details-marker { display: none; }
.chapter-panel summary:hover { background: #fbfcfa; }
.chapter-panel[open] summary { border-bottom: 1px solid var(--line); }
.chapter-panel summary h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.chapter-panel summary p { margin: 3px 0 0; color: var(--ink-500); font-size: 13px; }
.chapter-panel .summary-progress { min-width: 96px; color: var(--ink-500); font-size: 12px; font-weight: 700; text-align: right; }
.chevron { width: 9px; height: 9px; border-right: 2px solid var(--ink-500); border-bottom: 2px solid var(--ink-500); transform: rotate(45deg); transition: transform .2s; }
.chapter-panel[open] .chevron { transform: rotate(225deg); }
.lesson-list { padding: 8px 24px 18px 85px; }
.lesson-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; min-height: 57px; border-bottom: 1px solid #e9efeb; text-decoration: none; }
.lesson-row:last-child { border: 0; }
.lesson-row:hover .lesson-title { color: var(--teal-700); }
.lesson-title { font-weight: 650; }
.lesson-title small { margin-right: 10px; color: var(--ink-500); font-weight: 750; }
.lesson-time { color: var(--ink-500); font-size: 12px; }
.status-dot { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 50%; color: transparent; font-size: 13px; }
.status-dot.done { border-color: var(--teal-600); background: var(--teal-600); color: white; }
.test-row .lesson-title { color: var(--ink-700); }

.practice-page { padding: 58px 0 95px; }
.content-section + .content-section { margin-top: 70px; }
.content-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.content-section-head h2 { margin: 0; font-size: 29px; letter-spacing: -.035em; }
.content-section-head p { max-width: 640px; margin: 5px 0 0; color: var(--ink-600); }
.content-section-head a { color: var(--teal-700); font-size: 14px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.lab-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.lab-card { min-height: 196px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: white; text-decoration: none; transition: transform .18s, border-color .18s; }
.lab-card:hover { transform: translateY(-3px); border-color: #a9c8bb; }
.lab-card .label { color: var(--teal-700); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lab-card h3 { margin: 22px 0 8px; font-size: 18px; line-height: 1.3; }
.lab-card .time { color: var(--ink-500); font-size: 12px; }
.exam-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.exam-card { position: relative; min-height: 230px; padding: 24px; overflow: hidden; border-radius: 16px; background: var(--ink-900); color: white; text-decoration: none; }
.exam-card::after { content: attr(data-letter); position: absolute; right: -6px; bottom: -58px; color: rgba(255,255,255,.055); font-size: 170px; font-weight: 850; line-height: 1; }
.exam-card .exam-tag { color: #70ddcc; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.exam-card h3 { position: relative; z-index: 1; margin: 35px 0 7px; font-size: 22px; }
.exam-card p { position: relative; z-index: 1; margin: 0; color: #b7cbd2; font-size: 13px; }
.exam-card .exam-count { position: absolute; z-index: 1; bottom: 22px; left: 24px; font-size: 12px; font-weight: 750; }
.resource-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.resource-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: white; text-decoration: none; }
.resource-card:hover { border-color: #a9c8bb; }
.resource-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--teal-100); color: var(--teal-700); font-size: 11px; font-weight: 850; }
.resource-card h3 { margin: 0; font-size: 16px; }
.resource-card p { margin: 3px 0 0; color: var(--ink-500); font-size: 13px; }
.resource-arrow { color: var(--teal-700); font-size: 20px; }

.exam-info-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 55px; padding: 58px 0 95px; }
.exam-facts { align-self: start; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: white; }
.fact { display: flex; justify-content: space-between; gap: 20px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.fact:last-child { border: 0; }
.fact span { color: var(--ink-600); font-size: 13px; }
.fact strong { text-align: right; }
.exam-explain h2 { margin: 0 0 14px; font-size: 30px; letter-spacing: -.035em; }
.exam-explain h3 { margin: 38px 0 10px; font-size: 20px; }
.exam-explain p { color: var(--ink-700); }
.keyword-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.keyword-list div { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.keyword-list strong { display: block; color: var(--teal-700); }
.keyword-list span { color: var(--ink-600); font-size: 13px; }
.notice { padding: 18px 20px; border-left: 4px solid var(--amber-500); border-radius: 0 12px 12px 0; background: var(--amber-100); }

.reader-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h));
}
.course-sidebar {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #f1f4f0;
  scrollbar-width: thin;
}
.sidebar-head { position: sticky; z-index: 2; top: 0; padding: 20px 18px 16px; border-bottom: 1px solid var(--line); background: rgba(241,244,240,.94); backdrop-filter: blur(10px); }
.sidebar-head-row { display: flex; align-items: center; justify-content: space-between; }
.sidebar-head strong { font-size: 14px; }
.sidebar-close { display: none; }
.course-progress { margin-top: 12px; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--ink-600); font-size: 11px; font-weight: 700; }
.progress-track { height: 6px; overflow: hidden; border-radius: 8px; background: #d8e1db; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal-600); transition: width .3s; }
.sidebar-nav { padding: 10px 9px 30px; }
.sidebar-group + .sidebar-group { margin-top: 5px; }
.sidebar-group summary { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; list-style: none; color: var(--ink-700); font-size: 12px; font-weight: 800; cursor: pointer; }
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary:hover { background: rgba(255,255,255,.65); }
.sidebar-group summary .num { color: var(--teal-700); }
.sidebar-group summary::after { content: "+"; margin-left: auto; color: var(--ink-500); font-size: 16px; font-weight: 500; }
.sidebar-group[open] summary::after { content: "−"; }
.sidebar-links { margin: 2px 0 7px; }
.sidebar-links a { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 6px; min-height: 42px; padding: 5px 10px; border-radius: 8px; color: var(--ink-600); font-size: 12px; line-height: 1.3; text-decoration: none; }
.sidebar-links a:hover { color: var(--ink-950); background: rgba(255,255,255,.7); }
.sidebar-links a.active { color: var(--ink-950); background: white; box-shadow: 0 2px 8px rgba(10,37,48,.06); }
.sidebar-links .code { color: var(--ink-500); font-weight: 750; }
.sidebar-links .tiny-check { width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: 50%; }
.sidebar-links .tiny-check.done { border-color: var(--teal-600); background: var(--teal-600); box-shadow: inset 0 0 0 4px var(--teal-600); }

.reader-main { min-width: 0; background: white; }
.reader-toolbar { position: sticky; z-index: 20; top: var(--header-h); display: flex; align-items: center; gap: 12px; min-height: 53px; padding: 0 max(24px, calc((100vw - 292px - 900px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.reader-menu { display: none; }
.reader-breadcrumb { min-width: 0; overflow: hidden; color: var(--ink-500); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.reader-breadcrumb span { color: var(--ink-800); }
.reader-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.reader-action { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink-700); font-size: 12px; font-weight: 700; cursor: pointer; }
.reader-action:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.reader-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.reader-content-wrap { display: grid; grid-template-columns: minmax(0, 770px) 190px; justify-content: center; gap: 60px; padding: 54px 48px 90px; }
.markdown-body { min-width: 0; color: #1d3b46; font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif; font-size: 17px; line-height: 1.78; }
.markdown-body > :first-child { margin-top: 0 !important; }
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 { color: var(--ink-950); font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; line-height: 1.25; letter-spacing: -.035em; }
.markdown-body h1 { margin: 0 0 12px; font-size: clamp(35px, 4vw, 48px); line-height: 1.08; }
.markdown-body h2 { margin: 54px 0 17px; padding-top: 4px; font-size: 29px; }
.markdown-body h3 { margin: 40px 0 13px; font-size: 22px; }
.markdown-body h4 { margin: 30px 0 10px; font-size: 18px; }
.markdown-body p { margin: 0 0 19px; }
.markdown-body strong { color: #123541; }
.markdown-body a { color: var(--teal-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.markdown-body ul,
.markdown-body ol { padding-left: 1.45em; margin: 0 0 22px; }
.markdown-body li { margin: 7px 0; padding-left: 4px; }
.markdown-body li::marker { color: var(--teal-600); font-weight: 700; }
.markdown-body blockquote { margin: 28px 0; padding: 17px 20px; border: 1px solid #efd29f; border-left: 4px solid var(--amber-500); border-radius: 0 12px 12px 0; background: #fff8eb; color: #4e493c; }
.markdown-body blockquote p:last-child { margin-bottom: 0; }
.markdown-body code { padding: .16em .36em; border: 1px solid #dce7e1; border-radius: 5px; background: #eff4f1; color: #0b655c; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .86em; }
.markdown-body pre { overflow-x: auto; margin: 24px 0; padding: 20px 22px; border-radius: 13px; background: #0e2a35; color: #e9f4f1; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.markdown-body pre code { padding: 0; border: 0; background: transparent; color: inherit; font-size: 14px; line-height: 1.6; }
.markdown-body hr { height: 1px; margin: 48px 0 28px; border: 0; background: var(--line); }
.markdown-body table { display: block; width: max-content; max-width: 100%; overflow-x: auto; margin: 25px 0; border-spacing: 0; border-collapse: separate; border: 1px solid var(--line); border-radius: 11px; font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; font-size: 14px; }
.markdown-body th { background: #eef3ef; color: var(--ink-900); text-align: left; }
.markdown-body th,
.markdown-body td { padding: 11px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.markdown-body th:last-child,
.markdown-body td:last-child { border-right: 0; }
.markdown-body tr:last-child td { border-bottom: 0; }
.markdown-body img { max-width: 100%; height: auto; border-radius: 12px; }
.markdown-body > p:first-of-type strong:first-child { font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; color: var(--teal-700); font-size: 13px; }

.solution-box { margin: 22px 0; border: 1px solid #b9ddd4; border-radius: 13px; background: #f1fbf8; font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; }
.solution-box summary { display: flex; align-items: center; gap: 10px; padding: 14px 17px; list-style: none; color: var(--teal-700); font-size: 14px; font-weight: 800; cursor: pointer; }
.solution-box summary::-webkit-details-marker { display: none; }
.solution-box summary::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--teal-100); }
.solution-box[open] summary::before { content: "−"; }
.solution-box .solution-content { padding: 0 17px 16px 49px; color: var(--ink-700); font-size: 14px; line-height: 1.65; }
.solution-box .solution-content p:last-child { margin-bottom: 0; }
.answer-key-box { margin: 45px 0 0; border: 1px solid var(--line-strong); border-radius: 15px; background: #fbfcfa; font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; }
.answer-key-box > summary { padding: 18px 20px; list-style: none; color: var(--ink-900); font-weight: 800; cursor: pointer; }
.answer-key-box > summary::-webkit-details-marker { display: none; }
.answer-key-box > summary::after { content: "Megnyitás"; float: right; color: var(--teal-700); font-size: 12px; }
.answer-key-box[open] > summary::after { content: "Bezárás"; }
.answer-key-content { padding: 5px 22px 24px; border-top: 1px solid var(--line); }
.answer-key-content h2 { margin-top: 28px; }

.mermaid-wrap { display: grid; place-items: center; overflow-x: auto; min-height: 170px; margin: 25px 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfa; font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; }
.mermaid-wrap svg { max-width: 100%; height: auto; }
.mermaid-fallback { color: var(--ink-500); font-size: 13px; }

.lesson-complete-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 50px; padding: 23px; border: 1px solid var(--line); border-radius: 15px; background: #f4f7f4; font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; }
.lesson-complete-card strong { display: block; }
.lesson-complete-card span { color: var(--ink-600); font-size: 13px; }
.complete-button.done { border-color: var(--teal-700); background: transparent; color: var(--teal-700); box-shadow: none; }
.lesson-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; }
.lesson-pagination a { display: flex; flex-direction: column; min-height: 88px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.lesson-pagination a:hover { border-color: #a9c8bb; }
.lesson-pagination a:last-child { align-items: flex-end; text-align: right; }
.lesson-pagination small { color: var(--ink-500); }
.lesson-pagination strong { margin-top: 4px; color: var(--ink-900); font-size: 14px; }
.in-page-nav { position: sticky; top: calc(var(--header-h) + 76px); align-self: start; max-height: calc(100vh - var(--header-h) - 100px); overflow-y: auto; }
.in-page-nav strong { display: block; margin-bottom: 12px; color: var(--ink-500); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.in-page-nav a { display: block; margin: 8px 0; padding-left: 10px; border-left: 2px solid var(--line); color: var(--ink-500); font-size: 12px; line-height: 1.4; text-decoration: none; }
.in-page-nav a:hover { border-color: var(--teal-500); color: var(--ink-900); }

.loading-state,
.error-state { display: grid; place-items: center; min-height: 55vh; padding: 40px; text-align: center; }
.loader { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--teal-600); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state h1 { margin: 14px 0 5px; font-size: 28px; }
.error-state p { max-width: 520px; color: var(--ink-600); }

.search-dialog { position: fixed; z-index: 500; inset: 0; padding: 10vh 20px 20px; background: rgba(4,22,29,.58); backdrop-filter: blur(6px); }
.search-panel { width: min(680px,100%); max-height: 76vh; overflow: hidden; margin: 0 auto; border: 1px solid rgba(255,255,255,.25); border-radius: 19px; background: white; box-shadow: var(--shadow-lg); }
.search-topline { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.search-topline label { font-size: 13px; font-weight: 800; }
.search-close { font-size: 27px; font-weight: 300; }
.search-field { position: relative; display: flex; align-items: center; margin: 0 20px 14px; }
.search-field svg { position: absolute; left: 14px; width: 20px; height: 20px; fill: none; stroke: var(--ink-500); stroke-width: 1.8; }
.search-field input { width: 100%; height: 52px; padding: 0 55px 0 44px; border: 1px solid var(--line-strong); border-radius: 11px; background: #f8faf8; color: var(--ink-950); outline: 0; }
.search-field input:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(16,153,136,.12); }
.search-field kbd { position: absolute; right: 12px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink-500); background: white; font: 11px ui-monospace, monospace; }
.search-results { max-height: 52vh; overflow-y: auto; padding: 3px 12px 16px; border-top: 1px solid var(--line); }
.search-empty { padding: 28px 12px; color: var(--ink-500); font-size: 14px; text-align: center; }
.search-result { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; }
.search-result:hover { background: #eff4f0; }
.search-result .result-code { color: var(--teal-700); font-size: 12px; font-weight: 850; }
.search-result strong { display: block; font-size: 14px; }
.search-result small { color: var(--ink-500); }
.search-result .result-arrow { color: var(--teal-700); }

.site-footer { padding: 60px max(24px, calc((100vw - var(--content)) / 2)) 24px; border-top: 1px solid var(--line); background: #eef2ee; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding-bottom: 50px; }
.footer-brand p { color: var(--ink-600); font-size: 14px; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.footer-links div { display: flex; flex-direction: column; gap: 8px; }
.footer-links strong { margin-bottom: 4px; font-size: 13px; }
.footer-links a { width: fit-content; color: var(--ink-600); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: var(--teal-700); }
.footer-note { display: flex; justify-content: space-between; gap: 30px; padding-top: 22px; border-top: 1px solid var(--line-strong); color: var(--ink-500); font-size: 11px; }

@media (max-width: 1080px) {
  .main-nav { gap: 0; }
  .main-nav a { padding-inline: 10px; }
  .hero-grid { grid-template-columns: 1fr 400px; gap: 45px; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .course-grid { grid-template-columns: 1fr 1fr; }
  .lab-grid, .exam-grid { grid-template-columns: repeat(2,1fr); }
  .reader-content-wrap { grid-template-columns: minmax(0, 740px); }
  .in-page-nav { display: none; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .site-header { grid-template-columns: 1fr auto; padding-inline: 20px; }
  .main-nav { position: fixed; z-index: 110; top: var(--header-h); right: 12px; left: 12px; display: none; flex-direction: column; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow-lg); }
  body.nav-open .main-nav { display: flex; }
  .main-nav a { padding: 12px 13px; }
  .header-continue { display: none; }
  .menu-button { display: inline-grid; }
  .hero { padding-top: 60px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .eyebrow { justify-content: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-actions, .trust-line { justify-content: center; }
  .lesson-preview { width: min(440px, 90%); margin: 10px auto 25px; transform: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .practice-split { grid-template-columns: 1fr; gap: 45px; }
  .cta-box { grid-template-columns: 1fr; }
  .exam-info-grid { grid-template-columns: 1fr; }
  .reader-shell { grid-template-columns: 1fr; }
  .course-sidebar { position: fixed; z-index: 300; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); height: 100vh; transform: translateX(-105%); box-shadow: var(--shadow-lg); transition: transform .24s ease; }
  body.sidebar-open .course-sidebar { transform: translateX(0); }
  .sidebar-head { top: 0; }
  .sidebar-close { display: inline-grid; }
  .reader-toolbar { top: var(--header-h); padding-inline: 20px; }
  .reader-menu { display: inline-grid; width: 34px; height: 34px; }
  .reader-content-wrap { padding-inline: 30px; }
  .mobile-backdrop { position: fixed; z-index: 250; inset: 0; background: rgba(4,22,29,.5); }
  body.sidebar-open .mobile-backdrop { display: block; }
}

@media (max-width: 640px) {
  .page-wrap { width: min(100% - 32px, var(--content)); }
  .brand-name { font-size: 18px; }
  .site-header .brand img { width: 38px; height: 38px; }
  .hero { padding: 45px 0 35px; }
  .hero-copy h1 { font-size: clamp(43px, 13vw, 59px); }
  .hero-copy .lead { font-size: 17px; }
  .hero-actions .button { width: 100%; }
  .trust-line { display: grid; grid-template-columns: 1fr; justify-items: center; }
  .lesson-preview { width: 100%; padding: 9px; border-radius: 21px; }
  .lesson-preview::before { display: none; }
  .preview-body { padding: 21px 19px 23px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 19px; }
  .stat strong { font-size: 25px; }
  .section { padding: 65px 0; }
  .section-head { margin-bottom: 30px; }
  .method-grid, .course-grid { grid-template-columns: 1fr; }
  .method-card { min-height: auto; }
  .course-card { min-height: 245px; }
  .practice-board { grid-template-columns: 1fr; }
  .practice-card:first-child { grid-column: auto; grid-template-columns: auto 1fr; }
  .practice-card:first-child b { display: none; }
  .cta-box { padding: 31px 25px; }
  .cta-box .button { width: 100%; }
  .page-hero { padding: 48px 0 35px; }
  .chapter-panel summary { grid-template-columns: auto 1fr auto; gap: 12px; padding: 17px 15px; }
  .chapter-panel .summary-progress { display: none; }
  .chapter-panel summary h2 { font-size: 17px; }
  .lesson-list { padding: 7px 15px 15px; }
  .lesson-row { grid-template-columns: 1fr auto; gap: 8px; padding: 6px 0; }
  .lesson-time { display: none; }
  .lab-grid, .exam-grid, .resource-grid { grid-template-columns: 1fr; }
  .content-section-head { align-items: start; flex-direction: column; gap: 7px; }
  .keyword-list { grid-template-columns: 1fr; }
  .reader-content-wrap { padding: 33px 19px 70px; }
  .markdown-body { font-size: 16.5px; line-height: 1.75; }
  .markdown-body h1 { font-size: 34px; }
  .markdown-body h2 { margin-top: 45px; font-size: 25px; }
  .markdown-body h3 { font-size: 20px; }
  .markdown-body table { font-size: 12px; }
  .markdown-body th, .markdown-body td { padding: 9px; }
  .reader-action span { display: none; }
  .lesson-complete-card { align-items: stretch; flex-direction: column; }
  .lesson-complete-card .button { width: 100%; }
  .lesson-pagination { grid-template-columns: 1fr; }
  .lesson-pagination a:last-child { align-items: flex-start; text-align: left; }
  .site-footer { padding-inline: 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 35px; }
  .footer-note { flex-direction: column; gap: 7px; }
  .search-dialog { padding-top: 5vh; }
  .search-field kbd { display: none; }
  .search-field input { padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .site-header, .site-footer, .course-sidebar, .reader-toolbar, .in-page-nav, .lesson-complete-card, .lesson-pagination { display: none !important; }
  .reader-shell, .reader-content-wrap { display: block; padding: 0; }
  .markdown-body { max-width: none; color: black; font-size: 11pt; }
  .solution-box, .answer-key-box { break-inside: avoid; }
  .solution-box .solution-content, .answer-key-content { display: block !important; }
}
