/* ==========================================================================
   DetectifAI — design system
   Light editorial, matching the benchmark-report site: white canvas, deep
   navy ink, pale ice-blue panels, teal reserved for data. Dark navy blocks
   are used as inverted feature panels via .on-dark.
   No framework: every class below is defined here.
   ========================================================================== */

/* --- tokens --------------------------------------------------------------- */

:root {
    /* canvas — sampled from the site: #ffffff dominates, #01233b is the ink,
       #eff9fe/#e7f6fc are the pale panel tints, #002f4e the secondary navy. */
    --bg: #ffffff;
    --bg-elev: #f7fafc;
    --surface: #ffffff;
    --surface-hi: #f3f8fb;
    --surface-hover: #eaf3f8;
    --ice: #eff9fe;
    --ice-deep: #e7f6fc;

    /* hairlines */
    --line: #dfe8ee;
    --line-soft: rgba(1, 35, 59, .08);
    --line-strong: #c3d5e1;

    /* type */
    --fg: #01233b;
    --fg-2: #4e6a7e;
    --fg-3: #7b93a5;
    --fg-4: #9db1c0;

    /* signal */
    --ink: #01233b;                 /* dark panels + primary actions */
    --ink-2: #002f4e;               /* secondary navy, active pills */
    --brand: #01233b;
    --brand-rgb: 1, 35, 59;
    --brand-hi: #0d5580;            /* links + focus, readable on white */
    --brand-dim: rgba(var(--brand-rgb), .06);
    --teal: #04b0c1;                /* Signal Teal — data accent */
    --teal-rgb: 4, 176, 193;

    /* state — tuned for white, per the site's own values */
    --pass: #0f8a4d;
    --pass-rgb: 15, 138, 77;
    --pass-dim: rgba(var(--pass-rgb), .09);
    --fail: #c44536;
    --fail-rgb: 196, 69, 54;
    --fail-dim: rgba(var(--fail-rgb), .08);
    --warn: #a9701a;
    --warn-rgb: 169, 112, 26;
    --warn-dim: rgba(var(--warn-rgb), .10);

    /* form */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 26px;

    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --shadow: 0 1px 2px rgba(1, 35, 59, .05), 0 8px 24px -12px rgba(1, 35, 59, .16);
    --shadow-lg: 0 2px 6px rgba(1, 35, 59, .06), 0 26px 50px -18px rgba(1, 35, 59, .22);

    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Inverted scope: drop this on any dark navy block and every component
   inside it re-reads the tokens and flips. This is how the report site uses
   full-bleed navy panels inside a white page. */
.on-dark {
    --bg: #01233b;
    --bg-elev: #052b45;
    --surface: #05304c;
    --surface-hi: #073854;
    --surface-hover: #0b4262;
    --line: rgba(255, 255, 255, .14);
    --line-soft: rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .26);
    --fg: #ffffff;
    --fg-2: #a9c6d8;
    --fg-3: #7fa0b6;
    --fg-4: #5d829a;
    --brand-hi: #7fd8e4;
    --pass: #4ad98d;
    --pass-rgb: 74, 217, 141;
    --fail: #ff8a7a;
    --fail-rgb: 255, 138, 122;
    --warn: #f0b95e;
    --warn-rgb: 240, 185, 94;
    background: var(--ink);
    color: var(--fg);
}

/* --- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02", "cv03", "cv04", "ss01";
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.18; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }

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

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

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-elev); }
::-webkit-scrollbar-thumb { background: #cfdde7; border-radius: 6px; border: 3px solid var(--bg-elev); }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* --- ambient background --------------------------------------------------- */

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(to right, rgba(1, 35, 59, .028) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(1, 35, 59, .028) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 110% 60% at 50% 0%, #000 20%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 110% 60% at 50% 0%, #000 20%, transparent 72%);
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    top: -300px;
    left: 50%;
    width: 1200px;
    height: 640px;
    margin-left: -600px;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(var(--teal-rgb), .10), transparent 64%);
    filter: blur(24px);
    pointer-events: none;
}

/* --- layout --------------------------------------------------------------- */

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 900px; }

/* Partials carry their own .wrap; don't pad twice when nested in a page wrap. */
.wrap .wrap { padding: 0; max-width: none; }

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap-row { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.grow { flex: 1; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; } .mt-56 { margin-top: 56px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

.hidden { display: none !important; }

/* --- type ----------------------------------------------------------------- */

.mono { font-family: var(--mono); font-variant-ligatures: none; }

/* Small uppercase letterspaced label — used constantly on the report site. */
.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--fg-3);
}

