/* ================================
   VBF Felkészítő — design system (Bp Szakik brand)
   ================================ */

/* Self-hosted variable fonts (a bpszaki közös font-store-ja) */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/jetbrains-mono/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/jetbrains-mono/jetbrains-mono-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand — Bp Szakik tokenek */
  --c-primary: #111111;        /* almost-black ink */
  --c-primary-dark: #000000;
  --c-primary-light: #F2F1EC;  /* warm paper-dark */
  --c-accent: #F5B800;         /* electrician yellow */
  --c-accent-dark: #E5AB00;
  --c-accent-light: #FFF6D6;
  --c-success: #10b981;        /* semantic green — marad */
  --c-success-light: #d1fae5;
  --c-danger: #C0392B;         /* bpszaki danger */
  --c-danger-light: #FBE9E7;
  --c-info: #0e7490;           /* deep teal info (sárgával jó kontraszt) */
  --c-info-light: #cffafe;
  --c-purple: #6d28d9;
  --c-purple-light: #ede9fe;

  /* Neutrals — Bp Szakik paper/ink palette */
  --c-bg: #FAFAF7;             /* warm off-white paper */
  --c-bg-dark: #F2F1EC;
  --c-surface: #FFFFFF;
  --c-border: #E4E2DA;         /* warm rule */
  --c-border-soft: #EFEDE6;
  --c-text: #111111;           /* near-black ink */
  --c-text-soft: #5A5A5A;
  --c-text-muted: #8A8A85;
  --c-code-bg: #F0EEE5;

  /* Layout */
  --sidebar-w: 280px;
  --topbar-h: 60px;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(17,17,17,.04);
  --shadow-md: 0 4px 12px rgba(17,17,17,.06), 0 2px 4px rgba(17,17,17,.03);
  --shadow-lg: 0 12px 32px rgba(17,17,17,.08), 0 4px 8px rgba(17,17,17,.04);

  --font-sans: 'Inter Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-text); text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; }

::selection { background: var(--c-accent); color: var(--c-text); }

/* ================================
   TOPBAR
   ================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: rgba(250,250,247,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  z-index: 100;
}

/* Back to bpszaki link a topbar bal oldalán */
.back-to-main {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--c-text-soft);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.back-to-main:hover {
  background: var(--c-bg-dark); color: var(--c-text);
  text-decoration: none !important;
}
.back-to-main .back-arrow { font-size: 14px; }
.menu-toggle {
  background: transparent; border: none; font-size: 22px; cursor: pointer;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: none; align-items: center; justify-content: center;
}
.menu-toggle:hover { background: var(--c-bg); }

.brand {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-weight: 700; font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--c-text);
  line-height: 1;
}
.brand-bp { color: var(--c-text); }
.brand-szak {
  position: relative;
  color: var(--c-text);
}
.brand-szak::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(calc(-50% + 0.55em));
  top: -0.42em;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: var(--c-accent);
}
.brand-divider {
  color: var(--c-text-muted);
  font-weight: 400;
  margin: 0 4px;
}
.brand-sub {
  font-size: 14px;
  color: var(--c-text-soft);
  font-weight: 500;
}

.progress-wrap {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
  min-width: 200px;
}
.progress-bar {
  flex: 1; height: 8px; background: var(--c-border);
  border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--c-accent);
  border-radius: 99px;
  width: 0%;
  transition: width .4s ease;
}
.progress-label {
  font-size: 13px; font-weight: 600;
  color: var(--c-text-soft);
  min-width: 36px; text-align: right;
}

.icon-btn {
  background: transparent; border: 1px solid var(--c-border);
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-soft);
  transition: all .15s;
}
.icon-btn:hover { background: var(--c-bg); color: var(--c-text); }

/* ================================
   LAYOUT
   ================================ */
