/* ==========================================================================
   Ultraviole panel — black titanium × ultraviolet
   ==========================================================================

   The stylesheet for the signed-in panel and the sign-in screens. The
   public site has its own, site.css. Built from the ui-ux-pro-max design
   guidance within the limits the content security policy sets — no inline
   style anywhere, no external request of any kind.

   Contents
     1  Fonts                 7  Panel menu
     2  Tokens                8  Numbered steps
     3  Base                  9  Auth shell
     4  Type                 10  App shell
     5  Layout primitives    11  App components
     6  Components           12  Motion, print, responsive

   Colour rules
     The product is black and silver. Violet is the signature and is spent
     only on things that are live or primary: the one primary button on a
     screen, the active navigation item, a trend line, a status pip, focus.
     Severity colours carry meaning and always travel with a word, never
     alone. Every text colour below was checked against the surface it sits
     on: body and muted text at 4.5:1 or better, focus at 3:1 or better.
   ========================================================================== */


/* --------------------------------------------------------------- 1 fonts */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                   U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                   U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url("/assets/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                   U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                   U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


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

:root {
    color-scheme: dark;

    /* surfaces, darkest to lightest */
    --bg:          #08080b;
    --bg-raised:   #0c0c10;
    --surface:     #111116;
    --surface-2:   #16161d;
    --surface-3:   #1c1c24;
    --surface-4:   #23232d;

    /* lines */
    --line:        rgba(255, 255, 255, .07);
    --line-strong: rgba(255, 255, 255, .12);
    --line-bright: rgba(255, 255, 255, .20);

    /* text — every step clears 4.5:1 on --surface-2 */
    --text:        #f5f5f7;
    --text-2:      #d4d4dc;
    --muted:       #a1a1ac;
    --faint:       #8b8b97;

    /* titanium */
    --metal:       #dadae2;
    --metal-gray:  #858590;

    /* ultraviolet */
    --uv-700:      #5b21b6;
    --uv-600:      #6d28d9;
    --uv-btn:      #7c3aed;   /* button fill: white text on it is 5.7:1 */
    --uv-500:      #8b5cf6;
    --uv-400:      #a855f7;
    --uv-300:      #b9a0ff;   /* violet text and focus on black: 9:1 */
    --uv-200:      #ddd0ff;
    --uv-wash:     rgba(139, 92, 246, .12);
    --uv-wash-2:   rgba(139, 92, 246, .20);
    --uv-line:     rgba(185, 160, 255, .28);
    --uv-glow:     rgba(139, 92, 246, .42);

    /* meaning — each one always ships with a word beside it */
    --high:        #f43f5e;
    --high-wash:   rgba(244, 63, 94, .12);
    --high-line:   rgba(244, 63, 94, .34);
    --medium:      #f59e0b;
    --medium-wash: rgba(245, 158, 11, .12);
    --medium-line: rgba(245, 158, 11, .34);
    --low:         #60a5fa;
    --low-wash:    rgba(96, 165, 250, .12);
    --low-line:    rgba(96, 165, 250, .32);
    --ok:          #34d399;
    --ok-wash:     rgba(52, 211, 153, .12);
    --ok-line:     rgba(52, 211, 153, .32);

    /* type */
    --font:        "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono:   "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    --fs-xs:   12px;
    --fs-sm:   13px;
    --fs-md:   14px;
    --fs-base: 16px;
    --fs-lg:   18px;
    --fs-xl:   20px;
    --fs-2xl:  24px;
    --fs-3xl:  32px;
    --fs-4xl:  44px;

    /* 4-point spacing */
    --s-1:  4px;   --s-2:  8px;   --s-3: 12px;  --s-4: 16px;
    --s-5: 20px;   --s-6: 24px;   --s-8: 32px;  --s-10: 40px;
    --s-12: 48px;  --s-16: 64px;  --s-20: 80px; --s-24: 96px;

    /* radius */
    --r-xs:  6px;
    --r-sm:  8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-full: 999px;

    /* elevation — one scale, used everywhere */
    --shadow-1: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 1px 2px rgba(0, 0, 0, .45);
    --shadow-2: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .7);
    --shadow-3: 0 30px 80px -24px rgba(0, 0, 0, .85);

    /* layers */
    --z-base: 0;  --z-raised: 10;  --z-sticky: 20;  --z-overlay: 40;  --z-top: 100;

    /* motion: deceleration on arrival, a shared rhythm everywhere */
    --ease-out:  cubic-bezier(.16, 1, .3, 1);
    --ease-in:   cubic-bezier(.7, 0, .84, 0);
    --dur-1: 120ms;
    --dur-2: 200ms;
    --dur-3: 320ms;

    /* widths */
    --w-site: 1200px;
    --w-app:  1440px;
    --w-prose: 70ch;
}


/* ---------------------------------------------------------------- 3 base */

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

