/* Jogi aloldalak: ugyanazok a tokenek és formák, mint a főoldalon */
:root {
    --bg: #e9e6dc;
    --surface: #dedace;
    --ink: #1d3124;
    --muted: #4a5a4e;
    --alert: #8e1c1c;
    --alert-ink: #ffffff;

    --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
    --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
    --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5625rem);
    --step-head: clamp(2rem, 1.4rem + 1.8vw, 3.125rem);
    --step-display: clamp(2.6rem, 0.8rem + 4.6vw, 5.25rem);

    --gutter: clamp(16px, 2.2vw, 32px);
    --space-section: clamp(64px, 7vw, 120px);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --font: 'Literata', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: var(--step-body);
    line-height: 1.6;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
strong, b { font-weight: 600; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }

.skip {
    position: absolute; left: var(--gutter); top: -100px; z-index: 50;
    background: var(--ink); color: var(--bg); padding: 0.6rem 1rem;
}
.skip:focus { top: 0.5rem; }

.btn {
    display: inline-flex; align-items: center; gap: 0.6em;
    min-height: 44px; padding: 0.5rem 1.1rem;
    background: var(--ink); color: var(--bg);
    font: inherit; font-size: var(--step-small); font-weight: 500; text-decoration: none;
    transition: transform 0.18s var(--ease-out), background-color 0.18s var(--ease-out);
}
.btn:hover { background: #2c4a36; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.link { font-weight: 500; text-decoration: underline; transition: color 0.18s var(--ease-out); }
.link:hover { color: #3d6a4b; }

/* Sürgősségi sáv */
.urgent { background: var(--alert); color: var(--alert-ink); font-size: var(--step-small); }
.urgent p { padding: 0.55rem var(--gutter); display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; }
.urgent a { font-weight: 600; text-decoration: none; }
.urgent a:hover { text-decoration: underline; }

/* Fejléc */
.bar { display: flex; align-items: center; gap: 1.5rem; padding: 0.9rem var(--gutter); }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; margin-right: auto; }
.brand svg { width: 22px; height: 30px; flex: none; }
.brand b { display: block; font-weight: 600; line-height: 1.2; }
.brand span span { display: block; font-size: var(--step-small); color: var(--muted); line-height: 1.3; }
.nav { display: flex; gap: 1.4rem; font-size: var(--step-small); }
.nav a { text-decoration: underline 2px transparent; text-underline-offset: 0.35em; font-weight: 500; padding: 0.3rem 0; transition: text-decoration-color 0.2s ease; }
.nav a:hover, .nav a[aria-current] { text-decoration-color: currentColor; }

/* Dokumentum: cím és tartalom balra ragadva, szöveg jobbra */
.doc {
    padding: clamp(40px, 6vw, 96px) var(--gutter) var(--space-section);
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 clamp(16px, 2vw, 32px);
}
.doc-side { grid-column: 1 / span 4; }
.doc-side .stick { position: sticky; top: 1.5rem; }
.doc-side h1 { font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.035em; }
.doc-side .meta { margin-top: 1.4rem; color: var(--muted); font-size: var(--step-small); }
.toc { margin-top: 2.4rem; display: grid; gap: 0.35rem; font-size: var(--step-small); counter-reset: toc; }
.toc a { text-decoration: none; display: inline-block; transition: transform 0.25s var(--ease-out), color 0.2s ease; }
.toc a:hover { text-decoration: underline; transform: translateX(6px); }
.doc-text { grid-column: 6 / span 7; max-width: 40rem; }
.doc-text > .lead { font-size: var(--step-lead); line-height: 1.45; }
.doc-text section { padding-top: 3.2rem; scroll-margin-top: 1rem; }
.doc-text > section:first-child { padding-top: 0; }
.doc-text code { font-size: 0.9em; }
.doc-text h2 { font-size: var(--step-lead); line-height: 1.2; }
.doc-text h3 { font-size: var(--step-body); font-weight: 600; letter-spacing: 0; margin-top: 1.6rem; }
.doc-text p { margin-top: 1rem; }
.doc-text ul { margin-top: 1rem; display: grid; gap: 0.5rem; }
.doc-text ul li { padding-left: 1.2rem; position: relative; }
.doc-text ul li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 0.45rem; height: 2px; background: currentColor; }

/* Adatlap: címke balra, érték jobbra, mint a főoldali bizonylaton */
.facts { margin-top: 1.2rem; background: var(--surface); padding: 1.4rem clamp(18px, 2.5vw, 32px); display: grid; gap: 0.6rem; }
.facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 1.2rem; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }
.facts dd a { text-decoration: none; }
.facts dd a:hover { text-decoration: underline; }

/* Adatfeldolgozók táblázata */
.table-wrap { margin-top: 1.2rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--step-small); }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; }
thead th { font-weight: 600; border-bottom: 2px solid var(--ink); }
tbody tr:nth-child(odd) { background: var(--surface); }

.note { margin-top: 1.2rem; padding: 1rem 1.2rem; border-left: 4px solid var(--alert); background: #f3f1ea; }

/* Lábléc */
footer { background: var(--surface); }
.foot { padding: clamp(48px, 6vw, 88px) var(--gutter) 2rem; display: grid; gap: 2rem; font-size: var(--step-small); color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; color: var(--ink); font-size: var(--step-body); font-weight: 500; }
.foot-links a { text-decoration: none; }
.foot-links a:hover, .foot-links a[aria-current] { text-decoration: underline; }
.foot .credit { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.foot .credit img { height: 26px; width: auto; }

@media (max-width: 1080px) {
    .nav { display: none; }
    .doc-side, .doc-text { grid-column: 1 / -1; }
    .doc-side .stick { position: static; }
    .doc-text { margin-top: 1rem; }
}

@media (max-width: 760px) {
    .bar .brand span span { display: none; }
    .toc { display: none; }
    .facts > div { grid-template-columns: 1fr; gap: 0; }
    .facts dt { font-size: var(--step-small); }
    .facts dd + dt { margin-top: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .toc a { transition: none; }
}

@media print {
    .urgent, .bar, .toc, footer { display: none; }
    body { background: #fff; }
    .doc-side, .doc-text { grid-column: 1 / -1; }
}
