/* ══════════════════════════════════════════════
   Sonarium Player — Design System & Styles
   ══════════════════════════════════════════════ */

:root {
    /* ── Backgrounds (brand) ── */
    --bg:          #0a0a0f;
    --bg-surface:  #12121a;
    --bg-hover:    #1a1a28;
    --bg-active:   #222236;
    /* ── Borders ── */
    --border:      #2a2a3a;
    --hairline:    rgba(232, 232, 240, 0.10);
    --hairline-strong: rgba(232, 232, 240, 0.22);
    /* ── Text ── */
    --text:        #e8e8f0;
    /* Readable secondary text: 7.7:1 on --bg (WCAG AA). */
    --text-soft:   #a0a0b4;
    /* Decorative / large labels only: 3.7:1 on --bg. */
    --text-muted:  #6a6a80;
    /* ── Accent ── */
    --accent:       #e8751a;
    --accent-hover: #f59035;
    /* Text on orange: white only reaches 3:1, near-black reaches 6.6:1. */
    --on-accent:    #0a0a0f;
    --accent-soft:  rgba(232, 117, 26, 0.12);
    /* ── Semantic ── */
    --danger:      #ef4444;
    --success:     #22c55e;
    --warning:     #eab308;
    --info:        #3b82f6;

    /* ── Typography: platform system fonts ── */
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                 "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto,
                 "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    --text-display: clamp(52px, 8.2vw, 112px);
    --text-h1:      clamp(40px, 5.4vw, 76px);
    --text-h2:      clamp(30px, 3.6vw, 48px);
    --text-h3:      clamp(24px, 2.4vw, 32px);
    --text-xl:      27px;
    --text-lg:      22px;
    --text-body:    18px;
    --text-base:    16px;
    --text-sm:      15px;
    --text-label:   12.5px;
    --text-caption: 12px;

    --tracking-display: -0.045em;
    --tracking-heading: -0.035em;
    --tracking-tight:   -0.02em;
    --tracking-label:   0.08em;

    --weight-light:    300;
    --weight-regular:  400;
    --weight-medium:   500;
    --weight-semibold: 600;

    /* ── Spacing (6px base) ── */
    --s-1: 6px;
    --s-2: 12px;
    --s-3: 18px;
    --s-4: 24px;
    --s-5: 30px;
    --s-6: 36px;
    --s-8: 48px;
    --s-10: 60px;
    --s-16: 96px;
    --s-20: 120px;
    --section-gap: clamp(80px, 11vw, 150px);
    --gutter:      clamp(20px, 4vw, 48px);
    --page-max:    1280px;
    --nav-h:       72px;

    /* ── Radius ── */
    --radius:      8px;
    --radius-lg:   12px;
    --radius-md:   14px;
    --radius-xl:   24px;
    --radius-pill: 9999px;

    /* ── Gradients (kept for compatibility) ── */
    --gradient-hero: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #1a1a28 100%);
    --gradient-accent: linear-gradient(135deg, #e8751a 0%, #f59035 100%);
    --gradient-card: linear-gradient(180deg, rgba(18,18,26,0.8) 0%, rgba(10,10,15,0.95) 100%);
    /* ── Shadows: only for floating overlays (menus, lightbox) ── */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 4px 20px rgba(232, 117, 26, 0.15);
    /* ── Overlays ── */
    --overlay-light: rgba(10, 10, 15, 0.55);
    --overlay-nav:   rgba(10, 10, 15, 0.82);
    --overlay-heavy: rgba(0, 0, 0, 0.92);

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ══════════════════════════════════════════════
   Reset
   ══════════════════════════════════════════════ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-weight: var(--weight-light);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Keep text editable/selectable inside form fields */
input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--accent-hover);
}

strong, b {
    font-weight: var(--weight-semibold);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

::selection {
    background: var(--accent);
    color: var(--on-accent);
}

.text-muted {
    color: var(--text-soft);
}

/* ══════════════════════════════════════════════
   Scrollbar
   ══════════════════════════════════════════════ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════════
   Typography
   ══════════════════════════════════════════════ */

h1, h2, h3, h4 {
    font-weight: var(--weight-regular);
    color: var(--text);
    text-wrap: balance;
}

h1 { font-size: var(--text-h1); line-height: 1.02; letter-spacing: var(--tracking-heading); }
h2 { font-size: var(--text-h2); line-height: 1.08; letter-spacing: var(--tracking-heading); }
h3 { font-size: var(--text-lg); line-height: 1.2;  letter-spacing: var(--tracking-tight); }

p {
    text-wrap: pretty;
}

/* Small uppercase label above headlines */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--text-caption);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--s-4);
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: currentColor;
    opacity: 0.8;
}

.eyebrow a {
    color: inherit;
}

.eyebrow a:hover {
    color: var(--accent-hover);
}

/* ══════════════════════════════════════════════
   Buttons — pill primary, ghost secondary
   ══════════════════════════════════════════════ */

.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 46px;
    padding: 0 26px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--on-accent);
}

.btn-primary:disabled,
.btn-primary.btn-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary:disabled:hover,
.btn-primary.btn-disabled:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--hairline-strong);
}

.btn-secondary:hover {
    border-color: var(--text);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-soft);
    padding: 0 6px;
}

.btn-ghost:hover {
    color: var(--text);
}

.btn-ghost-arrow {
    display: inline-block;
    transition: transform 0.25s var(--ease-out);
}

.btn-ghost:hover .btn-ghost-arrow {
    transform: translateX(4px);
}

.btn-sm {
    min-height: 36px;
    padding: 0 16px;
    font-size: 12px;
}

.btn-ghost.btn-sm {
    padding: 0 4px;
}

/* Download chips: outlined pill, orange on hover */
.btn-download {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--hairline-strong);
}

.btn-download:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

/* ══════════════════════════════════════════════
   Cards
   ══════════════════════════════════════════════ */

.card {
    background: var(--bg-surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--hairline-strong);
}

/* ══════════════════════════════════════════════
   Badges
   ══════════════════════════════════════════════ */

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: var(--weight-semibold);
    color: var(--accent);
    background: var(--accent-soft);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
}

/* ══════════════════════════════════════════════
   Inputs
   ══════════════════════════════════════════════ */

.input {
    background: var(--bg-surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    color: var(--text);
    font-size: 16px; /* ≥16px prevents iOS zoom on focus */
    font-weight: var(--weight-regular);
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:hover {
    border-color: var(--hairline-strong);
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 117, 26, 0.18);
    outline: none;
}

.input::placeholder {
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   Navbar
   ══════════════════════════════════════════════ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.navbar--scrolled {
    background: var(--overlay-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--hairline);
}

.navbar-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    color: var(--text);
}

.navbar-brand:hover {
    color: var(--text);
}

.navbar-logo {
    width: 28px;
    height: 28px;
}

.navbar-title {
    font-size: 15px;
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-tight);
    color: var(--text);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: var(--s-5);
}

