/* =============================================================================
   CURES-AI-UDS — design system

   Direction follows the house language: warm near-white paper, near-black ink,
   and exactly one "signal" colour — a spectral cyan reserved for the active
   evidence path through the pipeline. It is never a default button fill. If
   everything is signal, nothing is.

   The page is light-first. Dark is used as a deliberate material for
   "instrument" surfaces (the trace scenes, the simulator), not as a parallel
   theme, so contrast is designed once rather than twice.
   ========================================================================== */

:root {
    /* ---------------------------------------------------------- neutrals */
    --paper: #f7f7f4;
    --ink: #0a0a0a;

    --n0: #ffffff;
    --n25: #fbfbf9;
    --n50: #f7f7f4;
    --n100: #efefea;
    --n200: #e3e3de;
    --n300: #cfcfc8;
    --n400: #949490;
    --n500: #70706b;
    --n600: #585853;
    --n700: #43433f;
    --n800: #2e2e2b;
    --n900: #1a1a18;
    --n950: #0a0a0a;

    /* ------------------------------------------------------------ signal */
    --s50: #e6fbfb;
    --s100: #c2f5f5;
    --s200: #8debec;
    --s300: #4fdcdf;
    --s400: #1fc5cb;
    --s500: #00a8b0;
    --s600: #008a93;
    --s700: #006c75;
    --s800: #00525a;
    --s900: #003b42;

    /* ------------------------------------------------------------ status */
    --positive: #1a7b58;
    --positive-soft: #e7f4ef;
    --caution: #9a5e06;
    --caution-soft: #fbf1e2;
    --critical: #b3261e;
    --critical-soft: #fbeae8;

    /* -------------------------------------------------------- typography */
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

    /* ------------------------------------------------------------ layout */
    --content: 1320px;
    --prose: 720px;
    --headline: 1000px;
    --nav-h: 60px;

    /* ------------------------------------------------------------ radius */
    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 10px;
    --r-lg: 12px;
    --r-xl: 16px;

    /* ------------------------------------------------------------ easing */
    --ease: cubic-bezier(0.2, 0, 0, 1);
    --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);

    /* Shadows are deliberately almost invisible — this design uses rules. */
    --shadow-panel: 0 1px 2px rgb(10 10 10 / 0.04), 0 8px 24px -12px rgb(10 10 10 / 0.1);
    --shadow-raised: 0 1px 2px rgb(10 10 10 / 0.06), 0 16px 40px -16px rgb(10 10 10 / 0.16);

    --eyebrow-color: var(--n500);
    --rule: var(--n200);

    color-scheme: light;
}

/* --- Base --------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    border-color: var(--rule);
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body.is-locked {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

table {
    border-collapse: collapse;
    width: 100%;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 500;
    text-wrap: balance;
    letter-spacing: -0.022em;
}

p {
    text-wrap: pretty;
}

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

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

/* Numerals in metrics must not shift width as they animate. */
.tabular,
[data-numeric] {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* --- Layout primitives -------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--content);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

@media (min-width: 48rem) {
    .container {
        padding-inline: 2.5rem;
    }
}

.section {
    padding-block: clamp(5rem, 10vw, 8rem);
}

.rule-top {
    border-top: 1px solid var(--rule);
}

.prose {
    max-width: var(--prose);
}

/* Eyebrow labels: small, spaced, uppercase — the "instrument" voice. */
.eyebrow {
    display: block;
    font-family: var(--mono);
    font-size: 0.6875rem;
    line-height: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--eyebrow-color);
    margin: 0;
}

.headline {
    max-width: var(--headline);
    font-size: clamp(1.875rem, 3.4vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.lede {
    max-width: var(--prose);
    margin: 1.25rem 0 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--n600);
}

.section-grid {
    display: grid;
    gap: 3rem;
}

@media (min-width: 64rem) {
    .section-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
        gap: 5rem;
    }
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background-color 180ms var(--ease), border-color 180ms var(--ease),
        color 180ms var(--ease), opacity 180ms var(--ease);
}

.btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Solid ink is the default CTA. The signal colour is reserved for the
   evidence path itself, so it is deliberately not a button fill here. */
