/* ─── PCSX2 Guide — design system v4 (aurora editorial) ─── */
:root {
    --ds-bg: #040406;
    --ds-bg-elevated: #0b0b10;
    --ds-surface: #0e0e16;
    --ds-surface-2: #13131c;
    --ds-surface-hover: #1a1a26;
    --ds-border: rgba(255, 255, 255, 0.065);
    --ds-border-strong: rgba(255, 255, 255, 0.11);
    --ds-text: #f5f5f7;
    --ds-muted: #a7a7b5;
    --ds-subtle: #6e6e80;
    --ds-accent: #2dd4bf;
    --ds-accent-2: #a78bfa;
    --ds-accent-hover: #5eead4;
    --ds-accent-glow: rgba(45, 212, 191, 0.38);
    --ds-violet: #c4b5fd;
    --ds-hud-cyan: #22d3ee;
    --ds-radius: 1.25rem;
    --ds-radius-sm: 0.8125rem;
    --ds-radius-lg: 1.625rem;
    --ds-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ds-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ds-font-display: "Sora", "Outfit", Inter, system-ui, sans-serif;
    --ds-font-body: Inter, system-ui, sans-serif;
    --ds-shadow-lg: 0 28px 90px -28px rgba(0, 0, 0, 0.82);
    --ds-shadow-glow: 0 0 100px -24px rgba(45, 212, 191, 0.42);
    /* Bento row height: only used where a fixed min row is needed */
    --ds-bento-row: auto;
    /* Layout: 1200px centered column; gutters & spacing on 8px grid */
    --ds-max: 1200px;
    --ds-gutter: 16px;
    --ds-gutter-sm: 24px;
    --ds-gutter-lg: 32px;
    --ds-grid: 8px;
    /* Spacing — every token is a multiple of --ds-grid (8px) */
    --ds-1: 8px;
    --ds-2: 16px;
    --ds-3: 24px;
    --ds-4: 32px;
    --ds-5: 40px;
    --ds-6: 48px;
    --ds-8: 64px;
    --ds-10: 80px;
    --ds-12: 96px;
    --ds-16: 128px;
    --ds-20: 160px;
}

/* ─── Layout shell (aligned to one grid / max width) ─── */
.ds-container {
    width: 100%;
    max-width: var(--ds-max);
    margin-inline: auto;
    padding-inline: var(--ds-gutter);
    box-sizing: border-box;
}
@media (min-width: 640px) {
    .ds-container {
        padding-inline: var(--ds-gutter-sm);
    }
}
@media (min-width: 1024px) {
    .ds-container {
        padding-inline: var(--ds-gutter-lg);
    }
}

.ds-page-breadcrumb {
    padding-block: var(--ds-3);
}

/* Inner page main column — consistent vertical rhythm */
.ds-page-body {
    padding-top: var(--ds-5);
    padding-bottom: var(--ds-8);
}
@media (min-width: 1024px) {
    .ds-page-body {
        padding-top: var(--ds-8);
        padding-bottom: var(--ds-10);
    }
}

/* Large marketing sections (home explore, similar) */
.ds-section-y {
    padding-block: clamp(3.5rem, 9vw, 5.5rem);
}
@media (min-width: 1024px) {
    .ds-section-y {
        padding-block: clamp(4.5rem, 11vw, 8rem);
    }
}

/* Home hero inner */
.ds-hero-shell {
    padding-top: clamp(3rem, 7vw, 5.5rem);
    padding-bottom: clamp(4rem, 11vw, 7rem);
}

/* Footer main padding */
.ds-footer > .ds-container {
    padding-top: var(--ds-8);
    padding-bottom: var(--ds-8);
}

/* Footer — brand + pages layout */
.ds-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--ds-8);
    align-items: start;
}
@media (min-width: 640px) {
    .ds-footer-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }
}
@media (min-width: 1024px) {
    .ds-footer-grid {
        gap: var(--ds-10);
    }
}
.ds-footer-brand__lockup {
    display: flex;
    align-items: flex-start;
    gap: var(--ds-3);
}
.ds-footer-brand__logo {
    flex-shrink: 0;
    border-radius: 0.625rem;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.ds-footer-brand__meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}