.navbar-links > a:not(.btn-primary),
.navbar-user-name {
    color: var(--text-soft);
    font-size: var(--text-label);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    transition: color 0.15s;
}

.navbar-links > a:not(.btn-primary):hover,
.navbar-user-name:hover {
    color: var(--text);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.navbar-user-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
}

/* ── Hamburger button ── */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-pill);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s ease;
}

.navbar-hamburger:hover {
    border-color: var(--text);
}

.hamburger-line {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar-hamburger--open .hamburger-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.navbar-hamburger--open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.navbar-hamburger--open .hamburger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Mobile dropdown menu ── */
.navbar-mobile {
    display: none;
    flex-direction: column;
    padding: 0 var(--gutter);
    background: var(--bg);
    /* collapsed state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s var(--ease-out), opacity 0.25s ease, padding 0.35s var(--ease-out);
}

.navbar-mobile--open {
    max-height: 520px;
    opacity: 1;
    padding: var(--s-2) var(--gutter) var(--s-6);
    border-bottom: 1px solid var(--hairline);
}

.navbar-mobile a {
    display: block;
    padding: 16px 0;
    color: var(--text);
    font-size: var(--text-lg);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-tight);
    text-decoration: none;
    border-bottom: 1px solid var(--hairline);
    transition: color 0.15s;
}

.navbar-mobile a:hover {
    color: var(--accent);
}

.navbar-mobile a.btn-secondary {
    display: inline-flex;
    font-size: 12px;
    letter-spacing: 0.06em;
    padding: 0 16px;
    border: 1px solid var(--hairline-strong);
}

.navbar-mobile-login,
.navbar-mobile-logout {
    margin-top: var(--s-4);
    width: 100%;
}

/* ══════════════════════════════════════════════
   Hero — headline left, logo constellation right
   ══════════════════════════════════════════════ */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + var(--s-6)) var(--gutter) var(--s-10);
    overflow: hidden;
}

.hero-inner {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
}

.hero-text > * {
    animation: heroFadeIn 1s var(--ease-out) both;
}

.hero-text > :nth-child(1) { animation-delay: 0.15s; }
.hero-text > :nth-child(2) { animation-delay: 0.25s; }
.hero-text > :nth-child(3) { animation-delay: 0.4s; }
.hero-text > :nth-child(4) { animation-delay: 0.5s; }
.hero-text > :nth-child(5) { animation-delay: 0.6s; }

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: var(--text-display);
    font-weight: var(--weight-regular);
    line-height: 0.92;
    letter-spacing: var(--tracking-display);
    margin-bottom: var(--s-5);
}

.hero-company {
    margin-bottom: var(--s-5);
}

.hero-subtitle {
    font-size: clamp(22px, 2.3vw, 30px);
    font-weight: var(--weight-light);
    line-height: 1.25;
    letter-spacing: var(--tracking-tight);
    color: var(--text);
    max-width: 22em;
    margin-bottom: var(--s-3);
}

.hero-description {
    font-size: var(--text-body);
    font-weight: var(--weight-light);
    line-height: 1.6;
    color: var(--text-soft);
    max-width: 30em;
    margin-bottom: var(--s-8);
}

.hero-cta {
    display: flex;
    gap: var(--s-4);
    align-items: center;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: flex-end;
    animation: heroFadeIn 1.4s var(--ease-out) 0.2s both;
}

/* ── Logo constellation ── */
.constellation {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 1 / 1;
}

/* One fixed canvas behind the whole page draws every .shape-slot and morphs
   between them on scroll. z-index -1 keeps it above the body background and
   below all content. */
.scroll-constellation {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: -1;
    pointer-events: none;
}

/* Shown only when WebGL is unavailable */
.constellation-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.4s;
}

.constellation-live .constellation-fallback {
    opacity: 0;
}

/* Diamond WebGL background (account license card) */
.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-canvas.visible {
    opacity: 1;
}

/* ══════════════════════════════════════════════
   Footer
   ══════════════════════════════════════════════ */

.footer {
    border-top: 1px solid var(--hairline);
    padding: var(--s-5) var(--gutter) var(--s-4);
}

/* Compact: links left, copyright right, trademark note underneath. */
.footer-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-2) var(--s-6);
}

.footer-links {
    display: flex;
    gap: var(--s-4);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

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

.footer-bottom {
    display: contents;
}

.footer-copyright {
    color: var(--text-soft);
    font-size: 12px;
}

.footer-copyright a {
    color: inherit;
    text-decoration: none;
}

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

.footer-trademarks {
    flex-basis: 100%;
    color: var(--text-muted);
    font-size: 10.5px;
}

/* ══════════════════════════════════════════════
   Page Sections (inner pages)
   ══════════════════════════════════════════════ */

.page-section {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: calc(var(--nav-h) + clamp(48px, 8vw, 110px)) var(--gutter) var(--section-gap);
}

/* ══════════════════════════════════════════════
   Landing Sections
   ══════════════════════════════════════════════ */

.landing-section {
    padding: var(--section-gap) var(--gutter) 0;
}

/* Alternating sections share the page background. */
.landing-section--alt {
    background: transparent;
}

.section-inner {
    max-width: var(--page-max);
    margin: 0 auto;
}

.section-head {
    max-width: 920px;
    margin-bottom: clamp(40px, 5vw, 72px);
}

/* ── ChameleonEQ ── */
.eq-facts {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin: 0 0 var(--s-16);
}

.eq-how {
    margin-top: var(--s-16);
}

.eq-how-title {
    font-size: var(--text-h3);
    letter-spacing: var(--tracking-heading);
    margin-bottom: var(--s-6);
}

.eq-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 0 var(--s-8);
}

.eq-step {
    display: flex;
    gap: var(--s-3);
    padding: var(--s-4) 0;
    border-top: 1px solid var(--hairline);
}

.eq-step-num {
    flex-shrink: 0;
    width: 2.4em;
    font-family: var(--font-mono);
    font-size: var(--text-caption);
    letter-spacing: 0.1em;
    color: var(--accent);
    padding-top: 0.35em;
}

.eq-step-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-tight);
    margin-bottom: var(--s-1);
}

.eq-step-desc {
    color: var(--text-soft);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.eq-peq {
    margin-top: var(--s-16);
    max-width: 960px;
}

.origin-table {
    max-width: 640px;
}

/* ── Zigzag: mirrored sections ──
   --flip: figure left / headline right, and slides with text left / image right.
*/
@media (min-width: 961px) {
    .landing-section--flip .section-head--split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    }
    .landing-section--flip .section-head-visual {
        order: -1;
    }
    /* Headline flush to the right edge, mirroring the unflipped sections. */
    .landing-section--flip .section-head--split > div:first-child {
        text-align: right;
    }
    .landing-section--flip .section-head--split .eyebrow {
        flex-direction: row-reverse;
    }
    .landing-section--flip .section-head--split .section-title,
    .landing-section--flip .section-head--split .section-description {
        margin-left: auto;
    }
    .landing-section--flip .slider-slide {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    }
    .landing-section--flip .slider-slide-image {
        order: 2;
    }
    /* Controls stay centred under the image, now on the right. */
    .landing-section--flip .slider-nav {
        margin-left: auto;
    }

}

