/* =========================================================
   landing.css — the public landing page (/home) only.

   Loaded by home.html AFTER styles.css and starfield.css, and by
   nothing else. Everything here is namespaced `lp-` ("landing page")
   so the marketing page can be restyled freely without any chance of
   leaking into the authenticated dashboard, which shares the other
   two sheets.

   Two things it deliberately re-declares rather than inherit:
     - form input styling, because styles.css line ~2980 forces
       `color:#fff !important` on every input for the dashboard's glass
       look, which is invisible in the light theme;
     - the nav is `position: fixed`, not `sticky`, because styles.css
       sets `overflow-x:hidden` on html+body and that makes `sticky`
       unreliable across browsers.

   Layout contract: breakpoints at 1080, 980, 900, 700, 680, 560, 430
   and 345px, each collapsing ONE thing, plus `(hover: none)` for touch
   sizing, a landscape-height query, and a `prefers-reduced-motion`
   block at the end that disables every animation on the page.

   Requires tokens.css (loaded before styles.css). Colours, radii,
   motion, safe-area insets and the 44px tap token all come from there.
   ========================================================= */

/* ───────────────────────────────────────────────────────────────────────────
   0. Page shell + local tokens
   ─────────────────────────────────────────────────────────────────────────── */
:root {
    /* Fluid rather than two fixed values.
     *
     * WAS: 66px, with `@media (max-width: 700px) { :root { --lp-nav-h: 60px } }`.
     * That is the per-breakpoint-override pattern this pass is removing: the nav
     * height feeds `.lp` padding-top, `.lp-drawer` top, `.lp-progress` top and
     * `.lp [id]` scroll-margin, so every one of those four had a hard step at
     * 700px. A clamp makes all four track together continuously. */
    --lp-nav-h: clamp(58px, 8vw, 66px);
    --lp-shell: 1240px;
    --lp-gap: clamp(1.1rem, 4vw, 3rem);
    --lp-radius: var(--r-lg);

    /* The horizontal gutter, named because the drawer and the shell must agree
     * on it or the drawer's links do not line up with the content above them. */
    --lp-gutter: clamp(1.05rem, 4vw, 2.75rem);

    /* One soft card wash reused across every surface on the page, so feature
       cards, stat cards and module cards read as one family. */
    --lp-card: linear-gradient(180deg, rgb(var(--ice-rgb) / .05), rgb(var(--ice-rgb) / .018));
    --lp-card-hover: linear-gradient(180deg, var(--accent-wash), rgb(var(--accent-rgb) / .025));
}

html[data-theme="light"] {
    --lp-card: linear-gradient(180deg, rgb(10 25 60 / .035), rgb(10 25 60 / .012));
    --lp-card-hover: linear-gradient(180deg, var(--accent-wash), rgb(var(--accent-deep-rgb) / .02));
}

html {
    scroll-behavior: smooth;
}

/* Anchor targets must clear the fixed nav or the heading lands underneath it. */
.lp [id] {
    scroll-margin-top: calc(var(--lp-nav-h) + 18px);
}

.lp {
    position: relative;
    z-index: 2;
    padding-top: var(--lp-nav-h);
}

/* ── Overflow containment ────────────────────────────────────────────────────
 * styles.css sets `overflow-x: hidden` on html+body, which means an overflowing
 * child does not produce a scrollbar — it is silently CLIPPED. That is worse
 * than a scrollbar, because it hides the bug while still cutting content off,
 * and it is why the nav's call-to-action could be half-missing at 320px with
 * nothing to indicate anything was wrong.
 *
 * `min-width: 0` on every flex/grid child that contains text is the fix that
 * actually prevents the overflow, rather than hiding it: without it a flex item
 * defaults to `min-width: auto`, i.e. it refuses to shrink below its content's
 * min-content width, and one long word sets the width of the whole page. */
.lp *,
.lp-nav * {
    min-width: 0;
}

/* Unbreakable strings. There is a `<code>identify</code>` in the FAQ, a version
 * string in the footer, and the guild names in the marquee come from the API —
 * any of which can be a single token wider than a 320px screen. */
.lp h1,
.lp h2,
.lp h3,
.lp p,
.lp li,
.lp-drawer a,
.lp-foot-col a {
    overflow-wrap: break-word;
}

.lp code,
.lp .mono,
.lp-foot-bottom .ver {
    overflow-wrap: anywhere;
}

.lp-shell {
    width: 100%;
    max-width: var(--lp-shell);
    margin: 0 auto;
    /* Safe-area insets added to the gutter rather than replacing it.
     *
     * home.html sets `viewport-fit=cover`, which is what makes env() report
     * real values — and also what puts content under the notch in landscape
     * unless something opts back out. `.lp-nav`'s inner element is a .lp-shell,
     * so this one declaration covers the fixed header as well as the page. */
    padding-inline:
        calc(var(--lp-gutter) + var(--safe-l)) calc(var(--lp-gutter) + var(--safe-r));
}

/* Section rhythm. One class, one vertical scale, so sections cannot drift
   apart the way they do when each block picks its own padding. */
.lp-section {
    padding-block: clamp(3.25rem, 8vh, 6rem);
}

.lp-section.tight {
    padding-block: clamp(2rem, 5vh, 3.25rem);
}

.lp-sec-head {
    max-width: 46rem;
    margin: 0 auto clamp(2rem, 5vw, 3.25rem);
    text-align: center;
}

.lp-eyebrow {
    display: inline-block;
    margin-bottom: .85rem;
    padding: .34rem .8rem;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    background: var(--accent-wash);
    color: var(--accent-2);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ── The display face on the landing page ────────────────────────────────────
 *
 * Same contract as styles.css: brand surfaces only, resolved through the single
 * --font-display token in tokens.css so the landing page and the dashboard can
 * never end up on different faces. The hero headline, section headings, the
 * wordmark and the two sets of big live numbers.
 *
 * .lp-lead and .lp-sub are excluded on purpose — they are multi-line body copy,
 * which is what --font-sans is chosen for. */
.lp-h1,
.lp-h2,
.lp-brand-name,
.lp-stat-v,
.lp-band-v {
    font-family: var(--font-display);
}

.lp-h2 {
    margin: 0 0 .7rem;
    font-size: clamp(1.65rem, 4.2vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.lp-sub {
    margin: 0;
    color: var(--text-soft);
    font-size: clamp(.94rem, 1.3vw, 1.05rem);
    line-height: 1.65;
}

/* ───────────────────────────────────────────────────────────────────────────
   1. Buttons
   ─────────────────────────────────────────────────────────────────────────── */
.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .78rem 1.35rem;
    /* WCAG 2.5.5 / platform minimum. Was 36px tall (.78rem x 2 + 1.2 x .92rem),
       so every button on the page was an 8px-short touch target. */
    min-height: var(--tap);
    border: 1px solid transparent;
    border-radius: 11px;
    background: var(--bg-hover);
    color: var(--text);
    font-family: inherit;
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.2;
    /* `nowrap` is kept as the DEFAULT because a wrapped pill in a horizontal row
       looks broken — but it is lifted in the phone block, where the CTAs are
       full-width blocks and a nowrap label just overflows its own button. */
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
    transition: transform var(--trans), background var(--trans), border-color var(--trans), box-shadow var(--trans);
}

.lp-btn svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.lp-btn:hover {
    transform: translateY(-2px);
}

/* --accent-fill, not --accent-grad: the brand gradient's light end is #1E90FF
 * and white text on it is 3.24:1. See the contrast table in tokens.css. */
.lp-btn.primary {
    background: var(--accent-fill);
    color: var(--on-accent);
    box-shadow: var(--glow-md), inset 0 1px 0 rgb(255 255 255 / .18);
}

.lp-btn.primary:hover {
    background: var(--accent-fill-hover);
    box-shadow: var(--glow-lg), inset 0 1px 0 rgb(255 255 255 / .22);
}

.lp-btn.discord {
    background: #5865F2;
    color: #fff;
    box-shadow: 0 10px 26px -8px rgba(88, 101, 242, .7);
}

.lp-btn.discord:hover {
    filter: brightness(1.09);
}

.lp-btn.ghost {
    background: transparent;
    border-color: var(--border-2);
    color: var(--text);
}

.lp-btn.ghost:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

/* The hero's headline action. Sized well past the other buttons on purpose —
   "open dashboard" is the single thing this page exists to get clicked. */
.lp-btn.xl {
    padding: 1.05rem 2.1rem;
    border-radius: 13px;
    font-size: 1.04rem;
    font-weight: 700;
}

.lp-btn.xl svg {
    width: 20px;
    height: 20px;
}

/* Arrow slides on hover — a small affordance that the button navigates. */
.lp-btn .lp-arrow {
    transition: transform var(--trans);
}

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

/* .btn-vote-glow comes from styles.css, where it is sized for the dashboard's
   topbar (.6rem/1.2rem pad, 12px radius). Dropped into a hero CTA row next to
   .lp-btn it rendered visibly shorter than its neighbours. Re-sized here only
   inside a CTA row, so the dashboard's copy is untouched. */
.lp-cta-row .btn-vote-glow {
    padding: .78rem 1.35rem;
    border-radius: 11px;
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.2;
    justify-content: center;
}

.lp-cta-row .btn-vote-glow svg {
    width: 18px;
    height: 18px;
}

/* A soft breathing halo behind the primary CTA. Pure decoration, and the
   reduced-motion block at the bottom removes it. */
.lp-cta-wrap {
    position: relative;
    display: inline-flex;
}

.lp-cta-wrap::after {
    content: "";
    position: absolute;
    inset: -6px;
    z-index: -1;
    border-radius: 18px;
    background: var(--accent);
    filter: blur(18px);
    opacity: .38;
    animation: lpHalo 3.4s ease-in-out infinite;
}

@keyframes lpHalo {

    0%,
    100% {
        opacity: .3;
        transform: scale(.97);
    }

    50% {
        opacity: .52;
        transform: scale(1.03);
    }
}

/* ───────────────────────────────────────────────────────────────────────────
   2. Fixed nav + mobile drawer
   ─────────────────────────────────────────────────────────────────────────── */
.lp-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: var(--z-topbar);
    height: var(--lp-nav-h);
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background var(--trans), border-color var(--trans), backdrop-filter var(--trans);
}

/* Frosted only once the page has moved, so the hero starts edge-to-edge. */
.lp-nav.scrolled {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom-color: var(--border);
}

/* color-mix fallback for older engines. */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .lp-nav.scrolled {
        background: rgba(10, 11, 15, .88);
    }

    html[data-theme="light"] .lp-nav.scrolled {
        background: rgba(247, 248, 250, .9);
    }
}

