:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --dark: #111827;
    --primary: #111827;
    --primary-soft: #f1f5f9;
    --danger: #dc2626;
    --success: #16a34a;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
    --container: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 23, 42, 0.08), transparent 34rem),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-main {
    flex: 1;
}

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

.public-header {
    padding: 1.25rem 0;
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-weight: 800;
}

.brand-logo {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-logo-wide {
    width: auto;
    height: 42px;
    max-width: 190px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
}

.nav-link:hover {
    background: var(--primary-soft);
    color: var(--text);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-menu-button span {
    width: 18px;
    height: 2px;
    background: currentColor;
    display: block;
    position: relative;
    border-radius: 999px;
}

.mobile-menu-button span::before,
.mobile-menu-button span::after {
    content: "";
    width: 18px;
    height: 2px;
    background: currentColor;
    display: block;
    position: absolute;
    left: 0;
    border-radius: 999px;
}

.mobile-menu-button span::before {
    top: -6px;
}

.mobile-menu-button span::after {
    top: 6px;
}

.mobile-menu {
    display: none;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0.85rem 1.2rem;
    font-weight: 850;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: 0.18s ease;
    white-space: nowrap;
    cursor: pointer;
}

.button-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.18);
}

.button-primary:hover {
    transform: translateY(-1px);
}

.button-secondary {
    background: #ffffff;
    color: var(--text);
    border-color: var(--border);
}

.button-secondary:hover {
    background: var(--primary-soft);
}

.section {
    padding: 4.5rem 0;
}

.section-head {
    max-width: 720px;
    margin-bottom: 2rem;
}

.section-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.section-text {
    color: var(--muted);
    line-height: 1.75;
    font-size: 1.03rem;
    margin-top: 1rem;
}

.public-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.legal-page {
    padding: 3rem 0 5rem;
}

.legal-card {
    max-width: 860px;
    margin: 0 auto;
    padding: 2.25rem;
}

.legal-card h1 {
    margin-top: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.06em;
}

.legal-card h2 {
    margin-top: 2rem;
    font-size: 1.25rem;
}

.legal-card p {
    color: var(--muted);
    line-height: 1.75;
}

.footer {
    padding: 2rem 0;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 0.92rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer a:hover {
    color: var(--text);
}

@media (max-width: 760px) {
    .public-header {
        padding: 1rem 0;
    }

    .public-nav {
        align-items: center;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-button {
        display: inline-flex;
        flex-shrink: 0;
    }

    .mobile-menu {
        width: min(var(--container), calc(100% - 2rem));
        margin: 0.75rem auto 0;
        padding: 0.5rem;
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 18px;
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    }

    .mobile-menu.is-open {
        display: block;
    }

    .mobile-menu-link {
        display: block;
        padding: 0.85rem 0.95rem;
        border-radius: 12px;
        color: var(--text);
        font-size: 0.95rem;
        font-weight: 800;
    }

    .mobile-menu-link:hover {
        background: var(--primary-soft);
    }

    .mobile-menu-link-primary {
        margin-top: 0.35rem;
        background: var(--primary);
        color: #ffffff;
        text-align: center;
    }

    .mobile-menu-link-secondary {
        margin-top: 0.35rem;
        background: var(--primary-soft);
        color: var(--text);
        text-align: center;
    }

    .section {
        padding: 3rem 0;
    }

    .legal-card {
        padding: 1.5rem;
    }
}


/* =========================================================
   Public header responsive final override
   ========================================================= */

.public-header .mobile-menu {
    display: none;
}

.public-header .mobile-menu-button {
    display: none;
}

@media (min-width: 761px) {
    .public-header .nav-links {
        display: flex;
    }

    .public-header .mobile-menu,
    .public-header .mobile-menu.is-open {
        display: none !important;
    }

    .public-header .mobile-menu-button {
        display: none !important;
    }
}

@media (max-width: 760px) {
    .public-header .public-nav {
        align-items: center;
    }

    .public-header .nav-links {
        display: none !important;
    }

    .public-header .mobile-menu-button {
        display: inline-flex !important;
        width: 42px;
        height: 42px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #ffffff;
        color: var(--text);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
    }

    .public-header .mobile-menu-button span {
        width: 18px;
        height: 2px;
        background: currentColor;
        display: block;
        position: relative;
        border-radius: 999px;
    }

    .public-header .mobile-menu-button span::before,
    .public-header .mobile-menu-button span::after {
        content: "";
        width: 18px;
        height: 2px;
        background: currentColor;
        display: block;
        position: absolute;
        left: 0;
        border-radius: 999px;
    }

    .public-header .mobile-menu-button span::before {
        top: -6px;
    }

    .public-header .mobile-menu-button span::after {
        top: 6px;
    }

    .public-header .mobile-menu {
        display: none !important;
        width: min(var(--container), calc(100% - 2rem));
        margin: 0.75rem auto 0;
        padding: 0.5rem;
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 18px;
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    }

    .public-header .mobile-menu.is-open {
        display: block !important;
    }

    .public-header .mobile-menu-link {
        display: block;
        padding: 0.85rem 0.95rem;
        border-radius: 12px;
        color: var(--text);
        font-size: 0.95rem;
        font-weight: 800;
    }

    .public-header .mobile-menu-link:hover {
        background: var(--primary-soft);
    }

    .public-header .mobile-menu-link-primary {
        margin-top: 0.35rem;
        background: var(--primary);
        color: #ffffff;
        text-align: center;
    }

    .public-header .mobile-menu-link-secondary {
        margin-top: 0.35rem;
        background: var(--primary-soft);
        color: var(--text);
        text-align: center;
    }
}