/* ============================================================
   fx-glass.css — depth, glass, vector and motion layer.
   Loads AFTER personas.css / motion-system.css, so it upgrades the
   existing components in place rather than redefining the layout.

   Everything here is accent-driven (--accent / --accent-2 / --accent-rgb
   are set per persona on <body> by page.php) and every effect degrades
   to a flat, readable card under `prefers-reduced-motion`.
   ============================================================ */

:root {
    /* glass */
    --glass-bg: linear-gradient(148deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .022) 46%, rgba(255, 255, 255, .045));
    --glass-blur: 18px;
    --glass-border: rgba(255, 255, 255, .12);
    --glass-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 20px 46px -26px rgba(0, 0, 0, .95);
    --glass-radius: 18px;

    /* elevation */
    --lift-1: 0 10px 30px -18px rgba(0, 0, 0, .85);
    --lift-2: 0 26px 64px -30px rgba(0, 0, 0, .95);

    /* easing */
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-spring: cubic-bezier(.34, 1.4, .5, 1);
}

/* ============================================================
   1. Film grain + vignette — one fixed layer, no extra request.
   ============================================================ */
.fx-grain {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: .055;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.fx-vignette {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(130% 90% at 50% 12%, transparent 42%, rgba(0, 0, 0, .55) 100%);
}

/* ============================================================
   2. Scroll progress bar (top hairline).
   ============================================================ */
.fx-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    z-index: 90;
    transform: scaleX(var(--sp, 0));
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 14px rgba(var(--accent-rgb), .8);
    pointer-events: none;
    will-change: transform;
}

/* ============================================================
   3. Glass surfaces — upgrade the existing card components.
   ============================================================ */
.p-card,
.p-proj,
.p-metric,
.hub-tile,
.p-faq details,
.p-flow .node,
.hub-lens-chip,
.glass {
    position: relative;
    /* Opaque glass look: a lit gradient over an elevated surface. Reads the
       same on this dark page as a real blur did, at a fraction of the cost. */
    background-color: var(--surface-1);
    background-image: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--glass-radius);
    isolation: isolate;
    overflow: hidden;
}

.p-faq details { border-radius: 14px; }
.hub-tile { border-radius: 22px; }

/* Top hairline highlight — the "lit edge" that sells glass on dark. */
.p-card::after,
.p-proj::after,
.hub-tile::after,
.p-metric::after,
.glass::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34) 22%, rgba(var(--accent-rgb), .55) 50%, rgba(255, 255, 255, .3) 78%, transparent);
    opacity: .65;
    pointer-events: none;
    z-index: 3;
}

/* ============================================================
   4. Cursor spotlight — JS writes --mx/--my (in %) on hover.
   ============================================================ */
.fx-spot::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity .32s var(--ease-out);
    background:
        radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .17), transparent 62%),
        radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .07), transparent 60%);
}

.fx-spot:hover::before,
.fx-spot:focus-visible::before { opacity: 1; }

/* Keep card content above the spotlight wash. */
.p-card > *,
.p-proj > *,
.hub-tile > *,
.p-metric > * { position: relative; z-index: 2; }

/* ============================================================
   5. 3D tilt — composes with hover lift (JS sets --rx/--ry/--tz).
   ============================================================ */
[data-tilt] {
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, var(--ty, 0px), var(--tz, 0px));
    transform-style: preserve-3d;
    transition: transform .5s var(--ease-out), border-color .3s ease, box-shadow .4s ease;
}

[data-tilt].is-tilting { transition: transform .08s linear, border-color .3s ease, box-shadow .4s ease; }

.p-card:hover,
.p-proj:hover,
.hub-tile:hover,
.p-metric:hover { --ty: -7px; }

.p-card:hover,
.p-proj:hover,
.hub-tile:hover {
    border-color: rgba(var(--accent-rgb), .48);
    box-shadow: var(--lift-2), 0 0 0 1px rgba(var(--accent-rgb), .22), 0 0 44px -14px rgba(var(--accent-rgb), .5);
}

/* Glare sheet that follows the pointer across a tilted card. */
.fx-glare > .glare {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity .3s var(--ease-out);
    background: linear-gradient(var(--ga, 120deg), transparent 34%, rgba(255, 255, 255, .16) 50%, transparent 66%);
    mix-blend-mode: soft-light;
}

.fx-glare:hover > .glare { opacity: 1; }

/* ============================================================
   6. Conic accent border for featured surfaces.
   ============================================================ */
.fx-ring {
    position: relative;
}