.ds-footer-brand__title {
    font-family: var(--ds-font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--ds-text);
}
.ds-footer-brand__slug {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ds-subtle);
}
.ds-footer-brand__legal {
    margin-top: var(--ds-4);
    max-width: 26rem;
    padding: var(--ds-3) var(--ds-4);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--ds-subtle);
}
@media (min-width: 640px) {
    .ds-footer-brand__legal {
        border-left: 3px solid rgba(45, 212, 191, 0.35);
    }
}
.ds-footer-disclaimer {
    margin-top: var(--ds-3);
    max-width: 26rem;
    font-size: 0.75rem;
    line-height: 1.55;
    color: rgba(161, 161, 170, 0.9);
}
.ds-footer-nav__label {
    position: relative;
    margin: 0 0 var(--ds-3);
    padding-bottom: var(--ds-2);
    width: fit-content;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #71717a;
}
.ds-footer-nav__label::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.85), rgba(167, 139, 250, 0.45), transparent);
}
.ds-footer-nav__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.125rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (min-width: 400px) {
    .ds-footer-nav__list {
        grid-template-columns: repeat(2, minmax(0, 10rem));
    }
}
.ds-footer-nav__list a {
    display: block;
    padding: 0.4rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ds-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition:
        color 0.2s var(--ds-ease),
        border-color 0.2s var(--ds-ease);
}
.ds-footer-nav__list a:hover {
    color: #fff;
    border-bottom-color: rgba(45, 212, 191, 0.35);
}

/* Drawer links — equal touch targets */
.nav-drawer-link {
    display: flex;
    align-items: center;
    min-height: 3rem;
    box-sizing: border-box;
}

/* Inner pages: feature / card grids stretch to one row height */
.ds-page .grid:has(> article) {
    align-items: stretch;
}
.ds-page .grid:has(> article) > article {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.ds-theme {
    background-color: var(--ds-bg);
    color: var(--ds-text);
    font-family: var(--ds-font-body);
}

/* Ambient: aurora bands + soft grid + film grain (CSS noise) */
.ds-theme::before {
    content: "";
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 120% 70% at 50% -25%, rgba(45, 212, 191, 0.14), transparent 58%),
        radial-gradient(ellipse 70% 50% at 95% 15%, rgba(167, 139, 250, 0.11), transparent 52%),
        radial-gradient(ellipse 55% 45% at 5% 85%, rgba(34, 211, 238, 0.07), transparent 48%),
        radial-gradient(ellipse 40% 30% at 70% 95%, rgba(45, 212, 191, 0.05), transparent 45%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.035) 1px, transparent 0);
    background-size:
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%,
        100% 52px,
        22px 22px;
}
.ds-theme::after {
    content: "";
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ds-theme > main,
.ds-theme > footer {
    position: relative;
    z-index: 1;
}

/* Header */
.ds-site-header {
    transition:
        box-shadow 0.35s var(--ds-ease),
        border-color 0.35s var(--ds-ease),
        background-color 0.35s var(--ds-ease);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(4, 4, 6, 0.76);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
}
.ds-site-header.ds-header-scrolled {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), var(--ds-shadow-lg);
    border-color: rgba(255, 255, 255, 0.05) !important;
    background: rgba(4, 4, 6, 0.9) !important;
}

.ds-nav-link {
    border-radius: 9999px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--ds-subtle);
    transition:
        color 0.2s var(--ds-ease),
        background 0.2s var(--ds-ease),
        box-shadow 0.2s var(--ds-ease);
}
.ds-nav-link:hover {
    color: var(--ds-text);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
nav[aria-label="Primary"] .ds-nav-link[aria-current="page"] {
    color: var(--ds-text);
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(34, 211, 238, 0.08));
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.25);
}

