/* =====================================================================
   ExGear Insight — site identity layer (insight.exgear.io only)

   Loaded after the shared design-system stylesheet. Everything here is an
   override or an addition, so exgear.io, which shares that stylesheet, is
   untouched. The look is taken from the product itself: the ink-navy title
   bar, and the colour each module wears on the Main Dashboard.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    --ink: #070b1a;
    --ink-2: #0b1230;
    --ink-3: #121b3f;
    --ink-line: rgba(255, 255, 255, 0.09);
    --ink-text: #f4f6fc;
    --ink-muted: #a9b4cf;
    --marker: #ffd84a;
    --marker-ink: #0a0f24;
    --spec: linear-gradient(90deg, #2563eb, #0ea5e9, #0d9488, #d97706, #ea580c, #b91c1c, #9333ea, #4338ca);
    --m: #2563eb;
    --md: #2563eb;
    --ml: #5f8df0;
    --inverse-bg: var(--ink);
    --inverse-surface: #0f1736;
    --brand-secondary: var(--brand-primary);
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root:not([data-theme="dark"]) {
    --bg-page: #faf9f6;
    --bg-tinted: #f2f0e9;
    --border-subtle: #ebe8de;
    --border: #e1ddd0;
    --border-strong: #cdc8b9;
}

[data-theme="dark"] {
    --bg-page: #070b1a;
    --bg-raised: #0a1024;
    --bg-tinted: #0d142c;
}

/* Module colours, as on the app's Main Dashboard (TileColor.* brushes).
   --m is the app colour, --md passes AA under white text, --ml reads on ink. */
