/* ================================================
   MDRN - PROFESSIONAL INDIE STUDIO DESIGN
   Clean, minimal aesthetic like Devolver/Annapurna
   ================================================ */

:root {
    /* Clean color palette */
    --bg-black: #000000;
    --bg-dark: #0f0f0f;
    --bg-card: #1a1a1a;
    --text-white: #ffffff;
    --text-gray: #a8a69f;          /* Warm-tinted for eye comfort */
    --text-dark-gray: #807e78;     /* Warm-tinted for eye comfort */
    --accent: #ffffff;
    --border: #2a2a2a;
    --hover-glow: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    background: var(--bg-black);
    color: var(--text-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.media-open {
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header - Clean minimal */
header {
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-white);
}

.logo-link {
    display: inline-block;
    text-decoration: none;
}

.logo-tagline {
    font-size: 11px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

/* Hero - Minimal clean */
.hero-section {
    padding: 120px 0 80px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-title {
    font-size: clamp(36px, 5vw, 72px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
}

.hero-line {
    display: block;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Games Grid */
.games-showcase-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 12px;
    color: var(--text-dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

@media (min-width: 900px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (min-width: 1180px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }
}

/* Game Cards - Clean minimal */
.game-card {
    background: var(--bg-card);
    padding: 40px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.game-card:hover {
    border-color: var(--text-white);
    background: rgba(26, 26, 26, 0.95);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
}

.game-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dark-gray);
    margin-bottom: 20px;
    padding: 4px 8px;
    border: 1px solid var(--border);
}

.game-badge.coming-soon {
    color: var(--text-gray);
}

.game-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    line-height: 1.2;
}

.game-tagline {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
    font-weight: 500;
}

.game-description p {
    color: var(--text-gray);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.game-description {
    flex-grow: 1;
}

.game-features {
    list-style: none;
    margin: 20px 0 0 0;
}

.game-features li {
    color: var(--text-dark-gray);
    font-size: 14px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
}

.game-features li:first-child {
    border-top: none;
}

.game-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.game-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 28px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-btn:hover:not(:disabled) {
    background: var(--text-white);
    color: var(--bg-black);
    border-color: var(--text-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.game-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.game-btn-secondary {
    color: var(--text-gray);
}

.studio-apps-section {
    padding: 60px 0 80px;
    border-bottom: 1px solid var(--border);
}

.app-wall {
    max-width: 720px;
    margin: 0 auto;
}

.app-release-card small {
    display: block;
    margin-top: 16px;
    color: var(--text-dark-gray);
    font-size: 12px;
    line-height: 1.5;
}

.app-detail,
.policy-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 80px 0 20px;
}

.app-hero {
    text-align: center;
    padding-bottom: 70px;
    border-bottom: 1px solid var(--border);
}

.app-icon-large {
    width: 128px;
    height: 128px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.app-hero h1,
.policy-page h1 {
    color: var(--text-white);
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 14px 0 24px;
}

.app-lede {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-gray);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.55;
}

.app-actions {
    justify-content: center;
}

.detail-grid {
    display: grid;
    gap: 20px;
    margin: 60px 0;
}

@media (min-width: 820px) {
    .detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.detail-panel,
.policy-card {
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 28px;
}

.detail-panel span {
    display: block;
    color: var(--text-dark-gray);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin-bottom: 20px;
}

.detail-panel h2,
.policy-card h2 {
    color: var(--text-white);
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 14px;
}

.detail-panel p,
.policy-card p,
.policy-date {
    color: var(--text-gray);
    font-size: 15px;
    line-height: 1.65;
}

.policy-card {
    margin-top: 20px;
}

.policy-card a,
.inline-links a {
    color: var(--text-white);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 18px;
}

.media-lightbox[hidden] {
    display: none;
}

.media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.media-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.media-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--border);
    background: #090909;
    padding: 40px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.75);
}

.media-close {
    position: absolute;
    top: 24px;
    right: 24px;
    min-height: 36px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.media-close:hover {
    border-color: var(--text-white);
    color: var(--text-white);
}

.media-eyebrow {
    color: var(--text-dark-gray);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
    padding-right: 88px;
    text-transform: uppercase;
}

.media-lightbox h3 {
    color: var(--text-white);
    font-size: clamp(24px, 4vw, 42px);
    line-height: 1.1;
    margin-bottom: 24px;
    padding-right: 88px;
}

.media-frame {
    border: 1px solid var(--border);
    background: var(--bg-black);
    width: 100%;
    margin-bottom: 20px;
}

.media-frame iframe {
    display: block;
    width: 100%;
    border: 0;
    background: var(--bg-black);
}

/* Specific heights for different media types */
.media-type-ost iframe {
    height: 420px;
}

.media-type-video iframe {
    aspect-ratio: 16 / 9;
    height: auto;
}

.steam-placeholder {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
}

.steam-placeholder span {
    color: var(--text-white);
    font-size: clamp(20px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.steam-placeholder p,
.media-note {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.5;
    max-width: 500px;
}

.media-note {
    margin-top: 16px;
}

.media-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 24px;
    padding: 14px 28px;
    border: 1px solid var(--border);
    color: var(--text-white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.media-link:hover {
    background: var(--text-white);
    color: var(--bg-black);
    border-color: var(--text-white);
}

/* Arcade Banners - GamePro style */
.arcade-banner {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(26,26,26,0.3) 50%, rgba(0,0,0,0) 100%);
}

.arcade-banner p {
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-white);
    line-height: 1.4;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

/* Footer - Clean professional */
.footer-section {
    border-top: 1px solid var(--border);
    padding: 80px 0 60px;
    margin-top: 80px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-studio h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.footer-studio p {
    color: var(--text-gray);
    font-size: 14px;
    margin: 8px 0;
}

.footer-links {
    margin-top: 40px;
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-white);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    header {
        padding: 30px 0;
    }

    .hero-section {
        padding: 80px 0 60px;
    }

    .games-showcase-section,
    .systems-section {
        padding: 60px 0;
    }

    .game-card {
        padding: 30px;
    }

    .game-actions {
        flex-direction: column;
    }

    .game-btn {
        width: 100%;
        text-align: center;
    }

    .app-detail,
    .policy-page {
        padding-top: 56px;
    }

    .media-lightbox {
        padding: 12px;
    }

    .media-lightbox-dialog {
        max-height: calc(100vh - 24px);
        padding: 22px;
    }

    .media-eyebrow,
    .media-lightbox h3 {
        padding-right: 72px;
    }

    .media-frame {
        min-height: 300px;
    }

    .media-frame iframe {
        min-height: 360px;
    }

    .steam-placeholder {
        min-height: 300px;
        padding: 28px 18px;
    }
}

/* =======================================================================
   GAME PAGE VISUAL MOMENTS - Stylized panels for each game's aesthetic
   ======================================================================= */

/* Visual moment base */
.visual-moment {
    width: 100%;
    min-height: 300px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 40px 0;
}

.visual-moment-content {
    text-align: center;
    z-index: 2;
    padding: 40px;
}

.visual-moment-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.visual-moment-subtitle {
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Pizza Connection - Crime/Blood aesthetic */
.pizza-visual {
    background: linear-gradient(135deg, #1a0000 0%, #330000 50%, #1a0000 100%);
    border-color: #8B0000;
}

.pizza-visual .visual-moment-title {
    color: #D4AF37;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.pizza-visual .visual-moment-subtitle {
    color: #ffffff;
}

/* Hack Love Betray - Cyberpunk/Hacker aesthetic */
.hlb-visual {
    background:
        linear-gradient(90deg, transparent 0%, rgba(0, 255, 255, 0.03) 50%, transparent 100%),
        linear-gradient(135deg, #0a0a0f 0%, #1a0520 50%, #0a0a0f 100%);
    border: 2px solid;
    border-image: linear-gradient(90deg, #ff006e, #00ffff, #ff006e) 1;
    position: relative;
}

.hlb-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 255, 0.03) 2px,
            rgba(0, 255, 255, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

.hlb-visual .visual-moment-content {
    position: relative;
    z-index: 2;
}

.hlb-visual .visual-moment-title {
    color: #00ffff;
    font-family: monospace;
    font-size: 28px;
    letter-spacing: 0.15em;
    text-shadow:
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.4),
        2px 2px 0px rgba(255, 0, 110, 0.3);
}

.hlb-visual .visual-moment-subtitle {
    color: #ff006e;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-shadow: 0 0 10px rgba(255, 0, 110, 0.5);
    margin-top: 8px;
}

/* Neon Leviathan - Maritime/Whaling aesthetic */
.neon-visual {
    background: linear-gradient(135deg, #001a33 0%, #003366 50%, #001a33 100%);
    border-color: #0066cc;
}

.neon-visual .visual-moment-title {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.neon-visual .visual-moment-subtitle {
    color: #00ffff;
}

/* Animated gradient overlay for depth */
.visual-moment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* Core Systems + Extensions */
.systems-section {
    padding: 96px 0 78px;
    border-top: 1px solid var(--border);
    position: relative;
}

.systems-header {
    margin-bottom: 38px;
}

.systems-header .section-title {
    text-transform: none;
}

.source-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    max-width: 1180px;
    margin: 0 auto;
}

.source-card {
    min-height: 280px;
    width: 100%;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
        rgba(18, 18, 18, 0.86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    text-align: center;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.source-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.source-card img {
    width: 120px;
    height: 120px;
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: var(--bg-black);
    display: block;
    margin-bottom: 20px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.source-card span,
.source-card strong,
.source-card p {
    position: relative;
    z-index: 1;
}

.source-card span {
    display: none;
}

.source-card strong {
    color: var(--text-white);
    display: block;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 4px;
    max-width: 100%;
    overflow-wrap: break-word;
}

.source-card p {
    color: var(--text-dark-gray);
    font-size: 12px;
    line-height: 1.45;
    margin-top: 10px;
    max-width: 100%;
}

.source-card-large {
    grid-column: span 1;
}

@media (min-width: 900px) {
    .source-card-large {
        grid-column: span 1;
    }
}

.source-card:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
        rgba(30, 30, 30, 0.94);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 48px rgba(0, 0, 0, 0.38);
    transform: translateY(-3px);
}

.source-card:hover img {
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.08);
    transform: scale(1.04);
}

.extension-rail-container {
    max-width: 1180px;
    margin: 34px auto 0;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.extension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.extension-card {
    min-height: 200px;
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(16, 16, 16, 0.68);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-decoration: none;
    text-align: center;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.extension-card img {
    width: 80px;
    height: 80px;
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: var(--bg-black);
    margin-bottom: 14px;
    object-fit: contain;
}

.extension-card strong,
.extension-card p {
    position: relative;
    z-index: 1;
}

.extension-card strong {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.extension-card p {
    color: var(--text-dark-gray);
    font-size: 12px;
    line-height: 1.45;
    margin-top: 10px;
    max-width: 100%;
}

.extension-card span {
    display: none;
}

.extension-card:hover {
    background: rgba(34, 34, 34, 0.9);
    border-color: rgba(255, 255, 255, 0.68);
    transform: translateY(-2px);
}

@media (max-width: 1180px) {
    .source-wall {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .source-card,
    .source-card-large {
        min-height: 286px;
    }

    .source-card img,
    .source-card-large img {
        width: 124px;
        height: 124px;
    }

    .extension-rail {
        display: block;
    }

    .extension-rail-header {
        margin-bottom: 18px;
    }
}

@media (max-width: 820px) {
    .systems-section {
        padding: 64px 0 56px;
    }

    .source-card,
    .source-card-large {
        min-height: 274px;
    }

    .source-card img,
    .source-card-large img {
        width: 116px;
        height: 116px;
        margin-bottom: 16px;
    }

    .source-card strong,
    .source-card-large strong {
        font-size: 18px;
        max-width: 100%;
    }

    .extension-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .hero-title {
        font-size: 30px;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .arcade-banner p {
        font-size: 16px;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .systems-header .section-subtitle {
        max-width: 280px;
        margin: 0 auto;
    }

    .source-wall {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .source-card,
    .source-card-large {
        grid-column: auto;
        min-height: 242px;
        padding: 16px;
    }

    .source-card img,
    .source-card-large img {
        width: 96px;
        height: 96px;
        margin-bottom: 14px;
    }

    .source-card strong,
    .source-card-large strong {
        font-size: 16px;
    }

    .extension-grid {
        grid-template-columns: 1fr;
    }

    .extension-card {
        min-height: 156px;
        padding: 14px;
    }

    .extension-card img {
        width: 76px;
        height: 76px;
    }
}

/* ============================================================
   POLICY PAGES v2 — Standardized legal & support page system
   Used by: /privacy.html, /support.html, and every /apps/<slug>/
   privacy.html + support.html. Future apps inherit by using the
   .policy-masthead / .policy-layout / .policy-toc / .policy-content
   structure documented in apps/neonleviathan/.
   ============================================================ */

.policy-page {
    max-width: 1100px;
    padding: 64px 0 80px;
}

.policy-masthead {
    border-top: 1px solid var(--border);
    padding: 48px 0 40px;
    margin-bottom: 32px;
    position: relative;
}

.policy-masthead::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 64px;
    height: 2px;
    background: var(--text-white);
}

.policy-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-dark-gray);
    margin: 0 0 18px;
}

.policy-title {
    color: var(--text-white);
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin: 0 0 18px;
    font-weight: 700;
}

.policy-effective {
    display: inline-block;
    margin: 0;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card);
    font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--text-gray);
    text-transform: uppercase;
}

.policy-lede {
    max-width: 640px;
    margin: 28px 0 0;
    color: var(--text-gray);
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.6;
}

/* Two-column layout — sticky TOC + content. Single column on mobile. */
.policy-layout {
    display: grid;
    gap: 36px;
    grid-template-columns: 1fr;
    align-items: start;
}

@media (min-width: 960px) {
    .policy-layout {
        grid-template-columns: 220px 1fr;
        gap: 56px;
    }
}

.policy-toc {
    position: relative;
    padding: 4px 0;
}

@media (min-width: 960px) {
    .policy-toc {
        position: sticky;
        top: 48px;
        padding: 20px 0 20px 16px;
        border-left: 1px solid var(--border);
    }
}

.policy-toc-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-dark-gray);
    margin: 0 0 14px;
}

.policy-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: policy-toc;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

@media (min-width: 960px) {
    .policy-toc ol {
        flex-direction: column;
        gap: 8px;
    }
}

.policy-toc li {
    counter-increment: policy-toc;
    margin: 0;
}

.policy-toc a {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.35;
    border-bottom: 1px solid transparent;
    transition: color 0.16s ease, border-color 0.16s ease;
}

.policy-toc a::before {
    content: counter(policy-toc, decimal-leading-zero);
    font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--text-dark-gray);
    flex: 0 0 auto;
}

.policy-toc a:hover,
.policy-toc a:focus {
    color: var(--text-white);
    border-bottom-color: var(--text-white);
}

.policy-content {
    counter-reset: policy-card;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Card v2 — override the v1 .policy-card spacing/style.
   Visual refinements: left accent rail, numbered header, hover lift. */
.policy-content .policy-card {
    position: relative;
    margin: 0;
    padding: 28px 28px 28px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left-width: 1px;
    counter-increment: policy-card;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.policy-content .policy-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    transition: background 0.18s ease;
}

.policy-content .policy-card:hover,
.policy-content .policy-card:focus-within {
    border-color: #3a3a3a;
}

.policy-content .policy-card:hover::before,
.policy-content .policy-card:focus-within::before {
    background: var(--text-white);
}

.policy-content .policy-card h2 {
    display: flex;
    align-items: baseline;
    gap: 14px;
    color: var(--text-white);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.005em;
    margin: 0 0 14px;
}

.policy-content .policy-card h2::before {
    content: counter(policy-card, decimal-leading-zero);
    font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--text-dark-gray);
    flex: 0 0 auto;
}

.policy-content .policy-card p {
    color: var(--text-gray);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 12px;
    max-width: 64ch;
}

.policy-content .policy-card p:last-child {
    margin-bottom: 0;
}

.policy-content .policy-card p + p {
    margin-top: 14px;
}

.policy-content .policy-card strong {
    color: var(--text-white);
    font-weight: 600;
}

.policy-content .policy-card a {
    color: var(--text-white);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--text-dark-gray);
    transition: text-decoration-color 0.16s ease;
}

.policy-content .policy-card a:hover {
    text-decoration-color: var(--text-white);
}

/* Optional section grouping — wrap related cards with a chapter title. */
.policy-section-group {
    margin-top: 28px;
}

.policy-section-group + .policy-section-group {
    margin-top: 36px;
}

.policy-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-dark-gray);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* Pagefoot — companion link to the other legal page. */
.policy-pagefoot {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.policy-pagefoot-link {
    color: var(--text-white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: border-color 0.16s ease, background 0.16s ease;
}

.policy-pagefoot-link:hover,
.policy-pagefoot-link:focus {
    border-color: var(--text-white);
    background: #232323;
}

.policy-pagefoot-meta {
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--text-dark-gray);
    text-transform: uppercase;
    margin: 0;
}

/* Print stylesheet — App Review sometimes prints. Keep it readable. */
@media print {
    .policy-toc,
    .policy-pagefoot,
    .footer-section,
    header {
        display: none !important;
    }
    .policy-page,
    .policy-content .policy-card {
        background: #fff !important;
        color: #000 !important;
        border-color: #000 !important;
    }
    .policy-content .policy-card p,
    .policy-content .policy-card h2,
    .policy-title,
    .policy-eyebrow,
    .policy-effective {
        color: #000 !important;
    }
}