/* Full-screen, centred statement (section 09).
   The section is 1.6 screens tall; the stage inside is exactly one screen
   and sticks to the viewport, so the figure and copy hold still, centred,
   while the visitor scrolls through it. */
.statement-section {
    position: relative;
    min-height: 160vh;
    min-height: 160svh;
    padding: 0;
    text-align: center;
}

.statement-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--nav-h) var(--gutter) var(--s-4);
    overflow: hidden;
}

/* Particle slot filling the stage, behind the copy. */
.statement-visual {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.statement-visual .constellation {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: auto;
}

.statement-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.statement-section .section-title {
    font-size: min(var(--text-display), 11.5vh);
    margin: 0 auto clamp(10px, 3vh, 36px);
    max-width: 14em;
}

.statement-text {
    font-size: clamp(20px, 2.2vw, 30px);
    font-weight: var(--weight-light);
    letter-spacing: var(--tracking-tight);
    color: var(--text-soft);
}

/* Platforms under the statement: always one centred row, at every width.
   Names shrink with the viewport instead of wrapping. */
.compatibility-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: clamp(14px, 4vw, 64px);
    margin-top: clamp(20px, 7vh, 96px);
    padding-top: var(--s-4);
    border-top: 1px solid var(--hairline);
}

.compatibility-card h3 {
    font-size: clamp(16px, 4.2vw, var(--text-h2));
    letter-spacing: var(--tracking-heading);
    white-space: nowrap;
    margin: 0;
}

.statement-section .section-note {
    margin: clamp(14px, 4vh, 48px) auto 0;
}



/* Portrait (phones and upright tablets): smaller copy and platform names,
   so the whole statement fits inside the five-logo figure. */
@media (max-width: 768px), (orientation: portrait) and (max-width: 1024px) {
    .statement-section .section-title {
        font-size: min(clamp(32px, 9vw, 52px), 8vh);
        margin-bottom: var(--s-3);
    }
    .statement-text {
        font-size: clamp(15px, 4vw, 19px);
    }
    .compatibility-grid {
        gap: clamp(12px, 4vw, 32px);
        margin-top: var(--s-8);
        padding-top: var(--s-3);
    }
    .compatibility-card h3 {
        font-size: clamp(15px, 4.4vw, 24px);
    }
    .statement-section .section-note {
        margin-top: var(--s-5);
        font-size: 13px;
    }
}

/* Headline left, particle figure right */
/* Same columns and gap as the slides below (1.5fr image / 1fr text), so the
   headline sits over the image and the figure is centred over the text. */
.section-head--split {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}

.section-head--split .section-title {
    max-width: 12em;
}

.section-head-visual {
    width: min(320px, 34vh, 100%);
    justify-self: center;
}

.section-head-visual .constellation {
    max-width: none;
}

@media (max-width: 768px) {
    .section-head--split {
        grid-template-columns: 1fr;
    }
    .section-head-visual {
        width: min(60vw, 240px);
        margin: 0 auto;
    }
}

/* Two-column zigzag */
.split {
    max-width: var(--page-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 112px);
    align-items: start;
}

/* Not sticky: slots must scroll linearly so scroll position maps cleanly
   onto the morph between sections. */
.split-text {
    position: relative;
}

.split--reverse .split-text {
    order: 2;
}

.split-aside {
    min-width: 0;
    padding-top: var(--s-8);
}

.section-title {
    font-size: var(--text-h1);
    font-weight: var(--weight-regular);
    line-height: 1.02;
    letter-spacing: var(--tracking-heading);
    margin-bottom: var(--s-4);
    text-wrap: balance;
}

.section-title--display {
    font-size: var(--text-display);
    line-height: 0.95;
    letter-spacing: var(--tracking-display);
}

.section-description {
    font-size: var(--text-body);
    font-weight: var(--weight-light);
    color: var(--text-soft);
    max-width: 34em;
    line-height: 1.6;
    margin-bottom: var(--s-8);
}

.section-quote {
    margin-top: var(--s-6);
    padding: var(--s-1) 0 var(--s-1) var(--s-4);
    border-left: 2px solid var(--accent);
    color: var(--text-soft);
    font-size: var(--text-base);
    line-height: 1.7;
    font-style: italic;
}

.section-note {
    color: var(--text-soft);
    font-size: var(--text-sm);
    margin-top: var(--s-8);
    max-width: 40em;
}

/* Closing statement */
.closing-section {
    padding-bottom: var(--section-gap);
}

.closing-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}

.closing-visual {
    display: flex;
    justify-content: center;
}

.closing-visual .constellation {
    max-width: 460px;
}

/* Section particle figure, under the headline in the sticky column.
   Capped by viewport height so the sticky column never outgrows the screen. */
.split-text .section-description {
    margin-bottom: var(--s-6);
}

.split-visual {
    width: min(100%, 380px, 40vh);
}

.split-visual .constellation {
    max-width: none;
}

.closing-title {
    font-size: var(--text-display);
    font-weight: var(--weight-regular);
    line-height: 0.95;
    letter-spacing: var(--tracking-display);
    color: var(--text);
    max-width: 12em;
    margin-bottom: var(--s-8);
    text-wrap: balance;
}

/* ══════════════════════════════════════════════
   Format Grid (pills)
   ══════════════════════════════════════════════ */

.format-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--s-8);
}

.format-pill {
    display: inline-block;
    font-size: 13px;
    font-weight: var(--weight-medium);
    letter-spacing: 0.04em;
    color: var(--text);
    background: transparent;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--hairline-strong);
    transition: border-color 0.15s, color 0.15s;
}

.format-pill:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ══════════════════════════════════════════════
   Formats Table — bare rows with hairlines
   ══════════════════════════════════════════════ */

.formats-table {
    display: flex;
    flex-direction: column;
}

.format-row {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-4) 0;
    border-top: 1px solid var(--hairline);
}

.format-row:last-child {
    border-bottom: 1px solid var(--hairline);
}

.format-name {
    font-size: var(--text-xl);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-tight);
    line-height: 1.15;
}

.format-detail {
    color: var(--text-soft);
    font-size: var(--text-sm);
}

/* ══════════════════════════════════════════════
   Audio Output — platforms as large type
   ══════════════════════════════════════════════ */

.audio-output-grid {
    display: flex;
    flex-direction: column;
}