.btn-primary {
    background: var(--ink);
    color: var(--n0);
}

.btn-primary:hover {
    background: var(--n800);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--n300);
}

.btn-secondary:hover {
    border-color: var(--n400);
    background: rgb(239 239 234 / 0.6);
}

.btn-sm {
    height: 32px;
    padding-inline: 0.75rem;
    font-size: 13px;
    border-radius: var(--r-xs);
}

.btn-md {
    height: 40px;
    padding-inline: 1rem;
    font-size: 14px;
    border-radius: var(--r-sm);
}

.btn-lg {
    height: 48px;
    padding-inline: 1.5rem;
    font-size: 15px;
    border-radius: var(--r-md);
}

/* Inline text link with a nudging arrow. */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
}

.link-arrow span {
    transition: transform 200ms var(--ease);
}

.link-arrow:hover span {
    transform: translateX(2px);
}

/* --- Navigation --------------------------------------------------------- */

#nav {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    transition: background-color 300ms var(--ease), border-color 300ms var(--ease),
        backdrop-filter 300ms var(--ease);
}

#nav.scrolled {
    background: rgb(247 247 244 / 0.8);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border-bottom-color: rgb(227 227 222 / 0.8);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: var(--nav-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 15px;
    font-weight: 550;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.logo-mark {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-list {
    display: none;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--r-xs);
    font-size: 13.5px;
    color: var(--n600);
    transition: color 150ms var(--ease);
}

.nav-list a:hover {
    color: var(--ink);
}

.nav-cta {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

#nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: -0.5rem;
    border-radius: var(--r-sm);
    color: var(--ink);
}

@media (min-width: 64rem) {
    .nav-list,
    .nav-cta {
        display: flex;
    }

    #nav-toggle {
        display: none;
    }
}

#mobile-nav {
    display: none;
    border-top: 1px solid var(--rule);
    background: var(--paper);
    padding: 0.5rem 1.25rem 1.5rem;
}

#mobile-nav.open {
    display: block;
}

#mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#mobile-nav a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
}

/* --- Instrument surface ------------------------------------------------- */
/* Dark material for scenes that read as an instrument rather than a page. */

.instrument {
    position: relative;
    background: var(--n950);
    color: var(--n100);
    border-radius: var(--r-lg);
    overflow: hidden;
    --rule: var(--n800);
    --eyebrow-color: var(--n300);
}

.instrument-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--n800);
}

.instrument-bar .meta {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--n500);
}

.instrument-foot {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--n800);
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--n500);
}

/* --- Hero --------------------------------------------------------------- */

#hero {
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-h);
}

.hero-grid {
    position: relative;
    display: grid;
    align-items: center;
    gap: 3rem;
    min-height: calc(100dvh - var(--nav-h));
    padding-block: 4rem;
}

@media (min-width: 64rem) {
    .hero-grid {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
        gap: 2rem;
        padding-block: 0;
    }
}

.hero-copy {
    position: relative;
    z-index: 10;
    max-width: 36rem;
}

.hero-title {
    margin-top: 1.5rem;
    font-size: clamp(2.5rem, 6.2vw, 4.25rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 500;
}

.hero-lede {
    margin: 1.75rem 0 0;
    max-width: 46ch;
    font-size: 17px;
    line-height: 1.6;
    color: var(--n600);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.25rem;
}

.hero-note {
    margin-top: 2rem;
    font-size: 13px;
    color: var(--n500);
}

.hero-stage {
    position: relative;
    width: 100%;
    height: 380px;
    display: grid;
    place-items: center;
}

@media (min-width: 40rem) {
    .hero-stage {
        height: 460px;
    }
}

@media (min-width: 64rem) {
    .hero-stage {
        height: 560px;
    }
}

/* Ambient field of drifting feature names behind the hero object. */
#hero-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    /* Fade the field out behind the study card so phrases never appear to be
       chopped in half by its edge. */
    mask-image: radial-gradient(closest-side ellipse at 50% 50%, transparent 38%, #000 66%);
    -webkit-mask-image: radial-gradient(closest-side ellipse at 50% 50%, transparent 38%, #000 66%);
}

#hero-field span {
    position: absolute;
    white-space: nowrap;
    font-family: var(--mono);
    letter-spacing: -0.01em;
    transform: translate(-50%, -50%) translate(var(--dx, 0px), var(--dy, 0px));
    transition: color 300ms var(--ease);
    color: color-mix(in oklab, var(--n400), var(--s700) calc(var(--near, 0) * 100%));
}

/* The hero object: a urodynamic trace card that draws itself.
   Centred by the grid rather than by a translate, so the scroll timeline can
   own `transform` outright — GSAP's xPercent would otherwise replace the
   centring translate and knock the card out of position. */
.trace-card {
    position: relative;
    grid-area: 1 / 1;
    width: min(420px, 88%);
    background: var(--n0);
    border: 1px solid var(--n200);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-raised);
    overflow: hidden;
}