.lp-nav-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.lp-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    flex: 0 0 auto;
    margin-right: auto;
}

.lp-brand-logo {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: var(--accent-grad);
    box-shadow: var(--glow-sm);
    overflow: hidden;
}

.lp-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fluid, replacing the `@media (max-width: 560px) { font-size: 1.1rem }`
   override. The floor is 1.08rem rather than smaller because this element
   carries `.grad-text`; see tokens.css for why gradient text has a size floor. */
.lp-brand-name {
    font-size: clamp(1.08rem, 3.4vw, 1.22rem);
    font-weight: 800;
    letter-spacing: -.03em;
}

.lp-nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

/* An inline link's hit box is its line box — about 17px tall here, which is a
   third of the minimum target. Given the full nav-bar height instead, with the
   underline pushed back down to where it visually was. */
.lp-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: var(--tap);
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-soft);
    transition: color var(--trans);
}

.lp-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    /* The link box is now var(--tap) tall with the text centred in it, so a
       flat `bottom: -6px` would put the underline 6px below a 44px box instead
       of 6px below the text. This resolves to (44 - lineBox)/2 - 6, i.e. the
       same 6px gap under the glyphs at any font size. */
    bottom: calc((var(--tap) - 1.2em) / 2 - 6px);
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--trans);
}

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

.lp-nav-link:hover::after,
.lp-nav-link.active::after {
    transform: scaleX(1);
}

.lp-nav-link.active {
    color: var(--text);
}

.lp-nav-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex: 0 0 auto;
}

.lp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Was 38x38. Applies to the theme toggle, the hamburger and all three
       footer social links — every icon-only control on the page was under the
       44px minimum. */
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-hover);
    color: var(--text-soft);
    cursor: pointer;
    transition: color var(--trans), border-color var(--trans), background var(--trans);
}

.lp-icon-btn:hover {
    color: var(--text);
    border-color: var(--border-2);
}

.lp-icon-btn svg {
    width: 18px;
    height: 18px;
}

/* Only one of the two theme glyphs is shown, picked by data-theme. */
.lp-theme-btn .lp-ico-moon {
    display: none;
}

html[data-theme="light"] .lp-theme-btn .lp-ico-moon {
    display: block;
}

html[data-theme="light"] .lp-theme-btn .lp-ico-sun {
    display: none;
}

.lp-nav-cta {
    padding: .58rem 1.15rem;
    font-size: .88rem;
}

/* Hamburger — hidden until the links collapse at 900px. */
.lp-burger {
    display: none;
}

.lp-burger span {
    display: block;
    width: 17px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--trans), opacity var(--trans);
}

.lp-burger span+span {
    margin-top: 4px;
}

.lp-burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.lp-burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.lp-burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Drawer. Animated with max-height rather than display so it can transition,
   and `visibility` so a closed drawer is not focusable. */
.lp-drawer {
    position: fixed;
    top: var(--lp-nav-h);
    left: 0;
    right: 0;
    z-index: var(--z-dropdown);
    display: none;
    flex-direction: column;
    gap: .2rem;
    /* Uses --lp-gutter (the same token .lp-shell uses) rather than repeating the
       clamp, so the drawer's links stay aligned with the nav above them. */
    padding:
        .75rem
        calc(var(--lp-gutter) + var(--safe-r))
        calc(1.25rem + var(--safe-b))
        calc(var(--lp-gutter) + var(--safe-l));
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--e-3);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height var(--trans-panel), visibility var(--dur-3);
}

.lp-drawer.open {
    /* dvh, not vh. With 8 links at the 44px minimum plus the CTA the drawer is
       ~460px tall, and 70vh on a phone is measured against the LARGE viewport —
       i.e. the height the page would have if the browser's URL bar were hidden.
       While the bar is showing, 70vh can exceed what is actually on screen, so
       the last link sat under the browser chrome and could not be tapped. dvh
       tracks the visible viewport. The vh line stays as the fallback. */
    max-height: 70vh;
    max-height: min(70dvh, calc(100dvh - var(--lp-nav-h)));
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: visible;
}

.lp-drawer a {
    display: flex;
    align-items: center;
    min-height: var(--tap);
    padding: .8rem .25rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    font-size: .95rem;
    font-weight: 600;
}

.lp-drawer a:last-child {
    border-bottom: 0;
}

/* The drawer's call-to-action.
 *
 * It is an `<a class="lp-btn primary">`, so the generic `.lp-drawer a` rule
 * above would give it a bottom border and the muted link colour. Reset here
 * rather than by making the link rule more specific, because the drawer may well
 * gain a second button later. */
/* Selector is `.lp-drawer a.lp-drawer-cta`, not `.lp-drawer-cta`, on purpose.
 * `.lp-drawer a` above is (0,1,1) — one class plus a type — and a bare
 * `.lp-drawer-cta` is only (0,1,0), so it LOSES: the button would have inherited
 * the link rule's bottom border, muted colour and .25rem side padding. */
.lp-drawer a.lp-drawer-cta {
    justify-content: center;
    margin-bottom: .6rem;
    padding: .8rem 1.35rem;
    border-bottom: 0;
    color: var(--on-accent);
    font-size: .95rem;
}

/* Above 560px the header still shows its own CTA, so a second one in the drawer
 * is a duplicate. The drawer only exists below 900px, so this covers 561-900px. */
/* Above 680px the header still shows its own CTA, so a second copy in the drawer
 * is a duplicate. This boundary MUST be the complement of the `.lp-nav-cta` hide
 * in section 15 — 681px here, max-width 680px there. If the two ever drift apart
 * the page shows either two call-to-actions or none. */
@media (min-width: 681px) {
    .lp-drawer a.lp-drawer-cta {
        display: none;
    }
}

.lp-drawer a:hover {
    color: var(--text);
}

/* Freeze the page while the drawer is open.
 *
 * Without this, scrolling with the drawer open moved the page underneath it, so
 * dismissing the drawer left the visitor somewhere they had not chosen. The
 * class is set by initDrawer() in home.js; the lock is scoped here to the widths
 * where the drawer is actually an overlay, so it can never strand a desktop
 * visitor with a frozen page. (The dashboard does the same with `body.nav-open`
 * — different class name because the two documents share styles.css and must not
 * toggle each other's state.) */