/* Hero */
.ds-hero {
    position: relative;
    overflow: clip;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ds-hero-editorial,
.ds-hero-premium {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}
.ds-hero-aurora {
    isolation: isolate;
}

/* Premium hero — depth + entrance */
.ds-hero-premium .ds-hero-glow {
    filter: blur(100px);
    opacity: 0.85;
}
@media (prefers-reduced-motion: no-preference) {
    .ds-hero-premium .ds-hero-content > * {
        animation: ds-hero-in 0.85s var(--ds-ease-out) both;
    }
    .ds-hero-premium .ds-hero-content > *:nth-child(1) {
        animation-delay: 0.05s;
    }
    .ds-hero-premium .ds-hero-content > *:nth-child(2) {
        animation-delay: 0.12s;
    }
    .ds-hero-premium .ds-hero-content > *:nth-child(3) {
        animation-delay: 0.18s;
    }
    .ds-hero-premium .ds-hero-content > *:nth-child(4) {
        animation-delay: 0.24s;
    }
    .ds-hero-premium .ds-hero-content > *:nth-child(5) {
        animation-delay: 0.3s;
    }
}
@keyframes ds-hero-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ds-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    padding: 0.35rem 0.85rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ds-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition:
        border-color 0.2s var(--ds-ease),
        background 0.2s var(--ds-ease);
}
.ds-pill:hover {
    border-color: rgba(45, 212, 191, 0.35);
    background: rgba(45, 212, 191, 0.1);
}

.ds-stat-tile {
    position: relative;
    overflow: hidden;
    transition:
        border-color 0.25s var(--ds-ease),
        box-shadow 0.25s var(--ds-ease),
        transform 0.25s var(--ds-ease);
}
.ds-stat-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 50% 120%, rgba(45, 212, 191, 0.12), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s var(--ds-ease);
    pointer-events: none;
}
.ds-stat-tile:hover {
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 20px 50px -28px rgba(0, 0, 0, 0.65), var(--ds-shadow-glow);
    transform: translateY(-2px);
}
.ds-stat-tile:hover::after {
    opacity: 1;
}

/* Hero visual — no chrome; size capped so it stays balanced next to copy */
.ds-hero-visual {
    min-width: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
@media (min-width: 1024px) {
    .ds-hero-shell .ds-hero-grid {
        align-items: start;
    }
    .ds-hero-visual {
        align-items: flex-end;
    }
}

.ds-hero-frame {
    position: relative;
    width: 100%;
    max-width: min(100%, 19.5rem);
    margin: clamp(2.5rem, 8vw, 5.5rem) 0 0;
    padding: 0;
    overflow: visible;
    border: none;
    border-radius: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    line-height: 0;
}
@media (min-width: 640px) {
    .ds-hero-frame {
        max-width: min(100%, 22rem);
    }
}
@media (min-width: 1024px) {
    .ds-hero-frame {
        max-width: min(100%, 24rem);
    }
}
@media (min-width: 1280px) {
    .ds-hero-frame {
        max-width: min(100%, 26rem);
    }
}

.ds-hero-frame-img {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
}

/* Hero screenshot gallery (prev / next / dots on image) */
.ds-hero-gallery-stage {
    position: relative;
}
.ds-hero-gallery-toolbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.35rem 0.4rem;
    background: linear-gradient(to top, rgba(4, 4, 6, 0.82), rgba(4, 4, 6, 0.38) 55%, transparent);
    pointer-events: none;
}
.ds-hero-gallery-toolbar > * {
    pointer-events: auto;
}
.ds-hero-gallery-nav {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.4rem;
    background: rgba(14, 14, 22, 0.78);
    color: rgba(228, 228, 235, 0.95);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ds-hero-gallery-nav:hover {
    background: rgba(30, 30, 40, 0.92);
    border-color: rgba(45, 212, 191, 0.35);
    color: #fff;
}
.ds-hero-gallery-nav:focus-visible {
    outline: 2px solid rgba(45, 212, 191, 0.55);
    outline-offset: 2px;
}
.ds-hero-gallery-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}
.ds-hero-gallery-dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.ds-hero-gallery-dot:hover,
.ds-hero-gallery-dot:focus-visible {
    background: rgba(255, 255, 255, 0.52);
}
.ds-hero-gallery-dot.is-active {
    background: rgba(45, 212, 191, 0.92);
    transform: scale(1.15);
}
.ds-hero-gallery-dot:focus-visible {
    outline: 2px solid rgba(45, 212, 191, 0.55);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .ds-hero-gallery-nav,
    .ds-hero-gallery-dot {
        transition: none;
    }
    .ds-hero-gallery-dot.is-active {
        transform: none;
    }
}
.ds-hero-gallery .ds-hero-frame-badge {
    bottom: 2.65rem;
    z-index: 4;
}