.trace-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--n200);
}

.trace-card-head .t {
    font-size: 13px;
    font-weight: 500;
}

.trace-card-head .m {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--n500);
}

.trace-plot {
    display: block;
    width: 100%;
    height: 150px;
    background: var(--n25);
}

.trace-card-foot {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--n200);
}

.trace-card-foot div {
    padding: 0.7rem 1rem;
}

.trace-card-foot div + div {
    border-left: 1px solid var(--n200);
}

.trace-card-foot dt {
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--n500);
}

.trace-card-foot dd {
    margin: 0.25rem 0 0;
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 500;
}

.hero-handoff {
    position: absolute;
    right: 0;
    top: 50%;
    margin-top: -3.5rem;
    max-width: 14rem;
    opacity: 0;
    pointer-events: none;
    display: none;
}

@media (min-width: 64rem) {
    .hero-handoff {
        display: block;
    }
}

.hero-handoff p:last-child {
    margin: 0.75rem 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--n600);
}

/* --- Word-rise headline reveal ------------------------------------------ */

.mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-block: 0.06em;
    margin-block: -0.06em;
}

.mask > span {
    display: inline-block;
    transform: translateY(110%);
}

.mask.in > span {
    animation: word-rise 0.9s var(--ease-entrance) forwards;
}

@keyframes word-rise {
    to {
        transform: translateY(0);
    }
}

/* --- Fade-up reveal ----------------------------------------------------- */

.fade {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.7s var(--ease-entrance), transform 0.7s var(--ease-entrance);
}

.fade.in {
    opacity: 1;
    transform: none;
}

/* --- Stat rows ---------------------------------------------------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1.5rem;
    margin: 0;
}

@media (min-width: 64rem) {
    .stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.stat {
    min-width: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0.75rem;
}

.stat dt {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--eyebrow-color);
}

.stat dd {
    margin: 0.5rem 0 0;
}

.stat .v {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: clamp(1.875rem, 3vw, 2.25rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat .u {
    font-size: 14px;
    color: var(--n500);
    font-weight: 400;
}

.stat .n {
    display: block;
    margin-top: 0.5rem;
    font-size: 13px;
    line-height: 1.5;
    color: var(--n500);
}

/* --- Workflow scene ----------------------------------------------------- */

#workflow {
    position: relative;
}

.wf-layout {
    display: grid;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 64rem) {
    .wf-layout {
        grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
        gap: 4rem;
        min-height: calc(100dvh - var(--nav-h));
        align-content: center;
        padding-block: 3rem;
    }
}

/* Stage rail */
.wf-rail {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wf-step {
    position: relative;
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    gap: 1rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--rule);
    color: var(--n400);
    transition: color 280ms var(--ease);
    text-align: left;
    width: 100%;
    align-items: start;
}

.wf-step:last-child {
    border-bottom: 1px solid var(--rule);
}

.wf-step .idx {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    padding-top: 0.2rem;
    color: var(--n400);
    transition: color 280ms var(--ease);
}

.wf-step .ttl {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--n500);
    transition: color 280ms var(--ease);
    letter-spacing: -0.015em;
}

/* Must be block: max-height has no effect on an inline element, so an inline
   description would keep reserving its full height while invisible. */
.wf-step .dsc {
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--n500);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 400ms var(--ease), opacity 280ms var(--ease),
        margin 400ms var(--ease);
}

.wf-step[data-active="true"] .idx {
    color: var(--s600);
}

