/* ==========================================================================
   Quello website
   Brand tokens come from the app (lib/design/tokens.dart). The page is built
   around one idea: a TV, a remote, and pressing OK to go private.
   ========================================================================== */

:root {
    --bg: #0A0E12;
    --surface: #13181E;
    --raised: #1C232B;
    --line: #2A333D;
    --text: #F3F1EC;
    --muted: #9AA5B1;
    --faint: #66717C;
    --accent: #CCFF4D;
    --on-accent: #10150A;
    --exposed: #FF7A5C;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;

    --container: 1240px;
    --gutter: clamp(20px, 4vw, 40px);
    --ease: cubic-bezier(.2, .8, .2, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);

    --step-0: clamp(16px, 0.35vw + 15px, 18px);
    --step-1: clamp(20px, 0.8vw + 16px, 26px);
    --step-2: clamp(28px, 2vw + 18px, 44px);
    --step-3: clamp(40px, 4.4vw + 20px, 88px);
    --display: clamp(52px, 10.4vw, 172px);

    color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: var(--step-0);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

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

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Wordmark ---------- */
.q-wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 22px; letter-spacing: -0.03em; color: var(--text); text-decoration: none; }
.q-mark {
    /* The app's "Q" mark (assets/images/quello_mark.png), drawn as a mask so it takes the theme colour. */
    width: 28px; height: 28px;
    display: inline-block; flex-shrink: 0;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='30 30 452 452'%3E%3Cmask id='m'%3E%3Crect width='512' height='512' fill='white'/%3E%3Ccircle cx='256' cy='256' r='144'/%3E%3Ccircle cx='399' cy='399' r='104'/%3E%3C/mask%3E%3Ccircle cx='256' cy='256' r='226' mask='url(%23m)'/%3E%3Ccircle cx='399' cy='399' r='59'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='30 30 452 452'%3E%3Cmask id='m'%3E%3Crect width='512' height='512' fill='white'/%3E%3Ccircle cx='256' cy='256' r='144'/%3E%3Ccircle cx='399' cy='399' r='104'/%3E%3C/mask%3E%3Ccircle cx='256' cy='256' r='226' mask='url(%23m)'/%3E%3Ccircle cx='399' cy='399' r='59'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 0 24px;
    border-radius: 999px;
    font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
    text-decoration: none; white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #DBFF7A; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-lg { min-height: 60px; padding: 0 30px; font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 26px; list-style: none; }
.site-nav ul a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .2s; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--text); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; border-radius: 50%; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 16px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 899.98px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: fixed; inset: 72px 0 auto 0;
        flex-direction: column; align-items: stretch; gap: 20px;
        padding: 24px var(--gutter) 32px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: transform .3s var(--ease), opacity .2s, visibility 0s .3s;
    }
    .site-nav.is-open { transform: none; opacity: 1; visibility: visible; transition: transform .3s var(--ease), opacity .2s; }
    .site-nav ul { flex-direction: column; gap: 0; }
    .site-nav ul a { display: block; padding: 14px 0; font-size: 22px; color: var(--text); border-bottom: 1px solid var(--line); }
    .site-nav .btn { width: 100%; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 120px); overflow: hidden; }
.hero-title {
    font-size: var(--display);
    line-height: .9;
    letter-spacing: -0.055em;
    font-weight: 600;
    margin-left: -0.04em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-sub { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; margin-top: clamp(24px, 3vw, 40px); }
.hero-sub p { font-size: var(--step-1); color: var(--muted); max-width: 34ch; line-height: 1.4; }
.hero-sub p strong { color: var(--text); font-weight: 500; }
@media (max-width: 767.98px) { .hero-sub { grid-template-columns: 1fr; gap: 24px; } }

/* Wide screens: headline and the TV side by side, sized to the window height,
   so the demo is in view without scrolling. */
@media (min-width: 1100px) {
    .hero { padding: clamp(24px, 4vh, 56px) 0 clamp(48px, 7vh, 96px); }
    .hero > .container { max-width: 1640px; }
    .hero-grid {
        display: grid;
        grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
        gap: clamp(40px, 4vw, 88px);
        align-items: center;
        min-height: calc(100svh - 72px - clamp(72px, 11vh, 152px));
    }
    .hero .hero-title { font-size: clamp(56px, min(6vw, 13.5vh), 132px); }
    .hero .hero-sub { grid-template-columns: 1fr; gap: 28px; margin-top: clamp(20px, 3.4vh, 40px); }
    .hero .hero-sub p { font-size: clamp(18px, 1.25vw, 22px); }
    /* TV as wide as the column allows while the whole stage fits the window height. */
    .hero .stage {
        margin-top: 0; grid-template-columns: 1fr;
        width: 100%; max-width: calc((100svh - 250px) * 16 / 9 + 64px);
        justify-self: center;
        padding: 0 64px 0 0;
    }
    .hero .stage .remote { position: absolute; right: 0; bottom: 36px; transform: scale(.8); transform-origin: bottom right; z-index: 2; }
    .hero .stage-hint { margin-top: 4px; }
}

/* Load sequence: headline rises line by line, then the stage. Once only. */
.motion .hero-title .line > span { transform: translateY(105%); animation: rise 1s var(--ease-out) forwards; }
.motion .hero-title .line:nth-child(2) > span { animation-delay: .08s; }
.motion .hero-title .line:nth-child(3) > span { animation-delay: .16s; }
.motion .hero-sub, .motion .stage { opacity: 0; animation: fade-up .9s var(--ease-out) .35s forwards; }
.motion .stage { animation-delay: .5s; }
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Stage: TV + remote ---------- */
.stage {
    position: relative;
    margin-top: clamp(40px, 6vw, 80px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
}
.stage-hint { grid-column: 1 / -1; color: var(--muted); font-size: 15px; margin-top: -8px; line-height: 1.8; }
.stage-hint kbd { font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }

.tv { margin: 0; position: relative; }
.tv-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    padding: clamp(6px, .8vw, 12px);
    background: #05070A;
    border: 1px solid var(--line);
    box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .9);
    /* The app screen inside sizes itself from the TV's width (cqw units). */
    container-type: inline-size;
}
.tv-stand { width: 22%; height: 10px; margin: 0 auto; background: var(--raised); border-radius: 0 0 10px 10px; }
.tv-glow {
    position: absolute; inset: 8% 10% -6%; z-index: -1;
    background: var(--accent);
    filter: blur(90px);
    opacity: 0;
    transition: opacity 1.2s var(--ease);
}
.is-private .tv-glow { opacity: .14; }