@media (max-width: 900px) {
    /* The root element too: the viewport scrolls with <html>, so the lock on
     * <body> alone never stopped the page behind the open drawer. */
    html.lp-nav-open,
    body.lp-nav-open {
        overflow: hidden;
    }
}

/* Scroll progress, pinned to the bottom edge of the nav. */
.lp-progress {
    position: fixed;
    top: calc(var(--lp-nav-h) - 2px);
    left: 0;
    z-index: calc(var(--z-topbar) + 1);
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, var(--nico-accent-deep), var(--nico-accent), var(--nico-accent-bright));
    pointer-events: none;
}

/* ───────────────────────────────────────────────────────────────────────────
   3. Hero
   ─────────────────────────────────────────────────────────────────────────── */
/* Left column is deliberately the wider of the two: the headline is the
   largest type on the page and an even split forced it onto four lines at
   1440px. The preview is a supporting graphic and reads fine smaller. */
.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
    align-items: center;
    gap: var(--lp-gap);
    padding-block: clamp(2.25rem, 7vh, 4.75rem) clamp(2rem, 5vh, 3.5rem);
}

.lp-hero-copy {
    min-width: 0;
}

/* Live status pill. The dot is driven by JS: .up / .down / .loading. */
.lp-status {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.15rem;
    padding: .4rem .9rem .4rem .7rem;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    background: var(--lp-card);
    font-size: .77rem;
    font-weight: 600;
    color: var(--text-soft);
}

.lp-status .dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--text-mute);
}

.lp-status.up .dot {
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
    animation: lpPing 2s ease-out infinite;
}

.lp-status.down .dot {
    background: var(--warning);
}

@keyframes lpPing {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Max capped at 3.4rem rather than 4rem: above that the headline needs four
   lines in the hero's left column, which buries the CTA below the fold. */
.lp-h1 {
    margin: 0 0 1.1rem;
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    font-weight: 850;
    line-height: 1.06;
    letter-spacing: -.035em;
}

.lp-lead {
    margin: 0 0 1.75rem;
    max-width: 34rem;
    color: var(--text-soft);
    font-size: clamp(1rem, 1.4vw, 1.14rem);
    line-height: 1.62;
}

.lp-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1.4rem;
}

/* Reassurance line under the CTAs. */
.lp-micro {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.15rem;
    margin: 0 0 2.1rem;
    padding: 0;
    list-style: none;
    color: var(--text-mute);
    /* Fluid, replacing the 560px `font-size: .76rem` override. */
    font-size: clamp(.76rem, 2.1vw, .8rem);
}

.lp-micro li {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.lp-micro svg {
    width: 14px;
    height: 14px;
    color: var(--success);
}

/* OAuth / config error banner (#auth-error). Written to by home.js. */
.lp-error {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin: 0 0 1.4rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(239, 68, 68, .4);
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, .12);
    color: #fecaca;
    font-size: .88rem;
    line-height: 1.45;
}

.lp-error::before {
    content: "⚠";
    line-height: 1.3;
}

html[data-theme="light"] .lp-error {
    color: #b91c1c;
}

/* Diagnostic line under a sign-in error (hosts and cookie names, from home.js). */
.lp-error-detail {
    display: block;
    margin-top: .45rem;
    font-size: .76rem;
    opacity: .8;
    overflow-wrap: anywhere;
}

/* ───────────────────────────────────────────────────────────────────────────
   4. Hero stat tiles + the big stat band
   ─────────────────────────────────────────────────────────────────────────── */
/* 7rem min, 36rem max: the four tiles have to stay on ONE row on desktop.
   At 8.5rem the fourth wrapped to a lonely second row. */
.lp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
    gap: .7rem;
    max-width: 36rem;
}

.lp-stat {
    padding: .95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--lp-card);
    transition: border-color var(--trans), transform var(--trans);
}

.lp-stat:hover {
    border-color: var(--border-2);
    transform: translateY(-2px);
}

.lp-stat-v {
    display: block;
    font-size: clamp(1.35rem, 2.7vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -.02em;
    /* --grad-text, not --accent-grad: this is a glyph, and the decorative
       gradient bottoms out at 3.37:1 on the dark page. */
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Tabular figures stop the count-up animation from jittering the width. */
    font-variant-numeric: tabular-nums;
}

.lp-stat-l {
    display: block;
    margin-top: 3px;
    color: var(--text-mute);
    font-size: .69rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* Full-width band lower down the page: same numbers, more context. */
.lp-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 1rem;
}

.lp-band-item {
    position: relative;
    padding: 1.6rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--lp-radius);
    background: var(--lp-card);
    overflow: hidden;
    transition: border-color var(--trans), transform var(--trans), background var(--trans);
}

.lp-band-item:hover {
    border-color: var(--accent);
    background: var(--lp-card-hover);
    transform: translateY(-3px);
}

.lp-band-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: .9rem;
    border-radius: 11px;
    background: var(--accent-grad);
    color: #fff;
}

.lp-band-ico svg {
    width: 19px;
    height: 19px;
}

.lp-band-v {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.lp-band-l {
    margin-top: .45rem;
    font-size: .95rem;
    font-weight: 700;
}

.lp-band-d {
    margin-top: .3rem;
    color: var(--text-mute);
    font-size: .82rem;
    line-height: 1.5;
}

/* ───────────────────────────────────────────────────────────────────────────
   5. Dashboard preview mock (hero, right column)
   ─────────────────────────────────────────────────────────────────────────── */
.lp-preview {
    position: relative;
    min-width: 0;
}

.lp-preview::before {
    content: "";
    position: absolute;
    inset: 12% 8% 8% 10%;
    z-index: 0;
    border-radius: 40px;
    background: var(--accent);
    filter: blur(70px);
    opacity: .16;
}

.lp-win {
    position: relative;
    z-index: 1;
    border: 1px solid var(--border-2);
    border-radius: 14px;
    background: var(--bg-card-solid);
    box-shadow: var(--e-3);
    overflow: hidden;
    /* Was `transform .45s ease` — a 450ms hover. A hover has to resolve inside
       the time it takes to notice it, or the element is still moving when the
       pointer has already left. Every hover on the page now uses --trans. */
    transition: transform var(--trans);
}

.lp-win:hover {
    transform: translateY(-5px);
}

.lp-win-bar {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem .9rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
}

.lp-win-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.lp-win-dot.r {
    background: #ff5f57;
}

.lp-win-dot.y {
    background: #febc2e;
}

.lp-win-dot.g {
    background: #28c840;
}

.lp-win-url {
    margin-left: .6rem;
    color: var(--text-mute);
    font-family: var(--font-mono);
    font-size: .71rem;
}

.lp-win-body {
    display: flex;
    min-height: 300px;
}

.lp-win-side {
    flex: 0 0 62px;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: .9rem .7rem;
    border-right: 1px solid var(--border);
    background: var(--bg-2);
}

.lp-win-logo {
    width: 26px;
    height: 26px;
    margin-bottom: .3rem;
    border-radius: 8px;
    background: var(--accent-grad);
}

.lp-win-nav {
    height: 9px;
    border-radius: 5px;
    background: var(--bg-hover);
}

.lp-win-nav.active {
    background: linear-gradient(90deg, rgb(var(--accent-rgb) / .6), rgb(var(--accent-rgb) / .35));
}

.lp-win-nav.short {
    width: 62%;
}

.lp-win-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    padding: 1rem;
}

.lp-win-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}