.ds-hero-frame-badge {
    position: absolute;
    bottom: 0.4rem;
    right: 0.4rem;
    z-index: 2;
    margin: 0;
    padding: 0.2rem 0.45rem;
    border: none;
    border-radius: 0;
    background: rgba(4, 4, 6, 0.65);
    backdrop-filter: blur(8px);
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ds-subtle);
    box-shadow: none;
}

.ds-hero-watermark {
    position: absolute;
    right: -4%;
    top: 6%;
    z-index: 0;
    font-family: var(--ds-font-display);
    font-size: clamp(6.5rem, 22vw, 16rem);
    font-weight: 800;
    line-height: 0.72;
    letter-spacing: -0.06em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.045);
    pointer-events: none;
    user-select: none;
}
@media (max-width: 1023px) {
    .ds-hero-watermark {
        font-size: clamp(4.5rem, 42vw, 9rem);
        right: -10%;
        top: 12%;
        opacity: 0.5;
    }
}

.ds-hud-panel {
    position: relative;
    z-index: 1;
    padding: 1.35rem 1.15rem;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: linear-gradient(165deg, rgba(16, 16, 24, 0.95) 0%, rgba(3, 3, 8, 0.9) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), var(--ds-shadow-lg);
}
@media (min-width: 1024px) {
    .ds-hud-panel {
        padding: 1.75rem 1.5rem;
    }
}
.ds-hud-panel::before,
.ds-hud-panel::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: var(--ds-hud-cyan);
    border-style: solid;
    pointer-events: none;
    opacity: 0.75;
}
.ds-hud-panel::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}
.ds-hud-panel::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.ds-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0;
    border: none;
    border-left: 3px solid var(--ds-accent);
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.12), transparent);
    padding: 0.5rem 1rem 0.5rem 0.85rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ds-muted);
}
.ds-kicker-hud {
    border-left-color: rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.06);
    letter-spacing: 0.12em;
}

.ds-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3rem;
    padding: 0 1.75rem;
    border-radius: 9999px;
    background: linear-gradient(180deg, #fff 0%, #f4f4f5 100%);
    color: #0a0a0f;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 4px 16px -4px rgba(0, 0, 0, 0.45),
        0 0 48px -12px var(--ds-accent-glow);
    transition:
        transform 0.25s var(--ds-ease-out),
        box-shadow 0.25s var(--ds-ease-out),
        background 0.25s var(--ds-ease-out);
}
.ds-btn-primary:hover {
    background: linear-gradient(180deg, #fafafa 0%, #e4e4e7 100%);
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.18),
        0 12px 32px -8px rgba(0, 0, 0, 0.55),
        0 0 56px -8px var(--ds-accent-glow);
}