/* The hero artwork is deliberately wider than the page. Clipping on the
   document, on both elements, stops a sideways scroll without drawing an
   edge through the picture. */
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100dvh;
    overflow-x: clip;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-base);
    line-height: 1.6;
    font-feature-settings: "cv11", "ss01", "ss03";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
svg.ico, .logo { display: inline-block; flex: 0 0 auto; }

a {
    color: var(--uv-300);
    text-decoration: none;
    text-underline-offset: 3px;
    transition: color var(--dur-1) var(--ease-out);
}
a:hover { color: var(--uv-200); text-decoration: underline; }

:focus-visible {
    outline: 2px solid var(--uv-300);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: rgba(139, 92, 246, .45); color: #fff; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-8) 0; }

code, kbd, samp, pre, .mono { font-family: var(--font-mono); font-size: .92em; }

/* Long identifiers — hashes, keys, URLs — wrap anywhere instead of pushing
   the layout sideways. Ordinary prose keeps normal breaking. */
.wrap, .hash, code.secret, .kv dd { overflow-wrap: anywhere; }

[hidden] { display: none !important; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    left: var(--s-4); top: -60px;
    z-index: var(--z-top);
    padding: var(--s-2) var(--s-4);
    border-radius: var(--r-sm);
    background: var(--uv-btn);
    color: #fff;
    font-weight: 600;
    transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: var(--s-3); color: #fff; text-decoration: none; }


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

h1, h2, h3, h4 {
    margin: 0;
    color: var(--text);
    font-weight: 650;
    letter-spacing: -.02em;
    line-height: 1.2;
    text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); letter-spacing: -.028em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); letter-spacing: -.012em; }
h4 { font-size: var(--fs-base); letter-spacing: -.008em; }

p { margin: 0; }
p + p { margin-top: var(--s-3); }

.eyebrow {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--uv-300);
}
.label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--faint);
}
.lead  { font-size: var(--fs-lg); line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: var(--fs-sm); }
.num   { font-variant-numeric: tabular-nums; }
.strong { color: var(--text); font-weight: 600; }