.lp-win-title {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.lp-win-live {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem .5rem;
    border: 1px solid rgba(34, 197, 94, .28);
    border-radius: 999px;
    background: rgba(34, 197, 94, .12);
    color: var(--success);
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.lp-win-live .d {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

/* Three small KPI tiles with real values injected by home.js. */
.lp-win-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

.lp-win-kpi {
    padding: .6rem .65rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    min-width: 0;
}

.lp-win-kpi .k {
    color: var(--text-mute);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-win-kpi .v {
    margin-top: .2rem;
    /* Fluid, replacing the 560px `font-size: .82rem` override. */
    font-size: clamp(.82rem, 2.4vw, .95rem);
    font-weight: 800;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.lp-win-panel {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding: .8rem .9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
}

.lp-win-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.lp-win-toggle .t {
    color: var(--text-soft);
    font-size: .72rem;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-win-sw {
    position: relative;
    flex: 0 0 auto;
    width: 30px;
    height: 16px;
    border-radius: 999px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
}

.lp-win-sw::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--text-mute);
    transition: left var(--trans), background var(--trans);
}

.lp-win-sw.on {
    background: var(--accent);
    border-color: transparent;
}

.lp-win-sw.on::after {
    left: 16px;
    background: #fff;
}

.lp-win-chart {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    height: 68px;
}

.lp-win-chart span {
    flex: 1;
    height: var(--h, 50%);
    border-radius: 5px 5px 0 0;
    background: var(--accent-grad);
    opacity: .82;
    animation: lpGrow .9s ease both;
    animation-delay: var(--d, 0s);
}

@keyframes lpGrow {
    from {
        height: 0;
        opacity: 0;
    }

    to {
        height: var(--h, 50%);
        opacity: .82;
    }
}

/* ───────────────────────────────────────────────────────────────────────────
   6. "Trusted by" slider
   ─────────────────────────────────────────────────────────────────────────── */
.lp-trust {
    padding-block: clamp(2.25rem, 6vh, 3.75rem);
    border-block: 1px solid var(--border);
    background: linear-gradient(180deg, rgb(var(--accent-rgb) / .05), transparent);
}

.lp-trust-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.lp-trust-head h2 {
    margin: 0;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.lp-trust-head .n {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}

.lp-trust-hint {
    display: block;
    width: 100%;
    color: var(--text-mute);
    font-size: .8rem;
}

/* The viewport. This is a real horizontal scroller, not a transform track:
   auto-advance is done by nudging scrollLeft from home.js, which means native
   swipe on touch and drag-to-scroll on desktop come for free and the
   auto-scroll can simply pause while the user is in control. */
.lp-marquee {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Must NOT be smooth: the seamless-loop reset jumps scrollLeft, and a
       smooth scroll would animate that jump visibly. */
    scroll-behavior: auto;
    /* Fade both edges so cards enter and leave instead of being cut off. */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    cursor: grab;
    padding-block: .25rem;
}

.lp-marquee::-webkit-scrollbar {
    display: none;
}

.lp-marquee.dragging {
    cursor: grabbing;
    /* Kill text selection and link activation mid-drag. */
    user-select: none;
}

.lp-marquee+.lp-marquee {
    margin-top: .75rem;
}

.lp-guild {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex: 0 0 auto;
    max-width: 17rem;
    padding: .6rem .95rem .6rem .6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--lp-card);
    transition: border-color var(--trans), background var(--trans), transform var(--trans);
}

.lp-guild:hover {
    border-color: var(--accent);
    background: var(--lp-card-hover);
    transform: translateY(-2px);
}

.lp-guild-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent-grad);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    overflow: hidden;
}

.lp-guild-ico img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lp-guild-meta {
    display: block;
    min-width: 0;
}

.lp-guild-n,
.lp-guild-m {
    display: block;
}

.lp-guild-n {
    font-size: .86rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-guild-m {
    color: var(--text-mute);
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
}

/* ───────────────────────────────────────────────────────────────────────────
   7. Features
   ─────────────────────────────────────────────────────────────────────────── */
.lp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 1rem;
}

.lp-feature {
    position: relative;
    padding: 1.5rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--lp-radius);
    background: var(--lp-card);
    overflow: hidden;
    transition: border-color var(--trans), transform var(--trans), background var(--trans), box-shadow var(--trans);
}

.lp-feature:hover {
    border-color: var(--accent);
    background: var(--lp-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--glow-lg);
}

.lp-feature-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: var(--accent-grad);
    color: #fff;
    box-shadow: var(--glow-md);
}

.lp-feature-ico svg {
    width: 21px;
    height: 21px;
}

.lp-feature h3 {
    margin: 0 0 .45rem;
    font-size: clamp(1rem, 2.4vw, 1.08rem);
    font-weight: 750;
    letter-spacing: -.02em;
}

.lp-feature p {
    margin: 0 0 .9rem;
    color: var(--text-soft);
    font-size: .88rem;
    line-height: 1.6;
}

.lp-feature ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.lp-feature li {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    color: var(--text-mute);
    font-size: .81rem;
    line-height: 1.45;
}

.lp-feature li::before {
    content: "";
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    margin-top: .45rem;
    border-radius: 50%;
    background: var(--accent-2);
}

/* ───────────────────────────────────────────────────────────────────────────
   8. How it works
   ─────────────────────────────────────────────────────────────────────────── */
.lp-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 1rem;
    counter-reset: lpstep;
}

.lp-step {
    position: relative;
    padding: 1.5rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--lp-radius);
    background: var(--lp-card);
}

.lp-step-n {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: .9rem;
    border: 1px solid var(--border-2);
    border-radius: 10px;
    background: var(--accent-wash-2);
    color: var(--accent-2);
    font-size: .88rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.lp-step h3 {
    margin: 0 0 .4rem;
    font-size: 1.02rem;
    font-weight: 750;
}

.lp-step p {
    margin: 0;
    color: var(--text-soft);
    font-size: .87rem;
    line-height: 1.6;
}

/* ───────────────────────────────────────────────────────────────────────────
   9. Module explorer
   ─────────────────────────────────────────────────────────────────────────── */
.lp-mod-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-bottom: 1.75rem;
}

.lp-search {
    position: relative;
    flex: 1 1 15rem;
    max-width: 22rem;
}

.lp-search svg {
    position: absolute;
    top: 50%;
    left: .8rem;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--text-mute);
    pointer-events: none;
}

/* styles.css forces `color:#fff !important` and a cyan focus ring on every
   input for the dashboard's glass theme. Both are wrong here (invisible text
   in the light theme, off-brand focus), so this block has to out-specify it. */
.lp-search input[type="search"],
.lp-search input[type="text"] {
    width: 100%;
    padding: .68rem .9rem .68rem 2.3rem;
    border: 1px solid var(--border) !important;
    border-radius: 999px;
    background: var(--lp-card) !important;
    color: var(--text) !important;
    font-size: .9rem;
    outline: none;
    transition: border-color var(--trans), box-shadow var(--trans);
}

.lp-search input::placeholder {
    color: var(--text-mute);
}

.lp-search input:focus {
    border-color: var(--accent) !important;
    box-shadow: var(--focus-ring) !important;
}

.lp-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
}

.lp-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Was ~30px tall. */
    min-height: var(--tap);
    padding: .48rem .95rem;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--text-soft);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--trans), border-color var(--trans), background var(--trans);
}

.lp-tab:hover {
    color: var(--text);
    border-color: var(--border-2);
}

.lp-tab[aria-pressed="true"] {
    background: var(--accent-fill);
    border-color: var(--accent-fill);
    color: var(--on-accent);
}

/* align-items:start so each card is only as tall as its own content. Stretched
   to the row height, a one-chip group like Voice sat next to a 24-chip Utility
   card and showed 200px of empty space. */
.lp-mods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
    align-items: start;
    gap: 1rem;
}

.lp-mod {
    display: flex;
    flex-direction: column;
    padding: 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--lp-radius);
    background: var(--lp-card);
    transition: border-color var(--trans), transform var(--trans), background var(--trans);
}

.lp-mod:hover {
    border-color: var(--accent);
    background: var(--lp-card-hover);
    transform: translateY(-3px);
}

.lp-mod-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .4rem;
}

.lp-mod-t {
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: -.01em;
}

.lp-mod-count {
    flex: 0 0 auto;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: var(--accent-wash-2);
    color: var(--accent-2);
    font-size: .69rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lp-mod-d {
    margin: 0 0 .9rem;
    color: var(--text-mute);
    font-size: .84rem;
    line-height: 1.55;
}

.lp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: auto;
}

.lp-chip {
    padding: .2rem .55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    font-size: .72rem;
    white-space: nowrap;
    transition: border-color var(--trans), color var(--trans);
}

.lp-chip.match {
    border-color: var(--accent);
    color: var(--accent-2);
}

.lp-empty {
    padding: 2.5rem 1rem;
    border: 1px dashed var(--border-2);
    border-radius: var(--lp-radius);
    color: var(--text-mute);
    font-size: .9rem;
    text-align: center;
}

