/* molex.cloud design system v2 - open composition, no box clutter.
   Content floats on the sky. Hairlines + glow over borders + cards.
   .glass exists for functional surfaces only (forms, lists, media) - max one per view. */

:root
{
    --sky-0: #05070f;
    --sky-1: #0a1128;
    --sky-2: #14204a;
    --cyan: #7de6ff;
    --violet: #a78bfa;
    --pink: #f5a8ff;
    --ink: #eef1ff;
    --ink-dim: #949dc6;
    --hairline: rgba(160, 180, 255, 0.16);
    --glass-bg: rgba(13, 20, 46, 0.38);
    --grad: linear-gradient(92deg, var(--cyan), var(--violet) 55%, var(--pink));
    --font: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, sans-serif;
    /* strict header budget: every route shares the same nav height so nothing
       shifts on navigation; chat and the SSR pre-mount reserve read from it */
    --nav-h: 84px;
    --page-pad-b: 90px;
}

*
{
    box-sizing: border-box;
}

html
{
    height: 100%;
    overflow-y: auto;
    /* stable gutter so nothing shifts between scrolling and non-scrolling
       pages (right-anchored nav bits included). NOT both-edges - Chromium
       doubles/misrenders that lane. The empty gutter shows this flat base,
       but the fixed .sky layer ignores reserved gutters in Chromium and
       paints over it edge-to-edge; the gradient can't live here directly
       (root background-attachment:fixed repaints broken - white patches). */
    scrollbar-gutter: stable;
    background: var(--sky-0);
}

/* Chromium: never set scrollbar-color on the base path - it swaps in the
   basic grey CSS scrollbars and disables these pseudo-element styles */
::-webkit-scrollbar
{
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner
{
    background: transparent;
}

::-webkit-scrollbar-thumb
{
    background: rgba(160, 180, 255, 0.28);
    border-radius: 999px;
    /* transparent border + padding-box clip = a slim floating pill */
    border: 3px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover
{
    background: rgba(160, 180, 255, 0.5);
    background-clip: padding-box;
}

/* Firefox has no webkit pseudos; its root fixed-background painting is fine,
   so it keeps the gradient-on-html approach with a floating thumb */
@supports not selector(::-webkit-scrollbar)
{
    html
    {
        background: linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 48%, var(--sky-2) 100%);
        background-attachment: fixed;
        scrollbar-color: rgba(160, 180, 255, 0.35) transparent;
    }
}

body
{
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    color: var(--ink);
    overflow-x: hidden;
}

a
{
    color: var(--cyan);
    text-decoration: none;
}

[z-link]
{
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

::selection
{
    background: rgba(125, 230, 255, 0.25);
}

/* sky - stars, aurora, drifting clouds, luminous horizon */

.sky
{
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    /* the viewport sky gradient paints here (a composited fixed layer) so
       Chromium never touches its buggy root fixed-background codepath */
    background: linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 48%, var(--sky-2) 100%);
}

.sky::before
{
    content: '';
    position: absolute;
    inset: 55% -30% -20%;
    background: radial-gradient(60% 90% at 50% 100%, rgba(125, 230, 255, 0.14) 0%, rgba(167, 139, 250, 0.08) 45%, transparent 75%);
}

.sky::after
{
    content: '';
    position: absolute;
    inset: -30% -40% 40%;
    background:
        radial-gradient(42% 30% at 28% 38%, rgba(125, 230, 255, 0.12) 0%, transparent 70%),
        radial-gradient(50% 34% at 68% 26%, rgba(167, 139, 250, 0.12) 0%, transparent 70%),
        radial-gradient(36% 26% at 84% 52%, rgba(245, 168, 255, 0.08) 0%, transparent 70%);
    filter: blur(70px);
    animation: aurora 90s ease-in-out infinite;
}

@keyframes aurora
{
    0%, 100% { transform: translateX(-3%) rotate(-1deg); }
    50% { transform: translateX(3%) rotate(1.5deg); }
}

.sky-stars
{
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.9) 50%, transparent 50%),
        radial-gradient(1px 1px at 34% 8%, rgba(255, 255, 255, 0.6) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 58% 16%, rgba(255, 255, 255, 0.8) 50%, transparent 50%),
        radial-gradient(1px 1px at 73% 31%, rgba(255, 255, 255, 0.55) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 88% 12%, rgba(255, 255, 255, 0.8) 50%, transparent 50%),
        radial-gradient(1px 1px at 45% 42%, rgba(255, 255, 255, 0.45) 50%, transparent 50%),
        radial-gradient(1px 1px at 21% 55%, rgba(255, 255, 255, 0.4) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 67% 51%, rgba(255, 255, 255, 0.5) 50%, transparent 50%),
        radial-gradient(1px 1px at 8% 76%, rgba(255, 255, 255, 0.35) 50%, transparent 50%),
        radial-gradient(1px 1px at 92% 68%, rgba(255, 255, 255, 0.4) 50%, transparent 50%);
    animation: twinkle 7s ease-in-out infinite alternate;
}

@keyframes twinkle
{
    from { opacity: 0.55; }
    to { opacity: 1; }
}

.sky-clouds
{
    position: absolute;
    inset: -20% -60%;
    filter: blur(42px);
    opacity: 0.4;
}

.sky-clouds-far
{
    background:
        radial-gradient(38% 22% at 20% 68%, rgba(120, 150, 255, 0.14) 0%, transparent 70%),
        radial-gradient(30% 18% at 62% 78%, rgba(167, 139, 250, 0.11) 0%, transparent 70%),
        radial-gradient(42% 24% at 86% 62%, rgba(125, 230, 255, 0.09) 0%, transparent 70%);
    animation: drift-far 180s linear infinite;
}

.sky-clouds-near
{
    background:
        radial-gradient(30% 16% at 34% 84%, rgba(200, 215, 255, 0.12) 0%, transparent 70%),
        radial-gradient(24% 14% at 74% 88%, rgba(245, 168, 255, 0.09) 0%, transparent 70%);
    animation: drift-near 120s linear infinite;
}

@keyframes drift-far
{
    from { transform: translateX(-6%); }
    50% { transform: translateX(6%); }
    to { transform: translateX(-6%); }
}

@keyframes drift-near
{
    from { transform: translateX(5%); }
    50% { transform: translateX(-5%); }
    to { transform: translateX(5%); }
}

@media (prefers-reduced-motion: reduce)
{
    .sky::after,
    .sky-stars,
    .sky-clouds
    {
        animation: none;
    }
}

/* glass - functional surfaces only, never decoration */

.glass
{
    background: var(--glass-bg);
    border: 1px solid var(--hairline);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* nav - unboxed, fades into the sky */

site-nav
{
    display: block;
    /* reserve the nav's box before the client mounts so SSR paints don't jump */
    min-height: var(--nav-h);
}

.nav
{
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    /* horizontal budget caps at a 1760px lane so ultra-wide screens don't pin
       the brand and avatar to opposite monitor edges */
    padding: 0 max(clamp(20px, 5vw, 56px), calc(50vw - 880px));
}

/* background + blur + bottom fade live on a pseudo-element so the user
   dropdown (a real child of .nav) is never clipped by the mask - masked-out
   regions swallow pointer events, which stole clicks from the menu */
.nav::before
{
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(5, 7, 15, 0.85) 0%, rgba(5, 7, 15, 0.35) 60%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
}

/* aurora hairline - a 1px animated accent pinned to the nav's bottom edge,
   identical on every route (pure CSS, gradient loops seamlessly) */
.nav::after
{
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, var(--cyan), var(--violet) 30%, var(--pink) 55%, var(--violet) 75%, var(--cyan));
    background-size: 200% 100%;
    opacity: 0.45;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    animation: nav-aurora 18s linear infinite;
}

@keyframes nav-aurora
{
    from { background-position: 0% 0; }
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce)
{
    .nav::after
    {
        animation: none;
    }
}

.nav-brand
{
    font-size: 1.1rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    color: var(--ink);
}

.accent
{
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links
{
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 34px);
}

.nav-links a
{
    color: var(--ink-dim);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.nav-links a:hover
{
    color: var(--ink);
    text-shadow: 0 0 18px rgba(125, 230, 255, 0.6);
}

.nav-links a.active
{
    color: var(--ink);
    text-shadow: 0 0 14px rgba(125, 230, 255, 0.5);
}

.nav-cta
{
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    color: var(--cyan) !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-cta:hover
{
    border-color: rgba(125, 230, 255, 0.5);
    box-shadow: 0 0 24px rgba(125, 230, 255, 0.18);
    text-shadow: none;
}

button.nav-cta
{
    background: none;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
}

.nav-links a.nav-user
{
    color: var(--ink);
    text-shadow: 0 0 14px rgba(125, 230, 255, 0.35);
    text-transform: none;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
}

/* page scaffolding */

#page
{
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 32px) var(--page-pad-b);
}

.page
{
    animation: rise-in 0.5s ease both;
}

@keyframes rise-in
{
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce)
{
    .page
    {
        animation: none;
    }
}

.page-head
{
    /* fixed margins, not vh - headers sit at the same y on every route */
    margin: 64px 0 44px;
    text-align: center;
}

.page-head h1
{
    margin: 0 0 10px;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 280;
    letter-spacing: -0.01em;
}

.page-head p
{
    margin: 0 auto;
    max-width: 520px;
    color: var(--ink-dim);
    line-height: 1.65;
}

/* unboxed placeholder - a glowing waypoint, not a card */

.placeholder
{
    max-width: 480px;
    margin: 10vh auto;
    text-align: center;
    color: var(--ink-dim);
    line-height: 1.7;
}

.placeholder h1
{
    font-weight: 280;
    font-size: 2.2rem;
    color: var(--ink);
    margin: 0 0 10px;
}

.orb
{
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-bottom: 26px;
    border-radius: 50%;
    background: var(--grad);
    box-shadow: 0 0 24px rgba(125, 230, 255, 0.8), 0 0 64px rgba(167, 139, 250, 0.5);
}

/* landing - full-bleed hero floating on the sky */

.landing
{
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 180px);
    text-align: center;
}

.hero
{
    position: relative;
}

/* fog canvas injected by heroFog.js after mount; never present under
   prefers-reduced-motion or during SSR */
.hero-fog
{
    position: absolute;
    inset: -60px -10%;
    z-index: -1;
    width: calc(100% + 20%);
    height: calc(100% + 120px);
    pointer-events: none;
    /* closest-side keeps the fade inside the canvas box - the fog must reach
       full transparency before its edges or it reads as a rectangle */
    mask-image: radial-gradient(closest-side at 50% 46%, #000 30%, transparent 90%);
    -webkit-mask-image: radial-gradient(closest-side at 50% 46%, #000 30%, transparent 90%);
}

/* static base glow - always painted, and the whole story under reduced motion */
.hero-glow
{
    position: absolute;
    inset: -60px -10%;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(48% 52% at 50% 40%, rgba(125, 230, 255, 0.1) 0%, rgba(167, 139, 250, 0.07) 45%, transparent 78%);
}

.hero-kicker
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cyan);
}

.hero-kicker::before,
.hero-kicker::after
{
    content: '';
    width: clamp(28px, 6vw, 64px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 230, 255, 0.55));
}

.hero-kicker::after
{
    background: linear-gradient(90deg, rgba(125, 230, 255, 0.55), transparent);
}

.hero-title
{
    margin: 18px 0 20px;
    font-size: clamp(3.4rem, 10vw, 7rem);
    font-weight: 210;
    letter-spacing: -0.025em;
    line-height: 1;
    text-shadow: 0 0 80px rgba(125, 230, 255, 0.3);
}

.hero-title .accent
{
    font-weight: 560;
    background-size: 220% 100%;
    animation: grad-sheen 12s ease-in-out infinite alternate;
}

@keyframes grad-sheen
{
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce)
{
    .hero-title .accent
    {
        animation: none;
    }
}

.hero-sub
{
    max-width: 540px;
    margin: 0 auto 38px;
    color: var(--ink-dim);
    font-size: 1.06rem;
    line-height: 1.75;
}