.wf-step[data-active="true"] .ttl {
    color: var(--ink);
}

.wf-step[data-active="true"] .dsc {
    max-height: 12rem;
    opacity: 1;
    margin-top: 0.4rem;
}

/* Progress hairline that fills as the scene advances. */
.wf-step .bar {
    position: absolute;
    left: 0;
    top: -1px;
    height: 1px;
    width: 0;
    background: var(--s500);
    transition: width 280ms var(--ease);
}

.wf-step[data-active="true"] .bar {
    width: 100%;
}

/* Scene */
.wf-scene {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

@media (min-width: 64rem) {
    .wf-scene {
        min-height: 440px;
    }
}

.wf-scene .instrument-bar {
    flex-shrink: 0;
}

/* Panels are stacked, so the scene never reflows as stages change. */
.wf-panels {
    position: relative;
    flex: 1;
    min-height: 0;
}

.wf-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 380ms var(--ease), transform 380ms var(--ease), visibility 380ms;
    display: flex;
    flex-direction: column;
}

.wf-panel[data-active="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.wf-body {
    flex: 1;
    padding: 1.25rem;
    min-height: 0;
    overflow: hidden;
}

/* Scene 1 — raw trace with phase shading */
.scene-plot {
    display: block;
    width: 100%;
    height: 210px;
}

.phase-key {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1rem;
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--n400);
}

.phase-key span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.phase-key i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* Scene 2 — extracted feature grid */
.feat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--n800);
    border: 1px solid var(--n800);
    border-radius: var(--r-sm);
    overflow: hidden;
    margin-top: 1rem;
}

@media (min-width: 30rem) {
    .feat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.feat {
    background: var(--n950);
    padding: 0.75rem 0.85rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.wf-panel[data-active="true"] .feat {
    opacity: 1;
    transform: none;
}

.feat dt {
    font-family: var(--mono);
    font-size: 0.625rem;
    color: var(--n500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feat dd {
    margin: 0.3rem 0 0;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--n100);
}

/* Scene 3 — label probabilities */
.prob-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.prob {
    display: grid;
    grid-template-columns: minmax(88px, 122px) 1fr 42px;
    align-items: center;
    gap: 0.75rem;
    font-size: 13px;
}

.prob .pl {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--n400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prob .pt {
    height: 6px;
    border-radius: 3px;
    background: var(--n800);
    overflow: hidden;
}

.prob .pt i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: var(--s500);
    transition: width 900ms var(--ease);
}

.prob[data-lead="true"] .pt i {
    background: var(--s300);
}

.prob[data-lead="true"] .pl {
    color: var(--n100);
}

.prob .pv {
    font-family: var(--mono);
    font-size: 0.75rem;
    text-align: right;
    color: var(--n300);
    font-variant-numeric: tabular-nums;
}

/* Scene 4 — SHAP attribution */
.shap-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.5rem;
}

.shap {
    display: grid;
    grid-template-columns: minmax(84px, 118px) 1fr 54px;
    align-items: center;
    gap: 0.75rem;
}

.shap .sl {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--n400);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shap-axis {
    position: relative;
    height: 22px;
    background: var(--n900);
    border-radius: var(--r-xs);
    overflow: hidden;
}

.shap-axis::before {
    content: "";
    position: absolute;
    left: 50%;
    inset-block: 0;
    width: 1px;
    background: var(--n700);
    z-index: 2;
}

.shap-axis i {
    position: absolute;
    inset-block: 5px;
    width: 0;
    border-radius: 2px;
    transition: width 700ms var(--ease);
}

.shap-axis i.pos {
    left: 50%;
    background: var(--s400);
}

.shap-axis i.neg {
    right: 50%;
    background: var(--n500);
}

.shap .sv {
    font-family: var(--mono);
    font-size: 0.75rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.shap .sv.pos {
    color: var(--s300);
}

.shap .sv.neg {
    color: var(--n400);
}

.shap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--n800);
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--n500);
}

.shap-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.shap-legend i {
    width: 14px;
    height: 3px;
    border-radius: 2px;
    display: inline-block;
}

/* Scene 5 — report */
.report {
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--n300);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    min-height: 210px;
}