.audio-output-card {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-5) 0;
    border-top: 1px solid var(--hairline);
}

.audio-output-card:last-child {
    border-bottom: 1px solid var(--hairline);
}

.audio-output-card h3 {
    font-size: var(--text-h2);
    letter-spacing: var(--tracking-heading);
    line-height: 1.05;
}

.audio-output-card p {
    color: var(--accent);
    font-size: var(--text-label);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

/* Figure with a column of its own: large and centred against the copy. */
.split-aside--visual {
    align-self: center;
    display: flex;
    justify-content: center;
    padding-top: 0;
}

.split-visual--column {
    width: min(100%, 520px, 64vh);
}

/* Stats under the copy: three across, they share the text column. */
.split-text .performance-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--s-6) var(--s-5);
}

/* The bit → DAC → analog scene is wide: give it more room than other figures. */
.split-visual--wide {
    width: min(100%, 460px, 48vh);
}

.split-visual-caption {
    margin-top: var(--s-1);
    font-family: var(--font-mono);
    font-size: var(--text-caption);
    letter-spacing: 0.12em;
    color: var(--text-soft);
    text-align: center;
}

/* "Why no DSP tweaks" statement */
.nodsp {
    margin-top: var(--s-10);
    padding-left: var(--s-4);
    border-left: 1px solid var(--hairline-strong);
}

.nodsp-title {
    font-size: var(--text-h3);
    letter-spacing: var(--tracking-heading);
    line-height: 1.12;
    margin-bottom: var(--s-3);
}

.nodsp-text {
    color: var(--text-soft);
    font-size: var(--text-base);
    line-height: 1.7;
    max-width: 36em;
}

[dir="rtl"] .nodsp {
    padding-left: 0;
    padding-right: var(--s-4);
    border-left: none;
    border-right: 1px solid var(--hairline-strong);
}

/* ══════════════════════════════════════════════
   Screenshot Slider
   ══════════════════════════════════════════════ */

.screenshot-slider {
    position: relative;
    /* Shared by the slide grid and the nav so controls align with the image. */
    --slider-gap: clamp(32px, 5vw, 80px);
}

/* All slides share one grid cell: the slider is as tall as its tallest
   slide, so changing slides never resizes it or moves the page, and each
   slide is centred vertically inside that fixed box. */
.slider-slides {
    position: relative;
    display: grid;
}

.slider-slide {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: var(--slider-gap);
    align-items: center;
    align-self: center;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.slider-slide--active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    animation: slider-in 0.5s var(--ease-out);
}

@keyframes slider-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.slider-slide-image {
    min-width: 0;
    position: relative;
}

.slider-slide-image img {
    display: block;
    width: 100%;
    border-radius: var(--radius-xl);
    cursor: zoom-in;
    transition: transform 0.4s var(--ease-out);
}

.slider-slide-image:hover img {
    transform: scale(1.01);
}

.slider-slide-zoom {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.slider-slide-image:hover .slider-slide-zoom {
    opacity: 1;
}

/* ── Lightbox modal ── */
.slider-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
    animation: slider-modal-in 0.2s ease-out;
}

@keyframes slider-modal-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slider-modal-img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    cursor: zoom-out;
    animation: slider-modal-zoom 0.2s ease-out;
}

@keyframes slider-modal-zoom {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.slider-modal-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.slider-modal-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.slider-modal-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    z-index: 2001;
}

.slider-modal-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.slider-modal-arrow--prev { left: 24px; }
.slider-modal-arrow--next { right: 24px; }

@media (max-width: 600px) {
    .slider-modal-arrow {
        width: 42px;
        height: 42px;
        font-size: 26px;
    }
    .slider-modal-arrow--prev { left: 10px; }
    .slider-modal-arrow--next { right: 10px; }
}

.slider-slide-content {
    min-width: 0;
}

.slider-slide-title {
    font-size: var(--text-h3);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-heading);
    line-height: 1.1;
    margin-bottom: var(--s-3);
    color: var(--text);
}

.slider-slide-description {
    font-size: 17px;
    color: var(--text-soft);
    line-height: 1.6;
    margin-bottom: var(--s-4);
}

.slider-slide-bullets {
    list-style: none;
    padding: 0;
}

.slider-slide-bullets li {
    font-size: var(--text-sm);
    color: var(--text);
    padding: 10px 0 10px 22px;
    position: relative;
    border-top: 1px solid var(--hairline);
}

.slider-slide-bullets li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 0;
    height: 0;
    transform: translateY(-50%);
    /* tiny play-triangle, echoing the logo */
    border-left: 7px solid var(--accent);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* Slider navigation row (arrows + dots) */
/* Same width as the image column (1.5fr of 1.5fr + 1fr), so the controls are
   centred under the screenshot rather than under the whole slider. */
.slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    width: calc((100% - var(--slider-gap)) * 0.6);
    padding-top: var(--s-6);
}

[dir="rtl"] .slider-nav {
    margin-left: auto;
}

.slider-arrow {
    position: static;
    background: transparent;
    border: 1px solid var(--hairline-strong);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.slider-arrow:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Slider dots — 24px hit area, 8px visual */
.slider-dots {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 var(--s-1);
}

.slider-dot {
    position: relative;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.slider-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--hairline-strong);
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out), background 0.2s;
}

.slider-dot:hover::after {
    background: var(--text-soft);
}

.slider-dot--active::after,
.slider-dot--active:hover::after {
    width: 20px;
    background: var(--accent);
}

/* ══════════════════════════════════════════════
   Performance — numbers as heroes
   ══════════════════════════════════════════════ */

.performance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-8) var(--s-6);
}

.performance-item {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding-top: var(--s-4);
    border-top: 1px solid var(--hairline);
}

.performance-value {
    display: block;
    font-size: var(--text-h3);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-heading);
    line-height: 1.1;
    color: var(--text);
}

.performance-label {
    font-size: var(--text-sm);
    color: var(--text-soft);
    line-height: 1.5;
}

/* ══════════════════════════════════════════════
   Philosophy
   ══════════════════════════════════════════════ */

.philosophy-grid {
    display: flex;
    flex-direction: column;
}

/* Full-width row under the headline: three columns, one on small screens. */
.philosophy-grid--row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 0 var(--s-8);
}

.philosophy-grid--row .philosophy-card:last-child {
    border-bottom: none;
}

.philosophy-card {
    padding: var(--s-6) 0;
    border-top: 1px solid var(--hairline);
}

.philosophy-card:last-child {
    border-bottom: 1px solid var(--hairline);
}

.philosophy-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--s-2);
}

.philosophy-card p {
    color: var(--text-soft);
    font-size: var(--text-base);
    line-height: 1.65;
    max-width: 36em;
}

/* ══════════════════════════════════════════════
   Pricing Page
   ══════════════════════════════════════════════ */