[data-m="audit"],.module-jump a[href="#audit"]{--m:#2563eb;--md:#2563eb;--ml:#5f8df0}
[data-m="risk"],.module-jump a[href="#risk"]{--m:#ea580c;--md:#c64a0a;--ml:#f35f12}
[data-m="compliance"],.module-jump a[href="#compliance"]{--m:#7c3aed;--md:#7c3aed;--ml:#a477f3}
[data-m="controls"],.module-jump a[href="#controls"]{--m:#1e40af;--md:#1e40af;--ml:#6e8ae6}
[data-m="process-library"],.module-jump a[href="#process-library"]{--m:#8b5cf6;--md:#8250f5;--ml:#a079f8}
[data-m="assets"],.module-jump a[href="#assets"]{--m:#0369a1;--md:#0369a1;--ml:#0495e5}
[data-m="it-systems"],.module-jump a[href="#it-systems"]{--m:#4338ca;--md:#4338ca;--ml:#8b85de}
[data-m="events"],.module-jump a[href="#events"]{--m:#b91c1c;--md:#b91c1c;--ml:#e86565}
[data-m="change"],.module-jump a[href="#change"]{--m:#d97706;--md:#ac5f05;--ml:#d97706}
[data-m="vendors"],.module-jump a[href="#vendors"]{--m:#9333ea;--md:#9333ea;--ml:#b36ff0}
[data-m="key-indicators"],.module-jump a[href="#key-indicators"]{--m:#0d9488;--md:#0b8177;--ml:#0ea093}
[data-m="business-continuity"],.module-jump a[href="#business-continuity"]{--m:#0f766e;--md:#0f766e;--ml:#14a196}
[data-m="training"],.module-jump a[href="#training"]{--m:#00897b;--md:#008174;--ml:#00a392}
[data-m="ethics"],.module-jump a[href="#ethics"]{--m:#6d28d9;--md:#6d28d9;--ml:#a57ae8}
[data-m="legal"],.module-jump a[href="#legal"]{--m:#64748b;--md:#64748b;--ml:#8290a5}
[data-m="ai-governance"],.module-jump a[href="#ai-governance"]{--m:#0d9488;--md:#0b8177;--ml:#0ea093}
[data-m="evidence"],.module-jump a[href="#evidence"]{--m:#1e40af;--md:#1e40af;--ml:#6e8ae6}
[data-m="reporting"],.module-jump a[href="#reporting"]{--m:#0e7490;--md:#0e7490;--ml:#139bc1}
[data-m="planner"],.module-jump a[href="#planner"]{--m:#0ea5e9;--md:#0a7aad;--ml:#0ea5e9}

/* ---------- 2. Base ---------- */
body::before,
body::after {
    display: none;
}

::selection {
    background: var(--marker);
    color: var(--marker-ink);
}

h1 {
    letter-spacing: -0.035em;
    line-height: 1.02;
}

h2 {
    font-size: clamp(1.9rem, 3.5vw, 3rem);
    letter-spacing: -0.032em;
    line-height: 1.06;
}

h3 {
    letter-spacing: -0.02em;
}

/* The highlighter: replaces the blue-to-violet gradient text site-wide. */
.text-gradient {
    color: var(--brand-primary);
    -webkit-text-fill-color: currentColor;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    background-image: none;
}

:is(h1, h2, h3, h4) .text-gradient {
    color: inherit;
    background-image: linear-gradient(var(--marker), var(--marker));
    background-repeat: no-repeat;
    background-position: 0 88%;
    background-size: 100% 34%;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding: 0 0.1em;
    margin: 0 -0.1em;
    border-radius: 0.08em;
    transition: background-size 0.9s var(--ease-out) 0.25s;
}

.reveal:not(.visible) .text-gradient {
    background-size: 0% 34%;
}

[data-theme="dark"] .text-gradient {
    background-image: none;
}

[data-theme="dark"] :is(h1, h2, h3, h4) .text-gradient {
    background-image: linear-gradient(var(--marker), var(--marker));
}

[data-theme="dark"] .text-gradient,
.band-dark .text-gradient {
    background-size: 100% 12%;
    background-position: 0 96%;
}

[data-theme="dark"] .reveal:not(.visible) .text-gradient,
.band-dark .reveal:not(.visible) .text-gradient {
    background-size: 0% 12%;
}

/* On the ink bands the highlighter is a full swipe with ink lettering. */
.hero h1 .text-gradient,
.page-hero h1 .text-gradient,
.band-cta h2 .text-gradient,
.cta-panel h2 .text-gradient,
.theatre h2 .text-gradient {
    color: var(--marker-ink);
    -webkit-text-fill-color: var(--marker-ink);
    background-size: 100% 84%;
    background-position: 0 62%;
    padding: 0 0.16em;
    margin: 0 -0.04em;
    border-radius: 0.12em;
}

.band-cta .reveal:not(.visible) .text-gradient,
.band-cta h2.reveal:not(.visible) .text-gradient,
.cta-panel.reveal:not(.visible) h2 .text-gradient,
.theatre .reveal:not(.visible) h2 .text-gradient {
    background-size: 0% 84%;
    color: var(--ink-text);
    -webkit-text-fill-color: var(--ink-text);
}

.hero h1 .text-gradient,
.page-hero h1 .text-gradient,
.band-cta h2 .text-gradient,
.cta-panel h2 .text-gradient,
.theatre h2 .text-gradient {
    transition: background-size 0.9s var(--ease-out) 0.35s, color 0.3s linear 0.55s, -webkit-text-fill-color 0.3s linear 0.55s;
}

@media (min-width: 641px) {
    .hero h1 .text-gradient,
    .page-hero h1 .text-gradient {
        white-space: nowrap;
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.eyebrow::before {
    content: '';
    width: 34px;
    height: 3px;
    border-radius: 2px;
    background: var(--spec);
}

.eyebrow.text-center {
    display: flex;
    justify-content: center;
}

.section-header {
    max-width: 780px;
}

.section-header--left {
    text-align: left;
    margin-left: 0;
    max-width: 860px;
}

.section-header .eyebrow {
    margin-bottom: 18px;
}

/* Scroll progress, in the module spectrum */
.scroll-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 1100;
    background: var(--spec);
    transform-origin: 0 50%;
    transform: scaleX(var(--sp, 0));
    pointer-events: none;
}

/* ---------- 3. Navigation: the app's title bar ---------- */
.nav .nav-logo span {
    color: #fff;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.72);
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.nav-links a::after {
    background: var(--marker);
    height: 3px;
    border-radius: 2px;
}

.nav.scrolled {
    background: rgba(7, 11, 26, 0.92);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid var(--ink-line);
}

.nav .theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
}

.nav .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
}

.nav-toggle span {
    background: #fff;
}

@media (max-width: 900px) {
    .nav-links {
        background: var(--ink-2);
        border-bottom: 1px solid var(--ink-line);
    }

    .nav:has(.nav-links.open) {
        background: var(--ink-2);
    }
}

/* ---------- 4. Buttons ---------- */
.btn {
    border-radius: 999px;
    letter-spacing: -0.005em;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-lg {
    padding: 0 30px;
}

.btn-primary,
.hero .btn-primary.btn-lg,
.band-cta .btn-primary.btn-lg {
    background: var(--ink);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 24px -12px rgba(7, 11, 26, 0.7);
}

.btn-primary:hover,
.hero .btn-primary.btn-lg:hover,
.band-cta .btn-primary.btn-lg:hover {
    background: var(--ink-3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 16px 30px -12px rgba(7, 11, 26, 0.75);
}

/* On ink, the primary action is the highlighter. */
.nav .btn-primary,
.hero .btn-primary,
.hero .btn-primary.btn-lg,
.page-hero .btn-primary,
.band-dark .btn-primary,
.band-cta .btn-primary,
.band-cta .btn-primary.btn-lg,
.theatre .btn-primary,
[data-theme="dark"] .btn-primary {
    background: var(--marker);
    color: var(--marker-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 30px -10px rgba(255, 216, 74, 0.55);
}

.nav .btn-primary:hover,
.hero .btn-primary:hover,
.hero .btn-primary.btn-lg:hover,
.page-hero .btn-primary:hover,
.band-dark .btn-primary:hover,
.band-cta .btn-primary:hover,
.band-cta .btn-primary.btn-lg:hover,
.theatre .btn-primary:hover,
[data-theme="dark"] .btn-primary:hover {
    background: #ffe37a;
    color: var(--marker-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 16px 40px -10px rgba(255, 216, 74, 0.7);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.38) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease-out);
}

.btn-primary:hover::after {
    transform: translateX(120%);
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--text-primary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-page);
    transform: translateY(-2px);
}

.hero .btn-secondary,
.page-hero .btn-secondary,
.theatre .btn-secondary,
.band-dark .btn-secondary,
.band-cta .btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}

.hero .btn-secondary:hover,
.page-hero .btn-secondary:hover,
.theatre .btn-secondary:hover,
.band-dark .btn-secondary:hover,
.band-cta .btn-secondary:hover {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}

/* Focus rings read on ink */
.nav a:focus-visible,
.nav button:focus-visible,
.hero a:focus-visible,
.page-hero a:focus-visible,
.theatre a:focus-visible,
.band-dark a:focus-visible,
.band-cta a:focus-visible,
.cta-panel a:focus-visible,
.footer a:focus-visible {
    outline: 2px solid var(--marker);
    outline-offset: 3px;
}

/* ---------- 5. Ink bands: aurora and grid ---------- */
.hero,
.page-hero,
.theatre,
.band-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--ink);
    color: var(--ink-text);
}

.hero::before,
.page-hero::before,
.theatre::before,
.band-cta::before {
    content: '';
    position: absolute;
    inset: -30% -10%;
    z-index: -3;
    opacity: 1;
    mix-blend-mode: normal;
    pointer-events: none;
    background:
        radial-gradient(ellipse 34% 40% at 18% 28%, rgba(37, 99, 235, 0.55), transparent 68%),
        radial-gradient(ellipse 30% 36% at 82% 22%, rgba(124, 58, 237, 0.42), transparent 68%),
        radial-gradient(ellipse 28% 30% at 62% 78%, rgba(13, 148, 136, 0.34), transparent 70%),
        radial-gradient(ellipse 22% 26% at 30% 82%, rgba(234, 88, 12, 0.22), transparent 70%);
    background-size: auto;
    filter: blur(20px);
    animation: ink-aurora 28s ease-in-out infinite alternate;
    will-change: transform;
}

.hero::after,
.page-hero::after,
.theatre::after,
.band-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(var(--ink-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
    background-size: 64px 64px;
    background-position: 50% 0;
    -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 20%, #000 20%, transparent 78%);
    mask-image: radial-gradient(ellipse 80% 75% at 50% 20%, #000 20%, transparent 78%);
    animation: none;
    transform: none;
}

@keyframes ink-aurora {
    0% { transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1); }
    50% { transform: translate3d(3%, 2%, 0) rotate(4deg) scale(1.08); }
    100% { transform: translate3d(-2%, 4%, 0) rotate(-3deg) scale(1.14); }
}

/* The signal field: a canvas insight-motion.js puts behind each hero, on the same
   layer as the grid, with its labels one layer up. Everything else in the band
   sits above both. */
.hero-field,
.field-tags {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s ease 0.15s;
}

.field-tags {
    z-index: -1;
    overflow: hidden;
}

/* The dimming behind the copy is a small mask image set by insight-motion.js,
   stretched over the canvas; the stretch is what gives it a soft edge. */
.hero-field {
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.hero-field.is-on,
.hero-field.is-on + .field-tags {
    opacity: 1;
}

.field-tag {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 10px 0 8px;
    border: 1px solid rgba(var(--c), 0.65);
    border-radius: 999px;
    background: rgba(10, 15, 36, 0.9);
    color: #eceffa;
    font: 600 11px/1 var(--font-body);
    white-space: nowrap;
    opacity: 0;
    will-change: transform, opacity;
}

.field-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgb(var(--c));
}

.fx-toggle {
    position: absolute;
    top: calc(var(--nav-height) + 16px);
    right: 20px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink-muted);
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.fx-toggle:hover,
.fx-toggle:focus-visible {
    opacity: 1;
    background: rgba(255, 255, 255, 0.14);
    color: var(--ink-text);
}

.fx-toggle:focus-visible {
    outline: 2px solid var(--marker);
    outline-offset: 2px;
}

.fx-toggle::before {
    content: '';
    width: 8px;
    height: 10px;
    border-left: 3px solid currentColor;
    border-right: 3px solid currentColor;
    box-sizing: border-box;
}

.fx-toggle[aria-pressed="true"]::before {
    width: 0;
    height: 0;
    margin-left: 3px;
    border: 6px solid transparent;
    border-left: 9px solid currentColor;
    border-right: 0;
}

.hero.fx-paused::before,
.page-hero.fx-paused::before {
    animation-play-state: paused;
}

.hero h1, .hero h2, .hero h3,
.page-hero h1, .page-hero h2, .page-hero h3,
.theatre h2, .theatre h3 {
    color: var(--ink-text);
}

.hero p,
.page-hero p,
.theatre p {
    color: var(--ink-muted);
}

.hero .hero-bg,
.hero .hero-glow {
    display: none;
}

/* ---------- 6. Home hero ---------- */
.hero.hero--stage {
    display: block;
    min-height: 0;
    padding: calc(var(--nav-height) + clamp(40px, 6vh, 64px)) 0 0;
    text-align: center;
}

.hero-top {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-weight: 500;
    color: var(--ink-text) !important;
}

.hero.hero--stage .hero-kicker {
    font-size: 0.8125rem;
    max-width: none;
    margin-bottom: 24px;
}

.hero-kicker .kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: kicker-pulse 2.4s ease-out infinite;
}

.hero-kicker a {
    color: var(--marker);
    font-weight: 600;
}

@keyframes kicker-pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
    70%, 100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
}

.hero.hero--stage h1 {
    font-size: clamp(2.5rem, 6.2vw, 5.25rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
    max-width: 15ch;
    margin: 0 auto 24px;
}

.hero.hero--stage .lede {
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    max-width: 70ch;
    margin: 0 auto 30px;
}

.hero.hero--stage .hero-actions {
    justify-content: center;
}

.hero.hero--stage .trust-bar {
    justify-content: center;
    margin-top: 28px;
    color: var(--ink-muted);
    gap: 10px 28px;
}

.hero.hero--stage .trust-bar a {
    color: var(--marker);
}

.hero-stage {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: clamp(40px, 6vh, 60px) auto 0;
    padding: 0 28px;
    perspective: 1900px;
    perspective-origin: 50% 0;
}

.stage-glow {
    position: absolute;
    inset: 6% 4% -6%;
    z-index: -1;
    background: var(--spec);
    filter: blur(90px);
    opacity: calc(0.34 + var(--p, 0) * 0.16);
    border-radius: 50%;
}

.app-window {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #0b1230;
    transform-origin: 50% 0;
    transform: rotateX(calc((1 - var(--p, 0)) * 17deg)) scale(calc(0.9 + var(--p, 0) * 0.1));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.14),
        0 2px 0 0 rgba(255, 255, 255, 0.12) inset,
        0 70px 120px -40px rgba(0, 0, 0, 0.85);
}

/* Once flat, drop the 3D transform altogether so the screenshot is drawn on the
   pixel grid instead of through a scaled layer, which softens it. */
.hero-stage.is-flat .app-window {
    transform: none;
}

.app-window-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 0 0 14px;
    background: #060a1c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    text-align: left;
}

.app-window-bar img {
    width: 16px;
    height: 16px;
}

.app-window-ctl {
    margin-left: auto;
    display: flex;
    height: 100%;
}

.app-window-ctl span {
    width: 46px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.6);
}

.app-window-ctl svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
}

.app-window > img {
    display: block;
    width: 100%;
    height: auto;
}

.app-window::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0%, transparent 28%);
    opacity: calc(1 - var(--p, 0));
}

.hero-stage .ui-fragment {
    position: absolute;
    z-index: 2;
    border-radius: 16px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.16);
    transform: translate3d(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px + (1 - var(--p, 0)) * 26px), 0);
    transition: transform 0.25s ease-out;
    animation: none;
}

.hero-stage .ui-fragment.frag-1 {
    top: 9%;
    right: -34px;
    left: auto;
    bottom: auto;
    width: 232px;
    overflow: hidden;
    background: none;
    border: 0;
    padding: 0;
}

.hero-stage .ui-fragment.frag-1 img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-stage .ui-fragment.frag-2 {
    bottom: 7%;
    left: -74px;
    top: auto;
    right: auto;
    background: #fff;
    color: var(--marker-ink);
    border: 0;
}

.hero-stage .ui-fragment.frag-2 .kpi-value {
    color: var(--marker-ink);
}

.hero-stage .ui-fragment.frag-2 .kpi-label {
    color: #4a5573;
}

.hero-stage .ui-fragment.frag-2 .icon-tile {
    background: var(--marker);
    color: var(--marker-ink);
}

.hero-frameworks {
    position: relative;
    z-index: 1;
    margin-top: clamp(56px, 8vh, 96px);
    padding: 26px 0 30px;
    border-top: 1px solid var(--ink-line);
    background: rgba(7, 11, 26, 0.55);
}

.hero .hero-frameworks .eyebrow {
    color: var(--ink-muted) !important;
    font-size: 0.75rem;
    max-width: none;
    margin: 0 auto 18px;
}

.hero .framework-badge,
.band-dark .framework-badge {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--ink-text);
    border-radius: 999px;
}

.hero .framework-badge .icon {
    color: var(--marker);
}

/* ---------- 7. Inner page heroes ---------- */
.page-hero.section {
    padding-top: calc(var(--nav-height) + clamp(56px, 9vh, 96px)) !important;
    padding-bottom: clamp(56px, 8vh, 88px) !important;
}

.page-hero .section-header {
    margin-bottom: 0;
    max-width: 900px;
}

.page-hero h1 {
    font-size: clamp(2.4rem, 5.4vw, 4.5rem);
    letter-spacing: -0.042em;
    line-height: 1;
}

.page-hero .section-header p {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    color: var(--ink-muted);
    margin-top: 22px;
}

.page-hero + .section {
    padding-top: var(--space-3xl) !important;
}

.page-hero .chip,
.page-hero .pricing-pill {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--ink-text);
}

.page-hero a:not(.btn):not(.chip) {
    color: var(--marker);
}

/* The generic .hero used by the Process Library and System Library pages */
.hero:not(.hero--stage) {
    min-height: 0;
    padding: calc(var(--nav-height) + clamp(56px, 9vh, 96px)) 0 clamp(56px, 8vh, 88px);
}

.hero:not(.hero--stage) + .section {
    padding-top: var(--space-3xl) !important;
}

.hero:not(.hero--stage) h1 {
    font-size: clamp(2.4rem, 5.4vw, 4.5rem);
    letter-spacing: -0.042em;
    line-height: 1;
}

.hero .hero-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--ink-text);
}

.hero .hero-badge span {
    background: none;
    -webkit-text-fill-color: var(--marker);
    color: var(--marker);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero .hero-stat-value {
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
}

.hero .hero-stat-label {
    color: var(--ink-muted);
}

.hero .hero-stats {
    border-top: 1px solid var(--ink-line);
}

/* ---------- 8. Cards ---------- */
.card,
.bento-card {
    position: relative;
    isolation: isolate;
    border-radius: 18px;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.card::before,
.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--tint, #2563eb) 13%, transparent), transparent 62%);
}

.card:hover::before,
.bento-card:hover::before {
    opacity: 1;
}

.card:hover,
.bento-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--tint, #2563eb) 46%, transparent);
    box-shadow: 0 22px 44px -22px color-mix(in srgb, var(--tint, #2563eb) 45%, transparent), 0 10px 22px -14px rgba(11, 16, 32, 0.18);
}

/* Accent rotation in the dashboard's own colours, so a row of cards is not
   a row of identical pale-blue icon squares. */
.card:nth-child(6n+1), .bento-card:nth-child(6n+1) { --tint: #2563eb; --tint-2: #5f8df0; }
.card:nth-child(6n+2), .bento-card:nth-child(6n+2) { --tint: #7c3aed; --tint-2: #a477f3; }
.card:nth-child(6n+3), .bento-card:nth-child(6n+3) { --tint: #0f766e; --tint-2: #14a196; }
.card:nth-child(6n+4), .bento-card:nth-child(6n+4) { --tint: #c64a0a; --tint-2: #f35f12; }
.card:nth-child(6n+5), .bento-card:nth-child(6n+5) { --tint: #4338ca; --tint-2: #8b85de; }
.card:nth-child(6n+6), .bento-card:nth-child(6n+6) { --tint: #ac5f05; --tint-2: #d97706; }

.card-icon,
.card-icon--ai,
.icon-tile {
    background: linear-gradient(140deg, var(--tint, #2563eb), var(--tint-2, #5f8df0));
    color: #fff;
    border-radius: 13px;
    box-shadow: 0 10px 20px -10px var(--tint, #2563eb), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.35s var(--ease-out);
}

.card:hover .card-icon {
    transform: translateY(-2px) rotate(-4deg) scale(1.05);
}

/* Icon tiles outside a card: ink with a highlighter glyph */
:not(.card) > .icon-tile {
    background: var(--ink);
    color: var(--marker);
    box-shadow: none;
}

[data-theme="dark"] :not(.card) > .icon-tile {
    background: rgba(255, 255, 255, 0.08);
}

.hero-stage .ui-fragment.frag-2 .icon-tile {
    background: var(--marker);
    color: var(--marker-ink);
}

.page-hero h1.text-gradient {
    color: var(--marker);
    -webkit-text-fill-color: var(--marker);
    background: none;
}

/* Closing panel on inner pages: the same ink and aurora as the home call to action */
.card.cta-panel {
    background: var(--ink);
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    color: var(--ink-text);
    box-shadow: 0 40px 80px -48px rgba(7, 11, 26, 0.7);
}

.card.cta-panel:hover {
    transform: none;
    box-shadow: 0 40px 80px -48px rgba(7, 11, 26, 0.7);
}

.card.cta-panel::before {
    inset: -40% -10%;
    opacity: 1;
    background:
        radial-gradient(ellipse 34% 44% at 14% 30%, rgba(37, 99, 235, 0.6), transparent 68%),
        radial-gradient(ellipse 30% 40% at 86% 24%, rgba(124, 58, 237, 0.45), transparent 68%),
        radial-gradient(ellipse 30% 36% at 60% 96%, rgba(13, 148, 136, 0.4), transparent 70%);
    filter: blur(24px);
    animation: ink-aurora 28s ease-in-out infinite alternate;
}

.card.cta-panel h2,
.card.cta-panel h3 {
    color: #fff;
}

.card.cta-panel p {
    color: var(--ink-muted);
}

.card.cta-panel .btn-primary {
    background: var(--marker);
    color: var(--marker-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 30px -10px rgba(255, 216, 74, 0.55);
}

.card.cta-panel .btn-primary:hover {
    background: #ffe37a;
}

.card.cta-panel .btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}

.card.cta-panel .btn-secondary:hover {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}

.feature-list li::before {
    background-color: color-mix(in srgb, var(--m) 14%, transparent);
}

/* ---------- 9. Product theatre: filmstrip and module mosaic ---------- */
.theatre {
    padding: var(--space-4xl) 0;
}

.theatre .section-header p {
    color: var(--ink-muted);
}

.theatre .eyebrow {
    color: var(--ink-muted);
}

.theatre-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: var(--space-2xl);
}

.theatre-head .section-header {
    margin-bottom: 0;
}

.film-toggle {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink-text);
    font: 600 0.8125rem var(--font-body);
    cursor: pointer;
}

.film-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
}

.film-toggle:focus-visible {
    outline: 2px solid var(--marker);
    outline-offset: 2px;
}

.film-toggle::before {
    content: '';
    width: 9px;
    height: 10px;
    border-left: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

.film-toggle[aria-pressed="true"]::before {
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-left: 10px solid currentColor;
    border-right: 0;
}

.filmstrip {
    display: grid;
    gap: 22px;
    padding: 10px 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.film-row {
    display: flex;
    gap: 22px;
    width: max-content;
}

.filmstrip.is-ready .film-row {
    animation: film-scroll 80s linear infinite;
}

.filmstrip.is-ready .film-row--rev {
    animation-duration: 96s;
    animation-direction: reverse;
}

.filmstrip:hover .film-row,
.filmstrip.is-paused .film-row {
    animation-play-state: paused;
}

@keyframes film-scroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-50% - 11px), 0, 0); }
}

.film-item {
    position: relative;
    flex: none;
    width: clamp(280px, 30vw, 440px);
    border-radius: 14px;
    overflow: hidden;
    background: #0b1230;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 24px 50px -24px rgba(0, 0, 0, 0.8);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.film-item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1400 / 820;
    object-fit: cover;
    object-position: 0 0;
}

.film-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 0 0 2px var(--ml), 0 30px 60px -24px var(--m);
}

.film-cap {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--md);
    color: #fff;
    font: 600 0.75rem var(--font-display);
    letter-spacing: 0.01em;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6);
}

.tile-mosaic {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: var(--space-3xl);
}

.mtile {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 132px;
    padding: 16px 16px 18px;
    border-radius: 16px;
    color: #fff;
    text-align: left;
    background: linear-gradient(140deg, var(--md) 0%, var(--md) 46%, var(--m) 120%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 18px 34px -22px var(--m);
    overflow: hidden;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.mtile::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(260px circle at var(--mx, 85%) var(--my, 110%), rgba(255, 255, 255, 0.3), transparent 60%),
        linear-gradient(150deg, rgba(255, 255, 255, 0.14) 0%, transparent 40%);
}

.mtile:hover {
    color: #fff;
    transform: translateY(-5px) scale(1.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 26px 50px -18px var(--m);
}

.mtile:focus-visible {
    outline: 3px solid var(--marker);
    outline-offset: 3px;
}

.mtile-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.mtile-icon .icon {
    width: 18px;
    height: 18px;
}

.mtile-name {
    font: 600 1rem/1.2 var(--font-display);
    letter-spacing: -0.015em;
}

.mtile-sub {
    font-size: 0.8125rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92);
}

.mtile-arrow {
    position: absolute;
    right: 14px;
    top: 14px;
    opacity: 0;
    transform: translate(-6px, 6px);
    transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
}

.mtile:hover .mtile-arrow,
.mtile:focus-visible .mtile-arrow {
    opacity: 1;
    transform: none;
}

.mtile--all {
    background: transparent;
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28);
    justify-content: center;
}

.mtile--all::before {
    display: none;
}

.mtile--all .mtile-name {
    color: var(--marker);
}

.mtile--all:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1.5px var(--marker);
}

/* ---------- 9b. GRC data flow (home) ----------
   One record followed down a trunk through the GRC domains. Each domain is a
   hub on the trunk that opens a frame (.flow-wrap) holding its areas, each area
   holding its own parts: three levels of nesting. As written here everything is
   shown, so the section reads without script. insight-motion.js (initFlow) adds
   .is-armed, and from then on a stage is held back until the trunk's head,
   which follows the scroll position, reaches its hub (.is-on) and its frame
   (.is-open: the same moment on a wide screen, a little later on a phone). */
.flowband {
    --flow-hub: 64px;
    --flow-gap: 28px;
    --flow-gutter: 52px;
    --flow-leaf-gap: 10px;
    --flow-pad: 20px;
}

.flowband .section-header {
    margin-bottom: 0;
}

/* The band is several screens tall, so its glow is painted once and left alone:
   no blur filter and no drift, which on a layer this size would cost on every frame. */
.theatre.flowband::before {
    inset: 0;
    filter: none;
    animation: none;
    will-change: auto;
    background:
        radial-gradient(ellipse 70% 16% at 8% 5%, rgba(37, 99, 235, 0.5), transparent 70%),
        radial-gradient(ellipse 55% 13% at 100% 9%, rgba(124, 58, 237, 0.36), transparent 70%),
        radial-gradient(ellipse 50% 12% at 0% 33%, rgba(234, 88, 12, 0.16), transparent 70%),
        radial-gradient(ellipse 55% 12% at 100% 50%, rgba(124, 58, 237, 0.22), transparent 70%),
        radial-gradient(ellipse 55% 12% at 0% 70%, rgba(37, 99, 235, 0.26), transparent 70%),
        radial-gradient(ellipse 70% 9% at 50% 99%, rgba(13, 148, 136, 0.3), transparent 70%);
}

.theatre.flowband::after {
    -webkit-mask-image: linear-gradient(#000, #000 55%, transparent 96%);
    mask-image: linear-gradient(#000, #000 55%, transparent 96%);
}

.flow {
    margin-top: var(--space-3xl);
}

.flow-stage[data-m="gov"] { --m: #ffd84a; --md: #e9bd1c; --ml: #ffd84a; --flow-glyph: var(--marker-ink); }
.flow-stage[data-m="policy"] { --m: #8b5cf6; --md: #8250f5; --ml: #b79df9; }

.flow-track {
    position: relative;
    padding-bottom: 44px;
}

.flow-trunk {
    position: absolute;
    top: 18px;
    bottom: 0;
    left: 50%;
    width: 3px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    --flow-y: 100%;
}

.flow-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, #ffd84a, #f35f12 22%, #a477f3 42%, #b79df9 58%, #6e8ae6 76%, #5f8df0 92%, #ffd84a);
    clip-path: inset(0 0 calc(100% - var(--flow-y)) 0);
}

.flow-head {
    display: none;
    position: absolute;
    left: 50%;
    top: 0;
    width: 13px;
    height: 13px;
    margin: -6.5px 0 0 -6.5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 216, 74, 0.35), 0 0 22px 6px rgba(255, 216, 74, 0.55);
    transform: translate3d(0, var(--flow-y), 0);
    will-change: transform;
}

.flow.is-armed .flow-head {
    display: block;
    transition: transform 0.2s ease-out;
}

/* The head and the fill ease towards the scroll position, so a wheel that moves in
   steps still gives a line that glides. */
.flow.is-armed .flow-fill {
    transition: clip-path 0.2s ease-out;
}

.flow.is-armed.is-done .flow-head {
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.5s ease 0.2s;
}

.flow-cap,
.flow-pass {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0 auto;
    padding: 0 14px;
    min-height: 34px;
    border-radius: 999px;
    font: 600 0.8125rem/1.2 var(--font-body);
}

.theatre .flow-cap {
    margin-bottom: 40px;
    background: var(--marker);
    color: var(--marker-ink);
    letter-spacing: 0.01em;
}

.flow-list,
.flow-leaves,
.flow-stores {
    list-style: none;
    margin: 0;
    padding: 0;
}

.flow-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--flow-hub) minmax(0, 1fr);
    column-gap: var(--flow-gap);
    align-items: center;
}

.flow-say { grid-area: 1 / 1; text-align: right; }
.flow-hub { grid-area: 1 / 2; }
.flow-wrap { grid-area: 1 / 3; }
.flow-stage:nth-child(even) .flow-say { grid-area: 1 / 3; text-align: left; }
.flow-stage:nth-child(even) .flow-wrap { grid-area: 1 / 1; }

.theatre .flow-pass {
    grid-column: 1 / -1;
    margin: 24px auto;
    border: 1px solid color-mix(in srgb, var(--ml) 55%, transparent);
    background: #0b1128;
    color: var(--ink-text);
    transition: opacity 0.4s ease, transform 0.5s var(--ease-out);
}

.flow-pass::after {
    content: '';
    width: 7px;
    height: 7px;
    margin: -3px 0 0 2px;
    border-right: 2px solid var(--ml);
    border-bottom: 2px solid var(--ml);
    transform: rotate(45deg);
}

.flow-pass-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* The words beside the hub */
.flow-say {
    transition: opacity 0.5s ease 0.05s, transform 0.6s var(--ease-out) 0.05s;
}

.flow-no {
    display: block;
    margin-bottom: 6px;
    font: 700 0.8125rem/1 var(--font-display);
    letter-spacing: 0.14em;
    color: var(--ml);
}

.theatre .flow-say h3 {
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    margin: 0;
}

.theatre .flow-say p {
    max-width: 30ch;
    margin: 8px 0 0 auto;
    font-size: 1rem;
    line-height: 1.5;
}

.theatre .flow-stage:nth-child(even) .flow-say p {
    margin-left: 0;
}

/* The hub: the module's tile, sitting on the trunk */
.flow-hub {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: var(--flow-hub);
    height: var(--flow-hub);
    border-radius: 20px;
    font-size: 1.6rem;
    color: var(--flow-glyph, #fff);
    background: linear-gradient(140deg, var(--md), var(--ml));
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--ml) 20%, transparent), 0 14px 34px -10px var(--m), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.5s ease, transform 0.5s var(--ease-out);
}

.flow-hub::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--ml);
    opacity: 0;
    pointer-events: none;
}

/* The frame a hub opens: its areas, each holding its own parts */
.flow-wrap {
    position: relative;
    padding: var(--flow-pad) 16px var(--flow-pad) var(--flow-gutter);
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--ml) 42%, transparent);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--ml) 13%, transparent), transparent 70%),
        rgba(11, 17, 40, 0.78);
    transform-origin: 0 50%;
    transition: opacity 0.45s ease 0.12s, transform 0.6s var(--ease-out) 0.12s;
}