.eyebrow-ink { color: var(--ink); }
.eyebrow-teal { color: #0b8a97; }

/* Heavy, very tight display type is the site's signature. */
.display {
    font-size: clamp(40px, 6.4vw, 68px);
    font-weight: 700;
    letter-spacing: -.042em;
    line-height: 1.02;
}

.h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 700; letter-spacing: -.036em; line-height: 1.08; }
.h2 { font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; letter-spacing: -.03em; }
.h3 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.h4 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }

.lead { font-size: 17px; line-height: 1.6; color: var(--fg-2); }
.body { font-size: 15px; color: var(--fg-2); line-height: 1.68; }
.small { font-size: 13.5px; color: var(--fg-2); line-height: 1.62; }
.tiny { font-size: 12px; color: var(--fg-3); line-height: 1.55; }

.muted { color: var(--fg-2); }
.dim { color: var(--fg-3); }
.strong { color: var(--fg); font-weight: 650; }
.center { text-align: center; }
.balance { text-wrap: balance; }
.measure { max-width: 62ch; }
.measure-tight { max-width: 48ch; }

.text-pass { color: var(--pass); }
.text-fail { color: var(--fail); }
.text-warn { color: var(--warn); }
.text-brand { color: var(--brand-hi); }
.text-teal { color: #0b8a97; }

.gradient-text {
    background: linear-gradient(100deg, var(--ink) 10%, #0d5580 52%, var(--teal) 96%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.on-dark .gradient-text {
    background: linear-gradient(100deg, #fff 8%, #9fdcea 50%, var(--teal) 96%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Editorial section marker: "03 / Findings" */
.marker {
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-3);
    white-space: nowrap;
}
.marker b { font-weight: 650; color: var(--fg-2); }

/* Asymmetric marker | content layout the report uses for each section. */
.editorial { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; align-items: start; }

/* --- buttons -------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s var(--ease), border-color .16s var(--ease),
                color .16s var(--ease), transform .1s var(--ease), box-shadow .16s var(--ease);
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn svg { width: 16px; height: 16px; flex: none; }

/* The navy pill is the site's one true button. */
.btn-primary,
.btn-solid {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 1px 2px rgba(1, 35, 59, .18);
}
.btn-primary:hover:not(:disabled),
.btn-solid:hover:not(:disabled) { background: var(--ink-2); }

.on-dark .btn-primary,
.on-dark .btn-solid { background: #fff; color: var(--ink); }
.on-dark .btn-primary:hover:not(:disabled),
.on-dark .btn-solid:hover:not(:disabled) { background: #e7f6fc; }

.btn-outline {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--fg);
}
.btn-outline:hover:not(:disabled) { background: var(--surface-hi); border-color: var(--ink); }

.btn-ghost { color: var(--fg-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-hi); color: var(--fg); }

.btn-danger {
    border-color: rgba(var(--fail-rgb), .35);
    background: var(--fail-dim);
    color: var(--fail);
}
.btn-danger:hover:not(:disabled) { background: rgba(var(--fail-rgb), .14); border-color: var(--fail); }

.btn-warn {
    border-color: rgba(var(--warn-rgb), .38);
    background: var(--warn-dim);
    color: var(--warn);
}
.btn-warn:hover:not(:disabled) { background: rgba(var(--warn-rgb), .16); border-color: var(--warn); }

.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }

.btn.is-busy { pointer-events: none; color: transparent !important; position: relative; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
.btn-outline.is-busy::after, .btn-ghost.is-busy::after {
    border-color: rgba(1, 35, 59, .2);
    border-top-color: var(--ink);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- surfaces ------------------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.card-pad { padding: 22px; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}

.card-body { padding: 22px; }

.card-foot {
    padding: 15px 22px;
    border-top: 1px solid var(--line);
    background: var(--bg-elev);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.on-dark .card-foot { background: rgba(255, 255, 255, .03); }

.card-link {
    display: block;
    position: relative;
    overflow: hidden;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.card-link:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.panel {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
}
.on-dark .panel { background: rgba(255, 255, 255, .04); }

/* The hero's big bordered ice-blue slab. */
.slab {
    border: 2px solid var(--ink);
    border-radius: var(--radius-xl);
    background: linear-gradient(165deg, #f6fcff 0%, var(--ice) 45%, var(--ice-deep) 100%);
    overflow: hidden;
}

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --- badges / chips ------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 23px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-elev);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--fg-2);
    white-space: nowrap;
}
.on-dark .badge { background: rgba(255, 255, 255, .07); }

.badge-pass { border-color: rgba(var(--pass-rgb), .35); background: var(--pass-dim); color: var(--pass); }
.badge-fail { border-color: rgba(var(--fail-rgb), .35); background: var(--fail-dim); color: var(--fail); }
.badge-warn { border-color: rgba(var(--warn-rgb), .38); background: var(--warn-dim); color: var(--warn); }
.badge-brand { border-color: rgba(var(--teal-rgb), .4); background: rgba(var(--teal-rgb), .10); color: #0b7c88; }
.on-dark .badge-brand { color: #7fd8e4; }

/* Pale blue chip, e.g. "LOWER IS BETTER" */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--ice);
    color: var(--ink);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

.dot-live {
    background: var(--pass);
    box-shadow: 0 0 0 0 rgba(var(--pass-rgb), .5);
    animation: pulse 2s var(--ease) infinite;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 7px rgba(var(--pass-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--pass-rgb), 0); }
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 15px 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 12.5px;
    color: var(--fg-2);
    box-shadow: var(--shadow);
}

/* --- forms ---------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.label { font-size: 12.5px; font-weight: 600; color: var(--fg); }

.hint { font-size: 12px; color: var(--fg-3); }

.input, .select, .textarea {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 14px;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.input::placeholder, .textarea::placeholder { color: var(--fg-4); }

.input:hover, .select:hover, .textarea:hover { border-color: #a9c1d2; }

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .10);
}

.input:read-only, .input:disabled, .select:disabled, .textarea:read-only {
    color: var(--fg-2);
    background: var(--bg-elev);
    cursor: default;
}
.select:disabled { opacity: .7; }

.textarea { height: auto; min-height: 74px; padding: 11px 13px; resize: vertical; line-height: 1.55; }

.select {
    appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237b93a5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    cursor: pointer;
}

/* Segmented control — navy active pill, exactly the report's English/Hindi toggle. */
.segmented {
    display: inline-flex;
    padding: 3px;
    gap: 3px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.segmented button {
    height: 32px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--fg-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s var(--ease), color .15s var(--ease);
}

.segmented button:hover:not(.is-active) { color: var(--fg); background: var(--surface); }

.segmented button.is-active {
    background: var(--ink);
    color: #fff;
}

.segmented[aria-disabled="true"] { opacity: .6; pointer-events: none; }

.field > .segmented { align-self: flex-start; }

/* --- nav ------------------------------------------------------------------ */

.nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav-inner { display: flex; align-items: center; gap: 26px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }

/* On white the real DetectifAI lockup is used as-is, in full brand colour. */
.brand-lockup {
    height: 28px;
    width: auto;
    transition: opacity .16s var(--ease);
}
.brand:hover .brand-lockup { opacity: .82; }
/* On navy it needs the reverse (knockout) treatment. */
.on-dark .brand-lockup { filter: brightness(0) invert(1); }

.brand-suffix { font-size: 15px; font-weight: 500; letter-spacing: -.02em; color: var(--fg-3); }

.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-link {
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 550;
    color: var(--fg-2);
    transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-link:hover { color: var(--fg); background: var(--surface-hi); }
.nav-link.is-active { color: #fff; background: var(--ink); font-weight: 600; }

/* Centre-floating pill nav used on the marketing page. */
.nav-float {
    position: sticky;
    top: 14px;
    z-index: 60;
    display: flex;
    justify-content: center;
    padding: 14px 0 0;
    pointer-events: none;
}
.nav-float-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    pointer-events: auto;
}
.nav-float .nav-link { padding: 7px 14px; }

/* Fixed brand, top-left, sitting outside the floating pill. */
.brand-fixed {
    position: absolute;
    top: 22px;
    left: 28px;
    z-index: 61;
}

/* --- page header ---------------------------------------------------------- */

.page-head { padding: 34px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }

.crumb {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 550;
    color: var(--fg-3);
    margin-bottom: 12px;
    transition: color .15s var(--ease);
}
.crumb:hover { color: var(--ink); }
.crumb svg { width: 13px; height: 13px; }

/* --- stats ---------------------------------------------------------------- */

.stat { padding: 20px 22px; }

.stat-value {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.05;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 12.5px; color: var(--fg-3); margin-top: 7px; }

/* Divider-separated stat row, as under the report hero. */
.statline { display: grid; gap: 0; border-top: 1px solid var(--line); }
.statline > * { padding: 20px 0 4px; }
.statline > * + * { border-left: 1px solid var(--line); padding-left: 26px; }

/* --- meters --------------------------------------------------------------- */

.meter {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: #e6edf2;
    overflow: hidden;
}
.on-dark .meter { background: rgba(255, 255, 255, .12); }

.meter-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ink), #0d5580);
    transition: width .7s var(--ease), background .3s var(--ease);
}
.meter-fill.is-pass { background: linear-gradient(90deg, #0b6f8c, var(--teal)); }
.meter-fill.is-fail { background: linear-gradient(90deg, #a8382a, var(--fail)); }

.meter-mark {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: var(--ink);
    border-radius: 2px;
    opacity: .5;
    transition: left .4s var(--ease);
}
.on-dark .meter-mark { background: #fff; }

/* --- gate pipeline -------------------------------------------------------- */

.gates { display: flex; flex-direction: column; }

.gate {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 15px;
    align-items: start;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    transition: background .25s var(--ease), opacity .25s var(--ease);
}
.gate:last-child { border-bottom: 0; }

.gate.is-idle { opacity: .55; }
.gate.is-running { background: rgba(var(--teal-rgb), .05); }
.gate.is-pass { background: rgba(var(--pass-rgb), .04); }
.gate.is-fail { background: rgba(var(--fail-rgb), .05); }
.gate.is-skip { opacity: .4; }

.gate-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-elev);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--fg-3);
    transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.gate-icon svg { width: 16px; height: 16px; }

.gate.is-running .gate-icon { border-color: rgba(var(--teal-rgb), .5); color: #0b7c88; background: rgba(var(--teal-rgb), .1); }
.gate.is-pass .gate-icon { border-color: rgba(var(--pass-rgb), .4); color: var(--pass); background: var(--pass-dim); }
.gate.is-fail .gate-icon { border-color: rgba(var(--fail-rgb), .4); color: var(--fail); background: var(--fail-dim); }

.gate-title { font-size: 14.5px; font-weight: 650; letter-spacing: -.015em; }
.gate-desc { font-size: 12.5px; color: var(--fg-3); margin-top: 3px; }

.gate-readout {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--fg-2);
    margin-top: 10px;
    font-variant-numeric: tabular-nums;
}

.gate-status { align-self: center; }

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(1, 35, 59, .15);
    border-top-color: #0b7c88;
    border-radius: 50%;
    animation: spin .65s linear infinite;
}
.on-dark .spinner { border-color: rgba(255, 255, 255, .2); border-top-color: #7fd8e4; }

/* --- verdict banner ------------------------------------------------------- */

.verdict {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    animation: rise .4s var(--ease) both;
}

.verdict.is-pass { border-color: rgba(var(--pass-rgb), .4); background: var(--pass-dim); }
.verdict.is-fail { border-color: rgba(var(--fail-rgb), .4); background: var(--fail-dim); }
/* Inconclusive — the check could not run. Deliberately neither pass nor fail. */
.verdict.is-warn { border-color: rgba(var(--warn-rgb), .45); background: var(--warn-dim); }

.verdict-mark {
    width: 48px;
    height: 48px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid var(--line);
}
.verdict-mark svg { width: 24px; height: 24px; }
.verdict.is-pass .verdict-mark { border-color: rgba(var(--pass-rgb), .4); background: rgba(var(--pass-rgb), .14); color: var(--pass); }
.verdict.is-fail .verdict-mark { border-color: rgba(var(--fail-rgb), .4); background: rgba(var(--fail-rgb), .14); color: var(--fail); }
.verdict.is-warn .verdict-mark { border-color: rgba(var(--warn-rgb), .45); background: rgba(var(--warn-rgb), .16); color: var(--warn); }

@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* --- recorder ------------------------------------------------------------- */

.capture {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 28px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #f8fcfe, var(--ice));
}
.on-dark .capture { background: rgba(255, 255, 255, .04); }

.rec-btn {
    position: relative;
    width: 84px;
    height: 84px;
    flex: none;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--fg);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform .18s var(--ease), border-color .18s var(--ease),
                background .18s var(--ease), box-shadow .18s var(--ease);
}

.rec-btn:hover:not(:disabled) {
    transform: scale(1.035);
    border-color: var(--ink);
    box-shadow: 0 0 0 6px rgba(var(--brand-rgb), .07), var(--shadow);
}

.rec-btn:disabled { opacity: .5; cursor: not-allowed; }

.rec-btn .rec-shape {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--fail);
    transition: all .22s var(--ease);
}

.rec-btn.is-recording {
    border-color: var(--fail);
    background: var(--fail-dim);
    animation: halo 1.9s var(--ease) infinite;
}
.rec-btn.is-recording .rec-shape { width: 22px; height: 22px; border-radius: 5px; }

@keyframes halo {
    0% { box-shadow: 0 0 0 0 rgba(var(--fail-rgb), .35); }
    70% { box-shadow: 0 0 0 16px rgba(var(--fail-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--fail-rgb), 0); }
}

.rec-btn.is-busy { pointer-events: none; }
.rec-btn.is-busy .rec-shape { display: none; }
.rec-btn.is-busy::after {
    content: "";
    width: 24px;
    height: 24px;
    border: 2px solid rgba(1, 35, 59, .15);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.wave {
    width: 100%;
    height: 70px;
    display: block;
    border-radius: 12px;
    background: rgba(255, 255, 255, .6);
    border: 1px solid var(--line);
}
.on-dark .wave { background: rgba(255, 255, 255, .05); }

.rec-timer { font-family: var(--mono); font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.rec-hint { font-size: 13px; color: var(--fg-3); text-align: center; }

/* --- challenge sentence --------------------------------------------------- */

.challenge {
    position: relative;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    border-radius: var(--radius);
    background: var(--ice);
}

.challenge-text {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -.022em;
    line-height: 1.4;
    color: var(--ink);
    margin-top: 10px;
    text-wrap: balance;
}

.challenge-text[lang="hi"] { font-size: 23px; line-height: 1.6; }

/* --- stepper -------------------------------------------------------------- */

.stepper { display: flex; align-items: center; }

.step { display: flex; align-items: center; gap: 10px; }

.step-num {
    width: 25px;
    height: 25px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-3);
    transition: all .3s var(--ease);
}
.step-num svg { width: 12px; height: 12px; }

.step-label { font-size: 13px; font-weight: 600; color: var(--fg-3); transition: color .3s var(--ease); }

.step.is-active .step-num { border-color: var(--ink); background: var(--ink); color: #fff; }
.step.is-active .step-label { color: var(--fg); }

.step.is-done .step-num { border-color: rgba(var(--pass-rgb), .45); background: var(--pass-dim); color: var(--pass); }
.step.is-done .step-label { color: var(--fg-2); }

.step-bar { width: 44px; height: 1px; margin: 0 14px; background: var(--line-strong); transition: background .3s var(--ease); }
.step-bar.is-done { background: rgba(var(--pass-rgb), .5); }

/* --- sample dots ---------------------------------------------------------- */

.samples { display: flex; align-items: center; gap: 7px; }

.sample-dot { width: 26px; height: 5px; border-radius: 999px; background: #dbe6ed; transition: background .3s var(--ease); }
.sample-dot.is-done { background: var(--pass); }
.sample-dot.is-current { background: var(--ink); }

/* --- table ---------------------------------------------------------------- */

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left;
    padding: 10px 22px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--fg-3);
    border-bottom: 1px solid var(--line);
    background: var(--bg-elev);
}
.on-dark .table th { background: rgba(255, 255, 255, .04); }
.table td { padding: 13px 22px; border-bottom: 1px solid var(--line); color: var(--fg-2); }
.table tr:last-child td { border-bottom: 0; }
.table .num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); }
.table tr.is-top td { background: rgba(var(--teal-rgb), .05); }
.table tr.is-top td:first-child { box-shadow: inset 3px 0 0 var(--teal); }

/* --- toasts --------------------------------------------------------------- */

.toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(370px, calc(100vw - 40px));
    pointer-events: none;
}

.toast {
    display: flex;
    gap: 11px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toast-in .3s var(--ease) both;
}

.toast.is-out { animation: toast-out .25s var(--ease) forwards; }

.toast-icon { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.toast-title { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.toast-msg { font-size: 12.5px; color: var(--fg-2); margin-top: 2px; line-height: 1.5; }

.toast-pass { border-color: rgba(var(--pass-rgb), .4); }
.toast-pass .toast-icon { color: var(--pass); }
.toast-fail { border-color: rgba(var(--fail-rgb), .4); }
.toast-fail .toast-icon { color: var(--fail); }
.toast-warn { border-color: rgba(var(--warn-rgb), .4); }
.toast-warn .toast-icon { color: var(--warn); }
.toast-info .toast-icon { color: #0b7c88; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(18px) scale(.97); }
    to { opacity: 1; transform: none; }
}
@keyframes toast-out { to { opacity: 0; transform: translateX(18px) scale(.97); } }

/* --- landing -------------------------------------------------------------- */

.section { padding-block: 92px; }
.section-tight { padding-block: 56px; }
.section-line { border-top: 1px solid var(--line); }

.hero { padding-block: 52px 40px; }

.hero-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Dark stat card inside the hero slab. */
.spotlight {
    border-radius: var(--radius-lg);
    background: linear-gradient(150deg, #013050 0%, var(--ink) 55%, #011a2c 100%);
    color: #fff;
    padding: 24px;
    box-shadow: 0 18px 40px -18px rgba(1, 35, 59, .6);
}
.spotlight-value { font-size: clamp(42px, 5.4vw, 62px); font-weight: 700; letter-spacing: -.045em; line-height: 1; }

.hero-gates > * + * { border-left: 1px solid var(--line); }

@media (max-width: 900px) {
    .grid.hero-gates { grid-template-columns: minmax(0, 1fr); }
    .hero-gates > * + * { border-left: 0; border-top: 1px solid var(--line); }
}

/* engine chain diagram */
.chain { display: flex; align-items: stretch; flex-wrap: wrap; }

.chain-node {
    flex: 1 1 200px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    background: var(--surface);
}
.chain-node:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.chain-node:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.chain-node + .chain-node { border-left: 0; }

.chain-rank { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-4); }

/* feature card */
.feat { padding: 24px; }
.feat-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--ice);
    color: #0b7c88;
    margin-bottom: 15px;
}
.on-dark .feat-icon { background: rgba(255, 255, 255, .08); color: #7fd8e4; }
.feat-icon svg { width: 17px; height: 17px; }

/* code / payload block — stays dark on the light page, as the site does */
.code {
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--ink);
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.75;
    color: #a9c6d8;
    overflow-x: auto;
    white-space: pre;
}
.code .k { color: #7fd8e4; }
.code .s { color: #9fe8c9; }
.code .c { color: #5d829a; }
.code .g { color: #4ad98d; }
.code .r { color: #ff8a7a; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 44px; margin-top: 48px; }
.footer-link { font-size: 13px; font-weight: 550; color: var(--fg-3); transition: color .15s var(--ease); }
.footer-link:hover { color: var(--ink); }

/* --- auth ----------------------------------------------------------------- */

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 400px; }

.alert {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elev);
    font-size: 13px;
    color: var(--fg-2);
}
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.alert-fail { border-color: rgba(var(--fail-rgb), .35); background: var(--fail-dim); color: #9c3527; }
.alert-warn { border-color: rgba(var(--warn-rgb), .38); background: var(--warn-dim); color: #855611; }
.alert-info { border-color: rgba(var(--teal-rgb), .35); background: rgba(var(--teal-rgb), .07); color: #0b6f7a; }

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

.reveal { animation: rise .5s var(--ease) both; }
.reveal-1 { animation-delay: .05s; }
.reveal-2 { animation-delay: .11s; }
.reveal-3 { animation-delay: .17s; }
.reveal-4 { animation-delay: .23s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-links { display: none; }
    .editorial { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .chain-node { border-radius: var(--radius-lg) !important; border-left: 1px solid var(--line) !important; }
    .chain { gap: 10px; }
    .statline { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .statline > * + * { border-left: 0; padding-left: 0; }
    .brand-fixed { position: static; margin: 18px 0 0 20px; }
}

@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .section { padding-block: 60px; }
    .hero { padding-block: 32px; }
    .gate { grid-template-columns: 32px 1fr; }
    .gate-status { grid-column: 2; justify-self: start; }
    .card-body, .card-head, .stat { padding-left: 16px; padding-right: 16px; }
    .toasts { right: 12px; left: 12px; bottom: 12px; width: auto; }
    .statline { grid-template-columns: minmax(0, 1fr) !important; }
}