.fx-ring::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--ring-a, 0deg),
            rgba(var(--accent-rgb), 0) 0deg,
            rgba(var(--accent-rgb), .85) 70deg,
            rgba(var(--accent2-rgb), .8) 140deg,
            rgba(var(--accent-rgb), 0) 220deg,
            rgba(var(--accent-rgb), 0) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
    z-index: 5;
}

/* Only spin while it is actually visible. */
.fx-ring:hover::before,
.fx-ring.always-on::before { animation: ringspin 6s linear infinite; }

.fx-ring:hover::before,
.fx-ring.always-on::before { opacity: .9; }

@property --ring-a {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes ringspin { to { --ring-a: 360deg; } }

/* ============================================================
   7. Buttons — sheen sweep, ripple, glass ghost.
   ============================================================ */
.p-btn,
.p-btn-ghost {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform .28s var(--ease-spring), box-shadow .3s ease, background .3s ease, border-color .3s ease;
}

.p-btn::before,
.p-btn-ghost::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: translateX(-120%) skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
    transition: transform .75s var(--ease-out);
}

.p-btn:hover::before,
.p-btn-ghost:hover::before { transform: translateX(120%) skewX(-18deg); }

.p-btn-ghost {
    background-image: var(--glass-bg);
}

.p-btn-ghost:hover {
    border-color: rgba(var(--accent-rgb), .7);
    box-shadow: 0 0 32px -12px rgba(var(--accent-rgb), .8);
}

.p-btn:hover { box-shadow: 0 18px 44px -14px rgba(var(--accent-rgb), .95), 0 0 0 1px rgba(255, 255, 255, .12) inset; }

.p-btn .ripple,
.p-btn-ghost .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, .45);
    pointer-events: none;
    animation: ripple .62s var(--ease-out) forwards;
    z-index: -1;
}

@keyframes ripple {
    to { transform: scale(3.2); opacity: 0; }
}

/* ============================================================
   8. Inline vectors — logos, duotone icons, dividers, backdrops.
   ============================================================ */
.p-logo {
    display: block;
    color: var(--text-dim);
    transition: color .3s ease, transform .4s var(--ease-spring), filter .3s ease;
}

.p-duo {
    display: block;
    color: var(--accent);
    overflow: visible;
}

.p-duo .duo-hi { opacity: .9; }

.p-cap .ic {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: radial-gradient(120% 120% at 20% 0%, rgba(var(--accent-rgb), .3), rgba(var(--accent-rgb), .07));
    border: 1px solid rgba(var(--accent-rgb), .28);
    box-shadow: 0 8px 24px -14px rgba(var(--accent-rgb), .9), 0 1px 0 rgba(255, 255, 255, .12) inset;
    margin-bottom: 18px;
    transition: transform .45s var(--ease-spring), box-shadow .35s ease;
}

.p-card:hover .p-cap .ic,
.p-cap:hover .ic {
    transform: translateY(-3px) rotate(-4deg) scale(1.06);
    box-shadow: 0 14px 34px -14px rgba(var(--accent-rgb), 1);
}

/* Section divider */
.p-divider {
    position: relative;
    width: 100%;
    line-height: 0;
    color: rgba(var(--accent-rgb), .55);
    margin: -10px 0;
    pointer-events: none;
}

.p-divider svg {
    display: block;
    width: 100%;
    height: clamp(34px, 5vw, 60px);
}

.p-divider .dl {
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
}

.p-divider.in .dl {
    transition: stroke-dashoffset 2.2s var(--ease-out);
    stroke-dashoffset: 0;
}

/* Section backdrop vector */
.p-sec.has-backdrop { position: relative; isolation: isolate; }

.p-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    color: var(--accent);
    opacity: .12;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(75% 70% at 50% 45%, #000 20%, transparent 78%);
    mask-image: radial-gradient(75% 70% at 50% 45%, #000 20%, transparent 78%);
}

/* Generative project artwork inside a thumb */
.p-proj .thumb { position: relative; overflow: hidden; }

.p-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--accent);
    opacity: .55;
    transition: transform 1.1s var(--ease-out), opacity .4s ease;
}

.p-proj:hover .p-art { transform: scale(1.08) rotate(.6deg); opacity: .8; }

.p-proj .thumb.is-art {
    background: radial-gradient(120% 130% at 15% 0%, rgba(var(--accent-rgb), .3), transparent 58%), var(--surface-2);
}

.p-proj .thumb.is-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(6, 7, 10, .82));
}

/* The featured tile spans two rows — let its media absorb the extra height
   instead of leaving a void under a short blurb. */
.p-proj.feat .thumb { height: auto; flex: 1 1 auto; min-height: 300px; }
.p-proj.feat .body { flex: 0 0 auto; }
.p-proj.feat h3 { font-size: 1.28rem; }