.gradient-text {
    background: linear-gradient(180deg, #ffffff 0%, #ececf1 45%, #9a9aa6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.uv-text {
    background: linear-gradient(180deg, #ede7ff 0%, #b9a0ff 55%, #8467c9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


/* --------------------------------------------------- 5 layout primitives */

.container {
    width: 100%;
    max-width: var(--w-site);
    margin-inline: auto;
    padding-inline: var(--s-5);
}
.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-2); }
.stack-lg > * + * { margin-top: var(--s-8); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.cluster-lg { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.grid-2 { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: var(--s-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: var(--s-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }

.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mt-8 { margin-top: var(--s-8); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }
.mb-8 { margin-bottom: var(--s-8); }


/* ---------------------------------------------------------- 6 components */

/* ---- buttons --------------------------------------------------------
   One primary per screen. Secondary for the alternative, ghost for quiet
   actions inside tables, danger only for things that destroy. */

button { font: inherit; color: inherit; }

.btn {
    --btn-bg: var(--surface-3);
    --btn-fg: var(--text);
    --btn-line: var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 40px;
    padding: 0 var(--s-4);
    border: 1px solid var(--btn-line);
    border-radius: var(--r-sm);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font);
    font-size: var(--fs-md);
    font-weight: 560;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    touch-action: manipulation;
    transition:
        background var(--dur-1) var(--ease-out),
        border-color var(--dur-1) var(--ease-out),
        color var(--dur-1) var(--ease-out),
        box-shadow var(--dur-2) var(--ease-out),
        transform var(--dur-1) var(--ease-out);
}
.btn:hover { text-decoration: none; color: var(--btn-fg); background: var(--surface-4); border-color: var(--line-bright); }
.btn:active { transform: scale(.98); }
.btn .ico { width: 16px; height: 16px; }

.btn-primary {
    --btn-bg: var(--uv-btn);
    --btn-fg: #fff;
    --btn-line: transparent;
    box-shadow: 0 0 0 1px rgba(185, 160, 255, .24) inset, 0 8px 24px -10px var(--uv-glow);
}
.btn-primary:hover {
    background: var(--uv-600);
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(185, 160, 255, .34) inset, 0 10px 30px -8px var(--uv-glow);
}

.btn-secondary { --btn-bg: transparent; --btn-line: var(--line-bright); }
.btn-secondary:hover { background: rgba(255, 255, 255, .04); }

.btn-ghost { --btn-bg: transparent; --btn-line: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--line); color: var(--text); }

.btn-danger { --btn-bg: transparent; --btn-line: var(--high-line); --btn-fg: #fda4af; }
.btn-danger:hover { background: var(--high-wash); border-color: var(--high); color: #fecdd3; }

.btn-sm { min-height: 32px; padding: 0 var(--s-3); font-size: var(--fs-sm); border-radius: var(--r-xs); }
.btn-lg { min-height: 48px; padding: 0 var(--s-6); font-size: var(--fs-base); border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 40px; }
.btn-icon.btn-sm { width: 32px; }

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

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label {
    font-size: var(--fs-sm);
    font-weight: 560;
    color: var(--text-2);
}
.req { color: var(--uv-300); margin-left: 2px; }
.field-hint { font-size: var(--fs-xs); color: var(--faint); line-height: 1.5; }
.field-error { font-size: var(--fs-xs); color: #fda4af; }

input[type="text"], input[type="password"], input[type="number"], input[type="search"],
input[type="email"], input[type="url"], select, textarea {
    width: 100%;
    min-height: 40px;
    padding: 0 var(--s-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--bg-raised);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-md);
    line-height: 1.4;
    transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out),
                background var(--dur-1) var(--ease-out);
}
textarea { padding: var(--s-3); min-height: 120px; resize: vertical; font-family: var(--font-mono); font-size: var(--fs-sm); }
input::placeholder, textarea::placeholder { color: #6e6e7a; }
input:hover, select:hover, textarea:hover { border-color: var(--line-bright); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--uv-400);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, .22);
}
input.mono { font-family: var(--font-mono); letter-spacing: .04em; }
input[aria-invalid="true"] { border-color: var(--high); }

select {
    appearance: none;
    padding-right: 36px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.check {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--s-3);
    font-size: var(--fs-md);
    color: var(--text-2);
    cursor: pointer;
    line-height: 1.45;
}
.check input {
    appearance: none;
    flex: 0 0 auto;
    width: 18px; height: 18px;
    margin: 1px 0 0;
    border: 1px solid var(--line-bright);
    border-radius: 5px;
    background: var(--bg-raised);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.check input::after {
    content: "";
    width: 10px; height: 6px;
    border: 2px solid #fff;
    border-top: 0; border-right: 0;
    transform: rotate(-45deg) translate(1px, -1px) scale(0);
    transition: transform var(--dur-1) var(--ease-out);
}
.check input:checked { background: var(--uv-btn); border-color: var(--uv-btn); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }

/* A password field with its show / hide control beside it. */
.input-group { position: relative; display: flex; }
.input-group input { padding-right: 44px; }
.input-group .reveal {
    position: absolute;
    right: 4px; top: 50%;
    transform: translateY(-50%);
    width: 34px; height: 32px;
    display: grid; place-items: center;
    border: 0; border-radius: var(--r-xs);
    background: transparent;
    color: var(--faint);
    cursor: pointer;
}
.input-group .reveal:hover { color: var(--text); background: var(--surface-3); }
.input-group .reveal .ico { width: 17px; height: 17px; }

.form-grid { display: grid; gap: var(--s-4) var(--s-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding-top: var(--s-2); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 600; font-size: var(--fs-md); margin-bottom: var(--s-3); }

/* ---- chips: a status, always as a word --------------------------------- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-full);
    background: var(--surface-3);
    color: var(--text-2);
    font-size: 11.5px;
    font-weight: 560;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}
.chip::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .9;
}
.chip-plain::before { display: none; }
.chip-high   { color: #fda4af; background: var(--high-wash);   border-color: var(--high-line); }
.chip-medium { color: #fcd34d; background: var(--medium-wash); border-color: var(--medium-line); }
.chip-low    { color: #93c5fd; background: var(--low-wash);    border-color: var(--low-line); }
.chip-info   { color: var(--muted); }
.chip-ok     { color: #6ee7b7; background: var(--ok-wash);     border-color: var(--ok-line); }
.chip-off    { color: var(--faint); background: transparent; }
.chip-violet { color: var(--uv-200); background: var(--uv-wash); border-color: var(--uv-line); }

/* the helper's names, mapped onto the same chips */
.sev-high   { color: #fda4af; }
.sev-medium { color: #fcd34d; }
.sev-low    { color: #93c5fd; }
.sev-info   { color: var(--muted); }
.chip.sev-high   { background: var(--high-wash);   border-color: var(--high-line); }
.chip.sev-medium { background: var(--medium-wash); border-color: var(--medium-line); }
.chip.sev-low    { background: var(--low-wash);    border-color: var(--low-line); }

.role-owner  { color: var(--uv-200); background: var(--uv-wash); border-color: var(--uv-line); }
.role-staff  { color: #93c5fd; background: var(--low-wash); border-color: var(--low-line); }
.role-viewer { color: var(--text-2); }

.delta {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    margin-left: var(--s-2);
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}
.delta.up   { color: #6ee7b7; background: var(--ok-wash); }
.delta.down { color: #fda4af; background: var(--high-wash); }
.delta.flat { color: var(--faint); background: var(--surface-3); }

/* ---- alerts ------------------------------------------------------------ */

.alert {
    display: flex;
    gap: var(--s-3);
    padding: var(--s-4);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: var(--fs-md);
    line-height: 1.55;
}
.alert > .ico { width: 19px; height: 19px; margin-top: 1px; color: var(--muted); }
.alert-body { min-width: 0; flex: 1; }
.alert-body > * + * { margin-top: var(--s-2); }
.alert-title { color: var(--text); font-weight: 600; }
.alert-info    { border-color: var(--uv-line);     background: linear-gradient(180deg, rgba(139, 92, 246, .09), rgba(139, 92, 246, .04)); }
.alert-info > .ico { color: var(--uv-300); }
.alert-warn    { border-color: var(--medium-line); background: var(--medium-wash); }
.alert-warn > .ico { color: var(--medium); }
.alert-error   { border-color: var(--high-line);   background: var(--high-wash); }
.alert-error > .ico { color: var(--high); }
.alert-success { border-color: var(--ok-line);     background: var(--ok-wash); }
.alert-success > .ico { color: var(--ok); }
.alert ul { margin: var(--s-2) 0 0; padding-left: var(--s-5); }

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

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
    min-width: 0;
}
.card-pad { padding: var(--s-5); }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--line);
}
.card-title {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--fs-md);
    font-weight: 620;
    letter-spacing: -.005em;
    color: var(--text);
}
.card-title .ico { width: 16px; height: 16px; color: var(--faint); }
.card-body { padding: var(--s-5); }
.card-body.flush { padding: 0; }
.card-foot { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line); }
.card + .card { margin-top: var(--s-4); }

/* ---- tables ------------------------------------------------------------
   Inside a scroll wrapper so a wide table scrolls itself rather than the
   page. Numbers are tabular and right-aligned. */

/* position: relative so absolutely positioned children — screen-reader
   labels in a cell — are clipped by the scroller instead of widening the page. */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-md); }
table.data th {
    position: sticky; top: 0;
    padding: 10px var(--s-4);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    color: var(--faint);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}
table.data td {
    padding: 12px var(--s-4);
    border-bottom: 1px solid var(--line);
    color: var(--text-2);
    vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background var(--dur-1) var(--ease-out); }
table.data tbody tr:hover td { background: rgba(255, 255, 255, .018); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .shrink { width: 1%; white-space: nowrap; }
table.data .sub { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--faint); }
table.data a.row-link { color: var(--text); font-weight: 560; }
table.data a.row-link:hover { color: var(--uv-200); }
.td-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--s-2); }
.td-actions form { margin: 0; }

/* A verdict accent on the leading edge of a row. */
tr.acc td:first-child { box-shadow: inset 2px 0 0 var(--acc, transparent); }
tr.acc-high   { --acc: var(--high); }
tr.acc-medium { --acc: var(--medium); }
tr.acc-low    { --acc: var(--low); }
tr.acc-none   { --acc: var(--line-bright); }

.go {
    display: inline-grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: var(--r-xs);
    color: var(--faint);
}
.go:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.go .ico { width: 16px; height: 16px; }

/* ---- filter pills ------------------------------------------------------ */

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    height: 34px;
    padding: 0 var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-full);
    background: var(--surface);
    color: var(--muted);
    font-size: var(--fs-sm);
    font-weight: 540;
    white-space: nowrap;
    transition: all var(--dur-1) var(--ease-out);
}
.pill:hover { color: var(--text); border-color: var(--line-strong); text-decoration: none; }
.pill .n {
    min-width: 20px;
    padding: 0 6px;
    border-radius: var(--r-full);
    background: var(--surface-3);
    color: var(--text-2);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 18px;
}
.pill.is-active { color: var(--text); border-color: var(--uv-line); background: var(--uv-wash); }
.pill.is-active .n { background: rgba(139, 92, 246, .3); color: #fff; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.p-high .dot { background: var(--high); }
.pill.p-medium .dot { background: var(--medium); }
.pill.p-clean .dot { background: var(--ok); }

/* ---- empty states ------------------------------------------------------- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--s-3);
    padding: var(--s-12) var(--s-6);
}
.empty-icon {
    display: grid; place-items: center;
    width: 48px; height: 48px;
    border-radius: var(--r-md);
    background: var(--uv-wash);
    border: 1px solid var(--uv-line);
    color: var(--uv-300);
}
.empty-icon .ico { width: 22px; height: 22px; }
.empty h3 { font-size: var(--fs-base); }
.empty p { max-width: 46ch; color: var(--muted); font-size: var(--fs-md); }

/* ---- pager -------------------------------------------------------------- */

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-3);
    margin-top: var(--s-6);
    color: var(--faint);
    font-size: var(--fs-sm);
}