.ds-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    padding: 0 1.5rem;
    border-radius: 9999px;
    border: 1px solid var(--ds-border-strong);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ds-muted);
    transition:
        border-color 0.2s var(--ds-ease),
        color 0.2s var(--ds-ease),
        background 0.2s var(--ds-ease),
        box-shadow 0.2s var(--ds-ease);
}
.ds-btn-secondary:hover {
    border-color: rgba(45, 212, 191, 0.35);
    color: var(--ds-text);
    background: rgba(45, 212, 191, 0.08);
    box-shadow: 0 0 24px -8px rgba(45, 212, 191, 0.35);
}

.ds-btn-hud {
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-size: 0.6875rem !important;
    font-weight: 700;
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.25),
        0 0 24px -6px rgba(34, 211, 238, 0.2);
}
.ds-btn-hud:hover {
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.45),
        0 0 36px -6px rgba(34, 211, 238, 0.25);
}
.ds-btn-hud-secondary {
    border-radius: 2px !important;
    border-color: rgba(34, 211, 238, 0.25) !important;
    background: rgba(34, 211, 238, 0.04) !important;
}
.ds-btn-hud-secondary:hover {
    border-color: rgba(34, 211, 238, 0.45) !important;
    color: var(--ds-hud-cyan) !important;
}

.ds-media-frame {
    position: relative;
    border-radius: 0.75rem;
    border: 1px solid var(--ds-border-strong);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5) inset,
        var(--ds-shadow-lg),
        0 0 80px -30px rgba(45, 212, 191, 0.2);
    overflow: hidden;
}
.ds-media-frame-hud {
    border-radius: 0;
    border: 1px solid rgba(34, 211, 238, 0.2);
    background: rgba(3, 3, 8, 0.5);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6) inset,
        0 0 0 1px rgba(34, 211, 238, 0.08),
        0 32px 80px -32px rgba(0, 0, 0, 0.9);
    transform: none;
}
.ds-media-frame-hud::before,
.ds-media-frame-hud::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--ds-hud-cyan);
    border-style: solid;
    z-index: 2;
    pointer-events: none;
    opacity: 0.5;
}
.ds-media-frame-hud::before {
    top: 6px;
    left: 6px;
    border-width: 2px 0 0 2px;
}
.ds-media-frame-hud::after {
    bottom: 6px;
    right: 6px;
    border-width: 0 2px 2px 0;
}

.ds-trust-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
    border-top: 1px solid var(--ds-border);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
}
@media (min-width: 768px) {
    .ds-trust-bar {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem 1.5rem;
    }
}
.ds-trust-item {
    text-align: left;
    position: relative;
}
.ds-trust-value {
    font-family: var(--ds-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ds-text);
    line-height: 1.1;
}
@media (min-width: 1024px) {
    .ds-trust-value {
        font-size: 1.75rem;
    }
}
.ds-trust-label {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--ds-subtle);
}