/* Photo thumbs get a slow ken-burns on hover */
.p-proj .thumb.is-photo {
    background-size: cover;
    background-position: center;
    transition: transform 1.2s var(--ease-out);
    transform-origin: center;
}

.p-proj:hover .thumb.is-photo { transform: scale(1.05); }

/* ============================================================
   9. Stack wall — the logo grid section.
   ============================================================ */
.stack-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
    gap: 12px;
}

.stack-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 12px;
    min-height: 108px;
    border-radius: 15px;
    border: 1px solid var(--hairline);
    background-color: rgba(255, 255, 255, .02);
    background-image: var(--glass-bg);
    text-align: center;
    overflow: hidden;
    transition: transform .4s var(--ease-out), border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

.stack-cell span {
    font-size: .78rem;
    color: var(--text-faint);
    letter-spacing: .02em;
    transition: color .3s ease;
}

.stack-cell:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--accent-rgb), .55);
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .95), 0 0 34px -14px rgba(var(--accent-rgb), .7);
}

.stack-cell:hover .p-logo { color: var(--accent); transform: translateY(-2px) scale(1.1); }
.stack-cell:hover span { color: var(--text); }

/* ============================================================
   10. Marquee — glass chips + guaranteed motion.
   ============================================================ */
.p-marquee .scroller {
    -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    overflow: hidden;
}

.p-marquee .scroller__inner {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    gap: 12px;
    padding-block: 14px;
    animation: fx-marquee var(--mq-dur, 52s) linear infinite;
}

.p-marquee .scroller:hover .scroller__inner { animation-play-state: paused; }

@keyframes fx-marquee {
    to { transform: translateX(-50%); }
}

.p-marquee .p-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    background-image: var(--glass-bg);
    border-color: rgba(var(--accent-rgb), .3);
    padding: 8px 15px;
    transition: border-color .3s ease, color .3s ease;
}

.p-marquee .p-chip .p-logo { color: var(--accent); flex: 0 0 auto; }
.p-marquee .p-chip:hover { border-color: rgba(var(--accent-rgb), .75); }

/* Skill chips get their mark inline too */
.p-chips .p-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background .28s ease, border-color .28s ease, transform .28s var(--ease-spring), color .28s ease;
}

.p-chips .p-chip:hover {
    transform: translateY(-2px);
    background: rgba(var(--accent-rgb), .2);
    border-color: rgba(var(--accent-rgb), .55);
}

.p-chips .p-chip .p-logo { color: var(--accent); }

/* ============================================================
   11. Header — deeper glass + live status.
   ============================================================ */
.p-nav {
    background: linear-gradient(to bottom, rgba(7, 7, 9, .72), rgba(7, 7, 9, .3));
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    backdrop-filter: blur(12px) saturate(150%);
    transition: padding .35s var(--ease-out), background .35s ease, box-shadow .35s ease;
}

.p-nav.is-stuck {
    padding-top: 9px;
    padding-bottom: 9px;
    background: rgba(7, 7, 9, .9);
    box-shadow: 0 14px 34px -26px rgba(0, 0, 0, 1);
}

.p-nav .p-brand .dot {
    animation: livepulse 2.6s ease-in-out infinite;
}

@keyframes livepulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6), 0 0 12px var(--accent); }
    60% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0), 0 0 18px var(--accent); }
}

.p-switch-btn {
    background-image: var(--glass-bg);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    transition: border-color .3s ease, box-shadow .3s ease, transform .3s var(--ease-spring);
}

.p-switch-btn:hover {
    border-color: rgba(var(--accent-rgb), .7);
    box-shadow: 0 0 26px -10px rgba(var(--accent-rgb), .9);
}

.p-switch-menu {
    background: rgba(14, 17, 24, .82);
    -webkit-backdrop-filter: blur(26px) saturate(170%);
    backdrop-filter: blur(26px) saturate(170%);
    box-shadow: var(--lift-2);
    border-radius: 16px;
}

.p-switch-menu a { transition: background .22s ease, transform .22s var(--ease-out); }
.p-switch-menu a:hover { transform: translateX(3px); }

/* Nav utility buttons (search / clock) — these take the flexible gap so the
   switcher stays pinned to the right of them. */
.p-nav-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.p-nav .p-switch { margin-left: 0; }

.fx-kbd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--hairline-2);
    background-color: rgba(255, 255, 255, .04);
    background-image: var(--glass-bg);
    color: var(--text-dim);
    font-family: inherit;
    font-size: .82rem;
    cursor: pointer;
    transition: color .25s ease, border-color .25s ease;
}

.fx-kbd-btn:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .6); }
.fx-kbd-btn kbd {
    font-family: var(--mono);
    font-size: .7rem;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--hairline);
    color: var(--text-dim);
}