.layout {
  display: flex;
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

/* ================================
   SIDEBAR
   ================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  position: fixed;
  top: var(--topbar-h);
  bottom: 0; left: 0;
  overflow-y: auto;
  display: flex; flex-direction: column;
  z-index: 50;
  transition: transform .25s ease;
}
.nav { padding: 16px 12px; flex: 1; }
.nav-section {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--c-text-muted);
  padding: 16px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--c-text-soft);
  text-decoration: none !important;
  font-weight: 500;
  margin-bottom: 2px;
  cursor: pointer;
  transition: all .12s;
  position: relative;
}
.nav-item:hover {
  background: var(--c-bg); color: var(--c-text);
}
.nav-item.active {
  background: var(--c-accent-light);
  color: var(--c-text);
  font-weight: 600;
  border-left: 3px solid var(--c-accent);
  padding-left: 9px;
}
.nav-emoji { width: 24px; text-align: center; font-size: 16px; }
.nav-text { flex: 1; font-size: 14px; }
.nav-num {
  font-size: 11px; font-weight: 700;
  background: var(--c-border); color: var(--c-text-soft);
  padding: 2px 8px; border-radius: 99px;
}
.nav-item.active .nav-num {
  background: var(--c-text); color: var(--c-bg);
}
.nav-item.completed .nav-emoji::after {
  content: '✓'; position: absolute;
  top: -2px; right: 6px;
  background: var(--c-success); color: white;
  width: 14px; height: 14px; border-radius: 99px;
  font-size: 9px; line-height: 14px; text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--c-border);
}
.footer-text { font-size: 13px; font-weight: 600; color: var(--c-text-soft); }
.footer-sub { font-size: 11px; color: var(--c-text-muted); margin-top: 2px; }

/* ================================
   MAIN
   ================================ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px 40px 60px;
  max-width: 100%;
}
.view { display: none; animation: fadeIn .3s ease; }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================
   HERO
   ================================ */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 48px 40px 56px;
  margin-bottom: 32px;
  overflow: hidden;
  background: var(--c-bg-dark);
  border: 1px solid var(--c-border);
  color: var(--c-text);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(245,184,0,.18) 0%, transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(245,184,0,.10) 0%, transparent 35%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--c-accent-light);
  border: 1px solid var(--c-accent);
  border-radius: 99px;
  font-size: 12px; font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text);
}
.hero-title {
  font-size: 44px; font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -1px;
  color: var(--c-text);
  text-wrap: balance;
}
.gradient-text {
  color: var(--c-text-soft);
}
.hero-sub {
  font-size: 17px; max-width: 640px;
  color: var(--c-text-soft);
  margin: 0 0 32px;
  line-height: 1.55;
  text-wrap: pretty;
}
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat {
  display: flex; flex-direction: column; gap: 2px;
}
.stat .stat-num {
  font-size: 32px; font-weight: 800;
  color: var(--c-text);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat .stat-lab {
  font-size: 12px; color: var(--c-text-soft);
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600;
}

/* ================================
   PAGE HEAD
   ================================ */
.page-head {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 28px;
}
.page-icon {
  width: 56px; height: 56px;
  background: var(--c-accent-light);
  color: var(--c-text);
  border: 1px solid var(--c-accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.page-head h1 { margin: 0; font-size: 32px; font-weight: 800; }
.page-sub { color: var(--c-text-soft); margin: 4px 0 0; }

.section-head { margin: 0 0 20px; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 700; }
.section-sub { color: var(--c-text-soft); margin: 4px 0 0; font-size: 14px; }

/* ================================
   MODULE GRID (overview)
   ================================ */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.module-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
}
.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-accent);
}
.module-card.locked { opacity: .55; cursor: not-allowed; }
.module-card.locked:hover { transform: none; box-shadow: var(--shadow); border-color: var(--c-border); }

.module-card-head { display: flex; align-items: center; gap: 12px; }
.module-num {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 12px; color: var(--c-text-muted);
}
.module-emoji {
  font-size: 28px; line-height: 1;
}
.module-card h3 { margin: 0; font-size: 17px; font-weight: 700; }
.module-card .module-sub {
  font-size: 14px; color: var(--c-text-soft); margin: 0;
  flex: 1;
}
.module-card .module-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 12px; color: var(--c-text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--c-border);
}
.module-card.completed::after {
  content: '✓';
  position: absolute; top: 16px; right: 16px;
  width: 24px; height: 24px;
  background: var(--c-success); color: white;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}

