/* ==========================================================================
   Rubikube — extra.css (v1.0)
   Additív UI-réteg. Mindig a styles.css UTÁN töltendő be.
   Nem ír felül meglévő komponenst felismerhetetlenül: csak ráépül.
   Tulajdonos: product-ux. Integrációs szerződés: docs/ux.md
   ========================================================================== */

/* ---------- alap finomítások ---------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-wrap: break-word; }
/* a grid-sáv ne nőjön a tartalom min-content méretéig (hosszú kódsorok!) */
#app { min-width: 0; }
.main { min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .card, .modcard, .prog-row, .btn, .foot-link, .tree a.item { transition: transform .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
::selection { background: #8b5cf6; color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sidebar, .tree, .md pre, .cv-wrap { scrollbar-width: thin; scrollbar-color: #33405e transparent; }
.sidebar::-webkit-scrollbar, .tree::-webkit-scrollbar, .md pre::-webkit-scrollbar, .cv-wrap::-webkit-scrollbar { width: 9px; height: 9px; }
.sidebar::-webkit-scrollbar-thumb, .tree::-webkit-scrollbar-thumb, .md pre::-webkit-scrollbar-thumb, .cv-wrap::-webkit-scrollbar-thumb { background: #2a3550; border-radius: 999px; }
.sidebar::-webkit-scrollbar-thumb:hover, .tree::-webkit-scrollbar-thumb:hover, .md pre::-webkit-scrollbar-thumb:hover { background: #3a4b6d; }
.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; }

/* ---------- dashboard polish ---------- */
.hero h1 { line-height: 1.1; }
.hero .bar { max-width: 560px; }
.stats .stat { min-width: 92px; }
.modcard { overflow: hidden; }
.modcard:hover { transform: translateY(-2px); border-color: #3a4b6d; }
.modcard:active { transform: translateY(0); }
.modcard.done:hover { border-color: #22c55e; }
.modcard.wip:hover { border-color: #8b5cf6; }
.modcard .modhead + .modbar { margin-top: 2px; }
.modbar > i, .bar > i { transition: width .35s ease; }
.next-card { overflow: hidden; }
.next-card:hover { box-shadow: 0 10px 34px rgba(139, 92, 246, .12); }
.next-card .btn { flex: 0 0 auto; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, var(--line), transparent); }
.ob-banner b { color: var(--text); }
.ob-banner .btn { flex: 0 0 auto; }

/* körkörös haladás-jelző (opcionális, account + későbbi dashboard) */
.ring {
  --p: 0;
  --ring-size: 108px;
  width: var(--ring-size); height: var(--ring-size);
  border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(#8b5cf6 calc(var(--p) * 1%), #141b2b 0);
  display: grid; place-items: center; position: relative;
}
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg-2); }
.ring > span { position: relative; text-align: center; line-height: 1.1; }
.ring b { display: block; font-size: 22px; }
.ring small { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; }
.ring.ready { background: conic-gradient(#22c55e calc(var(--p) * 1%), #141b2b 0); }

/* kártya akcentus-sáv (pl. modul-szín) */
.facebar { opacity: .95; }
/* a sidebar modul-sorában a státusz-ikon ne tapadjon a modul emojijához */
.item.mod .mic { flex: 0 0 auto; font-size: 11px; line-height: 1; }

/* ---------- lecke: akciósáv, kód, táblázat ---------- */
.lesson-head .meta .btn { flex: 0 0 auto; }
.lesson-head .meta .chip { line-height: 1.5; }
.md code { overflow-wrap: anywhere; }
.md pre { max-width: 100%; scrollbar-width: thin; }
.md pre code { font-size: 13px; line-height: 1.65; display: block; white-space: pre; }
.md pre { position: relative; }
.md blockquote code { background: #0b0f18; }
/* mobilon görgethető táblázat: a táblázat blokkká válik, a sorok belső
   anonim táblában maradnak, így az igazítás megmarad és oldalra görgethető */
.md table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.md table th, .md table td { white-space: normal; min-width: 88px; }
.md img { max-width: 100%; height: auto; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 26px 0; }
.md h2:first-child, .md h3:first-child { margin-top: 0; }
.pager { flex-wrap: wrap; }
.pager .btn { flex: 0 1 auto; }

/* admin táblázatok mobilon görgethetők */
@media (max-width: 900px) {
  table.tbl { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  table.tbl th, table.tbl td { white-space: nowrap; }
}

/* ---------- vászon mobilon ---------- */
@media (max-width: 900px) {
  .cv-wrap { height: calc(100vh - 210px); min-height: 320px; }
  .cv-hint { display: none; }
}

/* ---------- PWA telepítési tipp ---------- */
.pwa-hint {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 95;
  display: flex; align-items: center; gap: 10px;
  background: rgba(15, 20, 32, .97); border: 1px solid #33405e; border-radius: 999px;
  padding: 7px 9px 7px 16px; font-size: 13px; color: var(--text);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  max-width: calc(100vw - 24px);
}
.pwa-hint .btn { padding: 6px 13px; border-radius: 999px; }
.pwa-hint .pwa-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 4px 7px; border-radius: 8px; display: inline-flex; align-items: center; }
.pwa-hint .pwa-x .ic { width: 14px; height: 14px; }
.pwa-hint .pwa-x:hover { color: var(--text); background: var(--bg-3); }
@media (max-width: 600px) {
  .pwa-hint {
    left: 12px; right: 12px; bottom: 10px; transform: none;
    max-width: none; justify-content: space-between; border-radius: 14px;
    padding: 8px 8px 8px 13px; font-size: 12.5px; gap: 8px;
  }
  .pwa-hint > span { flex: 1 1 auto; }
}
.before-install { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .pwa-hint { animation: pwa-in .25s ease both; }
  @keyframes pwa-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
}

/* ==========================================================================
   SIDEBAR — off-canvas mobil (<=900px)
   Szerződés: a toggle a `body.sidebar-open` osztályt kapcsolja (app.js/pwa.js),
   a menügomb a sidebaron belül `#menuBtn`, a háttér a `#backdrop` (vagy body::after).
   A #app.sidebar-open változat is támogatott, ha később arra váltunk.
   ========================================================================== */
@media (max-width: 900px) {
  html, body { max-width: 100%; }
  body { overflow-x: hidden; }
  /* 1fr helyett minmax(0,1fr): a hosszú kódsorok ne feszítsék szét az oldalt */
  #app { grid-template-columns: minmax(0, 1fr); }
  .main { width: 100%; max-width: 100%; }
  .topbar, .lesson-head, .md, .pager, .prog-group, .grid, .modgrid { min-width: 0; }

  /* a zárt sidebar a nézet bal oldalán kívül parkol, NEM transformmal
     (transform ugyanis befogná a position:fixed menügombot) */
  .sidebar {
    display: block;
    position: fixed; top: 0; bottom: 0; left: -100%;
    width: 86%; max-width: 340px; height: 100vh;
    overflow-y: auto; z-index: 70;
    visibility: hidden; pointer-events: none;
    border-right: 1px solid var(--line);
    box-shadow: 0 0 70px rgba(0, 0, 0, .65);
    transition: left .22s ease, visibility .22s ease;
  }
  body.sidebar-open .sidebar,
  #app.sidebar-open .sidebar {
    left: 0; visibility: visible; pointer-events: auto;
    display: block; position: fixed; top: 0; bottom: 0; right: auto;
    width: 86%; max-width: 340px; height: 100vh; overflow-y: auto; z-index: 70;
  }

  /* a menügomb a sidebar DOM-gyereke, de fixed → a viewport jobb felső sarkában
     marad akkor is, amikor a sidebar zárt (overflow nem vágja, mert a containing
     block a viewport). A zárt sidebar visibility:hidden-jét felülírjuk. */
  .menu-btn {
    display: grid; place-items: center;
    position: fixed; top: 12px; right: 12px; left: auto; bottom: auto;
    width: 40px; height: 40px; padding: 0;
    z-index: 90; border-radius: 12px;
    background: rgba(15, 20, 32, .94); border: 1px solid var(--line);
    color: var(--text); font-size: 17px; line-height: 1;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    visibility: visible; pointer-events: auto;
  }
  .menu-btn:hover { border-color: #8b5cf6; }
  .menu-btn .ic { width: 18px; height: 18px; }
  .menu-btn .ic-x { display: none; }
  body.sidebar-open .menu-btn .ic-menu,
  #app.sidebar-open .menu-btn .ic-menu { display: none; }
  body.sidebar-open .menu-btn .ic-x,
  #app.sidebar-open .menu-btn .ic-x { display: inline-block; }

  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .backdrop,
  #app.sidebar-open .backdrop {
    display: block; position: fixed; inset: 0;
    background: rgba(3, 6, 12, .64); z-index: 65;
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  }
  /* fallback, ha valaki body::after backdroppal integrál */
  #app.sidebar-open::after {
    content: ""; position: fixed; inset: 0;
    background: rgba(3, 6, 12, .64); z-index: 65;
  }

  .main { padding: 64px 16px 64px; }
  .topbar { flex-wrap: wrap; justify-content: flex-start; gap: 10px; margin-bottom: 20px; }
  .topbar .userchip { margin-left: auto; max-width: 100%; }
  .hero h1 { font-size: 28px; letter-spacing: -.6px; }
  .hero p.tag { font-size: 15px; }
  .grid, .modgrid { grid-template-columns: 1fr; }
  .stats { gap: 18px; }
  .lesson-head h1 { font-size: 25px; }
  .lesson-head .meta .btn { flex: 1 1 46%; min-height: 40px; }
  .lesson-head .meta { gap: 8px; }
  .pager .btn { flex: 1 1 100%; text-align: center; }
  .modal { padding: 20px; }
  .modal .row { flex-wrap: wrap; }
  .modal .row .btn { flex: 1 1 auto; }
  .pwa-hint { bottom: 12px; }
}

@media (max-width: 600px) {
  .main { padding: 62px 14px 56px; }
  .hero h1 { font-size: 25px; }
  .hero .bar { max-width: 100%; }
  .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cert { padding: 30px 18px; }
  .cert-name { font-size: 25px; }
  .cert-seal { right: 14px; bottom: 12px; width: 38px; height: 38px; font-size: 18px; }
  .next-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .next-card .btn { text-align: center; }
  .ob-banner { padding: 12px 14px; }
  .ob-banner .btn { margin-left: 0; width: 100%; text-align: center; }
  .section-title { margin: 28px 0 10px; }
  .prog-row { flex-wrap: wrap; }
  .prog-row .t { flex: 1 1 70%; }
}

@media (max-width: 400px) {
  .main { padding: 58px 12px 52px; }
  .userchip { font-size: 12px; padding: 5px 6px 5px 10px; }
  .userchip .avatar { width: 22px; height: 22px; }
  .btn { padding: 7px 11px; }
}

/* ==========================================================================
   FIÓKOM — /account.html
   ========================================================================== */
.acct-body { background: radial-gradient(1100px 600px at 20% -10%, #121a2b, var(--bg) 60%); min-height: 100vh; }
.acct-skip { position: absolute; left: -9999px; top: 0; background: var(--bg-3); color: var(--text); padding: 10px 14px; border-radius: 0 0 10px 0; z-index: 200; }
.acct-skip:focus { left: 0; }

.acct-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(18px, calc((100vw - 1120px) / 2));
  background: rgba(10, 13, 20, .82); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.acct-back { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.acct-back:hover { color: var(--text); border-color: #3a4b6d; }
.acct-brand { display: inline-flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 16px; }
.acct-brand small { color: var(--muted); font-weight: 400; font-size: 12px; }

.acct-main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 30px 18px 90px; }
.acct-hero { margin-bottom: 22px; }
.acct-hero h1 { font-size: 34px; letter-spacing: -.8px; margin: 0 0 4px; }
.acct-hero p { color: var(--muted); margin: 0; font-size: 14.5px; }

.acct-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; min-width: 0; }
.acct-card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.acct-card h2 .acct-h2-right { float: right; text-transform: none; letter-spacing: 0; font-weight: 400; }
.acct-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.acct-cols > .acct-card { margin-bottom: 16px; }
.acct-cols > .acct-card:only-child { grid-column: 1 / -1; }
.acct-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.acct-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acct-muted { color: var(--muted); font-size: 12.5px; }
.acct-note { color: var(--muted); font-size: 12px; margin-top: 12px; line-height: 1.5; }
.acct-divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.acct-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.acct-kv dt { color: var(--muted); }
.acct-kv dd { margin: 0; text-align: right; }
.acct-empty { border: 1px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* profil */
.acct-profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.acct-avatar {
  width: 62px; height: 62px; flex: 0 0 auto; border-radius: 18px;
  display: grid; place-items: center; font-size: 24px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #22c55e);
  box-shadow: 0 8px 26px rgba(139, 92, 246, .28);
}
.acct-profile-head .who { flex: 1 1 220px; min-width: 0; }
.acct-profile-head .who b { display: block; font-size: 22px; letter-spacing: -.3px; overflow-wrap: anywhere; }
.acct-profile-head .who span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.acct-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.acct-code { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 15px; letter-spacing: 1.5px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; }
.acct-code button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 6px; }
.acct-code button:hover { color: var(--text); background: var(--bg-2); }

/* terv */
.acct-plan-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid #3b4d78; background: #121a2b; border-radius: 12px; padding: 13px 16px; margin-bottom: 14px; }
.acct-plan-current b { font-size: 15px; }
.acct-plans { display: grid; gap: 9px; }
.acct-plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 11px 14px; font-size: 13.5px; background: var(--bg); }
.acct-plan .nm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.acct-plan .price { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.acct-plan.on { border-color: #8b5cf6; background: #151a33; box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .35); }
.acct-plan.on .price { color: #c4b5fd; }
.acct-plan .pill { flex: 0 0 auto; }

/* haladás */
.acct-progress-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.acct-progress-top .nums { flex: 1 1 180px; }
.acct-progress-top .nums b { font-size: 26px; display: block; letter-spacing: -.5px; }
.acct-progress-top .nums span { color: var(--muted); font-size: 12.5px; }
.acct-modlist { display: grid; gap: 7px; max-height: 330px; overflow: auto; padding-right: 4px; }
.acct-mod { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 5px 6px; border-radius: 8px; min-width: 0; }
.acct-mod:hover { background: var(--bg-3); }
.acct-mod .em { flex: 0 0 auto; }
.acct-mod .tt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-mod .mn { color: var(--muted); font-size: 11px; flex: 0 0 auto; }
.acct-mod .mini { flex: 0 0 84px; height: 5px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.acct-mod .mini > i { display: block; height: 100%; background: linear-gradient(90deg, #8b5cf6, #22c55e); }
.acct-mod.locked { opacity: .5; }
.acct-mod.done .am-ok { color: var(--ok); display: inline-flex; flex: 0 0 auto; }
.acct-mod.done .am-ok .ic { width: 14px; height: 14px; }

/* bizonyítvány */
.acct-cert { position: relative; border: 1px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; background: var(--bg); }
.acct-cert.ready { border: 1px solid #22c55e; background: radial-gradient(circle at 50% 0%, #0e2a1a, #0f1420 72%); }
.acct-cert .cube { display: flex; justify-content: center; }
.acct-cert .cube .brand-mark { width: 42px; height: 42px; border-radius: 11px; }
.acct-cert .t { letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-size: 11px; margin-top: 6px; }
.acct-cert .n { font-size: 30px; font-weight: 700; letter-spacing: -.6px; margin: 8px 0 4px; }
.acct-cert .l { color: var(--muted); }
.acct-cert .m { margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.acct-cert .seal { position: absolute; right: 16px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #22c55e; display: grid; place-items: center; color: #22c55e; font-size: 19px; }

/* onboarding wizard */
.acct-wiz-steps { display: flex; gap: 8px; margin-bottom: 18px; }
.acct-wiz-step { flex: 1; border-top: 2px solid var(--line); padding-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); }
.acct-wiz-step.on { border-color: var(--accent); color: var(--text); }
.acct-wiz-step.done { border-color: var(--ok); color: #7ee2a7; }
.acct-wiz-panel { display: none; }
.acct-wiz-panel.on { display: block; }
.acct-pathgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.acct-path { display: block; cursor: pointer; position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: var(--bg); transition: border-color .12s ease, background-color .12s ease; }
.acct-path:hover { border-color: #3a4b6d; }
.acct-path input { position: absolute; opacity: 0; pointer-events: none; }
.acct-path b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.acct-path p { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.acct-path .go { display: inline-block; margin-top: 8px; font-size: 11.5px; color: #9db4ff; border-bottom: 1px solid transparent; }
.acct-path .go:hover { border-color: #9db4ff; }
.acct-path:has(input:checked) { border-color: var(--accent); background: #151a33; box-shadow: inset 0 0 0 1px var(--accent); }
.acct-path:has(input:focus-visible) { outline: 2px solid #9db4ff; outline-offset: 2px; }
.acct-hours-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.acct-hours-row input[type="range"] { flex: 1 1 240px; accent-color: var(--accent); height: 26px; }
.acct-hours-val { font-size: 30px; font-weight: 700; letter-spacing: -.6px; min-width: 108px; }
.acct-hours-val small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.acct-est { background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.acct-wiz-nav { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.acct-wiz-nav .acct-wiz-count { color: var(--muted); font-size: 12px; }
.acct-wiz-nav .btn { min-height: 38px; }
.acct-summary { display: grid; gap: 9px; margin: 0 0 16px; }
.acct-summary .line { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; font-size: 13.5px; }
.acct-summary .line span:first-child { color: var(--muted); }
.acct-summary .line b { text-align: right; }

/* 6 hetes előnézet */
.acct-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 9px; margin-top: 16px; }
.acct-week { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: var(--bg); }
.acct-week .w { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: #9db4ff; }
.acct-week b { display: block; font-size: 13px; margin: 3px 0 4px; }
.acct-week span { font-size: 11.5px; color: var(--muted); line-height: 1.45; display: block; }
.acct-week .lt { margin-top: 7px; font-size: 11.5px; color: #7ee2a7; }
.acct-week .lt:hover { text-decoration: underline; }

/* checklist */
.acct-check { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.acct-check li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.acct-check li .bx { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; background: var(--bg-3); color: var(--muted); }
.acct-check li.on .bx { border-color: #1f6b3a; background: #0e2718; color: #7ee2a7; }
.acct-check li .tx small { display: block; color: var(--muted); font-size: 11.5px; }
.acct-check li a { color: #9db4ff; }

/* auth (bejelentkezés nélkül) */
.acct-auth label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; }
.acct-auth input { width: 100%; background: var(--bg-3); border: 1px solid var(--line); color: var(--text); padding: 11px 13px; border-radius: 10px; outline: none; font-size: 14.5px; }
.acct-auth input:focus { border-color: var(--accent); }
.acct-auth .err { color: #ff8b8b; font-size: 12.5px; margin-top: 10px; min-height: 18px; }
.acct-auth .row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.acct-auth .row .btn { flex: 1 1 auto; min-height: 40px; }

/* toast */
.acct-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 120; background: #0f1420; border: 1px solid #22c55e; color: #7ee2a7; border-radius: 999px; padding: 9px 18px; font-size: 13px; box-shadow: 0 14px 44px rgba(0, 0, 0, .55); max-width: calc(100vw - 30px); }
.acct-toast.err { border-color: #6b1f1f; color: #ff9d9d; }

/* akciók */
.acct-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.acct-actions .btn-danger { border-color: #6b1f1f; color: #ff9d9d; background: #1a0d0d; }
.acct-actions .btn-danger:hover { border-color: #ff6b6b; }

/* mobilon a fiók oldal */
@media (max-width: 900px) {
  .acct-header { padding: 10px 14px; }
  .acct-main { padding: 22px 14px 80px; }
  .acct-cols { grid-template-columns: minmax(0, 1fr); }
  .acct-plan { flex-wrap: wrap; }
  .acct-plan .price { white-space: normal; }
  .acct-hero h1 { font-size: 27px; }
  .acct-card { padding: 16px; }
  .acct-modlist { max-height: none; }
  .acct-hours-val { font-size: 25px; }
  .acct-weeks { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .acct-plan-current { align-items: flex-start; }
  .acct-profile-head .who b { font-size: 19px; }
}
@media (max-width: 420px) {
  .acct-back span { display: none; }
  .acct-brand small { display: none; }
  .acct-code { font-size: 13px; letter-spacing: 1px; }
  .acct-plan { flex-wrap: wrap; }
}

/* ---------- ikonok a fiók oldalon (v1.1) ---------- */
.acct-back .ic { width: var(--icon-sm); height: var(--icon-sm); }
.acct-brand .brand-mark { width: 24px; height: 24px; border-radius: 7px; margin-right: 2px; }
.acct-plan-current .btn .ic, .acct-actions .btn .ic { width: var(--icon-sm); height: var(--icon-sm); }
.acct-empty > .ic { display: block; margin: 0 auto 8px; width: var(--icon-xl); height: var(--icon-xl); color: #5b6b8c; stroke-width: 1.75; }
.acct-empty a .ic { display: inline-block; width: 14px; height: 14px; margin-left: 4px; vertical-align: -.16em; color: inherit; }
.acct-mod .em .face-chip { width: 14px; height: 14px; }
.acct-mod .em .ic { width: 15px; height: 15px; color: var(--muted); }
.acct-mod.done .em .ic { color: var(--ok); }
.acct-check li .bx .ic { width: 12px; height: 12px; }
.acct-path b .ic { width: var(--icon); height: var(--icon); }
.acct-path .go, .acct-week .lt, .acct-h2-right a { display: inline-flex; align-items: center; gap: 5px; }
.acct-week .lt .ic, .acct-h2-right a .ic { width: 13px; height: 13px; }
.acct-code button .ic { width: 15px; height: 15px; display: block; }
.acct-toast .ic { width: 15px; height: 15px; }
.acct-wiz-nav .btn .ic { width: var(--icon-sm); height: var(--icon-sm); }
.acct-cert .seal .ic { width: 20px; height: 20px; }
.acct-cert .t .ic, .acct-cert .m .ic { width: 14px; height: 14px; }

/* ==========================================================================
   NYOMTATÁS — bizonyítvány (app #/certificate + account cert kártya)
   ========================================================================== */
@media print {
  @page { margin: 16mm; }
  html, body { background: #fff !important; color: #111 !important; }
  body { font-size: 12pt; }
  a { color: #111 !important; }
  /* app chrome elrejtése */
  .sidebar, .topbar, .menu-btn, .backdrop, .pager, .footer,
  .acct-header, .acct-hero, .pwa-hint, .acct-toast,
  .section-title, .ob-banner, .hero, .acct-hide-print { display: none !important; }
  button, .btn, .acct-row { display: none !important; }
  .acct-note { display: none !important; }
  #app { display: block !important; grid-template-columns: 1fr !important; }
  .main { padding: 0 !important; max-width: 100% !important; margin: 0 !important; }
  /* bármely oldalon: csak a .cert / .acct-cert jelenjen meg, ha van ilyen */
  body.printing-cert .acct-card { display: none !important; }
  body.printing-cert #certCard { display: block !important; border: none !important; padding: 0 !important; background: #fff !important; }
  .cert, .acct-cert {
    border: 2pt solid #111 !important;
    background: #fff !important;
    color: #111 !important;
    page-break-inside: avoid;
    margin: 0 auto !important;
    max-width: 100% !important;
  }
  .acct-cert .t, .acct-cert .l, .acct-cert .m, .cert-title, .cert-line, .cert-meta { color: #444 !important; }
  .acct-cert .n, .cert-name { color: #111 !important; }
  .acct-cert .seal, .cert-seal { color: #111 !important; border-color: #111 !important; opacity: 1 !important; }
  .cert:not(.ready) .cert-seal { display: none !important; }
  .bar, .modbar, .mini { border: 1pt solid #111 !important; background: #fff !important; }
  .bar > i, .modbar > i, .mini > i { background: #111 !important; }
  .md pre, .md code, .md table th, .md table td, .md blockquote { border-color: #999 !important; color: #111 !important; background: #fff !important; }
  .md pre { white-space: pre-wrap !important; page-break-inside: avoid; }
  .md a { border-bottom: none !important; }
  .prog-row, .card, .modcard { border-color: #ccc !important; background: #fff !important; }
  .cv-wrap { display: none !important; }
}

/* ================= labs v2 — split view, step rail, run/copy (Round D P0) ================= */
.lab-app { display: flex; flex-direction: column; gap: 14px; }
.lab-header { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: 0; z-index: 20; }
.lab-head-main { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.lab-back { padding: 6px 11px; flex: 0 0 auto; }
.lab-head-title h1 { margin: 0; font-size: 20px; line-height: 1.25; }
.lab-head-meta { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.lab-head-progress { flex: 1 1 220px; min-width: 160px; }
.lab-progress-cap { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.lab-progress { height: 7px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.lab-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8b5cf6, #22c55e); transition: width .3s ease; }
.lab-head-side { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.lab-timer { font-family: var(--mono); font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-3); white-space: nowrap; }
.lab-timer.warn, .lab-timer.expired { border-color: #6b1f1f; color: #ff9d9d; background: #1a0d0d; }
.lab-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lab-banners { display: flex; flex-direction: column; gap: 8px; }
.lab-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); font-size: 13px; color: var(--text); }
.lab-banner.warn { border-color: #6b5b1f; background: #191603; color: #ffd98a; }
.lab-banner.info { border-color: #2b3f6b; background: #0d1424; color: #b9c9ff; }
.lab-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); gap: 16px; align-items: start; }
.lab-split--hide { grid-template-columns: 1fr; }
.lab-split--hide .lab-inst { display: none; }
.lab-pane { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-width: 0; }
.lab-term { position: sticky; top: 86px; height: calc(100vh - 110px); min-height: 420px; overflow: hidden; }
.lab-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lab-pane-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.lab-term-wrap { flex: 1 1 auto; min-height: 0; padding: 8px; background: #070a10; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.lab-term-wrap .xterm { height: 100%; }
.lab-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.lab-status-actions { display: flex; gap: 6px; }
.lab-status-actions .btn { padding: 4px 9px; font-size: 12px; }
.lab-inst { max-height: calc(100vh - 110px); overflow: hidden; }
.lab-inst-scroll { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.lab-seg { display: flex; gap: 6px; }
.lab-seg button { border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; padding: 5px 10px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.lab-seg button.is-on { color: var(--text); border-color: #5b4bb5; background: #171327; }
.lab-rail { display: flex; gap: 6px; flex-wrap: wrap; }
.rail-item { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--bg-3); color: var(--muted); padding: 5px 10px; border-radius: 999px; font-size: 12px; cursor: pointer; max-width: 100%; }
.rail-item .rail-title { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-item .rail-num { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; background: var(--bg-2); border: 1px solid var(--line); flex: 0 0 auto; }
.rail-item.is-done { border-color: #1f6b3a; color: #7ee2a7; }
.rail-item.is-active { border-color: var(--accent); color: var(--text); background: #171327; }
.rail-item.is-locked { opacity: .45; cursor: not-allowed; }
.rail-item .pill.exam, .pill.exam { border-color: #6b5b1f; color: #ffd98a; }
.lab-step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.lab-step-head h2 { margin: 0; font-size: 19px; }
.lab-assignment { font-size: 14.5px; }
.lab-assignment h1 { font-size: 20px; }
.lab-assignment h2 { font-size: 17px; border: none; padding: 0; margin: 18px 0 8px; }
.lab-locked, .lab-step-note { display: flex; gap: 8px; align-items: center; color: #ffd98a; font-size: 12.5px; border: 1px dashed #6b5b1f; border-radius: 10px; padding: 8px 11px; margin: 6px 0; }
.lab-step-note { color: var(--muted); border-color: var(--line); }
.lab-hint { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #4a3f7a; background: #12101f; border-radius: 12px; padding: 10px 12px; margin: 10px 0; color: #d8d0ff; font-size: 13px; }
.lab-hint .md { margin: 0; font-size: 13px; }
.lab-step-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.lab-feedback { display: inline-flex; gap: 7px; align-items: center; font-size: 12.5px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); }
.lab-feedback.ok { color: #7ee2a7; border-color: #1f6b3a; background: #0e2718; }
.lab-feedback.err { color: #ff9d9d; border-color: #6b1f1f; background: #1a0d0d; }
.lab-feedback.wait { color: #ffd98a; border-color: #6b5b1f; background: #191603; }
.lab-feedback.hint { color: #d8d0ff; border-color: #4a3f7a; background: #12101f; }
.lab-step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.lab-notes { display: flex; flex-direction: column; gap: 10px; }
.lab-notes-hint { margin: 0; color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.lab-notes textarea { min-height: 260px; resize: vertical; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; color: var(--text); padding: 12px 14px; font: inherit; font-size: 13.5px; line-height: 1.6; }
.lab-notes textarea:focus { outline: none; border-color: var(--accent); }
.lab-notes-saved { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 11.5px; }
.lab-notes-saved.ok { color: #7ee2a7; }
.lab-term-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lab-term-placeholder-box { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); max-width: 340px; }
.lab-term-placeholder-box b { color: var(--text); font-size: 15px; }
.lab-term-placeholder-box span { font-size: 12.5px; line-height: 1.55; }
.lab-tabs-mobile { display: none; }
/* markdown code blocks with copy / ▶ run buttons (LAB-GUIDE §6) */
.md-code { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #070a10; }
.md-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.md-code-lang { font-family: var(--mono); font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.md-code-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.md-code-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-3); color: var(--muted); cursor: pointer; }
.md-code-btn:hover { color: var(--text); border-color: #3a4b6d; }
.md-code-btn.md-code-run { border-color: #5b4bb5; color: #d8d0ff; background: #171327; }
.md-code-btn.md-code-run:hover { border-color: var(--accent); color: #fff; background: #241a42; }
.md-code-btn.is-done { border-color: #1f6b3a; color: #7ee2a7; background: #0e2718; }
.md-code pre { margin: 0; border: none; border-radius: 0; }
.md-code-note { padding: 7px 12px; border-top: 1px dashed var(--line); color: #ffd98a; font-size: 11.5px; background: #191603; }
/* mobile: tab switcher instead of split */
@media (max-width: 900px) {
  .lab-header { position: static; padding: 10px 12px; gap: 10px; }
  .lab-head-main { min-width: 0; }
  .lab-head-title h1 { font-size: 17px; }
  .lab-head-progress { order: 4; flex: 1 1 100%; }
  .lab-head-side { width: 100%; justify-content: space-between; margin-left: 0; }
  .lab-tabs-mobile { display: flex; gap: 8px; position: sticky; top: 0; z-index: 15; background: var(--bg); padding: 4px 0; }
  .lab-tabs-mobile button { flex: 1 1 50%; display: inline-flex; justify-content: center; gap: 7px; align-items: center; padding: 9px 10px; font-size: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--muted); cursor: pointer; }
  .lab-tabs-mobile button.is-on { color: var(--text); border-color: var(--accent); background: #171327; }
  .lab-split { display: block; }
  .lab-split .lab-pane { display: none; }
  .lab-split[data-pane="inst"] .lab-inst { display: flex; }
  .lab-split[data-pane="term"] .lab-term { display: flex; }
  .lab-term { position: static; height: calc(100vh - 300px); min-height: 320px; }
  .lab-inst { max-height: none; }
  .lab-split--hide .lab-inst { display: none; }
  .rail-item .rail-title { max-width: 110px; }
}
@media (max-width: 520px) {
  .lab-status { flex-direction: column; align-items: flex-start; }
  .lab-step-actions { flex-direction: column; align-items: stretch; }
  .lab-step-actions .btn { justify-content: center; }
  .lab-feedback { width: 100%; }
}

/* disabled controls keep a visible "not now" state (check/hint/start before a ready session) */
.btn:disabled, .btn[disabled], .md-code-btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled:hover, .btn[disabled]:hover { border-color: var(--line); }

/* ================= terminal pane polish (Round D.1) =================
   xterm's .xterm-viewport defaults to `overflow-y: scroll` + a native light scrollbar,
   which showed as a white band/block on the dark terminal. Keep it dark, thin and only
   when scrollback actually exists; never show a horizontal scrollbar. */
.lab-term-wrap { position: relative; color-scheme: dark; display: flex; flex-direction: column; }
.lab-term-wrap .xterm { flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; background: #070a10; }
.lab-term-wrap .xterm .xterm-viewport {
  background-color: #070a10 !important;
  overflow-y: auto !important;   /* no always-visible light scrollbar track */
  overflow-x: hidden !important; /* terminal never scrolls horizontally */
  scrollbar-width: thin;
  scrollbar-color: #2a3550 #0b0f17;
}
.lab-term-wrap .xterm .xterm-viewport::-webkit-scrollbar { width: 9px; height: 9px; }
.lab-term-wrap .xterm .xterm-viewport::-webkit-scrollbar-track { background: #0b0f17; }
.lab-term-wrap .xterm .xterm-viewport::-webkit-scrollbar-thumb { background: #2a3550; border-radius: 999px; border: 2px solid #0b0f17; }
.lab-term-wrap .xterm .xterm-viewport::-webkit-scrollbar-thumb:hover { background: #3a4b6d; }
.lab-term-wrap .xterm .xterm-viewport::-webkit-scrollbar-corner { background: #0b0f17; }
.lab-term-wrap .xterm .xterm-screen { background: #070a10; }
.lab-term-wrap .xterm .xterm-helper-textarea { background: transparent; }

/* dark scrollbars for the lab instructions pane too (same white-band issue as the terminal) */
.lab-inst-scroll { scrollbar-width: thin; scrollbar-color: #2a3550 transparent; }
.lab-inst-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.lab-inst-scroll::-webkit-scrollbar-track { background: transparent; }
.lab-inst-scroll::-webkit-scrollbar-thumb { background: #2a3550; border-radius: 999px; border: 2px solid var(--bg-2); }
.lab-inst-scroll::-webkit-scrollbar-thumb:hover { background: #3a4b6d; }