/* Live local-time badge */
.fx-clock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: .8rem;
    color: var(--text-dim);
    letter-spacing: .02em;
}

.fx-clock .live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--status-shipped);
    box-shadow: 0 0 10px var(--status-shipped);
    animation: livepulse 2.4s ease-in-out infinite;
}

/* ============================================================
   12. Hero — portrait frame, floating badges, parallax.
   ============================================================ */
.p-hero { position: relative; }

.p-portrait {
    transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
    transition: transform .7s var(--ease-out);
}

.p-portrait img {
    border-radius: 24px;
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 1), 0 0 0 1px rgba(var(--accent-rgb), .3), 0 0 70px -30px rgba(var(--accent-rgb), .8);
}

.p-portrait::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 32px;
    background: conic-gradient(from 0deg, rgba(var(--accent-rgb), .35), rgba(var(--accent2-rgb), .25), rgba(var(--accent-rgb), 0) 60%, rgba(var(--accent-rgb), .35));
    filter: blur(22px);
    opacity: .75;
    z-index: -1;
    animation: haloturn 14s linear infinite;
}

@keyframes haloturn { to { transform: rotate(360deg); } }

.p-portrait::after { border-radius: 24px; }

/* Floating fact pills over the portrait */
.p-portrait .pill {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(14, 17, 24, .72);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--lift-1);
    white-space: nowrap;
    z-index: 4;
}

.p-portrait .pill i,
.p-portrait .pill .p-logo { color: var(--accent); }
.p-portrait .pill.a { top: 9%; left: -22px; animation: float1 7s ease-in-out infinite; }
.p-portrait .pill.b { bottom: 16%; right: -18px; animation: float2 8.5s ease-in-out infinite; }
.p-portrait .pill.c { bottom: -14px; left: 12%; animation: float1 9.5s ease-in-out infinite .8s; }

@keyframes float1 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
@keyframes float2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(9px); } }

/* Hub avatar ring */
.hub-masthead img.face {
    width: 132px;
    height: 132px;
    position: relative;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .5), 0 0 60px -12px rgba(var(--accent-rgb), .85);
}

.hub-masthead .face-wrap { position: relative; display: inline-grid; place-items: center; }

.hub-masthead .face-wrap::before,
.hub-masthead .face-wrap::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(var(--accent-rgb), .35);
    pointer-events: none;
}

.hub-masthead .face-wrap::before { inset: -16px; animation: ripple-ring 3.6s ease-out infinite; }
.hub-masthead .face-wrap::after { inset: -16px; animation: ripple-ring 3.6s ease-out infinite 1.8s; }

@keyframes ripple-ring {
    0% { transform: scale(.92); opacity: .9; }
    100% { transform: scale(1.35); opacity: 0; }
}

/* ============================================================
   13. Text reveal — per-line clip mask (JS wraps lines in .ln).
   ============================================================ */
.fx-lines .ln { display: block; overflow: hidden; }

.fx-lines .ln > i {
    display: block;
    font-style: inherit;
    transform: translateY(105%);
    opacity: 0;
    transition: transform .9s var(--ease-out), opacity .7s ease;
    transition-delay: calc(var(--i, 0) * 90ms);
}

.fx-lines.in .ln > i { transform: translateY(0); opacity: 1; }

/* Grid stagger reveal */
.fx-stagger > * {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 70ms);
}

.fx-stagger.in > * { opacity: 1; transform: none; }

/* Section mask wipe */
.fx-wipe {
    -webkit-mask-image: linear-gradient(180deg, #000 0 var(--wipe, 0%), transparent var(--wipe, 0%));
    mask-image: linear-gradient(180deg, #000 0 var(--wipe, 0%), transparent var(--wipe, 0%));
}

/* ============================================================
   14. Timeline / stepper / metric upgrades.
   ============================================================ */
.p-timeline::before {
    background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb), .55) 40%, rgba(var(--accent-rgb), .06));
    box-shadow: 0 0 20px rgba(var(--accent-rgb), .45);
    width: 2px;
}

.p-tl-item::before {
    background: var(--ink);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .14), 0 0 18px rgba(var(--accent-rgb), .8);
    transition: transform .35s var(--ease-spring), box-shadow .35s ease;
}

.p-tl-item:hover::before { transform: scale(1.28); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .2), 0 0 26px rgba(var(--accent-rgb), 1); }

.p-step .n {
    background: radial-gradient(120% 120% at 30% 10%, rgba(var(--accent-rgb), .28), transparent 70%);
    box-shadow: 0 0 24px -10px rgba(var(--accent-rgb), .9), 0 1px 0 rgba(255, 255, 255, .1) inset;
    transition: transform .4s var(--ease-spring), box-shadow .35s ease;
}