.flow-stage:nth-child(even) .flow-wrap {
    padding: var(--flow-pad) var(--flow-gutter) var(--flow-pad) 16px;
    background:
        linear-gradient(270deg, color-mix(in srgb, var(--ml) 13%, transparent), transparent 70%),
        rgba(11, 17, 40, 0.78);
    transform-origin: 100% 50%;
}

.flow-legend {
    position: absolute;
    top: -11px;
    right: 18px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--ml) 42%, transparent);
    background: #0b1128;
    color: color-mix(in srgb, var(--ml) 72%, #fff);
    font: 700 0.6875rem/1.2 var(--font-body);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.flow-stage:nth-child(even) .flow-legend {
    right: auto;
    left: 18px;
}

/* Branches run from the hub to the middle of each area. The drawing stretches to
   the list, whose rows are equal, so no measuring is needed. */
.flow-branches {
    position: absolute;
    top: calc(var(--flow-pad) - var(--flow-leaf-gap) / 2);
    left: calc(-1 * var(--flow-gap));
    width: calc(var(--flow-gap) + var(--flow-gutter));
    height: calc(100% - var(--flow-pad) * 2 + var(--flow-leaf-gap));
    overflow: visible;
    pointer-events: none;
    clip-path: inset(-4px 0 -4px 0);
    transition: clip-path 0.6s var(--ease-out) 0.15s;
}

.flow-stage:nth-child(even) .flow-branches {
    left: auto;
    right: calc(-1 * var(--flow-gap));
    transform: scaleX(-1);
}

.flow-branches path {
    fill: none;
    stroke: var(--ml);
    stroke-width: 2;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    opacity: 0.85;
}

.flow-leaves {
    display: grid;
    grid-auto-rows: 1fr;
    gap: var(--flow-leaf-gap);
}

.flow-leaves > li {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    min-height: 46px;
    padding: 7px 10px 7px 14px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    transition: opacity 0.45s ease calc(0.3s + var(--i, 0) * 0.09s), transform 0.55s var(--ease-out) calc(0.3s + var(--i, 0) * 0.09s);
}

.flow-leaves > li::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--ml);
    box-shadow: 0 0 0 3px #0c1330;
}

