:root {
    --page-bg: #FAFAFA;
    --page-surface: #FFFFFF;
    --page-text: #252525;
    --page-muted: #666666;
    --page-faint: #EFEFEF;
    --page-border: rgba(37, 37, 37, 0.13);
    --page-shadow: 0 12px 32px rgba(37, 37, 37, 0.08);
}

html[data-theme='dark'] {
    --page-bg: #111111;
    --page-surface: #191919;
    --page-text: #F4F2EC;
    --page-muted: #AAA9A5;
    --page-faint: #1B1B1B;
    --page-border: rgba(244, 242, 236, 0.15);
    --page-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

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

/* Universally hide scrollbars for all elements across all browsers */
html,
body,
* {
    scrollbar-width: none !important;
}

*::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background-color: var(--page-bg);
}

html {
    color-scheme: light;
}

html[data-theme='dark'] {
    color-scheme: dark;
}

body {
    min-width: 0;
    color: var(--page-text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a, button {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--page-text);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 30;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    background: var(--page-text);
    color: var(--page-bg);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.system-header {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(76px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 6vw 0;
    background: var(--page-bg);
}

.system-brand {
    color: var(--page-text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.system-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.system-nav-link {
    color: var(--page-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.system-nav-link:hover {
    color: var(--page-text);
}

.system-theme-toggle {
    display: grid;
    width: 58px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.system-theme-track {
    position: relative;
    display: block;
    width: 48px;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--page-text);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.14);
}

.system-theme-track::after {
    position: absolute;
    top: 3px;
    left: 5px;
    width: 18px;
    height: 4px;
    border-radius: 999px;
    background: var(--page-bg);
    content: '';
    transition: transform 0.28s ease;
}

html[data-theme='dark'] .system-theme-track::after {
    transform: translateX(20px);
}

.not-found-page {
    position: relative;
    display: grid;
    min-height: 100svh;
    overflow: hidden;
    place-items: center;
    padding: 7rem 1.5rem 3rem;
}

.not-found-number {
    position: absolute;
    top: 50%;
    left: 50%;
    color: var(--page-faint);
    font-size: clamp(17rem, 43vw, 35rem);
    font-weight: 900;
    letter-spacing: -0.09em;
    line-height: 0.72;
    pointer-events: none;
    transform: translate(-51%, -52%);
    user-select: none;
}

.not-found-content {
    position: relative;
    z-index: 2;
    width: min(100%, 720px);
    text-align: center;
}

.not-found-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.2rem;
    color: var(--page-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.not-found-kicker::before {
    width: 28px;
    height: 3px;
    border-radius: 99px;
    background: var(--page-text);
    content: '';
}

.not-found-content h1 {
    margin: 0;
    font-size: clamp(3rem, 7vw, 5.4rem);
    letter-spacing: -0.065em;
    line-height: 0.98;
}

.not-found-content p {
    margin: 1.35rem auto 0;
    color: var(--page-muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
    font-weight: 600;
    line-height: 1.65;
}

.not-found-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2.2rem;
}

.system-button {
    display: inline-flex;
    min-height: 46px;
    padding: 0 1.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid var(--page-border);
    border-radius: 10px;
    background: var(--page-surface);
    color: var(--page-text);
    box-shadow: var(--page-shadow);
    font: 800 0.86rem/1 'Plus Jakarta Sans', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.system-button-primary {
    border-color: var(--page-text);
    background: var(--page-text);
    color: var(--page-bg);
}

.system-button:hover {
    transform: translateY(-2px);
}

.not-found-footer {
    position: absolute;
    right: 0;
    bottom: 1.5rem;
    left: 0;
    z-index: 2;
    color: var(--page-muted);
    font-size: 0.75rem;
    text-align: center;
}

.not-found-footer a {
    color: inherit;
    text-underline-offset: 3px;
}

.privacy-main {
    width: min(100% - 2.5rem, 820px);
    margin: 0 auto;
    padding: 10rem 0 6rem;
}

.privacy-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--page-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.privacy-eyebrow::before {
    width: 38px;
    height: 4px;
    border-radius: 99px;
    background: var(--page-text);
    content: '';
}

.privacy-intro h1 {
    max-width: 700px;
    margin: 1.35rem 0 1rem;
    font-size: clamp(3.2rem, 9vw, 6.8rem);
    letter-spacing: -0.075em;
    line-height: 0.92;
}

.privacy-lead {
    max-width: 650px;
    margin: 0;
    color: var(--page-muted);
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    line-height: 1.75;
}

.privacy-updated {
    display: block;
    margin-top: 1.4rem;
    color: var(--page-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.privacy-sections {
    margin-top: 5rem;
}

.privacy-section {
    display: grid;
    grid-template-columns: minmax(150px, 0.34fr) minmax(0, 0.66fr);
    gap: 2.5rem;
    padding: 2.4rem 0;
    border-top: 1px solid var(--page-border);
}

.privacy-section h2 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.025em;
}

.privacy-section-content {
    color: var(--page-muted);
    font-size: 0.96rem;
    line-height: 1.8;
}

.privacy-section-content p {
    margin: 0;
}

.privacy-section-content p + p,
.privacy-section-content ul + p {
    margin-top: 1rem;
}

.privacy-section-content ul {
    margin: 0;
    padding-left: 1.15rem;
}

.privacy-section-content li + li {
    margin-top: 0.45rem;
}

.privacy-section-content a {
    color: var(--page-text);
    font-weight: 700;
    text-underline-offset: 3px;
}

.privacy-callout {
    margin-top: 2.5rem;
    padding: 1.4rem 1.5rem;
    border: 1px solid var(--page-border);
    border-radius: 14px;
    background: var(--page-surface);
    box-shadow: var(--page-shadow);
}

.privacy-callout strong {
    display: block;
    margin-bottom: 0.35rem;
}

.privacy-callout a {
    color: var(--page-text);
    font-weight: 700;
}

.privacy-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 6vw max(1.5rem, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--page-border);
    color: var(--page-muted);
    font-size: 0.76rem;
}

.privacy-footer a {
    color: var(--page-text);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 640px) {
    html,
    body,
    .system-header {
        transition: none;
    }

    .system-header {
        min-height: calc(68px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 1.25rem 0;
    }

    .system-nav-link {
        display: none;
    }

    .not-found-page {
        padding-top: 6rem;
        padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
    }

    .not-found-number {
        font-size: 55vw;
        transform: translate(-52%, -66%);
    }

    .not-found-actions {
        align-items: stretch;
        flex-direction: column-reverse;
        width: min(100%, 280px);
        margin-right: auto;
        margin-left: auto;
    }

    .privacy-main {
        width: min(100% - 2rem, 820px);
        padding-top: 8rem;
    }

    .privacy-sections {
        margin-top: 3.5rem;
    }

    .privacy-section {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding: 2rem 0;
    }

    .privacy-footer {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