/* ================================
   MODULE VIEW
   ================================ */
.module-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--c-border);
}
.module-header .module-pre {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 1px;
  margin: 0 0 8px;
}
.module-header h1 {
  font-size: 38px; font-weight: 800; margin: 0;
  letter-spacing: -.5px;
}
.module-header .module-tagline {
  font-size: 17px; color: var(--c-text-soft);
  margin: 8px 0 0;
}

.toc {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 20px 0 0;
  padding: 14px 18px;
  background: var(--c-bg);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.toc-label {
  font-size: 12px; font-weight: 700;
  color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .5px;
  padding-right: 8px; border-right: 1px solid var(--c-border);
  margin-right: 4px;
}
.toc a {
  font-size: 13px; padding: 4px 10px;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 99px;
  color: var(--c-text-soft);
  font-weight: 500;
  transition: all .15s;
}
.toc a:hover { background: var(--c-accent-light); border-color: var(--c-accent); color: var(--c-text); text-decoration: none; }

.section {
  margin: 40px 0;
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}
.section-title {
  font-size: 26px; font-weight: 700; margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-title-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--c-accent-light);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 20px;
}

/* Theory blocks */
.theory p { margin: 12px 0; }
.theory h3 { font-size: 19px; font-weight: 700; margin: 24px 0 8px; }
.theory ul, .theory ol { padding-left: 24px; }
.theory li { margin: 6px 0; }

.callout {
  display: flex; gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  border-left: 4px solid;
  background: var(--c-surface);
  box-shadow: var(--shadow);
}
.callout-icon { font-size: 22px; line-height: 1.4; }
.callout-body { flex: 1; }
.callout-title { font-weight: 700; margin-bottom: 4px; }

.callout.info { border-left-color: var(--c-info); background: var(--c-info-light); }
.callout.info .callout-title { color: #0e7490; }
.callout.warn { border-left-color: var(--c-accent); background: var(--c-accent-light); }
.callout.warn .callout-title { color: #b45309; }
.callout.danger { border-left-color: var(--c-danger); background: var(--c-danger-light); }
.callout.danger .callout-title { color: #b91c1c; }
.callout.success { border-left-color: var(--c-success); background: var(--c-success-light); }
.callout.success .callout-title { color: #047857; }
.callout.tip { border-left-color: var(--c-purple); background: var(--c-purple-light); }
.callout.tip .callout-title { color: #6d28d9; }

/* Definition cards */
.def-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin: 20px 0;
}
.def-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .15s;
}
.def-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.def-card .def-term {
  font-weight: 700; font-size: 16px; color: var(--c-text);
  margin: 0 0 6px;
  display: flex; align-items: center; gap: 8px;
}
.def-card .def-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--c-accent-light); color: var(--c-text);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.def-card .def-text { font-size: 14.5px; color: var(--c-text-soft); margin: 0; }
.def-card .def-note {
  margin-top: 10px; padding: 8px 12px;
  background: var(--c-accent-light); color: #b45309;
  font-size: 13px; border-radius: var(--radius-sm);
  font-weight: 500;
}

/* Compare two */
.compare-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin: 20px 0;
}
@media (max-width: 700px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 2px solid;
}
.compare-card.alap { border-color: var(--c-info); background: var(--c-info-light); }
.compare-card.hiba { border-color: var(--c-danger); background: var(--c-danger-light); }
.compare-card h4 {
  margin: 0 0 12px; font-size: 18px;
  display: flex; align-items: center; gap: 8px;
}
.compare-card.alap h4 { color: #0e7490; }
.compare-card.hiba h4 { color: #b91c1c; }
.compare-card p { margin: 0 0 8px; font-size: 14.5px; }
.compare-card .compare-eq {
  margin-top: 14px; padding: 10px 14px;
  background: rgba(255,255,255,.7);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  text-align: center;
}

/* SVG figure */
.figure {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
}
.figure svg { width: 100%; height: auto; max-width: 100%; display: block; }
.figure-caption {
  font-size: 13.5px; color: var(--c-text-soft);
  text-align: center; margin-top: 14px; font-style: italic;
}
.figure-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.fig-btn {
  background: var(--c-bg); border: 1px solid var(--c-border);
  padding: 6px 14px; border-radius: 99px;
  font-size: 13px; cursor: pointer; font-weight: 500;
  color: var(--c-text-soft);
  transition: all .15s;
}
.fig-btn:hover { background: var(--c-accent-light); border-color: var(--c-accent); color: var(--c-text); }
.fig-btn.active { background: var(--c-text); color: var(--c-bg); border-color: var(--c-text); }

/* Interactive SVG elements */
.svg-hot {
  cursor: pointer;
  transition: opacity .15s;
}
.svg-hot:hover { opacity: .75; }
.svg-tooltip {
  position: absolute;
  background: var(--c-text);
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .15s;
}
.svg-tooltip.visible { opacity: 1; }
.svg-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--c-text);
}

/* ================================
   QUIZ
   ================================ */
.quiz-wrap {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 28px;
}
.quiz-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.quiz-progress {
  font-size: 13px; color: var(--c-text-muted);
  font-family: var(--font-mono);
}
.quiz-score {
  font-size: 14px; font-weight: 600;
  padding: 4px 12px; border-radius: 99px;
  background: var(--c-bg);
}
.quiz-question {
  font-size: 18px; font-weight: 600;
  margin: 0 0 18px;
  line-height: 1.4;
}
.quiz-options {
  display: flex; flex-direction: column; gap: 10px;
}
.quiz-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px;
  background: var(--c-bg);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 15px;
  transition: all .12s;
  text-align: left;
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--c-accent);
  background: var(--c-accent-light);
}
.quiz-option .opt-letter {
  font-weight: 700; color: var(--c-text);
  min-width: 24px;
}
.quiz-option:disabled { cursor: default; }
.quiz-option.correct {
  border-color: var(--c-success); background: var(--c-success-light);
}
.quiz-option.correct .opt-letter { color: var(--c-success); }
.quiz-option.wrong {
  border-color: var(--c-danger); background: var(--c-danger-light);
}
.quiz-option.wrong .opt-letter { color: var(--c-danger); }