/* ---- secrets: shown once, copied once ---------------------------------- */

.secret-row { display: flex; align-items: stretch; gap: var(--s-2); }
code.secret {
    flex: 1;
    display: block;
    min-width: 0;
    padding: 10px var(--s-3);
    border: 1px dashed var(--uv-line);
    border-radius: var(--r-sm);
    background: rgba(139, 92, 246, .06);
    color: var(--uv-200);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.pin-cells { display: flex; gap: var(--s-2); margin: var(--s-3) 0; }
.pin-cell {
    display: grid; place-items: center;
    width: 52px; height: 64px;
    border: 1px solid var(--uv-line);
    border-radius: var(--r-md);
    background: linear-gradient(180deg, rgba(139, 92, 246, .14), rgba(139, 92, 246, .04));
    color: #fff;
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 600;
    box-shadow: 0 0 24px -10px var(--uv-glow);
}

.codes {
    margin: var(--s-3) 0 0;
    padding: var(--s-4);
    border: 1px dashed var(--uv-line);
    border-radius: var(--r-md);
    background: rgba(139, 92, 246, .06);
    color: var(--uv-200);
    font-family: var(--font-mono);
    font-size: var(--fs-md);
    line-height: 1.9;
    white-space: pre-wrap;
    columns: 2;
}

/* ---- key / value list --------------------------------------------------- */

.kv { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0; }
.kv dt, .kv dd {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-md);
}
.kv dt { color: var(--faint); padding-right: var(--s-4); white-space: nowrap; }
.kv dd { color: var(--text-2); text-align: right; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

/* ---- logo --------------------------------------------------------------- */

.logo { width: 26px; height: 26px; color: var(--metal); }
.logo .lg-wing  { fill: currentColor; }
.logo .lg-facet { fill: rgba(0, 0, 0, .3); }
.logo .lg-beam  { fill: var(--uv-400); filter: drop-shadow(0 0 2px rgba(168, 85, 247, .9)); }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 15px;
    font-weight: 680;
    letter-spacing: -.01em;
}
.brand:hover { color: var(--text); text-decoration: none; }