.p-step:hover .n { transform: scale(1.1) rotate(-6deg); box-shadow: 0 0 30px -6px rgba(var(--accent-rgb), 1); }

.p-steps { position: relative; }

/* The glass rule clips overflow, so long word-metrics ("US·UK·UAE·PK") get a
   smaller step rather than losing their last character. */
.p-metric .v.long {
    font-size: clamp(1.1rem, 1.95vw, 1.75rem);
    letter-spacing: -.01em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.p-metric .v {
    background: linear-gradient(180deg, var(--text) -20%, var(--accent) 78%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}

/* FAQ */
.p-faq summary { transition: color .25s ease, background .25s ease; }
.p-faq summary:hover { background: rgba(var(--accent-rgb), .07); }
.p-faq summary::after { transition: transform .3s var(--ease-spring); }
.p-faq details[open] summary::after { transform: rotate(180deg); }
.p-faq details[open] { border-color: rgba(var(--accent-rgb), .38); }

/* ============================================================
   15. Glass modal (project / media popup).
   ============================================================ */
.fx-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: max(20px, 4vh) 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .32s var(--ease-out);
}

.fx-modal.open { opacity: 1; pointer-events: auto; }

.fx-modal-scrim {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 8, .68);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    backdrop-filter: blur(16px) saturate(120%);
}

.fx-modal-card {
    position: relative;
    width: min(880px, 100%);
    max-height: min(88vh, 900px);
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    background: rgba(14, 17, 24, .8);
    background-image: var(--glass-bg);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 1), 0 0 0 1px rgba(var(--accent-rgb), .18);
    transform: translateY(26px) scale(.97);
    opacity: 0;
    transition: transform .42s var(--ease-spring), opacity .3s ease;
}

.fx-modal.open .fx-modal-card { transform: none; opacity: 1; }

.fx-modal-media {
    position: relative;
    height: clamp(180px, 30vh, 300px);
    background: radial-gradient(120% 130% at 15% 0%, rgba(var(--accent-rgb), .32), transparent 60%), var(--surface-2);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.fx-modal-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(14, 17, 24, .95));
}

.fx-modal-media .p-art { opacity: .6; }

.fx-modal-media[hidden] { display: none; }
.fx-modal-media[hidden] + .fx-modal-body { padding-top: clamp(34px, 4vw, 46px); }
.fx-modal-body { padding: clamp(22px, 3.4vw, 36px); }
.fx-modal-body h3 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); margin: 12px 0 8px; letter-spacing: -.02em; color: var(--text); }
.fx-modal-body .stack { font-family: var(--mono); font-size: .82rem; color: var(--accent); margin-bottom: 16px; }
.fx-modal-body p { color: var(--text-dim); line-height: 1.72; margin: 0 0 14px; }
.fx-modal-body .p-chips { margin: 18px 0 6px; }

.fx-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 6;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(10, 12, 18, .68);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform .3s var(--ease-spring), border-color .3s ease, background .3s ease;
}

.fx-modal-close:hover { transform: rotate(90deg); border-color: rgba(var(--accent-rgb), .8); background: rgba(var(--accent-rgb), .18); }

/* "Open" affordance on interactive project cards */
.p-proj.is-clickable { cursor: pointer; }

.p-proj .zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(10, 12, 18, .6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--text);
    opacity: 0;
    transform: scale(.82);
    transition: opacity .3s ease, transform .35s var(--ease-spring);
    pointer-events: none;
}

.p-proj:hover .zoom { opacity: 1; transform: none; }

/* ============================================================
   16. Command palette (Ctrl/Cmd-K lens switcher).
   ============================================================ */
.fx-cmdk {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: grid;
    align-items: start;
    justify-items: center;
    padding: clamp(60px, 14vh, 160px) 18px 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .26s var(--ease-out);
}

.fx-cmdk.open { opacity: 1; pointer-events: auto; }
.fx-cmdk .scrim { position: absolute; inset: 0; background: rgba(4, 5, 8, .6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

.fx-cmdk-card {
    position: relative;
    width: min(620px, 100%);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: rgba(14, 17, 24, .86);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 1);
    overflow: hidden;
    transform: translateY(-14px) scale(.98);
    opacity: 0;
    transition: transform .34s var(--ease-spring), opacity .24s ease;
}

.fx-cmdk.open .fx-cmdk-card { transform: none; opacity: 1; }

.fx-cmdk input {
    width: 100%;
    padding: 20px 22px;
    border: 0;
    border-bottom: 1px solid var(--hairline);
    background: transparent;
    color: var(--text);
    font-size: 1.02rem;
    font-family: inherit;
    outline: none;
}

.fx-cmdk input::placeholder { color: var(--text-faint); }
.fx-cmdk-list { max-height: min(52vh, 420px); overflow: auto; padding: 8px; }

.fx-cmdk-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: background .18s ease;
}