.ds-trust-hud.ds-trust-bar {
    border-top: none;
    margin-top: 1.75rem;
    padding: 0;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--ds-hud-cyan);
    background: rgba(0, 0, 0, 0.25);
}
.ds-trust-hud .ds-trust-item {
    padding: 0.85rem 0.65rem;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ds-trust-hud .ds-trust-item:nth-child(2n) {
    border-right: none;
}
@media (min-width: 768px) {
    .ds-trust-hud .ds-trust-item {
        border-bottom: none;
    }
    .ds-trust-hud .ds-trust-item:not(:last-child) {
        border-right: 1px solid rgba(255, 255, 255, 0.07);
    }
    .ds-trust-hud .ds-trust-item:nth-child(2n) {
        border-right: 1px solid rgba(255, 255, 255, 0.07);
    }
    .ds-trust-hud .ds-trust-item:last-child {
        border-right: none;
    }
}
.ds-trust-hud .ds-trust-value {
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f4f4f5;
    letter-spacing: -0.02em;
}
.ds-trust-hud .ds-trust-label {
    font-family: ui-monospace, monospace;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(161, 161, 170, 0.9);
}

/* Explore cards */
.ds-card-link {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--ds-radius);
    border: 1px solid var(--ds-border);
    background: var(--ds-surface);
    padding: 1.35rem 1.35rem 1.15rem;
    text-align: left;
    transition:
        border-color 0.3s var(--ds-ease),
        background 0.3s var(--ds-ease),
        transform 0.35s var(--ds-ease-out),
        box-shadow 0.35s var(--ds-ease-out);
}
.ds-card-link::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(45, 212, 191, 0.12), transparent 40%);
    transition: opacity 0.4s var(--ds-ease);
    pointer-events: none;
}
.ds-card-link:hover {
    border-color: rgba(45, 212, 191, 0.35);
    background: var(--ds-surface-hover);
    transform: translateY(-4px);
    box-shadow: 0 24px 56px -28px rgba(0, 0, 0, 0.65), 0 0 48px -20px rgba(45, 212, 191, 0.2);
}
.ds-card-link:hover::before {
    opacity: 1;
}
.ds-card-link-featured {
    border-color: rgba(45, 212, 191, 0.4);
    background: linear-gradient(165deg, rgba(45, 212, 191, 0.12) 0%, var(--ds-surface) 45%);
    box-shadow:
        0 0 0 1px rgba(45, 212, 191, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.ds-card-link-featured:hover {
    border-color: rgba(94, 234, 212, 0.55);
    box-shadow:
        0 0 48px -12px rgba(45, 212, 191, 0.35),
        0 24px 56px -24px rgba(0, 0, 0, 0.7);
}
.ds-card-link-icon {
    display: flex;
    height: 2.5rem;
    width: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--ds-radius-sm);
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(34, 211, 238, 0.08));
    color: #5eead4;
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.ds-card-link-arrow {
    margin-top: auto;
    padding-top: 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ds-subtle);
    transition:
        color 0.25s var(--ds-ease),
        transform 0.25s var(--ds-ease-out);
}
.ds-card-link:hover .ds-card-link-arrow {
    color: var(--ds-accent-hover);
    transform: translateX(8px);
}

/* Explore */
.ds-explore {
    position: relative;
    border-bottom: 1px solid var(--ds-border);
}
.ds-explore-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(45, 212, 191, 0.04) 1px, transparent 1px),
        linear-gradient(0deg, rgba(45, 212, 191, 0.04) 1px, transparent 1px),
        radial-gradient(ellipse 90% 60% at 0% 100%, rgba(45, 212, 191, 0.08), transparent);
    background-size: 48px 48px, 48px 48px, 100% 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
}
.ds-explore-inner {
    position: relative;
    z-index: 1;
}
.ds-explore-heading {
    display: grid;
    gap: var(--ds-3);
    margin-bottom: var(--ds-5);
}
@media (min-width: 1024px) {
    .ds-explore-heading {
        grid-template-columns: minmax(0, 5.5rem) 1fr;
        align-items: end;
        gap: var(--ds-4);
    }
}
.ds-explore-index {
    font-family: var(--ds-font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, rgba(45, 212, 191, 0.35), rgba(45, 212, 191, 0.06));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    user-select: none;
}
@media (min-width: 1024px) {
    .ds-explore-index {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        text-align: right;
        justify-self: start;
    }
}

.ds-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #2dd4bf;
}
.ds-section-eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #2dd4bf, rgba(167, 139, 250, 0.6));
}

.ds-bento {
    display: grid;
    gap: var(--ds-2);
    grid-template-columns: 1fr;
}
.ds-landing .ds-bento {
    grid-auto-rows: auto;
    align-items: start;
}
@media (min-width: 640px) {
    .ds-bento {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .ds-bento {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--ds-2);
    }
}