.pricing-page {
    text-align: left;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: var(--s-10) var(--s-8);
    max-width: 960px;
    margin: var(--s-6) 0 var(--s-10);
}

.pricing-card {
    background: transparent;
    border-top: 1px solid var(--hairline-strong);
    padding: var(--s-6) 0 0;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}

.pricing-card:hover {
    border-top-color: var(--text-soft);
}

.pricing-card--highlighted,
.pricing-card--highlighted:hover {
    border-top: 2px solid var(--accent);
    position: relative;
}

.pricing-card--disabled {
    opacity: 0.45;
    pointer-events: none;
}

.pricing-card-header {
    margin-bottom: var(--s-6);
}

.pricing-card-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-regular);
    margin: var(--s-3) 0 var(--s-3);
}

.pricing-card-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--s-2);
}

.pricing-card-amount {
    font-size: clamp(48px, 6vw, 76px);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-display);
    line-height: 1;
    color: var(--text);
}

.pricing-card-detail {
    font-size: var(--text-sm);
    color: var(--text-soft);
}

.pricing-card-benefits {
    list-style: none;
    padding: 0;
    margin-bottom: var(--s-6);
    flex: 1;
}

.pricing-card-benefit {
    padding: 12px 0;
    font-size: var(--text-base);
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: var(--s-2);
    border-top: 1px solid var(--hairline);
}

.pricing-card-check {
    color: var(--accent);
    font-weight: var(--weight-semibold);
    flex-shrink: 0;
}

.pricing-card-cta {
    width: 100%;
}

.pricing-note {
    max-width: 640px;
    padding: var(--s-1) 0 var(--s-1) var(--s-4);
    border-left: 2px solid var(--accent);
}

.pricing-note p {
    color: var(--text-soft);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.pricing-note p + p {
    margin-top: 10px;
}

/* Disclaimer note inside a pricing card (e.g. alpha "may contain bugs") */
.pricing-card-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 var(--s-4);
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-soft);
    background: rgba(234, 179, 8, 0.06);
    border: 1px solid rgba(234, 179, 8, 0.22);
    border-radius: var(--radius-md);
}

.pricing-card-note-icon {
    flex-shrink: 0;
    color: var(--warning);
    font-size: 13px;
    line-height: 1.4;
}

/* ── Checkout Success ── */
.checkout-success-page {
    text-align: center;
}

.checkout-success-page .section-title {
    text-align: center;
}

.checkout-success-card {
    max-width: 620px;
    margin: 0 auto;
    padding: var(--s-4) 0;
}

.checkout-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--s-4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--on-accent);
    background: var(--accent);
    border-radius: 50%;
}

.checkout-success-icon--pending {
    background: var(--bg-hover);
    color: var(--text);
}

.checkout-success-message {
    font-size: var(--text-lg);
    font-weight: var(--weight-light);
    color: var(--text);
    margin-bottom: var(--s-2);
    line-height: 1.5;
}

.checkout-success-detail {
    font-size: var(--text-base);
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: var(--s-6);
}

.checkout-success-actions {
    display: flex;
    gap: var(--s-2);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--s-6);
}

.checkout-success-note {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 460px;
    margin: 0 auto;
}

/* ── Account / Profile ── */
.account-page {
    max-width: calc(1080px + 2 * var(--gutter));
    margin: 0 auto;
}

/* Identity header: name, email and plan */
.account-head {
    text-align: left;
    margin-bottom: var(--s-8);
}

.account-head .eyebrow {
    margin-bottom: var(--s-3);
}

.account-name-display {
    display: flex;
    align-items: baseline;
    gap: var(--s-3);
    flex-wrap: wrap;
}

.account-name {
    font-size: var(--text-h1);
    line-height: 1.02;
    letter-spacing: var(--tracking-heading);
    font-weight: var(--weight-regular);
    overflow-wrap: anywhere;
    min-width: 0;
}

.account-name-edit-btn {
    color: var(--text-soft);
}

.account-name-edit {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex-wrap: wrap;
    max-width: 640px;
}

.account-name-input {
    flex: 1 1 260px;
    min-height: 56px;
    font-size: var(--text-lg);
}

.account-head-meta {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex-wrap: wrap;
    margin-top: var(--s-3);
}

.account-email {
    color: var(--text-soft);
    font-size: var(--text-base);
    overflow-wrap: anywhere;
}

.account-stack {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-4);
    align-items: stretch;
}

/* Quiet surface: hairline + faint lift, no heavy boxes */
.account-card {
    background: rgba(232, 232, 240, 0.012);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-xl);
    padding: var(--s-6);
    text-align: left;
    transition: border-color 0.25s ease;
}

.account-card:hover {
    border-color: var(--hairline-strong);
}

.account-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-3);
    margin-bottom: var(--s-4);
}

.account-card-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-regular);
    letter-spacing: var(--tracking-tight);
    color: var(--text);
}

.account-card-count {
    font-size: var(--text-sm);
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

/* ── License hero panel ── */
.account-license {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--s-8);
    align-items: center;
    padding: var(--s-8);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-xl);
    background: rgba(232, 232, 240, 0.012);
    text-align: left;
}

/* The canvas fills the panel; everything else sits above it */
.account-license > .hero-canvas {
    z-index: 0;
}

.account-license > *:not(.hero-canvas) {
    position: relative;
    z-index: 1;
}

.account-license--empty {
    grid-template-columns: 1fr;
}

.account-license-top {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex-wrap: wrap;
}

.account-kicker {
    font-size: var(--text-caption);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.account-license-plan {
    font-size: var(--text-h2);
    line-height: 1.08;
    letter-spacing: var(--tracking-heading);
    color: var(--text);
    margin: var(--s-3) 0 var(--s-6);
    text-wrap: balance;
}

.account-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4) var(--s-10);
    padding-top: var(--s-4);
    border-top: 1px solid var(--hairline);
}

.account-stat dt {
    font-size: var(--text-caption);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: var(--s-1);
}

.account-stat dd {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.account-stat-num {
    font-size: var(--text-h3);
    line-height: 1;
    letter-spacing: var(--tracking-tight);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.account-stat-of {
    font-size: var(--text-base);
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.account-stat-date {
    font-size: var(--text-lg);
    line-height: 1.35;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* Device slots drawn as the brand diamond */
.account-stat .device-pips {
    gap: 8px;
    margin-top: var(--s-2);
}

.device-pip {
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    border: 1px solid var(--hairline-strong);
    border-radius: 2px;
}

.device-pip--on {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(232, 117, 26, 0.45);
}

.account-license-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
    margin-top: var(--s-6);
}

.account-license-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-2);
}

.account-license-qr .license-qr-container {
    padding: 12px;
    background: transparent;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
}

.account-license-qr .license-qr {
    width: 168px;
    height: 168px;
}

.account-license-qr figcaption {
    font-size: var(--text-caption);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--text-soft);
}