.hero-actions
{
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* waypoints - destinations, not cards */

.waypoints
{
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(36px, 7vw, 88px);
    flex-wrap: wrap;
    margin: 11vh 0 6vh;
}

.waypoint
{
    position: relative;
    width: 216px;
    text-align: left;
    color: var(--ink);
    padding-bottom: 14px;
    transition: transform 0.3s ease;
}

/* per-card ambient glow (tinted by --wp, set inline on each card) */
.waypoint::before
{
    content: '';
    position: absolute;
    inset: -22px -26px;
    z-index: -1;
    border-radius: 26px;
    background: radial-gradient(65% 70% at 50% 42%, color-mix(in srgb, var(--wp, var(--cyan)) 13%, transparent) 0%, transparent 78%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.waypoint::after
{
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0.7;
    transition: transform 0.35s ease;
}

.waypoint:hover
{
    transform: translateY(-6px);
}

.waypoint:hover::before
{
    opacity: 1;
}

.waypoint:hover::after
{
    transform: scaleX(1);
}

.wp-glyph
{
    display: block;
    width: 8px;
    height: 8px;
    margin-bottom: 16px;
    border-radius: 50%;
}

.wp-cyan { background: var(--cyan); box-shadow: 0 0 18px rgba(125, 230, 255, 0.9); }
.wp-violet { background: var(--violet); box-shadow: 0 0 18px rgba(167, 139, 250, 0.9); }
.wp-pink { background: var(--pink); box-shadow: 0 0 18px rgba(245, 168, 255, 0.9); }

.waypoint h3
{
    margin: 0 0 7px;
    font-size: 1rem;
    font-weight: 620;
    letter-spacing: 0.01em;
}

.waypoint p
{
    margin: 0;
    color: var(--ink-dim);
    font-size: 0.87rem;
    line-height: 1.6;
}

/* always-visible call to action per card */
.wp-cta
{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--wp, var(--cyan));
    opacity: 0.85;
    transition: opacity 0.25s ease;
}

.wp-cta::after
{
    content: '\2192';
    transition: transform 0.25s ease;
}

.waypoint:hover .wp-cta
{
    opacity: 1;
}

.waypoint:hover .wp-cta::after
{
    transform: translateX(4px);
}

/* buttons */

.btn
{
    display: inline-block;
    padding: 13px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.93rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.btn-primary
{
    background: var(--grad);
    color: #060a1c;
    box-shadow: 0 4px 30px rgba(125, 230, 255, 0.28);
}

.btn-primary:hover
{
    box-shadow: 0 8px 44px rgba(125, 230, 255, 0.42);
}

.btn-ghost
{
    border-color: var(--hairline);
    background: rgba(13, 20, 46, 0.25);
    color: var(--ink);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.btn-ghost:hover
{
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 26px rgba(125, 230, 255, 0.14);
}

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

/* auth - a floating column of light, not a box */

.auth-page
{
    display: flex;
    justify-content: center;
    padding-top: 9vh;
}

.auth-card
{
    position: relative;
    width: min(380px, 100%);
    padding: 8px 4px;
}

.auth-card::before
{
    content: '';
    position: absolute;
    inset: -70px -110px;
    z-index: -1;
    background: radial-gradient(50% 42% at 50% 30%, rgba(125, 230, 255, 0.09) 0%, rgba(167, 139, 250, 0.06) 50%, transparent 75%);
    filter: blur(20px);
}

.auth-card h1
{
    margin: 0 0 6px;
    font-size: 2rem;
    font-weight: 280;
    text-align: center;
}

.auth-sub
{
    margin: 0 0 34px;
    color: var(--ink-dim);
    font-size: 0.92rem;
    text-align: center;
}

.field
{
    display: block;
    margin-bottom: 26px;
}

.field span
{
    display: block;
    margin-bottom: 7px;
    font-size: 0.68rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink-dim);
}

.field input
{
    width: 100%;
    padding: 9px 2px;
    border: none;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.02rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field input:focus
{
    border-bottom-color: rgba(125, 230, 255, 0.75);
    box-shadow: 0 12px 22px -14px rgba(125, 230, 255, 0.55);
}

.form-notice
{
    margin: 0 0 18px;
    color: var(--pink);
    font-size: 0.88rem;
    text-align: center;
}

.auth-card .btn
{
    margin-top: 8px;
}

.auth-alt
{
    margin: 22px 0 0;
    text-align: center;
    color: var(--ink-dim);
    font-size: 0.9rem;
}

/* not found - drifted off into the dark */

.not-found
{
    display: flex;
    justify-content: center;
    padding-top: 12vh;
}

.nf
{
    text-align: center;
    max-width: 460px;
}

.nf-code
{
    margin: 0;
    font-size: clamp(5rem, 14vw, 7.5rem);
    font-weight: 180;
    line-height: 1;
    letter-spacing: 0.06em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.55;
    text-shadow: 0 0 70px rgba(167, 139, 250, 0.35);
}

.nf h1
{
    margin: 14px 0 10px;
    font-weight: 300;
}

.nf p
{
    color: var(--ink-dim);
    margin: 0 0 30px;
}

/* auth alternates - passkey / github under the main form */

.auth-or
{
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 16px;
    color: var(--ink-dim);
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.auth-or::before,
.auth-or::after
{
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hairline);
}

.auth-alt-actions
{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-alt-actions .btn
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.auth-alt-actions .btn svg
{
    flex-shrink: 0;
    opacity: 0.85;
}

/* settings - security deck: wide two-column sections on hairlines */

.settings-page
{
    max-width: 1020px;
    margin: 0 auto;
    padding-bottom: 12vh;
}

.settings-page .page-head
{
    margin-bottom: 5vh;
}

.settings-loading
{
    margin-top: 12vh;
    text-align: center;
    color: var(--ink-dim);
}

.settings-notice
{
    text-align: left;
}

.settings-section
{
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 6px 72px;
    padding: 48px 0 44px;
    border-top: 1px solid var(--hairline);
}

.section-head h2
{
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 240;
    letter-spacing: 0.01em;
    text-shadow: 0 0 40px rgba(125, 230, 255, 0.25);
}

.section-head p
{
    margin: 0;
    color: var(--ink-dim);
    font-size: 0.88rem;
    line-height: 1.5;
}

.section-body
{
    min-width: 0;
    padding-top: 6px;
}

.section-status
{
    margin: 0 0 16px;
    color: var(--ink-dim);
    font-size: 0.95rem;
}

.row-actions
{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-danger
{
    color: var(--pink);
}

.btn-danger:hover
{
    border-color: rgba(245, 168, 255, 0.55);
    box-shadow: 0 0 18px rgba(245, 168, 255, 0.25);
}

.settings-list
{
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.settings-list li
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 14px;
    margin: 0 -14px;
    border-radius: 12px;
    border-bottom: 1px solid var(--hairline);
    transition: background-color 0.2s ease;
}

.settings-list li:hover
{
    background: rgba(125, 230, 255, 0.045);
}

.settings-list .btn
{
    flex-shrink: 0;
    padding: 10px 22px;
    font-size: 0.85rem;
}

.item-main
{
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.item-title
{
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-meta
{
    color: var(--ink-dim);
    font-size: 0.78rem;
}

.tag-now
{
    font-style: normal;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(125, 230, 255, 0.7);
    margin-left: 8px;
}

.inline-form
{
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.inline-form .field-inline
{
    flex: 1;
    min-width: 180px;
    margin-bottom: 0;
}

/* the one glass on this view: 2FA enrollment / backup codes */

.enroll-panel
{
    padding: 22px;
    margin-top: 6px;
}

.enroll-panel h3
{
    margin: 0 0 6px;
    font-weight: 320;
}

.enroll-panel > p
{
    margin: 0 0 18px;
    color: var(--ink-dim);
    font-size: 0.9rem;
}

.enroll-row
{
    display: flex;
    gap: 22px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.qr-box
{
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 34px rgba(125, 230, 255, 0.22);
}

.qr-box svg
{
    display: block;
}

.enroll-manual
{
    flex: 1;
    min-width: 200px;
}

.enroll-manual p
{
    margin: 0 0 8px;
    color: var(--ink-dim);
    font-size: 0.85rem;
}

.totp-secret
{
    display: block;
    padding: 8px 10px;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    word-break: break-all;
    background: rgba(5, 7, 15, 0.5);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    user-select: all;
}

.backup-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin: 0 0 18px;
}

.backup-grid code
{
    padding: 7px 10px;
    text-align: center;
    font-size: 0.86rem;
    letter-spacing: 0.1em;
    background: rgba(5, 7, 15, 0.5);
    border: 1px solid var(--hairline);
    border-radius: 8px;
    user-select: all;
}

/* step-up prompt - floats above everything, still weightless */

.stepup-veil
{
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 7, 15, 0.6);
    backdrop-filter: blur(6px);
}

.stepup-prompt
{
    width: min(360px, 100%);
    padding: 26px;
    background: var(--glass-bg);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    box-shadow: 0 30px 80px -30px rgba(5, 7, 15, 0.9), 0 0 40px rgba(125, 230, 255, 0.08);
}

.stepup-prompt h3
{
    margin: 0 0 6px;
    font-weight: 320;
}

.stepup-prompt p
{
    margin: 0 0 18px;
    color: var(--ink-dim);
    font-size: 0.88rem;
}

@media (max-width: 780px)
{
    .settings-section
    {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 36px 0 32px;
    }

    .section-body
    {
        padding-top: 0;
    }
}

/* small screens */

@media (max-width: 640px)
{
    .nav
    {
        padding: 0 18px;
    }

    .landing
    {
        min-height: calc(100vh - 140px);
    }

    .waypoints
    {
        gap: 34px;
        margin-top: 8vh;
    }

    .waypoint
    {
        width: min(280px, 86vw);
    }

    .page-head
    {
        margin: 40px 0 32px;
    }

    .pd
    {
        margin-top: 40px;
    }

    .settings-list li
    {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .enroll-row
    {
        justify-content: center;
    }
}

/* M3 - shared bits: small buttons, chips, glyphs, veil overlay */

.btn-sm
{
    padding: 6px 13px;
    font-size: 0.78rem;
    font-weight: 500;
}

.btn-dangerish:hover
{
    border-color: rgba(255, 120, 150, 0.5);
    box-shadow: 0 0 22px rgba(255, 120, 150, 0.14);
    color: #ffb3c4;
}

.chip
{
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 3px 10px;
    margin-left: 10px;
    color: var(--ink-dim);
    vertical-align: 2px;
    white-space: nowrap;
}

.chip-glow
{
    color: #060a1c;
    background: var(--grad);
    border-color: transparent;
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.45);
}

.glyph
{
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    margin-right: 2px;
}

.g-folder { background: var(--cyan); box-shadow: 0 0 12px rgba(125, 230, 255, 0.8); }
.g-media { background: var(--pink); box-shadow: 0 0 12px rgba(245, 168, 255, 0.8); }
.g-pack { background: #ffd88a; box-shadow: 0 0 12px rgba(255, 216, 138, 0.7); }
.g-file { background: var(--violet); box-shadow: 0 0 12px rgba(167, 139, 250, 0.8); }

.veil
{
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 7, 15, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.veil-prompt
{
    width: min(430px, 100%);
    padding: 28px;
    background: var(--glass-bg);
    border: 1px solid var(--hairline);
    border-radius: 18px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 30px 80px -30px rgba(5, 7, 15, 0.9), 0 0 40px rgba(125, 230, 255, 0.08);
}

.veil-prompt h3
{
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 320;
    letter-spacing: 0.01em;
}

.veil-prompt p
{
    margin: 0 0 16px;
    color: var(--ink-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

.veil-prompt .field
{
    margin-bottom: 14px;
}

.veil-actions
{
    margin: 20px 0 0;
    display: flex;
    gap: 10px;
}

.veil-actions .btn
{
    padding: 11px 22px;
}

/* M3 - the stash (/app/files) */

.stash-wrap
{
    max-width: 960px;
    margin: 0 auto;
}

.stash-bar
{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 0 10px 14px;
}

.stash-crumbs
{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    min-width: 0;
}

.stash-crumbs a
{
    color: var(--ink-dim);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.stash-crumbs a:hover
{
    color: var(--ink);
    text-shadow: 0 0 16px rgba(125, 230, 255, 0.5);
}

.stash-crumbs a.crumb-here
{
    color: var(--ink);
}

.crumb-sep
{
    color: var(--ink-dim);
    opacity: 0.5;
}

.stash-tools
{
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stash-notice
{
    max-width: 960px;
    margin: 0 auto 12px;
}

.stash-list
{
    padding: 8px 26px;
}

.stash-row
{
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 2px;
    border-bottom: 1px solid var(--hairline);
    min-height: 62px;
}

.stash-row:last-child
{
    border-bottom: none;
}

.stash-name
{
    flex: 1 1 200px;
    min-width: 0;
    font-size: 1.02rem;
    font-weight: 350;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.stash-folder
{
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.stash-folder:hover
{
    color: var(--cyan);
    text-shadow: 0 0 18px rgba(125, 230, 255, 0.6);
}

.stash-meta
{
    color: var(--ink-dim);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.row-actions
{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

/* hover-reveal is scoped to the stash list only - the bare .row-actions
   class is shared with settings/sessions where actions stay always visible */
.stash-list .row-actions
{
    opacity: 0.42;
    transition: opacity 0.2s ease;
}

.stash-list .stash-row:hover .row-actions,
.stash-list .row-actions:focus-within,
.row-actions-on
{
    opacity: 1;
}

@media (hover: none)
{
    .stash-list .row-actions
    {
        opacity: 1;
    }
}

.stash-inline
{
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.stash-input
{
    flex: 1;
    min-width: 120px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    background: rgba(8, 12, 30, 0.55);
    color: var(--ink);
    font-family: var(--font);
    font-size: 0.95rem;
}

.stash-input:focus
{
    outline: none;
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 22px rgba(125, 230, 255, 0.12);
}

.stash-empty
{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--ink-dim);
    text-align: center;
    padding: 52px 0 56px;
}

.stash-empty p
{
    margin: 0;
    font-size: 1.05rem;
    font-weight: 300;
}

.share-url code
{
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: rgba(8, 12, 30, 0.55);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

/* M3 - the beam (/app/uploads) */

.beam-zone
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 720px;
    margin: 0 auto 30px;
    padding: 52px 24px;
    cursor: pointer;
    text-align: center;
    border-style: dashed;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.beam-zone-hot,
.beam-zone:hover
{
    border-color: rgba(125, 230, 255, 0.5);
    box-shadow: 0 0 46px rgba(125, 230, 255, 0.18);
    transform: translateY(-2px);
}

.beam-zone .orb
{
    margin-bottom: 4px;
}

.beam-input
{
    display: none;
}

.beam-hint
{
    font-size: 1.35rem;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.beam-sub
{
    color: var(--ink-dim);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.beam-list
{
    list-style: none;
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
}

.beam-item
{
    padding: 18px 2px 16px;
    border-bottom: 1px solid var(--hairline);
}

.beam-item:last-child
{
    border-bottom: none;
}

.beam-item-head
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.beam-item-head .stash-name
{
    flex: 1;
}

.beam-bar
{
    height: 5px;
    border-radius: 999px;
    background: rgba(160, 180, 255, 0.13);
    overflow: hidden;
}

.beam-bar-fill
{
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--grad);
    box-shadow: 0 0 16px rgba(125, 230, 255, 0.6);
    transition: width 0.2s ease;
}

.beam-bar-done
{
    box-shadow: none;
    opacity: 0.55;
}

.beam-status
{
    display: inline-block;
    margin-top: 8px;
    color: var(--ink-dim);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.beam-parked
{
    max-width: 720px;
    margin: 38px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
}

.beam-parked h3
{
    margin: 0 0 6px;
    font-weight: 350;
    letter-spacing: 0.02em;
}

.beam-parked > p
{
    margin: 0 0 10px;
    color: var(--ink-dim);
    font-size: 0.9rem;
}

/* M3 - shared links (/app/shares) */

.shares-bar
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 14px;
    padding: 0 6px;
}

.share-state
{
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 3px 10px;
    margin-left: 10px;
    color: var(--ink-dim);
    vertical-align: 2px;
    white-space: nowrap;
}

.share-state-active
{
    color: #060a1c;
    background: var(--grad);
    border-color: transparent;
    box-shadow: 0 0 16px rgba(125, 230, 255, 0.4);
}

.share-state-revoked
{
    color: #ffb3c4;
    border-color: rgba(255, 120, 150, 0.35);
}

/* M3 - clubhouse dashboard */

.app-home-foot
{
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 44px;
}

/* M3 - vault shelves: open composition, hairline rows on the sky */

.vault-empty
{
    color: var(--ink-dim);
    text-align: center;
    padding: 40px 0;
}

.vault-list
{
    list-style: none;
    margin: 0 auto;
    max-width: 860px;
    padding: 0;
}

.vault-item
{
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 26px 8px;
    border-bottom: 1px solid var(--hairline);
}

.vault-item:first-child
{
    border-top: 1px solid var(--hairline);
}

.vault-item-main
{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vault-name
{
    font-size: 1.45rem;
    font-weight: 280;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.vault-blurb
{
    margin: 0;
    color: var(--ink-dim);
    font-size: 0.95rem;
    line-height: 1.5;
}

.vault-meta
{
    color: var(--ink-dim);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* M3 - share landing */

.share-card .share-file
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin: 20px 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--hairline);
}

.share-card .share-name
{
    font-size: 1.3rem;
    font-weight: 300;
    overflow-wrap: anywhere;
}

.share-card .share-size
{
    color: var(--ink-dim);
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (max-width: 720px)
{
    .stash-bar
    {
        flex-direction: column;
        align-items: stretch;
    }

    .stash-tools
    {
        margin-left: 0;
    }

    .stash-row
    {
        flex-wrap: wrap;
    }

    .stash-meta
    {
        order: 3;
    }

    .row-actions
    {
        width: 100%;
        justify-content: flex-start;
    }
}

/* M3.5 - icon buttons, contextual drawers, toasts, beam destination */

.btn-icon
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.25);
    color: var(--ink-dim);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-icon:hover
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 18px rgba(125, 230, 255, 0.16);
    transform: translateY(-1px);
}

.btn-icon-danger:hover
{
    color: #ffb3c4;
    border-color: rgba(255, 120, 150, 0.5);
    box-shadow: 0 0 18px rgba(255, 120, 150, 0.16);
}

.btn-icon-on
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 18px rgba(125, 230, 255, 0.14);
}

.btn-icon svg
{
    display: block;
}

.btn .btn-sm svg,
.btn-sm svg
{
    vertical-align: -3px;
    margin-right: 6px;
}

.stash-drawer
{
    margin: -1px 0 0 25px;
    padding: 14px 16px 16px;
    border-left: 2px solid rgba(125, 230, 255, 0.35);
    background: rgba(125, 230, 255, 0.03);
    border-radius: 0 12px 12px 0;
}

/* labeled action rail the kebab expands, in place of the old icon cluster */
.menu-line
{
    align-items: center;
    gap: 8px;
}

.menu-act
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.25);
    color: var(--ink-dim);
    font-family: var(--font);
    font-size: 0.86rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.menu-act svg
{
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
}

.menu-act:hover
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 18px rgba(125, 230, 255, 0.16);
    transform: translateY(-1px);
}

.menu-act-danger:hover
{
    color: #ffb3c4;
    border-color: rgba(255, 120, 150, 0.5);
    box-shadow: 0 0 18px rgba(255, 120, 150, 0.16);
}

.menu-close
{
    margin-left: auto;
}

.drawer-title
{
    margin: 0 0 10px;
    color: var(--ink-dim);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.drawer-line
{
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.drawer-field
{
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 0 1 150px;
}

.drawer-field-wide
{
    flex: 1 1 260px;
}

.drawer-field span
{
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.drawer-field input
{
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    background: rgba(8, 12, 30, 0.55);
    color: var(--ink);
    font-family: var(--font);
    font-size: 0.9rem;
    width: 100%;
}

.drawer-field input:focus
{
    outline: none;
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 18px rgba(125, 230, 255, 0.12);
}

.drawer-targets
{
    align-items: center;
}

.share-code
{
    flex: 1 1 260px;
    padding: 10px 13px;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: rgba(8, 12, 30, 0.55);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

/* toasts - bottom center, floating chips */

.toast-stack
{
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: min(440px, calc(100vw - 32px));
}

.toast
{
    padding: 11px 20px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--ink);
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 44px -18px rgba(5, 7, 15, 0.9);
    animation: toast-in 0.25s ease;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
}

.toast-good
{
    border-color: rgba(125, 230, 255, 0.4);
    box-shadow: 0 16px 44px -18px rgba(5, 7, 15, 0.9), 0 0 24px rgba(125, 230, 255, 0.18);
}

.toast-bad
{
    border-color: rgba(255, 120, 150, 0.45);
    box-shadow: 0 16px 44px -18px rgba(5, 7, 15, 0.9), 0 0 24px rgba(255, 120, 150, 0.18);
}

@keyframes toast-in
{
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce)
{
    .toast { animation: none; }
}

/* beam destination picker */

.beam-dest
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 720px;
    margin: 0 auto 16px;
    color: var(--ink-dim);
    font-size: 0.9rem;
}

.stash-select
{
    padding: 9px 34px 9px 13px;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    background: rgba(8, 12, 30, 0.72);
    color: var(--ink);
    font-family: var(--font);
    font-size: 0.9rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23949dc6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.stash-select:focus
{
    outline: none;
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 18px rgba(125, 230, 255, 0.12);
}

.stash-select option
{
    background: #0d142e;
    color: var(--ink);
}

/* share landing extras */

.share-card
{
    text-align: center;
}

.share-orb
{
    margin: 0 auto 14px;
}

.share-card .share-file
{
    text-align: left;
}

.share-foot
{
    margin: 22px 0 0;
    color: var(--ink-dim);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* stash tools alignment with icon buttons */

.stash-tools .btn-primary.btn-sm
{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
}

.stash-tools .btn-primary.btn-sm svg
{
    margin: 0;
}

/* M3.5 - the hub (/app): feature sections with live numbers */

.app-hub .page-head h1
{
    text-transform: none;
}

.hub
{
    max-width: 860px;
    margin: 0 auto;
}

.hub-row
{
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 30px 14px;
    border-bottom: 1px solid var(--hairline);
    text-decoration: none;
    color: var(--ink);
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    border-radius: 14px;
}

.hub-row:first-child
{
    border-top: 1px solid var(--hairline);
}

a.hub-row:hover
{
    background: rgba(125, 230, 255, 0.04);
    box-shadow: inset 2px 0 0 rgba(125, 230, 255, 0.45), 0 0 34px rgba(125, 230, 255, 0.06);
    transform: translateX(4px);
}

.hub-label
{
    flex: 0 0 150px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.hub-body
{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hub-stat
{
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.hub-detail
{
    color: var(--ink-dim);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.hub-go
{
    flex: 0 0 auto;
    color: var(--ink-dim);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a.hub-row:hover .hub-go
{
    color: var(--cyan);
    text-shadow: 0 0 16px rgba(125, 230, 255, 0.6);
}

.hub-row-soon
{
    opacity: 0.55;
}

.hub-soon-chip
{
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 3px 10px;
}

@media (max-width: 720px)
{
    .hub-row
    {
        flex-wrap: wrap;
        gap: 10px 18px;
    }

    .hub-label
    {
        flex-basis: 100%;
    }
}

/* M3.5 - stash multi-select */

.sel-bar
{
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto 12px;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid rgba(125, 230, 255, 0.35);
    background: rgba(125, 230, 255, 0.06);
    box-shadow: 0 0 30px rgba(125, 230, 255, 0.1);
}

.sel-count
{
    font-weight: 500;
    letter-spacing: 0.02em;
}

.sel-actions
{
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sel-drawer
{
    max-width: 960px;
    margin: -4px auto 12px;
}

.sel-box
{
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1.5px solid var(--hairline);
    background: rgba(8, 12, 30, 0.4);
    color: #060a1c;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sel-slot
{
    flex: 0 0 auto;
    width: 20px;
}

.stash-row:hover .sel-box,
.sel-box-on
{
    opacity: 1;
}

.sel-box-on
{
    background: var(--grad);
    border-color: transparent;
}

.sel-box svg
{
    width: 13px;
    height: 13px;
    stroke-width: 2;
}

.stash-row-sel
{
    background: rgba(125, 230, 255, 0.04);
    border-radius: 10px;
}

@media (hover: none)
{
    .sel-box { opacity: 1; }
}

/* M3.5 - nav user chip + dropdown */

.nav-user-wrap
{
    position: relative;
}

.nav-avatar-btn
{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.4);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-avatar-btn:hover
{
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 22px rgba(125, 230, 255, 0.14);
}

.nav-avatar
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--grad);
    color: #060a1c;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    overflow: hidden;
}

.nav-avatar img
{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-avatar-name
{
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-chevron
{
    color: var(--ink-dim);
    font-size: 0.7rem;
}

.nav-menu
{
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: 14px;
    border: 1px solid var(--hairline);
    background: rgba(10, 15, 34, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 24px 60px -24px rgba(5, 7, 15, 0.95);
    z-index: 20;
    animation: menu-in 0.16s ease;
}

@keyframes menu-in
{
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

.nav-menu-item
{
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border-radius: 9px;
    border: none;
    background: none;
    color: var(--ink) !important;
    font: inherit;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    text-transform: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.nav-menu-item:hover
{
    background: rgba(125, 230, 255, 0.08);
    text-shadow: none;
}

.nav-menu-signout
{
    color: #ffb3c4 !important;
    border-top: 1px solid var(--hairline);
    border-radius: 0 0 9px 9px;
    margin-top: 4px;
}

@media (prefers-reduced-motion: reduce)
{
    .nav-menu { animation: none; }
}

@media (max-width: 640px)
{
    .nav-avatar-name { display: none; }
}

/* M3.5 - hub feature groups */

.hub-group
{
    max-width: 860px;
    margin: 0 auto 30px;
}

.hub-group-head
{
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 6px 6px;
}

.hub-group-head h2
{
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-dim);
    white-space: nowrap;
}

.hub-group-line
{
    flex: 1;
    height: 1px;
    background: var(--hairline);
}

/* ===================== M4: the lounge (chat) ===================== */

/* app-like: break out of #page's centered column and fill the space under
   the sticky nav, flush to the viewport edges with a small gutter (stays
   true full-bleed at every viewport width - never cap this lane) */
.chat-page
{
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: calc(var(--page-pad-b) * -1); /* cancel #page's bottom padding */
    height: calc(100vh - var(--nav-h) - var(--dock-clear, 0px));
    padding: clamp(10px, 1.4vw, 16px) clamp(12px, 1.8vw, 22px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* opacity-only entrance: the .page rise-in translateY(16px) would shove this
       full-height, full-bleed panel past the viewport for 0.5s, flashing a
       scrollbar and jittering the 100vw full-bleed sideways on every nav. */
    animation: chat-fade 0.3s ease both;
}

@keyframes chat-fade
{
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce)
{
    .chat-page { animation: none; }
}

/* live-connection pip */
.conn
{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.conn-pip
{
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--ink-dim);
}

.conn-online
{
    color: #9ff0c8;
}

.conn-online .conn-pip
{
    background: #6ff0b0;
    box-shadow: 0 0 10px rgba(111, 240, 176, 0.75);
}

.conn-connecting .conn-pip,
.conn-reconnecting .conn-pip
{
    background: var(--cyan);
    animation: conn-blink 1s ease-in-out infinite;
}

@keyframes conn-blink
{
    50% { opacity: 0.2; }
}

.chat-shell
{
    display: grid;
    grid-template-columns: 260px 1fr 224px;
    flex: 1;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

/* rooms rail */
.chat-rooms
{
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--hairline);
}

.chat-rooms-head
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 12px 8px 16px;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.chat-rooms-actions { display: inline-flex; align-items: center; gap: 4px; }

.chat-newroom
{
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 0 12px 12px;
}

.chat-newroom input
{
    width: 100%;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.35);
    color: var(--ink);
    font: inherit;
    font-size: 0.85rem;
}

.chat-newroom input:focus
{
    outline: none;
    border-color: rgba(125, 230, 255, 0.45);
}

/* public/private toggle in the new-room form */
.chat-visibility { display: flex; gap: 6px; }

.chat-vis
{
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid var(--hairline);
    background: transparent;
    color: var(--ink-dim);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.chat-vis svg { width: 15px; height: 15px; }
.chat-vis.on
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.5);
    background: rgba(125, 230, 255, 0.08);
}

.chat-newroom-hint { margin: 2px 0 0; font-size: 0.72rem; color: var(--ink-dim); }

/* shared invite/member picker (new-room invitees + in-room add-people) */
.chat-invite-list
{
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 190px;
    overflow-y: auto;
}

.chat-newroom-invite { max-height: 150px; }

.chat-invite-row
{
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
}

.chat-invite-row:hover { background: rgba(125, 230, 255, 0.07); }
.chat-invite-row.picked { background: rgba(125, 230, 255, 0.12); color: var(--cyan); }
.chat-invite-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-invite-check { color: var(--cyan); font-weight: 600; }
.chat-invite-add { color: var(--ink-dim); display: inline-flex; }
.chat-invite-row:hover .chat-invite-add { color: var(--cyan); }

.chat-invite-panel
{
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.35);
}

.chat-invite-head
{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px 6px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.chat-invite-head svg { width: 14px; height: 14px; }

/* browse public rooms */
.chat-browse
{
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.chat-browse-head
{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 2px 4px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.chat-browse-head svg { width: 14px; height: 14px; }

.chat-browse-row
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px 5px 8px;
    border-radius: 8px;
}

.chat-browse-row:hover { background: rgba(125, 230, 255, 0.06); }
.chat-browse-info { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; overflow: hidden; }
.chat-browse-count { margin-left: 4px; color: var(--ink-dim); font-size: 0.72rem; }
.chat-browse-join { padding: 4px 12px; }

.room-lock { display: inline-flex; color: var(--ink-dim); }
.room-lock svg { width: 13px; height: 13px; }

/* roster member management */
.roster-private
{
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 0.72rem;
    color: var(--ink-dim);
}

.roster-private svg { width: 13px; height: 13px; }
.roster-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-name small { color: var(--ink-dim); font-size: 0.7rem; }

.roster-kick
{
    display: inline-flex;
    padding: 3px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--ink-dim);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s, color 0.12s;
}

.roster-row:hover .roster-kick { opacity: 1; }
.roster-kick:hover { color: #ff8ba3; }
.roster-kick svg { width: 13px; height: 13px; }

.chat-room-list
{
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 8px 12px;
}

.room-row
{
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 12px;
    color: var(--ink-dim);
    transition: background 0.15s ease, color 0.15s ease;
}

.room-row:hover
{
    background: rgba(125, 230, 255, 0.06);
    color: var(--ink);
}

.room-active
{
    background: rgba(125, 230, 255, 0.1);
    color: var(--ink);
}

.room-hash
{
    color: var(--violet);
    font-weight: 700;
}

.room-info
{
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.room-name
{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.room-last
{
    font-size: 0.74rem;
    color: var(--ink-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-unread
{
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--grad);
    color: #060a1c;
    font-size: 0.64rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* message pane */
.chat-main
{
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-main-head
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--hairline);
}

.chat-main-title
{
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.chat-main-title strong
{
    font-size: 1.05rem;
}

.chat-main-tools
{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.chat-topic
{
    font-size: 0.8rem;
    color: var(--ink-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-scroll
{
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
}

/* bottom-anchor: a growing spacer keeps a short conversation pinned just
   above the composer; it collapses to 0 once history overflows and scrolls */
.chat-scroll::before
{
    content: '';
    flex: 1 1 auto;
}

.chat-older
{
    align-self: center;
    margin-bottom: 12px;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: none;
    color: var(--ink-dim);
    font: inherit;
    font-size: 0.76rem;
    cursor: pointer;
}

.chat-older:hover
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.4);
}

.msg
{
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 13px;
    max-width: 76%;
    align-items: flex-start;
}

.msg-grouped
{
    margin-top: 2px;
}

.msg-who
{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--ink-dim);
}

.who-dot
{
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--ink-dim);
    opacity: 0.45;
}

.who-on
{
    background: #6ff0b0;
    opacity: 1;
    box-shadow: 0 0 8px rgba(111, 240, 176, 0.6);
}

.msg-bubble
{
    padding: 9px 13px;
    border-radius: 4px 14px 14px 14px;
    border: 1px solid var(--hairline);
    background: rgba(160, 180, 255, 0.07);
    font-size: 0.92rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.msg-time
{
    margin-left: 10px;
    font-size: 0.64rem;
    color: var(--ink-dim);
    opacity: 0.7;
}

.msg-mine
{
    align-self: flex-end;
    align-items: flex-end;
}

.msg-mine .msg-bubble
{
    border-radius: 14px 4px 14px 14px;
    border-color: rgba(125, 230, 255, 0.25);
    background: linear-gradient(120deg, rgba(125, 230, 255, 0.14), rgba(167, 139, 250, 0.12));
}

.msg-pending .msg-bubble
{
    opacity: 0.55;
}

.chat-typing
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 2px 2px;
    font-size: 0.78rem;
    font-style: italic;
    color: var(--ink-dim);
}

.typing-dots
{
    display: inline-flex;
    gap: 3px;
}

.typing-dots i
{
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--cyan);
    animation: typing-bounce 1.2s ease-in-out infinite;
}

.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce
{
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.chat-composer
{
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 12px 16px;
    border-top: 1px solid var(--hairline);
}

.chat-composer textarea
{
    flex: 1;
    min-height: 42px;
    max-height: 140px;
    resize: none;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.35);
    color: var(--ink);
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.4;
}

.chat-composer textarea:focus
{
    outline: none;
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 18px rgba(125, 230, 255, 0.14);
}

.chat-composer textarea:disabled
{
    opacity: 0.5;
}

.chat-send
{
    width: 42px;
    height: 42px;
    color: var(--cyan);
    border-color: rgba(125, 230, 255, 0.3);
}

.chat-send:hover
{
    color: #060a1c;
    background: var(--grad);
    border-color: transparent;
}

.chat-send:disabled
{
    opacity: 0.4;
    pointer-events: none;
}

/* roster */
.chat-roster
{
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 14px 12px;
    overflow-y: auto;
    border-left: 1px solid var(--hairline);
}

.chat-roster-head
{
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 10px;
}

.roster-count
{
    margin: 0 0 8px;
    font-size: 0.74rem;
    color: var(--ink-dim);
}

.roster-list
{
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.roster-row
{
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--ink-dim);
}

.roster-dot
{
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--ink-dim);
    opacity: 0.4;
}

.roster-on
{
    color: var(--ink);
}

.roster-on .roster-dot
{
    background: #6ff0b0;
    opacity: 1;
    box-shadow: 0 0 8px rgba(111, 240, 176, 0.6);
}

.chat-muted
{
    padding: 10px 12px;
    font-size: 0.85rem;
    color: var(--ink-dim);
}

.chat-center
{
    text-align: center;
}

.chat-empty
{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--ink-dim);
    text-align: center;
}

/* ===================== notification bell ===================== */

.nav-authed
{
    display: flex;
    align-items: center;
    gap: 12px;
}

.bell-wrap
{
    position: relative;
}

.bell-btn
{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.4);
    color: var(--ink-dim);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bell-btn:hover,
.bell-open
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 18px rgba(125, 230, 255, 0.14);
}

.bell-badge
{
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--grad);
    color: #060a1c;
    font-size: 0.62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(245, 168, 255, 0.5);
}

.bell-panel
{
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-width: 86vw;
    border-radius: 16px;
    border: 1px solid var(--hairline);
    background: rgba(10, 15, 34, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 24px 60px -24px rgba(5, 7, 15, 0.95);
    z-index: 20;
    overflow: hidden;
    animation: menu-in 0.16s ease;
}

.bell-panel-head
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--hairline);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.bell-clear
{
    background: none;
    border: none;
    color: var(--cyan);
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
}

.bell-list
{
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bell-item
{
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.bell-item:hover
{
    background: rgba(125, 230, 255, 0.06);
}

.bell-unread
{
    box-shadow: inset 3px 0 0 var(--cyan);
}

.bell-item-title
{
    font-size: 0.88rem;
}

.bell-unread .bell-item-title
{
    font-weight: 600;
}

.bell-item-body
{
    font-size: 0.78rem;
    color: var(--ink-dim);
}

.bell-item-time
{
    font-size: 0.68rem;
    color: var(--ink-dim);
    opacity: 0.7;
}

.bell-empty
{
    padding: 24px 14px;
    text-align: center;
    color: var(--ink-dim);
    font-size: 0.85rem;
}

@media (max-width: 860px)
{
    :root
    {
        --nav-h: 76px;
    }

    .chat-page
    {
        padding: 8px;
    }

    .chat-shell
    {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .chat-rooms
    {
        border-right: none;
        border-bottom: 1px solid var(--hairline);
        max-height: 30vh;
    }

    .chat-roster
    {
        display: none;
    }

    .nav-avatar-name
    {
        display: none;
    }
}

/* mobile clubhouse dock - bottom glass bar, app views only. app.js stamps
   body[data-zone] on every navigation; desktop never shows it */

.dock
{
    display: none;
}

@media (max-width: 860px)
{
    body[data-zone="app"]
    {
        --page-pad-b: 150px;
        --dock-clear: 70px;
    }

    body[data-zone="app"] .dock
    {
        position: fixed;
        left: 50%;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%);
        z-index: 40;
        display: flex;
        align-items: stretch;
        gap: 2px;
        padding: 7px 9px;
        border-radius: 22px;
        background: var(--glass-bg);
        border: 1px solid var(--hairline);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: 0 18px 50px -18px rgba(5, 7, 15, 0.95), 0 0 30px rgba(125, 230, 255, 0.07);
    }

    .dock-item
    {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        min-width: 56px;
        padding: 7px 8px 6px;
        border-radius: 16px;
        color: var(--ink-dim);
        font-size: 0.58rem;
        font-weight: 650;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        transition: color 0.25s ease, background 0.25s ease;
    }

    .dock-item.active
    {
        color: var(--ink);
        background: rgba(125, 230, 255, 0.08);
        text-shadow: 0 0 14px rgba(125, 230, 255, 0.5);
    }
}

/* ---- voice dock (M5) ---------------------------------------------------- */
/* the live call floats over the sky as its own functional surface (one .glass) */

.chat-voice
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: transparent;
    color: var(--ink-dim);
    font-family: var(--font);
    font-size: 0.74rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.chat-voice:hover
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 16px rgba(125, 230, 255, 0.14);
}

.chat-voice.on
{
    color: #6ff0b0;
    border-color: rgba(111, 240, 176, 0.5);
    box-shadow: 0 0 16px rgba(111, 240, 176, 0.18);
}

/* a call is live in this room and you're not in it - gently pulse to invite */
.chat-voice.ringing
{
    color: var(--cyan);
    border-color: rgba(125, 230, 255, 0.5);
    animation: voice-ring 1.8s ease-in-out infinite;
}

@keyframes voice-ring
{
    0%, 100% { box-shadow: 0 0 0 0 rgba(125, 230, 255, 0.0); }
    50% { box-shadow: 0 0 16px 2px rgba(125, 230, 255, 0.35); }
}

.chat-voice svg { display: block; }

/* "N in voice" badge on a room row in the rail */
.room-voice
{
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.66rem;
    color: var(--cyan);
    background: rgba(125, 230, 255, 0.12);
    vertical-align: middle;
}

.room-voice svg { display: block; }

.voice-dock:empty { display: none; }

.voice-dock
{
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    width: min(460px, calc(100vw - 32px));
    max-height: 76vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(3, 6, 18, 0.55), 0 0 0 1px var(--hairline);
}

.voice-collapsed
{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: auto;
    max-width: min(340px, calc(100vw - 32px));
    gap: 10px;
    padding: 8px 10px 8px 14px;
}

.voice-restore
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--ink);
    font-family: var(--font);
    font-size: 0.86rem;
    cursor: pointer;
}

.voice-head
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.voice-title
{
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.voice-title strong
{
    font-weight: 500;
    font-size: 1.12rem;
    letter-spacing: 0.01em;
}

.voice-sub
{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ink-dim);
    font-size: 0.72rem;
}

.voice-sub svg { opacity: 0.75; }

.voice-pip
{
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--ink-dim);
    flex: none;
}

.voice-pip-live { background: #6ff0b0; box-shadow: 0 0 12px rgba(111, 240, 176, 0.8); }
.voice-pip-connecting,
.voice-pip-reconnecting { background: var(--cyan); animation: conn-blink 1s ease-in-out infinite; }
.voice-pip-error { background: #ff8ba3; box-shadow: 0 0 12px rgba(255, 139, 163, 0.7); }

.voice-collapse,
.voice-restore + .vbtn-sm
{
    background: transparent;
    border: none;
    color: var(--ink-dim);
    cursor: pointer;
}

.voice-collapse { display: inline-flex; padding: 4px; border-radius: 8px; }
.voice-collapse:hover { color: var(--ink); }
.voice-head-tools { display: inline-flex; align-items: center; gap: 2px; flex: none; }

/* theatre / fill-window: the dock takes over the whole tab (a step short of true
   monitor fullscreen). The stage flex-grows and its grid fills the space, so
   multiple streamers tile into a big grid. */
.voice-dock.voice-theatre
{
    position: fixed;
    inset: 0;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    border-radius: 0;
    z-index: 80;
    padding: 16px clamp(16px, 4vw, 48px);
}

.voice-theatre .vstage { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.voice-theatre .vstage-main { flex: 1 1 auto; min-height: 0; grid-auto-rows: 1fr; align-content: stretch; }
.voice-theatre .vstage-main .vtile { min-height: 0; height: 100%; }
.voice-theatre .vstage-strip { flex: none; }
.voice-theatre .vstage-strip .vtile { height: 96px; }

.voice-banner
{
    font-size: 0.74rem;
    color: #ffd7a1;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 190, 120, 0.08);
    border: 1px solid rgba(255, 190, 120, 0.22);
}

/* stage + tiles */

.vstage
{
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
}

.vstage-main
{
    display: grid;
    gap: 8px;
}

.vstage-grid-1 { grid-template-columns: 1fr; }
.vstage-grid-2 { grid-template-columns: repeat(2, 1fr); }
.vstage-grid-4 { grid-template-columns: repeat(2, 1fr); }
.vstage-grid-6 { grid-template-columns: repeat(3, 1fr); }
.vstage-grid-many { grid-template-columns: repeat(3, 1fr); }

.vstage-strip
{
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.vstage-strip .vtile { width: 116px; flex: none; }

.vstage-empty
{
    padding: 28px 12px;
    text-align: center;
    color: var(--ink-dim);
    font-size: 0.82rem;
}

.vtile
{
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(5, 8, 20, 0.6);
    border: 1px solid var(--hairline);
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vtile-screen { grid-column: 1 / -1; }
.vstage-focus .vstage-main .vtile-screen { min-height: 200px; }

.vtile-broken { border-color: rgba(255, 139, 163, 0.4); }

.vtile-video
{
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #04060f;
    display: block;
}

.vtile-screen .vtile-video { object-fit: contain; }

.vavatar
{
    width: 62px;
    height: 62px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--ink);
    background: rgba(20, 32, 74, 0.7);
    border: 2px solid var(--hairline);
    margin: 18px 0 22px;
}

.vavatar.talking
{
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--cyan), 0 0 22px rgba(125, 230, 255, 0.55);
}

.vtile-label
{
    position: absolute;
    left: 6px;
    bottom: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 8px;
    background: linear-gradient(0deg, rgba(3, 6, 18, 0.72), rgba(3, 6, 18, 0.2));
    font-size: 0.72rem;
    pointer-events: none;
}

.vtile-name
{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.vtile-name small { color: var(--ink-dim); }

.vchip
{
    display: inline-flex;
    align-items: center;
    flex: none;
    color: var(--ink-dim);
}

.vchip-live { color: #6ff0b0; }
.vchip-off,
.vchip-muted { color: #ff8ba3; }
.vchip-screen { color: var(--cyan); }

.vq
{
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: none;
    margin-left: auto;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.64rem;
    letter-spacing: 0.02em;
}

.vq-fair { color: #ffd7a1; background: rgba(255, 190, 120, 0.12); }
.vq-relay { color: var(--cyan); background: rgba(125, 230, 255, 0.12); }
.vq-poor { color: #ff8ba3; background: rgba(255, 139, 163, 0.14); }

.vtile-tools
{
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.15s;
}

.vtile:hover .vtile-tools,
.vtile-voice .vtile-tools { opacity: 1; }

.vpin
{
    display: inline-flex;
    padding: 5px;
    border-radius: 8px;
    border: none;
    background: rgba(3, 6, 18, 0.6);
    color: var(--ink-dim);
    cursor: pointer;
}

.vpin:hover { color: var(--ink); }
.vpin.on { color: var(--cyan); box-shadow: 0 0 12px rgba(125, 230, 255, 0.3); }

.vfull
{
    display: inline-flex;
    padding: 5px;
    border-radius: 8px;
    border: none;
    background: rgba(3, 6, 18, 0.6);
    color: var(--ink-dim);
    cursor: pointer;
}

.vfull:hover { color: var(--ink); }

/* native fullscreen: the tile fills the screen, video letterboxed, tools visible */
.vtile:fullscreen
{
    width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
    background: #000;
}

.vtile:fullscreen .vtile-video { object-fit: contain; }
.vtile:fullscreen .vtile-tools { opacity: 1; }

.vvol
{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(3, 6, 18, 0.6);
    color: var(--ink-dim);
}

.vvol input
{
    width: 66px;
    accent-color: var(--cyan);
    cursor: pointer;
}

/* controls */

.voice-controls
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding-top: 2px;
}

.vbtn
{
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 58px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.4);
    color: var(--ink);
    font-family: var(--font);
    font-size: 0.64rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, color 0.15s, background 0.15s;
}

.vbtn:hover { border-color: rgba(125, 230, 255, 0.4); box-shadow: 0 0 16px rgba(125, 230, 255, 0.12); }
.vbtn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.vbtn svg { display: block; }

.vbtn-on { color: var(--ink); }
.vbtn-off { color: #ff8ba3; border-color: rgba(255, 139, 163, 0.4); background: rgba(255, 139, 163, 0.08); }
.vbtn-active { color: #05070f; background: var(--grad); border-color: transparent; }
.vbtn-danger { color: #ff8ba3; }
.vbtn-danger:hover { color: #ffb3c4; border-color: rgba(255, 120, 150, 0.5); box-shadow: 0 0 16px rgba(255, 120, 150, 0.16); }
.vbtn-sm { flex-direction: row; min-width: 0; padding: 7px 9px; }

@media (max-width: 620px)
{
    .voice-dock
    {
        right: 8px;
        left: 8px;
        bottom: 8px;
        width: auto;
    }

    .voice-collapsed { margin-left: auto; }
}

/* M6 - projects portfolio */

/* hover stats - CSS tooltip engine; attach data-tip to any HTML element */

[data-tip]
{
    position: relative;
}

[data-tip]::after
{
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translate(-50%, 3px);
    padding: 5px 11px;
    border-radius: 9px;
    border: 1px solid var(--hairline);
    background: rgba(8, 12, 30, 0.95);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: none;
    white-space: nowrap;
    box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.7), 0 0 18px -6px rgba(125, 230, 255, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
    z-index: 90;
}

[data-tip]::before
{
    content: '';
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: rgba(8, 12, 30, 0.95);
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s;
    pointer-events: none;
    z-index: 91;
}

[data-tip]:hover::after,
[data-tip]:hover::before
{
    opacity: 1;
    visibility: visible;
}

[data-tip]:hover::after
{
    transform: translate(-50%, 0);
}

.projects-empty
{
    color: var(--ink-dim);
    text-align: center;
    padding: 40px 0;
}

/* compact header: identity left, clickable stat chips right */

.proj-head
{
    max-width: 1080px;
    margin: 0 auto 30px;
    padding: 8px 0 18px;
    border-bottom: 1px solid var(--hairline);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

.proj-me
{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.proj-me img
{
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(125, 230, 255, 0.25);
}

.proj-me:hover span
{
    color: var(--cyan);
}

.proj-me-title
{
    font-size: 1.3rem;
    font-weight: 250;
}

.stat-chips
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.stat-chip
{
    font: inherit;
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    color: var(--ink);
    background: none;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-chip:hover,
.stat-chip.active
{
    border-color: rgba(125, 230, 255, 0.55);
    box-shadow: 0 0 14px rgba(125, 230, 255, 0.18);
}

.stat-chip-num
{
    font-size: 0.95rem;
    font-weight: 350;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stat-chip-label
{
    color: var(--ink-dim);
    font-size: 0.66rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.dot
{
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ink-dim);
    flex: none;
}

.dot-pass { background: #8ff0c0; box-shadow: 0 0 7px rgba(143, 240, 192, 0.7); }
.dot-fail { background: #ff8ba3; box-shadow: 0 0 7px rgba(255, 139, 163, 0.7); }

/* CI status pill - plain words, colored dot */

.ci-pill
{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    align-self: flex-start;
}

.ci-pill .dot { width: 6px; height: 6px; }

.ci-clear { color: #8ff0c0; border-color: rgba(120, 240, 190, 0.35); }
.ci-clear .dot { background: #8ff0c0; box-shadow: 0 0 7px rgba(143, 240, 192, 0.7); }
.ci-storm { color: #ff8ba3; border-color: rgba(255, 139, 163, 0.4); }
.ci-storm .dot { background: #ff8ba3; box-shadow: 0 0 7px rgba(255, 139, 163, 0.7); }
.ci-drifting { color: var(--cyan); border-color: rgba(125, 230, 255, 0.35); }
.ci-drifting .dot { background: var(--cyan); box-shadow: 0 0 7px rgba(125, 230, 255, 0.7); }
.ci-haze { color: var(--ink-dim); }
.ci-haze .dot { background: var(--ink-dim); }
.ci-quiet { color: var(--ink-dim); }
.ci-quiet .dot { background: var(--ink-dim); }

/* stat panels - expand under the header when a chip is clicked */

.stat-panel
{
    max-width: 1080px;
    margin: 0 auto 30px;
    padding: 20px 24px 24px;
    border: 1px solid var(--hairline);
    border-radius: 16px;
    background: rgba(10, 16, 38, 0.28);
}

.stat-panel-head
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.stat-panel-head h2
{
    margin: 0;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.stat-panel-close
{
    font: inherit;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--ink-dim);
    background: none;
    border: 0;
    padding: 2px 6px;
    cursor: pointer;
}

.stat-panel-close:hover
{
    color: var(--ink);
}

.stat-panel-empty
{
    margin: 0;
    color: var(--ink-dim);
    font-size: 0.9rem;
}

/* commit heatmap: repo x week */

/* padding gives the hover tooltips + cell pop room INSIDE the scroll clip,
   so the bottom row can't spawn a flashing scrollbar */
.heatmap-scroll
{
    overflow-x: auto;
    padding: 36px 2px 10px;
    margin-top: -28px;
}

.heatmap
{
    min-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.heat-row
{
    display: grid;
    grid-template-columns: minmax(110px, 150px) 1fr 52px;
    align-items: center;
    gap: 12px;
}

.heat-total
{
    padding-bottom: 9px;
    margin-bottom: 5px;
    border-bottom: 1px solid var(--hairline);
}

.heat-label
{
    color: var(--ink-dim);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.heat-cells
{
    display: grid;
    grid-template-columns: repeat(52, 1fr);
    gap: 2px;
}

.heat-cells i
{
    aspect-ratio: 1 / 1;
    border-radius: 2.5px;
    background: hsla(var(--hue), 80%, 65%, var(--a));
    box-shadow: inset 0 0 0 1px rgba(160, 180, 255, 0.07);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.heat-cells i:hover
{
    transform: scale(1.22);
    box-shadow: 0 0 8px hsla(var(--hue), 85%, 65%, 0.6), inset 0 0 0 1px rgba(238, 241, 255, 0.35);
}

.heat-sum
{
    color: var(--ink-dim);
    font-size: 0.75rem;
    text-align: right;
}

/* rankings (stars / downloads / languages / ci breakdown) */

.rank
{
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rank-row,
.ci-row
{
    font: inherit;
    display: grid;
    grid-template-columns: minmax(110px, 170px) 1fr 52px;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    background: none;
    border: 0;
    border-radius: 9px;
    padding: 6px 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.rank-row:hover,
.ci-row:hover
{
    background: rgba(125, 230, 255, 0.05);
}

.rank-label
{
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-bar
{
    height: 8px;
    border-radius: 999px;
    background: rgba(160, 180, 255, 0.08);
    overflow: hidden;
}

.rank-bar i
{
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, hsla(var(--hue), 85%, 70%, 0.9), hsla(var(--hue), 85%, 70%, 0.4));
    box-shadow: 0 0 10px hsla(var(--hue), 85%, 65%, 0.35);
}

.rank-value
{
    color: var(--ink-dim);
    font-size: 0.78rem;
    text-align: right;
}

.rank-ci .ci-row
{
    grid-template-columns: 14px 1fr 52px;
}

.ci-row-label
{
    font-size: 0.88rem;
}

/* the deck - search / sort / filter controls */

.deck
{
    max-width: 1080px;
    margin: 0 auto 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 22px;
}

/* projects: search + view toggle share the top line; each labeled row
   (sort / filter / presets) takes its own full width below */
.projects .deck-search
{
    max-width: 460px;
}

.deck-vault
{
    margin-bottom: 28px;
    justify-content: space-between;
}

.deck-vault .deck-search
{
    max-width: none;
}

.deck-search
{
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 200px;
    flex: 1 1 200px;
    max-width: 320px;
    border-bottom: 1px solid var(--hairline);
    padding: 6px 2px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.deck-search:focus-within
{
    border-color: rgba(125, 230, 255, 0.55);
    box-shadow: 0 14px 18px -16px rgba(125, 230, 255, 0.45);
}

.deck-search svg
{
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--ink-dim);
    stroke-width: 1.8;
    stroke-linecap: round;
    flex: none;
}

.deck-search input
{
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: none;
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
}

.deck-search input::placeholder
{
    color: var(--ink-dim);
}

.deck-sort,
.deck-filters
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

/* labeled deck rows (projects) - the label column keeps groups scannable
   on desktop and stacks above its pills on small screens */
.deck-row
{
    flex-basis: 100%;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.deck-label
{
    flex: none;
    min-width: 54px;
    padding-top: 6px;
    color: var(--ink-dim);
    font-size: 0.68rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.deck-pills
{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

@media (max-width: 720px)
{
    .deck-row
    {
        flex-direction: column;
        gap: 8px;
    }

    .deck-label
    {
        min-width: 0;
        padding-top: 0;
    }
}

.deck-views
{
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
}

.deck-view
{
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 30px;
    color: var(--ink-dim);
    background: none;
    border: 1px solid var(--hairline);
    border-radius: 9px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.deck-view svg
{
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.deck-view:hover
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.4);
}

.deck-view.active
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.65);
    box-shadow: 0 0 12px rgba(125, 230, 255, 0.2);
}


.deck-pill
{
    font: inherit;
    font-size: 0.74rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-dim);
    background: none;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 4px 13px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.deck-pill:hover
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.4);
}

.deck-pill.active
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.65);
    box-shadow: 0 0 14px rgba(125, 230, 255, 0.22), inset 0 0 10px rgba(125, 230, 255, 0.07);
}

.deck-lang
{
    border-color: hsla(var(--hue), 60%, 70%, 0.3);
}

.deck-lang.active
{
    color: hsl(var(--hue), 90%, 78%);
    border-color: hsla(var(--hue), 80%, 70%, 0.7);
    box-shadow: 0 0 14px hsla(var(--hue), 85%, 65%, 0.25), inset 0 0 10px hsla(var(--hue), 85%, 65%, 0.08);
}

.deck-lang i
{
    font-style: normal;
    margin-left: 6px;
    opacity: 0.55;
}

/* project cards - uniform summaries, the card itself routes to the detail page */

.proj-grid
{
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.proj
{
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 22px 18px;
    border-radius: 18px;
    border: 1px solid hsla(var(--hue), 55%, 72%, 0.16);
    background:
        radial-gradient(120% 90% at 12% 0%, hsla(var(--hue), 80%, 70%, 0.07), transparent 55%),
        rgba(10, 16, 38, 0.22);
    box-shadow: 0 12px 30px -26px rgba(0, 0, 0, 0.65);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.proj:hover
{
    transform: translateY(-3px);
    border-color: hsla(var(--hue), 75%, 72%, 0.42);
    box-shadow:
        0 18px 44px -22px hsla(var(--hue), 80%, 60%, 0.4),
        0 0 28px -6px hsla(var(--hue), 85%, 65%, 0.14);
}

/* 3d tilt (grid only) - the page writes --rx/--ry during mousemove, but they
   only apply while hovered, so mouse-out settles back on the base transition */
@media (hover: hover) and (prefers-reduced-motion: no-preference)
{
    .proj-grid:not(.view-list) .proj:hover
    {
        transform: perspective(750px) translate3d(0, -3px, 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
        transition: transform 0.08s linear, border-color 0.3s ease, box-shadow 0.3s ease;
    }
}

/* a wrapping repo name must never re-center the icon or the CI pill - the
   icon pins top-left, the pill rides the icon's vertical center, and the id
   block only centers itself while it fits beside the icon */
.proj-top
{
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.proj-top .ci-pill
{
    flex: none;
    margin-top: 12px;
}

.proj-icon
{
    width: 44px;
    height: 44px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid hsla(var(--hue), 60%, 72%, 0.28);
    background: hsla(var(--hue), 70%, 62%, 0.09);
    box-shadow: inset 0 0 16px hsla(var(--hue), 80%, 70%, 0.1);
    overflow: hidden;
}

.proj-icon img
{
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.proj-icon-letter
{
    font-size: 1.3rem;
    font-weight: 250;
    color: hsl(var(--hue), 90%, 80%);
    text-shadow: 0 0 14px hsla(var(--hue), 90%, 70%, 0.6);
}

.proj-id
{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
}

.proj-name
{
    font-size: 1.18rem;
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.proj:hover .proj-name
{
    color: hsl(var(--hue), 90%, 78%);
}

.proj-sub
{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--ink-dim);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* floating corner pin - status glyph, not a label */
.proj-pin-badge
{
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: inline-flex;
    color: hsl(var(--hue), 85%, 76%);
    opacity: 0.85;
    filter: drop-shadow(0 0 6px hsla(var(--hue), 90%, 70%, 0.5));
}

.proj-pin-badge svg
{
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.proj-lang
{
    color: hsl(var(--hue), 75%, 74%);
}

.proj-desc
{
    margin: 0;
    color: var(--ink-dim);
    font-size: 0.93rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.proj-topics
{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 23px;
    overflow: hidden;
}

.proj-topic
{
    font-size: 0.66rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-dim);
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    white-space: nowrap;
}

.proj-foot
{
    margin-top: auto;
    padding-top: 11px;
    border-top: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.proj-foot-spark
{
    display: block;
}

.proj-foot-spark .proj-spark
{
    display: block;
    width: 100%;
    height: 22px;
}

.proj-spark
{
    color: hsl(var(--hue), 85%, 72%);
    filter: drop-shadow(0 0 5px hsla(var(--hue), 85%, 65%, 0.4));
}

.proj-spark .spark-line
{
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.proj-spark .spark-fill
{
    fill: currentColor;
    opacity: 0.09;
    stroke: none;
}

.proj-foot-meta
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    color: var(--ink-dim);
    font-size: 0.73rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.proj-foot-rel
{
    color: hsl(var(--hue), 80%, 74%);
}

.proj-more
{
    margin-left: auto;
    transition: color 0.2s ease;
}

.proj:hover .proj-more
{
    color: hsl(var(--hue), 90%, 78%);
}

/* list view - strict three-column rows (identity / blurb / numbers) so
   every card lands the same height and the columns line up down the page.
   Sparklines stay a grid-view thing; they made every row a different shape */

.proj-grid.view-list
{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.view-list .proj
{
    display: grid;
    grid-template-columns: minmax(230px, 320px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 24px;
    padding: 13px 22px;
}

.view-list .proj-top
{
    min-width: 0;
}

.view-list .proj-name
{
    display: block;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-list .proj-desc
{
    -webkit-line-clamp: 1;
    font-size: 0.9rem;
}

.view-list .proj-topics,
.view-list .proj-foot-spark
{
    display: none;
}

.view-list .proj-foot
{
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.view-list .proj-foot-meta
{
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 6px 16px;
}

@media (max-width: 760px)
{
    .view-list .proj
    {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .view-list .proj-foot-meta
    {
        flex-wrap: wrap;
        white-space: normal;
    }
}

/* project detail page */

.pd
{
    max-width: 920px;
    /* same top budget as .page-head so detail pages line up with list views */
    margin: 64px auto 0;
}

.pd-back
{
    display: inline-block;
    margin-bottom: 20px;
    color: var(--ink-dim);
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.pd-back:hover
{
    color: var(--cyan);
}

.pd-hero
{
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 24px;
}

.pd-icon
{
    width: 96px;
    height: 96px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    border: 1px solid hsla(var(--hue), 60%, 72%, 0.3);
    background: hsla(var(--hue), 70%, 62%, 0.09);
    box-shadow: inset 0 0 28px hsla(var(--hue), 80%, 70%, 0.12), 0 0 36px -8px hsla(var(--hue), 85%, 65%, 0.35);
    overflow: hidden;
}

.pd-icon img
{
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.pd-icon-letter
{
    font-size: 2.6rem;
    font-weight: 220;
    color: hsl(var(--hue), 90%, 80%);
    text-shadow: 0 0 18px hsla(var(--hue), 90%, 70%, 0.6);
}

.pd-hero-main
{
    flex: 1;
    min-width: 0;
}

.pd-name
{
    margin: 0;
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    font-weight: 200;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.pd-hero-sub
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 8px;
    color: var(--ink-dim);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pd-desc
{
    margin: 14px 0 0;
    color: var(--ink-dim);
    font-size: 1.02rem;
    line-height: 1.6;
    max-width: 640px;
}

.pd .proj-topics
{
    margin-top: 12px;
    max-height: none;
    overflow: visible;
}

.pd-actions
{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.pd-flag
{
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-dim);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
}

.pd-stats
{
    display: flex;
    flex-wrap: wrap;
    gap: 14px 44px;
    padding: 16px 4px;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 30px;
}

.pd-stat
{
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pd-stat-num
{
    font-size: 1.55rem;
    font-weight: 220;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pd-stat-label
{
    color: var(--ink-dim);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* section tabs - hue-keyed pills, body swaps with a soft entrance */

.pd-tabs
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.pd-tab
{
    font: inherit;
    font-size: 0.74rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-dim);
    background: none;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 6px 16px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-tab:hover
{
    color: var(--ink);
    border-color: hsla(var(--hue), 70%, 70%, 0.4);
}

.pd-tab.active
{
    color: hsl(var(--hue), 90%, 78%);
    border-color: hsla(var(--hue), 80%, 70%, 0.65);
    box-shadow: 0 0 14px hsla(var(--hue), 85%, 65%, 0.22), inset 0 0 10px hsla(var(--hue), 85%, 65%, 0.07);
}

.pd-tab i
{
    font-style: normal;
    margin-left: 7px;
    opacity: 0.6;
}

.pd-tab-body
{
    animation: vault-swap 0.22s ease both;
}

/* overview glance cards - latest release / ci verdict / commit cadence */

.pd-glance-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 34px;
}

.pd-glance
{
    font: inherit;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    color: var(--ink);
    background: none;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-glance:hover
{
    border-color: hsla(var(--hue), 80%, 70%, 0.45);
    box-shadow: 0 0 18px -4px hsla(var(--hue), 85%, 65%, 0.2);
}

.pd-glance-static
{
    cursor: default;
}

.pd-glance-static:hover
{
    border-color: var(--hairline);
    box-shadow: none;
}

.pd-glance-label
{
    color: var(--ink-dim);
    font-size: 0.64rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.pd-glance-value
{
    font-size: 1.3rem;
    font-weight: 260;
    color: hsl(var(--hue), 85%, 76%);
    overflow-wrap: anywhere;
}

.pd-glance-unit
{
    font-size: 0.78rem;
    color: var(--ink-dim);
    margin-left: 4px;
}

.pd-glance-ci
{
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pd-glance-meta
{
    color: var(--ink-dim);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pd-glance-go
{
    position: absolute;
    top: 14px;
    right: 16px;
    color: var(--ink-dim);
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.pd-glance:hover .pd-glance-go
{
    color: hsl(var(--hue), 90%, 78%);
}

@media (prefers-reduced-motion: reduce)
{
    .pd-tab-body { animation: none; }
}

.pd-section
{
    margin-bottom: 36px;
}

.pd-section h2
{
    margin: 0 0 12px;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.pd-section h2 span
{
    margin-left: 8px;
    opacity: 0.7;
    text-transform: none;
    letter-spacing: 0.05em;
}

.pd-bars
{
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 84px;
    color: hsl(var(--hue), 85%, 70%);
}

.pd-bars i
{
    flex: 1 1 0;
    height: var(--h, 2%);
    min-height: 2px;
    background: currentColor;
    opacity: 0.85;
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 6px hsla(var(--hue), 85%, 65%, 0.25);
    transition: opacity 0.12s ease;
}

.pd-bars i:hover
{
    opacity: 1;
}

.pd-bars i.bar-zero
{
    opacity: 0.15;
    height: 2px;
}

.pd-bars i.bar-zero:hover
{
    opacity: 0.4;
}

.pd-releases,
.pd-runs
{
    list-style: none;
    margin: 0;
    padding: 0;
}

.pd-release
{
    padding: 15px 0;
    border-bottom: 1px solid var(--hairline);
}

.pd-release:first-child
{
    border-top: 1px solid var(--hairline);
}

/* the newest release gets its own lit surface at the top of the list */
.pd-release-latest,
.pd-release-latest:first-child
{
    border: 1px solid hsla(var(--hue), 60%, 70%, 0.3);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 14px;
    background:
        radial-gradient(120% 100% at 10% 0%, hsla(var(--hue), 80%, 70%, 0.06), transparent 60%),
        rgba(10, 16, 38, 0.25);
    box-shadow: 0 0 26px -10px hsla(var(--hue), 85%, 65%, 0.25);
}

.pd-flag-latest
{
    color: hsl(var(--hue), 90%, 78%);
    border-color: hsla(var(--hue), 80%, 70%, 0.5);
}

.pd-release-head
{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
}

.pd-release-tag
{
    font-size: 1.1rem;
    color: hsl(var(--hue), 85%, 75%);
}

.pd-release-name
{
    color: var(--ink);
    font-size: 0.95rem;
}

.pd-release-meta
{
    color: var(--ink-dim);
    font-size: 0.73rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pd-assets
{
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 11px;
}

/* assets: label column + a grid of uniform download tiles per platform */

.pd-asset-group
{
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: start;
    gap: 10px;
}

.pd-asset-os
{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-top: 12px;
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.pd-os-icon
{
    width: 15px;
    height: 15px;
    flex: none;
    fill: currentColor;
    opacity: 0.9;
}

.pd-asset-list
{
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px;
}

.pd-asset
{
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 9px 38px 9px 14px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-asset:hover
{
    border-color: hsla(var(--hue), 80%, 70%, 0.5);
    box-shadow: 0 0 14px hsla(var(--hue), 85%, 65%, 0.16);
}

.pd-asset-name
{
    color: var(--ink);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-asset-meta
{
    color: var(--ink-dim);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-asset-dl
{
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--ink-dim);
    transition: color 0.2s ease;
}

.pd-asset:hover .pd-asset-dl
{
    color: hsl(var(--hue), 90%, 78%);
}

@media (max-width: 620px)
{
    .pd-asset-group
    {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .pd-asset-os
    {
        padding-top: 0;
    }
}

.pd-hash
{
    margin-left: 8px;
    color: var(--ink-dim);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    text-transform: none;
    border-bottom: 1px dotted rgba(160, 180, 255, 0.35);
    cursor: help;
}

.pd-changelog
{
    margin-top: 11px;
}

.pd-changelog summary
{
    display: inline-block;
    cursor: pointer;
    color: var(--ink-dim);
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 3px 11px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    transition: color 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

.pd-changelog summary::marker,
.pd-changelog summary::-webkit-details-marker
{
    content: '';
    display: none;
}

.pd-changelog summary:hover,
.pd-changelog[open] summary
{
    color: hsl(var(--hue), 90%, 78%);
    border-color: hsla(var(--hue), 80%, 70%, 0.5);
}

.pd-changelog pre
{
    margin: 12px 0 0;
    padding: 14px 16px;
    border-left: 2px solid hsla(var(--hue), 70%, 70%, 0.35);
    background: rgba(10, 16, 38, 0.3);
    border-radius: 0 12px 12px 0;
    color: var(--ink-dim);
    font-family: var(--font);
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 320px;
    overflow-y: auto;
}

.pd-run
{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    padding: 8px 0;
}

.pd-run .dot
{
    align-self: center;
}

.pd-run a
{
    color: var(--ink);
    font-size: 0.92rem;
}

.pd-run a:hover
{
    color: hsl(var(--hue), 90%, 78%);
}

.pd-run-meta
{
    color: var(--ink-dim);
    font-size: 0.71rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

@media (max-width: 640px)
{
    .proj-grid { grid-template-columns: 1fr; }
    .heat-row,
    .rank-row { grid-template-columns: minmax(80px, 100px) 1fr 44px; gap: 8px; }
    .pd-hero { flex-direction: column; gap: 16px; }
    .pd-stats { gap: 12px 26px; }
}

/* pager - shared by projects + vault sections */

.pager
{
    max-width: 1080px;
    margin: 26px auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
}

.pager-btn
{
    font: inherit;
    font-size: 0.8rem;
    min-width: 34px;
    color: var(--ink-dim);
    background: none;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 5px 11px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pager-btn:hover
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.4);
}

.pager-btn.active
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.65);
    box-shadow: 0 0 12px rgba(125, 230, 255, 0.2);
}

.pager-gap
{
    color: var(--ink-dim);
    letter-spacing: 2px;
}
/* M6 - vault releases (hue-keyed cards, latest build per project) */

.vault-section-head
{
    max-width: 860px;
    margin: 40px auto 14px;
    padding: 0 4px;
}

.vault-section-head h2
{
    margin: 0;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.vault-section-head p
{
    margin: 6px 0 0;
    color: var(--ink-dim);
    font-size: 0.92rem;
}

.release-list
{
    list-style: none;
    margin: 0 auto;
    max-width: 1080px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* keyed per tab, so switching tabs replays a soft entrance */
    animation: vault-swap 0.22s ease both;
}

@keyframes vault-swap
{
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce)
{
    .release-list { animation: none; }
}

.release-item
{
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid hsla(var(--hue), 55%, 72%, 0.16);
    background:
        radial-gradient(120% 90% at 10% 0%, hsla(var(--hue), 80%, 70%, 0.06), transparent 55%),
        rgba(10, 16, 38, 0.22);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.release-item:hover
{
    border-color: hsla(var(--hue), 75%, 72%, 0.35);
    box-shadow: 0 0 26px -8px hsla(var(--hue), 85%, 65%, 0.2);
}

.release-head
{
    display: flex;
    align-items: center;
    gap: 14px;
}

.release-icon
{
    width: 44px;
    height: 44px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid hsla(var(--hue), 60%, 72%, 0.28);
    background: hsla(var(--hue), 70%, 62%, 0.09);
    box-shadow: inset 0 0 16px hsla(var(--hue), 80%, 70%, 0.1);
    overflow: hidden;
}

.release-icon img
{
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.release-icon-letter
{
    font-size: 1.3rem;
    font-weight: 250;
    color: hsl(var(--hue), 90%, 80%);
    text-shadow: 0 0 14px hsla(var(--hue), 90%, 70%, 0.6);
}

.release-id
{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.release-name
{
    font-size: 1.3rem;
    font-weight: 280;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.release-tag
{
    color: hsl(var(--hue), 85%, 75%);
}

.release-pre
{
    font-size: 0.64rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--pink);
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(245, 168, 255, 0.35);
    vertical-align: middle;
}

.release-meta
{
    color: var(--ink-dim);
    font-size: 0.73rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.release-blurb
{
    margin: 0;
    color: var(--ink-dim);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* the vault tab bar - anchored to the shelf by a hairline so it reads as
   content tabs, never as floating window chrome */

.vault-tabs
{
    max-width: 1080px;
    margin: 0 auto 22px;
    display: flex;
    gap: 26px;
    border-bottom: 1px solid var(--hairline);
}

.vault-tab
{
    position: relative;
    padding: 6px 2px 14px;
    border: 0;
    background: none;
    font-family: var(--font);
    font-size: 1.12rem;
    font-weight: 280;
    letter-spacing: 0.02em;
    color: var(--ink-dim);
    cursor: pointer;
    transition: color 0.25s ease;
}

.vault-tab i
{
    font-style: normal;
    margin-left: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: var(--ink-dim);
    vertical-align: 3px;
}

.vault-tab::after
{
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad);
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.vault-tab:hover
{
    color: var(--ink);
}

.vault-tab-on
{
    color: var(--ink);
}

.vault-tab-on::after
{
    opacity: 1;
    transform: none;
    box-shadow: 0 0 14px rgba(125, 230, 255, 0.45);
}

/* fresh builds - one aligned row per asset instead of floating pills */

.asset-table
{
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--hairline);
    padding-top: 4px;
}

/* each row is its own grid, so every non-fluid column is a fixed width -
   that is what keeps the type/size/hash/count/button rails aligned across
   rows. the grab counter gets its own fixed cell so label width never
   nudges the button */
.asset-row
{
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 64px 78px 108px 44px auto;
    align-items: center;
    gap: 6px 14px;
    padding: 10px 4px;
}

.asset-row + .asset-row
{
    border-top: 1px solid rgba(160, 180, 255, 0.08);
}

.asset-os
{
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: hsl(var(--hue), 70%, 78%);
    white-space: nowrap;
}

.asset-name
{
    min-width: 0;
    font-size: 0.88rem;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-row .chip
{
    margin-left: 0;
    justify-self: start;
    min-width: 52px;
    text-align: center;
}

.asset-type
{
    color: hsl(var(--hue), 60%, 80%);
    border-color: hsla(var(--hue), 60%, 72%, 0.3);
}

.asset-size
{
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--ink-dim);
    white-space: nowrap;
    text-align: right;
}

.asset-nohash
{
    color: var(--ink-dim);
    text-align: center;
}

.asset-grabs
{
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--ink-dim);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.asset-grab
{
    justify-self: end;
}

/* collapsible changelog */

.log-toggle
{
    margin-left: auto;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: none;
    font-family: var(--font);
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    color: var(--ink-dim);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.log-toggle svg
{
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

.log-toggle:hover,
.log-toggle-on
{
    color: var(--ink);
    border-color: rgba(125, 230, 255, 0.45);
    box-shadow: 0 0 14px rgba(125, 230, 255, 0.12);
}

.log-toggle-on svg
{
    transform: rotate(180deg);
}

.release-log
{
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: rgba(8, 12, 30, 0.4);
    padding: 2px 18px;
    max-height: 420px;
    overflow-y: auto;
    animation: vault-swap 0.22s ease both;
}

/* shared uploads ride the same card as builds, in a compact row */

.vault-file
{
    gap: 14px;
}

.vault-file-row
{
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.vault-file .release-id
{
    gap: 4px;
}

.vault-file .release-name
{
    font-size: 1.15rem;
}

.vault-file .release-blurb
{
    font-size: 0.9rem;
}

.vault-file-actions
{
    margin-left: auto;
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vault-file .btn
{
    flex: none;
}

@media (max-width: 620px)
{
    .asset-row
    {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 12px;
    }

    .asset-os,
    .asset-name
    {
        width: 100%;
    }

    .asset-name
    {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .asset-size { text-align: left; }
    .asset-grab { margin-left: auto; }

    .vault-file-row { flex-wrap: wrap; }

    .vault-file-actions
    {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .vault-tabs { gap: 18px; }
    .vault-tab { font-size: 1rem; }
}
/* M6 - github ops (admin) */

.ops-page .page-head p
{
    letter-spacing: 0.04em;
}

.ops-actions
{
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.ops-empty
{
    color: var(--ink-dim);
    text-align: center;
    padding: 20px 0;
}

.ops-section
{
    max-width: 1020px;
    margin: 0 auto 46px;
}

.ops-section-head
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
    padding: 0 4px;
}

.ops-section-head h2
{
    margin: 0;
    font-size: 1.1rem;
    font-weight: 340;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.ops-section-head span
{
    color: var(--ink-dim);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}

.ops-table-wrap
{
    overflow-x: auto;
}

.ops-table
{
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.ops-table th
{
    text-align: left;
    font-weight: 400;
    color: var(--ink-dim);
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 8px 10px;
    border-bottom: 1px solid var(--hairline);
}

.ops-table td
{
    padding: 10px;
    border-bottom: 1px solid var(--hairline);
    white-space: nowrap;
}

.ops-table td:first-child
{
    white-space: normal;
    overflow-wrap: anywhere;
}

.ops-dim
{
    opacity: 0.5;
}

.ops-flag
{
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-dim);
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
}

.ops-flag-bot
{
    color: var(--violet);
    border-color: rgba(167, 139, 250, 0.4);
}

.ops-toggle
{
    font: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-dim);
    background: none;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 4px 12px;
    cursor: pointer;
}

.ops-toggle.on
{
    color: #8ff0c0;
    border-color: rgba(120, 240, 190, 0.4);
    box-shadow: 0 0 12px rgba(120, 240, 190, 0.12);
}

.ops-toggle:hover
{
    border-color: rgba(125, 230, 255, 0.4);
}

/* pinned order strip - drag chips to reorder; #1 leads /projects */

.ops-pin-strip
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 4px 16px;
}

.ops-pin-strip-label
{
    color: var(--ink-dim);
    font-size: 0.68rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    margin-right: 4px;
}

.ops-pin-chip
{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    color: var(--ink);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 5px 14px;
    cursor: grab;
    user-select: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ops-pin-chip i
{
    font-style: normal;
    color: var(--cyan);
    font-size: 0.7rem;
}

.ops-pin-chip:hover
{
    border-color: rgba(125, 230, 255, 0.4);
}

.ops-pin-chip.dragging
{
    opacity: 0.35;
    cursor: grabbing;
}

.ops-pin-chip.drop-mark
{
    border-color: rgba(125, 230, 255, 0.75);
    box-shadow: 0 0 14px rgba(125, 230, 255, 0.25);
}

.ops-pin-strip-hint
{
    color: var(--ink-dim);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.ops-list
{
    list-style: none;
    margin: 0;
    padding: 0;
}

.ops-row
{
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--hairline);
}

.ops-row-title
{
    color: var(--ink);
    font-size: 0.95rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ops-row-meta
{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-dim);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ops-failure
{
    background: linear-gradient(90deg, rgba(255, 139, 163, 0.08), transparent 70%);
}

.ops-dependabot .ops-row-title
{
    color: var(--ink-dim);
}

.ops-conclusion { color: var(--ink-dim); }
.ops-conclusion.c-success { color: #8ff0c0; }
.ops-conclusion.c-failure { color: #ff8ba3; }
.ops-conclusion.c-in_progress, .ops-conclusion.c-queued { color: var(--cyan); }

/* the verify dialog anchors at the toggle that was clicked. The overlay is
   absolute (not fixed) on purpose: the page rise-in transform makes ancestors
   containing blocks, which silently re-roots position:fixed. */

.ops-page
{
    position: relative;
}

.ops-modal
{
    position: absolute;
    inset: 0;
    z-index: 60;
    background: rgba(5, 7, 15, 0.55);
    animation: ops-modal-in 0.15s ease both;
}

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

.ops-stepup
{
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(460px, calc(100% - 32px));
    padding: 24px 26px;
    border-radius: 18px;
    box-shadow:
        0 30px 80px -24px rgba(0, 0, 0, 0.7),
        0 0 44px -12px rgba(125, 230, 255, 0.18);
    animation: ops-dialog-in 0.15s ease both;
}

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

@media (prefers-reduced-motion: reduce)
{
    .ops-modal,
    .ops-stepup { animation: none; }
}

.ops-stepup-title
{
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 320;
}

.ops-stepup-hint
{
    margin: 0 0 14px;
    color: var(--ink-dim);
    font-size: 0.86rem;
    line-height: 1.5;
}

.ops-stepup-row
{
    display: flex;
    gap: 10px;
}

.ops-stepup-row input
{
    flex: 1;
    min-width: 0;
    font: inherit;
    color: var(--ink);
    background: rgba(8, 12, 30, 0.55);
    border: 1px solid var(--hairline);
    border-radius: 11px;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ops-stepup-row input:focus
{
    border-color: rgba(125, 230, 255, 0.55);
    box-shadow: 0 0 14px rgba(125, 230, 255, 0.15);
}

.ops-stepup-row input::placeholder
{
    color: var(--ink-dim);
}

/* Chrome autofill paints inputs yellow; force the dark surface back */
.ops-stepup-row input:-webkit-autofill,
.ops-stepup-row input:-webkit-autofill:hover,
.ops-stepup-row input:-webkit-autofill:focus
{
    -webkit-box-shadow: 0 0 0 1000px #0a1029 inset;
    -webkit-text-fill-color: var(--ink);
    caret-color: var(--ink);
}

.ops-stepup-alts
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ops-stepup .form-notice
{
    margin: 12px 0 0;
}

@media (max-width: 720px)
{
    .ops-row
    {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .ops-row-meta { white-space: normal; }
}

/* M7 backlog sweep - confirm modal, file previews, integrity chips */

/* the toast component root wraps the stack + the confirm veil; both are
   fixed, so the wrapper itself must not create a box */
.toast-layer
{
    display: contents;
}

.confirm-veil
{
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 7, 15, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: veil-in 0.18s ease;
}

.confirm-card
{
    width: min(430px, 100%);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    padding: 26px 28px 22px;
    border-radius: 20px;
    border: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.92);
    box-shadow: 0 28px 70px -30px rgba(5, 7, 15, 0.95), 0 0 34px -14px rgba(125, 230, 255, 0.25);
    animation: confirm-in 0.22s ease;
}

.confirm-title
{
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 280;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.confirm-body
{
    margin: 0 0 20px;
    color: var(--ink-dim);
    font-size: 0.92rem;
    line-height: 1.55;
}

.confirm-actions
{
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.confirm-yes-danger
{
    background: linear-gradient(92deg, #ff9db4, var(--pink));
    box-shadow: 0 4px 30px rgba(255, 120, 150, 0.3);
}

.confirm-yes-danger:hover
{
    box-shadow: 0 8px 44px rgba(255, 120, 150, 0.45);
}

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

@keyframes confirm-in
{
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce)
{
    .confirm-veil, .confirm-card { animation: none; }
}

/* integrity chips - short hash, full hash on the tooltip */

.chip-hash
{
    font-family: Consolas, 'Cascadia Mono', ui-monospace, monospace;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.06em;
    cursor: help;
}

.chip-hash[data-tip]::after,
.asset-name[data-tip]::after
{
    white-space: normal;
    word-break: break-all;
    width: max-content;
    max-width: min(74vw, 380px);
}

/* markdown body - README-style rendering for previews + changelogs */

.md
{
    color: var(--ink);
    font-size: 0.92rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.md h1, .md h2, .md h3, .md h4, .md h5, .md h6
{
    margin: 1.3em 0 0.5em;
    font-weight: 280;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.md h1 { font-size: 1.5rem; }
.md h2 { font-size: 1.28rem; padding-bottom: 6px; border-bottom: 1px solid var(--hairline); }
.md h3 { font-size: 1.1rem; }
.md h4, .md h5, .md h6 { font-size: 0.98rem; }

.md p
{
    margin: 0.7em 0;
}

.md ul, .md ol
{
    margin: 0.7em 0;
    padding-left: 26px;
}

.md li
{
    margin: 0.25em 0;
}

.md code
{
    font-family: Consolas, 'Cascadia Mono', ui-monospace, monospace;
    font-size: 0.85em;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--hairline);
    background: rgba(8, 12, 30, 0.55);
}

.md pre
{
    margin: 0.9em 0;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: rgba(8, 12, 30, 0.55);
    overflow-x: auto;
}

.md pre code
{
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.82rem;
    line-height: 1.55;
}

.md blockquote
{
    margin: 0.9em 0;
    padding: 2px 16px;
    border-left: 2px solid rgba(125, 230, 255, 0.35);
    color: var(--ink-dim);
}

.md hr
{
    border: 0;
    border-top: 1px solid var(--hairline);
    margin: 1.4em 0;
}

.md a
{
    color: var(--cyan);
}

.md > :first-child { margin-top: 0.4em; }
.md > :last-child { margin-bottom: 0.4em; }

/* preview pane - the README/pdf/text peek surface */

.preview-pane
{
    border: 1px solid var(--hairline);
    border-radius: 14px;
    background: rgba(8, 12, 30, 0.45);
    overflow: hidden;
    animation: vault-swap 0.22s ease both;
}

.preview-bar
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--hairline);
    background: rgba(13, 20, 46, 0.5);
}

.preview-title
{
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.preview-actions
{
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-note
{
    margin: 0;
    padding: 18px;
    color: var(--ink-dim);
    font-size: 0.9rem;
}

.preview-text
{
    margin: 0;
    padding: 16px 18px;
    max-height: 480px;
    overflow: auto;
    font-family: Consolas, 'Cascadia Mono', ui-monospace, monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--ink);
}

.preview-pdf
{
    display: block;
    width: 100%;
    height: min(72vh, 640px);
    border: 0;
    background: rgba(8, 12, 30, 0.6);
}

.preview-pane .md
{
    padding: 6px 22px;
    max-height: 560px;
    overflow-y: auto;
}

/* stash drawer variant: the peek needs the full row width */
.stash-drawer-preview
{
    padding: 12px;
}

.stash-drawer-preview .preview-bar
{
    border: 1px solid var(--hairline);
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
}

.stash-drawer-preview .preview-bar + *
{
    border: 1px solid var(--hairline);
    border-radius: 0 0 12px 12px;
}

.stash-drawer-preview .md,
.stash-drawer-preview .preview-text
{
    background: rgba(8, 12, 30, 0.45);
}

/* share landing peek sits under the card, wider than the auth column */
.share-preview
{
    width: min(760px, calc(100vw - 32px));
    margin: 22px auto 0;
    text-align: left;
}

/* ghost button "on" state (open peek, open changelog) */
.btn-on
{
    border-color: rgba(125, 230, 255, 0.5);
    color: var(--cyan);
    box-shadow: 0 0 18px rgba(125, 230, 255, 0.14);
}