.flow-stage:nth-child(even) .flow-leaves > li::before {
    left: auto;
    right: -4px;
}

.flow-leaves strong {
    color: var(--ink-text);
    font-size: 0.9375rem;
    font-weight: 600;
}

.flow-bits {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.flow-bits > span {
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--ml) 34%, transparent);
    background: color-mix(in srgb, var(--ml) 15%, transparent);
    color: color-mix(in srgb, var(--ml) 38%, #fff);
    font: 600 0.75rem/1.2 var(--font-body);
    white-space: nowrap;
}

/* Where the record lands */
.flow-end {
    position: relative;
    max-width: 940px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 40px);
    border-radius: 26px;
    background: linear-gradient(#0d1431, #0d1431) padding-box, var(--spec) border-box;
    border: 2px solid transparent;
    box-shadow: 0 40px 90px -50px rgba(95, 141, 240, 0.7);
    text-align: center;
    transition: opacity 0.6s ease, transform 0.7s var(--ease-out);
}

.theatre .flow-end-label {
    margin: 0 0 8px;
    font: 700 0.75rem/1 var(--font-body);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--marker);
}

.theatre .flow-end h3 {
    margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.flow-stores {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
    text-align: left;
}

.flow-stores > li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 12px;
    align-items: center;
    align-content: start;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--ml) 36%, transparent);
    background: color-mix(in srgb, var(--ml) 9%, transparent);
    transition: opacity 0.5s ease calc(0.25s + var(--i, 0) * 0.12s), transform 0.6s var(--ease-out) calc(0.25s + var(--i, 0) * 0.12s);
}