/* ───────────────────────────────────────────────────────────────────────────
   10. FAQ accordion
   ─────────────────────────────────────────────────────────────────────────── */
.lp-faq {
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.lp-q {
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--lp-card);
    overflow: hidden;
    transition: border-color var(--trans);
}

.lp-q:hover {
    border-color: var(--border-2);
}

.lp-q.open {
    border-color: var(--accent);
}

.lp-q-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1.05rem 1.2rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: .96rem;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.lp-q-btn svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: var(--text-mute);
    transition: transform var(--trans), color var(--trans);
}

.lp-q.open .lp-q-btn svg {
    transform: rotate(45deg);
    color: var(--accent);
}

/* grid-template-rows 0fr -> 1fr animates to the content's natural height
   without hardcoding one, and collapses cleanly on close. */
.lp-q-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--trans-panel);
}

.lp-q.open .lp-q-body {
    grid-template-rows: 1fr;
}

.lp-q-body>div {
    overflow: hidden;
}

.lp-q-body p {
    margin: 0;
    padding: 0 1.2rem 1.15rem;
    color: var(--text-soft);
    font-size: .89rem;
    line-height: 1.65;
}

.lp-q-body a {
    color: var(--accent-2);
    text-decoration: underline;
}

/* ───────────────────────────────────────────────────────────────────────────
   11. Closing CTA band
   ─────────────────────────────────────────────────────────────────────────── */
.lp-final {
    position: relative;
    padding: clamp(2.5rem, 7vw, 4.25rem) clamp(1.25rem, 5vw, 3.5rem);
    border: 1px solid var(--border-2);
    border-radius: var(--r-xl);
    background:
        radial-gradient(40rem 20rem at 50% 0%, var(--accent-wash-3), transparent 70%),
        var(--lp-card);
    text-align: center;
    overflow: hidden;
}

.lp-final h2 {
    margin: 0 0 .7rem;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.lp-final p {
    max-width: 34rem;
    margin: 0 auto 1.9rem;
    color: var(--text-soft);
    font-size: clamp(.94rem, 1.3vw, 1.05rem);
    line-height: 1.6;
}

.lp-final .lp-cta-row {
    justify-content: center;
    margin-bottom: 0;
}

/* ───────────────────────────────────────────────────────────────────────────
   12. Footer
   ─────────────────────────────────────────────────────────────────────────── */
.lp-foot {
    margin-top: clamp(2.5rem, 7vh, 4.5rem);
    border-top: 1px solid var(--border);
    /* The bottom padding is the last thing on the page, so it is what has to
       clear the iOS home indicator. */
    padding-block: clamp(2.25rem, 5vh, 3rem) calc(1.5rem + var(--safe-b));
}

.lp-foot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    gap: 2rem;
    margin-bottom: 2.25rem;
}

/* The full banner artwork, dark theme only.
 *
 * The supplied master is drawn on a black plate: its wordmark is a white/chrome
 * gradient and the tagline is a pale blue, so on a light ground it is near-white on
 * near-white — invisible, not merely low contrast. Rather than filter-hacking it,
 * the light theme keeps the mark+text form. The pair is explained in home.html
 * where the two elements are declared.
 *
 * `max-width` with `height: auto` because the intrinsic asset is 1024x409: without
 * it the footer column would be forced to the artwork's natural width and blow the
 * grid out on every screen narrower than that. */
.lp-foot-brand-lockup {
    display: block;
    margin-bottom: .35rem;
}

.lp-foot-brand-lockup img {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
}

.lp-foot-brand-lockup img {
    display: block;
    /* The asset is 731x200 (3.66:1). Fluid so it never sets a minimum width
       wider than a 320px screen, and height:auto so the intrinsic ratio holds
       without the browser guessing. */
    width: clamp(11rem, 60vw, 15.5rem);
    height: auto;
}

html[data-theme="light"] .lp-foot-brand-lockup {
    display: none;
}

.lp-foot-brand-mark {
    display: none;
}

html[data-theme="light"] .lp-foot-brand-mark {
    display: inline-flex;
}

.lp-foot-about p {
    max-width: 22rem;
    margin: .85rem 0 1.1rem;
    color: var(--text-mute);
    font-size: .84rem;
    line-height: 1.6;
}

.lp-social {
    display: flex;
    gap: .5rem;
}

.lp-foot-col h3 {
    margin: 0 0 .85rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--text-mute);
}

.lp-foot-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.lp-foot-col a {
    color: var(--text-soft);
    font-size: .86rem;
    transition: color var(--trans);
}

.lp-foot-col a:hover {
    color: var(--accent-2);
}

.lp-foot-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--border);
    color: var(--text-mute);
    font-size: .79rem;
}

.lp-foot-bottom .ver {
    font-family: var(--font-mono);
}

/* ───────────────────────────────────────────────────────────────────────────
   13. Back to top
   ─────────────────────────────────────────────────────────────────────────── */
.lp-top {
    position: fixed;
    right: calc(clamp(1rem, 3vw, 2rem) + var(--safe-r));
    bottom: calc(clamp(1rem, 3vw, 2rem) + var(--safe-b));
    z-index: var(--z-sticky);
    display: grid;
    place-items: center;
    width: var(--tap);
    height: var(--tap);
    border: 1px solid var(--border-2);
    border-radius: var(--r-md);
    background: var(--bg-card-solid);
    color: var(--text-soft);
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity var(--trans), transform var(--trans), color var(--trans);
}

.lp-top.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.lp-top:hover {
    color: var(--accent-2);
}

.lp-top svg {
    width: 18px;
    height: 18px;
}

/* ───────────────────────────────────────────────────────────────────────────
   14. Scroll reveal
   ─────────────────────────────────────────────────────────────────────────── */
/* Scroll reveal. Kept slower than the interaction scale on purpose — this is an
   entrance, not a response to an action — but pinned to the top of that scale
   (--dur-4, 380ms) rather than the 600ms it was, which was long enough that fast
   scrolling outran it and sections arrived already half-past. */
.lp-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out);
}

.lp-reveal.in {
    opacity: 1;
    transform: none;
}

/* Stagger children of a revealed grid. Capped at 6 so a long module list does
   not end up with a two-second tail. */
.lp-reveal.in>*:nth-child(1) {
    transition-delay: .04s;
}

.lp-reveal.in>*:nth-child(2) {
    transition-delay: .08s;
}

.lp-reveal.in>*:nth-child(3) {
    transition-delay: .12s;
}

.lp-reveal.in>*:nth-child(4) {
    transition-delay: .16s;
}

.lp-reveal.in>*:nth-child(5) {
    transition-delay: .2s;
}

.lp-reveal.in>*:nth-child(6) {
    transition-delay: .24s;
}

/* Visible focus ring for keyboard users on every interactive element here. */
.lp a:focus-visible,
.lp button:focus-visible,
.lp input:focus-visible,
.lp-nav a:focus-visible,
.lp-nav button:focus-visible,
.lp-drawer a:focus-visible {
    outline: var(--focus-w) solid var(--focus-color);
    outline-offset: var(--focus-offset);
    border-radius: var(--r-sm);
}

/* Skip link — first tab stop, off-screen until focused. */
.lp-skip {
    position: absolute;
    top: calc(.5rem + var(--safe-t));
    left: calc(.5rem + var(--safe-l));
    z-index: calc(var(--z-topbar) + 2);
    padding: .6rem 1rem;
    border-radius: var(--r-sm);
    background: var(--accent-fill);
    color: var(--on-accent);
    font-size: .85rem;
    font-weight: 600;
    transform: translateY(-160%);
    transition: transform var(--trans);
}