.fx-cmdk-list a small { display: block; color: var(--text-faint); font-size: .78rem; }
.fx-cmdk-list a .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.fx-cmdk-list a.sel,
.fx-cmdk-list a:hover { background: rgba(var(--accent-rgb), .16); }
.fx-cmdk-list .empty { padding: 22px; color: var(--text-faint); text-align: center; font-size: .9rem; }
.fx-cmdk-foot { display: flex; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--hairline); color: var(--text-faint); font-size: .74rem; }
.fx-cmdk-foot kbd { font-family: var(--mono); background: rgba(255, 255, 255, .07); border: 1px solid var(--hairline); border-radius: 4px; padding: 1px 5px; }

/* ============================================================
   17. Custom cursor (fine pointers only, JS-gated).
   ============================================================ */
.fx-cursor,
.fx-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 300;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0;
    transition: opacity .3s ease, width .3s var(--ease-spring), height .3s var(--ease-spring), background .3s ease, border-color .3s ease;
    will-change: transform;
}

.fx-cursor {
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 1px solid rgba(var(--accent-rgb), .8);
    mix-blend-mode: difference;
}

.fx-cursor-dot {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: var(--accent);
}

body.fx-cursor-on .fx-cursor,
body.fx-cursor-on .fx-cursor-dot { opacity: 1; }
body.fx-cursor-on .fx-cursor.hot { width: 62px; height: 62px; margin: -31px 0 0 -31px; background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), 1); }
body.fx-cursor-on .fx-cursor.hot + .fx-cursor-dot,
body.fx-cursor-on .fx-cursor-dot.hide { opacity: 0; }

/* Retire the legacy theme cursor entirely — the markup stays so the theme's
   own script.js keeps its query targets, but it never paints. */
#magic-cursor,
#ball { display: none !important; }

/* ============================================================
   18. Hub tiles — accent wash + arrow motion.
   ============================================================ */
.hub-tile::before {
    background: radial-gradient(130% 100% at 0% 0%, rgba(var(--t-rgb), .22), transparent 62%);
    z-index: 1;
}

.hub-tile .tdot { box-shadow: 0 0 0 4px rgba(var(--t-rgb), .14), 0 0 18px rgb(var(--t-rgb)); }
.hub-tile:hover { box-shadow: var(--lift-2), 0 0 0 1px rgba(var(--t-rgb), .35), 0 0 50px -18px rgba(var(--t-rgb), .8); border-color: rgba(var(--t-rgb), .6); }
.hub-tile .go i { transition: transform .35s var(--ease-spring); }
.hub-tile:hover .go i { transform: translateX(7px); }

.hub-lens-chip { border-radius: 15px; }

/* ============================================================
   19. Footer glow band.
   ============================================================ */
.p-footer {
    position: relative;
    overflow: hidden;
}

.p-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: min(760px, 90%);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 26px rgba(var(--accent-rgb), .8);
}

.p-social a {
    background-image: var(--glass-bg);
    transition: transform .35s var(--ease-spring), border-color .3s ease, color .3s ease, box-shadow .3s ease;
}

.p-social a:hover { box-shadow: 0 0 26px -8px rgba(var(--accent-rgb), .9); }

/* ============================================================
   20. Forms.
   ============================================================ */