/* The app, as it looks on the TV */
.screen {
    position: relative; height: 100%;
    border-radius: 10px; overflow: hidden;
    background: var(--bg);
    display: grid; grid-template-columns: 1fr 1fr;
    padding: 5cqw 6cqw;
    gap: 4cqw;
}
.screen-bar { position: absolute; top: 3.4cqw; left: 6cqw; right: 6cqw; display: flex; justify-content: space-between; align-items: center; }
.screen-bar .q-wordmark { font-size: 2.6cqw; gap: 1cqw; }
.screen-bar .q-mark { width: 2.8cqw; height: 2.8cqw; }
.screen-tag { font-size: 1.5cqw; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .3cqw 1.2cqw; }
.screen-left { display: flex; flex-direction: column; justify-content: center; gap: 1.6cqw; padding-top: 4cqw; }
.screen-state { font-size: 5.6cqw; font-weight: 600; letter-spacing: -0.04em; line-height: 1; min-height: 1.1em; transition: color .4s; }
.is-private .screen-state { color: var(--accent); }
.screen-timer { font-size: 2.4cqw; color: var(--muted); font-variant-numeric: tabular-nums; }
.screen-ip { font-size: 1.7cqw; color: var(--faint); }
.screen-ip b { font-weight: 500; color: var(--exposed); transition: color .4s; }
.is-private .screen-ip b { color: var(--accent); }

.screen-locs { list-style: none; margin-top: 1.4cqw; display: grid; gap: .8cqw; }
.screen-locs li {
    display: flex; align-items: center; gap: 1.4cqw;
    font-size: 2cqw; font-weight: 500;
    padding: 1cqw 1.6cqw;
    border-radius: 1.2cqw;
    border: 1px solid transparent;
    color: var(--muted);
    transition: background-color .25s, border-color .25s, color .25s;
}
.screen-locs li::before { content: ''; width: 1cqw; height: 1cqw; border-radius: 50%; background: var(--line); flex-shrink: 0; transition: background-color .25s; }
.screen-locs li.is-selected { background: var(--raised); border-color: var(--line); color: var(--text); }
.screen-locs li.is-selected::before { background: var(--accent); }
.screen-locs li.is-focused { outline: .35cqw solid var(--accent); outline-offset: .2cqw; }