.flow-stores > li:nth-child(2) { --i: 1; }
.flow-stores > li:nth-child(3) { --i: 2; }

.flow-store-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 1.15rem;
    color: #fff;
    background: linear-gradient(140deg, var(--md), var(--ml));
}

.flow-stores strong {
    color: var(--ink-text);
    font: 600 1.0625rem/1.2 var(--font-display);
}

.flow-stores li > span:last-child {
    grid-column: 1 / -1;
    margin-top: 6px;
    color: var(--ink-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.flow-end-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.flow-end .chip {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--ink-text);
}

/* Held back until the head arrives. Only ever applied by the script. */
.flow.is-armed .flow-stage:not(.is-on) .flow-say {
    opacity: 0;
    transform: translate3d(18px, 0, 0);
}

.flow.is-armed .flow-stage:nth-child(even):not(.is-on) .flow-say {
    transform: translate3d(-18px, 0, 0);
}

.flow.is-armed .flow-stage:not(.is-on) .flow-hub {
    color: rgba(255, 255, 255, 0.34);
    background: #0d1431;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 0 0 transparent, inset 0 0 0 0 transparent;
    transform: scale(0.86);
}

.flow.is-armed .flow-stage.is-on .flow-hub::after {
    animation: flow-ping 0.9s var(--ease-out) 0.05s 1 both;
}

@keyframes flow-ping {
    0% { opacity: 0.9; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.75); }
}