/* ------------------------------------------------------- 7 panel menu */

/* The public site has its own stylesheet, site.css. What is left here is
   the panel's mobile menu: a details element, so it opens without script. */
.m-menu { display: none; position: relative; }
.m-menu > summary {
    list-style: none;
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border-radius: var(--r-sm);
    color: var(--text);
    cursor: pointer;
}
.m-menu > summary::-webkit-details-marker { display: none; }
.m-menu > summary:hover { background: var(--surface-3); }
.m-menu[open] > summary { background: var(--surface-3); }
.m-menu .ico-close { display: none; }
.m-menu[open] .ico-open { display: none; }
.m-menu[open] .ico-close { display: inline-block; }
.m-panel {
    position: absolute;
    right: 0; top: calc(100% + 8px);
    width: min(320px, calc(100vw - 32px));
    padding: var(--s-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-3);
}
.m-panel a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--s-3);
    border-radius: var(--r-sm);
    color: var(--text-2);
    font-weight: 520;
}
.m-panel a:hover, .m-panel a[aria-current="page"] { background: var(--surface-3); color: var(--text); text-decoration: none; }
.m-panel hr { margin: var(--s-2) 0; }


/* ------------------------------------------------------ 8 numbered steps */

.step-n {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--uv-line);
    background: var(--uv-wash);
    color: var(--uv-200);
    font-size: var(--fs-sm);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}


/* ------------------------------------------------------------ 9 auth shell */

.shell-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100dvh; }
.auth-main { display: flex; flex-direction: column; padding: var(--s-8) var(--s-8) var(--s-6); }
.auth-main > .brand { align-self: flex-start; }
.auth-center { flex: 1; display: grid; place-items: center; padding: var(--s-10) 0; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.03em; }
.auth-card .lead { margin-top: var(--s-2); font-size: 15px; }
.auth-card form { margin-top: var(--s-8); }
.auth-card .alert { margin-top: var(--s-6); }
.auth-foot { color: var(--faint); font-size: var(--fs-xs); }
.auth-aside {
    position: relative;
    overflow: hidden;
    border-left: 1px solid var(--line);
    background:
        radial-gradient(70% 60% at 50% 38%, rgba(139, 92, 246, .26), transparent 70%),
        linear-gradient(180deg, #0f0f14, #08080b);
    display: grid;
    place-items: center;
    padding: var(--s-12);
}
.auth-aside::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.2px);
    background-size: 18px 18px;
    mask-image: radial-gradient(60% 55% at 50% 40%, #000, transparent);
    -webkit-mask-image: radial-gradient(60% 55% at 50% 40%, #000, transparent);
}
.auth-aside .inner { position: relative; max-width: 440px; text-align: center; }
.auth-aside .logo-xl { width: 120px; height: 120px; margin: 0 auto var(--s-8); color: var(--metal); filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .6)); }
.auth-aside .logo-xl .lg-beam { filter: drop-shadow(0 0 6px rgba(168, 85, 247, .9)); }
.auth-aside h2 { font-size: 26px; letter-spacing: -.03em; }
.auth-aside p { margin-top: var(--s-3); color: var(--muted); }
.auth-aside ul { list-style: none; margin: var(--s-8) 0 0; padding: 0; display: grid; gap: var(--s-3); text-align: left; }
.auth-aside li { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--text-2); font-size: 14.5px; }
.auth-aside li .ico { width: 18px; height: 18px; color: var(--uv-300); margin-top: 2px; }