.quiz-feedback {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14.5px;
}
.quiz-feedback.correct { background: var(--c-success-light); color: #047857; border-left: 4px solid var(--c-success); }
.quiz-feedback.wrong { background: var(--c-danger-light); color: #b91c1c; border-left: 4px solid var(--c-danger); }
.quiz-feedback strong { display: block; margin-bottom: 4px; }

.quiz-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn {
  background: var(--c-text); color: var(--c-bg);
  border: none; padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .15s;
  font-family: var(--font-sans);
}
.btn:hover { background: var(--c-text-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--c-text-soft);
  border: 1px solid var(--c-border);
}
.btn-ghost:hover { background: var(--c-bg); color: var(--c-text); }

.quiz-done {
  text-align: center;
  padding: 32px 20px;
}
.quiz-done .quiz-done-emoji { font-size: 56px; line-height: 1; margin-bottom: 12px; }
.quiz-done h3 { margin: 0 0 8px; font-size: 24px; }
.quiz-done .quiz-final-score {
  display: inline-block;
  font-family: var(--font-mono); font-size: 36px; font-weight: 800;
  color: var(--c-text);
  margin: 8px 0 20px;
  font-variant-numeric: tabular-nums;
}

/* Key terms / summary */
.keypoints {
  background: var(--c-accent-light);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 20px 0;
  border-left: 4px solid var(--c-accent);
}
.keypoints h3 {
  margin: 0 0 14px; font-size: 18px;
  color: var(--c-text);
  display: flex; align-items: center; gap: 8px;
}
.keypoints ul { margin: 0; padding-left: 22px; }
.keypoints li { margin: 8px 0; font-size: 15px; }
.keypoints li strong { color: var(--c-text); }

/* ================================
   QUIZ TABS
   ================================ */
.quiz-tabs {
  display: flex; gap: 8px;
  margin-bottom: 16px;
  background: var(--c-bg);
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.quiz-tab {
  flex: 1; min-width: 240px;
  background: transparent;
  border: none;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text-soft);
  text-align: left;
  transition: all .15s;
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-sans);
}
.quiz-tab:hover { background: rgba(255,255,255,.6); color: var(--c-text); }
.quiz-tab.active {
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow);
}
.quiz-tab-sub {
  font-size: 12px; font-weight: 400;
  color: var(--c-text-muted);
}
.quiz-pane { display: none; }
.quiz-pane.active { display: block; animation: fadeIn .2s ease; }