.flow.is-armed .flow-stage:not(.is-open) .flow-wrap {
    opacity: 0;
    transform: translate3d(-22px, 0, 0) scale(0.96);
}

.flow.is-armed .flow-stage:nth-child(even):not(.is-open) .flow-wrap {
    transform: translate3d(22px, 0, 0) scale(0.96);
}

.flow.is-armed .flow-stage:not(.is-open) .flow-branches {
    clip-path: inset(-4px 100% -4px 0);
}

.flow.is-armed .flow-stage:not(.is-open) .flow-leaves > li {
    opacity: 0;
    transform: translate3d(-14px, 0, 0);
}

.flow.is-armed .flow-stage:nth-child(even):not(.is-open) .flow-leaves > li {
    transform: translate3d(14px, 0, 0);
}

.flow.is-armed .flow-pass:not(.is-on) {
    opacity: 0;
    transform: translate3d(0, -10px, 0) scale(0.94);
}

.flow.is-armed .flow-end:not(.is-on) {
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.97);
}

.flow.is-armed .flow-end:not(.is-on) .flow-stores > li {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
}

@media (max-width: 1100px) {
    .flowband {
        --flow-gap: 20px;
        --flow-gutter: 40px;
    }

    .flow-leaves > li {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }
}

/* Phones and small tablets: the trunk moves to the left edge and each stage stacks */
@media (max-width: 860px) {
    .flowband {
        --flow-hub: 48px;
        --flow-gap: 16px;
        --flow-gutter: 16px;
    }

    .flow {
        margin-top: var(--space-2xl);
    }

    .flow-trunk {
        left: calc(var(--flow-hub) / 2);
    }

    .theatre .flow-cap {
        margin: 0 0 32px;
    }

    .flow-stage,
    .flow-stage:nth-child(even) {
        grid-template-columns: var(--flow-hub) minmax(0, 1fr);
        align-items: start;
    }

    .flow-stage .flow-hub { grid-area: 1 / 1; border-radius: 15px; font-size: 1.25rem; }
    .flow-stage .flow-say,
    .flow-stage:nth-child(even) .flow-say { grid-area: 1 / 2; text-align: left; }
    .flow-stage .flow-wrap,
    .flow-stage:nth-child(even) .flow-wrap { grid-area: 2 / 2; padding: 20px 12px 12px; transform-origin: 0 0; }
    .theatre .flow-pass { grid-column: 2; margin: 8px 0 26px; min-height: 32px; padding: 5px 12px; }

    .theatre .flow-say p,
    .theatre .flow-stage:nth-child(even) .flow-say p {
        max-width: none;
        margin-left: 0;
    }

    .flow-stage .flow-legend,
    .flow-stage:nth-child(even) .flow-legend {
        left: 14px;
        right: auto;
    }

    .flow-branches,
    .flow-leaves > li::before {
        display: none;
    }

    .flow-leaves {
        grid-auto-rows: auto;
        gap: 8px;
    }

    .flow-leaves > li {
        min-height: 0;
        gap: 5px;
        padding: 8px 11px 9px;
    }

    .flow-leaves strong {
        line-height: 1.25;
    }

    .flow-bits {
        gap: 5px;
    }

    .flow-bits > span {
        padding: 3px 8px;
        font-size: 0.71875rem;
    }

    .flowband {
        padding: var(--space-3xl) 0;
    }

    .flow-stores > li {
        padding: 13px 14px;
    }

    .flow-stores li > span:last-child {
        margin-top: 2px;
    }

    .flow-end-foot {
        margin-top: 18px;
    }

    .flow-pass-label {
        white-space: nowrap;
    }

    .flow-stage {
        row-gap: 12px;
    }

    .flow.is-armed .flow-stage:not(.is-on) .flow-say,
    .flow.is-armed .flow-stage:nth-child(even):not(.is-on) .flow-say {
        transform: translate3d(14px, 0, 0);
    }

    .flow.is-armed .flow-stage:not(.is-open) .flow-wrap,
    .flow.is-armed .flow-stage:nth-child(even):not(.is-open) .flow-wrap {
        transform: translate3d(0, 14px, 0) scale(0.98);
    }

    .flow.is-armed .flow-stage:not(.is-open) .flow-leaves > li,
    .flow.is-armed .flow-stage:nth-child(even):not(.is-open) .flow-leaves > li {
        transform: translate3d(0, 10px, 0);
    }

    .flow-end {
        border-radius: 20px;
    }

    .flow-stores {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 18px;
    }
}

/* ---------- 9c. Mini data flows ----------
   A small drawn flow that stands where a card would otherwise hold a screenshot:
   used for the parts of the product the site describes but does not picture (see
   the note in tools/screenshots/import-help-shots.py). It is an ordinary list in
   a figure, inside a .miniflow box that is sized off its own width so it sits level with a screenshot beside it,
   and takes its colour from data-m like any module. .miniflow--wide lays the
   steps out in a row when there is room; .miniflow-gantt draws a timeline.
   The only motion is a one-off entrance when the card is revealed. */
.miniflow {
    container-type: inline-size;
    position: relative;
    isolation: isolate;
    margin: 0;
    background:
        radial-gradient(ellipse 75% 70% at 0% 0%, color-mix(in srgb, var(--m) 48%, transparent), transparent 70%),
        radial-gradient(ellipse 60% 60% at 100% 100%, color-mix(in srgb, var(--m) 26%, transparent), transparent 70%),
        var(--ink-2);
    color: var(--ink-text);
}

.miniflow.card-image--whole {
    border-color: color-mix(in srgb, var(--ml) 30%, var(--ink-3));
}

/* A faint grid, as on the ink bands. The glow is the figure's own background,
   because a .card already uses ::before for its pointer light. */
.miniflow::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(var(--ink-line) 1px, transparent 1px), linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(120deg, transparent 20%, #000);
    mask-image: linear-gradient(120deg, transparent 20%, #000);
    opacity: 0.7;
}

.miniflow-in {
    box-sizing: border-box;
    margin: 0;
    aspect-ratio: 1400 / 820;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(8px, 2.6cqw, 16px);
    padding: clamp(12px, 4.2cqw, 26px) clamp(14px, 4.8cqw, 30px);
}

.miniflow-cap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-text);
    font: 700 clamp(0.75rem, 3.1cqw, 0.9375rem)/1.2 var(--font-display, var(--font-body));
}

.miniflow-tag {
    flex: none;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--marker);
    color: var(--marker-ink);
    font: 800 0.78em/1.2 var(--font-body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.miniflow-steps,
.miniflow-gantt {
    position: relative;
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.miniflow-steps {
    --hub: clamp(24px, 7.4cqw, 40px);
    --gap: clamp(5px, 1.9cqw, 12px);
    gap: var(--gap);
}

.miniflow-steps > li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: clamp(8px, 2.8cqw, 14px);
    min-width: 0;
    margin: 0;
}

/* The trunk, drawn hub to hub so it holds however tall a step's text runs */
.miniflow-steps > li:not(:last-child)::before {
    content: '';
    position: absolute;
    top: calc(var(--hub) / 2);
    bottom: calc(var(--hub) / -2 - var(--gap));
    left: calc(var(--hub) / 2 - 1px);
    width: 2px;
    background: var(--ml);
}

.miniflow-steps > li:nth-last-child(2)::before {
    background: linear-gradient(180deg, var(--ml), var(--marker));
}

.miniflow-hub {
    position: relative;
    z-index: 1;
    flex: none;
    display: grid;
    place-items: center;
    width: var(--hub);
    height: var(--hub);
    border-radius: 30%;
    font-size: calc(var(--hub) * 0.5);
    color: #fff;
    background: linear-gradient(140deg, var(--md), var(--ml));
    box-shadow: 0 0 0 3px var(--ink-2), 0 0 0 4px color-mix(in srgb, var(--ml) 50%, transparent);
}

/* Where the flow comes out */
.miniflow-steps > li:last-child .miniflow-hub {
    background: var(--marker);
    color: var(--marker-ink);
    box-shadow: 0 0 0 3px var(--ink-2), 0 0 0 4px rgba(255, 216, 74, 0.5);
}

.miniflow-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    gap: 4px clamp(6px, 2cqw, 10px);
    min-width: 0;
    min-height: var(--hub);
}

