/* ==========================================================================
   Cloudflare for Devs — közös tananyag-keret (navigáció, olvasási segédek)
   Minden osztálynév "cx-" előtaggal, hogy ne ütközzön a modulok saját CSS-ével.
   ========================================================================== */

:root{
  --cx-orange:#f6821f;
  --cx-orange-dark:#d96b0b;
  --cx-ink:#1d1f21;
  --cx-soft:#4a4f55;
  --cx-line:#e8e4de;
}

/* --- olvasási folyamatjelző ------------------------------------------------ */
.cx-progress{
  position:fixed; top:0; left:0; right:0; height:3px; z-index:60;
  background:transparent; pointer-events:none;
}
.cx-progress i{
  display:block; height:100%; width:0%;
  background:linear-gradient(90deg,#f6821f,#f0a33f);
  transition:width .08s linear;
}

/* --- felső sáv ------------------------------------------------------------- */
.cx-top{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; gap:16px;
  padding:0 20px; height:50px;
  background:rgba(255,255,255,.86);
  backdrop-filter:saturate(180%) blur(12px);
  -webkit-backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid #e8e4de;
  font-family:-apple-system,"Segoe UI",Inter,Roboto,sans-serif;
  font-size:13.5px;
}
.cx-top a{color:inherit;text-decoration:none}
.cx-home{
  display:inline-flex; align-items:center; gap:7px;
  font-family:inherit; font-size:inherit; line-height:inherit;
  font-weight:650; color:#4a4f55; white-space:nowrap; cursor:pointer;
  border:1px solid transparent; background:transparent;
  padding:5px 10px 5px 8px; border-radius:8px; transition:background .15s,color .15s,border-color .15s;
}
.cx-home:hover{border-color:#f3d5b3}
.cx-home:hover{background:#fff3e6;color:var(--cx-orange-dark)}
.cx-home svg{flex:0 0 auto;display:block}
.cx-pos{
  flex:1 1 auto; min-width:0;
  display:flex; align-items:baseline; gap:8px;
  color:#7a8087; overflow:hidden;
}
.cx-pos b{
  flex:0 0 auto; font-weight:800; color:var(--cx-orange-dark);
  background:#fff3e6; border:1px solid #f3d5b3; border-radius:7px;
  padding:2px 9px; font-size:12.5px; letter-spacing:.01em;
}
.cx-pos span{
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-weight:600; color:#4a4f55;
}
.cx-arrows{display:flex;gap:6px;flex:0 0 auto}
.cx-arrows a, .cx-arrows span{
  display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; border-radius:8px;
  border:1px solid #e8e4de; background:#fff; color:#4a4f55;
  font-size:15px; line-height:1; transition:all .15s;
}
.cx-arrows a:hover{border-color:var(--cx-orange);color:var(--cx-orange-dark);background:#fff3e6}
.cx-arrows span{opacity:.35}

/* --- modulon belüli tartalomjegyzék ---------------------------------------- */
.cx-toc{
  background:#fff; border:1px solid #e8e4de; border-radius:12px;
  padding:14px 18px 15px; margin:0 0 30px;
  font-family:-apple-system,"Segoe UI",Inter,Roboto,sans-serif;
}
.cx-toc > b{
  display:block; font-size:11.5px; letter-spacing:.12em; text-transform:uppercase;
  color:#7a8087; font-weight:700; margin-bottom:9px;
}
.cx-toc ol{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:6px 8px}
.cx-toc li{margin:0}
.cx-toc a{
  display:inline-block; font-size:13.5px; text-decoration:none;
  color:#4a4f55; background:#f6f4f1; border:1px solid #ece8e2;
  border-radius:7px; padding:3px 10px; transition:all .15s; line-height:1.5;
}
.cx-toc a:hover{background:#fff3e6;border-color:#f3d5b3;color:var(--cx-orange-dark)}
.cx-toc a i{font-style:normal;color:#a5a9ad;font-weight:700;margin-right:5px}
.cx-toc a:hover i{color:var(--cx-orange)}

/* horgony-görgetés a ragadós sáv alá */
h2[id]{scroll-margin-top:66px}

/* --- alsó lapozó ----------------------------------------------------------- */
.cx-nav{
  display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:34px;
  font-family:-apple-system,"Segoe UI",Inter,Roboto,sans-serif;
}
.cx-nav a, .cx-nav .cx-void{
  display:block; text-decoration:none; background:#fff;
  border:1px solid var(--cx-line); border-radius:12px; padding:14px 18px;
  transition:all .16s; box-shadow:0 1px 2px rgba(0,0,0,.03);
}
.cx-nav a:hover{border-color:var(--cx-orange);box-shadow:0 4px 14px rgba(246,130,31,.13);transform:translateY(-1px)}
.cx-nav a > span, .cx-nav .cx-void > span{
  display:block; font-size:11.5px; letter-spacing:.1em; text-transform:uppercase;
  color:#a5a9ad; font-weight:700; margin-bottom:5px;
}
.cx-nav a > span svg{vertical-align:-2px}
.cx-nav a b, .cx-nav .cx-void b{display:block;font-size:14.5px;font-weight:700;color:var(--cx-ink);line-height:1.4}
.cx-nav a:hover b{color:var(--cx-orange-dark)}
.cx-nav .cx-next{text-align:right}
.cx-nav .cx-void{
  border-style:dashed; background:transparent; box-shadow:none;
  opacity:.45; pointer-events:none;
}
.cx-nav .cx-void b{font-weight:600;color:#a5a9ad}

.cx-back{
  display:block; width:100%; margin-top:16px; cursor:pointer;
  font-family:-apple-system,"Segoe UI",Inter,Roboto,sans-serif;
  font-size:13.5px; font-weight:650; color:#7a8087; text-align:center;
  background:transparent; border:1px dashed var(--cx-line);
  padding:11px; border-radius:10px; transition:all .15s;
}
.cx-back:hover{color:var(--cx-orange-dark);background:#fff3e6;border-color:#f3d5b3}

/* --- tartalomjegyzék-modál (nem navigál el az oldalról) ------------------- */
.cx-modal[hidden]{display:none}
.cx-modal{
  position:fixed; inset:0; z-index:80;
  display:flex; align-items:flex-start; justify-content:center;
  padding:min(9vh,90px) 18px 24px;
  font-family:-apple-system,"Segoe UI",Inter,Roboto,sans-serif;
}
.cx-modal-back{
  position:absolute; inset:0; background:rgba(29,31,33,.42);
  backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px);
  animation:cx-fade .16s ease-out;
}
@keyframes cx-fade{from{opacity:0}to{opacity:1}}
@keyframes cx-pop{from{opacity:0;transform:translateY(-10px) scale(.985)}to{opacity:1;transform:none}}
.cx-panel{
  position:relative; width:100%; max-width:720px; max-height:82vh;
  display:flex; flex-direction:column; overflow:hidden;
  background:#faf9f7; border:1px solid var(--cx-line); border-radius:16px;
  box-shadow:0 24px 60px rgba(0,0,0,.24); animation:cx-pop .18s cubic-bezier(.2,.9,.3,1);
}
.cx-panel-head{
  display:flex; align-items:center; gap:10px; padding:13px 14px 13px 16px;
  border-bottom:1px solid var(--cx-line); background:#fff; flex:0 0 auto;
}
.cx-panel-head svg{color:#a5a9ad;flex:0 0 auto}
.cx-panel-head input{
  flex:1 1 auto; min-width:0; font-family:inherit; font-size:15px; color:var(--cx-ink);
  border:0; background:transparent; outline:none; padding:4px 0;
}
.cx-panel-head input::placeholder{color:#a8adb2}
.cx-x{
  flex:0 0 auto; width:30px; height:30px; border-radius:8px; cursor:pointer;
  border:1px solid var(--cx-line); background:#fff; color:#7a8087;
  font-size:17px; line-height:1; transition:all .15s;
}
.cx-x:hover{border-color:var(--cx-orange);color:var(--cx-orange-dark);background:#fff3e6}

.cx-panel-body{flex:1 1 auto; overflow-y:auto; padding:6px 10px 12px; overscroll-behavior:contain}
.cx-group > b{
  display:block; font-size:11px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--cx-orange-dark); font-weight:750; padding:14px 12px 6px;
}
.cx-item{
  display:flex; align-items:center; gap:12px; text-decoration:none;
  padding:8px 12px; border-radius:10px; border:1px solid transparent; transition:background .12s;
}
.cx-item:hover, .cx-item.cx-cur{background:#fff}
.cx-item.cx-on{background:#fff3e6;border-color:#f3d5b3}
.cx-item .cx-n{
  flex:0 0 38px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center;
  background:#f1efec; color:#7a8087; font-weight:800; font-size:13px; border:1px solid #e8e4de;
}
.cx-item.cx-on .cx-n, .cx-item:hover .cx-n{background:var(--cx-orange);border-color:var(--cx-orange);color:#fff}
.cx-item .cx-t{flex:1 1 auto;min-width:0;font-size:14px;font-weight:640;color:var(--cx-ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cx-item .cx-r{flex:0 0 auto;font-size:11.5px;font-weight:650;color:#a5a9ad}
.cx-item.cx-cur{border-color:#bfe6cc;background:#f2fbf5}
.cx-item.cx-cur .cx-n{background:#1a7f37;border-color:#1a7f37;color:#fff}
.cx-item.cx-cur .cx-r{color:#1a7f37}
.cx-none{display:none;padding:30px 14px;text-align:center;color:#a5a9ad;font-size:14px}

.cx-panel-foot{
  flex:0 0 auto; display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding:11px 16px; border-top:1px solid var(--cx-line); background:#fff;
  font-size:12px; color:#a5a9ad;
}
.cx-panel-foot kbd{
  font-family:inherit; font-size:10.5px; font-weight:700; color:#7a8087;
  border:1px solid var(--cx-line); border-bottom-width:2px; border-radius:5px;
  padding:1px 5px; background:#fbfaf8; margin:0 1px;
}
.cx-panel-foot a{
  margin-left:auto; color:#7a8087; font-weight:650; text-decoration:none;
  padding:4px 10px; border-radius:7px; border:1px solid var(--cx-line); background:#fbfaf8;
  transition:all .15s; white-space:nowrap;
}
.cx-panel-foot a:hover{color:var(--cx-orange-dark);border-color:#f3d5b3;background:#fff3e6}

/* --- „vissza a tetejére" --------------------------------------------------- */
.cx-up{
  position:fixed; right:22px; bottom:22px; z-index:40;
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid #e8e4de; color:#4a4f55;
  box-shadow:0 3px 12px rgba(0,0,0,.09); cursor:pointer;
  opacity:0; transform:translateY(8px); pointer-events:none;
  transition:opacity .2s, transform .2s, border-color .15s, color .15s;
  font-size:16px; line-height:1;
}
.cx-up.on{opacity:1;transform:none;pointer-events:auto}
.cx-up:hover{border-color:var(--cx-orange);color:var(--cx-orange-dark)}

@media (max-width:640px){
  .cx-top{padding:0 12px;gap:10px;height:46px}
  .cx-home span{display:none}
  .cx-nav{grid-template-columns:1fr}
  .cx-nav .cx-next{text-align:left}
  .cx-up{right:14px;bottom:14px}
  .cx-modal{padding:0}
  .cx-panel{max-width:none;max-height:100%;height:100%;border-radius:0;border:0}
  .cx-panel-foot span{display:none}
  .cx-panel-foot a{margin-left:0;width:100%;text-align:center}
}

@media print{
  .cx-top,.cx-nav,.cx-back,.cx-up,.cx-progress{display:none !important}
}
