:root {
    /* ── 60-30-10 DESIGN RULE ── */
    /* 60% Primary Color: Dominant Backgrounds */
    --primary-60: #ffffff;
    --primary-60-soft: #f8f7f4;
    --primary-60-card: #ffffff;

    /* 30% Secondary Color: Text, Borders, Structural Elements */
    --secondary-30: #0f0e0b;
    --secondary-30-muted: #4b5563;
    --secondary-30-light: #6b7280;
    --secondary-30-border: rgba(0,0,0,0.07);

    /* 10% Accent Color: CTAs, Highlights, Branding */
    --accent-10: #FFD700;
    --accent-10-dark: #E5C100;
    --accent-10-light: #FFF0A0;

    /* ── 60-30-10 DESIGN RULE (DARK SECTIONS) ── */
    /* 60% Primary Color */
    --dark-primary-60: #0a0a0f;
    --dark-primary-60-alpha: rgba(10,10,15,0.95);
    
    /* 30% Secondary Color */
    --dark-secondary-30: #f1f5f9;
    --dark-secondary-30-muted: #94a3b8;
    --dark-secondary-30-panel: rgba(255,255,255,0.03);
    --dark-secondary-30-border: rgba(255,255,255,0.06);

    /* 10% Accent Color */
    --dark-accent-10: #FFD700;

    /* Legacy Variable Mapping (for backward compatibility) */
    --gold: var(--accent-10);
    --gold-dark: var(--accent-10-dark);
    --gold-light: var(--accent-10-light);
    --bg: var(--primary-60);
    --bg-soft: var(--primary-60-soft);
    --bg-card: var(--primary-60-card);
    --text-main: var(--secondary-30);
    --text-muted: var(--secondary-30-muted);
    --text-light: var(--secondary-30-light);
    --border: var(--secondary-30-border);

    /* UI Tokens */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.10);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.14);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 100px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.client-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* ── CLIENT LOGO DYNAMIC SWITCHING ── */
/* Default state (JS handles the actual switching via inline styles) */
.logo-light-variant { display: none; }
.logo-dark-variant { display: inline-block; }