/* ================================
   SZOBELI LIST
   ================================ */
.szobeli-list {
  list-style: none; padding: 0;
  counter-reset: szobeli;
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
.szobeli-list li {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-info);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14.5px;
  line-height: 1.5;
  display: flex; gap: 12px; align-items: flex-start;
}
.szobeli-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-info);
  background: var(--c-info-light);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  align-self: flex-start;
  min-width: 64px; text-align: center;
}

/* Standards list */
.std-list {
  list-style: none; padding: 0; margin: 16px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.std-list li {
  padding: 12px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
}
.std-list .std-code {
  font-family: var(--font-mono); font-weight: 700;
  color: var(--c-text);
}

/* ================================
   JOGSZABALYOK / SZABVANYOK
   ================================ */
.jogsz-search-wrap {
  display: flex; gap: 10px;
  margin: 0 0 28px;
  position: sticky; top: calc(var(--topbar-h) + 0px); z-index: 10;
  background: var(--c-bg);
  padding: 12px 0;
}
.jogsz-search {
  flex: 1;
  padding: 12px 18px;
  font-size: 15px;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  font-family: var(--font-sans);
  transition: border-color .15s;
}
.jogsz-search:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-light);
}

.jogsz-result-info {
  padding: 10px 16px;
  margin-bottom: 16px;
  background: var(--c-info-light);
  color: #0e7490;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
}

.jogsz-content { display: flex; flex-direction: column; gap: 32px; }

.jogsz-cat-title {
  margin: 0 0 14px;
  padding: 8px 0 8px 16px;
  font-size: 18px; font-weight: 700;
  border-left: 4px solid var(--c-accent);
  color: var(--c-text);
}
.jogsz-count {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
  margin-left: 6px;
}

.jogsz-cat { display: flex; flex-direction: column; gap: 12px; }
.jogsz-empty {
  color: var(--c-text-muted);
  font-style: italic;
  padding: 16px;
  text-align: center;
}

.jogsz-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: all .15s;
}
.jogsz-item:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-md);
}
.jogsz-item.jogsz-key {
  border-left: 4px solid var(--c-accent);
  background: linear-gradient(to right, var(--c-accent-light) 0%, var(--c-surface) 8%);
}
.jogsz-item.jogsz-withdrawn {
  opacity: .75;
  background: var(--c-bg);
}

.jogsz-item-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.jogsz-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--c-text);
}
.jogsz-shortname {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--c-text-soft);
  font-size: 13px;
}
.jogsz-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.jogsz-badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--c-bg);
  color: var(--c-text-soft);
}
.jogsz-badge-key {
  background: var(--c-accent-light);
  color: #b45309;
}
.jogsz-badge-withdrawn {
  background: var(--c-danger-light);
  color: #b91c1c;
}
.jogsz-badge-year {
  background: var(--c-info-light);
  color: #0e7490;
  font-family: var(--font-mono);
}

.jogsz-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  margin: 4px 0 8px;
}
.jogsz-desc {
  font-size: 14px;
  color: var(--c-text-soft);
  line-height: 1.55;
}

.jogsz-modules {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--c-border);
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.jogsz-mod-label {
  font-size: 12px; font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase; letter-spacing: .5px;
  margin-right: 4px;
}
.jogsz-mod-link {
  display: inline-block;
  padding: 4px 10px;
  background: var(--c-accent-light);
  color: var(--c-text);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all .15s;
}
.jogsz-mod-link:hover {
  background: var(--c-accent);
  color: var(--c-text);
  transform: translateY(-1px);
}