/* ------------------------------------------------------------- 10 app shell */

.shell-app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100dvh; }

.app-side {
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: var(--s-5) var(--s-3) var(--s-4);
    border-right: 1px solid var(--line);
    background: var(--bg-raised);
    overflow-y: auto;
}
.app-side > .brand { padding: 0 var(--s-3) var(--s-6); }
.side-group { margin-top: var(--s-5); }
.side-group:first-of-type { margin-top: 0; }
.side-group .label { display: block; padding: 0 var(--s-3) var(--s-2); }
.side-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-height: 38px;
    padding: 0 var(--s-3);
    border-radius: var(--r-sm);
    color: var(--muted);
    font-size: var(--fs-md);
    font-weight: 520;
}
.side-link .ico { width: 17px; height: 17px; color: var(--faint); transition: color var(--dur-1) var(--ease-out); }
.side-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-link:hover .ico { color: var(--text-2); }
.side-link[aria-current="page"] { background: var(--uv-wash); color: var(--text); }
.side-link[aria-current="page"] .ico { color: var(--uv-300); }
.side-link[aria-current="page"]::before {
    content: "";
    position: absolute; left: -12px; top: 9px; bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--uv-400);
    box-shadow: 0 0 12px var(--uv-glow);
}
.side-foot { margin-top: auto; padding-top: var(--s-6); display: grid; gap: var(--s-2); }
.side-ruleset {
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
}
.side-ruleset .row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.side-ruleset b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.side-ruleset small { color: var(--faint); font-size: 11.5px; }
.side-user {
    display: flex; align-items: center; gap: var(--s-3);
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-md);
    color: var(--text);
}
.side-user:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.avatar {
    display: grid; place-items: center;
    width: 32px; height: 32px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--uv-400), var(--uv-700));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.side-user .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-user .who b { font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who small { color: var(--faint); font-size: 11.5px; text-transform: capitalize; }
.side-signout { margin: 0; }
.side-signout .btn { width: 100%; justify-content: flex-start; color: var(--faint); }
.side-signout .btn:hover { color: #fda4af; }

.app-top { display: none; }

.app-main { min-width: 0; }
.app-content { max-width: var(--w-app); padding: var(--s-8) var(--s-10) var(--s-16); }
.app-foot { margin-top: var(--s-12); padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--faint); font-size: var(--fs-xs); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); }
.page-head h1 { font-size: 28px; letter-spacing: -.03em; }
.page-head .sub { margin-top: var(--s-1); color: var(--muted); font-size: var(--fs-md); max-width: 80ch; }
.page-head .crumb { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--s-2); color: var(--faint); font-size: var(--fs-sm); }
.page-head .crumb:hover { color: var(--text); text-decoration: none; }
.page-head .crumb .ico { width: 14px; height: 14px; }
.page-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.with-rail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-5); align-items: start; }
.rail { display: grid; gap: var(--s-4); position: sticky; top: var(--s-6); }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: var(--s-8) 0 var(--s-3); }
.section-title h2 { font-size: var(--fs-base); letter-spacing: -.01em; }
.section-title:first-child { margin-top: 0; }


/* -------------------------------------------------------- 11 app components */