.account-notice {
    margin-top: var(--s-4);
    padding: 14px 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    max-width: 560px;
}

.account-notice--warn {
    background: rgba(234, 179, 8, 0.06);
    border-color: rgba(234, 179, 8, 0.28);
}

.account-notice p {
    font-size: 14px;
    color: var(--text-soft);
    line-height: 1.6;
}

.account-notice p + .btn-primary {
    margin-top: 12px;
}

.account-notice strong {
    color: var(--text);
}

.license-key {
    font-family: var(--font-mono);
    letter-spacing: 1px;
    color: var(--accent);
}

/* ── Email verification banner ── */
.verify-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 760px;
    margin: 0 0 var(--s-4);
    padding: 16px 20px;
    background: rgba(232, 117, 26, 0.06);
    border: 1px solid rgba(232, 117, 26, 0.35);
    border-radius: var(--radius-xl);
    text-align: left;
}

.verify-banner-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--weight-semibold);
    font-size: 18px;
    color: var(--on-accent);
    background: var(--accent);
    border-radius: 50%;
}

.verify-banner-text {
    flex: 1;
}

.verify-banner-text strong {
    color: var(--text);
    font-size: var(--text-sm);
}

.verify-banner-text p {
    color: var(--text-soft);
    font-size: 14px;
    margin: 4px 0 0;
    line-height: 1.5;
}

.verify-banner-email {
    color: var(--accent);
    font-weight: var(--weight-semibold);
}

.verify-banner-error {
    color: var(--danger) !important;
}

.verify-banner-sent {
    flex-shrink: 0;
    color: var(--success);
    font-size: 13px;
    font-weight: var(--weight-semibold);
}

.resend-session-email {
    margin: 16px 0 24px;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: var(--text-sm);
}

@media (max-width: 600px) {
    .verify-banner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

.license-qr-container {
    display: flex;
    justify-content: center;
}

.license-qr {
    width: 140px;
    height: 140px;
}

.license-qr-svg {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    padding: 8px;
}

.account-empty-text {
    color: var(--text-soft);
    font-size: var(--text-sm);
}

.license-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid currentColor;
}

/* Status dot; the label carries the meaning, colour only reinforces it */
.license-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.license-status--active {
    color: var(--success);
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.35);
}

.license-status--warn {
    color: var(--warning);
    background: rgba(234, 179, 8, 0.08);
    border-color: rgba(234, 179, 8, 0.35);
}

.license-status--inactive {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.35);
}

/* ── Devices: hairline rows, no nested boxes ── */
.device-list {
    display: flex;
    flex-direction: column;
}

.device-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) 0;
    border-top: 1px solid var(--hairline);
}

.device-row:last-child {
    padding-bottom: 0;
}

.device-glyph {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
}

/* Rotated square = brand diamond (no letter) */
.device-glyph::before {
    content: "";
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(232, 117, 26, 0.45);
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.device-name {
    font-size: var(--text-base);
    color: var(--text);
    font-weight: var(--weight-regular);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-meta {
    font-size: 13px;
    color: var(--text-soft);
}

.device-last-seen {
    font-size: 13px;
    color: var(--text-soft);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.device-remove,
.btn-danger {
    color: var(--danger);
}

.device-remove:hover {
    color: #f87171;
}

.btn-secondary.btn-danger {
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-secondary.btn-danger:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger);
}

.account-pw-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

/* Fields read as part of the transparent card, not solid blocks */
.account-page .input {
    background: rgba(232, 232, 240, 0.025);
}

.totp-code-input {
    font-family: var(--font-mono);
    letter-spacing: 0.4em;
    font-size: var(--text-lg);
    max-width: 220px;
}

.account-pw-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-pw-form label {
    font-size: var(--text-caption);
    color: var(--text-soft);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

.account-pw-form .btn-primary {
    align-self: flex-start;
}

/* ── Pricing: already owned ── */
.pricing-loading {
    padding: 60px 0;
}

/* Transparency banner shown above the (disabled) cards when owned */
.pricing-owned-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 760px;
    margin: 0 0 var(--s-6);
    padding: 14px 20px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.28);
    border-radius: var(--radius-xl);
    text-align: left;
}

.pricing-owned-banner-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--bg);
    background: var(--success);
    border-radius: 50%;
}

.pricing-owned-banner-text {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-soft);
    line-height: 1.5;
}

.pricing-owned-banner-text strong {
    color: var(--text);
}

.pricing-owned-banner-plan {
    color: var(--accent);
    font-weight: var(--weight-semibold);
}

.pricing-owned {
    max-width: 560px;
    margin: 0 0 32px;
    padding: var(--s-4) 0;
    text-align: left;
}

.pricing-owned-icon {
    width: 64px;
    height: 64px;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--on-accent);
    background: var(--accent);
    border-radius: 50%;
}

.pricing-owned h2 {
    font-size: var(--text-h3);
    color: var(--text);
    margin-bottom: 12px;
}

.pricing-owned p {
    font-size: var(--text-base);
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: 24px;
}

.pricing-owned-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
   Download Page
   ══════════════════════════════════════════════ */

.download-page {
    text-align: left;
}

/* Just a label, not a badge: the version is reference info, not a CTA */
.download-version-badge {
    display: block;
    margin: calc(var(--s-4) * -1) 0 var(--s-10);
    font-size: 13px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    color: var(--text-soft);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-8) var(--s-6);
    margin-bottom: var(--s-10);
}

.download-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--s-5) 0 0;
    border-top: 1px solid var(--hairline-strong);
    transition: border-color 0.2s;
}

.download-card:hover {
    border-top-color: var(--text-soft);
}

/* Recommended (auto-detected OS) card */
.download-card--recommended,
.download-card--recommended:hover {
    border-top: 2px solid var(--accent);
}

.download-card-badge {
    order: -1;
    margin-bottom: var(--s-2);
    font-size: var(--text-caption);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.download-card h3 {
    font-size: var(--text-h2);
    letter-spacing: var(--tracking-heading);
    margin-bottom: var(--s-1);
}

.download-card-req {
    color: var(--text-soft);
    font-size: var(--text-sm);
    margin-bottom: var(--s-5);
}

/* Actions sit at the bottom so every column's CTA shares a baseline */
.download-card-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}

.download-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.download-auth-notice {
    max-width: 720px;
    padding: var(--s-1) 0 var(--s-1) var(--s-4);
    border-left: 2px solid var(--accent);
    margin-bottom: var(--s-10);
}

.download-auth-notice p {
    color: var(--text-soft);
    font-size: var(--text-base);
}

.download-requirements {
    max-width: 760px;
}

.download-requirements h2 {
    margin-bottom: var(--s-4);
    font-size: var(--text-h2);
}

/* Same visual language as the Formats table: bare rows with hairlines */
.requirements-table {
    margin-bottom: 32px;
}