.p-form .form-control,
.p-form textarea {
    background-image: var(--glass-bg);
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.p-form .form-control:hover { border-color: rgba(var(--accent-rgb), .45); }

/* ============================================================
   21. Progress ring.
   ============================================================ */
.progress-wrap {
    border-radius: 50%;
}

.progress-wrap svg.progress-circle path { stroke: var(--accent); }

/* ============================================================
   22. Responsive.
   ============================================================ */
@media (max-width: 900px) {
    .p-portrait .pill.a { left: 4px; top: 6%; }
    .p-portrait .pill.b { right: 4px; }
    .p-portrait .pill.c { display: none; }
    .fx-modal-card { max-height: 92vh; }
}

@media (max-width: 760px) {
    .p-nav-tools .fx-kbd-btn { display: none; }
    .stack-wall { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
    .stack-cell { min-height: 92px; padding: 16px 8px; }
    .fx-grain { opacity: .18; }
}

/* ============================================================
   23. Reduced motion — keep the depth, drop the movement.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

    .fx-grain,
    .p-portrait::before,
    .hub-masthead .face-wrap::before,
    .hub-masthead .face-wrap::after { animation: none !important; }

    .p-marquee .scroller__inner { animation: none !important; flex-wrap: wrap; width: auto; justify-content: center; }
    .fx-ring::before { animation: none !important; }
    .p-nav .p-brand .dot, .fx-clock .live { animation: none !important; }
    .p-portrait .pill { animation: none !important; }

    .fx-lines .ln > i,
    .fx-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }

    .p-divider .dl { stroke-dashoffset: 0 !important; transition: none !important; }
    .fx-cursor, .fx-cursor-dot { display: none !important; }
    [data-tilt] { transform: none !important; }
}

/* Respect users who prefer less transparency. */
@media (prefers-reduced-transparency: reduce) {
    .p-card, .p-proj, .p-metric, .hub-tile, .p-faq details, .glass,
    .fx-modal-card, .fx-cmdk-card, .p-switch-menu, .stack-cell {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: var(--surface-1);
    }
}

/* ============================================================
   24. Client-work gallery — browser-framed live screenshots.
   ============================================================ */
.work-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
}

.work-filter button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 17px;
    border-radius: var(--r-pill);
    border: 1px solid var(--hairline-2);
    background-color: rgba(255, 255, 255, .035);
    background-image: var(--glass-bg);
    color: var(--text-dim);
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
    transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s var(--ease-spring);
}

.work-filter button:hover { color: var(--text); transform: translateY(-2px); border-color: rgba(var(--accent-rgb), .5); }

.work-filter button[aria-pressed="true"] {
    color: #06070a;
    background-color: var(--accent);
    background-image: none;
    border-color: var(--accent);
    box-shadow: 0 10px 26px -12px rgba(var(--accent-rgb), .9);
}

.work-filter button .n {
    font-family: var(--mono);
    font-size: .72rem;
    opacity: .7;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 22px;
}

.work-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--glass-radius);
    border: 1px solid var(--glass-border);
    background-color: var(--surface-1);
    background-image: var(--glass-bg);
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
    text-decoration: none;
    transition: transform .45s var(--ease-out), border-color .3s ease, box-shadow .4s ease, opacity .35s ease;
}

.work-card:hover {
    border-color: rgba(var(--accent-rgb), .5);
    box-shadow: var(--lift-2), 0 0 44px -16px rgba(var(--accent-rgb), .6);
}

.work-card.is-hidden { display: none; }

/* --- the browser chrome ------------------------------------------------- */
.wc-frame {
    position: relative;
    margin: 12px 12px 0;
    border-radius: 11px 11px 0 0;
    border: 1px solid var(--hairline-2);
    border-bottom: 0;
    overflow: hidden;
    background: var(--surface-2);
}

.wc-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, .05);
    border-bottom: 1px solid var(--hairline);
}

.wc-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    flex: 0 0 auto;
}

.wc-bar i:first-child { background: rgba(255, 96, 92, .75); }
.wc-bar i:nth-child(2) { background: rgba(255, 189, 68, .75); }
.wc-bar i:nth-child(3) { background: rgba(0, 202, 78, .7); }

.wc-url {
    margin-left: 8px;
    flex: 1;
    min-width: 0;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    background: rgba(0, 0, 0, .32);
    font-family: var(--mono);
    font-size: .68rem;
    color: var(--text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-shot {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-2);
}

.wc-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 1.4s var(--ease-out), filter .4s ease;
    filter: saturate(.92);
}

.work-card:hover .wc-shot img { transform: scale(1.045); filter: saturate(1.04); }

.wc-shot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(6, 7, 10, .55));
    opacity: .8;
    pointer-events: none;
}

.wc-shot .p-art { opacity: .5; }

.wc-open {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: var(--r-pill);
    border: 1px solid var(--glass-border);
    background: rgba(10, 12, 18, .7);
    color: var(--text);
    font-size: .76rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .35s var(--ease-spring);
    pointer-events: none;
}

.work-card:hover .wc-open { opacity: 1; transform: none; }

/* --- card body ---------------------------------------------------------- */
.wc-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.wc-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-family: var(--mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.wc-meta .cat { color: var(--accent); }
.wc-body h3 { font-size: 1.06rem; line-height: 1.3; margin: 0; color: var(--text); letter-spacing: -.01em; }
.wc-body .stack { font-family: var(--mono); font-size: .74rem; color: var(--accent); opacity: .9; }
.wc-body p { margin: 0; font-size: .89rem; line-height: 1.6; color: var(--text-dim); }
.wc-live { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; font-size: .8rem; font-weight: 600; color: var(--text); }
.wc-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--status-shipped); box-shadow: 0 0 8px var(--status-shipped); }

/* ============================================================
   25. Modal: scrollable full-page capture inside a browser frame.
   ============================================================ */
