/* GZ-COOKIE-CONSENT-01: legal pages (terms, privacy, cookies, cancellation, notices) on the cream template.
   Gold text on cream is #7A5A1E for contrast; #B48A34 only for the brand mark and accents. */
:root {
    color-scheme: light;
    --legal-bg: #F6F1E7;
    --legal-card: #FBF8F2;
    --legal-panel: #EFE8DA;
    --legal-line: #E2D7C4;
    --legal-ink: #16140F;
    --legal-body: #2E2A23;
    --legal-muted: #4A443A;
    --legal-soft: #5E574A;
    --legal-link: #7A5A1E;
    --legal-accent: #B48A34;
    --legal-ok-ink: #3F5B3A;
    --legal-ok-bg: #E4ECDD;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--legal-ink);
    background: var(--legal-bg);
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--legal-link);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--legal-ink);
}

a:focus-visible,
button:focus-visible,
.legal-table-wrap:focus-visible {
    outline: 2px solid var(--legal-accent);
    outline-offset: 3px;
}

.legal-shell {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

/* ── HEADER ─────────────────────────────────────────── */
.legal-header {
    position: sticky;
    top: 0;
    z-index: 9000;
    background: var(--legal-card);
    border-bottom: 1px solid var(--legal-line);
}

.legal-header-inner {
    min-height: 72px;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.legal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--legal-ink);
    text-decoration: none;
}

.legal-brand-mark {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--legal-accent);
}

.legal-brand-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.1;
    color: var(--legal-ink);
}

.legal-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.legal-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--legal-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.legal-nav a:hover {
    color: var(--legal-ink);
    background: var(--legal-panel);
}

.legal-nav a.active {
    color: var(--legal-ink);
    font-weight: 700;
    background: #EBE1CE;
}

.legal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-home-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--legal-line);
    border-radius: 999px;
    background: var(--legal-bg);
    color: var(--legal-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.legal-home-btn:hover {
    border-color: var(--legal-accent);
    color: var(--legal-ink);
}

/* ── TITLE ─────────────────────────────────────────── */
.legal-title-band {
    padding: 56px 0 8px;
}

h1 {
    max-width: 760px;
    margin: 0 0 16px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 500;
    color: var(--legal-ink);
}

.legal-summary {
    max-width: 680px;
    margin: 0 0 20px;
    color: var(--legal-muted);
    font-size: 18px;
    line-height: 1.65;
}

.legal-badge-row {
    display: flex;
    align-items: center;
    gap: 10px 14px;
    flex-wrap: wrap;
}

.legal-date-badge,
.legal-version-badge {
    color: var(--legal-soft);
    font-size: 14px;
}

.legal-version-badge::before {
    content: "·";
    margin-inline-end: 14px;
}

.legal-prefs-button {
    min-height: 44px;
    padding: 0 18px;
    border: 1.5px solid var(--legal-ink);
    border-radius: 12px;
    background: var(--legal-ink);
    color: var(--legal-bg);
    font: 700 14px/1.2 'Manrope', system-ui, sans-serif;
    cursor: pointer;
}

.legal-notice {
    max-width: 680px;
    margin: 18px 0 0;
    padding: 12px 16px;
    border-inline-start: 3px solid var(--legal-accent);
    border-radius: 0 10px 10px 0;
    background: var(--legal-card);
    color: var(--legal-muted);
    font-size: 14px;
}

/* ── CONTENT ───────────────────────────────────────── */
.legal-content-band {
    padding: 40px 0 96px;
    flex: 1;
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 56px;
    align-items: start;
}

.legal-section {
    margin-bottom: 44px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    margin: 0 0 14px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 600;
    line-height: 1.25;
    color: var(--legal-ink);
}

.legal-section p {
    max-width: 680px;
    margin: 0;
    color: var(--legal-body);
    font-size: 16px;
    line-height: 1.75;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.legal-footer-note {
    margin-top: 24px;
    color: var(--legal-soft);
    font-size: 14px;
    font-style: italic;
}

/* ── COOKIE TABLE ──────────────────────────────────── */
.legal-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
    border: 1px solid var(--legal-line);
    border-radius: 16px;
    background: var(--legal-card);
    -webkit-overflow-scrolling: touch;
}

.legal-cookie-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
    text-align: start;
}

.legal-cookie-table th {
    padding: 14px 16px;
    background: var(--legal-panel);
    color: var(--legal-ink);
    font-weight: 700;
    text-align: start;
}

.legal-cookie-table td {
    padding: 12px 16px;
    border-top: 1px solid var(--legal-line);
    color: var(--legal-muted);
    vertical-align: top;
}

.legal-cookie-table td.legal-cookie-name {
    color: var(--legal-ink);
    font-weight: 600;
    overflow-wrap: anywhere;
    min-width: 180px;
}

.legal-cookie-cat {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #F1E4C7;
    color: #6B4E17;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.legal-cookie-cat--essential {
    background: var(--legal-ok-bg);
    color: var(--legal-ok-ink);
}

/* ── ASIDE (company identity card) ─────────────────── */
.legal-aside {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 24px;
    border: 1px solid var(--legal-line);
    border-radius: 18px;
    background: var(--legal-card);
}

.legal-aside h2 {
    margin: 0 0 6px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--legal-ink);
}

.legal-aside h2:not(:first-child) {
    margin-top: 18px;
}

.legal-identity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    margin: 6px 0 0;
}

.legal-identity-list dt {
    color: var(--legal-soft);
    font-size: 13.5px;
    line-height: 1.4;
}

.legal-identity-list dd {
    margin: 2px 0 0;
    color: var(--legal-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.legal-aside > a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-size: 14px;
    font-weight: 600;
}

.legal-contact {
    margin-top: 14px;
}

.legal-cookie-button {
    min-height: 44px;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--legal-link);
    font: 600 14px/1.3 'Manrope', system-ui, sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.legal-cookie-button:hover {
    color: var(--legal-ink);
}

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 960px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .legal-aside {
        position: static;
    }
}

@media (max-width: 640px) {
    .legal-shell {
        width: calc(100% - 32px);
    }
    .legal-header {
        position: static;
    }
    .legal-nav {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .legal-nav a {
        flex: none;
    }
    .legal-title-band {
        padding-top: 36px;
    }
    .legal-summary {
        font-size: 16.5px;
    }
    .legal-version-badge::before {
        display: none;
    }
}