.miniflow-text strong {
    color: var(--ink-text);
    font: 600 clamp(0.75rem, 3.5cqw, 1rem)/1.2 var(--font-body);
}

.miniflow-bits {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 5px;
}

.miniflow-bits > span {
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--ml) 36%, transparent);
    background: color-mix(in srgb, var(--ml) 16%, transparent);
    color: color-mix(in srgb, var(--ml) 34%, #fff);
    font: 600 clamp(0.65625rem, 2.8cqw, 0.78125rem)/1.3 var(--font-body);
    white-space: nowrap;
}

/* A row of steps, for a slot as wide as the page */
.miniflow--wide .miniflow-in {
    aspect-ratio: auto;
    gap: clamp(14px, 2.2cqw, 26px);
    padding: clamp(18px, 3.4cqw, 40px) clamp(16px, 3.6cqw, 44px);
}

.miniflow--wide .miniflow-cap {
    font-size: clamp(0.8125rem, 1.5cqw, 1.0625rem);
}

@container (min-width: 760px) {
    .miniflow--wide .miniflow-steps {
        --hub: 52px;
        --gap: 20px;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        align-items: start;
    }

    .miniflow--wide .miniflow-steps > li:not(:last-child)::before {
        top: calc(var(--hub) / 2 - 1px);
        bottom: auto;
        left: calc(var(--hub) / 2);
        width: calc(100% + var(--gap));
        height: 2px;
    }

    .miniflow--wide .miniflow-steps > li:nth-last-child(2)::before {
        background: linear-gradient(90deg, var(--ml), var(--marker));
    }

    .miniflow--wide .miniflow-steps > li {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .miniflow--wide .miniflow-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        min-height: 0;
    }

    .miniflow--wide .miniflow-text strong {
        font-size: 1.0625rem;
    }

    .miniflow--wide .miniflow-bits > span {
        padding: 3px 9px;
        font-size: 0.78125rem;
    }
}

/* A timeline: one bar per phase on a ruled track */
.miniflow-gantt {
    --label: clamp(62px, 24cqw, 120px);
    gap: clamp(6px, 2.2cqw, 13px);
}

.miniflow-gantt > li {
    display: grid;
    grid-template-columns: var(--label) minmax(0, 1fr);
    align-items: center;
    margin: 0;
    color: var(--ink-text);
    font: 600 clamp(0.71875rem, 3.2cqw, 0.9375rem)/1.2 var(--font-body);
}

.miniflow-track {
    position: relative;
    height: clamp(14px, 5cqw, 26px);
    border-radius: 6px;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 12.5%),
        rgba(255, 255, 255, 0.04);
}

.miniflow-bar {
    position: absolute;
    top: 18%;
    bottom: 18%;
    left: calc(var(--s) * 1%);
    width: calc(var(--w) * 1%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--md), var(--ml));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ml) 60%, transparent), 0 6px 16px -6px var(--m);
    transform-origin: 0 50%;
}

.miniflow-gantt > li:last-child .miniflow-bar {
    background: var(--marker);
    box-shadow: 0 0 0 1px rgba(255, 216, 74, 0.6);
}

/* A milestone at the end of a phase */
.miniflow-bar.is-mile::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 0 0 2px var(--ink-2);
    transform: translateY(-50%) rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
    .visible .miniflow-steps > li {
        animation: miniflow-step 0.5s var(--ease-out) both;
        animation-delay: calc(var(--i, 0) * 0.13s + 0.35s);
    }

    .visible .miniflow-bar {
        animation: miniflow-bar 0.7s var(--ease-out) both;
        animation-delay: calc(var(--i, 0) * 0.14s + 0.35s);
    }
}

@keyframes miniflow-step {
    from { opacity: 0; transform: translateY(8px); }
}

@keyframes miniflow-bar {
    from { opacity: 0; transform: scaleX(0); }
}

/* ---------- 10. Section furniture ---------- */
.tabs-container {
    border-radius: 22px;
    border-color: var(--border);
    box-shadow: 0 40px 80px -48px rgba(11, 16, 32, 0.35);
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn.active::after {
    height: 4px;
    background: var(--marker);
}

.tab-btn.active .tab-icon {
    color: var(--brand-primary);
}

.tab-pane .tab-image,
.tab-pane img {
    border-radius: 12px;
}

.chip {
    border-radius: 999px;
}

/* Step numerals (replace emoji keycaps) */
.step-num {
    display: inline-block;
    margin-bottom: var(--space-md);
    padding: 0 0.14em;
    font: 600 2.6rem/1 var(--font-display);
    letter-spacing: -0.04em;
    color: var(--text-primary);
    background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 90% / 100% 32%;
}

[data-theme="dark"] .step-num {
    background-size: 100% 12%;
    background-position: 0 100%;
}

/* Stat band and closing call to action */
.band-dark {
    background: var(--ink);
}

.band-dark .stat-value,
.band-cta .stat-value {
    font-size: clamp(2.6rem, 5vw, 4.25rem);
    letter-spacing: -0.04em;
    color: #fff;
}

.band-dark .stat-band-item {
    position: relative;
}

.band-dark .stat-band-item::before {
    content: '';
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 2px;
    margin: 0 auto 18px;
    background: var(--marker);
}

.band-cta h2 {
    font-size: clamp(2.2rem, 4.6vw, 3.9rem);
    letter-spacing: -0.04em;
    line-height: 1.02;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}

.band-cta p {
    color: var(--ink-muted);
}

.footer {
    background: var(--ink);
    border-top: 0;
}

.footer::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--spec);
}

/* Pricing */
.comparison-table thead tr {
    background: var(--ink);
}

[data-theme="dark"] .comparison-table thead tr {
    background: var(--ink-3);
}

.sticky-cta {
    background: var(--ink-2);
    border-top: 1px solid var(--ink-line);
}

.sticky-cta .btn-primary {
    background: var(--marker);
    color: var(--marker-ink);
    box-shadow: none;
}

.sticky-cta .btn-secondary {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.sticky-cta .btn-secondary:hover {
    background: #fff;
    color: var(--ink);
}

.waitlist-btn {
    background: var(--ink);
    border-radius: 999px;
}

[data-theme="dark"] .waitlist-btn {
    background: var(--marker);
    color: var(--marker-ink);
}

.pricing-card.popular,
.card.popular {
    border-color: var(--text-primary);
    box-shadow: 0 30px 60px -36px rgba(11, 16, 32, 0.5);
}

.pricing-card.popular::before {
    background: var(--marker);
    color: var(--marker-ink);
}

/* Screens in frames pick up a soft coloured floor */
.app-frame {
    border-radius: 14px;
}

.shot-card .app-frame,
.card-image--whole {
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

/* ---------- 11. Modules page ---------- */
.module-jump-bar {
    position: sticky;
    top: var(--nav-height);
    z-index: 900;
    background: color-mix(in srgb, var(--bg-page) 86%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    border-bottom: 1px solid var(--border-subtle);
}

.module-jump-bar .module-jump {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 40px), transparent);
}

.module-jump-bar .module-jump::-webkit-scrollbar {
    display: none;
}

.module-jump-bar .chip {
    flex: none;
    gap: 8px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.module-jump-bar .chip::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--m);
    transition: transform 0.2s ease;
}

