/* Terms, privacy, accessibility statement and the consent step (Legal_Base.html).
   Public pages: they don't load Base.css, so the few tokens they need are here. */
:root {
    --lg-bg:       #0b1417;
    --lg-surface:  #0f1d21;
    --lg-border:   rgba(99, 255, 255, 0.18);
    --lg-text:     #eaffff;
    --lg-dim:      #a3c4c5;
    --lg-accent:   #63ffff;
    --lg-gap-bg:   rgba(255, 196, 0, 0.16);
    --lg-gap-text: #ffd76a;
    --lg-error:    #ff9f9f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    font-family: 'Heebo', system-ui, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--lg-text);
    background: var(--lg-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

a { color: var(--lg-accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lg-accent); outline-offset: 2px; border-radius: 4px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
    position: absolute; top: -80px; inset-inline-start: 12px; z-index: 10;
    background: var(--lg-accent); color: #062024; font-weight: 700;
    padding: 10px 18px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ── HEADER / FOOTER ──────────────────────────────────────────────── */
.lg-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 24px; border-bottom: 1px solid var(--lg-border); background: var(--lg-surface);
}
.lg-brand {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
    color: var(--lg-accent); text-decoration: none; font-weight: 700; letter-spacing: 0.2em;
}
.lg-logo { width: 32px; height: 32px; object-fit: contain; }
.lg-back {
    display: inline-flex; align-items: center; min-height: 44px; padding: 6px 18px;
    color: var(--lg-text); text-decoration: none; border: 1px solid var(--lg-border); border-radius: 999px;
}
.lg-back:hover { border-color: var(--lg-accent); }

.lg-footer { border-top: 1px solid var(--lg-border); padding: 12px 24px; }
.lg-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; }
.lg-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.lg-footer a[aria-current="page"] { color: var(--lg-text); text-decoration: none; font-weight: 600; }

/* ── DOCUMENT ─────────────────────────────────────────────────────── */
.lg-main { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 32px 24px 48px; }
.lg-main:focus { outline: none; }          /* focused only as the skip link's target */

.lg-draft {
    border: 1px solid rgba(255, 196, 0, 0.45); background: var(--lg-gap-bg); color: var(--lg-gap-text);
    border-radius: 10px; padding: 12px 16px; margin-bottom: 24px; font-size: 0.95rem;
}
.lg-gap { background: var(--lg-gap-bg); color: var(--lg-gap-text); border-radius: 4px; padding: 0 4px; font-weight: 600; }

.lg-doc h1 { font-size: 2rem; line-height: 1.3; margin-bottom: 4px; }
.lg-updated { color: var(--lg-dim); font-size: 0.95rem; margin-bottom: 20px; }
.lg-lead { font-size: 1.1rem; margin-bottom: 24px; }

.lg-toc {
    border: 1px solid var(--lg-border); border-radius: 12px; background: var(--lg-surface);
    padding: 16px 20px; margin-bottom: 32px;
}
.lg-toc ol { columns: 2; column-gap: 32px; padding-inline-start: 22px; }
.lg-toc li { break-inside: avoid; }
.lg-toc a { display: inline-block; padding: 3px 0; }

.lg-doc section { margin-bottom: 28px; scroll-margin-top: 16px; }
.lg-doc h2 { font-size: 1.3rem; line-height: 1.4; color: var(--lg-accent); margin-bottom: 10px; }
.lg-doc h3 { font-size: 1.05rem; margin: 16px 0 6px; }
.lg-doc p { margin-bottom: 10px; }
.lg-doc ul { padding-inline-start: 22px; margin-bottom: 10px; }
.lg-doc li { margin-bottom: 6px; }
.lg-doc ul ul { margin-top: 6px; }

/* ── CONSENT STEP ─────────────────────────────────────────────────── */
.lg-summary li { margin-bottom: 4px; }
.lg-consent-form {
    border: 1px solid var(--lg-border); border-radius: 12px; background: var(--lg-surface);
    padding: 20px; margin: 24px 0;
}
.lg-check { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; cursor: pointer; }
.lg-check input { width: 22px; height: 22px; margin-top: 4px; flex-shrink: 0; accent-color: var(--lg-accent); cursor: pointer; }
.lg-error { color: var(--lg-error); min-height: 1.75em; margin-bottom: 8px; }
.lg-btn {
    min-height: 48px; padding: 10px 32px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--lg-accent); color: #062024; font: inherit; font-weight: 700;
}
.lg-btn:hover { filter: brightness(1.08); }
.lg-btn:disabled { opacity: 0.6; cursor: wait; }
.lg-alt { color: var(--lg-dim); }

/* ── OPEN DATA (where the products come from) ─────────────────────── */
.lg-en { text-align: left; color: var(--lg-dim); }
.lg-download { margin: 16px 0 6px; }
a.lg-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* ── PHONE ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .lg-header { padding: 8px 16px; }
    .lg-brand span { font-size: 0.9rem; letter-spacing: 0.12em; }
    .lg-main { padding: 20px 16px 36px; }
    .lg-doc h1 { font-size: 1.6rem; }
    .lg-toc { padding: 12px 16px; }
    .lg-toc ol { columns: 1; }
    .lg-consent-form { padding: 16px; }
    .lg-btn { width: 100%; }
    .lg-footer { padding: 8px 16px; }
}