.ds-bento .ds-card-link {
    border-radius: var(--ds-radius);
}
.ds-landing .ds-bento .ds-card-link {
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(165deg, rgba(15, 15, 24, 0.95) 0%, rgba(8, 8, 14, 0.85) 100%);
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    min-height: 0;
    height: auto;
    align-self: start;
    overflow: hidden;
    padding: 0.875rem 1rem 0.75rem;
    border-radius: 0.875rem;
}
.ds-landing .ds-bento .ds-card-link > h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
}
.ds-landing .ds-bento .ds-card-link > p {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ds-landing-v4 .ds-bento .ds-card-link-icon {
    height: 2rem;
    width: 2rem;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}
.ds-landing-v4 .ds-bento .ds-card-link-arrow {
    padding-top: 0.5rem;
    font-size: 0.625rem;
    letter-spacing: 0.1em;
}
.ds-landing .ds-bento .ds-card-link:hover {
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(45, 212, 191, 0.15),
        0 20px 50px -28px rgba(0, 0, 0, 0.55);
}
/* Featured Download: same compact icon box as siblings */
.ds-landing .ds-bento .ds-card-link-featured .ds-card-link-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.8125rem;
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.35), rgba(34, 211, 238, 0.15));
    color: #ecfeff;
}

/* Home v4 — chromatic left rail (bento) */
.ds-landing-v4 .ds-bento > .ds-card-link {
    border-left-width: 3px;
    border-left-style: solid;
}
.ds-landing-v4 .ds-bento > .ds-card-link:nth-child(1) {
    border-left-color: rgba(45, 212, 191, 0.55);
}
.ds-landing-v4 .ds-bento > .ds-card-link:nth-child(2) {
    border-left-color: rgba(167, 139, 250, 0.52);
}
.ds-landing-v4 .ds-bento > .ds-card-link:nth-child(3) {
    border-left-color: rgba(34, 211, 238, 0.48);
}
.ds-landing-v4 .ds-bento > .ds-card-link:nth-child(4) {
    border-left-color: rgba(251, 191, 36, 0.4);
}
.ds-landing-v4 .ds-bento > .ds-card-link:nth-child(5) {
    border-left-color: rgba(45, 212, 191, 0.72);
}
.ds-landing-v4 .ds-bento > .ds-card-link:nth-child(6) {
    border-left-color: rgba(129, 140, 248, 0.48);
}
.ds-landing-v4 .ds-bento > .ds-card-link:nth-child(7) {
    border-left-color: rgba(248, 113, 113, 0.38);
}
.ds-landing-v4 .ds-bento > .ds-card-link:nth-child(8) {
    border-left-color: rgba(52, 211, 153, 0.48);
}

.ds-hero-hud {
    border-bottom-color: rgba(34, 211, 238, 0.12);
}
.ds-hero-hud::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.35), transparent);
    pointer-events: none;
    z-index: 0;
}
.ds-hero-hud::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.03) 0%, transparent 28%);
    pointer-events: none;
    z-index: 0;
}

.ds-cta-strip {
    position: relative;
    margin: 0;
    padding: var(--ds-8) 0 var(--ds-10);
    border: none;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 24px 100%, 0 calc(100% - 24px));
    background:
        radial-gradient(ellipse 80% 100% at 100% 50%, rgba(45, 212, 191, 0.12), transparent 55%),
        linear-gradient(180deg, var(--ds-surface-2) 0%, var(--ds-bg) 100%);
    box-shadow: inset 0 1px 0 rgba(45, 212, 191, 0.2);
}
.ds-cta-strip::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.45), transparent);
    pointer-events: none;
}

.ds-footer {
    position: relative;
    border-top: 1px solid var(--ds-border);
    background: var(--ds-bg-elevated);
}
.ds-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.4) 40%, rgba(34, 211, 238, 0.25) 60%, transparent);
    pointer-events: none;
}

/* Inner pages — same surface treatment as the global theme */
.ds-page {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(14, 14, 22, 0.35);
}
.ds-page.ds-page--download {
    overflow: hidden;
}