.report .hl {
    color: var(--s300);
}

.caret {
    display: inline-block;
    width: 6px;
    height: 1em;
    background: var(--s400);
    vertical-align: text-bottom;
    animation: blink 1.05s steps(2) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.signoff {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.1rem;
    padding: 0.7rem 0.9rem;
    border: 1px dashed var(--n700);
    border-radius: var(--r-sm);
    font-size: 12.5px;
    color: var(--n400);
}

.signoff .req {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--caution);
}

/* --- Simulator ---------------------------------------------------------- */

.sim-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.seg {
    display: inline-flex;
    flex-wrap: wrap;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--n300);
    border-radius: var(--r-sm);
    background: var(--n0);
}

.seg button {
    padding: 0.4rem 0.8rem;
    border-radius: var(--r-xs);
    font-size: 13px;
    font-weight: 500;
    color: var(--n600);
    transition: background-color 180ms var(--ease), color 180ms var(--ease);
    white-space: nowrap;
}

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

.seg button[aria-selected="true"] {
    background: var(--ink);
    color: var(--n0);
}

/* Instrument-surface variant of the segmented control. */
.instrument .seg {
    background: var(--n900);
    border-color: var(--n700);
}

.instrument .seg button {
    color: var(--n400);
}

.instrument .seg button:hover {
    color: var(--n100);
}

.instrument .seg button[aria-selected="true"] {
    background: var(--n100);
    color: var(--n950);
}

.sim-layout {
    display: grid;
    gap: 1px;
    background: var(--n800);
}

@media (min-width: 56rem) {
    .sim-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.sim-pane {
    background: var(--n950);
    padding: 1.25rem;
    min-width: 0;
}

.sim-pane-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--n500);
    margin-bottom: 1.25rem;
}

.sim-pane-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--n800);
}

.focus {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ring {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring circle {
    fill: none;
    stroke-width: 5;
}

.ring .bg {
    stroke: var(--n800);
}

.ring .fg {
    stroke: var(--s400);
    stroke-linecap: round;
    stroke-dasharray: 201;
    stroke-dashoffset: 201;
    transition: stroke-dashoffset 900ms var(--ease);
}

.ring .txt {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--n100);
}

.focus .fl {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--n500);
}

.focus h3 {
    margin: 0.35rem 0 0.3rem;
    font-size: 1.0625rem;
    color: var(--n0);
    letter-spacing: -0.02em;
}

.focus p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--n400);
}

/* --- Module cards ------------------------------------------------------- */

.modules {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 48rem) {
    .modules {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }
}

.module {
    border-top: 1px solid var(--rule);
    padding-top: 1.25rem;
}

.module h3 {
    margin: 0.9rem 0 0;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.module p {
    margin: 0.6rem 0 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--n600);
}

.module .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

.tag {
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--n300);
    border-radius: var(--r-xs);
    color: var(--n600);
}

/* --- Scroll progress ---------------------------------------------------- */

#progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: var(--s500);
    z-index: 60;
    pointer-events: none;
}

/* Active section marker in the nav. */
.nav-list a {
    position: relative;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.28rem;
    height: 1px;
    background: var(--s500);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 280ms var(--ease);
}

.nav-list a.active {
    color: var(--ink);
}

.nav-list a.active::after {
    transform: scaleX(1);
}

/* --- Variable ticker ---------------------------------------------------- */

.ticker {
    overflow: hidden;
    border-bottom: 1px solid var(--rule);
    background: var(--n25);
    padding-block: 0.7rem;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
    display: flex;
    gap: 2.5rem;
    width: max-content;
    will-change: transform;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    color: var(--n400);
    white-space: nowrap;
}

.ticker-item i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--n300);
    flex-shrink: 0;
}

.ticker-item.off {
    color: var(--critical);
}

.ticker-item.off i {
    background: var(--critical);
}

/* --- Evidence funnel ---------------------------------------------------- */

.funnel-body {
    padding: 1.5rem 1.25rem;
}

.funnel-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.15rem;
    counter-reset: fn;
}

.funnel-row {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    opacity: 0.25;
    transition: opacity 420ms var(--ease);
}