.screen-right { display: flex; align-items: center; justify-content: center; padding-top: 4cqw; }
.power {
    position: relative;
    width: 22cqw; aspect-ratio: 1;
    border-radius: 50%;
    background: var(--surface);
    border: .3cqw solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--text);
    transition: background-color .5s var(--ease), border-color .5s, color .5s, transform .2s;
}
.power svg { width: 34%; height: 34%; }
.power.is-focused { outline: .4cqw solid var(--accent); outline-offset: 1cqw; }
.is-private .power { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.power-arc { position: absolute; inset: -1.6cqw; width: auto; height: auto; opacity: 0; transition: opacity .2s; }
.power-arc circle { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 60 240; transform-origin: center; }
.is-connecting .power-arc { opacity: 1; }
.is-connecting .power-arc circle { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.power-ping { position: absolute; inset: 0; border-radius: 50%; border: .3cqw solid var(--accent); opacity: 0; pointer-events: none; }
.just-private .power-ping { animation: ping 1.1s var(--ease-out) 1; }
@keyframes ping { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }

/* ---------- Remote ---------- */
.remote {
    justify-self: center;
    width: 132px;
    padding: 22px 16px 28px;
    background: linear-gradient(#1A2028, #12171D);
    border: 1px solid var(--line);
    border-radius: 66px;
    display: flex; flex-direction: column; align-items: center; gap: 22px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.remote-led { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background-color .15s; }
.remote-led.blink { background: var(--accent); }
.dpad { position: relative; width: 100px; height: 100px; border-radius: 50%; background: #0D1115; border: 1px solid var(--line); }
.dpad button {
    position: absolute; border: 0; background: transparent; cursor: pointer; color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    transition: color .15s;
}
.dpad button:hover { color: var(--text); }
.dpad button:active, .dpad button.is-pressed { color: var(--accent); }
.dpad .up { top: 2px; left: 34px; width: 32px; height: 30px; }
.dpad .down { bottom: 2px; left: 34px; width: 32px; height: 30px; }
.dpad .left { left: 2px; top: 34px; width: 30px; height: 32px; }
.dpad .right { right: 2px; top: 34px; width: 30px; height: 32px; }
.dpad .ok {
    left: 28px; top: 28px; width: 44px; height: 44px; border-radius: 50%;
    background: var(--raised); color: var(--text); font-size: 13px; font-weight: 700; letter-spacing: .02em;
    border: 1px solid var(--line);
    transition: background-color .2s, color .2s, transform .1s;
}
.dpad .ok:hover { background: var(--accent); color: var(--on-accent); }
.dpad .ok.is-pressed, .dpad .ok:active { transform: scale(.92); }
.remote.nudge .ok { animation: nudge 1.6s var(--ease) 2; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(204, 255, 77, 0); } 40% { box-shadow: 0 0 0 8px rgba(204, 255, 77, .25); } }
.dpad svg { width: 14px; height: 14px; }
.remote-row { display: flex; gap: 14px; }
.remote-key { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #0D1115; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.remote-key svg { width: 14px; height: 14px; }
.remote-brand { font-size: 11px; color: var(--faint); letter-spacing: .02em; }

@media (max-width: 899.98px) {
    .stage { grid-template-columns: 1fr; }
    .remote { flex-direction: row; width: auto; border-radius: 40px; padding: 14px 22px; gap: 18px; justify-self: center; }
    .remote-row, .remote-brand { display: none; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(80px, 11vw, 160px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section-title { font-size: var(--step-3); letter-spacing: -0.045em; line-height: .95; max-width: 14ch; }
.section-lede { font-size: var(--step-1); color: var(--muted); max-width: 40ch; line-height: 1.4; margin-top: 20px; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .section-lede { margin-top: 0; justify-self: end; }
@media (max-width: 899.98px) { .section-head { grid-template-columns: 1fr; } .section-head .section-lede { justify-self: start; } }

/* ---------- What your provider sees ---------- */
.sees { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 899.98px) { .sees { grid-template-columns: 1fr; } }
.sees-copy .points { list-style: none; margin-top: 32px; display: grid; gap: 22px; }
.sees-copy .points li { padding-left: 22px; position: relative; color: var(--muted); }
.sees-copy .points li::before { content: ''; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sees-copy .points b { color: var(--text); font-weight: 500; display: block; }

.toggle { display: inline-flex; align-items: center; gap: 14px; margin-top: 36px; cursor: pointer; user-select: none; font-weight: 500; background: none; border: 0; padding: 0; }
.toggle-track { width: 60px; height: 34px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); position: relative; transition: background-color .3s, border-color .3s; }
.toggle-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--muted); transition: transform .35s var(--ease), background-color .3s; }
.toggle[aria-checked="true"] .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle[aria-checked="true"] .toggle-track::after { transform: translateX(26px); background: var(--on-accent); }

.log {
    background: #07090C;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.log-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.log-head b { color: var(--text); font-weight: 500; }
.log-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--exposed); transition: color .3s; }
.log-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.log.is-private .log-status { color: var(--accent); }
.log-rows { list-style: none; padding: 8px 0; font-variant-numeric: tabular-nums; }
.log-rows li {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center;
    padding: 12px 22px; font-size: 15px;
    border-bottom: 1px solid rgba(42, 51, 61, .5);
}
.log-rows li:last-child { border-bottom: 0; }
.log-time { color: var(--faint); }
.log-dest { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 14px; }
.log-what { color: var(--exposed); font-size: 14px; text-align: right; white-space: nowrap; }
.log.is-private .log-what { color: var(--accent); }
.log-foot { padding: 14px 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
@media (max-width: 575.98px) {
    .log-rows li { grid-template-columns: 48px minmax(0, 1fr); }
    .log-what { grid-column: 2; text-align: left; }
}
.motion .log-rows li { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.motion .log.is-in .log-rows li { opacity: 1; transform: none; }
.motion .log.is-in .log-rows li:nth-child(2) { transition-delay: .08s; }
.motion .log.is-in .log-rows li:nth-child(3) { transition-delay: .16s; }
.motion .log.is-in .log-rows li:nth-child(4) { transition-delay: .24s; }
.motion .log.is-in .log-rows li:nth-child(5) { transition-delay: .32s; }
.motion .log.is-in .log-rows li:nth-child(6) { transition-delay: .40s; }

/* ---------- Phone and TV ---------- */
.devices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 767.98px) { .devices { grid-template-columns: 1fr; } }
.device { background: var(--bg); padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 18px; }
.device h3 { font-size: var(--step-2); letter-spacing: -0.04em; }
.device p { color: var(--muted); max-width: 40ch; }
.device-art { height: 140px; display: flex; align-items: flex-end; margin-bottom: 8px; }
.device-art svg { height: 100%; width: auto; }
.device-art .stroke { fill: none; stroke: var(--line); stroke-width: 2; }
.device-art .fill-accent { fill: var(--accent); }
.device-art .fill-raised { fill: var(--raised); }
.runs-on { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; list-style: none; }
.runs-on li { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 15px; color: var(--muted); }
.runs-on li.no { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--faint); }

/* ---------- Steps (a real sequence) ---------- */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
@media (max-width: 899.98px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; border-top: 2px solid var(--line); padding-top: 24px; }
.steps li::before { content: counter(step); display: block; font-size: var(--step-3); font-weight: 600; line-height: 1; letter-spacing: -0.05em; color: var(--accent); margin-bottom: 24px; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: var(--step-1); letter-spacing: -0.02em; margin-bottom: 10px; }
.steps p { color: var(--muted); }

/* ---------- Locations ---------- */
.locations { list-style: none; columns: 3 220px; column-gap: 40px; }
.locations li {
    break-inside: avoid;
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    font-size: var(--step-2); font-weight: 600; letter-spacing: -0.035em; line-height: 1.15;
    padding: 14px 0; border-bottom: 1px solid var(--line);
}
.locations li span { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.locations li span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(204, 255, 77, .14); }

/* ---------- Plans ---------- */
.plans { list-style: none; border-top: 1px solid var(--line); }
.plan {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 24px; align-items: center;
    padding: clamp(24px, 3vw, 36px) 0;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.plan-name { font-size: var(--step-2); letter-spacing: -0.04em; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.plan-length { display: block; flex-basis: 100%; font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 6px; }
.plan-price { font-size: var(--step-3); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-price small { display: block; font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 10px; }
.plan-best { position: relative; }
.plan-best::before { content: ''; position: absolute; left: calc(var(--gutter) * -1); top: -1px; bottom: -1px; width: 4px; background: var(--accent); border-radius: 0 4px 4px 0; }
.badge { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 5px 12px; }
@media (max-width: 767.98px) {
    .plan { grid-template-columns: 1fr; gap: 14px; }
    .plan .btn { justify-self: start; }
    .plan-best::before { left: -14px; }
}
.plans-note { margin-top: 24px; color: var(--muted); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    list-style: none; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 24px;
    padding: 26px 0;
    font-size: var(--step-1); font-weight: 500; letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ''; width: 14px; height: 14px; flex-shrink: 0;
    background: linear-gradient(var(--text), var(--text)) center / 100% 2px no-repeat, linear-gradient(var(--text), var(--text)) center / 2px 100% no-repeat;
    transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--muted); max-width: 64ch; padding-bottom: 28px; margin-top: -6px; }
.faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 96px); }
@media (max-width: 899.98px) { .faq-layout { grid-template-columns: 1fr; } }

/* ---------- Closing ---------- */
.closing { text-align: left; overflow: hidden; }
.closing-title { font-size: var(--display); line-height: .88; letter-spacing: -0.06em; margin-left: -0.04em; }
.closing-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: clamp(32px, 4vw, 56px); }
.closing-row p { color: var(--muted); font-size: var(--step-1); max-width: 30ch; line-height: 1.4; }
.closing { isolation: isolate; }
.closing > .container { position: relative; z-index: 1; }
.q-mark.closing-mark { position: absolute; right: -8vw; top: 50%; width: min(52vw, 680px); height: auto; aspect-ratio: 1; transform: translateY(-50%); background: var(--raised); opacity: .7; pointer-events: none; z-index: 0; }
.motion .closing-mark { animation: drift 40s linear infinite; }
@keyframes drift { to { transform: translateY(-50%) rotate(360deg); } }

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-top { padding-top: clamp(48px, 7vw, 96px); }
.page-title { font-size: var(--step-3); letter-spacing: -0.05em; line-height: .95; }
.install-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: clamp(40px, 5vw, 64px); }
@media (max-width: 767.98px) { .install-grid { grid-template-columns: 1fr; } }
.install { background: var(--bg); padding: clamp(28px, 4vw, 48px); }
.install h2 { font-size: var(--step-2); letter-spacing: -0.04em; margin-bottom: 24px; }
.install ol { list-style: none; counter-reset: s; display: grid; gap: 18px; }
.install ol li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; color: var(--muted); }
.install ol li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); color: var(--text); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }

.prose { max-width: 70ch; }
.prose h1 { font-size: var(--step-3); letter-spacing: -0.05em; line-height: .95; margin-bottom: 40px; }
.prose h2 { font-size: var(--step-2); letter-spacing: -0.03em; margin: 48px 0 14px; }
.prose h3 { font-size: var(--step-1); margin: 32px 0 10px; letter-spacing: -0.02em; }
.prose p, .prose li { color: #C9CDD1; line-height: 1.7; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-weight: 500; }
.prose img { border-radius: var(--r-md); height: auto; }

/* ==========================================================================
   Account: sign in, create account, your account, checkout
   ========================================================================== */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: .01em; margin-bottom: 14px; }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

.auth-title { font-size: var(--step-3); letter-spacing: -0.05em; line-height: .95; }
.auth-lede { color: var(--muted); margin-top: 18px; font-size: 18px; line-height: 1.5; max-width: 42ch; }

/* ---------- Sign in / create account ---------- */
.auth { padding: clamp(32px, 5vw, 72px) 0 clamp(64px, 8vw, 112px); }
.auth-grid { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: stretch; }
.auth-panel { padding-top: clamp(8px, 3vw, 40px); }
.auth-panel .notices { margin: 28px 0 0; }

.auth-art {
    position: relative; overflow: hidden; isolation: isolate;
    min-height: 560px; border-radius: 32px;
    border: 1px solid var(--line);
    background:
        radial-gradient(60% 50% at 50% 42%, rgba(204, 255, 77, .16), transparent 70%),
        linear-gradient(160deg, var(--raised), var(--surface) 55%, var(--bg));
    display: grid; place-items: center;
}
.auth-art::after {
    /* fine grid, like a screen */
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: .35;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent);
            mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent);
}
.auth-orbit { position: relative; width: min(340px, 70%); aspect-ratio: 1; display: grid; place-items: center; }
.auth-orbit .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(204, 255, 77, .22); }
.auth-orbit .ring-2 { inset: 14%; border-color: rgba(204, 255, 77, .32); border-style: dashed; }
.auth-orbit .ring-3 { inset: 28%; border-color: rgba(204, 255, 77, .45); }
.auth-q { width: 34%; height: 34%; filter: drop-shadow(0 0 28px rgba(204, 255, 77, .55)); }
.auth-chips { list-style: none; position: absolute; inset: 0; pointer-events: none; }
.chip {
    position: absolute; display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 500;
    background: rgba(19, 24, 30, .82); border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.chip-a { top: 12%; left: 8%; }
.chip-b { top: 64%; right: 5%; }
.chip-c { bottom: 22%; left: 8%; }
.auth-art-note { position: absolute; left: 0; right: 0; bottom: 28px; text-align: center; color: var(--muted); font-size: 15px; padding: 0 24px; }

.motion .auth-orbit .ring-1 { animation: q-pulse 4.8s var(--ease) infinite; }
.motion .auth-orbit .ring-2 { animation: q-spin 40s linear infinite; }
.motion .auth-orbit .ring-3 { animation: q-pulse 4.8s var(--ease) 1.2s infinite; }
.motion .chip { animation: q-float 6s ease-in-out infinite; }
.motion .chip-b { animation-delay: -2s; }
.motion .chip-c { animation-delay: -4s; }
.motion .auth-panel > * { animation: q-rise .7s var(--ease-out) both; }
.motion .auth-panel > :nth-child(2) { animation-delay: .05s; }
.motion .auth-panel > :nth-child(3) { animation-delay: .1s; }
.motion .auth-panel > :nth-child(4) { animation-delay: .15s; }
.motion .auth-panel > :nth-child(n+5) { animation-delay: .2s; }
@keyframes q-spin { to { transform: rotate(360deg); } }
@keyframes q-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: .55; } }
@keyframes q-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes q-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 959.98px) {
    .auth-grid { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .auth-panel { max-width: 520px; padding-top: 0; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 20px; margin-top: 32px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; }
.field input {
    width: 100%; min-height: 54px; padding: 0 18px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--line); border-radius: 14px;
    font: inherit; font-size: 16px;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field input:hover { border-color: #3A4551; }
.field input::placeholder { color: var(--faint); }
.field input:focus { outline: none; border-color: var(--accent); background: var(--raised); box-shadow: 0 0 0 4px rgba(204, 255, 77, .14); }
.field input[aria-invalid="true"] { border-color: var(--exposed); box-shadow: 0 0 0 4px rgba(255, 122, 92, .12); }
.field input[readonly] { color: var(--muted); background: transparent; border-style: dashed; }
.field input[readonly]:focus { box-shadow: none; border-color: var(--line); }
.field-hint { font-size: 14px; color: var(--faint); }
.field-caps { color: #FFC24D; }
.field-error { font-size: 14px; color: var(--exposed); display: flex; gap: 6px; align-items: baseline; }
.field-error::before { content: '!'; display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--exposed); color: var(--bg); font-size: 11px; font-weight: 700; transform: translateY(2px); }
.field-otp input { font-variant-numeric: tabular-nums; letter-spacing: .4em; font-size: 24px; text-align: center; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 76px; }
.reveal {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px;
    background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer;
}
.reveal:hover { color: var(--text); background: var(--raised); }

.check { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); font-size: 15px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.form .btn { width: 100%; }
.form-fine { font-size: 14px; color: var(--faint); text-align: center; }
.form-switch { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }
.form-foot { margin-top: 28px; color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

.btn[aria-busy="true"] { cursor: progress; opacity: .85; }
.btn[aria-busy="true"]::before {
    content: ''; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: q-spin .7s linear infinite;
}
.btn-quiet { background: transparent; color: var(--muted); border-color: transparent; }
.btn-quiet:hover { color: var(--exposed); }

.notice { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-sm); padding: 14px 18px; background: var(--surface); font-size: 15px; line-height: 1.5; }
.notice.is-error { border-left-color: var(--exposed); }
.notice + .notice { margin-top: 12px; }
.notices { margin-bottom: 28px; }
.motion .notice { animation: q-rise .5s var(--ease-out) both; }

.resend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.resend-btn { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.resend-btn:disabled { color: var(--faint); text-decoration: none; cursor: default; font-variant-numeric: tabular-nums; }

/* ---------- Signed out / done ---------- */
.auth-center { min-height: calc(100vh - 260px); display: grid; align-items: center; }
.done-card { max-width: 560px; margin: 0 auto; text-align: center; display: grid; justify-items: center; }
.done-card .auth-lede { margin-left: auto; margin-right: auto; }
.done-mark {
    width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 32px;
    background: radial-gradient(circle, rgba(204, 255, 77, .18), transparent 70%);
    border: 1px solid rgba(204, 255, 77, .3);
}
.done-mark .q-mark { width: 44px; height: 44px; }
.motion .done-mark { animation: q-pop .8s var(--ease-out) both; }
@keyframes q-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.done-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }

/* ---------- Your account ---------- */
.acct { padding: clamp(32px, 5vw, 64px) 0 clamp(80px, 10vw, 140px); }
.acct-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; }
.acct-who .eyebrow { margin-bottom: 6px; }
.acct-title { font-size: clamp(36px, 3.6vw + 18px, 68px); letter-spacing: -0.05em; line-height: .98; }
.acct-email { color: var(--muted); margin-top: 8px; overflow-wrap: anywhere; }
.avatar {
    width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center;
    background: linear-gradient(140deg, var(--accent), #8FD41E);
    color: var(--on-accent); font-size: 34px; font-weight: 600;
    box-shadow: 0 14px 40px rgba(204, 255, 77, .22);
}
.acct-signout .icon { width: 18px; height: 18px; }
@media (max-width: 639.98px) {
    .acct-head { grid-template-columns: auto minmax(0, 1fr); }
    .avatar { width: 56px; height: 56px; border-radius: 18px; font-size: 26px; }
    .acct-signout { grid-column: 1 / -1; }
    .acct-signout .btn { width: 100%; }
}

.acct-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-top: clamp(28px, 4vw, 48px); }
@media (max-width: 899.98px) { .acct-grid { grid-template-columns: 1fr; } }
.acct-card {
    position: relative; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--surface); padding: clamp(22px, 3.2vw, 36px);
}
.card-title { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; }
.motion .acct-card { animation: q-rise .7s var(--ease-out) both; }
.motion .acct-grid .acct-card + .acct-card { animation-delay: .08s; }

.plan-hero { display: grid; gap: 4px; align-content: start; }
.plan-hero.is-active { border-color: rgba(204, 255, 77, .28); }
.plan-hero.is-active::before {
    content: ''; position: absolute; z-index: 0; width: 420px; height: 420px; right: -160px; top: -200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(204, 255, 77, .16), transparent 65%);
    pointer-events: none;
}
.plan-hero > * { position: relative; z-index: 1; }
.plan-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan-source { font-size: 14px; color: var(--faint); }
.plan-hero-name { font-size: var(--step-2); letter-spacing: -0.04em; margin-top: 18px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; border-radius: 999px; padding: 6px 14px; border: 1px solid var(--line); color: var(--muted); }
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.is-on { color: var(--accent); border-color: rgba(204, 255, 77, .35); background: rgba(204, 255, 77, .06); }
.status-pill.is-on::before { box-shadow: 0 0 0 0 rgba(204, 255, 77, .6); }
.motion .status-pill.is-on::before { animation: q-ping 2.4s ease-out infinite; }
@keyframes q-ping { 0% { box-shadow: 0 0 0 0 rgba(204, 255, 77, .55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(204, 255, 77, 0); } }
.status-pill.is-warn { color: var(--exposed); border-color: rgba(255, 122, 92, .35); background: rgba(255, 122, 92, .06); }
.status-note { color: var(--muted); margin-top: 10px; max-width: 60ch; }

.meter { margin-top: 24px; }
.meter-bar { height: 10px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.meter-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8FD41E, var(--accent)); box-shadow: 0 0 16px rgba(204, 255, 77, .45); transform-origin: left; }
.motion .meter-bar span { animation: q-grow 1.2s var(--ease-out) .2s both; }
@keyframes q-grow { from { transform: scaleX(0); } }
.meter-legend { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 15px; color: var(--muted); }
.meter-legend b { color: var(--text); font-weight: 600; }
.plan-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.devices-card { display: grid; align-content: start; gap: 6px; }
.devices-count { margin-top: 14px; color: var(--muted); font-size: 20px; }
.devices-count b { font-size: 64px; line-height: 1; letter-spacing: -0.04em; color: var(--text); font-weight: 600; }
.device-dots { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.device-dots li { width: 34px; height: 12px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.device-dots li.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px rgba(204, 255, 77, .5); }

.inline-form { display: inline-flex; margin: 0; }
.account-section { margin-top: clamp(56px, 7vw, 96px); scroll-margin-top: 96px; }
.account-section > h2 { font-size: var(--step-2); letter-spacing: -0.04em; margin-bottom: 24px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 899.98px) { .settings-grid { grid-template-columns: 1fr; } }
.form-card { display: grid; gap: 18px; margin: 0; }
.form-card .btn { justify-self: start; }

.app-hint { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: clamp(22px, 3vw, 32px); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.app-hint > .q-mark { width: 44px; height: 44px; }
.app-hint h2 { font-size: var(--step-1); letter-spacing: -0.02em; margin: 0; }
@media (max-width: 639.98px) { .app-hint { grid-template-columns: 1fr; } }

/* ---------- Checkout ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: 28px; }
.back-link:hover { color: var(--text); }
.back-link .icon { width: 18px; height: 18px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 899.98px) { .checkout-grid { grid-template-columns: 1fr; } .checkout-grid > .order-card { order: -1; position: static; } }
.pay-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
@media (max-width: 639.98px) { .pay-options { grid-template-columns: 1fr; } }
.pay-option {
    border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 30px);
    background: var(--surface); display: flex; flex-direction: column; gap: 12px; margin: 0;
    transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.pay-option:hover { border-color: rgba(204, 255, 77, .45); transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.pay-option h2 { font-size: var(--step-1); letter-spacing: -0.02em; }
.pay-option p { color: var(--muted); font-size: 15px; }
.pay-option .btn { margin-top: auto; width: 100%; }
.pay-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--raised); color: var(--accent); }
.pay-icon svg { width: 26px; height: 26px; }
.order-card { position: sticky; top: 96px; }
.order-name { font-size: var(--step-1); letter-spacing: -0.02em; }
.order-price { font-size: var(--step-2); font-weight: 600; letter-spacing: -0.04em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.order-price small { font-size: 18px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.order-list { list-style: none; display: grid; gap: 10px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.order-list li { display: flex; gap: 10px; }
.order-list li::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7z'/%3E%3C/svg%3E") center / contain no-repeat; }
.order-who { margin-top: 22px; font-size: 14px; color: var(--faint); overflow-wrap: anywhere; }
.order-who b { color: var(--muted); font-weight: 500; }

/* ---------- Opened from the app ---------- */
.app-header .header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.in-app .acct, .in-app .auth { padding-top: 24px; }

/* ==========================================================================
   Plans: comparison table (wide), cards (narrow), badges
   ========================================================================== */
.pbadge {
    display: inline-flex; align-items: center; white-space: nowrap;
    font-size: 13px; font-weight: 600; line-height: 1;
    padding: 6px 10px; border-radius: 999px;
    color: var(--accent); border: 1px solid rgba(204, 255, 77, .4);
}
.pbadge.is-best { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pbadge.is-current { color: var(--text); border-color: var(--muted); }
.ptable-badges { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }

.ptable-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: left; }
.ptable-corner { width: 32%; vertical-align: bottom; padding: 0 32px 28px 0; }
.ptable-corner p { color: var(--muted); font-size: 16px; max-width: 30ch; }
.ptable-plan {
    vertical-align: top; font-weight: 400; padding: 24px 22px 28px;
    border-top: 1px solid transparent; border-left: 1px solid transparent; border-right: 1px solid transparent;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.ptable-plan > * { display: block; }
.ptable-plan .ptable-badges { display: flex; margin-bottom: 18px; }
.ptable-name { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; }
.ptable-price { font-size: clamp(36px, 2.4vw + 18px, 52px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; margin-top: 14px; font-variant-numeric: tabular-nums; }
.ptable-every { color: var(--muted); font-size: 15px; margin-top: 8px; }
.ptable-month { color: var(--faint); font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ptable-plan .btn { display: flex; width: 100%; margin-top: 22px; }
.btn.is-static { cursor: default; opacity: .6; }

.ptable tbody th, .ptable tbody td { padding: 18px 22px; border-top: 1px solid var(--line); vertical-align: middle; }
.ptable tbody th { padding-left: 0; font-weight: 500; font-size: 16px; }
.ptable tbody th small { display: block; color: var(--faint); font-size: 14px; font-weight: 400; margin-top: 2px; }
.ptable-check { width: 22px; height: 22px; color: var(--accent); }
.ptable-devices { font-size: 34px; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ptable tr.is-key th, .ptable tr.is-key td { padding-top: 22px; padding-bottom: 22px; }

/* The best-value column is framed from top to bottom. */
.ptable-plan.is-best { background: var(--surface); border-color: rgba(204, 255, 77, .5); }
.ptable td.is-best { background: var(--surface); border-left: 1px solid rgba(204, 255, 77, .5); border-right: 1px solid rgba(204, 255, 77, .5); }
.ptable tbody tr:last-child td.is-best { border-bottom: 1px solid rgba(204, 255, 77, .5); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.ptable-plan.is-current:not(.is-best) { border-color: var(--line); }

.pcards { display: none; }
@media (max-width: 759.98px) {
    .ptable-wrap { display: none; }
    .pcards { display: block; }
}
.pcards-list { list-style: none; display: grid; gap: 12px; }
.pcard { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; background: var(--surface); display: grid; gap: 14px; }
.pcard.is-best { border-color: rgba(204, 255, 77, .5); }
.pcard-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pcard-top .ptable-badges { min-height: 0; }
.pcard-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pcard-price .ptable-price { margin-top: 0; font-size: 40px; }
.pcard-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.pcard-facts div { background: var(--bg); padding: 12px 14px; }
.pcard-facts dt { font-size: 13px; color: var(--faint); }
.pcard-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 18px; }
.pcard .btn { width: 100%; }
.pcards-features { margin-top: 28px; }
.pcards-features h3 { font-size: 18px; letter-spacing: -0.01em; margin-bottom: 14px; }
.pcards-features ul { list-style: none; display: grid; gap: 14px; }
.pcards-features li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: var(--faint); font-size: 14px; }
.pcards-features li b { display: block; color: var(--text); font-weight: 500; font-size: 16px; }

/* ---------- Account: plan section and plan change ---------- */
.section-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.section-row h2 { margin: 0; font-size: var(--step-2); letter-spacing: -0.04em; }
.section-row .status-note { margin: 0; }
.swap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; margin: clamp(28px, 4vw, 44px) 0 16px; }
.swap-plan { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; display: grid; gap: 4px; color: var(--muted); font-size: 15px; }
.swap-plan b { color: var(--text); font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 6px; }
.swap-plan.is-new { border-color: rgba(204, 255, 77, .5); background: var(--surface); }
.swap-label { font-size: 14px; color: var(--faint); }
.swap-plan.is-new .swap-label { color: var(--accent); }
.swap-arrow { width: 28px; height: 28px; color: var(--accent); }
@media (max-width: 639.98px) { .swap { grid-template-columns: 1fr; } .swap-arrow { transform: rotate(90deg); justify-self: center; } }
.swap-terms .order-list { border-top: 0; padding-top: 0; margin-top: 16px; }
.swap-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 0; }

/* ---------- Home: the switch sits on top of the box it changes ---------- */
.log-wrap { display: grid; gap: 12px; }
.log-control {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px;
    padding: 14px 16px 14px 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
    transition: border-color .3s;
}
.log-wrap.is-private .log-control { border-color: rgba(204, 255, 77, .5); }
.log-brand { font-size: 18px; }
.log-brand .q-mark { width: 22px; height: 22px; }
.log-hint { color: var(--muted); font-size: 15px; }
.log-control .toggle { margin-top: 0; gap: 12px; }
.toggle-state { font-weight: 600; min-width: 2.2em; text-align: right; color: var(--muted); }
.toggle[aria-checked="true"] .toggle-state { color: var(--accent); }
@media (max-width: 639.98px) {
    .log-control { grid-template-columns: minmax(0, 1fr) auto; }
    .log-hint { grid-column: 1 / -1; grid-row: 2; }
}

/* ==========================================================================
   Documents: legal, company and help pages (Admin → Pages)
   ========================================================================== */
.doc-head { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.doc-crumb { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 18px; }
.doc-title { font-size: var(--step-3); letter-spacing: -0.05em; line-height: .95; max-width: 16ch; }
.doc-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 48px; flex-wrap: wrap; margin-top: 28px; }
.doc-summary { color: var(--muted); font-size: var(--step-1); line-height: 1.4; max-width: 46ch; }
.doc-updated { color: var(--faint); font-size: 15px; white-space: nowrap; }

.doc-body { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(72px, 9vw, 120px); align-items: start; }
.doc-body.no-toc { grid-template-columns: minmax(0, 1fr); }
.doc-body.no-toc .doc-prose { margin-left: max(0px, calc((100% - 70ch) / 2 - 120px)); }

/* Contents */
.doc-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; }
.doc-toc summary { list-style: none; cursor: default; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.doc-toc summary::-webkit-details-marker { display: none; }
.doc-toc-count { color: var(--faint); font-weight: 400; }
.doc-toc ol { list-style: none; padding: 10px 0 0; margin: 0; counter-reset: toc; }
.doc-toc li { counter-increment: toc; }
.doc-toc a {
    display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 4px;
    padding: 8px 10px 8px 0; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.35;
    border-left: 2px solid transparent; padding-left: 12px; margin-left: -14px;
    transition: color .2s, border-color .2s;
}
.doc-toc a::before { content: counter(toc, decimal-leading-zero); color: var(--faint); font-variant-numeric: tabular-nums; }
.doc-toc a:hover { color: var(--text); }
.doc-toc a[aria-current] { color: var(--text); border-left-color: var(--accent); }
.doc-toc a[aria-current]::before { color: var(--accent); }
.doc:not(.is-numbered) .doc-toc a { grid-template-columns: minmax(0, 1fr); }
.doc:not(.is-numbered) .doc-toc a::before { content: none; }

@media (max-width: 959.98px) {
    .doc-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .doc-body.no-toc .doc-prose { margin-left: 0; }
    .doc-toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; background: var(--surface); }
    .doc-toc summary { cursor: pointer; border-bottom: 0; padding-bottom: 0; }
    .doc-toc summary::after { content: '+'; color: var(--accent); font-weight: 600; }
    .doc-toc details[open] summary::after { content: '–'; }
    .doc-toc details[open] summary { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
    .doc-toc a { margin-left: 0; padding-left: 0; border-left: 0; }
}

/* Body text */
.doc-prose { max-width: 70ch; counter-reset: sec; }
.doc-prose > p:first-child { font-size: var(--step-1); line-height: 1.5; color: var(--text); margin-bottom: 8px; }
.doc-prose h2 { scroll-margin-top: 96px; margin: 56px 0 16px; padding-top: 28px; border-top: 1px solid var(--line); font-size: var(--step-2); letter-spacing: -0.035em; line-height: 1.05; }
.doc.is-numbered .doc-prose h2 { counter-increment: sec; display: grid; grid-template-columns: 1.5em minmax(0, 1fr); align-items: baseline; }
.doc.is-numbered .doc-prose h2::before { content: counter(sec, decimal-leading-zero); color: var(--accent); font-size: .55em; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.doc.is-numbered .doc-prose h2 ~ * { padding-left: 0; }
.doc-prose h3 { font-size: 19px; letter-spacing: -0.01em; margin: 28px 0 8px; color: var(--text); }
.doc-prose ul { padding-left: 0; list-style: none; }
.doc-prose ul li { position: relative; padding-left: 22px; }
.doc-prose ul li::before { content: ''; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.doc-prose b, .doc-prose strong { color: var(--text); font-weight: 600; }
.doc-prose table { display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); border-collapse: separate; border-spacing: 0; }
.doc-prose thead th { background: var(--surface); color: var(--text); font-weight: 600; }
.doc-prose th, .doc-prose td { vertical-align: top; padding: 14px 16px; min-width: 160px; line-height: 1.55; }
.doc-prose tbody tr:last-child td { border-bottom: 0; }
.doc-prose td { color: #C9CDD1; }
mark.placeholder { background: rgba(255, 194, 77, .14); color: #FFC24D; border-radius: 4px; padding: 0 4px; }

/* Related pages */
.doc-related { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 80px) 0; }
.doc-related h2 { font-size: var(--step-1); letter-spacing: -0.02em; margin-bottom: 20px; }
.doc-related ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.doc-related a { display: grid; gap: 6px; height: 100%; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; transition: border-color .2s; }
.doc-related a:hover { border-color: rgba(204, 255, 77, .5); }
.doc-related b { font-weight: 600; }
.doc-related span { color: var(--muted); font-size: 15px; line-height: 1.45; }

.faq-more { margin-top: 24px; color: var(--muted); }

/* Opened from the app's Help / Legal screens */
.app-view .doc-head { padding-top: 28px; }
.app-view .doc-title { font-size: clamp(34px, 8vw, 56px); }
.app-view .doc-body { padding-bottom: 48px; }

/* Footer page groups */
.footer-nav { flex-wrap: wrap; }

@media print {
    .site-header, .site-footer, .doc-toc, .doc-related, .skip-link { display: none !important; }
    body { background: #fff; color: #000; }
    .doc-body { display: block; padding: 0; }
    .doc-prose, .doc-prose p, .doc-prose li, .doc-prose td, .doc-summary, .doc-title { color: #000 !important; max-width: none; }
    .doc-prose a { color: #000; }
}


/* ---------- Codes (Redeem a code, checkout discount) ---------- */
.redeem { margin-top: clamp(40px, 5vw, 64px); }
.redeem-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px 32px; align-items: center; margin: 0; }
.redeem-card h2 { font-size: var(--step-1); letter-spacing: -0.02em; margin: 0; }
.redeem-card .status-note { margin-top: 6px; }
.redeem-card .field-error { grid-column: 2; }
@media (max-width: 759.98px) { .redeem-card { grid-template-columns: 1fr; } .redeem-card .field-error { grid-column: 1; } }
.redeem-field { display: flex; gap: 8px; }
.redeem-field input {
    flex: 1; min-width: 0; min-height: 50px; padding: 0 16px;
    background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 14px;
    font: inherit; font-size: 16px; letter-spacing: .08em; text-transform: uppercase;
}
.redeem-field input::placeholder { letter-spacing: 0; text-transform: none; color: var(--faint); }
.redeem-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(204, 255, 77, .14); }
.redeem-field input[aria-invalid="true"] { border-color: var(--exposed); }
.coupon-notice { margin-bottom: 20px; border-left-color: var(--accent); }
.order-then { color: var(--muted); font-size: 14px; margin-top: 6px; }
.order-then s { color: var(--faint); }
.order-code { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.order-code label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.order-code .redeem-field input { min-height: 44px; font-size: 15px; }
.code-applied { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; font-size: 15px; color: var(--accent); }
.btn-link { background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-link:hover { color: var(--text); }


/* ---------- Signed-in devices ---------- */
.device-list { list-style: none; display: grid; gap: 10px; }
.device-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; }
.device-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--raised); color: var(--accent); display: grid; place-items: center; }
.device-icon svg { width: 24px; height: 24px; }
.device-info { display: grid; gap: 2px; min-width: 0; }
.device-info b { font-weight: 600; overflow-wrap: anywhere; }
.device-info .status-note { margin: 0; font-size: 14px; }
.device-live { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.device-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 32px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
.footer-brand p { color: var(--muted); margin-top: 16px; max-width: 34ch; }
.footer-nav { display: flex; gap: clamp(32px, 6vw, 96px); }
.footer-nav h2 { font-size: 14px; color: var(--faint); font-weight: 500; letter-spacing: 0; margin-bottom: 14px; }
.footer-nav ul { list-style: none; display: grid; gap: 10px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
@media (max-width: 767.98px) { .footer-inner { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