.stats { display: grid; gap: var(--s-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
    position: relative;
    padding: var(--s-5);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}
.stat .k { display: flex; align-items: center; gap: var(--s-2); color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.stat .k .ico { width: 15px; height: 15px; }
.stat .v { margin-top: var(--s-3); font-size: 32px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .h { margin-top: var(--s-2); color: var(--muted); font-size: var(--fs-sm); }
.stat.is-hot { border-color: var(--high-line); }
.stat.is-hot .v { color: #fda4af; }
.stat.is-warn { border-color: var(--medium-line); }
.stat.is-warn .v { color: #fcd34d; }

.stat-rows { display: grid; }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 12px 0; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: 0; }
.stat-row .l { display: flex; flex-direction: column; min-width: 0; font-size: var(--fs-md); color: var(--text-2); }
.stat-row .l small { margin-top: 2px; color: var(--faint); font-size: var(--fs-xs); }
.stat-row .v { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
a.stat-row { color: inherit; }
a.stat-row:hover { text-decoration: none; }
a.stat-row:hover .l { color: var(--text); }

.legend { display: flex; flex-wrap: wrap; gap: var(--s-4); color: var(--muted); font-size: var(--fs-xs); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 2px; border-radius: 2px; }
.legend .i-scans { background: var(--uv-400); }
.legend .i-high { background: var(--high); }

/* the helper's chart, the helper's class names */
.trend { display: block; width: 100%; }
.trend-grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.trend-area { fill: rgba(139, 92, 246, .16); }
.trend-line { stroke: var(--uv-400); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trend-high { stroke: var(--high); stroke-width: 1.5; stroke-dasharray: 3 4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trend-dot { fill: var(--high); }

.sevbar { display: block; }
.sevbar-track { fill: var(--surface-4); }
.bar-high { fill: var(--high); }
.bar-medium { fill: var(--medium); }
.bar-low { fill: var(--low); }
.sev-counts { display: block; margin-top: 4px; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }

.ring-track { stroke: var(--surface-4); }
.ring-arc.arc-high { stroke: var(--high); }
.ring-arc.arc-medium { stroke: var(--medium); }
.ring-arc.arc-low { stroke: var(--low); }

/* ---- report ------------------------------------------------------------- */

.verdict {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--s-8);
    align-items: center;
    padding: var(--s-6);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    background: var(--surface);
}
.verdict.is-high   { border-color: var(--high-line);   background: linear-gradient(120deg, rgba(244, 63, 94, .08), var(--surface) 55%); }
.verdict.is-medium { border-color: var(--medium-line); background: linear-gradient(120deg, rgba(245, 158, 11, .07), var(--surface) 55%); }
.verdict.is-low    { border-color: var(--low-line);    background: linear-gradient(120deg, rgba(96, 165, 250, .07), var(--surface) 55%); }
.verdict-ring { position: relative; width: 156px; height: 156px; }
.verdict-ring .ring { width: 156px; height: 156px; }
.verdict-ring .count { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.verdict-ring .count b { font-size: 38px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.verdict-ring .count span { color: var(--faint); font-size: var(--fs-xs); margin-top: 4px; }
.verdict h2 { font-size: 26px; letter-spacing: -.03em; }
.verdict.is-high h2 { color: #fecdd3; }
.verdict p { margin-top: var(--s-2); color: var(--muted); max-width: 60ch; }
.tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-5); max-width: 520px; }
.tally > div { padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-raised); }
.tally b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tally span { color: var(--faint); font-size: var(--fs-xs); }
.tally .t-high b { color: #fda4af; }
.tally .t-medium b { color: #fcd34d; }
.tally .t-low b { color: #93c5fd; }

.report-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 320px; gap: var(--s-5); align-items: start; margin-top: var(--s-6); }
.report-nav { position: sticky; top: var(--s-6); display: grid; gap: 2px; max-height: calc(100dvh - 48px); overflow-y: auto; padding-right: var(--s-1); }
.report-nav .label { padding: 0 var(--s-3) var(--s-2); }
.report-nav a {
    display: flex; align-items: center; gap: var(--s-2);
    padding: 7px var(--s-3);
    border-radius: var(--r-sm);
    color: var(--muted);
    font-size: var(--fs-sm);
}
.report-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.report-nav .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--ok); }
.report-nav .has-high .dot { background: var(--high); }
.report-nav .has-medium .dot { background: var(--medium); }
.report-nav .has-low .dot { background: var(--low); }
.report-nav .is-failed .dot { background: transparent; border: 1.5px solid var(--faint); }
.report-nav .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-nav .n { color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }

.det { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); scroll-margin-top: var(--s-6); }
.det + .det { margin-top: var(--s-2); }
.det > summary {
    list-style: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-4);
    cursor: pointer;
    border-radius: var(--r-md);
}
.det > summary::-webkit-details-marker { display: none; }
.det > summary:hover { background: rgba(255, 255, 255, .02); }
.det .det-name { font-weight: 600; color: var(--text); min-width: 0; }
.det .det-meta { color: var(--faint); font-size: var(--fs-xs); text-align: right; font-variant-numeric: tabular-nums; }
.det .det-toggle { color: var(--faint); transition: transform var(--dur-2) var(--ease-out); }
.det[open] .det-toggle { transform: rotate(180deg); }
.det-inner { padding: 0 var(--s-4) var(--s-4); }
.det-incomplete {
    display: flex; gap: var(--s-2);
    margin-bottom: var(--s-3);
    padding: var(--s-3);
    border-radius: var(--r-sm);
    background: var(--medium-wash);
    color: #fde68a;
    font-size: var(--fs-sm);
}
.det-incomplete .ico { width: 16px; height: 16px; margin-top: 2px; }
.det-notes { margin: 0 0 var(--s-3); padding: 0; list-style: none; display: grid; gap: 4px; }
.det-notes li { position: relative; padding-left: var(--s-4); color: var(--faint); font-size: var(--fs-sm); }
.det-notes li::before { content: "—"; position: absolute; left: 0; }
.finding { padding: var(--s-3) var(--s-4); border-left: 2px solid var(--line-bright); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--bg-raised); }
.finding + .finding { margin-top: var(--s-2); }
.finding.f-high { border-left-color: var(--high); }
.finding.f-medium { border-left-color: var(--medium); }
.finding.f-low { border-left-color: var(--low); }
.finding .t { display: flex; align-items: flex-start; gap: var(--s-2); color: var(--text); font-size: var(--fs-md); font-weight: 560; }
.finding .t .chip { margin-top: 1px; }
.finding .d { margin-top: var(--s-2); color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; overflow-wrap: anywhere; }


/* ---- toolbars, inline forms, status pages -------------------------------- */

.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-4); }
.toolbar > .field { min-width: 200px; }
.toolbar .form-actions { padding-top: 0; }
.search-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); flex: 1 1 320px; justify-content: flex-end; }
.search-input { position: relative; flex: 1 1 260px; max-width: 420px; }
.search-input .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search-input input { padding-left: 38px; }
input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); }