.funnel-row[data-on="true"] {
    opacity: 1;
}

.funnel-row .fi {
    font-family: var(--mono);
    font-size: 0.625rem;
    color: var(--n500);
}

.funnel-row[data-on="true"] .fi {
    color: var(--s400);
}

.funnel-bar {
    position: relative;
    height: 42px;
    border-radius: var(--r-xs);
    background: var(--n900);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.funnel-bar i {
    position: absolute;
    inset-block: 0;
    left: 0;
    width: 0;
    background: linear-gradient(90deg, var(--s800), var(--s600));
    transition: width 900ms var(--ease);
}

.funnel-row[data-on="true"] .funnel-bar i {
    background: linear-gradient(90deg, var(--s700), var(--s400));
}

.funnel-bar .fl {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding-inline: 0.9rem;
    font-size: 13px;
    color: var(--n100);
    min-width: 0;
    width: 100%;
    text-shadow: 0 1px 2px rgb(10 10 10 / 0.5);
}

.funnel-bar .fv {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.funnel-bar .fd {
    font-size: 12.5px;
    color: var(--n400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Pointer spotlight on instrument surfaces --------------------------- */

.instrument {
    isolation: isolate;
}

.instrument .spot {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 420ms var(--ease);
    background: radial-gradient(
        220px circle at var(--mx, 50%) var(--my, 50%),
        rgb(31 197 203 / 0.09),
        transparent 70%
    );
}

.instrument:hover .spot {
    opacity: 1;
}

.instrument > *:not(.spot) {
    position: relative;
    z-index: 1;
}

/* --- Micro-interactions ------------------------------------------------- */

.btn-primary,
.btn-secondary {
    transform: translateY(0);
    transition: background-color 180ms var(--ease), border-color 180ms var(--ease),
        color 180ms var(--ease), transform 220ms var(--ease);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
}

.module {
    transition: border-color 320ms var(--ease);
}

.module:hover {
    border-color: var(--s500);
}

/* Logo mark draws itself once on load. */
.logo-mark path {
    stroke-dasharray: 42;
    stroke-dashoffset: 42;
    animation: draw-mark 1.1s var(--ease-entrance) 0.15s forwards;
}

@keyframes draw-mark {
    to {
        stroke-dashoffset: 0;
    }
}

/* --- Leakage comparison ------------------------------------------------- */

.compare {
    display: grid;
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    overflow: hidden;
}

@media (min-width: 48rem) {
    .compare {
        grid-template-columns: 1fr 1fr;
    }
}

.compare-side {
    background: var(--n0);
    padding: clamp(1.5rem, 3vw, 2.25rem);
}

.compare-side.b {
    background: var(--n25);
}

.compare-side .eyebrow {
    margin-bottom: 1rem;
}

.compare-side .big {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: clamp(2.75rem, 6vw, 3.75rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.04em;
}

.compare-side .big .d {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--n500);
    letter-spacing: 0;
}

.compare-side .cap {
    margin: 0.9rem 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--n600);
    max-width: 34ch;
}

.compare-side .strike {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1.1rem;
}

.strike .tag.off {
    color: var(--critical);
    border-color: color-mix(in srgb, var(--critical) 30%, transparent);
    background: var(--critical-soft);
    text-decoration: line-through;
}

.callout {
    border-left: 2px solid var(--s500);
    padding: 0.25rem 0 0.25rem 1.25rem;
    margin: 0;
}

.callout p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--n600);
}

.callout strong {
    color: var(--ink);
    font-weight: 550;
}

/* --- Safety / scope ----------------------------------------------------- */

.scope {
    display: grid;
    gap: 2rem;
}

@media (min-width: 48rem) {
    .scope {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.scope h3 {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.scope.is h3,
.scope-col.is h3 {
    color: var(--positive);
}

.scope-col.isnt h3 {
    color: var(--critical);
}

.scope-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.scope-col li {
    display: grid;
    grid-template-columns: 1rem 1fr;
    gap: 0.75rem;
    font-size: 15px;
    line-height: 1.55;
    color: var(--n600);
}

.scope-col li svg {
    width: 14px;
    height: 14px;
    margin-top: 4px;
}

.scope-col.is li svg {
    color: var(--positive);
}

.scope-col.isnt li svg {
    color: var(--critical);
}

/* --- Team --------------------------------------------------------------- */

.team {
    display: grid;
    gap: 2rem;
}

@media (min-width: 40rem) {
    .team {
        grid-template-columns: repeat(2, minmax(0, 320px));
    }
}

.member {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--rule);
    padding-top: 1.25rem;
}

.member img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--n200);
    flex-shrink: 0;
}

.member h3 {
    font-size: 1rem;
    letter-spacing: -0.015em;
}

.member .role {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--n500);
    margin: 0.25rem 0 0.4rem;
}