.lp-skip:focus {
    transform: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   15. Responsive
   ═══════════════════════════════════════════════════════════════════════════

   Ordering principle: each breakpoint collapses ONE thing, and whatever is under
   the most pressure at that width goes first. The previous set was
   1080 / 900 / 700 / 560 / 400 / 345, and 900 was doing four unrelated jobs at
   once (nav links, hero columns, footer grid, preview order) — which is what made
   the 600-900px band the worst region on the page.

   WHAT WAS ACTUALLY BROKEN, measured against a 320px viewport:

     1. `.lp-nav-inner` OVERFLOWED BY ~26px AND THE OVERFLOW WAS INVISIBLE.
        It is a flex row of `.lp-brand` and `.lp-nav-actions`, both `flex: 0 0
        auto`, so neither side could shrink; `.lp-nav-cta` inside it is a `.lp-btn`
        and inherits `white-space: nowrap`. Brand (~122px) + gap + CTA (~145px) +
        theme (44px) + burger (44px) + gaps (~19px) is ~374px of unshrinkable
        content in the 286px content box a 320px screen leaves after the gutter.
        `overflow-x: hidden` on html+body in styles.css then clipped it instead of
        scrolling. Fixed in the 680px block below — see the reasoning there.

     2. EVERY TOUCH TARGET ON THE PAGE WAS UNDER 44px. `.lp-icon-btn` 38x38,
        `.lp-top` 42x42 (shrinking to 38x38 at 560px, inside the block whose own
        comment claimed to be making targets bigger), `.lp-tab` ~30px tall,
        `.lp-btn` 36px tall, `.lp-nav-link` ~17px tall (an inline link's hit box is
        its line box), `.lp-drawer a` ~40px. All fixed at the COMPONENT level in
        the sections above rather than in a breakpoint, so they hold at any width.

     3. `@media (hover: none)` PROMISED "bigger targets" IN ITS COMMENT AND
        DELIVERED NONE — it only removed hover lifts. It now does both.

     4. THE THEME TOGGLE WAS DELETED BELOW 400px (`.lp-nav-actions .lp-theme-btn
        { display: none }`) to make room. Removing a feature to solve a layout
        problem; with the CTA out of the header there is room for it, so it stays
        at every width.

     5. env(safe-area-inset-*) WAS USED IN EXACTLY ONE PLACE (`.lp-top`'s bottom
        offset) despite home.html setting `viewport-fit=cover` — which is the
        setting that makes the insets non-zero AND puts content under the cutout.
        So in landscape on a notched phone the fixed nav, the shell, the drawer and
        the skip link all ran underneath it. Handled at the component level via the
        --safe-* tokens.

     6. FONT SIZES WERE STEPPED PER BREAKPOINT rather than fluid: `.lp-brand-name`,
        `.lp-micro`, `.lp-win-kpi .v` and `--lp-nav-h` each had a second value in a
        media query. All four are clamp() now, and `--lp-nav-h` mattered most — it
        feeds four different offsets, every one of which used to jump at 700px.
   ════════════════════════════════════════════════════════════════════════════ */


/* ── 1080px · Laptop ────────────────────────────────────────────────────────
   Pull the hero columns towards even before stacking them, and tighten the nav
   gap so the five links keep clear of the actions. */
@media (max-width: 1080px) {
    .lp-hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, .88fr);
        gap: clamp(1.25rem, 3vw, 2rem);
    }

    .lp-nav-links {
        gap: 1.15rem;
    }
}

/* ── 980px · The four-up bands go two-up ────────────────────────────────────
   Before this, `.lp-band` was `repeat(auto-fit, minmax(min(100%, 14rem), 1fr))`
   with exactly 4 items. auto-fit packs as many 224px tracks as fit, so between
   about 700px and 980px it produced THREE columns — 3 items on the first row
   and 1 orphan centred under them. An explicit 2x2 is the considered collapse
   for a four-item set; it never leaves an orphan at any width. */
@media (max-width: 980px) {
    .lp-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── 900px · Tablet: the nav collapses to a drawer, the hero stacks ─────────
   These two genuinely belong together: the hero's right column is the preview
   mock, and below ~900px the left column is too narrow for the headline at the
   same time as the nav links stop fitting. */
@media (max-width: 900px) {
    .lp-nav-links {
        display: none;
    }

    .lp-burger {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .lp-drawer {
        display: flex;
    }

    .lp-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-block: clamp(1.75rem, 5vh, 3rem) 1.5rem;
    }

    .lp-lead,
    .lp-stats {
        margin-inline: auto;
    }

    .lp-cta-row,
    .lp-micro,
    .lp-status {
        justify-content: center;
    }

    .lp-hero-copy .lp-micro {
        justify-content: center;
    }

    .lp-preview {
        order: 2;
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
    }

    .lp-win:hover {
        transform: none;
    }

    /* Footer: the about column takes the full width and the three link columns
       share a row beneath it. WAS `repeat(auto-fit, minmax(min(100%, 10rem),
       1fr))` with the about block spanning `1 / -1` — but auto-fit decides the
       track count from the available width, so the number of columns the span
       had to cover kept changing, and around 640px the three link columns
       became 3-then-nothing or 2-then-1 depending on the exact viewport. Three
       fixed tracks for three columns is deterministic. */
    .lp-foot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem 1.25rem;
    }

    .lp-foot-about {
        grid-column: 1 / -1;
    }
}

/* ── 700px · Large phone ────────────────────────────────────────────────────
   The 4-up hero stat row goes 2x2, and the card padding comes in.
   (`--lp-nav-h: 60px` used to live here; it is a clamp now — see section 0.) */
