/* ThemeDetective – alap téma. Külső betűtípus és külső szkript nélkül, hogy az oldal gyors maradjon. */
:root {
    color-scheme: light dark;
    --paper: #f4f6f9;
    --surface: #ffffff;
    --ink: #16202b;
    --muted: #596574;
    --rule: #d9dfe7;
    --accent: #2848d8;
    --on-accent: #ffffff;
    --note: #edf0f5;
    --free: #167a4f;
    --premium: #94550a;
    --warn: #fff3dc;
    --warn-rule: #e3bb6c;
    --radius: 8px;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
    :root {
        --paper: #0e1319;
        --surface: #151b23;
        --ink: #e7ecf2;
        --muted: #98a3b1;
        --rule: #26303b;
        --accent: #8ea2ff;
        --on-accent: #0e1319;
        --note: #1b232d;
        --free: #4cc38a;
        --premium: #e3a33b;
        --warn: #2a2112;
        --warn-rule: #6b5420;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius); z-index: 10; }
.skip:focus { top: 12px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2rem, 5.2vw, 3.3rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.02rem; margin: 0; line-height: 1.3; }

/* Fejléc */
.site-header { border-bottom: 1px solid var(--rule); background: var(--surface); }
.bar { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; min-height: 62px; padding-top: 8px; padding-bottom: 8px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; margin-right: auto; }
.brand svg { width: 22px; height: 22px; color: var(--accent); }
.mainnav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: .95rem; }
.mainnav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.mainnav a:hover { border-bottom-color: var(--accent); }
.langs { display: flex; gap: 12px; font-size: .92rem; }
.langs [aria-current] { font-weight: 700; }

main { padding-bottom: 72px; }
.crumbs { font-size: .9rem; color: var(--muted); margin: 26px 0 0; }
.crumbs a { color: var(--muted); }

/* Nyitó rész */
.hero { padding: 52px 0 12px; }
.hero h1 { max-width: 16em; }
.lead { color: var(--muted); max-width: 58ch; margin: 14px 0 26px; font-size: 1.12rem; }

/* A címsor-mezős keresőmező: a lap legfontosabb eleme */
.addr { display: flex; position: relative; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.addr:focus-within { border-color: var(--accent); }
.addr .pre { display: flex; align-items: center; padding-left: 16px; color: var(--muted); font-family: var(--mono); font-size: .95rem; }
.addr input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 1.08rem; padding: 18px 12px; }
.addr button { border: 0; background: var(--ink); color: var(--paper); font: inherit; font-weight: 600; padding: 0 28px; cursor: pointer; }
.addr button:hover { background: var(--accent); color: var(--on-accent); }
.addr button[disabled] { cursor: progress; }
.addr[aria-busy="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 28%; background: var(--accent); animation: scan 1.1s ease-in-out infinite; }
@keyframes scan { from { left: -28%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .addr[aria-busy="true"]::after { animation: none; width: 100%; opacity: .45; } }
@media (max-width: 460px) { .addr .pre { display: none; } .addr input { padding-left: 16px; } .addr button { padding: 0 18px; } }

/* Eredmény: a weboldal "alkatrészlistája" */
#result { margin-top: 22px; }
.manifest { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.manifest > header { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.manifest .host { font-family: var(--mono); font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.manifest .note { color: var(--muted); font-size: .9rem; }
.rows { margin: 0; padding: 0 20px; }
.rows > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 18px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.rows > div:last-child { border-bottom: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; overflow-wrap: anywhere; }
.rows .with-logo { display: flex; align-items: center; gap: 12px; }
.parts { list-style: none; margin: 0; padding: 0; columns: 2 230px; column-gap: 26px; }
.parts li { break-inside: avoid; padding: 2px 0; }
.ver { font-family: var(--mono); font-size: .86rem; color: var(--muted); margin-left: 6px; }
.manifest > footer { display: flex; gap: 12px 20px; flex-wrap: wrap; align-items: center; padding: 14px 20px; border-top: 1px solid var(--rule); }
.notice { background: var(--warn); border: 1px solid var(--warn-rule); border-radius: var(--radius); padding: 16px 20px; }
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; font-size: .95rem; color: var(--muted); }
@media (max-width: 560px) { .rows > div { grid-template-columns: 1fr; } .rows dt { font-size: .9rem; } }

/* CMS-logók */
.cms-logo { width: var(--s, 40px); height: var(--s, 40px); object-fit: contain; }
.mono-logo { display: inline-grid; place-items: center; flex: none; width: var(--s, 40px); height: var(--s, 40px); border-radius: 10px; color: #fff; font: 700 calc(var(--s, 40px) * .46)/1 var(--sans); background: hsl(var(--h) 52% 38%); }
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 18px; }
.logos a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .92rem; text-align: center; }
.logos a:hover { border-color: var(--accent); }

/* Szakaszok */
.section { margin-top: 56px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; gap: 0; } }

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.plain li:last-child { border-bottom: 0; }
.plain .host { font-family: var(--mono); font-size: .98rem; overflow-wrap: anywhere; }

.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.bars li:last-child { border-bottom: 0; }
.bars a { color: var(--ink); text-decoration: none; font-weight: 600; }
.bars a:hover { color: var(--accent); }
.bars .bar-track { grid-column: 2 / 4; height: 5px; background: var(--note); border-radius: 3px; position: relative; }
.bars .bar-track::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--accent); border-radius: 3px; }
.bars .logo-cell { grid-row: span 2; }
.bars .count { grid-row: 1; grid-column: 3; color: var(--muted); font-size: .92rem; }

/* Kártyák (témák, bővítmények) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 18px 0; }
.item { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.item:hover { border-color: var(--accent); }
.thumb { display: block; aspect-ratio: 8 / 5; background: var(--note); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font: 600 2.4rem var(--serif); color: var(--muted); }
.item .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.item h3 a { color: var(--ink); text-decoration: none; }
.item h3 a:hover { color: var(--accent); }
.item .meta { font-size: .9rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; font-size: .82rem; line-height: 1.4; padding: 1px 9px; border-radius: 999px; border: 1px solid currentColor; }
.badge svg { width: 12px; height: 12px; }
.badge.free { color: var(--free); }
.badge.premium { color: var(--premium); }
.btn { display: inline-block; width: fit-content; padding: 9px 16px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .95rem; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.item .btn { margin-top: auto; }

.detail { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 28px; margin: 22px 0 36px; align-items: start; }
.detail .thumb { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 720px) { .detail { grid-template-columns: 1fr; } }

.pager { display: flex; gap: 18px; align-items: center; justify-content: center; margin: 28px 0 0; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.35rem; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 1.1rem; margin: 1.3em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.page-head { padding: 34px 0 6px; }
.page-head .lead { margin-bottom: 0; }

form.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; max-width: 640px; }
form.card input[type="text"], form.card textarea { width: 100%; margin-top: 5px; padding: 12px 14px; font: inherit; color: var(--ink); background: transparent; border: 1.5px solid var(--rule); border-radius: var(--radius); }
form.card input[type="text"]:focus, form.card textarea:focus { outline: 0; border-color: var(--accent); }
form.card label { display: block; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; }

/* Lábléc */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); padding: 34px 0 44px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h2 { font-family: var(--sans); font-size: .95rem; font-weight: 700; letter-spacing: 0; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: var(--ink); }
.site-footer p { margin: 0; color: var(--muted); max-width: 40ch; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