.member a {
    font-size: 13px;
    color: var(--n600);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

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

/* --- CTA + footer ------------------------------------------------------- */

.cta {
    text-align: center;
}

.cta .headline {
    margin-inline: auto;
}

.cta .lede {
    margin-inline: auto;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2rem;
}

footer {
    border-top: 1px solid var(--rule);
    padding-block: 3rem 2rem;
}

.foot-grid {
    display: grid;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--rule);
}

@media (min-width: 48rem) {
    .foot-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

.foot-grid p {
    margin: 1rem 0 0;
    max-width: 38ch;
    font-size: 13.5px;
    color: var(--n500);
}

.foot-col h4 {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--n500);
    margin-bottom: 1rem;
}

.foot-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
    font-size: 13.5px;
}

.foot-col a {
    color: var(--n600);
    transition: color 150ms var(--ease);
}

.foot-col a:hover {
    color: var(--ink);
}

.disclaimer {
    margin-top: 2rem;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--n500);
    max-width: 80ch;
}

.foot-bot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    font-size: 12.5px;
    color: var(--n500);
}

/* --- Appendix-only components ------------------------------------------ */

.panel {
    border: 1px solid var(--rule);
    background: var(--n0);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    font-size: 13.5px;
    min-width: 640px;
}

.data-table th {
    text-align: left;
    font-family: var(--mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--n500);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--rule);
    white-space: nowrap;
}

.data-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--rule);
    color: var(--n600);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .r {
    text-align: right;
}

.data-table .num {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.data-table tr.best td {
    background: var(--s50);
}

.bar-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 140px;
}

.bar-cell .t {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: var(--n200);
    overflow: hidden;
}

.bar-cell .t i {
    display: block;
    height: 100%;
    background: var(--s500);
    border-radius: 3px;
}

.pill {
    display: inline-flex;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: var(--r-xs);
    border: 1px solid var(--n300);
    color: var(--n600);
    white-space: nowrap;
}

.pill.on {
    color: var(--positive);
    border-color: color-mix(in srgb, var(--positive) 30%, transparent);
    background: var(--positive-soft);
}

.pill.off {
    color: var(--critical);
    border-color: color-mix(in srgb, var(--critical) 30%, transparent);
    background: var(--critical-soft);
}

.pill.best {
    color: var(--s700);
    border-color: color-mix(in srgb, var(--s600) 35%, transparent);
    background: var(--s50);
}

.imp-list {
    display: grid;
    gap: 0.6rem;
}

.imp {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr 66px;
    align-items: center;
    gap: 0.85rem;
    font-size: 13px;
}

.imp .l {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--n600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.imp .l.off {
    color: var(--critical);
}

.imp .t {
    height: 8px;
    border-radius: 4px;
    background: var(--n200);
    overflow: hidden;
}

.imp .t i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: var(--s500);
    transition: width 800ms var(--ease);
}

.imp .v {
    font-family: var(--mono);
    font-size: 0.6875rem;
    text-align: right;
    color: var(--n600);
    font-variant-numeric: tabular-nums;
}

.fig-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 48rem) {
    .fig-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.fig {
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    background: var(--n0);
    overflow: hidden;
    cursor: zoom-in;
    transition: border-color 200ms var(--ease);
}

.fig:hover {
    border-color: var(--n400);
}

.fig .im {
    aspect-ratio: 16 / 10;
    background: var(--n0);
    border-bottom: 1px solid var(--rule);
}

.fig .im img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fig .cp {
    padding: 1rem 1.1rem 1.15rem;
}

.fig .cp .n {
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--s700);
}