.jogsz-url {
  margin-top: 8px;
  font-size: 12px;
}
.jogsz-url a {
  color: var(--c-info);
  word-break: break-all;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--c-text-muted);
  font-size: 16px;
  background: var(--c-surface);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 24px 20px 60px; }
  .hero { padding: 36px 24px 44px; }
  .hero-title { font-size: 32px; }
  .progress-wrap { min-width: 130px; }
  .brand-text { display: none; }
  .module-header h1 { font-size: 28px; }
}
@media (max-width: 500px) {
  .hero-stats { gap: 18px; }
  .stat .stat-num { font-size: 28px; }
  .progress-wrap { min-width: 100px; }
  .progress-label { display: none; }
}

/* ================================
   PUSKA (osszes modul)
   ================================ */
.puska-toolbar {
  position: sticky;
  top: calc(var(--topbar-h) + 0px);
  z-index: 10;
  background: var(--c-bg);
  padding: 12px 0;
  margin: 0 0 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.puska-jumps {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.puska-jump {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-soft);
  text-decoration: none !important;
  transition: all .12s;
}
.puska-jump:hover {
  background: var(--c-text);
  color: var(--c-bg);
  border-color: var(--c-text);
  transform: translateY(-1px);
}
.puska-jump-emoji { font-size: 14px; }

.puska-actions {
  display: flex;
  gap: 8px;
}

.puska-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.puska-block {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  page-break-inside: avoid;
  break-inside: avoid;
}

.puska-block-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(90deg, var(--c-accent-light), var(--c-bg));
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.puska-block-emoji {
  font-size: 24px;
}
.puska-block-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
  flex: 1;
  min-width: 200px;
}
.puska-block-tag {
  font-size: 12px;
  color: var(--c-text-muted);
  font-style: italic;
  max-width: 50%;
  text-align: right;
}

.puska-block-body {
  padding: 18px 24px;
  font-size: 14px;
  line-height: 1.6;
}
.puska-block-body ul {
  margin: 0;
  padding-left: 22px;
}
.puska-block-body ul ul {
  margin-top: 4px;
}
.puska-block-body li {
  margin: 6px 0;
}
.puska-block-body strong {
  color: var(--c-text);
}
.puska-block-body code {
  background: var(--c-bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.puska-block-body h3 {
  margin: 12px 0 8px;
  font-size: 15px;
  font-weight: 700;
}
.puska-block-body p {
  margin: 8px 0;
}

/* Collapsed state */
.puska-block.collapsed .puska-block-body {
  display: none;
}
.puska-block.collapsed .puska-block-head {
  background: var(--c-bg);
  border-bottom: none;
}
.puska-block.collapsed .puska-block-head::after {
  content: '▼';
  font-size: 10px;
  color: var(--c-text-muted);
}
.puska-block:not(.collapsed) .puska-block-head::after {
  content: '▲';
  font-size: 10px;
  color: var(--c-text-muted);
}

/* Print (puska) */
@media print {
  .topbar, .sidebar, .nav { display: none !important; }
  .main { margin-left: 0; padding: 0; }
  .module-header { page-break-after: avoid; }
  .quiz-wrap, .figure-actions { display: none; }
  .no-print { display: none !important; }
  .puska-print-header { display: block !important; padding: 0 0 16px; border-bottom: 2px solid #000; margin-bottom: 16px; }
  .puska-print-header h1 { font-size: 22px; margin: 0 0 8px; }
  .puska-print-header p { font-size: 11px; color: #555; margin: 0; }
  .puska-block { break-inside: avoid; page-break-inside: avoid; margin-bottom: 12px; border: 1px solid #999; }
  .puska-block.collapsed .puska-block-body { display: block !important; }
  .puska-block-head { background: #f0f0f0; padding: 6px 12px; }
  .puska-block-head::after { display: none !important; }
  .puska-block-title { font-size: 14px; }
  .puska-block-body { padding: 8px 12px; font-size: 11px; line-height: 1.4; }
  .puska-block-body li { margin: 2px 0; }
  body { font-size: 11px; }
}