.inline-form { display: flex; align-items: center; gap: var(--s-2); margin: 0; min-width: 260px; }
.inline-form input { min-height: 32px; font-size: var(--fs-sm); }

.status-page { display: grid; place-items: center; min-height: 60vh; }
.status-page h1 { font-size: var(--fs-2xl); }

p.field-label { margin: var(--s-3) 0 6px; }
.alert-body .pin-cells { margin: var(--s-3) 0; }
.alert-body .secret-row { margin-top: 0; }
.alert-body > .btn { margin-top: var(--s-2); }
.card-title .step-n { width: 24px; height: 24px; font-size: 12px; }
.report-facts { display: grid; gap: var(--s-4); position: sticky; top: var(--s-6); }
.report-facts .card + .card { margin-top: 0; }
.mock-card .label { display: block; }
.side-ruleset { display: block; color: var(--text); }
.side-ruleset:hover { border-color: var(--line-strong); text-decoration: none; color: var(--text); }
.side-ruleset .label { display: block; margin-bottom: 2px; }
.m-panel .side-signout { margin-top: 2px; }
.m-panel .side-signout .btn { width: 100%; justify-content: flex-start; min-height: 44px; }
.m-panel .side-signout .btn:hover { color: #fda4af; }
td .cluster { gap: 6px; }
fieldset[disabled] { opacity: .7; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }


/* --------------------------------------------- 12 motion, print, responsive */

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

@media print {
    .app-side, .app-top, .page-actions, .report-nav { display: none !important; }
    .shell-app { display: block; }
    body { background: #fff; color: #000; }
}

/* ---- 1280 ---- */
@media (max-width: 1280px) {
    .report-layout { grid-template-columns: 220px minmax(0, 1fr); }
    .report-layout > .report-facts { grid-column: 1 / -1; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* ---- 1024 ---- */
@media (max-width: 1024px) {
    .shell-app { grid-template-columns: minmax(0, 1fr); }
    .app-side { display: none; }
    .app-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--s-3);
        position: sticky; top: 0;
        z-index: var(--z-sticky);
        height: 60px;
        padding: 0 var(--s-4);
        border-bottom: 1px solid var(--line);
        background: rgba(12, 12, 16, .88);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .app-top .m-menu { display: block; }
    .app-content { padding: var(--s-6) var(--s-5) var(--s-12); }
    .with-rail { grid-template-columns: minmax(0, 1fr); }
    .rail { position: static; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-layout { grid-template-columns: minmax(0, 1fr); }
    .report-nav { position: static; max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-nav .label { grid-column: 1 / -1; }
    .shell-auth { grid-template-columns: minmax(0, 1fr); }
    .auth-aside { display: none; }
}

/* ---- 768 ---- */
@media (max-width: 768px) {
    /* 16px inputs: smaller ones make iOS zoom the page on focus */
    input[type="text"], input[type="password"], input[type="number"], input[type="search"],
    input[type="email"], input[type="url"], select, textarea { font-size: var(--fs-base); min-height: 44px; }
    .btn { min-height: 44px; }
    .btn-sm { min-height: 36px; }

    h1 { font-size: 26px; }
    .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid .span-2 { grid-column: auto; }
    .verdict { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: var(--s-5); }
    .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-nav { grid-template-columns: minmax(0, 1fr); }
    .report-layout > .report-facts { grid-template-columns: minmax(0, 1fr); }
    .codes { columns: 1; }
    .pin-cell { width: 44px; height: 56px; font-size: 26px; }
}

/* ---- 480 ---- */
@media (max-width: 480px) {
    .stats { grid-template-columns: minmax(0, 1fr); }
    .auth-main { padding: var(--s-5); }
    .app-content { padding: var(--s-5) var(--s-4) var(--s-12); }
    .page-actions, .page-actions .btn { width: 100%; }
}