.requirement-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-4);
    padding: var(--s-3) 0;
    border-top: 1px solid var(--hairline);
}

.requirement-row:last-child {
    border-bottom: 1px solid var(--hairline);
}

.requirement-platform {
    font-weight: var(--weight-regular);
    font-size: var(--text-lg);
    letter-spacing: var(--tracking-tight);
}

.requirement-detail {
    color: var(--text-soft);
    font-size: var(--text-sm);
    text-align: right;
}

/* ══════════════════════════════════════════════
   Auth Pages (Login / Register)
   ══════════════════════════════════════════════ */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
}

.auth-form-container h1 {
    margin-bottom: var(--s-6);
    font-size: clamp(36px, 4.5vw, 56px);
    letter-spacing: var(--tracking-heading);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: var(--text-caption);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--text-soft);
}

.form-optional {
    font-weight: var(--weight-regular);
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
}

.auth-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--danger);
    font-size: 14px;
    font-weight: var(--weight-regular);
}

.auth-success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--success);
    font-size: 14px;
    font-weight: var(--weight-regular);
}

.auth-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: var(--s-6);
    padding-top: var(--s-4);
    border-top: 1px solid var(--hairline);
}

.auth-links a {
    font-size: 14px;
    color: var(--text-soft);
    transition: color 0.15s;
}

.auth-links a:hover {
    color: var(--accent);
}

/* Password validation */
.password-requirements {
    margin-top: 4px;
}

.password-errors {
    list-style: none;
    padding: 0;
}

.password-errors li {
    font-size: 13px;
    color: var(--danger);
    padding: 2px 0;
}

.password-errors li::before {
    content: "✗ ";
}

.password-valid {
    font-size: 13px;
    color: var(--success);
}

/* ══════════════════════════════════════════════
   Legal Pages (Terms / Privacy)
   ══════════════════════════════════════════════ */

.legal-content {
    max-width: 760px;
}

.legal-content h1 {
    font-size: var(--text-h1);
    margin-bottom: var(--s-3);
}

.legal-updated {
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: var(--s-10);
}

.legal-content h2 {
    font-size: var(--text-xl);
    letter-spacing: var(--tracking-tight);
    margin-top: var(--s-8);
    margin-bottom: var(--s-2);
    padding-top: var(--s-4);
    border-top: 1px solid var(--hairline);
}

.legal-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.legal-content h3 {
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    letter-spacing: 0;
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--accent);
}

.legal-content p {
    color: var(--text-soft);
    font-size: var(--text-base);
    line-height: 1.75;
    margin-bottom: 12px;
}

.legal-content ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-content li {
    color: var(--text-soft);
    font-size: var(--text-base);
    line-height: 1.75;
    padding: 2px 0;
}

/* ══════════════════════════════════════════════
   Error Message
   ══════════════════════════════════════════════ */

.error-message {
    color: var(--danger);
    font-size: 14px;
    font-weight: var(--weight-regular);
    min-height: 0;
}

/* ══════════════════════════════════════════════
   Auth Guard Loading
   ══════════════════════════════════════════════ */

.auth-guard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--text-soft);
}

/* ══════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════ */

@media (max-width: 1100px) {
    .navbar-links { gap: var(--s-4); }
}

@media (max-width: 960px) {
    /* Hero: constellation on top, text below */
    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-h) + var(--s-3));
    }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: var(--s-2);
    }
    .hero-visual {
        order: -1;
        justify-content: center;
    }
    .constellation {
        max-width: min(440px, 88vw);
    }

    /* Zigzag collapses to a single column */
    .split {
        grid-template-columns: 1fr;
        gap: var(--s-4);
    }
    .split-text {
        position: static;
    }
    .split--reverse .split-text {
        order: 0;
    }
    .split-aside {
        padding-top: 0;
    }
    .split-visual {
        width: min(70vw, 320px);
        margin: 0 auto var(--s-2);
    }

    .closing-inner {
        grid-template-columns: 1fr;
    }
    .closing-visual {
        order: -1;
    }
    .closing-visual .constellation {
        max-width: min(320px, 72vw);
    }

    .slider-slide {
        grid-template-columns: 1fr;
    }
    /* Stacked: the image is full width, so the controls are too. */
    .slider-nav {
        width: 100%;
    }

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

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

@media (max-width: 768px) {
    :root {
        --nav-h: 64px;
    }

    /* Mobile: hide the slider screenshots; title, text and controls stay. */
    .slider-slide-image {
        display: none;
    }

    .pricing-owned-banner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 12px;
    }
    .pricing-owned-banner .btn-secondary {
        width: 100%;
    }

    /* Navbar: hide desktop links, show hamburger */
    .navbar-links { display: none; }
    .navbar-hamburger { display: flex; }
    .navbar-mobile { display: flex; }

    .hero-cta .btn-primary {
        flex: 1 1 100%;
    }
    .hero-cta .btn-ghost {
        margin: 0 auto;
    }

    .performance-grid {
        gap: var(--s-6) var(--s-4);
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s-2);
    }

    .account-card {
        padding: var(--s-4);
    }

    /* License panel stacks: details first, QR centred below */
    .account-license {
        grid-template-columns: 1fr;
        gap: var(--s-6);
        padding: var(--s-5) var(--s-4);
    }
    .account-license-qr {
        justify-self: center;
    }
    .account-stats {
        gap: var(--s-4) var(--s-6);
    }

    /* Devices: glyph · name/meta/last-seen · action */
    .device-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "glyph info action"
            "glyph seen action";
        row-gap: 2px;
    }
    .device-glyph { grid-area: glyph; }
    .device-info { grid-area: info; }
    .device-last-seen { grid-area: seen; text-align: left; }
    .device-remove { grid-area: action; }
    .device-name { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 480px) {
    .performance-grid { grid-template-columns: 1fr; }

    .requirement-row {
        flex-direction: column;
        gap: 2px;
    }
    .requirement-detail {
        text-align: left;
    }

    .account-name-edit .btn-primary {
        flex: 1;
    }
}

/* ══════════════════════════════════════════════
   Auth confirmation views + animations
   ══════════════════════════════════════════════ */

.auth-confirm {
    text-align: center;
    padding: 16px 0;
    animation: auth-confirm-in 0.4s ease-out both;
}

@keyframes auth-confirm-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-confirm h1 {
    margin-bottom: 12px;
}

.auth-confirm-text {
    color: var(--text-soft);
    font-size: var(--text-base);
    line-height: 1.7;
    max-width: 420px;
    margin: 0 auto 28px;
}

.auth-confirm-email {
    color: var(--accent);
    font-weight: var(--weight-semibold);
}