.fx-modal-shot {
    position: relative;
    margin: 0 0 22px;
    border-radius: 12px;
    border: 1px solid var(--hairline-2);
    overflow: hidden;
    background: var(--surface-2);
}

.fx-modal-shot .wc-bar { border-radius: 12px 12px 0 0; }

.fx-modal-shot .scrollpane {
    max-height: min(46vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), .5) transparent;
}

.fx-modal-shot .scrollpane::-webkit-scrollbar { width: 9px; }
.fx-modal-shot .scrollpane::-webkit-scrollbar-track { background: rgba(255, 255, 255, .04); }
.fx-modal-shot .scrollpane::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), .5); border-radius: 999px; }
.fx-modal-shot .scrollpane img { display: block; width: 100%; height: auto; }

.fx-modal-shot .hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    background: rgba(10, 12, 18, .82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    font-size: .72rem;
    color: var(--text-dim);
    pointer-events: none;
    animation: hintfade 5s ease forwards;
}

@keyframes hintfade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

.fx-modal-body .visit { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 560px) {
    .work-grid { grid-template-columns: 1fr; }
    .work-filter { gap: 8px; }
    .work-filter button { padding: 8px 13px; font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
    .work-card:hover .wc-shot img { transform: none; }
    .fx-modal-shot .hint { animation: none; opacity: 1; }
}

/* ============================================================
   26. Direct-contact rail — WhatsApp / call / email.
   Fixed to the left edge so it never collides with the
   back-to-top ring on the right.
   ============================================================ */
.fx-rail {
    position: fixed;
    left: 18px;
    bottom: 22px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fx-rail-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    height: 48px;
    width: 48px;
    padding: 0;
    border-radius: var(--r-pill);
    border: 1px solid var(--glass-border);
    background: rgba(14, 17, 24, .78);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    box-shadow: var(--lift-1);
    transition: width .38s var(--ease-out), background .3s ease, border-color .3s ease, transform .3s var(--ease-spring), box-shadow .3s ease;
}

.fx-rail-btn svg,
.fx-rail-btn i {
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 46px;
    font-size: 1.15rem;
    line-height: 1;
}

.fx-rail-btn .lbl {
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 600;
    padding-right: 18px;
    opacity: 0;
    transition: opacity .25s ease;
}

.fx-rail-btn:hover,
.fx-rail-btn:focus-visible {
    width: auto;
    color: var(--text);
    transform: translateX(3px);
}

.fx-rail-btn:hover .lbl,
.fx-rail-btn:focus-visible .lbl { opacity: 1; }

.fx-rail-btn.wa {
    color: #25D366;
    border-color: rgba(37, 211, 102, .42);
}

.fx-rail-btn.wa:hover {
    color: #06070a;
    background: #25D366;
    border-color: #25D366;
    box-shadow: 0 14px 34px -12px rgba(37, 211, 102, .85);
}

.fx-rail-btn.call:hover,
.fx-rail-btn.mail:hover {
    color: #06070a;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 14px 34px -12px rgba(var(--accent-rgb), .85);
}

/* Nudge the back-to-top ring clear of the rail on small screens. */
@media (max-width: 560px) {
    .fx-rail { left: 12px; bottom: 14px; gap: 8px; }
    .fx-rail-btn { height: 44px; width: 44px; }
    .fx-rail-btn svg, .fx-rail-btn i { flex-basis: 44px; width: 44px; height: 42px; }
    .fx-rail-btn.mail { display: none; }
}

/* Founder nav CTA (replaces the lens switcher on that side). */
.p-nav-cta {
    padding: 9px 18px;
    font-size: .88rem;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .p-nav-cta span { display: none; }
    .p-nav-cta { padding: 9px 14px; }
}

/* ============================================================
   27. Modal scroll fix.
   The card used to overflow by 1px (from the conic ring inset)
   which produced a horizontal scrollbar, and its own vertical
   scrollbar sat next to the screenshot pane's. Now: no ring on
   the card, no horizontal scroll, and both scrollbars themed.
   ============================================================ */
.fx-modal-card {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), .45) transparent;
}

.fx-modal-card::-webkit-scrollbar { width: 10px; }
.fx-modal-card::-webkit-scrollbar-track { background: transparent; }
.fx-modal-card::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), .38);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
}
.fx-modal-card::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), .7); background-clip: content-box; }

/* The screenshot pane is the primary scroll surface — make that obvious. */
.fx-modal-shot {
    border-color: rgba(var(--accent-rgb), .3);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .08), 0 18px 40px -26px rgba(0, 0, 0, .95);
}

.fx-modal-shot .scrollpane { max-height: min(52vh, 470px); }

.fx-modal-shot .hint {
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    z-index: 4;
}