.module-jump-bar .chip:hover {
    border-color: var(--m);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.module-jump-bar .chip.is-current {
    background: var(--md);
    border-color: var(--md);
    color: #fff;
}

.module-jump-bar .chip.is-current::before {
    background: #fff;
}

body {
    counter-reset: mod;
}

.showcase-row[data-m] {
    counter-increment: mod;
}

.showcase-row[data-m] .showcase-text::before {
    content: counter(mod, decimal-leading-zero) ' / 19';
    display: block;
    margin-bottom: 14px;
    padding-left: 46px;
    font: 600 0.75rem var(--font-display);
    letter-spacing: 0.16em;
    color: var(--md);
    background: linear-gradient(var(--m), var(--m)) no-repeat 0 50% / 34px 3px;
}

[data-theme="dark"] .showcase-row[data-m] .showcase-text::before {
    color: var(--ml);
}

.showcase-row .showcase-text h3 {
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.showcase-media {
    position: relative;
    isolation: isolate;
}

.showcase-row[data-m] .showcase-media::before {
    content: '';
    position: absolute;
    inset: 12% 4% -8% 4%;
    z-index: -1;
    border-radius: 40%;
    background: var(--m);
    opacity: 0.28;
    filter: blur(56px);
}

.showcase-row[data-m] .app-frame {
    border-top: 4px solid var(--m);
    box-shadow: 0 0 0 1px var(--border-subtle), 0 34px 60px -34px color-mix(in srgb, var(--m) 60%, #0b1020);
    transition: transform 0.9s var(--ease-out), box-shadow 0.4s ease;
}

.showcase-row.reveal:not(.visible) .app-frame {
    transform: perspective(1400px) rotateY(-9deg) rotateX(3deg) scale(0.96);
}

.showcase-row.reveal:nth-child(even):not(.visible) .app-frame {
    transform: perspective(1400px) rotateY(9deg) rotateX(3deg) scale(0.96);
}

.showcase-row[data-m] .btn-secondary:hover {
    background: var(--md);
    border-color: var(--md);
    color: #fff;
}

/* ---------- 12. Dark theme ---------- */
[data-theme="dark"] .btn-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #fff;
    color: var(--ink);
}

[data-theme="dark"] .pricing-card.popular,
[data-theme="dark"] .card.popular {
    border-color: var(--marker);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .bento-card:hover {
    box-shadow: 0 22px 44px -22px color-mix(in srgb, var(--tint-2, #5f8df0) 55%, transparent);
}

[data-theme="dark"] .tab-btn.active {
    color: #fff;
}

/* ---------- 13. Responsive ---------- */
@media (max-width: 1420px) {
    .hero-stage .ui-fragment { display: none; }
}

@media (max-width: 1100px) {
    .tile-mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .tile-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .theatre-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    .hero.hero--stage { text-align: left; }
    .hero-top { align-items: flex-start; }
    .hero.hero--stage h1 { margin-left: 0; max-width: none; }
    .hero.hero--stage .lede { margin-left: 0; }
    .hero.hero--stage .hero-actions,
    .hero.hero--stage .trust-bar { justify-content: flex-start; }
    .hero-kicker .kicker-label,
    .hero-kicker .kicker-sep { display: none; }
    .hero-stage { padding: 0 16px; }
    .app-window { border-radius: 10px; transform: rotateX(calc((1 - var(--p, 0)) * 10deg)) scale(calc(0.96 + var(--p, 0) * 0.04)); }
    .app-window-bar { height: 28px; }
    .app-window-ctl span { width: 32px; }
    .tile-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .mtile { min-height: 0; padding: 12px; flex-direction: row; align-items: center; gap: 10px; }
    .mtile-icon { margin: 0; flex: none; }
    .mtile-sub, .mtile-arrow { display: none; }
    .mtile-name { font-size: 0.875rem; }
    .film-item { width: 260px; }
    .filmstrip { gap: 14px; }
    .film-row { gap: 14px; }
    .page-hero .section-header { text-align: left; }
    .band-dark .stat-band-item::before { margin-left: auto; margin-right: auto; }
}

/* Heading levels follow the page outline (no h2 straight to h4), so a heading
   that should look a level smaller than its tag says so with one of these.
   The footer's column titles are h2 in the outline and small caps to the eye. */
.as-h3 {
    font-family: var(--font-display) !important;
    font-size: var(--text-heading-lg) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
}

.as-h4 {
    font-family: var(--font-body) !important;
    font-size: var(--text-heading-md) !important;
    line-height: 1.35 !important;
    letter-spacing: -0.01em !important;
}

.card .as-h3 {
    margin-bottom: var(--space-sm);
}

.card h3.as-h4 {
    margin-bottom: 0;
}

.footer .footer-heading {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--inverse-secondary);
    margin-bottom: var(--space-md);
}

/* Violet chip text on a tinted band fell just short of 4.5:1 in the light theme. */
html:not([data-theme="dark"]) .chip-secondary,
html:not([data-theme="dark"]) .chip-ai {
    color: #6d28d9;
}

/* A link inside muted body text is told apart by more than its colour. */
p.text-muted a:not(.btn) {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.table-wrapper:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* A screenshot that enlarges is a control: show where the keyboard is. The ring sits
   inside the image because most frames clip what falls outside them. */
img[role="button"]:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: -3px;
}

.lightbox-close:focus-visible {
    outline: 3px solid var(--marker);
    outline-offset: 3px;
}

/* ---------- 13b. Hero entrance, without script ----------
   Everything else on the page reveals when core.js sees it scroll into view.
   The first screen must not wait for a script, so in the hero the same
   entrance is a CSS animation that starts with the first paint. The headline
   (and the dashboard under it) is on screen from that first paint and only
   slides into place: an element that starts invisible is not counted as
   painted, by people or by Largest Contentful Paint. */
.hero .reveal,
.page-hero .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: none;
    animation: hero-in 0.6s var(--ease-reveal) backwards;
}

.hero h1.reveal,
.hero .hero-content.reveal,
.hero .hero-stage.reveal,
.page-hero .section-header.reveal {
    animation-name: hero-rise;
}

.hero .rd-1, .page-hero .rd-1 { animation-delay: 60ms; }
.hero .rd-2, .page-hero .rd-2 { animation-delay: 120ms; }
.hero .rd-3, .page-hero .rd-3 { animation-delay: 180ms; }
.hero .rd-4, .page-hero .rd-4 { animation-delay: 240ms; }
.hero .rd-5, .page-hero .rd-5 { animation-delay: 300ms; }

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

@keyframes hero-rise {
    from { transform: translateY(16px); }
}

/* The highlighter swipes across the hero headline on its own clock too. */
.hero .reveal:not(.visible) h1 .text-gradient,
.hero h1.reveal:not(.visible) .text-gradient,
.page-hero .reveal:not(.visible) h1 .text-gradient {
    background-size: 100% 84%;
    color: var(--marker-ink);
    -webkit-text-fill-color: var(--marker-ink);
}

.hero .reveal h1 .text-gradient,
.hero h1.reveal .text-gradient,
.page-hero .reveal h1 .text-gradient {
    transition: none;
    animation: marker-swipe 0.9s var(--ease-out) 0.4s backwards, marker-ink 0.3s linear 0.6s backwards;
}

@keyframes marker-swipe {
    from { background-size: 0% 84%; }
}

@keyframes marker-ink {
    from { color: var(--ink-text); -webkit-text-fill-color: var(--ink-text); }
}

/* ---------- 14. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero::before,
    .page-hero::before,
    .theatre::before,
    .band-cta::before,
    .card.cta-panel::before,
    .hero-kicker .kicker-dot,
    .filmstrip.is-ready .film-row {
        animation: none !important;
    }

    .filmstrip {
        overflow-x: auto;
    }

    .app-window {
        transform: none;
    }

    .text-gradient,
    .reveal:not(.visible) .text-gradient,
    .hero-field,
    .field-tags {
        transition: none;
    }

    .hero .reveal,
    .page-hero .reveal,
    .hero .reveal h1 .text-gradient,
    .hero h1.reveal .text-gradient,
    .page-hero .reveal h1 .text-gradient {
        animation: none !important;
    }

    .showcase-row.reveal:not(.visible) .app-frame {
        transform: none;
    }

    .btn-primary::after {
        display: none;
    }

    .scroll-progress {
        display: none;
    }

    .flow *,
    .flow *::after {
        transition: none !important;
        animation: none !important;
    }
}