.auth-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Animated "email sent" (envelope + sonar rings) ── */
.email-sent-anim {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 8px auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-sent-svg {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    overflow: visible;
    animation: env-float 3s ease-in-out infinite;
}

.email-sent-svg .env-body {
    fill: var(--bg-surface);
    stroke: var(--accent);
    stroke-width: 2.5;
}

.email-sent-svg .env-flap {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* draw-in the flap once */
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: env-flap-draw 0.7s ease-out 0.2s forwards;
}

@keyframes env-flap-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes env-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* Sonar rings pulsing outward — on-brand for Sonarium */
.sonar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    animation: sonar-pulse 2.8s ease-out infinite;
}

.sonar-ring:nth-child(2) { animation-delay: 0.9s; }
.sonar-ring:nth-child(3) { animation-delay: 1.8s; }

@keyframes sonar-pulse {
    0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
}

/* ── Animated success check (reset password) ── */
.auth-confirm-check {
    width: 96px;
    height: 96px;
    margin: 8px auto 24px;
}

.auth-check-svg {
    width: 100%;
    height: 100%;
}

.auth-check-circle {
    stroke: var(--success);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: check-circle-draw 0.6s ease-out forwards;
}

.auth-check-mark {
    stroke: var(--success);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: check-mark-draw 0.4s ease-out 0.5s forwards;
}

@keyframes check-circle-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes check-mark-draw {
    to { stroke-dashoffset: 0; }
}

/* ── Verify: spinner + animated error ── */
.verify-spinner {
    width: 64px;
    height: 64px;
    margin: 8px auto 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: verify-spin 0.9s linear infinite;
}

@keyframes verify-spin {
    to { transform: rotate(360deg); }
}

.auth-confirm-error-icon {
    width: 96px;
    height: 96px;
    margin: 8px auto 24px;
}

.auth-error-circle {
    stroke: var(--danger);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: check-circle-draw 0.6s ease-out forwards;
}

.auth-error-cross {
    stroke: var(--danger);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 46;
    stroke-dashoffset: 46;
    animation: check-mark-draw 0.4s ease-out 0.5s forwards;
}

/* ══════════════════════════════════════════════
   2FA / TOTP
   ══════════════════════════════════════════════ */

.totp-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-sm);
    line-height: 1.5;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.totp-status--on {
    color: var(--text);
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.totp-status--off {
    color: var(--text-soft);
    background: rgba(232, 232, 240, 0.03);
    border: 1px solid var(--hairline);
}

.totp-status--off .totp-status-dot {
    background: var(--text-muted);
    box-shadow: 0 0 0 3px rgba(106, 106, 128, 0.2);
}

.totp-status-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.totp-instructions {
    font-size: var(--text-sm);
    color: var(--text-soft);
    line-height: 1.6;
    margin-bottom: 14px;
}

.totp-qr {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.totp-qr img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-md);
    background: white;
    padding: 10px;
}

.totp-qr .license-qr {
    width: 200px;
    height: 200px;
}

.totp-qr .license-qr-svg {
    width: 100%;
    height: 100%;
    padding: 8px;
}

.totp-secret {
    display: block;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--accent);
    background: var(--bg);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 18px;
    word-break: break-all;
}

/* ── Billing history ── */
.pay-list {
    display: flex;
    flex-direction: column;
}

/* Ledger rows: date · amount · status · receipt, aligned in columns */
.pay-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto 120px;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) 0;
    border-top: 1px solid var(--hairline);
}

.pay-row:last-child {
    padding-bottom: 0;
}

.pay-receipt-cell {
    text-align: right;
}

.pay-date {
    font-size: 14px;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.pay-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pay-refund-note {
    font-size: 12px;
    color: var(--info);
}

.pay-amount {
    font-size: 14px;
    font-weight: var(--weight-regular);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.pay-receipt {
    font-size: 13px;
    font-weight: var(--weight-semibold);
    color: var(--accent);
    white-space: nowrap;
}

.pay-receipt:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.pay-badge {
    font-size: 11px;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    color: var(--text-soft);
    background: var(--bg-hover);
}

.pay-badge--ok {
    color: var(--success);
    background: rgba(34, 197, 94, 0.12);
}

.pay-badge--refund {
    color: var(--info);
    background: rgba(59, 130, 246, 0.12);
}

.pay-badge--warn {
    color: var(--warning);
    background: rgba(234, 179, 8, 0.12);
}

.pay-row > .pay-badge {
    justify-self: start;
}

@media (max-width: 768px) {
    /* Billing: date + receipt on top, amount + status below */
    .pay-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "date receipt"
            "amount status";
        row-gap: 4px;
    }
    .pay-date { grid-area: date; }
    .pay-main { grid-area: amount; }
    .pay-row > .pay-badge { grid-area: status; justify-self: end; }
    .pay-receipt-cell { grid-area: receipt; }
}

/* ══════════════════════════════════════════════
   Language Selector
   ══════════════════════════════════════════════ */

.language-selector {
    position: relative;
    display: inline-flex;
}

.language-selector-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    background: transparent;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-pill);
    padding: 0 14px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: var(--weight-medium);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.language-selector-btn:hover {
    color: var(--text);
    border-color: var(--text);
}

.language-selector-current {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-selector-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    max-height: 340px;
    overflow-y: auto;
    padding: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.language-selector-dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-selector-option {
    display: block;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: var(--weight-regular);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.language-selector-option:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.language-selector-option--active {
    color: var(--accent);
    font-weight: var(--weight-semibold);
}

/* RTL support */
[dir="rtl"] .language-selector-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .language-selector-option {
    text-align: right;
}

[dir="rtl"] .split--reverse .split-text {
    order: 0;
}

[dir="rtl"] .split--reverse .split-aside {
    order: -1;
}

/* Mobile adjustments */
.navbar-mobile .language-selector {
    padding: 16px 0 0;
}

.navbar-mobile .language-selector-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    max-height: none;
    padding: 6px 0 0;
}

.navbar-mobile .language-selector-dropdown:not(.language-selector-dropdown--open) {
    display: none;
}

/* Honeypot field — hidden from real users; bots that fill it are rejected.
   Kept in CSS (not an inline style) so the CSP can drop 'unsafe-inline'. */
.honeypot-field {
    display: none !important;
}

/* ══════════════════════════════════════════════
   Reduced motion
   ══════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .hero-text > *,
    .hero-visual,
    .slider-slide--active,
    .email-sent-svg,
    .sonar-ring,
    .env-flap,
    .auth-check-circle,
    .auth-check-mark,
    .auth-error-circle,
    .auth-error-cross,
    .verify-spinner,
    .auth-confirm {
        animation: none;
    }
    .env-flap,
    .auth-check-circle,
    .auth-check-mark,
    .auth-error-circle,
    .auth-error-cross {
        stroke-dashoffset: 0;
    }
    .verify-spinner {
        border-top-color: var(--accent);
    }
    .btn-ghost-arrow,
    .slider-slide-image img,
    .slider-dot::after {
        transition: none;
    }
}