.fig .cp h3 {
    margin: 0.35rem 0 0.4rem;
    font-size: 15px;
}

.fig .cp p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--n500);
}

#lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    background: rgb(10 10 10 / 0.88);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms var(--ease), visibility 300ms;
}

#lightbox.open {
    opacity: 1;
    visibility: visible;
}

#lightbox img {
    max-width: 100%;
    max-height: 82vh;
    background: #fff;
    border-radius: var(--r-md);
}

#lightbox .cap {
    margin-top: 1rem;
    text-align: center;
    color: var(--n300);
    font-size: 13.5px;
    max-width: 70ch;
}

#lightbox .close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    color: var(--n300);
    font-size: 1.75rem;
    line-height: 1;
    padding: 0.5rem;
}

.spec-grid {
    display: grid;
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin: 0;
}

@media (min-width: 40rem) {
    .spec-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.spec {
    background: var(--n0);
    padding: 1.15rem 1.25rem;
}

.spec dt {
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--n500);
}

.spec dd {
    margin: 0.45rem 0 0;
    font-size: 14.5px;
    font-weight: 500;
}

.limits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.limits li {
    display: grid;
    grid-template-columns: 1rem 1fr;
    gap: 0.85rem;
    font-size: 15px;
    line-height: 1.6;
    color: var(--n600);
    border-top: 1px solid var(--rule);
    padding-top: 1rem;
}

.limits svg {
    width: 14px;
    height: 14px;
    margin-top: 5px;
    color: var(--caution);
}

.dl-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 40rem) {
    .dl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dl {
    display: block;
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    background: var(--n0);
    padding: 1.25rem;
    transition: border-color 200ms var(--ease);
}

.dl:hover {
    border-color: var(--n400);
}

.dl .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dl h3 {
    font-size: 15px;
}

.dl p {
    margin: 0.5rem 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--n500);
}

.label-list {
    display: grid;
    gap: 2px;
    padding: 0.75rem;
    background: var(--n25);
    align-content: start;
}

.label-btn {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.6rem;
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    transition: background-color 180ms var(--ease), border-color 180ms var(--ease);
}

.label-btn:hover {
    background: var(--n0);
}

.label-btn[aria-selected="true"] {
    background: var(--n0);
    border-color: var(--n300);
    box-shadow: inset 2px 0 0 var(--s500);
}

.label-btn .ln {
    display: block;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink);
}

.label-btn .ls {
    display: block;
    font-size: 12px;
    color: var(--n500);
    margin-top: 0.1rem;
}

.label-btn .lc {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--n500);
}

.explorer {
    display: grid;
    gap: 1px;
    background: var(--rule);
}

@media (min-width: 56rem) {
    .explorer {
        grid-template-columns: minmax(200px, 250px) 1fr;
    }
}

.label-detail {
    background: var(--n0);
    padding: clamp(1.25rem, 3vw, 2rem);
}

.dials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.dial {
    text-align: center;
}

.dial .ring {
    width: 72px;
    height: 72px;
    margin: 0 auto 0.5rem;
}

.dial .ring .fg {
    stroke: var(--s500);
}

.dial .ring .bg {
    stroke: var(--n200);
}

.dial .ring .txt {
    color: var(--ink);
    font-size: 13px;
}

.dial .cap {
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--n500);
}

.confusion {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
    overflow: hidden;
    margin-top: 1rem;
}

@media (min-width: 40rem) {
    .confusion {
        grid-template-columns: repeat(4, 1fr);
    }
}

.confusion div {
    background: var(--n0);
    padding: 0.8rem 0.9rem;
}

.confusion span {
    display: block;
    font-family: var(--mono);
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--n500);
}

.confusion b {
    display: block;
    margin-top: 0.25rem;
    font-family: var(--mono);
    font-size: 1.125rem;
    font-weight: 500;
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Ambient fields opt out entirely rather than running at 0.01ms. */
    [data-ambient] {
        display: none !important;
    }

    .fade {
        opacity: 1;
        transform: none;
    }

    .mask > span {
        transform: none;
    }
}

@media print {
    #nav,
    #lightbox,
    #hero-field {
        display: none !important;
    }
}