.section-anchor {
    scroll-margin-top: 5rem;
}
@media (min-width: 1024px) {
    .section-anchor {
        scroll-margin-top: 5.5rem;
    }
}

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1.5rem;
    z-index: 80;
    display: flex;
    height: 3rem;
    width: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 12, 22, 0.92);
    color: var(--ds-muted);
    font-size: 0.875rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.6);
    transition:
        opacity 0.3s var(--ds-ease),
        transform 0.3s var(--ds-ease-out),
        border-color 0.2s var(--ds-ease),
        color 0.2s var(--ds-ease),
        box-shadow 0.2s var(--ds-ease);
}
.back-to-top:hover {
    border-color: rgba(45, 212, 191, 0.4);
    color: var(--ds-text);
    box-shadow: 0 8px 32px -8px rgba(45, 212, 191, 0.25);
}
@media (min-width: 1024px) {
    .back-to-top {
        right: 2rem;
    }
}
.back-to-top:not(.visible) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}
.back-to-top.visible {
    transform: translateY(0);
}

.fixed-download-btn {
    position: fixed;
    top: 50%;
    right: 1rem;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 0.85rem;
    border-radius: 1.125rem;
    border: 1px solid rgba(45, 212, 191, 0.25);
    background: rgba(12, 12, 22, 0.94);
    color: var(--ds-text);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.55), 0 0 40px -12px rgba(45, 212, 191, 0.3);
    transform: translateY(-50%);
    transition:
        transform 0.25s var(--ds-ease-out),
        box-shadow 0.25s var(--ds-ease-out),
        border-color 0.25s var(--ds-ease-out);
}
.fixed-download-btn i {
    font-size: 1.05rem;
    background: linear-gradient(135deg, #2dd4bf, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
@media (min-width: 1024px) {
    .fixed-download-btn {
        right: 2rem;
    }
}
.fixed-download-btn:hover {
    transform: translateY(-50%) scale(1.05);
    border-color: rgba(45, 212, 191, 0.5);
    box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.6), 0 0 56px -8px rgba(45, 212, 191, 0.4);
}

#drawer {
    transition: transform 0.35s var(--ds-ease-out);
    background: var(--ds-surface) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
#drawer:not(.open) {
    transform: translateX(100%);
    pointer-events: none;
}
#drawer.open {
    transform: translateX(0);
}
#drawer-backdrop {
    transition: opacity 0.3s var(--ds-ease);
}
#drawer-backdrop:not(.open) {
    opacity: 0;
    pointer-events: none;
}
#drawer-backdrop.open {
    opacity: 1;
}

details.faq-item summary {
    list-style: none;
}
details.faq-item summary::-webkit-details-marker {
    display: none;
}
details.faq-item[open] summary .faq-chevron {
    transform: rotate(180deg);
}
.faq-chevron {
    transition: transform 0.2s var(--ds-ease);
}

/* FAQ block — framed accordion (index + support) */
.ds-faq-accordion {
    padding: clamp(1rem, 3vw, 1.35rem);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(165deg, rgba(14, 14, 22, 0.55) 0%, rgba(4, 4, 6, 0.35) 100%);
    box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.65);
}
details.faq-item {
    transition:
        border-color 0.2s var(--ds-ease),
        box-shadow 0.2s var(--ds-ease),
        background-color 0.2s var(--ds-ease);
}
details.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.11);
    background-color: rgba(255, 255, 255, 0.02);
}
details.faq-item[open] {
    border-color: rgba(45, 212, 191, 0.22);
    background-color: rgba(45, 212, 191, 0.045);
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.07);
}
details.faq-item summary:focus-visible {
    outline: 2px solid rgba(45, 212, 191, 0.45);
    outline-offset: 2px;
    border-radius: 0.65rem;
}

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: 0.75rem 1rem;
    background: #fff;
    color: #09090b;
    border-radius: var(--ds-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .ds-card-link:hover {
        transform: none;
    }
    .ds-btn-primary:hover {
        transform: none;
    }
    .ds-media-frame {
        transform: none;
    }
    .ds-cta-strip {
        clip-path: none;
    }
    .ds-stat-tile:hover {
        transform: none;
    }
}