/* ── BUTTONS ── */
.btn-primary {
    background: var(--text-main);
    color: var(--gold);
    border: none;
    font-weight: 700;
    border-radius: var(--radius-pill);
    padding: 0.65rem 1.6rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    letter-spacing: 0.01em;
}
.btn-primary:hover {
    background: #222;
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-dark {
    border: 1.5px solid rgba(0,0,0,0.2);
    color: var(--text-main);
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.65rem 1.6rem;
    transition: all 0.2s;
}
.btn-outline-dark:hover {
    background: var(--text-main);
    color: var(--gold);
    border-color: var(--text-main);
    transform: translateY(-2px);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #FDB931);
    color: #000;
    border: none;
    font-weight: 700;
    border-radius: var(--radius-pill);
    padding: 0.65rem 1.6rem;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(255,215,0,0.35);
}
.btn-gold:hover {
    background: linear-gradient(135deg, #FDB931, var(--gold));
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,215,0,0.45);
    color: #000;
}

/* ── CARDS ── */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.text-primary { color: var(--gold) !important; }
.bg-primary { background: var(--gold) !important; color: #000 !important; }
.badge.bg-primary { background: var(--gold) !important; color: #000 !important; font-weight: 700; }
.text-warning { color: #f59e0b !important; }
.text-muted { color: var(--text-muted) !important; }

/* ── MAIN CONTENT ── */
main, .main-content {
    flex: 1;
    margin-top: 72px;
}

.policy-page { min-height:calc(100vh - 72px); padding:4.5rem 0; background:linear-gradient(135deg,var(--primary-60-soft),var(--primary-60)); }.policy-shell { max-width:900px; }.policy-back { display:inline-flex; align-items:center; gap:.45rem; color:var(--text-muted); font-size:.82rem; text-decoration:none; }.policy-back:hover { color:var(--text-main); }.policy-hero { margin:2rem 0 1.25rem; }.policy-hero span { color:var(--gold-dark); font-size:.72rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }.policy-hero h1 { margin:.55rem 0; font-size:clamp(2rem,5vw,3.2rem); font-weight:800; letter-spacing:-.04em; }.policy-hero p { max-width:610px; margin:0 0 .65rem; color:var(--text-muted); font-size:1rem; line-height:1.6; }.policy-hero small { color:var(--text-light); }.policy-card { padding:clamp(1.4rem,4vw,2.7rem); border:1px solid var(--border); border-radius:20px; background:var(--bg-card); box-shadow:var(--shadow-md); }.policy-card section + section { margin-top:1.7rem; padding-top:0; border-top:0; }.policy-card h2 { margin:0 0 .55rem; font-size:1.05rem; font-weight:750; }.policy-card p { margin:0; color:var(--text-muted); line-height:1.7; }.policy-card a { color:var(--gold-dark); }.policy-notice { display:flex; gap:.7rem; margin-top:2rem; padding:1rem 1.1rem; border-radius:12px; background:rgba(245,158,11,.08); color:var(--text-muted); }.policy-notice i { color:var(--gold-dark); margin-top:.25rem; }

/* ── CHATBOT ── */
#chatbot-toggle {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: var(--text-main);
    color: var(--gold);
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1.1rem;
}
#chatbot-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(0,0,0,0.3); }
#chatbot-window {
    position: absolute; bottom: 70px; right: 0;
    width: 340px; height: 480px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.chat-header {
    background: var(--text-main);
    color: var(--gold);
    padding: 1rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
}
.chat-header h5 { margin: 0; font-weight: 700; font-size: 0.95rem; }
#chatbot-messages { flex: 1; overflow-y: auto; padding: 1rem; background: #fafafa; }
.chat-msg { margin-bottom: 0.75rem; }
.chat-bubble {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    border-radius: 14px;
    font-size: 0.875rem;
    max-width: 80%;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.chat-bubble.bot { background: #f1f1f1; color: #111; border-bottom-left-radius: 4px; }
.chat-bubble.user { background: var(--text-main); color: var(--gold); border-bottom-right-radius: 4px; }
.chat-input-area { padding: 0.75rem; border-top: 1px solid var(--border); background: #fff; display: flex; gap: 0.5rem; }
.chat-input-area input {
    flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius-pill);
    padding: 0.5rem 1rem; font-size: 0.875rem; font-family: 'Outfit', sans-serif; outline: none;
    transition: border-color 0.2s;
}
.chat-input-area input:focus { border-color: rgba(0,0,0,0.3); }
.chat-send {
    width: 38px; height: 38px;
    background: var(--text-main); color: var(--gold);
    border: none; border-radius: 50%; font-size: 0.8rem;
    cursor: pointer; transition: transform 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.chat-send:hover { transform: scale(1.1); }

/* ── FAQ Welcome Card (inside chatbot messages) ── */
#faq-welcome {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 0.5rem;
}
.faq-welcome-card {
    text-align: center;
    padding: 0.5rem 0 0;
}
.faq-welcome-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--text-main), #2a2a2a);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 0.75rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.faq-welcome-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}
.faq-welcome-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.faq-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-family: 'Outfit', sans-serif;
}
.faq-btn span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}
.faq-btn-icon {
    font-size: 0.85rem;
    color: var(--gold-dark);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.faq-btn:hover {
    background: var(--text-main);
    border-color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.faq-btn:hover span { color: var(--gold); }
.faq-btn:hover .faq-btn-icon { color: var(--gold); }
.faq-btn:active { transform: translateY(0); }

/* Links inside bot chat bubbles */
.chat-bubble.bot a {
    color: var(--gold-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.chat-bubble.bot a:hover { color: var(--text-main); }

/* ── CHATBOT — refined conversation UI ── */
#chatbot-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
}
#chatbot-toggle {
    position: relative;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(255,215,0,.35);
    box-shadow: 0 12px 30px rgba(15,14,11,.24);
}
#chatbot-toggle::after {
    content: '';
    position: absolute;
    top: 7px;
    right: 7px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--text-main);
    border-radius: 50%;
    background: #22c55e;
}
#chatbot-window {
    width: min(390px, calc(100vw - 32px));
    height: min(610px, calc(100vh - 120px));
    border-radius: 22px;
    border-color: rgba(15,14,11,.12);
    box-shadow: 0 24px 70px rgba(15,14,11,.22);
}
.chat-header {
    min-height: 72px;
    padding: .85rem 1rem;
    color: var(--primary-60);
}
.chat-header-identity,
.chat-header-actions,
.chat-status,
.chat-attribution {
    display: flex;
    align-items: center;
}
.chat-header-identity { gap: .7rem; min-width: 0; }
.chat-header-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,215,0,.13);
    color: var(--gold);
}
.chat-header h5 { color: var(--primary-60); }
.chat-status {
    gap: .35rem;
    margin-top: .2rem;
    color: var(--dark-secondary-30-muted);
    font-size: .7rem;
    font-weight: 500;
}
.chat-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,.13);
}
.chat-header-actions { gap: .2rem; }
.chat-icon-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--dark-secondary-30-muted);
    cursor: pointer;
    transition: background .18s, color .18s;
}
.chat-icon-btn:hover,
.chat-icon-btn:focus-visible {
    background: rgba(255,255,255,.08);
    color: var(--gold);
    outline: none;
}
#chatbot-messages {
    padding: 1rem 1rem .5rem;
    background: var(--primary-60-soft);
    scrollbar-color: rgba(15,14,11,.28) transparent;
    scrollbar-width: thin;
}
.chat-msg { display: flex; align-items: flex-end; gap: .4rem; }
.chat-msg.text-end { justify-content: flex-end; }
.chat-bubble {
    max-width: 86%;
    padding: .68rem .85rem;
    border-radius: 15px;
    line-height: 1.45;
    box-shadow: 0 2px 8px rgba(15,14,11,.06);
}
.chat-bubble.bot {
    background: var(--primary-60-card);
    color: var(--text-main);
    border: 1px solid var(--border);
}
.chat-bubble.user {
    background: var(--text-main);
    color: var(--primary-60);
}
.chat-bubble.error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}
.chat-input-area {
    padding: .75rem .8rem .55rem;
    background: var(--primary-60-card);
}
.chat-input-area input {
    min-width: 0;
    background: var(--primary-60-soft);
}
.chat-send:disabled { opacity: .5; cursor: wait; transform: none; }
.chat-attribution {
    justify-content: space-between;
    padding: 0 .95rem .65rem;
    background: var(--primary-60-card);
    color: var(--text-light);
    font-size: .64rem;
}
.chat-attribution a {
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
}
.chat-attribution a:hover { color: var(--gold-dark); }
.chat-typing { display: inline-flex; align-items: center; gap: 4px; min-width: 48px; }
.chat-typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-light);
    animation: chatTyping 1s infinite ease-in-out;
}
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatTyping { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.3rem 0 .8rem; }
.chat-suggestion {
    padding: .38rem .62rem;
    border: 1px solid rgba(15,14,11,.14);
    border-radius: var(--radius-pill);
    background: var(--primary-60-card);
    color: var(--text-muted);
    font: 600 .7rem 'Outfit', sans-serif;
    cursor: pointer;
}
.chat-suggestion:hover { border-color: var(--gold-dark); color: var(--gold-dark); }

