/* ── PAGE HERO ── */
.page-hero {
    background: linear-gradient(160deg, var(--blue) 0%, var(--blue-mid) 55%, #0e4d8a 100%);
    padding: 120px 5% 65px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 60% at 80% 40%, rgba(212, 168, 58, .15) 0%, transparent 70%);
    pointer-events: none;
}

.breadcrumb {
    font-size: .76rem;
    color: rgba(255, 255, 255, .4);
    margin-bottom: 1.1rem;
    position: relative;
}

.breadcrumb a {
    color: var(--gold);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 .5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(212, 168, 58, .15);
    border: 1px solid var(--gold-border);
    color: var(--gold);
    font-size: .75rem;
    padding: .38rem .9rem;
    margin-bottom: 1.3rem;
    border-radius: 3px;
    position: relative;
}

.page-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.1rem, 4vw, 3.3rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: .9rem;
    position: relative;
}

.page-hero h1 em {
    color: var(--gold);
    font-style: italic;
}

.page-hero>p {
    color: rgba(255, 255, 255, .62);
    font-size: .93rem;
    max-width: 560px;
    line-height: 1.85;
    position: relative;
}

.page-hero>* {
    animation: fadeUp .7s ease both;
}

.page-hero>p {
    animation-delay: .1s;
}

/* ── LAYOUT ── */
.layout {
    display: grid;
    grid-template-columns: 255px 1fr;
    gap: 3rem;
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
     /* critical for sticky to work */

    align-items: start;
    overflow: visible;
}

/* ── STICKY TOC ── */
.toc {
    position: sticky;
    top: 96px;
    align-self: start;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    padding: 1.4rem;
    border-radius: 0 0 6px 6px;
}

.toc h3 {
    font-family: 'Playfair Display', serif;
    font-size: .97rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .9rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--border);
}

.toc ol {
    list-style: none;
    counter-reset: t;
}

.toc li {
    counter-increment: t;
    margin-bottom: .45rem;
}

.toc li::before {
    content: counter(t) ". ";
    color: var(--gold);
    font-size: .77rem;
    font-weight: 600;
}

.toc a {
    color: var(--muted);
    text-decoration: none;
    font-size: .8rem;
    transition: color .2s;
    line-height: 1.5;
}

.toc a:hover {
    color: var(--blue);
}

/* ── CONTENT ── */
.content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text);
    margin: 2.5rem 0 .9rem;
    padding-top: .9rem;
    border-top: 1px solid var(--border);
}

.content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.content h2 i {
    color: var(--gold);
    margin-right: .6rem;
    font-size: 1rem;
}

.content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 1.4rem 0 .55rem;
}

.content p {
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.9;
    margin-bottom: .95rem;
}

.content ul,
.content ol {
    padding-left: 1.4rem;
    margin-bottom: .95rem;
}

.content li {
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.85;
    margin-bottom: .38rem;
}

.content strong {
    color: var(--text);
    font-weight: 600;
}

.content a {
    color: var(--blue-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(46, 127, 207, .25);
}

.content a:hover {
    color: var(--blue);
}

/* ── INFO BOX ── */
.info-box {
    background: var(--blue-pale);
    border-left: 3px solid var(--blue-light);
    padding: 1.1rem 1.4rem;
    margin: 1.4rem 0;
    border-radius: 0 4px 4px 0;
}

.info-box p {
    margin: 0;
    font-size: .87rem;
    color: var(--text);
}

.warn-box {
    background: #FFFBEA;
    border-left: 3px solid var(--gold);
    padding: 1.1rem 1.4rem;
    margin: 1.4rem 0;
    border-radius: 0 4px 4px 0;
}

.warn-box p {
    margin: 0;
    font-size: .87rem;
    color: #5A4200;
}

/* ── COOKIE TYPE CARDS ── */
.cookie-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.cookie-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.3rem;
    transition: border-color .25s, transform .25s;
}

.cookie-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.cookie-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .6rem;
}

.cookie-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.cookie-badge {
    font-size: .68rem;
    font-weight: 700;
    font-family: 'Nunito Sans', sans-serif;
    padding: .22rem .65rem;
    border-radius: 3px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cookie-badge.required {
    background: #EAF7EA;
    color: #2E7D2E;
}

.cookie-badge.optional {
    background: var(--blue-pale);
    color: var(--blue-mid);
}

.cookie-badge.marketing {
    background: #FFF8EE;
    color: #8A4F00;
}

.cookie-card i {
    font-size: 1.3rem;
    color: var(--gold);
    display: block;
    margin-bottom: .5rem;
}

.cookie-card p {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.75;
    margin: 0;
}

/* ── COOKIE TABLE ── */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
    font-size: .83rem;
}

.cookie-table th {
    background: var(--blue);
    color: var(--gold);
    font-weight: 600;
    padding: .7rem 1rem;
    text-align: left;
    font-size: .75rem;
    letter-spacing: .05em;
}

.cookie-table td {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    vertical-align: top;
    line-height: 1.65;
}

.cookie-table tr:last-child td {
    border-bottom: none;
}

.cookie-table tr:hover td {
    background: var(--blue-pale);
}

.cookie-table code {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: .1rem .4rem;
    border-radius: 3px;
    font-size: .78rem;
    font-family: monospace;
    color: var(--blue);
}

/* ── PREFERENCE PANEL ── */
.pref-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    border-top: 4px solid var(--gold);
    padding: 1.8rem;
    margin: 1.5rem 0;
}

.pref-panel h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.2rem;
}

.pref-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.pref-row:last-of-type {
    border-bottom: none;
}

.pref-info h4 {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .25rem;
    font-family: 'Nunito Sans', sans-serif;
}

.pref-info p {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

/* Toggle switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: background .25s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.toggle input:checked+.toggle-slider {
    background: var(--blue);
}

.toggle input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

.toggle input:disabled+.toggle-slider {
    opacity: .5;
    cursor: not-allowed;
}

.pref-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--gold);
    color: var(--blue);
    border: none;
    padding: .75rem 1.5rem;
    font-size: .82rem;
    font-weight: 700;
    font-family: 'Nunito Sans', sans-serif;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1.2rem;
    transition: background .25s, transform .2s;
}

.pref-btn:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.pref-saved {
    display: none;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: #2E7D2E;
    font-weight: 600;
    margin-top: 1.2rem;
}

.pref-saved.show {
    display: inline-flex;
}

/* ── CONTACT BOX ── */
.contact-box {
    background: var(--blue);
    padding: 1.8rem;
    margin-top: 1.8rem;
    border-radius: 5px;
    border-left: 4px solid var(--gold);
}

.contact-box h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: .9rem;
}

.contact-box p {
    color: rgba(255, 255, 255, .72);
    font-size: .87rem;
    margin-bottom: .55rem;
}

.contact-box a {
    color: var(--gold-light);
    text-decoration: none;
    border: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    
    align-items: start;
    overflow: visible;
}

    .toc {
        position: static;
    }

    .cookie-cards {
        grid-template-columns: 1fr;
    }
}