/* Kódex */
.cx { max-width: 1240px; }
.cx-langnote { margin: 0 0 1rem; padding: .7rem 1rem; border-radius: 14px; background: #eef2ff; color: #2b2f86; font-size: .9rem; }
.cx-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr) 220px; gap: 2.2rem; align-items: start; }
.cx-toggle { display: none; }

/* --- oldalsáv --- */
.cx-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding-right: .3rem; scrollbar-width: thin; }
.cx-search { position: relative; margin-bottom: 1rem; }
.cx-search input { width: 100%; box-sizing: border-box; padding: .7rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .92rem; }
.cx-search input:focus { outline: 2px solid var(--violet, #5a31f4); outline-offset: 1px; }
.cx-hits { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px -18px rgba(24, 10, 82, .5); padding: .35rem; }
.cx-hits[hidden] { display: none; }
.cx-hits a { display: flex; flex-direction: column; gap: .05rem; padding: .5rem .7rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.cx-hits a:hover { background: var(--wash); }
.cx-hits small { color: var(--ink-soft); font-size: .74rem; }
.cx-hits .cx-all { color: var(--violet, #5a31f4); font-weight: 700; font-size: .85rem; }
.cx-none { display: block; padding: .6rem .8rem; color: var(--ink-soft); font-size: .88rem; }
.cx-nav-home { display: block; padding: .5rem .7rem; margin-bottom: .3rem; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .92rem; }
.cx-nav-home.is-active, .cx-nav-home:hover { background: var(--wash); }
.cx-ch-btn { width: 100%; display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; border: 0; background: none; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 700; font-size: .92rem; color: var(--ink); text-align: left; }
.cx-ch-btn:hover { background: var(--wash); }
.cx-ch-btn i { margin-left: auto; font-style: normal; transition: transform .2s; color: var(--ink-soft); }
.cx-ch.is-open > .cx-ch-btn i { transform: rotate(90deg); }
.cx-ch ul { display: none; list-style: none; margin: .1rem 0 .5rem; padding: 0 0 0 1.05rem; border-left: 2px solid var(--line); margin-left: 1.1rem; }
.cx-ch.is-open ul { display: block; }
.cx-ch li a { display: block; padding: .3rem .6rem; border-radius: 8px; text-decoration: none; color: var(--ink-soft); font-size: .86rem; line-height: 1.35; }
.cx-ch li a:hover { color: var(--ink); background: var(--wash); }
.cx-ch li a.is-active { color: var(--violet, #5a31f4); font-weight: 700; background: #f4f0ff; }

/* --- főoszlop --- */
.cx-main { min-width: 0; }
.cx-crumb { font-size: .82rem; color: var(--ink-soft); margin-bottom: .8rem; }
.cx-crumb a { color: var(--ink-soft); text-decoration: none; } .cx-crumb a:hover { color: var(--ink); text-decoration: underline; }
.cx-head h1 { font-family: var(--display); font-size: clamp(1.7rem, 4.2vw, 2.4rem); line-height: 1.15; margin: 0 0 .5rem; }
.cx-lead { font-size: 1.06rem; line-height: 1.55; color: var(--ink-soft); margin: 0 0 .6rem; max-width: 62ch; }
.cx-meta { font-size: .8rem; color: var(--ink-soft); margin: 0 0 1.4rem; }

.cx-body { font-size: 1rem; line-height: 1.7; max-width: 74ch; }
.cx-body p { margin: 0 0 1rem; }
.cx-body h2 { font-family: var(--display); font-size: 1.35rem; margin: 2.2rem 0 .7rem; scroll-margin-top: 90px; }
.cx-body h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; scroll-margin-top: 90px; }
.cx-body ul, .cx-body ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.cx-body li { margin: .3rem 0; }
.cx-anchor { margin-left: .4rem; color: #c9c3e6; text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .15s; }
.cx-body h2:hover .cx-anchor, .cx-anchor:focus { opacity: 1; }
.cx-link { color: var(--violet, #5a31f4); text-decoration: underline; text-decoration-color: #cbbcff; text-underline-offset: 3px; }
.cx-link:hover { text-decoration-color: currentColor; }
.cx-go { color: #0f6b4c; font-weight: 600; text-decoration: none; border-bottom: 1px dashed #77c6a8; }
.cx-go::after { content: " ↗"; font-size: .85em; }
.cx-go:hover { background: #ecfaf4; }
.cx-broken { background: #fdecea; color: #a1281b; border-radius: 4px; padding: 0 .2rem; }

.cx-steps { list-style: none; padding: 0; margin: 0 0 1.2rem; counter-reset: cxs; }
.cx-steps > li { counter-increment: cxs; position: relative; padding: .15rem 0 .8rem 2.7rem; margin: 0; }
.cx-steps > li::before { content: counter(cxs); position: absolute; left: 0; top: .05rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #5a31f4, #ff3d7f); color: #fff; font-weight: 800; font-size: .85rem; }
.cx-steps > li:not(:last-child)::after { content: ""; position: absolute; left: .93rem; top: 2.05rem; bottom: .1rem; width: 2px; background: var(--line); }
.cx-steps ul { margin-top: .4rem; }

.cx-tw { overflow-x: auto; margin: 0 0 1.3rem; border: 1px solid var(--line); border-radius: 14px; }
.cx-table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.5; min-width: 480px; }
.cx-table th { text-align: left; padding: .6rem .8rem; background: var(--wash); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); white-space: nowrap; }
.cx-table td { padding: .6rem .8rem; border-top: 1px solid var(--line); vertical-align: top; }
.cx-table tbody tr:first-child td { border-top: 0; }
.cx-table td:first-child { font-weight: 600; }
.cx-table small { color: var(--ink-soft); font-weight: 400; }

.cx-call { display: flex; gap: .8rem; margin: 1.2rem 0; padding: .9rem 1.1rem; border-radius: 14px; border: 1px solid; font-size: .94rem; line-height: 1.6; }
.cx-call-ic { font-size: 1.25rem; line-height: 1.4; }
.cx-call-t { display: block; margin-bottom: .15rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.cx-warn { background: #fff8ec; border-color: #f2d9a6; color: #5c3b00; } .cx-warn .cx-call-t { color: #9a5b00; }
.cx-tip { background: #eefaf1; border-color: #bfe6c8; color: #14532d; } .cx-tip .cx-call-t { color: #14663a; }
.cx-note { background: #f1f2ff; border-color: #cfd3fb; color: #232a6b; } .cx-note .cx-call-t { color: #3b2bb5; }

.cx-toc-m { display: none; margin: 0 0 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.cx-toc-m summary { cursor: pointer; padding: .7rem 1rem; font-weight: 700; font-size: .92rem; }
.cx-toc-m ul { list-style: none; margin: 0; padding: 0 1rem .8rem; } .cx-toc-m li { margin: .25rem 0; } .cx-toc-m a { color: var(--violet, #5a31f4); text-decoration: none; font-size: .9rem; }
.cx-toc { position: sticky; top: 84px; font-size: .84rem; }
.cx-toc-in b { display: block; margin-bottom: .5rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.cx-toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.cx-toc li a { display: block; padding: .3rem .8rem; color: var(--ink-soft); text-decoration: none; line-height: 1.35; margin-left: -2px; border-left: 2px solid transparent; }
.cx-toc li a:hover { color: var(--ink); }
.cx-toc li a.is-on { color: var(--violet, #5a31f4); border-left-color: var(--violet, #5a31f4); font-weight: 700; }

.cx-rel { margin-top: 2.6rem; }
.cx-rel h2 { font-family: var(--display); font-size: 1.15rem; margin: 0 0 .8rem; }
.cx-rel > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.cx-rel a { display: flex; flex-direction: column; gap: .25rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .2s, transform .2s; }
.cx-rel a:hover { border-color: var(--violet, #5a31f4); transform: translateY(-2px); }
.cx-rel b { font-size: .95rem; } .cx-rel span { font-size: .8rem; color: var(--ink-soft); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cx-pn { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.6rem; }
.cx-pn a { display: flex; flex-direction: column; gap: .2rem; padding: .8rem 1rem; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.cx-pn a:hover { border-color: var(--violet, #5a31f4); } .cx-pn small { color: var(--ink-soft); } .cx-next { text-align: right; }
.cx-help { margin-top: 1.6rem; padding: 1rem 1.2rem; border-radius: 14px; background: var(--wash); font-size: .92rem; line-height: 1.55; }
.cx-help a { color: var(--violet, #5a31f4); }

/* --- kezdőlap --- */
.cx-hero { padding: 1.6rem 0 1.2rem; }
.cx-hero h1 { font-family: var(--display); font-size: clamp(2rem, 5.4vw, 3.1rem); line-height: 1.08; margin: .5rem 0 .7rem; }
.cx-hero p { font-size: 1.08rem; color: var(--ink-soft); max-width: 60ch; margin: 0 0 1.2rem; }
.cx-hero-search { display: flex; gap: .6rem; max-width: 620px; }
.cx-hero-search input { flex: 1; min-width: 0; padding: .9rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); font: inherit; background: #fff; }
.cx-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin: 1rem 0 2rem; }
.cx-qcard { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; border-radius: 18px; border: 1px solid #d9d0ff; background: linear-gradient(135deg, #f6f3ff, #fff4f8); text-decoration: none; color: var(--ink); transition: transform .2s; }
.cx-qcard:hover { transform: translateY(-3px); } .cx-qcard span { font-size: .85rem; color: var(--ink-soft); line-height: 1.4; }
.cx-start h2, .cx-chapters h2 { font-family: var(--display); font-size: 1.3rem; margin: 0 0 .9rem; }
.cx-start small { color: var(--ink-soft); }
.cx-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 2rem; }
.cx-chcard { border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem; background: #fff; }
.cx-chcard h3 { margin: 0 0 .3rem; font-size: 1.05rem; } .cx-chcard p { margin: 0 0 .7rem; font-size: .85rem; color: var(--ink-soft); line-height: 1.45; }
.cx-chcard ul { list-style: none; margin: 0; padding: 0; } .cx-chcard li a { display: block; padding: .25rem 0; color: var(--violet, #5a31f4); text-decoration: none; font-size: .88rem; } .cx-chcard li a:hover { text-decoration: underline; }
.cx-foot { margin-top: 2.5rem; font-size: .85rem; color: var(--ink-soft); }

/* --- keresés és szószedet --- */
.cx-results { display: flex; flex-direction: column; gap: .6rem; }
.cx-results a { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.cx-results a:hover { border-color: var(--violet, #5a31f4); }
.cx-results small { color: var(--ink-soft); font-size: .76rem; } .cx-results span { font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.cx-results mark { background: #fff1a8; padding: 0 .1rem; border-radius: 3px; color: inherit; }
.cx-az { position: sticky; top: 70px; z-index: 5; display: flex; flex-wrap: wrap; gap: .3rem; padding: .6rem 0; margin-bottom: .6rem; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); }
.cx-az a { min-width: 2rem; text-align: center; padding: .3rem .5rem; border-radius: 8px; background: var(--wash); text-decoration: none; color: var(--ink); font-weight: 700; font-size: .85rem; }
.cx-az a:hover { background: #ece7ff; }
.cx-az-sec h2 { border-bottom: 2px solid var(--line); padding-bottom: .3rem; }
.cx-az-sec dl { margin: 0; } .cx-az-sec dt { font-weight: 700; margin-top: .9rem; } .cx-az-sec dd { margin: .1rem 0 0; color: var(--ink-soft); }

/* --- reszponzív --- */
@media (max-width: 1100px) {
  .cx-shell { grid-template-columns: 250px minmax(0, 1fr); gap: 1.6rem; }
  .cx-toc { display: none !important; }
  .cx-toc-m:not([hidden]) { display: block; }
}
@media (max-width: 899px) {
  .cx-shell { grid-template-columns: minmax(0, 1fr); }
  .cx-toggle { display: inline-flex; align-items: center; gap: .5rem; position: sticky; top: 70px; z-index: 20; margin-bottom: .8rem; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px -12px rgba(24, 10, 82, .5); }
  .cx-side { position: fixed; z-index: 85; top: 0; bottom: 0; left: 0; width: min(88vw, 340px); max-height: none; padding: 1rem; background: #fff; transform: translateX(-105%); transition: transform .25s; box-shadow: 8px 0 30px -12px rgba(24, 10, 82, .5); }
  body.cx-nav-open .cx-side { transform: none; }
  body.cx-nav-open::after { content: ""; position: fixed; inset: 0; z-index: 80; background: rgba(15, 10, 40, .45); }
  .cx-hero-search { flex-direction: column; }
  .cx-pn { grid-template-columns: 1fr; } .cx-next { text-align: left; }
  .cx-az { top: 116px; }
}
@media print { .cx-side, .cx-toggle, .cx-toc, .cx-pn, .cx-help, .cx-rel, .site-head { display: none !important; } .cx-shell { display: block; } }