@media (max-width: 575.98px) {
    #chatbot-widget { right: 14px; bottom: 14px; }
    /* Keep the assistant a floating panel on phones.  The old `inset: 12px`
       rule made it cover virtually the entire viewport and could hide the
       close action behind mobile browser UI. */
    #chatbot-window {
        position: fixed;
        right: 12px;
        bottom: 78px;
        left: 12px;
        width: auto;
        height: min(68dvh, 520px);
        max-height: calc(100dvh - 150px);
        border-radius: 18px;
    }
    .chat-header { min-height: 64px; }
    .chat-icon-btn { width: 44px; height: 44px; }
    #chatbot-toggle { width: 52px; height: 52px; }
    .faq-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .chat-typing i { animation: none; }
    #chatbot-toggle, .faq-btn, .chat-send { transition: none; }
}

/* ── SCROLL REVEAL ANIMATION ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Shared introduction label for the public page headers. */
.intro-label {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0 0 1.5rem;
    color: #c9c6be;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: .025em;
}
.intro-label::before {
    content: '';
    flex: 0 0 1.75rem;
    height: 1px;
    background: #b8a46a;
}
.svc-header .intro-label { justify-content: center; }
@media (max-width: 575px) {
    .intro-label { margin-bottom: 1rem; font-size: .8rem; }
}

/* Policy copy flows as one document, including restored defaults. */
.policy-shell > .policy-card { margin-top: 1.5rem; }
.policy-card h1 { margin: 0 0 1rem; font-size: clamp(2rem, 5vw, 3rem); font-weight: 750; line-height: 1.2; letter-spacing: -.035em; }
.policy-card h2 { margin: 1.8rem 0 .7rem; font-size: 1.2rem; line-height: 1.4; }
.policy-card h3 { margin: 1.5rem 0 .6rem; font-size: 1.05rem; line-height: 1.5; }
.policy-card p { margin: 0 0 1rem; line-height: 1.85; }
.policy-card section { border: 0; padding: 0; }
.policy-card > :last-child { margin-bottom: 0; }
.policy-card ul, .policy-card ol { padding-left: 1.6rem; line-height: 1.85; color: var(--text-muted); }

.logout-form { margin: 0; display: contents; }
:where(.logout-form button) { background: none; border: 0; font: inherit; cursor: pointer; text-align: inherit; }