@media (max-width: 700px) {
    .lp-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lp-band-item {
        padding: 1.3rem 1.15rem;
    }

    .lp-feature,
    .lp-step,
    .lp-mod {
        padding: 1.25rem 1.15rem;
    }

    /* The footer's three link columns go two-up here rather than waiting for the
       phone breakpoint: at 700px three columns are ~200px each, and "Vote on
       Top.gg" and "Terms of Service" both wrap awkwardly in that. */
    .lp-foot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── 680px · THE 320px NAV OVERFLOW FIX ───────────────────────────
   The header gives up its call-to-action, and the drawer picks it up.

   `.lp-nav-cta` is a `.lp-btn`, so it has `white-space: nowrap`, and it sits in
   `.lp-nav-actions` which is `flex: 0 0 auto` inside `.lp-nav-inner` — nothing in
   that row can shrink. Reading "Open Dashboard" at .88rem it is about 145px wide.
   Add the brand (~122px), the theme toggle and the hamburger (44px each) and the
   three gaps, and the header needs ~312px inside the 286px content box a 320px
   viewport leaves after the gutter. `overflow-x: hidden` on html+body (styles.css)
   then turned that 26px into a silently CLIPPED button rather than a scrollbar, so
   the page's single most important control was cut in half with nothing to
   indicate anything was wrong.

   Hidden at 680 rather than at the 560px phone breakpoint because the arithmetic
   is only comfortable from there: at 561px the header would still need ~506px of
   a 516px content box — ten pixels of slack, which one longer translation of
   "Open Dashboard" erases. At 681px there are 120px to spare.

   Nothing is lost by removing it. The hero's `.lp-btn.primary.xl` is the same
   destination and is on screen without scrolling, and the drawer carries a
   full-width copy (#drawer-cta) whose href and label home.js keeps in step. */
@media (max-width: 680px) {
    .lp-nav-cta {
        display: none;
    }
}

/* ── 560px · Phone ─────────────────────────────────────────────────────────
   Stacked, full-width call-to-actions and the last of the two-up grids. */
@media (max-width: 560px) {

    /* A wrapped label is better than a clipped one once the buttons are
       full-width blocks rather than pills in a row. */
    .lp-cta-row .lp-btn,
    .lp-drawer .lp-btn {
        white-space: normal;
    }

    /* Full-width stacked CTAs: thumb targets, not a wrapped row of pills. */
    .lp-cta-row {
        flex-direction: column;
        align-items: stretch;
        gap: .65rem;
    }

    .lp-cta-wrap {
        display: flex;
    }

    .lp-cta-row .lp-btn,
    .lp-cta-wrap .lp-btn {
        width: 100%;
    }

    /* The animated halo reads as a smudge behind a full-width button. */
    .lp-cta-wrap::after {
        display: none;
    }

    .lp-micro {
        gap: .3rem .85rem;
    }

    .lp-win-body {
        min-height: 240px;
    }

    .lp-win-side {
        flex-basis: 52px;
    }

    .lp-win-chart {
        height: 54px;
    }

    .lp-guild {
        max-width: 14.5rem;
    }

    .lp-search {
        flex-basis: 100%;
        max-width: none;
    }

    .lp-foot-bottom {
        justify-content: center;
        text-align: center;
    }
}

/* ── 430px · Small phone ────────────────────────────────────────────────────
   The preview mock's 3-up KPI row goes 2-up. Raised from 400px to 430px: at
   420px the three tiles are ~85px wide each and "SERVERS" at .58rem with
   letter-spacing .09em already needed the ellipsis, which means the label was
   being truncated before the breakpoint fired.

   Hiding the third tile is retained. It is the only place on the page where
   content is dropped rather than reflowed, and it is defensible because the
   three tiles are a decorative mock of the dashboard, not information — the
   same numbers appear as real content in `.lp-stats` and `.lp-band`. */
@media (max-width: 430px) {
    .lp-win-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* The stat band goes one-up. Two columns of a 320px screen is ~137px per
       cell, and `.lp-band-d` is a two-line description — at that width it broke
       into four or five lines of two words. `.lp-band-v` also carries a
       clamp()-scaled number up to 28.8px, which on its own is half the cell. */
    .lp-band {
        grid-template-columns: 1fr;
    }

    .lp-win-row .lp-win-kpi:last-child {
        display: none;
    }

    /* The footer's link columns stack. */
    .lp-foot-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* The nav gap closes rather than the brand shrinking. */
    .lp-nav-inner {
        gap: .5rem;
    }

    .lp-nav-actions {
        gap: .35rem;
    }
}

/* ── 345px · Narrow phone ──────────────────────────────────────────────────
   Only genuinely narrow screens go one-up on the stats. A 390px phone fits two
   tiles comfortably, and four stacked tiles pushed everything below them off an
   already long hero. */
@media (max-width: 345px) {
    .lp-stats {
        grid-template-columns: 1fr;
    }

    /* The brand wordmark is the last thing to give way, and it gives way by
       hiding the "Pro" suffix rather than by shrinking below the size at which
       gradient-clipped text stays legible. */
    .lp-brand-name {
        letter-spacing: -.04em;
    }
}

/* ── Coarse pointers, any width ─────────────────────────────────────────────
   Covers tablets in landscape, which are wide enough to miss every width query
   above but are still operated with a thumb. */
@media (hover: none) {

    /* 16px or iOS Safari zooms the page when the command search is focused. */
    .lp-search input[type="text"] {
        font-size: 16px;
    }

    /* No hover lift: on touch, :hover latches after a tap and the element stays
       raised until something else is tapped. */
    .lp-feature:hover,
    .lp-mod:hover,
    .lp-band-item:hover,
    .lp-guild:hover,
    .lp-stat:hover,
    .lp-btn:hover,
    .lp-win:hover,
    .lp-q:hover {
        transform: none;
    }

    .lp-marquee {
        cursor: default;
    }

    /* The "bigger targets" half of this block, which its comment promised and
       which was never written. Text-link LISTS are dense by design on a mouse
       page; on touch they need real rows. */
    .lp-foot-col li a,
    .lp-q-body a,
    .lp-trust-hint a {
        display: inline-flex;
        align-items: center;
        min-height: var(--tap);
    }

    .lp-foot-col ul {
        gap: 0;
    }

    /* Chips are decorative labels, not controls, so they are left alone — but
       the marquee cards are links, and they need the height. */
    .lp-guild {
        min-height: var(--tap);
    }

    /* Remove the 300ms tap delay browsers add while they wait to see whether a
       tap is the start of a double-tap zoom. */
    .lp-btn,
    .lp-tab,
    .lp-icon-btn,
    .lp-nav-link,
    .lp-drawer a,
    .lp-q-btn,
    .lp-top {
        touch-action: manipulation;
    }
}

/* ── Landscape phones ──────────────────────────────────────────────────────
   Almost no vertical room, so the fixed nav and the drawer both have to give
   some back or the hero is entirely below the fold. */
@media (max-height: 480px) and (orientation: landscape) {
    :root {
        --lp-nav-h: 52px;
    }

    .lp-hero {
        padding-block: 1.25rem 1rem;
    }

    .lp-drawer.open {
        max-height: calc(100dvh - var(--lp-nav-h));
    }

    .lp-cta-wrap::after {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   16. Reduced motion — one block, everything off
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .lp-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .lp-cta-wrap::after,
    .lp-status.up .dot,
    .lp-win-chart span {
        animation: none !important;
    }

    .lp-win-chart span {
        height: var(--h, 50%);
        opacity: .82;
    }

    .lp-btn,
    .lp-win,
    .lp-feature,
    .lp-mod,
    .lp-band-item,
    .lp-guild,
    .lp-stat,
    .lp-q-body,
    .lp-top,
    /* The drawer slid its own height open over 280ms, which is the largest
       single movement on the page and was not in this list. */
    .lp-drawer,
    .lp-nav-link::after,
    .lp-btn .lp-arrow,
    .lp-q-btn svg,
    .lp-win-sw::after {
        transition: none !important;
    }

    .lp-btn:hover,
    .lp-win:hover,
    .lp-feature:hover,
    .lp-mod:hover,
    .lp-band-item:hover,
    .lp-guild:hover,
    .lp-stat:hover,
    .lp-btn:hover .lp-arrow {
        transform: none !important;
    }

    /* `.lp-top` is revealed by a class that changes both opacity and transform.
       Keep the reveal, drop the 12px travel. */
    .lp-top {
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   3D DEPTH — adapted from Uiverse.io
   ═══════════════════════════════════════════════════════════════════════════

   Two techniques taken from https://github.com/uiverse-io/galaxy (MIT), adapted
   to this codebase's design tokens:

     • the layered press-button, from "thin-owl-11" by njesenberger
       https://uiverse.io/njesenberger/thin-owl-11
     • the perspective/preserve-3d card transform, from "itchy-ape-77" by Cobp
       https://uiverse.io/Cobp/itchy-ape-77

   Uiverse elements are MIT licensed, which permits modification — and these are
   modified rather than pasted, for three concrete reasons:

     1. COLOUR. The originals hard-code their own palettes (a crimson
        #cd3f64/#9d3656 shelf, a Twitch purple #9147ff). Dropping those in would
        put two colours on the page that appear in no logo, no embed and no other
        stylesheet — the exact problem the note at the top of styles.css describes
        having already cleaned up once. Everything here resolves through the
        existing accent tokens, so it follows the theme into light mode.

     2. MARKUP. njesenberger's button is three nested divs
        (`.button-top`/`.button-bottom`/`.button-base`). The hero CTA is an
        `<a>` whose href AND label are rewritten at runtime by reflectSession()
        in home.js, and which contains two inline SVGs inside a flex row. Rebuilding
        it around that structure would put the session logic at risk to gain
        nothing: the same stacked-depth effect is reachable with a layered
        `box-shadow`, which cannot be clipped by an ancestor and needs no extra
        nodes.

     3. SIZE. The originals are fixed-pixel (`min-width: 10em` is fine, but
        `width: 250px`, `height: 80px` are not). Everything below is expressed in
        rem/em or inherited from the existing rules, so the buttons keep their
        `--tap` minimum and the cards keep their `auto-fit` grid behaviour.

   Placed at the END of this sheet on purpose: `.lp-mod:hover` and
   `.lp-feature:hover` already declare a `transform`, and these rules replace it.
   Equal specificity means the later declaration wins, so this section must stay
   last. Adding `!important` instead would be the wrong fix.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. The primary CTA gets real press depth ────────────────────────────────
 *
 * A solid shelf under the button in the deep accent, so the button reads as
 * sitting ON something rather than being a flat rectangle; pressing moves the
 * button down onto the shelf and the shelf collapses to nothing.
 *
 * The shelf is the FOURTH shadow layer, composed with the two the button already
 * had (`--glow-md` and the inset top highlight) rather than replacing them —
 * dropping either would flatten the glow that the rest of the page's accent
 * treatment depends on.
 *
 * `0 4px 0` is an offset with no blur, which is what makes it read as a solid
 * edge instead of a drop shadow. On :active the offset goes to 0 and the button
 * translates down by exactly the same 4px, so the top face lands where the shelf
 * was and the total height never changes — no reflow, and nothing below it moves.
 *
 * --accent-deep-rgb already exists for this purpose (it is what --accent-fill
 * resolves to in dark mode), so the shelf is guaranteed to be a darker shade of
 * the button rather than an invented colour. */
.lp-btn.primary {
    box-shadow:
        var(--glow-md),
        inset 0 1px 0 rgb(255 255 255 / .18),
        0 4px 0 rgb(var(--accent-deep-rgb) / .85);
}

.lp-btn.primary:hover {
    box-shadow:
        var(--glow-lg),
        inset 0 1px 0 rgb(255 255 255 / .22),
        0 5px 0 rgb(var(--accent-deep-rgb) / .9);
    transform: translateY(-1px);
}

.lp-btn.primary:active {
    transform: translateY(4px);
    box-shadow:
        var(--glow-sm),
        inset 0 1px 0 rgb(255 255 255 / .12),
        0 0 0 rgb(var(--accent-deep-rgb) / .85);
}

/* The press must be visible from the keyboard too, or the affordance only exists
 * for mouse users. `:focus-visible` keeps it off mouse clicks. */
.lp-btn.primary:focus-visible {
    box-shadow:
        var(--glow-lg),
        inset 0 1px 0 rgb(255 255 255 / .22),
        0 4px 0 rgb(var(--accent-deep-rgb) / .9);
}

/* ── 2. Cards lift in real 3D, not just upward ───────────────────────────────
 *
 * `perspective` on the GRID rather than on each card is what makes this genuine
 * 3D: sharing one vanishing point means cards at the left and right edges tilt
 * toward the same point, the way objects on a surface do. Setting perspective on
 * each card individually gives every one its own centred vanishing point, which
 * is the tell-tale look of a hover effect rather than a scene.
 *
 * 1200px is deliberately long. A short perspective (300–500px) produces the
 * aggressive fisheye that makes a grid look like it is bulging; at this distance
 * the tilt is legible without distorting the text inside the card.
 *
 * `translateZ` and not `scale`: moving the card toward the viewer makes the
 * shared perspective do the enlarging, so the card's border stays 1px and its
 * text stays on the pixel grid. `scale` would blur both. */
.lp-mods,
.lp-features {
    perspective: 1200px;
}

/* 3deg, and no more. Past about 5deg the top edge of a text-heavy card starts to
 * compress enough to hurt readability, which is the wrong trade for a decoration.
 * `translateY(-3px)` is preserved from the rule this replaces so the lift
 * distance is unchanged — only its character is. */
.lp-mod:hover,
.lp-feature:hover {
    transform: translateY(-3px) translateZ(14px) rotateX(3deg);
}

/* ── 3. Reduced motion ───────────────────────────────────────────────────────
 *
 * The existing block near the top of this sheet already neutralises the hover
 * transforms these rules replace, but it cannot know about declarations that come
 * after it — so the 3D tilt would have survived it. Repeated here for the two
 * selectors this section introduces.
 *
 * The press feedback on :active is deliberately KEPT: prefers-reduced-motion asks
 * for less non-essential animation, and the only confirmation that a button was
 * pressed is not decoration. It is reduced to a 2px move rather than removed. */
@media (prefers-reduced-motion: reduce) {
    .lp-mods,
    .lp-features {
        perspective: none;
    }

    .lp-mod:hover,
    .lp-feature:hover {
        transform: none;
    }

    .lp-btn.primary:hover {
        transform: none;
    }

    .lp-btn.primary:active {
        transform: translateY(2px);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIVE PRESENCE CARDS
   ═══════════════════════════════════════════════════════════════════════════

   Two cards: the bot (fed by its own /api/stats) and the developer (fed by
   Lanyard). They share the same 3D lift as the module and feature grids, so this
   section reads as part of the page rather than bolted on.
   ═══════════════════════════════════════════════════════════════════════════ */

.lp-live {
    display: grid;
    /* Two up on desktop, one up on a phone, with no breakpoint: `auto-fit` plus
       `min(100%, 22rem)` collapses to a single column when 22rem no longer fits,
       and `min(100%, …)` is what stops the track overflowing a 320px viewport —
       a bare `minmax(22rem, 1fr)` cannot shrink below its floor. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 1rem;
    /* Same shared vanishing point as .lp-mods / .lp-features. */
    perspective: 1200px;
}

.lp-live-card {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    padding: 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--lp-radius);
    background: var(--lp-card);
    transition: border-color var(--trans), transform var(--trans), background var(--trans);
}

.lp-live-card:hover {
    border-color: var(--accent);
    background: var(--lp-card-hover);
    transform: translateY(-3px) translateZ(14px) rotateX(3deg);
}

.lp-live-head {
    display: flex;
    align-items: center;
    gap: .85rem;
}

/* The avatar, with the status dot anchored to it. */
.lp-live-av {
    position: relative;
    flex: 0 0 auto;
    display: block;
    width: 72px;
    height: 72px;
}

.lp-live-av img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-hover);
}

/* Bottom-right of the avatar, ringed in the card background so it reads as
   sitting ON the avatar rather than next to it — the same treatment Discord uses,
   which is what makes it legible as a status. */
.lp-live-dot {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--lp-card);
    background: var(--text-mute);
    transition: background var(--trans);
}

.lp-live-card:hover .lp-live-dot {
    border-color: var(--lp-card-hover);
}

/* Discord's own status colours. Hard-coded on purpose: these four are a
   convention every Discord user already reads, and mapping them onto the brand
   accent would make "online" mean nothing. */
.lp-live-dot.online {
    background: #23A55A;
}

.lp-live-dot.idle {
    background: #F0B232;
}

.lp-live-dot.dnd {
    background: #F23F43;
}

.lp-live-dot.offline {
    background: #80848E;
}

.lp-live-id {
    min-width: 0;   /* lets the name ellipsis instead of stretching the grid track */
}

.lp-live-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    /* A Discord display name is arbitrary text up to 32 chars and can be a single
       unbroken run, which would otherwise push the card wider than its track. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-live-tag {
    margin-top: .1rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.lp-live-state {
    font-size: .88rem;
    /* --text-soft, not --text-dim. The latter does not exist: an undefined custom
     * property resolves to its guaranteed-invalid value, which for `color` means
     * the declaration is DROPPED — so this line silently did nothing and the text
     * inherited full-strength --text. Caught by scripts/audit-css-tokens.js, which
     * is exactly what that script is for. */
    color: var(--text-soft);
}

/* Bot stats: three even columns that stay even, because `1fr` on its own would
   let a long value widen its own column. */
.lp-live-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
    margin: 0;
    padding-top: .9rem;
    border-top: 1px solid var(--border);
}

.lp-live-stats dt {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-mute);
}

.lp-live-stats dd {
    margin: .2rem 0 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    /* Tabular, so a polled value changing from 9 to 10 does not shift the row. */
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

/* Activity rows. Empty when the presence carries none, so the container has no
   padding or border of its own to leave behind. */
.lp-live-acts:not(:empty) {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding-top: .9rem;
    border-top: 1px solid var(--border);
}

.lp-live-act {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    min-width: 0;
}

.lp-live-act-k {
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-mute);
}

.lp-live-act-v {
    min-width: 0;
    font-size: .85rem;
    color: var(--text);
    /* A track name or custom status is arbitrary user text. Clamp it rather than
       let it wrap the card taller than its neighbour. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .lp-live {
        perspective: none;
    }

    .lp-live-card:hover {
        transform: none;
    }
}

/* ── Updates: "new" dot on nav links, and the What's new button ──────────
   page-shell.js (and home.js) add .lp-new-dot to the Updates links until the
   visitor opens the newest release on /updates. */
.lp-new-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: .4rem;
    border-radius: 50%;
    background: var(--accent-ink);
    box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .18);
    vertical-align: middle;
}

.lp-hero-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.15rem;
}

.lp-hero-pills .lp-status { margin-bottom: 0; }

.lp-whatsnew {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 32px;
    padding: .3rem .5rem .3rem .35rem;
    border: 1px solid var(--accent-line, var(--border-2));
    border-radius: 999px;
    background: var(--accent-wash);
    color: var(--text);
    font-size: .77rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color var(--trans), background var(--trans), transform var(--trans);
}

.lp-whatsnew:hover {
    border-color: var(--accent-ink);
    transform: translateY(-1px);
}

.lp-whatsnew:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 2px;
}

.lp-whatsnew-tag {
    padding: .12rem .5rem;
    border-radius: 999px;
    background: var(--accent-fill);
    color: var(--on-accent, #fff);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.lp-whatsnew-ver {
    font-family: var(--font-mono);
    color: var(--accent-ink);
}

.lp-whatsnew svg {
    width: 14px;
    height: 14px;
    transition: transform var(--trans);
}

.lp-whatsnew:hover svg { transform: translateX(2px); }

@media (prefers-reduced-motion: reduce) {
    .lp-whatsnew, .lp-whatsnew svg { transition: none; }
    .lp-whatsnew:hover, .lp-whatsnew:hover svg { transform: none; }
}
