/* ============================================================================
 * Manager console stylesheet — loads after base.css.
 *
 * Currently: the login flow (two-step, split layout) and the interim index
 * placeholder. Console shell (sidebar / tables / drawers) joins this file as
 * those pages are built.
 * ========================================================================== */

/* ---- Login: split layout ------------------------------------------------- */

.login-shell {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.login-brand {
    background: #0c0d0e;
    border-right: 1px solid #1f2024;
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* An <a> since the logo leads back to the public landing — reset the UA
   link paint so the wordmark keeps the body ink */
.login-logo { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }

.login-logo .mark {
    display: inline-flex;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #828fff;
    align-items: center;
    justify-content: center;
    flex: none;
}

.login-logo .name { font-size: 16px; letter-spacing: -0.02em; font-weight: 600; }
.login-logo .name span { color: #8a8f98; font-weight: 400; }

.login-eyebrow {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #828fff;
}

.login-brand h1 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 16px 0 0;
    max-width: 380px;
}

.login-features { margin-top: 30px; display: flex; flex-direction: column; gap: 16px; max-width: 400px; }

.login-feature { display: flex; gap: 12px; }
.login-feature svg { color: #828fff; flex: none; margin-top: 2px; }
.login-feature .t { font-size: 14px; font-weight: 500; }
.login-feature .d { font-size: 13px; color: #8a8f98; line-height: 1.5; }

.login-version { font-family: 'Geist Mono', monospace; font-size: 11px; color: #3a3c42; }

.login-side { display: grid; place-items: center; padding: 32px; }

.login-card { width: 100%; max-width: 352px; }

.login-card h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }

.login-sub { font-size: 13.5px; color: #8a8f98; margin: 8px 0 0; line-height: 1.5; }
.login-sub .who { color: #f7f8f8; font-family: 'Geist Mono', monospace; }

.login-form { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }

/* ---- Form controls ------------------------------------------------------- */

.field label { display: block; font-size: 12.5px; color: #8a8f98; margin-bottom: 7px; }

.field input {
    width: 100%;
    height: 38px;
    background: #0c0d0e;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    padding: 0 12px;
    color: #f7f8f8;
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
}

.field input:focus { border-color: #828fff; box-shadow: 0 0 0 3px rgba(130, 143, 255, .14); }

.remember { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #8a8f98; cursor: pointer; user-select: none; }

/* Custom checkbox: pure CSS check (no data: URI images — img-src is 'self') */
.remember input {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 5px;
    border: 1px solid #34343a;
    background: #0c0d0e;
    margin: 0;
    cursor: pointer;
    position: relative;
    transition: background .12s, border-color .12s;
}

.remember input:checked { background: #7170ff; border-color: #7170ff; }

.remember input:checked::after {
    content: "";
    position: absolute;
    left: 4.5px;
    top: 1.5px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.login-primary {
    width: 100%;
    height: 38px;
    background: #7170ff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    margin-top: 2px;
    transition: background .12s, opacity .12s;
}

.login-primary:hover { background: #7f7eff; }
.login-primary[disabled] { opacity: .55; cursor: default; }
.login-primary[disabled]:hover { background: #7170ff; }

/* ---- Alerts / notes ------------------------------------------------------ */

.login-alert {
    display: flex;
    gap: 9px;
    background: rgba(235, 87, 87, .10);
    border: 1px solid rgba(235, 87, 87, .28);
    border-radius: 7px;
    padding: 9px 11px;
    font-size: 12.5px;
    color: #eb5757;
    line-height: 1.5;
}

.login-alert svg { flex: none; margin-top: 1px; }

.login-alert[hidden] { display: none; }

.login-note { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 12px; color: #4d5157; }

/* ---- Step 2 (TOTP) ------------------------------------------------------- */

.login-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #8a8f98;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    transition: color .12s;
}

.login-back:hover { color: #f7f8f8; }

.code-input {
    width: 100%;
    height: 52px;
    margin-top: 24px;
    background: #0c0d0e;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    text-align: center;
    letter-spacing: .5em;
    font-family: 'Geist Mono', monospace;
    font-size: 22px;
    color: #f7f8f8;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
}

.code-input:focus { border-color: #828fff; box-shadow: 0 0 0 3px rgba(130, 143, 255, .14); }

.login-alt { text-align: center; margin-top: 18px; }

.login-alt a { font-size: 12.5px; color: #8a8f98; text-decoration: none; transition: color .12s; }
.login-alt a:hover { color: #828fff; }

/* ---- Interim index placeholder ------------------------------------------- */

.stub-shell { min-height: 100dvh; display: grid; place-items: center; padding: 32px; }

.stub-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid #1f2024;
    border-radius: 14px;
    background: #0f1011;
    padding: 32px;
    text-align: center;
}

.stub-card .mark {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #828fff;
    align-items: center;
    justify-content: center;
}

.stub-card h1 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 18px 0 0; }

.stub-card p { font-size: 13.5px; color: #8a8f98; line-height: 1.6; margin: 10px 0 0; }

.stub-card .who { color: #f7f8f8; font-family: 'Geist Mono', monospace; font-size: 13px; }

.stub-card form { margin-top: 22px; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 16px;
    background: transparent;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    color: #d0d6e0;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .12s, color .12s;
}

.btn-ghost:hover { border-color: #34343a; color: #f7f8f8; }

/* ---- Segmented code input (canvas 01 · 2FA frame) ------------------------ */

.code-cells { display: flex; gap: 9px; margin-top: 26px; }

.code-cells input {
    flex: 1;
    min-width: 0;
    height: 52px;
    background: #0c0d0e;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    text-align: center;
    font-family: 'Geist Mono', monospace;
    font-size: 21px;
    color: #f7f8f8;
    outline: none;
    caret-color: #828fff;
    transition: border-color .12s, box-shadow .12s;
}

.code-cells input:focus { border-color: #828fff; box-shadow: 0 0 0 3px rgba(130, 143, 255, .14); }

.code-cells.invalid input { border-color: rgba(235, 87, 87, .55); }

/* ---- First-login enrollment (QR + setup key, canvas 12 · 2FA flow) ------- */

.totp-setup { display: flex; gap: 16px; align-items: flex-start; margin-top: 22px; }

.totp-setup[hidden] { display: none; }

.totp-setup .qr {
    width: 116px;
    height: 116px;
    flex: none;
    border-radius: 8px;
    background: #f7f8f8;
    padding: 8px;
}

.totp-setup .qr svg { display: block; width: 100%; height: 100%; }

.totp-setup .setup-side { display: flex; flex-direction: column; gap: 9px; min-width: 0; }

.totp-setup .setup-note { font-size: 12.5px; color: #8a8f98; line-height: 1.6; }

.setup-key {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #0f1011;
    border: 1px solid #2a2b30;
}

.setup-key .key {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: #f7f8f8;
    letter-spacing: .06em;
    word-break: break-all;
}

.setup-key button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 5px;
    border: 1px solid #2a2b30;
    background: #1c1c1f;
    color: #8a8f98;
    cursor: pointer;
    transition: color .12s, border-color .12s;
}

.setup-key button:hover { color: #f7f8f8; border-color: #34343a; }

.setup-hint { font-family: 'Geist Mono', monospace; font-size: 11px; color: #4d5157; }

/* Spacing for the two standalone step forms (no .login-form flex gap there) */

#totp-form .login-alert, #step-recovery .login-alert { margin-top: 16px; }

#totp-form .login-primary { margin-top: 20px; }

#recovery-form .login-primary { margin-top: 22px; }

/* ---- Login footer row (back + recovery toggle) --------------------------- */

.login-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }

.login-footer a { font-size: 12.5px; color: #8a8f98; text-decoration: none; transition: color .12s; }

.login-footer a:hover { color: #a3adff; }

/* ---- Recovery-code frame (shown once after first-login enrollment) ------- */

.recovery-code {
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #0f1011;
    border: 1px solid #2a2b30;
    text-align: center;
    font-family: 'Geist Mono', monospace;
    font-size: 16px;
    letter-spacing: .08em;
    color: #f7f8f8;
    user-select: all;
}

/* ---- Responsive ----------------------------------------------------------- */

@media (max-width: 880px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { display: none; }
}

/* ============================================================================
 * Console shell + shared components (Wave A foundation).
 *
 * Design tokens (docs/html/design_handoff · README) live as CSS variables so
 * every surface reads one source; shell, tables, drawer, modal, dropdown and
 * toast are all driven off them. No inline styles anywhere — the CSP forbids
 * them — so state is toggled by class only.
 * ========================================================================== */

:root {
    /* Surfaces */
    --bg: #08090a;
    --surface: #0f1011;
    --surface-raised: #141516;
    /* One step above --surface-raised: the canvas's "selected / secondary
       control" ground (active filter chip, secondary button) */
    --surface-elev: #1c1c1f;
    --surface-sunk: #0c0d0e;
    --hairline: #1f2024;
    --hairline-strong: #2a2b30;
    --row-hover: rgba(255, 255, 255, .025);

    /* Text */
    --text: #f7f8f8;
    --text-high: #f7f8f8;
    --text-body: #d0d6e0;
    --text-muted: #8a8f98;
    --text-faint: #62666d;

    /* Accent + status hues */
    --accent: #828fff;
    --accent-solid: #7170ff;
    --green: #6dc78b;
    --accent-hover: #a3adff;
    --accent-deep: #12122b;
    --accent-soft: rgba(130, 143, 255, .12);
    --accent-ring: rgba(130, 143, 255, .14);
    --light: #E5E5E6;
    --blue: #5ea0ef;
    --violet: #b59cff;
    --amber: #cea34a;
    --danger: #eb5757;
    --danger-solid: #eb5757;
    --grey: #8a8f98;

    /* Geometry */
    --sidebar-w: 224px;
    --topbar-h: 46px;
    --radius-card: 8px;
    /* Canvas draws every 30-32px control at 6px, not 8 - the console's controls
       read as chips, and 8px on a 30px box rounds them toward pills */
    --radius-control: 6px;
    --radius-modal: 10px;
    /* Canvas control heights: 30px for a topbar action, 32px for a filter row */
    --control-h: 32px;

    /* Shadow */
    --shadow-modal: 0 30px 80px rgba(0, 0, 0, .6);
    --shadow-drawer: -24px 0 70px rgba(0, 0, 0, .55);
    --shadow-toast: 0 16px 40px rgba(0, 0, 0, .5);

    --mono: 'Geist Mono', monospace;
}

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

/* 100dvh, not 100vh, for every full-height frame: on a phone 100vh is the
   height with the browser's toolbars hidden, so a frame sized to it ran
   under them */
.console { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100dvh; overflow: hidden; }

.sidebar {
    height: 100dvh;
    /* Canvas: the sidebar is the page ground (#08090a), the pane beside it is
       one step up (#0f1011). Drawing it on --surface-sunk inverted that — the
       rail read as a trench cut below the page instead of the floor the page
       sits on */
    background: var(--bg);
    border-right: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    padding: 14px 10px 10px;
    /* The rail's own greys (nico 12-03, scheme A): the group labels
       quietest, an icon one step under its text, the lit item white on a
       firmer fill than a hover's */
    --nav-label: #4d5157;
    --nav-text: #a1a6ae;
    --nav-icon: #6b7079;
    --nav-hover: #e8eaed;
    --nav-active-bg: #1a1b1e;
    --nav-email: #5c6068;
}

/* An <a> since the logo leads back to the public landing */
.sidebar-logo { display: flex; align-items: center; gap: 9px; padding: 2px 6px 14px; color: inherit; text-decoration: none; }

.sidebar-logo .mark {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--accent);
    align-items: center;
    justify-content: center;
    flex: none;
}

.sidebar-logo .name { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.sidebar-logo .name span { color: var(--text-muted); font-weight: 400; }

/* The environment badge rides the wordmark (EntryAI · DEV): tiny,
   mono, version-badge voice, not a control. Only dev wears it (nico
   12-03: no PROD badge), in amber, so a dev console is never taken for
   the live one */
.sidebar-logo .env-badge {
    flex: none;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--amber);
    background: color-mix(in srgb, var(--amber) 13%, transparent);
    border-radius: 5px;
    padding: 3px 6px;
    margin-top: 1px;
}

.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; }

/* No margin: the group label's own top padding is the separation on the canvas */
.nav-group { margin-top: 0; }

/* Smaller and darker than the items (10.5px on a .09em track, nico 12-03):
   a group is told apart by the space above its label, not by a label as
   loud as the items under it */
.nav-label {
    font-size: 10.5px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--nav-label);
    padding: 16px 8px 5px;
}

.nav-group:first-child .nav-label { padding-top: 6px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--nav-text);
    font-size: 13px;
    text-decoration: none;
    position: relative;
    transition: background .12s, color .12s;
}

/* The icon sits one step under its text, so a column of them reads as a
   margin rather than a second row of words; it lights with its item */
.nav-item svg { flex: none; color: var(--nav-icon); transition: color .12s; }
.nav-item:hover { background: rgba(255, 255, 255, .035); color: var(--nav-hover); }
.nav-item:hover svg { color: var(--nav-text); }

.nav-item.active { background: var(--nav-active-bg); color: var(--text-high); font-weight: 500; }
.nav-item.active svg { color: var(--text-high); }

.sidebar-account {
    display: flex;
    align-items: center;
    gap: 9px;
    /* Canvas: the rule runs the full width of the rail, so the row bleeds back
       out through the sidebar's 10px padding */
    margin: 0 -10px;
    padding: 10px 12px 2px;
    border-top: 1px solid var(--hairline);
    text-decoration: none;
    color: inherit;
    transition: background .12s;
}

.sidebar-account:hover { background: rgba(255, 255, 255, .04); }

.sidebar-account .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface-elev);
    border: 1px solid var(--hairline-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--text-body);
    flex: none;
    text-transform: uppercase;
}

.sidebar-account .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar-account .who { line-height: 1.25; }
.sidebar-account .who .n { font-size: 12.5px; color: var(--text-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-account .who .e { font-size: 11.5px; color: var(--nav-email); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); }

.topbar {
    flex: none;
    height: var(--topbar-h);
    border-bottom: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    gap: 16px;
    /* 18px, same as .content - the breadcrumb and the first card must share
       one left edge */
    padding: 0 18px;
    background: var(--surface);
}

.topbar h1 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
/* Page-mounted topbar actions wear the design's 30px control height — one
   rule, so every button up here is the same size by construction */
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.topbar-tools .btn { height: 30px; padding: 0 12px; font-size: 12.5px; }

.topbar-meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }

/* Canvas: the content pane fills the frame at padding:18px and stacks its
   blocks on gap:14px - it is not centred and has no max width. Centring at
   1320px was the single loudest deviation: on anything wider than ~1550px it
   put hundreds of pixels of dead margin down both sides of a console whose
   whole point is density. */
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px 28px; }
.content-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.content-head h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.content-head p { font-size: 13.5px; color: var(--text-muted); margin: 6px 0 0; line-height: 1.5; max-width: 640px; }

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

.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
/* Canvas: the card sits on the raised surface (#141516), one step ABOVE the
   pane it lies on - drawing it in the pane colour is what made every card
   disappear into the background. Label is plain sans sentence case; only the
   value and the sub line are mono. */
.stat-card { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 11px 13px; }
.stat-card .k { font-size: 12.5px; color: var(--text-muted); }
.stat-card .v { font-family: var(--mono); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; color: var(--text); }
.stat-card .d { font-family: var(--mono); font-size: 11.5px; margin-top: 4px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Two tracks keep the zero floor the four had: a bare 1fr floors at its
   content, and a sub line's nowrap text then holds the track wider than the
   page, which scrolled the whole page sideways rather than ellipsizing */
@media (max-width: 820px) { .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: var(--radius-control);
    font-size: 12.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    /* An action that navigates is an <a class="btn">; without this it keeps the
       user agent's underline and reads as a link wearing a button */
    text-decoration: none;
    /* Both must be stated. A <button class="btn"> carrying no variant otherwise
       falls back to the UA's `buttonface`/`buttontext` - and on a page that
       never declares color-scheme: dark, buttonface is WHITE. */
    background: transparent;
    color: var(--text-body);
    transition: background .12s, border-color .12s, color .12s, box-shadow .12s, opacity .12s;
}

.btn svg { flex: none; }
.btn[disabled] { opacity: .5; cursor: default; }

.btn-primary { background: var(--accent-solid); color: #ffffff; font-weight: 500; }
.btn-primary:not([disabled]):hover { background: #7f7eff; }

/* Light solid button for a page-level create action (Add rule / Add chain …).
   Named -lighted, not -light: .btn-light is the login page's full-width
   (width:100%) submit button, a different component. */
.btn-lighted { background: var(--light); color: #08090a; font-weight: 600; }
.btn-lighted:not([disabled]):hover { background: #FFFFFF; box-shadow: 0 2px 12px rgba(0, 0, 0, .45); }

/* Canvas: the secondary button is a filled chip on #1c1c1f, not a transparent
   outline - on the pane colour a transparent one reads as a bare label */
.btn-outline { background: var(--surface-elev); border-color: var(--hairline-strong); color: var(--text-body); }
.btn-outline:not([disabled]):hover { background: #232327; border-color: #34343a; color: var(--text); }

.btn-danger { background: transparent; border-color: rgba(235, 87, 87, .4); color: var(--danger); }
.btn-danger:not([disabled]):hover { background: rgba(235, 87, 87, .1); border-color: rgba(235, 87, 87, .6); }

/* Outline info button — the non-destructive "check / re-verify" drawer action */
.btn-info { background: transparent; border-color: rgba(94, 160, 239, .4); color: var(--blue); }
.btn-info:not([disabled]):hover { background: rgba(94, 160, 239, .1); border-color: rgba(94, 160, 239, .6); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
/* Filter-row height: a button standing in the toolbar beside the selects must
   be the same box they are, or it reads as a different class of control */
.toolbar .btn { height: var(--control-h); }

/* ---- Status pills (README badge palette) --------------------------------- */

/* Canvas: 20px tall, 5px radius, 11.5px in the UI sans - the mono 11px/6px
   version read a size larger than every pill on the design and squared off
   against the 5px-radius chips beside it */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 20px;
    font-size: 11.5px;
    font-weight: 400;
    padding: 0 7px;
    border-radius: 5px;
    /* No text-transform: the label decides its own case. It used to force
       lowercase because every value was a raw DB one, and that silently
       rewrote the names the screens actually chose - "Chat Completions"
       reached the DOM and rendered "chat completions". A stylesheet that
       edits copy is a stylesheet you have to remember */
    white-space: nowrap;
    border: 1px solid transparent;
}

.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }

/* The dot marks a live state (enabled / error / revoked). A classification —
   a protocol, an endpoint, an error kind — wears the same box without it, so
   the two never read as the same kind of fact. `tag()` in cell.js adds this. */
.pill-nodot::before { display: none; }
/* The canvas gives a classification its own geometry: a notch smaller
   (19px / 4px radius) and mono, because what it holds is a wire value. */
.pill-nodot { height: 19px; padding: 0 6px; border-radius: 4px; font-family: var(--mono); font-size: 11px; }

.pill-green  { color: var(--green); background: rgba(109, 199, 139, .12); border-color: rgba(109, 199, 139, .28); }
.pill-violet { color: var(--violet); background: rgba(181, 156, 255, .12); border-color: rgba(181, 156, 255, .28); }
.pill-blue   { color: var(--blue); background: rgba(94, 160, 239, .12); border-color: rgba(94, 160, 239, .28); }
.pill-amber  { color: var(--amber); background: rgba(206, 163, 74, .12); border-color: rgba(206, 163, 74, .28); }
.pill-red    { color: var(--danger); background: rgba(235, 87, 87, .12); border-color: rgba(235, 87, 87, .3); }
.pill-grey   { color: var(--grey); background: rgba(138, 143, 152, .10); border-color: rgba(138, 143, 152, .24); }
/* Outline is not a status colour: it labels a category (protocol, provider,
   endpoint, credit channel) and must stay visually below the tinted pills. */
.pill-outline { color: var(--text-muted); background: transparent; border-color: var(--hairline-strong); }

/* The Accepted column renders its API names quiet: a row carries up to five
   of them beside a slug, a provider and a price, and Title Case in that
   density competes with the identifiers the eye is actually scanning for.
   Opt-in and named, unlike the blanket lowercase this file used to put on
   every .pill — that one silently rewrote copy the screens had chosen.
   The DOM keeps the real name, so copy and find-in-page still work */
.pill-lower { text-transform: lowercase; }

/* ---- Filter toolbar ------------------------------------------------------ */

/* Canvas: the filter row runs on gap:8px and its left edge lines up with the
   first table column (11px), so the search box and the Name header share one
   vertical rule */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 11px; border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
/* Tab-switched toolbars (Events) hide via the attribute */
.toolbar[hidden] { display: none; }

.search { position: relative; flex: 1; min-width: 200px; }
.search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.search input {
    width: 100%;
    height: var(--control-h);
    background: var(--surface-raised);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-control);
    padding: 0 10px 0 30px;
    color: var(--text-high);
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
    transition: border-color .12s;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { border-color: var(--accent); }

/* ---- Table --------------------------------------------------------------- */

/* Canvas: a panel is a card on the raised surface (#141516) - that is what all
   38 content cards on the design use. Painting it the pane colour is what made
   every card on the dashboard disappear into its own background.
   The exception is a list page, where the panel IS the table: there the canvas
   leaves the wrapper unfilled so rows sit straight on the pane and the page
   reads as one surface, not a card on a card. `.table-scroll` is the structural
   marker for that case - every list template has exactly one. */
.panel { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-card); overflow: hidden; }
.panel:has(> .table-scroll) { background: var(--surface); }

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
/* Column-dense tables keep a floor width and scroll horizontally under it */
.table.wide { min-width: 820px; }

/* Canvas: the header is a filled band (#141516) closed by a hairline, and its
   labels are plain 11.5px sentence case. The mono/uppercase/letter-spaced
   version shouted over the data and left the band invisible, so the table had
   no top edge at all. */
.table thead tr { background: var(--surface-raised); }

.table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 400;
    color: var(--text-muted);
    height: 32px;
    padding: 0 11px;
    border-bottom: 1px solid var(--hairline);
    white-space: nowrap;
}

.table th.num, .table td.num { text-align: right; }

/* Canvas row: 36px tall on 11px side padding, separated by a #191a1b rule -
   a hair darker than the header hairline, so rows group and the header still
   reads as the lid. `height` on a cell is a floor, so the two-line cells
   still grow.
   ⚠️ The 7px vertical padding is what makes that growth livable. With `0`
   the floor centred a single line, but a two-line cell grew flush against
   both rules — the status pill sat welded to the header hairline with its
   sub-line jammed under it. A single line is unaffected: 7 + 20 + 7 still
   fits inside the 36px floor, so only the cells that grow pay for it. */
.table td {
    height: 36px;
    padding: 7px 11px;
    font-size: 12.5px;
    color: var(--text-body);
    border-bottom: 1px solid #191a1b;
    vertical-align: middle;
    /* Content stays whole: wide tables scroll sideways (.table-scroll), so a
       cell never truncates or wraps — two-line cells use block children,
       which nowrap does not affect */
    white-space: nowrap;
}
/* The pagination bar below brings its own top rule; without this the last row
   and the pager stack two hairlines into one thick line */
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; transition: background .1s; }
.table tbody tr.clickable:hover { background: var(--row-hover); }

.table .mono { font-family: var(--mono); }
.table .strong { color: var(--text-high); }
.table .accent { color: var(--accent); }
/* Muted cell — a placeholder value (e.g. a Wave C runtime metric not yet wired) */
.table .faint { color: var(--text-faint); }
/* A bare value the row's severity should still colour (an HTTP status) */
.table .tone-red { color: var(--danger); }
.table .tone-amber { color: var(--amber); }
/* Fixed-format cells (timestamps) must never wrap mid-value */
.table .nowrap { white-space: nowrap; }
.cell-two { display: flex; flex-direction: column; gap: 2px; }
.cell-two .sub { font-size: 11px; color: var(--text-faint); font-family: var(--mono); }
/* A pill is sized by its label. As a flex child it stretches to the column and
   reads as a bar — but only align-self, never align-items on the container:
   the numeric two-line cells rely on stretch to keep their text right-aligned */
.cell-two > .pill { align-self: flex-start; }
/* Token counts (tokens.js), "394.4K in | 22.9K out": the counts keep the cell's
   size; the unit words and the bar recede — grey and a size down, in proportion
   to the counts (12.5 → 11px, the cache line's size) */
.tok-unit { color: var(--text-faint); font-size: .88em; }
/* Inline cell: label + trailing pill, vertically centred */
.cell-inline { display: flex; align-items: center; gap: 8px; }
/* Request-id cell: truncated id + inline copy affordance */
.reqid { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Empty state --------------------------------------------------------- */

.empty { padding: 56px 24px; text-align: center; }
.empty svg { color: var(--text-faint); opacity: .6; margin-bottom: 12px; }
.empty .t { font-size: 13.5px; color: var(--text-high); }
.empty .d { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

/* ---- Load failure -------------------------------------------------------- */

/* Where a fetch failed, said in the space its data was going to fill, with the
   retry beside it. Persistent on purpose: a toast outlives nothing, and the
   void it leaves behind reads as "loaded, and empty". */
.load-fallback { padding: 34px 24px; text-align: center; }
.load-fallback .t { font-size: 13px; color: var(--text-high); }
.load-fallback .d { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; margin-top: 4px; }
.load-fallback .btn-ghost { height: 30px; padding: 0 14px; margin-top: 14px; font-size: 12.5px; }
/* Centred in the attention panel, like the all-clear state beside it */
.attn-list .load-fallback { margin: auto 0; }
/* One message across the chain grid, not one squeezed into its first column */
.chain-grid .load-fallback { grid-column: 1 / -1; }
/* The row flavour brings its own padding */
.table .load-fallback-row td { padding: 0; }

/* ---- Pagination ---------------------------------------------------------- */

.pagination { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border-top: 1px solid var(--hairline); flex-wrap: wrap; gap: 10px; }
/* Author display beats the UA hidden rule — the pair is mandatory on any
   component class that carries display (the recurring [hidden] pit) */
.pagination[hidden] { display: none; }
.pagination .range { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }
.pagination .pager { display: flex; align-items: center; gap: 6px; }
.pagination .page-ind { font-size: 12px; color: var(--text-body); font-variant-numeric: tabular-nums; padding: 0 6px; min-width: 48px; text-align: center; }

/* ---- Overlay-based surfaces: drawer, modal ------------------------------- */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 100;
    animation: overlay-in .2s ease;
}

@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

/* Detail drawer — 462px right slide-in */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    /* 480 on the user side (canvas 09), vs the manager's 462 */
    width: 480px;
    max-width: 92vw;
    background: var(--surface);
    border-left: 1px solid var(--hairline-strong);
    box-shadow: var(--shadow-drawer);
    z-index: 101;
    display: flex;
    flex-direction: column;
    animation: drawer-in .26s cubic-bezier(.4, 0, .2, 1);
}

@keyframes drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

.drawer-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--hairline); }
.drawer-head .title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.drawer-head .sub { font-size: 12.5px; color: var(--text-muted); margin: 5px 0 0; font-family: var(--mono); }
/* The title side gives way and a long title breaks — a request drawer is
   titled with its 32-character id, which on a phone pushed the badge and
   the close button out past the drawer's edge */
.drawer-head .title-row > :first-child { min-width: 0; }
.drawer-head h3, .drawer-head .sub { overflow-wrap: anywhere; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.drawer-tag { font-family: var(--mono); font-size: 11px; color: var(--text-muted); background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: 6px; padding: 3px 8px; }

.drawer-body { padding: 6px 22px 20px; overflow-y: auto; flex: 1; }

.drawer-section { padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.drawer-section:last-child { border-bottom: none; }
/* Canvas: an inset box inside the drawer sits ABOVE the drawer ground, not
   below it - sunk (#0c0d0e) made every framed section read as a hole */
.drawer-section.framed { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: 8px; padding: 14px 16px; margin: 14px 0; }
.section-title { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px; }

/* The webhook payload the integrator received, indented by the page for
   reading. `pre`, never `pre-wrap`: the indentation is the structure, and
   rewrapping a long string value mid-line would read as a line break that is
   not in the data. A line too long for the box scrolls the box, not the drawer
   around it */
.payload { max-height: 280px; overflow: auto; margin: 0; padding: 12px 14px; white-space: pre;
    background: var(--surface-sunk); border: 1px solid var(--hairline); border-radius: 8px;
    font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: var(--text-body); }

.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 6px 0; }
.kv .k { font-size: 12.5px; color: var(--text-muted); flex: none; }
.kv .v { font-size: 12.5px; color: var(--text-high); text-align: right; word-break: break-word; }
.kv .v.mono { font-family: var(--mono); }
/* Health tone on a metric value (WS health, lag, price-feed staleness) */
.kv .v.tone-green { color: var(--accent); }
.kv .v.tone-amber { color: var(--amber); }
.kv .v.tone-red { color: var(--danger); }
.kv .v.tone-blue { color: var(--blue); }
.kv .v.tone-violet { color: var(--violet); }

/* Two equal columns, so buttons align into rows instead of wrapping ragged at
   their label widths. .wide spans the row — for an action deliberately set
   apart from the pairs (the primary, the destructive one), and for a lone
   trailing button that would otherwise sit half-width. */
.drawer-actions { padding: 16px 22px; border-top: 1px solid var(--hairline); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-actions .wide { grid-column: 1 / -1; }

/* Trailing drawer callout (e.g. append-only notice) */
.drawer-note { display: flex; gap: 9px; margin-top: 10px; padding: 11px 13px; font-size: 12px; line-height: 1.5; color: var(--text-muted); background: var(--surface-sunk); border: 1px solid var(--hairline); border-radius: 8px; }
.drawer-note svg { color: var(--text-faint); flex: none; margin-top: 1px; }

/* Centered modal — 412px (confirm / form / 2FA) */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 412px;
    max-width: 94vw;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    background: var(--surface-raised);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-modal);
    box-shadow: var(--shadow-modal);
    /* Above the drawer pair (101): dialogs opened from a drawer (Adjust
       credit, Revoke) must dim it, not hide behind it */
    z-index: 111;
    animation: modal-in .2s ease;
}

/* The modal's own backdrop outranks the drawer for the same reason; the
   shared .overlay class is told apart by what follows it */
.overlay:has(+ .modal) { z-index: 110; }

@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.modal-head { padding: 20px 22px 0; flex: none; }
.modal-head h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.modal-body { padding: 12px 22px 4px; font-size: 13px; color: var(--text-body); line-height: 1.55; overflow-y: auto; min-height: 0; }
.modal-body .field { margin-top: 14px; }
.modal-actions { padding: 18px 22px 20px; display: flex; justify-content: flex-end; gap: 9px; flex: none; }

.modal-body label { display: block; font-size: 12.5px; color: var(--text-body); margin-bottom: 7px; }
.modal-body input, .modal-body textarea {
    width: 100%;
    background: var(--surface-sunk);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-control);
    padding: 9px 12px;
    color: var(--text-high);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
}
.modal-body textarea { resize: vertical; min-height: 72px; }
.modal-body input:focus, .modal-body textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.warn-note {
    display: flex;
    gap: 9px;
    background: rgba(235, 87, 87, .09);
    border: 1px solid rgba(235, 87, 87, .3);
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 12.5px;
    color: var(--danger);
    line-height: 1.5;
    margin-top: 14px;
}
.warn-note svg { flex: none; margin-top: 1px; }

/* Settings edit modal extras */
.modal-body .modal-sub { font-size: 12px; color: var(--text-muted); margin: 6px 0 14px; }
.modal-body input.mono { font-family: var(--mono); font-size: 13px; }
.modal-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--text-muted); }
.modal-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex: none; }
.modal-error { margin-top: 12px; font-size: 12px; color: var(--danger); }

/* ---- Wide detail modal --------------------------------------------------- */
/* Wider than the compact 412px confirm/form base — the frame the trace and
   lifecycle views share. .modal-fixed pins the height too, for a body whose
   content streams in: the frame opens at its final size and never grows step by
   step. Views whose content is known up front (the lifecycle) omit it and let
   the modal size to what it holds. Both scroll inside on short viewports
   (max-height: 90vh is inherited from .modal). */
.modal-wide { width: 34rem; }
.modal-fixed { height: 64rem; }
.modal-fixed .modal-body { flex: 1; }

.modal-headrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.modal-headsub { font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-top: 6px; line-height: 1.5; }
.modal-headsub.break { word-break: break-all; }

.modal-statepill { flex: none; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; border-radius: 20px; padding: 5px 12px; border: 1px solid transparent; white-space: nowrap; }
.modal-statepill.tone-grey { color: var(--grey); background: rgba(255, 255, 255, .05); border-color: var(--hairline-strong); }
.modal-statepill.tone-green { color: var(--accent); background: rgba(130, 143, 255, .12); border-color: rgba(130, 143, 255, .28); }
.modal-statepill.tone-red { color: var(--danger); background: rgba(235, 87, 87, .12); border-color: rgba(235, 87, 87, .3); }
.modal-statepill.tone-amber { color: var(--amber); background: rgba(206, 163, 74, .12); border-color: rgba(206, 163, 74, .28); }
.modal-statepill.tone-violet { color: var(--violet); background: rgba(181, 156, 255, .12); border-color: rgba(181, 156, 255, .28); }
.modal-statepill.tone-blue { color: var(--blue); background: rgba(94, 160, 239, .12); border-color: rgba(94, 160, 239, .28); }
.modal-statepill.tone-outline { color: var(--text-muted); background: transparent; border-color: var(--hairline-strong); }

.rv-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); padding: 4px 0 2px; }
.rv-note svg { color: var(--text-faint); flex: none; }

.rv-section { padding: 16px 0 2px; border-top: 1px solid var(--hairline); margin-top: 14px; }
.rv-section:first-of-type { border-top: none; margin-top: 6px; }

/* ---- Timeline ------------------------------------------------------------ */
/* The shared vertical event rail: a dot on a hairline spine, a time + tag head,
   then title, detail and supporting lines. Two views render into it — the
   re-verify trace (steps arriving live, time = elapsed) and the order lifecycle
   (events reconstructed from the ledger, time = clock + offset) — so the shape
   is defined once here and once in components/timeline.js. */
.tl { margin: 14px 0 4px 5px; border-left: 1px solid var(--hairline-strong); padding-left: 22px; }
.tl-event { position: relative; padding-bottom: 18px; }
.tl-event:last-child { padding-bottom: 2px; }
.tl-dot { position: absolute; left: -28px; top: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint); box-shadow: 0 0 0 4px var(--surface-raised); }
.tl-dot.violet { background: var(--violet); }
.tl-dot.green { background: var(--green); box-shadow: 0 0 0 4px var(--surface-raised), 0 0 8px rgba(109, 199, 139, .55); }
.tl-dot.red { background: var(--danger); box-shadow: 0 0 0 4px var(--surface-raised), 0 0 8px rgba(235, 87, 87, .5); }
.tl-dot.amber { background: var(--amber); box-shadow: 0 0 0 4px var(--surface-raised); }
.tl-head { display: flex; align-items: center; gap: 12px; }
.tl-time { font-family: var(--mono); font-size: 11px; color: var(--text-faint); min-width: 58px; display: inline-flex; align-items: baseline; gap: 7px; }
.tl-offset { color: var(--text-muted); }
.tl-tag { font-family: var(--mono); font-size: 10.5px; color: var(--text-muted); border: 1px solid var(--hairline-strong); border-radius: 7px; padding: 2px 8px; white-space: nowrap; }
.tl-tag.violet { color: var(--violet); border-color: rgba(181, 156, 255, .32); background: rgba(181, 156, 255, .08); }
.tl-tag.green { color: var(--green); border-color: rgba(109, 199, 139, .32); background: rgba(109, 199, 139, .08); }
.tl-tag.red { color: var(--danger); border-color: rgba(235, 87, 87, .32); background: rgba(235, 87, 87, .08); }
.tl-tag.amber { color: var(--amber); border-color: rgba(206, 163, 74, .32); background: rgba(206, 163, 74, .08); }
.tl-title { font-size: 13.5px; font-weight: 500; color: var(--text-high); margin-top: 8px; }
.tl-detail { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.55; word-break: break-word; }
.tl-sub { font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-top: 4px; line-height: 1.5; word-break: break-word; }

/* A step the order has not reached: drawn hollow and dimmed, so an in-flight
   order shows what it is still waiting for without claiming it happened. */
.tl-event.upcoming .tl-dot { background: transparent; border: 1px solid var(--hairline-strong); }
.tl-event.upcoming .tl-title { color: var(--text-muted); font-weight: 400; }
.tl-event.upcoming .tl-detail, .tl-event.upcoming .tl-tag { color: var(--text-faint); }

/* A moment computed rather than recorded — a batch passing the stuck threshold
   is broadcast_at plus a config value, not an event anything wrote down. The
   dot keeps its tone but becomes a ring: a scanner reads dots, not the sub-line
   that explains it. The title stays full strength, because the moment is real
   even though the record is not. Only the amber tone is spelled out because
   only the stuck threshold is derived; another one would be one line. */
.tl-event.derived .tl-dot { background: transparent; border: 1px solid var(--hairline-strong); }
.tl-event.derived .tl-dot.amber { border-color: var(--amber); }

/* The webhook an event triggered, inline under it */
.tl-web { display: inline-flex; align-items: center; gap: 7px; margin-top: 7px; padding: 4px 9px; font-family: var(--mono); font-size: 10.5px; color: var(--text-muted); background: var(--surface-sunk); border: 1px solid var(--hairline); border-radius: 7px; }
.tl-web svg { color: var(--text-faint); flex: none; }
.tl-web .ok { color: var(--accent); }
.tl-web .bad { color: var(--danger); }

/* On-chain vs registry table */
.rv-cmp { width: 100%; border-collapse: collapse; margin-top: 6px; }
.rv-cmp th { text-align: left; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); font-weight: 400; padding: 0 12px 9px 0; }
.rv-cmp th:last-child { padding-right: 0; }
.rv-cmp td { padding: 9px 12px 9px 0; font-size: 12.5px; border-top: 1px solid var(--hairline); vertical-align: middle; }
.rv-cfield { color: var(--text-muted); }
.rv-con, .rv-creg { font-family: var(--mono); color: var(--text-high); }
.rv-con.faint, .rv-creg.faint { color: var(--text-faint); }
.rv-con.diff { color: var(--danger); }
.rv-cmark { text-align: right; padding-right: 0; width: 24px; }
.rv-cmark .rv-ok { color: var(--accent); }
.rv-cmark .rv-bad { color: var(--danger); }
.rv-none { color: var(--text-faint); }

/* Verdict banner */
.rv-verdict { display: flex; gap: 11px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 11px; border: 1px solid transparent; }
.rv-vic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.rv-vt { font-size: 13.5px; font-weight: 600; }
.rv-vd { font-size: 12.5px; color: var(--text-body); margin-top: 3px; line-height: 1.55; }
.rv-v-ok { background: rgba(130, 143, 255, .08); border-color: rgba(130, 143, 255, .24); }
.rv-v-ok .rv-vic { background: rgba(130, 143, 255, .16); color: var(--accent); }
.rv-v-ok .rv-vt { color: var(--accent); }
.rv-v-bad { background: rgba(235, 87, 87, .08); border-color: rgba(235, 87, 87, .26); }
.rv-v-bad .rv-vic { background: rgba(235, 87, 87, .16); color: var(--danger); }
.rv-v-bad .rv-vt { color: var(--danger); }
.rv-v-warn { background: rgba(206, 163, 74, .08); border-color: rgba(206, 163, 74, .26); }
.rv-v-warn .rv-vic { background: rgba(206, 163, 74, .16); color: var(--amber); }
.rv-v-warn .rv-vt { color: var(--amber); }

/* ---- Settings page ------------------------------------------------------- */

/* Snapshot card: a stat-card like every other page's, deliberately not one of
   the settings group cards below — what it reports is not a setting but whether
   the settings below are the ones actually in force. State and action sit
   bottom-right, the corner the eye lands on last after reading the numbers. */
/* Rides in the same column flow as the group cards, so it is one column wide by
   construction and the groups pack around it instead of leaving the right half
   empty beside it. Kept visually a stat-card, because what it reports is not a
   setting but whether the settings below are the ones actually in force. */
.snapshot-card { break-inside: avoid; margin-bottom: 14px; }
.snapshot-card.drifted { border-color: rgba(235, 87, 87, .35); background: rgba(235, 87, 87, .04); }
.snapshot-card .d .sep { margin: 0 7px; opacity: .45; }
.snapshot-card .d .hi { color: var(--text-body); }
.snapshot-note { margin: 11px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--text-faint); }
.snapshot-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
/* Matches btn-sm's box exactly — a pill and a button side by side read as one
   control strip only if they share a baseline and a height */
.snapshot-actions .pill { height: 30px; padding: 0 11px; box-sizing: border-box; border-radius: var(--radius-control); }
.snapshot-drift { margin-top: 9px; font-size: 11.5px; color: var(--danger); }
.snapshot-drift .keys { display: block; margin-top: 4px; color: var(--text-body); overflow-wrap: anywhere; }

/* ---- Settings page (hot-config editor) ---------------------------------- */

.settings-note { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }

/* Reload cadence in the topbar, next to the breadcrumb */
.settings-reload { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }

/* Masonry via CSS columns: the groups are wildly uneven (1 row vs 20), so a
   row-aligned grid stretches short cards and strands a tall one beside an empty
   half. Columns pack each card to its content and balance the two heights. */
.settings-grid { columns: 2; column-gap: 14px; }
@media (max-width: 900px) { .settings-grid { columns: 1; } }

.settings-card { background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--radius-card); overflow: hidden; break-inside: avoid; margin-bottom: 14px; }

/* The whole head toggles the card; the chevron turns as it opens */
.settings-card-head { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 13px 16px; border: none; background: transparent; cursor: pointer; transition: background .1s; }
.settings-card-head:hover { background: rgba(255, 255, 255, .02); }
.settings-chevron { flex: none; color: var(--text-faint); transition: transform .15s; }
.settings-card:not(.collapsed) .settings-chevron { transform: rotate(90deg); }
.settings-card-head .t { font-size: 13px; font-weight: 600; color: var(--text-high); }
.settings-card-head .p { font-size: 11px; color: var(--text-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-card-head .n { margin-left: auto; flex: none; font-size: 11px; color: var(--text-faint); }
.settings-card-head .n .dot { color: var(--accent); }

.settings-body { border-top: 1px solid var(--hairline); }
.settings-card.collapsed .settings-body { display: none; }
.settings-rows { display: flex; flex-direction: column; }
.settings-foot { display: flex; justify-content: flex-end; padding: 11px 16px; border-top: 1px solid var(--hairline); }

.setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--hairline); }
.setting-row:first-child { border-top: none; }
/* Differs from its code default — the violet tint the design calls for */
.setting-row.changed { background: var(--accent-soft); }
/* Long comma-lists take the full row width: key on top, textarea below */
.setting-row.long { flex-direction: column; gap: 8px; }

.setting-label { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; padding-top: 6px; }
.setting-row.long .setting-label { padding-top: 0; }
.setting-key { font-family: var(--mono); font-size: 12px; color: var(--text-body); overflow-wrap: anywhere; }
.setting-desc { font-size: 11.5px; color: var(--text-faint); line-height: 1.45; }

.setting-control { display: flex; align-items: center; gap: 8px; flex: none; }
.setting-row.long .setting-control { align-self: stretch; }

.setting-input { height: 32px; padding: 0 10px; background: var(--surface-sunk); border: 1px solid var(--hairline-strong); border-radius: var(--radius-control); color: var(--text-body); font-size: 12.5px; font-family: inherit; width: 240px; }
.setting-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.setting-num { width: 130px; text-align: right; font-family: var(--mono); }
.setting-textarea { flex: 1; width: 100%; height: auto; padding: 8px 10px; font-family: var(--mono); font-size: 12px; line-height: 1.5; resize: vertical; white-space: pre-wrap; word-break: break-word; }

.setting-check { flex: none; align-self: center; }
.setting-check .check-label { min-width: 22px; }

.setting-reset { flex: none; }
.setting-def { font-size: 11px; color: var(--text-faint); }

/* ---- Account page -------------------------------------------------------- */

.account { max-width: 720px; }

.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .avatar {
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 12px;
    background: var(--surface-raised);
    border: 1px solid var(--hairline-strong);
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-high);
    text-transform: uppercase;
}
.profile-id { min-width: 0; }
.profile-id .name { font-size: 16px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-id .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.session-pill { margin-left: auto; flex: none; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin-top: 20px; border-top: 1px solid var(--hairline); padding-top: 16px; }
.profile-grid .k { font-size: 11.5px; color: var(--text-faint); }
.profile-grid .v { font-size: 13px; color: var(--text-body); margin-top: 3px; overflow-wrap: anywhere; }

/* Security rows card: tighter vertical padding, the rows own their spacing */
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--hairline); }
.sec-row:first-child { border-top: none; }
.sec-info { min-width: 0; }
.sec-info .t { font-size: 13.5px; font-weight: 500; color: var(--text-high); display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sec-info .d { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.sec-btns { display: flex; gap: 8px; flex: none; }

/* Two-factor enroll modal: QR + manual key side by side → verify → shown-once code */
.tf-step { font-size: 12px; font-weight: 600; color: var(--text-high); margin: 16px 0 10px; }
.tf-step:first-child { margin-top: 2px; }
.tfa-setup { display: flex; gap: 16px; align-items: center; margin: 4px 0; }
.tfa-qr {
    width: 128px;
    height: 128px;
    flex: none;
    border-radius: 10px;
    border: 1px solid var(--hairline-strong);
    background: #FFFFFF;
    padding: 8px;
}
.tfa-qr svg { width: 100%; height: 100%; display: block; }
.tfa-key { min-width: 0; }
.tfa-key .k { font-size: 11.5px; color: var(--text-faint); margin-bottom: 6px; }
.tfa-key .val { font-family: var(--mono); font-size: 14px; letter-spacing: .06em; color: var(--text-high); word-break: break-all; }
.tfa-key .hint { font-size: 11.5px; color: var(--text-faint); margin-top: 9px; line-height: 1.45; }

.tf-hint { font-size: 11.5px; line-height: 1.5; margin-top: 4px; }

/* A monospaced 6-digit code input (2FA), spaced for legibility */
.modal-body input.code { font-family: var(--mono); letter-spacing: .2em; }

/* ---- IP blocklist page --------------------------------------------------- */

/* Inline mono span inside body copy (e.g. /manager · /v1) */
.mono-inline { font-family: var(--mono); color: var(--text-body); }
/* Reason column: cap width, let long reasons wrap rather than stretch the table */
.table td.clamp { max-width: 260px; }
/* An expiry dropdown used as a full-width form control inside a modal */
.modal-body .field .dd-trigger { width: 100%; justify-content: space-between; margin-top: 0; }

/* ---- Custom dropdown (portaled popover) ---------------------------------- */

.dd-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: var(--control-h);
    padding: 0 10px;
    background: var(--surface-raised);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-control);
    color: var(--text-body);
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
}

.dd-trigger:hover { background: var(--surface-elev); border-color: #34343a; color: var(--text-high); }
/* Canvas: a filter holding a non-default value steps up a surface and takes
   full-strength text - that difference is the only cue that a list is filtered */
.dd-trigger.dd-set { background: var(--surface-elev); border-color: #34343a; color: var(--text-high); }
/* Inline-block so a scripted min-width (widest-option lock) holds and the label
   left-aligns instead of the trigger resizing with the selection */
/* Left-align inside the (min-width) box: the trigger is a <button>, whose
   default text-align: center would otherwise centre a short value */
.dd-value { display: inline-block; text-align: left; }
.dd-trigger svg { color: var(--text-faint); flex: none; opacity: .6; }

.dd-menu {
    position: fixed;
    z-index: 200;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #161616;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, .55);
    animation: pop-in .13s ease;
}

/* The scrolling half of the menu — the search row above it stays pinned */
.dd-list { overflow-y: auto; min-height: 0; padding: 5px; }

.dd-search { flex: none; padding: 6px; border-bottom: 1px solid #26272c; }

.dd-search input {
    width: 100%;
    height: 28px;
    padding: 0 9px;
    border-radius: 6px;
    border: 1px solid #2a2b30;
    background: #0f1011;
    color: var(--text);
    font-size: 12.5px;
    outline: none;
}

.dd-search input:focus { border-color: #3a3b44; }

/* hidden must win over the option's flex display (the [hidden] pit) */
.dd-option[hidden] { display: none; }

.dd-empty { padding: 8px 10px; font-size: 12.5px; color: var(--text-faint); }

@keyframes pop-in {
    from { opacity: 0; transform: translateY(6px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.dd-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--text-body);
    cursor: pointer;
    /* Never wrap: the menu sizes to its widest label (dropdown.js sets a
       min-width and lets the content decide the rest) */
    white-space: nowrap;
}

/* Only engages when a label is long enough that the menu hit the viewport cap;
   min-width:0 is what lets a flex item shrink below its own content at all */
.dd-option .dd-label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.dd-option:hover { background: #1f2024; color: var(--text); }
.dd-option .tick { color: var(--accent); opacity: 0; }
.dd-option.selected .tick { opacity: 1; }
.dd-option.selected { color: var(--text-high); }

/* Custom checkbox — the login page's pure-CSS check (appearance:none, no
   native platform chrome, no data: URIs), sized for dialog forms */
.check-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* label.check, not .check: .modal-body label sets display:block at equal
   file-order-beats-it specificity — the element tag keeps this one ahead */
label.check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 0;
    font-size: 12.5px;
    color: var(--text-body);
    cursor: pointer;
    user-select: none;
}

/* padding:0 matters: the .modal-body input blanket pads 9px 12px, which
   would inflate the 16px box into a pill (the same blanket-rule pollution
   as label's display:block) */
.check input {
    appearance: none;
    width: 16px;
    height: 16px;
    padding: 0;
    flex: none;
    border-radius: 5px;
    border: 1px solid var(--hairline-strong);
    background: #0c0d0e;
    margin: 0;
    cursor: pointer;
    position: relative;
    transition: background .12s, border-color .12s;
}

.check input:checked { background: var(--accent-solid); border-color: var(--accent-solid); }

.check input:checked::after {
    content: "";
    position: absolute;
    left: 4.5px;
    top: 1.5px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.check-label { white-space: nowrap; }

/* ---- Toast --------------------------------------------------------------- */

.toast-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-raised);
    border: 1px solid var(--hairline-strong);
    border-radius: 8px;
    box-shadow: var(--shadow-toast);
    padding: 12px 15px;
    font-size: 13px;
    color: var(--text-high);
    animation: toast-in .22s ease;
}

.toast .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--accent); }
.toast.danger .dot { background: var(--danger); }
.toast.info .dot { background: var(--blue); }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Copy affordance on drawer values / cells */
.copy-btn { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 2px; display: inline-flex; transition: color .12s; }
.copy-btn:hover { color: var(--accent); }

/* Solid confirm tones (tinted confirm button) + drawer close + demo layout */
.btn-danger-solid { background: var(--danger-solid); color: #FFFFFF; font-weight: 600; }
.btn-danger-solid:not([disabled]):hover { background: #E5352F; }
.btn-info-solid { background: var(--blue); color: var(--accent-deep); font-weight: 600; }
.btn-info-solid:not([disabled]):hover { background: #A5E0FD; }

.drawer-head .title-row { align-items: flex-start; }
.drawer-head .title-right { display: flex; align-items: center; gap: 10px; flex: none; }
.drawer-close {
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 3px;
    display: inline-flex;
    border-radius: 6px;
    transition: color .12s, background .12s;
}
.drawer-close:hover { color: var(--text-high); background: #1f2024; }

.demo-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none; }
.signout-row { margin-top: 22px; }

/* ---- Dashboard ----------------------------------------------------------- */

/* Range toggle. Buttons, not links: the choice re-reads a payload rather than
   navigating, and the page must stay where the reader left it */
/* Canvas segmented: 2px rail on #141516 inside a hairline, and the selected
   option is a #2a2b30 chip - NOT a white pill. The white one was borrowed from
   a light-surface component and read as a primary action in a filter row. */
.range-toggle { display: flex; gap: 0; flex: none; background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: 7px; padding: 2px; }
.range-opt { appearance: none; background: transparent; border: none; font: inherit; font-size: 12.5px; color: var(--text-muted); padding: 5px 14px; border-radius: 5px; cursor: pointer; transition: color .12s, background .12s; }
.range-opt:hover { color: var(--text-high); }
.range-opt.on { background: var(--hairline-strong); color: var(--text-high); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; }

/* The card detail line takes a tone only where rising is good news —
   settlement. Nothing else on this page colours a direction */
.stat-card .d.tone-green { color: var(--green); }

/* ---- Dashboard · needs attention ----------------------------------------- */

.attn-card { display: flex; flex-direction: column; padding: 16px 18px; }
.attn-list { display: flex; flex-direction: column; flex: 1; gap: 8px; margin-top: 14px; }
.attn-item { display: flex; gap: 11px; padding: 10px 11px; border: 1px solid var(--hairline); border-radius: 8px; text-decoration: none; transition: background .12s, border-color .12s; }
.attn-item:hover { background: var(--row-hover); border-color: var(--hairline-strong); }
.attn-dot { width: 8px; height: 8px; flex: none; margin-top: 5px; border-radius: 50%; background: var(--grey); }
.attn-dot.tone-red { background: var(--danger); }
.attn-dot.tone-amber { background: var(--amber); }
.attn-text { min-width: 0; }
.attn-t { font-size: 13px; font-weight: 500; color: var(--text-high); }
.attn-d { font-size: 12px; color: var(--text-muted); line-height: 1.45; margin-top: 2px; }
/* Centred, because this panel is as tall as the chart beside it and a good-news
   message pinned to the top of all that space reads as content that failed to
   arrive */
.attn-clear { margin: auto 0; padding: 22px 4px; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.attn-clear-t { font-size: 13px; color: var(--text-high); }
.attn-clear-d { margin-top: 4px; }

/* ---- Dashboard · chain health -------------------------------------------- */

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-link { font-size: 12.5px; color: var(--text-muted); text-decoration: none; transition: color .12s; }
.section-link:hover { color: var(--accent); }

.chain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.chain-card { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 15px 16px; }
.chain-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* One line, always. A wrapped network name would push that card's metrics half
   a line below its neighbours', and those rows exist to be compared across
   cards — the comparison is worth more than the two words a long name loses at
   the narrowest width. The full name is on the element's title */
.chain-name { min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text-high); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chain-head .pill { flex: none; }
.chain-meta { font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.chain-metric { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; margin-top: 12px; }
.chain-metric .k { color: var(--text-faint); }
.chain-metric .v { font-family: var(--mono); color: var(--text-body); font-variant-numeric: tabular-nums; }
.chain-metric .v.tone-green { color: var(--green); }
.chain-metric .v.tone-amber { color: var(--amber); }
.chain-bar { height: 5px; margin-top: 6px; border-radius: 5px; background: #1f2024; overflow: hidden; }
.chain-bar-fill { height: 100%; border-radius: 5px; background: var(--grey); }
.chain-bar-fill.tone-green { background: var(--green); }
.chain-bar-fill.tone-amber { background: var(--amber); }
.chain-idle { margin-top: 14px; font-size: 11.5px; line-height: 1.5; color: var(--text-faint); }

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

/* Four across, then straight to two. Never three: the registry holds four
   networks, and a three-wide grid renders them as a row of three with one
   stranded underneath. The breakpoint is where a card stops fitting the longest
   network name beside its pill, not where the viewport hits a round number */
@media (max-width: 1240px) {
    .chain-grid { grid-template-columns: repeat(2, 1fr); }
}

/* The menu button for the navigation drawer below 820px; wider, the
   sidebar is always there and the button is not drawn */
.nav-toggle {
    display: none; align-items: center; justify-content: center; flex: none;
    width: 32px; height: 32px; margin-left: -7px; padding: 0;
    border: 0; border-radius: var(--radius-control); background: transparent;
    color: var(--text-muted); cursor: pointer; transition: background .12s, color .12s;
}
.nav-toggle:hover { color: var(--text-high); background: rgba(255, 255, 255, .05); }
.nav-scrim { display: none; }
/* Nothing behind the open drawer scrolls */
html.nav-locked { overflow: hidden; }

@media (max-width: 820px) {
    /* The page scrolls, not a pane inside a frame the height of the screen:
       a phone's toolbars come and go as the page scrolls, and the frame
       kept its last rows under them */
    .console { display: block; height: auto; overflow: visible; }
    .main { height: auto; min-height: 100dvh; }
    .content { overflow: visible; padding: 14px 14px 24px; }
    /* Its actions take a second row when the title leaves them no room —
       two of them already do on a 320px screen */
    .topbar {
        position: sticky; top: 0; z-index: 90; height: auto; min-height: var(--topbar-h);
        flex-wrap: wrap; gap: 6px 10px; padding: 7px 14px;
    }
    .nav-toggle { display: inline-flex; }
    /* The sidebar used to be hidden here outright, and every other page and
       the sign-out went with it. It is a drawer over the page instead,
       opened from the topbar */
    .sidebar {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 121;
        width: min(264px, 84vw); height: auto;
        transform: translateX(-100%); visibility: hidden;
        transition: transform .22s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .22s;
    }
    .console.nav-open .sidebar {
        transform: none; visibility: visible; box-shadow: 24px 0 70px rgba(0, 0, 0, .55);
        transition: transform .22s cubic-bezier(.4, 0, .2, 1);
    }
    .console.nav-open .nav-scrim {
        display: block; position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .5);
    }
    .chain-grid { grid-template-columns: minmax(0, 1fr); }
}

/* iOS zooms the whole page into a field whose text is under 16px the
   moment it takes focus, and leaves it zoomed. On a touch screen no field
   is under 16px; the code cells, set larger on purpose, keep their size */
@media (pointer: coarse) {
    input:not(.code-input, .code-cells input, [type=checkbox], [type=radio]), select, textarea {
        font-size: 16px !important;
    }
}

/* ---- Topbar breadcrumb (canvas: "Group / Page") -------------------------- */

.crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); }

.crumbs .sep { color: #3a3c42; }

.crumbs .here { color: var(--text); }

/* ---- Screen placeholder (skeleton stage only) ---------------------------- */

.placeholder {
    min-height: 60vh;
    display: grid;
    place-items: center;
}

.placeholder .inner { text-align: center; max-width: 380px; }

.placeholder .glyph {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-raised);
    border: 1px solid var(--hairline);
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
}

.placeholder h2 { font-size: 15.5px; font-weight: 600; margin: 14px 0 0; color: var(--text); }

.placeholder p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 8px 0 0; }

/* ============================================================================
 * Dashboard pieces: topbar tools, the pool banner, panel heads and their
 * empty line. The charts themselves are js/components/bar-chart.js (Overview
 * + Usage section below)
 * ========================================================================== */

.topbar-tools { display: flex; align-items: center; }

.warn-note.amber {
    background: rgba(206, 163, 74, .1);
    border-color: rgba(206, 163, 74, .28);
    color: #e5c98a;
    align-items: center;
    margin: 0 0 16px;
}
.warn-note[hidden] { display: none; }
.warn-note.amber svg { color: var(--amber); }
.warn-note.amber .grow { flex: 1; }
.warn-note.amber strong { color: var(--amber); font-weight: 600; }
.warn-note.amber .key { font-family: var(--mono); color: var(--amber); }
.warn-note.amber .turn-on {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 11px;
    border-radius: 6px;
    background: rgba(206, 163, 74, .16);
    border: 1px solid rgba(206, 163, 74, .4);
    color: #e5c98a;
    font-size: 12px;
    text-decoration: none;
    flex: none;
}
.warn-note.amber .turn-on:hover { background: rgba(206, 163, 74, .24); }

.duo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1100px) { .duo-grid { grid-template-columns: minmax(0, 1fr); } }

/* Every top-level block on a page carries the same 18px under it. .summary and
   .duo-grid always did; a bare panel used as a page block did not — which went
   unnoticed for eight screens because each had exactly one and put it last. */
.content > .panel { margin-bottom: 18px; }

/* ---- Attention panels ----------------------------------------------------- */

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--hairline); }
.panel-title { font-size: 13px; font-weight: 500; color: var(--text-high); }
.panel-hint { font-size: 11.5px; color: var(--text-faint); }
.panel-link { font-size: 11.5px; color: var(--text-muted); text-decoration: none; transition: color .12s; }
.panel-link:hover { color: var(--accent); }

.mini-empty { padding: 26px 14px; text-align: center; font-size: 12.5px; color: var(--text-faint); }
.mini-empty.warn { color: var(--amber); }

.stat-card .v.bad { color: var(--danger); }
.stat-card .d.bad { color: var(--danger); }

/* ---- Channels / Models --------------------------------------------------- */

/* The kind segmented control reuses the range-toggle skeleton; the count sits
   quieter than the label */
.seg-count { opacity: .55; font-family: var(--mono); margin-left: 5px; }

/* Quota mini bars: label / track / value on one grid, the TRACK pinned so
   every meter is the same length and the percentage follows it ragged
   (see manager.css for the full note) */
.qmini { display: grid; grid-template-columns: auto 140px auto; justify-content: start;
         align-items: center; gap: 3px 6px; }
.qmini-label { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }
.qmini-track { height: 4px; border-radius: 2px; background: #1f2024; overflow: hidden; }
.qmini-fill { display: block; height: 4px; border-radius: 2px; background: var(--accent); }
.qmini-val { font-family: var(--mono); font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }

/* Drawer health strip: one mono line answering "is it dead right now" */
.health-line { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 7px; background: var(--surface-raised); border: 1px solid var(--hairline); font-family: var(--mono); font-size: 11.5px; color: var(--text-body); flex-wrap: wrap; }
.health-line .k { color: var(--text-faint); }
.health-line .sep { color: #3a3c42; }
.health-line .ok { color: var(--green); }
.health-line .warn { color: #cea34a; }
.health-line .bad { color: #eb5757; }

/* Drawer face rows: extra wire → resolved base */
.face-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; background: var(--surface-raised); border: 1px solid var(--hairline); font-family: var(--mono); font-size: 11.5px; }
.face-row .proto { color: #b59cff; }
.face-row .arrow { color: #3a3c42; }
.face-row .base { color: var(--text-muted); word-break: break-all; }
.face-row .miss { color: #cea34a; }

/* Drawer quota-window cards: label + used bar + reset/checked line; a stale
   window dims whole and wears the tag — routing does not believe it */
.quota-card { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px; border-radius: 6px; background: var(--surface-raised); border: 1px solid var(--hairline); }
.quota-card.stale { opacity: .55; }
.quota-head { display: flex; align-items: center; justify-content: space-between; }
.quota-name { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-body); }
.quota-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 4px; border: 1px solid #34343a; color: var(--text-muted); font-size: 10.5px; font-family: var(--mono); }
.quota-pct { font-family: var(--mono); font-size: 12px; color: var(--text-body); }
.quota-track { height: 5px; border-radius: 3px; background: #1f2024; overflow: hidden; }
.quota-fill { display: block; height: 5px; border-radius: 3px; }
.quota-foot { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 11px; }
.quota-foot .resets { color: var(--text-muted); }
.quota-foot .checked { color: var(--text-faint); }

/* Red state box (refresh failed) — the .warn-note shape in the error tone */
.err-note { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; background: rgba(235, 87, 87, .10); border: 1px solid rgba(235, 87, 87, .28); font-family: var(--mono); font-size: 11.5px; color: #eb5757; }
.err-note[hidden] { display: none; }

/* Test modal: wide two-pane request/result */
.modal-test { width: min(1068px, 92vw); }
.test-note { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 6px; background: rgba(206, 163, 74, .12); border: 1px solid rgba(206, 163, 74, .28); color: #e5c98a; font-size: 11.5px; }
/* The probe knobs above the two panes: model picker + prompt text */
.test-controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.test-control { display: flex; flex-direction: column; gap: 6px; }
/* Fixed width + ellipsis: picking a long slug must not reflow the row
   (the trigger growing is what made the whole modal appear to flash) */
.test-control .dd-trigger { width: 300px; min-width: 0; }
.test-control .dd-trigger .dd-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.test-control-wide { flex: 1; min-width: 220px; }

.test-control input {
    height: 32px;
    padding: 0 10px;
    border-radius: 7px;
    border: 1px solid #2a2b30;
    background: #0f1011;
    color: var(--text);
    font-size: 12px;
    outline: none;
    width: 100%;
}

.test-control input:focus { border-color: #3a3b44; }

.test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .test-grid { grid-template-columns: minmax(0, 1fr); } }
.test-col-title { font-size: 11.5px; color: var(--text-faint); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; }
/* Refresh keeps the old preview and dims it — swapping to a one-line
   placeholder collapses the modal's height and snaps it back (the flash) */
.test-pre.stale { opacity: .55; }

.test-pre { transition: opacity .12s; border-radius: 7px; background: #0c0d0e; border: 1px solid #1f2024; padding: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); line-height: 1.75; white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow: auto; margin: 0; }
.test-status { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.test-timing { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); }
.test-foot-note { display: block; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

/* Timeline: an entry's request-id link-through */
.tl-link { font-family: var(--mono); font-size: 11px; color: var(--accent); text-decoration: none; }
.tl-link:hover { text-decoration: underline; }

/* ==========================================================================
   Generations — the server-paged ledger table
   ========================================================================== */

/* In-place filter links (user / model / channel cells): body-colored until
   hovered, so the table doesn't shout; the rid column keeps the accent —
   it is the walk into the trace. */
.cell-link { color: var(--text-body); text-decoration: none; }
.cell-link:hover { color: var(--accent); }
.cell-link.mono { color: var(--accent); }
.cell-link.mono:hover { text-decoration: underline; }

/* status cell's second line: fault_party · fault_reason */
/* 5px, not 3: the pill above it is a bordered box, so the two need more air
   between them than two bare text lines would */
.fault-sub { margin-top: 5px; font-size: 10.5px; color: var(--text-faint); font-family: var(--mono); }

.empty .btn { margin-top: 14px; }
.btn[hidden] { display: none; }

/* ==========================================================================
   Trace — summary card + attempt timeline
   ========================================================================== */

.trace-search { display: flex; gap: 10px; margin-bottom: 16px; }
.trace-search[hidden] { display: none; }
.trace-search .grow { flex: 1; }
.trace-search input { font-family: var(--mono); }
/* Same box as the input it sits beside (.search input is 34px) */
.trace-search .btn { height: 34px; }

.trace-summary { padding: 15px 17px; margin-bottom: 18px; }
.ts-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.ts-id { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.ts-id .mono { font-size: 15px; color: var(--text-high); overflow: hidden; text-overflow: ellipsis; }
.ts-grid { display: flex; flex-wrap: wrap; gap: 9px 26px; }
.ts-kv { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ts-k { font-size: 11.5px; color: var(--text-faint); }
.ts-v { font-size: 12.5px; color: var(--text-body); }

.trace-attempts { max-width: 980px; }
.trace-label { font-size: 11.5px; color: var(--text-faint); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }

.att-row { display: flex; gap: 14px; }
.att-rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 26px; }
.att-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 11.5px;
    flex: none;
}
.att-dot.green { color: var(--green); background: rgba(109, 199, 139, .12); border: 1px solid rgba(109, 199, 139, .34); }
.att-dot.red { color: var(--danger); background: rgba(235, 87, 87, .12); border: 1px solid rgba(235, 87, 87, .34); }
.att-dot.amber { color: var(--amber); background: rgba(206, 163, 74, .12); border: 1px solid rgba(206, 163, 74, .34); }
.att-dot.grey { color: var(--text-muted); background: rgba(154, 154, 154, .1); border: 1px solid rgba(154, 154, 154, .3); }
.att-spine { flex: 1; width: 1px; background: var(--hairline); margin-top: 6px; }

.att-card { flex: 1; min-width: 0; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface); overflow: hidden; margin-bottom: 14px; }
.att-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; flex-wrap: wrap; }
.att-card:has(.att-body) .att-head { border-bottom: 1px solid var(--hairline); }
.att-name { font-size: 13.5px; color: var(--text-high); }
.att-proto {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 6px;
    border-radius: 4px;
    border: 1px solid #2a2b30;
    color: var(--text-muted);
    font-size: 11px;
}
.att-timing { margin-left: auto; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-open { margin-left: 12px; font-size: 12px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.att-open:hover { text-decoration: underline; }

.att-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 11px; }
.att-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.att-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.att-k { font-size: 11.5px; color: var(--text-faint); }
.att-v { font-size: 12.5px; color: var(--text-body); overflow: hidden; text-overflow: ellipsis; }
.att-v.tone-red { color: var(--danger); }
.att-line { font-size: 12px; color: var(--text-body); word-break: break-word; }
.att-line.faint { color: var(--text-faint); }

.att-bh { display: flex; flex-direction: column; gap: 6px; }
.att-bh-head { display: flex; align-items: center; justify-content: space-between; }
.att-bh-head .mono { font-size: 11.5px; color: var(--text-faint); }
.att-pre {
    margin: 0;
    border-radius: 6px;
    background: #0c0d0e;
    border: 1px solid var(--hairline);
    padding: 11px 12px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 360px;
    overflow: auto;
}

/* Zero-attempt rejection: the reason card sits where the timeline would */
.trace-reject { border: 1px solid rgba(235, 87, 87, .3); border-radius: 8px; background: var(--surface); padding: 15px 17px; }
.tr-title { font-size: 13.5px; font-weight: 500; color: var(--text-high); margin-bottom: 10px; }
.tr-pills { display: flex; gap: 7px; margin-bottom: 11px; }
.tr-msg { font-family: var(--mono); font-size: 12px; color: var(--danger); margin-bottom: 10px; word-break: break-word; }
.tr-note { font-size: 12px; color: var(--text-faint); line-height: 1.6; }
.tr-gap { margin-bottom: 14px; }

/* ---- Events ------------------------------------------------------------- */

/* The retention footnote under the pagination — policy made visible */
.retention-note {
    padding: 10px 18px 13px;
    border-top: 1px solid var(--hairline);
    font-size: 11px;
    color: var(--text-faint);
}

/* Reason column: our-side trigger text, kept subdued next to the pills */
.reason-cell { font-size: 11.5px; color: var(--text-muted); }

/* ---- Users -------------------------------------------------------------- */

/* Drawer sub-tables (API keys / credit ledger): compact grid rows */
.sub-table { display: flex; flex-direction: column; gap: 2px; }
.sub-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 12px;
}
.sub-row:last-of-type { border-bottom: none; }
.sub-row.ledger { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.sub-row .mono { font-size: 11.5px; }
.sub-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-body); }
.sub-action { min-width: 62px; text-align: right; }
.sub-amount { text-align: right; }
.sub-amount.pos { color: var(--green); }
.sub-amount.neg { color: var(--danger); }
.sub-more { display: inline-block; margin-top: 9px; font-size: 12px; }

/* Negative balances read as debt at a glance; under a dollar is the warning
   before that, since the next call is what turns it negative */
.neg { color: var(--danger); }
.low { color: var(--amber); }

/* Adjust-credit dialog: direction segmented + live balance preview */
.adjust-seg { width: fit-content; }
.adjust-preview { min-height: 18px; font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

/* ---- Utility classes ------------------------------------------------------
   Static looks belong here, never to scripted styles: only data-driven
   values (bar widths, dropdown positions) go through the CSSOM. */
.v-stack { display: flex; flex-direction: column; gap: 6px; }
.v-stack.tight { gap: 2px; }
.text-danger { color: var(--danger); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
/* Reserve one line of height so async text doesn't reflow the form */
.min-line { min-height: 18px; }

/* ---- Performance: runtime panels -----------------------------------------
   Panel A is four gauges side by side rather than a table: each answers a
   different question and none of them is a row in a series. Below the fold
   the page returns to the ordinary panel/table vocabulary. */
.rt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rt-cell { padding: 13px 14px; border-right: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rt-cell:last-child { border-right: none; }
.rt-label { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.rt-value { font-family: var(--mono); font-size: 17px; font-weight: 600; color: var(--text); display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.rt-value .unit { font-size: 11.5px; font-weight: 400; color: var(--text-faint); }
.rt-sub { font-family: var(--mono); font-size: 11px; color: var(--text-muted); line-height: 1.5; white-space: pre-line; }
.rt-track { height: 6px; border-radius: 2px; background: #1c1c1f; overflow: hidden; }
.rt-fill { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
/* Degraded is a designed state, not a crash — it gets a stable place to
   appear rather than being inferred from odd behaviour elsewhere */
.rt-cell.degraded { background: rgba(235, 87, 87, .06); }
.rt-cell.degraded .rt-value { color: var(--danger); }

/* Task table: an overdue row is the whole reason this table exists, so it
   carries a tint and not only a coloured word */
.table tbody tr.overdue { background: rgba(235, 87, 87, .06); }
.task-result { display: flex; align-items: center; gap: 6px; }
.task-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--green); }
.task-dot.amber { background: var(--amber); }
.task-dot.red { background: var(--danger); }
.task-dot.grey { background: var(--grey); }

/* Panel C stacks snapshots over caches; the divider marks where the meaning
   changes from "how old" to "how effective" */
.snap-list { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.snap-row { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.snap-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.snap-name { font-size: 12px; color: var(--text-body); }
.snap-count { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); margin-left: 7px; }
.snap-age { font-family: var(--mono); font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.snap-next { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); }
.snap-divider { height: 1px; background: var(--hairline); }
.cache-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cache-val { font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }
/* The unreachable-runtime frame is one statement, not one gauge among four */
.rt-cell.solo { grid-column: 1 / -1; border-right: none; }

/* ============================================================================
 * User-console additions (stage 4 batch 0) — everything below is user-side
 * only; the shared blocks above stay byte-aligned with the manager sheet so
 * later diffs show real divergence, not drift.
 * ========================================================================== */

/* ---- Third-party sign-in (Login / Register shared) ----------------------- */

.oauth-stack { display: flex; flex-direction: column; gap: 9px; }

.oauth-btn {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    height: 38px; width: 100%;
    background: #17181c; border: 1px solid #2a2b30; border-radius: 7px;
    color: #f7f8f8; font-size: 13.5px; font-weight: 500; font-family: inherit;
    cursor: pointer; text-decoration: none;
    transition: background .12s ease, border-color .12s ease;
}
.oauth-btn:hover { background: #1c1d22; border-color: #34353b; }
.oauth-btn svg { flex: none; }

.or-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 16px 0; color: #4d5157; font-size: 11.5px;
    text-transform: lowercase; letter-spacing: .02em;
}
.or-divider::before, .or-divider::after {
    content: ""; flex: 1; height: 1px; background: #1f2024;
}

/* ---- Auth page furniture -------------------------------------------------- */

/* "Already have one? Sign in" — the line above the card's heading actions */
.auth-alt { margin: 6px 0 0; font-size: 13px; color: #8a8f98; }
.auth-alt a { color: var(--accent); text-decoration: none; }
.auth-alt a:hover { color: var(--accent-hover); }

/* Sent / done states: icon + copy, replacing the form */
.auth-state { display: flex; flex-direction: column; gap: 14px; }
.auth-state .state-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent);
}
.auth-state .state-icon.warn { background: rgba(242, 153, 74, .12); color: #f2994a; }
.auth-state p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #b4b8c0; }
.auth-state p .who { color: #f7f8f8; }

/* Resend line with its cooldown counter */
.resend-line { font-size: 12.5px; color: #4d5157; }
.resend-line a { color: var(--accent); text-decoration: none; }
.resend-line a:hover { color: var(--accent-hover); }
.resend-line a[aria-disabled="true"] { color: #4d5157; pointer-events: none; }

/* One-time API key reveal (activation success / first OAuth sign-in) */
.key-reveal {
    display: flex; align-items: center; gap: 8px;
    background: #101116; border: 1px solid #2a2b30; border-radius: 7px;
    padding: 10px 12px; margin-top: 4px;
}
.key-reveal code {
    flex: 1; font-family: 'Geist Mono', monospace; font-size: 12px;
    color: #f7f8f8; word-break: break-all;
}
.key-reveal button {
    flex: none; display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 6px;
    background: transparent; border: 1px solid #2a2b30; color: #8a8f98; cursor: pointer;
}
.key-reveal button:hover { color: #f7f8f8; border-color: #34353b; }

/* Label row with a trailing action ("Password    Forgot?") */
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row a { font-size: 12px; color: var(--accent); text-decoration: none; }
.label-row a:hover { color: var(--accent-hover); }

/* Panel body copy (placeholder pages) */
.panel h3 { margin: 0; padding: 16px 18px 0; font-size: 14.5px; font-weight: 600; }
/* A paragraph of muted copy inside a panel (the Overview's lead line). Scoped to
   <p>: as .panel .muted it also padded every muted span in a table cell — the
   Usage and Models figures — off their right edge */
.panel p.muted { margin: 8px 0 0; padding: 0 18px 16px; font-size: 13px; line-height: 1.6; color: #8a8f98; }
.panel .key-reveal { margin: 0 18px 16px; }

/* Sidebar foot: account row + the sign-out control beside it */
/* One row, one card: the account link and the sign-out control share the
   hover surface — the icon lives inside the row, not beside it */
/* Symmetric breathing room: card → divider 10px, divider → row 10px */
.sidebar-foot { display: flex; align-items: center; gap: 2px; padding-right: 6px; border-top: 1px solid var(--hairline); }
.sidebar-foot .sidebar-account { flex: 1; min-width: 0; }
.signout-form { flex: none; margin: 0; }
.signout-form button {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 7px;
    background: transparent; border: none; color: #4d5157; cursor: pointer;
}
.signout-form button:hover { color: #f7f8f8; background: rgba(255, 255, 255, .05); }

/* ---- Overview (stage 4 batch 1) ------------------------------------------ */

/* Flex/grid blocks the JS toggles: an author display beats the UA's
   [hidden] rule, so state it explicitly (the recurring pitfall) */
.duo-grid[hidden] { display: none; }

/* Requests drawer: our own sentence under the error's category */
.drawer-section .err-sentence { font-size: 12.5px; color: var(--text-body); margin: 0; line-height: 1.55; }

/* ---- Credits: balance, add credits, the two billing rules, the ledger and
   the crypto checkout ------------------------------------------------------ */

.input {
    height: 34px; padding: 0 12px; border-radius: var(--radius-control);
    background: #101116; border: 1px solid #2a2b30; color: var(--text-high);
    font-size: 13px; outline: none;
}
.input:focus { border-color: #828fff; box-shadow: 0 0 0 3px rgba(130, 143, 255, .14); }
.input::placeholder { color: var(--text-faint); }

/* An on/off switch: a native checkbox (role="switch") drawn as a track and a
   knob, so the keyboard, the label and the checked state stay the browser's */
.switch {
    appearance: none; -webkit-appearance: none;
    position: relative; flex: none; width: 34px; height: 20px; margin: 0;
    border-radius: 10px; border: 1px solid var(--hairline-strong); background: #2a2b30;
    cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.switch::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--text-muted); transition: transform .15s ease, background .15s ease;
}
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { transform: translateX(14px); background: #ffffff; }
.switch:focus-visible { outline: 2px solid rgba(130, 143, 255, .5); outline-offset: 2px; }
.switch:disabled { opacity: .5; cursor: default; }

/* One row of three cards on the page ground, then the History panel.
   Nothing inside the cards carries a ground of its own beyond the controls
   (no nested backgrounds) */
.cr-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.cr-top[hidden] { display: none; }
@media (max-width: 1100px) { .cr-top { grid-template-columns: minmax(0, 1fr); } }
/* An open crypto order, above the cards rather than inside one of them */
.cr-pending { margin: 0 0 12px; }
.cr-pending[hidden] { display: none; }

.cr-card {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--radius-card);
    padding: 18px 20px;
}
.cr-card .set-head .pill { flex: none; }
.cr-card .set-head .pill[hidden] { display: none; }
.cr-card .warn-note { margin: 0 0 14px; }
.cr-card > .set-note { margin: 14px 0 0; }
.cr-card .set-note a { color: var(--accent); text-decoration: none; }
.cr-card .set-error { margin: 10px 0 0; }

/* Balance: the number, the pace, three totals as label / value rows, and Add
   credits on the card's floor */
.cr-amount { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.cr-amount .v {
    font-family: var(--mono); font-size: 34px; font-weight: 600; letter-spacing: -0.03em; color: var(--text);
}
.cr-amount .unit { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.cr-balance > .d { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }
.cr-facts { margin: 20px 0 22px; display: flex; flex-direction: column; gap: 11px; }
.cr-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cr-facts dt { font-size: 13px; color: var(--text-muted); }
.cr-facts dd { margin: 0; font-family: var(--mono); font-size: 13.5px; color: var(--text-body); }
/* Add credits over Redeem gift card, together on the card's floor */
.cr-balance-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.cr-balance-actions .btn { width: 100%; height: 40px; gap: 8px; font-size: 13.5px; }

/* The Add credits dialog, at the width of the checkout it hands over to: a
   head with its close above a rule, then the amount — five presets on one
   row, a custom figure on its own — and the two ways to pay stacked full
   width, crypto (the no-fee one) filled */
.addc-modal { width: 30rem; }
.addc-modal .modal-head { padding-bottom: 16px; border-bottom: 1px solid var(--hairline); }
.addc-modal .modal-headrow { align-items: center; }
.addc-modal .modal-body { padding: 18px 22px 22px; }
.addc-modal .set-note { margin: 14px 0 0; }
.addc-modal .set-note a { color: var(--accent); text-decoration: none; }
/* A dialog's own close: a bordered square at the head's right */
.modal-close {
    flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    border: 1px solid var(--hairline-strong); border-radius: 8px; background: transparent;
    color: var(--text-muted); cursor: pointer; transition: color .12s, background .12s;
}
.modal-close:hover { color: var(--text-high); background: #1f2024; }
.addc-label {
    margin-bottom: 10px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted);
}
.cr-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cr-presets .btn { height: 38px; padding: 0; font-family: var(--mono); font-size: 13px; border-radius: 7px; }
.preset-btn.active { border-color: #828fff; color: var(--text-high); background: rgba(130, 143, 255, .1); }
/* Two classes deep on purpose: the row is a <label> (so the field takes
   "Custom" as its name), and ".modal-body label" would otherwise make it a
   block with a bottom margin, stacking the word over the field */
.addc-modal .addc-custom { display: flex; align-items: center; gap: 14px; margin: 10px 0 0; }
.addc-custom .l { flex: none; font-size: 13px; color: var(--text-muted); }
.cr-custom { position: relative; display: block; flex: 1; min-width: 0; }
.cr-custom .input {
    width: 100%; height: 38px; padding: 0 8px 0 22px; border-radius: 7px;
    font-family: var(--mono); font-size: 13px;
}
.cr-custom .cur {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    font-family: var(--mono); font-size: 13px; color: var(--text-faint); pointer-events: none;
}
.cr-amount-err { margin: 8px 0 0; font-size: 12px; color: var(--danger); line-height: 1.5; }
.addc-pay { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.addc-pay .btn { position: relative; width: 100%; height: 42px; gap: 8px; font-size: 13.5px; }
.addc-pay .btn svg { width: 16px; height: 16px; }
/* In the theme's accent — nico asked for the no-fee point to stand out on
   the button (12-01) */
.cr-nofee {
    display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 4px;
    border: 1px solid rgba(130, 143, 255, .32); background: rgba(130, 143, 255, .12);
    font-family: var(--mono); font-size: 11px; font-weight: 400;
    color: var(--accent);
}
/* On the filled crypto button the tag turns over — white, in the button's
   own colour — and sits at its right edge, so the label stays centred */
.addc-pay .btn-primary .cr-nofee {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    border-color: #ffffff; background: #ffffff; color: var(--accent-solid); font-weight: 600;
}

/* The card form: the Add credits dialog's frame around Stripe's Payment
   Element, which draws in its own frames inside .card-element. The slot
   holds room while the form loads so the dialog does not jump */
.card-modal .card-element { min-height: 120px; }
.card-loading { margin: 0; padding: 44px 0; text-align: center; font-size: 12.5px; color: var(--text-muted); }

/* The two rules. A title with its glyph, a lead line saying what the rule
   does in the card's own numbers, a switch row, and the amounts — each
   under its own label, or inline where there is one */
.cr-card .set-title { display: inline-flex; align-items: center; gap: 8px; }
.cr-card .set-title svg { flex: none; color: var(--text-muted); }
.cr-head-icon { flex: none; color: var(--text-faint); }
.cr-lead { margin: 0 0 14px; font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.cr-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.cr-switchrow .t, .cr-inforow .t { display: block; font-size: 13.5px; color: var(--text-high); }
.cr-switchrow .d, .cr-inforow .d { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
/* A notice that is always on: worded like a switch row, with nothing to
   switch, under a hairline that sets it apart from the rule above */
.cr-inforow { padding-top: 16px; border-top: 1px solid var(--hairline); }
.cr-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 16px; }
.cr-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--text-muted); }
.cr-field .cr-money, .cr-field .cr-money .input { width: 100%; }
.cr-inline { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--text-body); }
.cr-money { position: relative; display: inline-flex; }
.cr-money .cur {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); pointer-events: none;
}
.cr-money .input { width: 104px; height: 32px; padding: 0 8px 0 22px; font-family: var(--mono); font-size: 12.5px; }
.cr-notify > .set-note, .cr-notify > .set-error, .cr-notify > .cr-inforow, .cr-auto > .cr-cardrow { margin-bottom: 18px; }
/* Each rule card ends in a footnote on its floor — what auto-recharge will
   and will not do, which emails are sent regardless — so neither closes on
   an empty stretch. No rule above it: the two notes wrap to different
   heights, so a line drawn at each top would never meet across the row,
   while their bottoms always do */
.cr-foot { margin: auto 0 0; font-size: 12px; color: var(--text-faint); line-height: 1.5; }

/* Why auto-recharge is paused: a bubble hung from the Paused pill, over the
   card — positioned, so a pause never changes the card's height or, through
   the grid row, its neighbours'. The dropdown menu's floating surface; red
   for a decline, amber while a charge waits for the cardholder's approval */
.cr-auto { position: relative; }
.cr-card .set-head .pill.toggles { cursor: pointer; }
.cr-bubble {
    position: absolute; z-index: 20; top: 50px; left: 14px; right: 14px;
    display: flex; align-items: flex-start; gap: 9px;
    padding: 11px 34px 12px 12px;
    background: #161616; border: 1px solid rgba(235, 87, 87, .42); border-radius: 8px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, .55);
    font-size: 12.5px; line-height: 1.5; color: var(--danger);
    animation: pop-in .13s ease;
}
.cr-bubble[hidden] { display: none; }
/* The point, under the pill's centre */
.cr-bubble::before {
    content: ''; position: absolute; top: -6px; right: 38px; width: 10px; height: 10px;
    background: #161616; border-left: 1px solid rgba(235, 87, 87, .42); border-top: 1px solid rgba(235, 87, 87, .42);
    transform: rotate(45deg);
}
.cr-bubble > svg { flex: none; margin-top: 2px; }
.cr-bubble-body { flex: 1; min-width: 0; }
.cr-bubble-body p { margin: 0; }
.cr-bubble-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.cr-bubble-acts:not(:has(> :not([hidden]))) { display: none; }
.cr-bubble-close {
    position: absolute; top: 7px; right: 7px; width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 5px; color: var(--text-faint); cursor: pointer;
}
.cr-bubble-close:hover { color: var(--text-high); background: rgba(255, 255, 255, .06); }
.cr-bubble.amber { border-color: rgba(206, 163, 74, .45); color: #e5c98a; }
.cr-bubble.amber::before { border-color: rgba(206, 163, 74, .45); }
.cr-bubble.amber > svg { color: var(--amber); }
.cr-bubble .turn-on {
    display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 6px;
    background: rgba(206, 163, 74, .16); border: 1px solid rgba(206, 163, 74, .4);
    color: #e5c98a; font-size: 12px; cursor: pointer;
}
.cr-bubble .turn-on:hover { background: rgba(206, 163, 74, .24); }
.cr-bubble-acts > [hidden] { display: none; }

/* The saved card on one line: the network's mark, last four, expiry, then
   Change and the ✕ that removes it
   on the right — still on the right when a phone wraps them under the card */
.cr-cardrow {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px;
    padding: 9px 10px 9px 12px; border: 1px solid var(--hairline); border-radius: 7px;
}
/* No card yet: the slot drawn dashed, waiting for one. Not ".empty" — that
   is the global empty-state block, whose svg and .btn margins would knock the
   row's three items out of line */
.cr-cardrow.no-card { border-style: dashed; border-color: var(--hairline-strong); }
.cr-cardrow.no-card svg { flex: none; color: var(--text-faint); }
.cr-cardrow .no { font-family: var(--mono); font-size: 13px; color: var(--text-high); }
.cr-cardrow .exp { font-size: 12px; color: var(--text-faint); }
.cr-cardrow .none { font-size: 12.5px; color: var(--text-muted); }
.cr-cardrow .no, .cr-cardrow .exp { white-space: nowrap; }
.cr-cardrow .push { margin-left: auto; }
/* Removing the card: a ✕ on the card's own line, after Change */
.cr-card-x {
    flex: none; width: 26px; height: 26px; margin-right: -4px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 6px; color: var(--text-faint); cursor: pointer;
}
.cr-card-x:hover { color: var(--text-high); background: rgba(255, 255, 255, .06); }
/* A network's own mark (card-mark.js), monochrome in the high text colour and
   fitted to one 36x20 slot, so a wide wordmark and a square badge line up */
.card-mark { flex: none; width: 36px; height: 20px; display: inline-flex; color: var(--text-high); }
.card-mark svg { display: block; width: 100%; height: 100%; }

@media (max-width: 720px) {
    .cr-card { padding: 16px; }
}

/* -- checkout modal (the canvas dialogs' 480px) -- */
.deposit-modal { width: 30rem; }
.deposit-sub { font-size: 12.5px; color: var(--text-muted); margin: 5px 0 0; }
.deposit-note { font-size: 12.5px; color: var(--text-muted); margin: 2px 0; }
.deposit-label { font-size: 12.5px; color: var(--text-body); margin: 14px 0 7px; }
.deposit-err { font-size: 12.5px; color: #eb5757; margin-top: 10px; }
.deposit-err[hidden] { display: none; }

/* Network, then token — two picks instead of one grid of every pair.
   Eight methods laid out flat would be eight cells, and each chain added
   later two more; this way a new chain is one more chip on the same row.
   ⚠️ The chain marks are inline <svg>: the CSP is img-src 'self', so a
   data: URI image or a CDN logo is blocked outright. Same constraint that
   made the checkbox a pure-CSS tick. */
.chain-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chain-chip {
    min-width: 0;
    display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px;
    background: transparent; border: 1px solid var(--hairline-strong); border-radius: 7px;
    color: var(--text-body); cursor: pointer; font-size: 12px; font-family: inherit;
}
.chain-chip .n { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chain-chip.active { border-color: #828fff; background: rgba(130, 143, 255, .1); color: var(--text-high); }
.chain-mark { width: 17px; height: 17px; flex: none; display: inline-flex; }
.chain-mark svg { display: block; width: 100%; height: 100%; }

.method-row { display: flex; gap: 8px; }
.method-btn {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    height: 44px;
    background: transparent; border: 1px solid var(--hairline-strong); border-radius: 7px;
    color: var(--text-body); cursor: pointer; font-family: inherit;
}
.method-btn .sym { font-size: 12.5px; color: var(--text-high); }
/* The network, spelt out again under the token. By the time the eye is
   here the chain chip is out of focus, and USDT sent on the wrong network
   is an unrecoverable transfer */
.method-btn .chain { font-size: 10.5px; color: var(--text-faint); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.method-btn.active { border-color: #828fff; background: rgba(130, 143, 255, .1); }

/* "You send" — a quiet summary row: label left, amount right */
.send-line {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 14px; padding: 10px 11px; border-radius: 6px;
    background: var(--surface-sunk); border: 1px solid var(--hairline);
}
.send-line .l { font-size: 12.5px; color: var(--text-muted); }
.send-line .v { font-size: 13.5px; color: var(--text-high); }

/* -- pay stage -- */
.pay-clock {
    display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px;
    background: rgba(206, 163, 74, .12); border: 1px solid rgba(206, 163, 74, .28);
    color: var(--amber); font-size: 11.5px; white-space: nowrap;
}
.pay-amount { display: flex; align-items: baseline; gap: 8px; margin-bottom: 13px; flex-wrap: wrap; }
.pay-amount .n { font-size: 21px; font-weight: 600; color: var(--text-high); }
.pay-amount .sym { font-size: 13.5px; color: var(--text-muted); }
/* The network rides beside the amount, mark and all — the amount and the
   chain are one instruction, not a figure with a footnote */
.pay-chain {
    align-self: center;
    display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
    border: 1px solid var(--hairline-strong); border-radius: 5px;
    color: var(--text-muted); font-size: 11.5px; white-space: nowrap;
}

/* QR beside the address block */
.pay-row { display: flex; gap: 13px; align-items: flex-start; }
.qr-box { width: 104px; height: 104px; flex: none; padding: 8px; background: #ffffff; border-radius: 8px; }
.qr-box svg { display: block; width: 100%; height: 100%; }
.pay-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.pay-label { font-size: 11.5px; color: var(--text-faint); }
.pay-address {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    background: var(--surface-sunk); border: 1px solid var(--hairline-strong); border-radius: 6px;
}
.pay-address code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11.5px; color: var(--text-high); word-break: break-all; }
.copy-inline {
    flex: none; display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 5px;
    background: #1c1c1f; border: 1px solid var(--hairline-strong); color: var(--text-muted); cursor: pointer;
}
.copy-inline:hover { color: var(--text-high); border-color: #34353b; }
.pay-note { font-size: 11px; color: #4d5157; margin: 0; line-height: 1.5; }
/* The one sentence that has to survive being skimmed: token AND network,
   both emphasised, right under the address they apply to */
.pay-note b { color: var(--text-muted); font-weight: 500; }

/* The status strip: spinner, state, the tx trailing right */
.pay-status {
    display: flex; align-items: center; gap: 9px; margin-top: 13px; padding: 9px 11px;
    border-radius: 6px; background: var(--surface-sunk); border: 1px solid var(--hairline);
}
.pay-status .st { font-size: 11.5px; }
.pay-status .st.confirming { color: var(--blue); }
.pay-status .grow { flex: 1; }
.spin {
    width: 12px; height: 12px; flex: none; border-radius: 50%;
    border: 2px solid var(--hairline-strong); border-top-color: var(--text-faint);
    animation: spin-turn .9s linear infinite;
}
.spin.blue { border-top-color: var(--blue); }
@keyframes spin-turn { to { transform: rotate(360deg); } }
.tx-link { font-family: var(--mono); font-size: 11px; color: var(--text-faint); text-decoration: none; }
a.tx-link:hover { color: var(--accent); text-decoration: underline; }

/* -- payment results: the outcome in the dialog's own head — a status glyph
   beside the title, a sub line for the money — the facts in key/value rows
   under hairlines, a note when there is one, the buttons in the action row.
   The dialog leaves the form's 480px for the standard width, and the card
   form's head rule and roomier body with it -- */
.modal.res-modal { width: 412px; }
.modal.res-modal .modal-head { padding-bottom: 0; border-bottom: none; }
.modal.res-modal .modal-body { padding: 12px 22px 4px; }
.res-title { display: flex; align-items: center; gap: 8px; }
.res-glyph { display: inline-flex; flex: none; }
.res-glyph.ok { color: var(--green); }
.res-glyph.warn { color: var(--amber); }
.res-glyph.bad { color: var(--danger); }
.res-glyph.gone { color: var(--text-muted); }
.res-rows .kv { padding: 9px 0; border-bottom: 1px solid var(--hairline); }
.res-rows .kv:first-child { padding-top: 2px; }
.res-rows .kv:last-child { border-bottom: none; padding-bottom: 0; }
.res-rows .v.mono { font-size: 12.5px; }
.res-note { margin: 14px 0 0; font-size: 12px; line-height: 1.55; color: var(--text-muted); }

/* ---- Small user-console utilities --------------------------------------- */

/* A body-coloured mono link (usage/requests model cells): the canvas keeps
   these quiet — the accent mono link stays the trace id's walk-in */
.mono-link { font-family: var(--mono); font-size: 12px; }
.table .muted { color: var(--text-muted); }

/* ---- Models (batch 4) ----------------------------------------------------- */

/* Custom-model rows wear the canvas's violet tint over the shared table */
.custom-row { background: rgba(181, 156, 255, .05); cursor: pointer; }
.custom-row:hover td { background: rgba(181, 156, 255, .04); }
.alias-cell { display: inline-flex; align-items: center; gap: 7px; }
.tag-row { display: inline-flex; gap: 5px; }
.row-click { cursor: pointer; }

.edit-link { font-size: 11.5px; color: var(--accent); }
.edit-link:hover { color: #a3adff; }

.models-foot { font-size: 11.5px; color: var(--text-faint); line-height: 1.6; max-width: 940px; margin: 0 0 18px; }
.models-foot .mono { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }

/* The create/edit modal — one frame, three numbered steps (canvas 560px) */
.custom-modal { width: 560px; }
.custom-modal .modal-body > p { margin: 0 0 16px; font-size: 12.5px; color: var(--text-muted); }
.step { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.step:last-child { margin-bottom: 4px; }
.step-head { display: flex; align-items: center; gap: 8px; }
.step-n {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--surface-sunk); border: 1px solid var(--hairline-strong);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 10.5px; color: var(--text-muted); flex: none;
}
.step-title { font-size: 12.5px; color: var(--text-body); }
.step-hint { font-size: 11.5px; color: var(--text-faint); }

.base-trigger { width: 100%; justify-content: space-between; }
.base-trigger .dd-value { font-family: var(--mono); font-size: 12.5px; }
.base-meta { font-family: var(--mono); font-size: 11px; color: #4d5157; }

/* Ordered prompt picks: display order is injection order; the handle drags */
.prompt-pick { border: 1px solid var(--hairline); border-radius: 7px; overflow: hidden; }
.prompt-row {
    display: flex; align-items: center; gap: 10px; padding: 9px 11px;
    border-bottom: 1px solid #191a1b; cursor: pointer; user-select: none;
}
.prompt-row:last-child { border-bottom: none; }
.prompt-row.on { background: rgba(130, 143, 255, .05); }
.prompt-row .drag { color: #3a3c42; cursor: grab; flex: none; }
.prompt-row.on .drag { color: var(--text-faint); }
.prompt-row .box {
    width: 16px; height: 16px; border-radius: 4px; border: 1px solid #34343a;
    flex: none; display: inline-flex; align-items: center; justify-content: center; color: #ffffff;
}
.prompt-row.on .box { background: var(--accent-solid); border-color: var(--accent-solid); }
.prompt-row .nm {
    flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prompt-row.on .nm { color: var(--text-high); }
.prompt-row .tk { font-family: var(--mono); font-size: 11px; color: #4d5157; }
.prompt-row.on .tk { color: var(--text-faint); }
.prompt-row.drop-above { box-shadow: inset 0 2px 0 var(--accent); }
.prompt-row.drop-below { box-shadow: inset 0 -2px 0 var(--accent); }
.pick-foot { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

.alias-rules { font-size: 11.5px; color: var(--text-faint); line-height: 1.6; }
.alias-rules .mono { font-family: var(--mono); font-size: 11px; color: var(--text-body); }
.alias-err {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px;
    background: rgba(235, 87, 87, .08); border: 1px solid rgba(235, 87, 87, .24);
    font-family: var(--mono); font-size: 11.5px; color: var(--danger);
}
.alias-err[hidden] { display: none; }
.alias-err svg { flex: none; }

.custom-foot-hint { font-family: var(--mono); font-size: 11px; color: #4d5157; align-self: center; }
.modal-actions .grow { flex: 1; }

/* Prompt editor: the body is the point — give it room */
.prompt-text { min-height: 220px; resize: vertical; font-size: 12px; line-height: 1.55; }
.danger-link { font-size: 11.5px; color: var(--danger); cursor: pointer; margin-top: 2px; align-self: flex-start; }
.danger-link:hover { text-decoration: underline; }

/* Fixed layout so the half-width management pair cannot push past its
   panel (the recent-activity lesson applied here): narrow columns pinned,
   the flexible ones ellipsize */
#mgmt-table, #prompt-table { table-layout: fixed; }
#mgmt-table th:nth-child(3) { width: 76px; }
#mgmt-table th:nth-child(4) { width: 116px; }
#prompt-table th:nth-child(2) { width: 88px; }
#prompt-table th:nth-child(3) { width: 186px; }
#prompt-table th:nth-child(4) { width: 52px; }
#mgmt-table td, #prompt-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================================
 * Form pieces first drawn for Settings, kept for the pages that still use
 * them (Credits' headed cards, the sign-in page's label rows)
 * ========================================================================== */

.set-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.set-title { font-size: 13.5px; font-weight: 500; color: var(--text-high); display: flex; align-items: center; gap: 9px; }

.set-note { font-size: 11.5px; color: var(--text-faint); line-height: 1.55; }
.set-error { font-size: 12px; color: var(--danger); line-height: 1.5; }
.set-error[hidden] { display: none; }

/* A label row that carries a small action on the right ("Change…") */
.field .label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.field .label-row label { margin-bottom: 0; }

/* Read-only field look: same box, sunk and muted */
.field input[readonly] { color: var(--text-faint); border-color: var(--hairline); font-family: var(--mono); font-size: 12.5px; }
.field input[readonly]:focus { border-color: var(--hairline); box-shadow: none; }

/* ---- Verification: every place a code is asked for ----------------------- */

/* The sign-in page's six cells (canvas · Login 2FA) under a sub line, and its
   resend line (canvas · Verify email) under them. .modal-body input and
   .field input come later or weigh the same, so the cells restate their box */
.modal-head .verify-sub { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.verify-sub .who { font-family: var(--mono); font-size: 12.5px; color: var(--text-high); overflow-wrap: anywhere; }
/* The 412px dialog's width; a wider dialog keeps the boxes this size */
.modal-body .code-cells { margin-top: 6px; max-width: 368px; }
.code-cells[hidden] { display: none; }
.field .code-cells { margin-top: 0; }
.modal-body .code-cells input, .field .code-cells input {
    width: auto;
    height: 52px;
    padding: 0;
    background: #0c0d0e;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    text-align: center;
    font-family: var(--mono);
    font-size: 21px;
    color: var(--text-high);
}
.modal-body .code-cells input:focus, .field .code-cells input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.modal-body .code-cells.invalid input, .field .code-cells.invalid input { border-color: rgba(235, 87, 87, .55); }
.modal-body .resend-line, .field .resend-line { margin-top: 12px; color: var(--text-faint); }
.resend-line .count { font-family: var(--mono); color: #4d5157; }
.modal-body input.verify-recovery { margin-top: 6px; height: 52px; text-align: center; font-size: 15px; letter-spacing: .08em; }
.verify-note { margin: 14px 0 0; font-size: 12px; line-height: 1.55; color: var(--text-muted); }

/* ---- Public site: frame --------------------------------------------------- */
/* The anonymous marketing/reference pages (landing, models, docs, status,
   support, terms, privacy). Same token system; the frame is the canvas's public
   shell — 56px top bar, content, 56px footer. */

.pub-shell { min-height: 100dvh; display: flex; flex-direction: column; }

.pub-nav {
    height: 56px; flex: none;
    border-bottom: 1px solid var(--hairline);
    display: flex; align-items: center; gap: 22px;
    padding: 0 32px;
}

/* The logo's auto margin is what pushes the links and the account actions
   to the right edge, on one row or on two */
.pub-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; margin-right: auto; }
.pub-logo .mark {
    width: 22px; height: 22px; border-radius: 6px; background: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
}
.pub-logo .name { font-size: 14.5px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
/* The product half is muted, same as the console lockup — one wordmark,
   not two */
.pub-logo .name span { color: var(--text-muted); font-weight: 400; }

.pub-nav-links, .pub-nav-auth { display: flex; align-items: center; gap: 22px; }
.pub-nav-links > a, .pub-signin {
    font-size: 13px; color: var(--text-muted); text-decoration: none; white-space: nowrap; transition: color .12s;
}
.pub-nav-links > a:hover { color: var(--text-body); }
.pub-nav-links > a.active { color: var(--text); }
.pub-signin { color: var(--text-body); }
.pub-signin:hover { color: var(--text); }
.pub-nav-divider { width: 1px; height: 18px; background: var(--hairline); }

.pub-cta {
    display: inline-flex; align-items: center; height: 30px; padding: 0 13px; white-space: nowrap;
    border-radius: 6px; background: var(--accent-solid); color: #fff;
    font-size: 12.5px; font-weight: 500; text-decoration: none;
    transition: filter .12s;
}
.pub-cta:hover { filter: brightness(1.1); }

.pub-main { flex: 1; display: flex; flex-direction: column; }

.pub-foot {
    height: 56px; flex: none;
    border-top: 1px solid var(--hairline); background: var(--surface-sunk);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px;
}
.pub-foot-note { font-family: var(--mono); font-size: 11.5px; color: #4d5157; }
.pub-foot-links { display: flex; align-items: center; gap: 18px; }
.pub-foot-links a { font-size: 12.5px; color: var(--text-faint); text-decoration: none; }
.pub-foot-links a:hover { color: var(--text-muted); }

@media (max-width: 720px) {
    .pub-nav, .pub-foot { padding: 0 20px; }
    /* One row no longer holds the logo, the links and two account actions:
       the account actions stay up by the logo, the links take a row of their
       own beneath, all still one tap away */
    .pub-nav { height: auto; flex-wrap: wrap; column-gap: 16px; row-gap: 0; }
    .pub-logo, .pub-nav-auth { height: 56px; }
    .pub-nav-auth { gap: 16px; }
    .pub-nav-divider { display: none; }
    .pub-nav-links { order: 1; flex-basis: 100%; height: 40px; gap: 20px; }
    .pub-foot { flex-direction: column; height: auto; padding: 14px 20px; gap: 8px; }
    /* Seven links are wider than a phone: they wrap, centred like the note
       above them, instead of running off both edges */
    .pub-foot-links { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
}

/* ---- Public site: shared pieces (landing, download) ----------------------- */
/* Design: docs/design/landing-download-prototype.html (home A, D1–D6). */

/* Variants by visitor: a section carries data-platform, and every pub-for-*
   element not marked for that platform is hidden. All variants are
   rendered rather than picked on the server, because public/site.js may
   still change the platform (an iPad sends a Mac User-Agent; Chromium can
   tell an Intel Mac) */
[data-platform="mac"] [class*="pub-for-"]:not(.pub-for-mac),
[data-platform="windows"] [class*="pub-for-"]:not(.pub-for-windows),
[data-platform="other"] [class*="pub-for-"]:not(.pub-for-other),
[data-platform="intel"] [class*="pub-for-"]:not(.pub-for-intel) { display: none; }

/* Phosphor icons (fragments/icons.html): filled on a 256 grid, 1em box */
.pub-i { width: 1em; height: 1em; fill: currentColor; flex: none; display: block; }

.pub-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px; border-radius: 8px; border: 0;
    font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap;
    text-decoration: none; cursor: pointer; transition: filter .12s, border-color .12s;
}
.pub-btn .pub-i { font-size: 16px; }
.pub-btn-primary { background: var(--accent-solid); color: #fff; }
.pub-btn-primary:hover { filter: brightness(1.1); }
.pub-btn-ghost { border: 1px solid var(--hairline-strong); background: var(--surface-raised); color: var(--text-body); }
.pub-btn-ghost:hover { border-color: rgba(255, 255, 255, .26); }
.pub-btn-lg { height: 50px; padding: 0 26px; border-radius: 10px; font-size: 15.5px; gap: 10px; }
.pub-btn-lg .pub-i { font-size: 19px; }

.pub-h1 {
    margin: 0; font-size: 58px; font-weight: 600; letter-spacing: -0.042em; line-height: 1.03;
    color: var(--text); text-wrap: balance;
}
.pub-sub { margin: 0; font-size: 17px; line-height: 1.62; color: var(--text-muted); max-width: 610px; text-wrap: balance; }
.pub-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.pub-req { margin: 0; font-size: 12.5px; color: var(--text-faint); }
.pub-req a, .pub-direct a, .pub-dl-meta a, .pub-done-alt a {
    color: var(--text-muted); text-decoration: none; border-bottom: 1px solid var(--hairline-strong); padding-bottom: 1px;
    transition: color .12s;
}
.pub-req a:hover, .pub-direct a:hover, .pub-dl-meta a:hover, .pub-done-alt a:hover { color: var(--text-body); }
.pub-more {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted); text-decoration: none; transition: color .12s;
}
.pub-more .pub-i { font-size: 13px; }
.pub-more:hover { color: var(--text-body); }

/* The live numbers: counts from the stats snapshot, linking to /status */
.pub-live {
    display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
    font-family: var(--mono); font-size: 12px; color: var(--text-faint);
    text-decoration: none; transition: color .12s;
}
.pub-live em { font-style: normal; color: var(--text-muted); }
.pub-live .sep { color: var(--hairline-strong); }
.pub-live:hover { color: var(--text-muted); }

/* The desktop app drawn at 1280 × 800 (fragments/app-shot.html), scaled to
   fit: --s steps down with the viewport so the window never overflows it */
.pub-shot {
    --s: .875;
    position: relative; flex: none;
    width: calc(1280px * var(--s)); height: calc(800px * var(--s));
    border-radius: calc(10px * var(--s));
    box-shadow: 0 50px 120px rgba(0, 0, 0, .7), 0 12px 32px rgba(0, 0, 0, .45);
}
.pub-shot > .am { position: absolute; left: 0; top: 0; transform: scale(var(--s)); transform-origin: 0 0; }
@media (max-width: 1183px) { .pub-shot { --s: .75; } }
@media (max-width: 1023px) { .pub-shot { --s: .625; } }
@media (max-width: 863px) { .pub-shot { --s: .5; } }

/* Entrance, as on Linear's front page: the claim fades in out of a blur,
   line after line, then the window rises under it. Pure CSS — it runs
   without script, and nothing waits on one to become visible */
.pub-enter { animation: pub-enter .9s cubic-bezier(.165, .84, .44, 1) both; }
.pub-d0 { animation-delay: 0s; }
.pub-d1 { animation-delay: .07s; }
.pub-d2 { animation-delay: .14s; }
.pub-d3 { animation-delay: .21s; }
.pub-d4 { animation-delay: .28s; }
.pub-enter-win { animation: pub-enter-win 1.25s cubic-bezier(.165, .84, .44, 1) .38s both; }
@keyframes pub-enter {
    from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
    to { opacity: 1; transform: none; filter: none; }
}
@keyframes pub-enter-win {
    from { opacity: 0; transform: translateY(36px) scale(.98); filter: blur(10px); }
    to { opacity: 1; transform: none; filter: none; }
}
/* Below the fold, blocks rise as they scroll in: public/site.js adds
   pub-reveal only to blocks still out of view, so nothing on screen ever
   blinks out. It staggers a row by setting --d on each block */
.pub-reveal {
    --d: 0s;
    opacity: 0; transform: translateY(14px);
    transition: opacity .7s cubic-bezier(.165, .84, .44, 1), transform .7s cubic-bezier(.165, .84, .44, 1);
    transition-delay: var(--d);
}
.pub-reveal.pub-in { opacity: 1; transform: none; }

/* ---- Public site: landing ----------------------------------------------------- */
/* One screen: the claim on top, the app rising from below, cut off by the
   footer. A floor keeps some of the window in view on a short screen */

.pub-shell-fit { height: 100dvh; min-height: 680px; }
.pub-shell-fit .pub-main { min-height: 0; }
.pub-ha {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 20px; padding: 78px 32px 0;
}
.pub-ha .pub-ctas { justify-content: center; margin-top: 6px; }
.pub-ha .pub-req { margin-top: -6px; }
.pub-stage { flex: 1; min-height: 0; overflow: hidden; display: flex; justify-content: center; padding-top: 44px; }

/* ---- Public site: download -------------------------------------------------- */

.pub-dl { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 72px 32px 0; }
.pub-appicon {
    width: 76px; height: 76px; border-radius: 19px; background: var(--accent-solid);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 14px 36px rgba(0, 0, 0, .55);
}
.pub-appicon svg { width: 48px; height: 48px; }
.pub-dl .pub-h1 { margin-top: 26px; font-size: 46px; }
.pub-dl .pub-sub { margin-top: 14px; }
.pub-dl-cta { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pub-dl-cta .pub-req { font-size: 13px; color: var(--text-muted); }
.pub-dl-meta {
    display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
    font-family: var(--mono); font-size: 12px; color: var(--text-faint);
}
.pub-dl-meta .sep { color: var(--hairline-strong); }
.pub-dl-alt { margin-top: 2px; }
/* Half the window, as on the landing: the opening of the session is what it
   shows, and the rest fades into the page instead of ending on a cut edge.
   The mask takes the window's drop shadow with it, which never showed on
   this ground anyway */
.pub-dl-shot { margin-top: 64px; }
.pub-dl-shot .pub-shot {
    height: calc(800px * var(--s) / 2); overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
    mask-image: linear-gradient(to bottom, #000 45%, transparent);
}

/* Intel Mac (Chromium tells): say it won't run, keep the ways forward */
.pub-notice {
    margin-top: 34px; max-width: 560px; padding: 18px 20px; border-radius: 12px;
    display: flex; gap: 14px; align-items: flex-start; text-align: left;
    border: 1px solid rgba(206, 163, 74, .28); background: rgba(206, 163, 74, .07);
}
.pub-notice > .pub-i { font-size: 20px; color: var(--amber); margin-top: 1px; }
.pub-notice b { display: block; font-size: 14.5px; font-weight: 600; color: var(--text); }
.pub-notice p { margin: 5px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.pub-notice-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font-size: 13.5px; }
.pub-notice-links a { color: var(--accent); text-decoration: none; }
.pub-notice-links a.quiet { color: var(--text-faint); }
.pub-notice-links a:hover { text-decoration: underline; }

/* Phones and Linux: nothing to install here, so the link travels */
.pub-away { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pub-away p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); max-width: 330px; }
.pub-away hr { width: 100%; border: 0; border-top: 1px solid var(--hairline); margin: 14px 0 6px; }
.pub-direct { font-size: 13px; color: var(--text-faint); }

.pub-facts {
    width: 100%; max-width: 1120px; margin: 84px auto 0;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; text-align: left;
}
.pub-fact .pub-i { font-size: 20px; color: var(--accent); margin-bottom: 14px; }
.pub-fact h3 { margin: 0 0 8px; font-size: 14.5px; font-weight: 600; color: var(--text); letter-spacing: -0.005em; }
.pub-fact p { margin: 0; font-size: 13.5px; line-height: 1.62; color: var(--text-muted); }
.pub-fact code { font-family: var(--mono); font-size: 12.5px; color: var(--text-body); }

.pub-dl-cols {
    width: 100%; max-width: 1120px; margin: 80px auto 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 28px; text-align: left;
}
/* A release without notes leaves the requirements alone on the row */
.pub-dl-cols > .pub-panel:only-child { grid-column: 1 / -1; }
.pub-panel { border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); padding: 24px 26px; }
.pub-panel h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--text); }
.pub-panel ul { margin: 0; padding: 0 0 0 18px; color: var(--text-body); font-size: 13.5px; line-height: 1.9; }
.pub-panel .when { margin: -8px 0 12px; font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }
.pub-reqs { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pub-reqs th {
    width: 92px; padding: 10px 0; vertical-align: top; text-align: left;
    font-weight: 500; color: var(--text); border-top: 1px solid var(--hairline);
}
.pub-reqs td { padding: 10px 0; line-height: 1.55; color: var(--text-muted); border-top: 1px solid var(--hairline); }
.pub-reqs tr:first-child th, .pub-reqs tr:first-child td { border-top: 0; padding-top: 0; }

.pub-verify {
    width: 100%; max-width: 1120px; margin: 28px auto 0; text-align: left;
    border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface);
}
.pub-verify summary {
    list-style: none; cursor: pointer; padding: 16px 22px;
    display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-body);
}
.pub-verify summary::-webkit-details-marker { display: none; }
.pub-verify summary .pub-i { font-size: 15px; color: var(--text-muted); }
.pub-verify .pub-car { margin-left: auto; transition: transform .15s; }
.pub-verify[open] .pub-car { transform: rotate(180deg); }
.pub-sums {
    padding: 0 22px 18px; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px;
    font-family: var(--mono); font-size: 11.5px;
}
.pub-sums > span:not(.pub-sums-note) { color: var(--text-muted); white-space: nowrap; }
.pub-sums code { color: var(--text-faint); word-break: break-all; font-family: var(--mono); }
.pub-sums-note { grid-column: 1 / -1; font-family: 'Geist', sans-serif; font-size: 12.5px; color: var(--text-faint); }
.pub-sums-note code { color: var(--text-muted); word-break: normal; overflow-wrap: anywhere; }
.pub-dl-end { height: 96px; }

/* ---- Public site: after a download click ------------------------------------ */

.pub-done {
    flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 68px 32px 64px;
}
.pub-badge {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(113, 112, 255, .14); color: var(--accent); font-size: 22px;
}
.pub-done .pub-h1 { margin-top: 22px; font-size: 38px; }
.pub-done .pub-sub { margin-top: 12px; font-size: 15.5px; }
.pub-done .pub-sub a { color: var(--accent); text-decoration: none; }
.pub-done .pub-sub a:hover { text-decoration: underline; }
.pub-done-ctas { justify-content: center; margin-top: 28px; }
.pub-steps {
    margin-top: 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 356px)); gap: 20px; text-align: left;
}
.pub-step {
    border: 1px solid var(--hairline); border-radius: 16px; background: var(--surface);
    overflow: hidden; display: flex; flex-direction: column;
    animation: pub-rise .7s cubic-bezier(.165, .84, .44, 1) both;
}
[data-platform="mac"] .pub-step:nth-child(2), [data-platform="windows"] .pub-step:nth-child(4) { animation-delay: .08s; }
.pub-step:nth-child(5) { animation-delay: .16s; }
@keyframes pub-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pub-ill {
    height: 176px; flex: none; display: flex; align-items: center; justify-content: center; gap: 18px;
    background: var(--surface-sunk); border-bottom: 1px solid var(--hairline);
}
.pub-step-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.pub-num { font-family: var(--mono); font-size: 11px; letter-spacing: .09em; color: var(--text-faint); }
.pub-step h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.pub-step p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.pub-step .pub-ctas { margin-top: 8px; }
.pub-step .pub-btn { height: 36px; font-size: 13.5px; padding: 0 15px; }
.pub-step .pub-more { margin-top: 2px; }
.pub-done-alt { margin: 30px 0 0; font-size: 13px; color: var(--text-faint); }

/* The three illustrations, each a loop: the download fills and checks; the
   icon slides into Applications; the key is pasted and Continue pressed;
   SmartScreen's two links light up in turn */
.pub-dlpill {
    width: 306px; padding: 12px 14px; border-radius: 11px; white-space: nowrap;
    display: flex; align-items: center; gap: 12px;
    background: #16171a; box-shadow: 0 0 0 1px #26272b, 0 10px 28px rgba(0, 0, 0, .45);
}
.pub-dlpill .pub-doc {
    width: 34px; height: 40px; border-radius: 5px; background: #24252a;
    display: grid; place-items: center; color: var(--text-muted); font-size: 18px;
}
.pub-dlpill b { display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--text-body); }
.pub-dlpill small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-faint); }
.pub-dlpill .pub-ok { margin-left: auto; color: var(--green); font-size: 18px; animation: pub-okpop 4.2s infinite; }
.pub-prog { display: block; margin-top: 7px; width: 176px; height: 3px; border-radius: 2px; background: #26272b; overflow: hidden; }
.pub-prog i {
    display: block; height: 100%; width: 100%; border-radius: 2px; background: var(--accent-solid);
    animation: pub-prog 4.2s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes pub-prog { 0%, 8% { width: 0; } 56%, 100% { width: 100%; } }
@keyframes pub-okpop {
    0%, 58% { opacity: 0; transform: scale(.5); }
    64%, 94% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1); }
}
.pub-mini-icon {
    width: 58px; height: 58px; border-radius: 14px; background: var(--accent-solid); display: grid; place-items: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 20px rgba(0, 0, 0, .5);
}
.pub-mini-icon svg { width: 36px; height: 36px; }
.pub-ill-drag .pub-mini-icon { position: relative; z-index: 2; animation: pub-drag 3.8s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes pub-drag {
    0%, 14% { transform: none; opacity: 1; }
    52% { transform: translateX(160px) scale(.62); opacity: 1; }
    60% { transform: translateX(160px) scale(.25); opacity: 0; }
    84% { transform: none; opacity: 0; }
    94%, 100% { transform: none; opacity: 1; }
}
.pub-arrowline {
    width: 62px; height: 2px;
    background: repeating-linear-gradient(90deg, #3a3b42 0 6px, transparent 6px 11px); background-size: 22px 2px;
    position: relative; animation: pub-dash 1.1s linear infinite;
}
.pub-arrowline::after {
    content: ''; position: absolute; right: -2px; top: -4px;
    border: 5px solid transparent; border-left: 7px solid #3a3b42; border-right-width: 0;
}
@keyframes pub-dash { to { background-position: 22px 0; } }
.pub-folder { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pub-folder .pub-i { font-size: 54px; color: var(--blue); animation: pub-bump 3.8s infinite; }
.pub-folder small { font-size: 11.5px; color: var(--text-muted); }
@keyframes pub-bump { 0%, 54% { transform: none; } 61% { transform: scale(1.12); } 70%, 100% { transform: none; } }
/* The app's own key screen and Windows' own dialog: their system fonts,
   not the site's */
.pub-keycard {
    width: 248px; padding: 14px 16px; border-radius: 12px; background: #191919;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 28px rgba(0, 0, 0, .45);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.pub-keycard .t { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .93); }
.pub-keycard .f {
    position: relative; margin-top: 10px; height: 30px; padding: 0 10px; border-radius: 7px;
    display: flex; align-items: center;
    background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: rgba(255, 255, 255, .75);
}
.pub-keycard .val { animation: pub-paste 4.6s infinite; }
.pub-keycard .hint {
    position: absolute; left: 10px; color: rgba(255, 255, 255, .35);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif; animation: pub-hint 4.6s infinite;
}
.pub-keycard .b {
    margin-top: 10px; height: 28px; border-radius: 7px; display: grid; place-items: center;
    background: #efefef; color: #191919; font-size: 12.5px; font-weight: 500;
    animation: pub-press 4.6s infinite;
}
@keyframes pub-paste { 0%, 22% { opacity: 0; } 26%, 100% { opacity: 1; } }
@keyframes pub-hint { 0%, 22% { opacity: 1; } 24%, 100% { opacity: 0; } }
@keyframes pub-press {
    0%, 56% { background: #efefef; transform: none; }
    60% { background: #d7d7d7; transform: scale(.97); }
    66%, 100% { background: #efefef; transform: none; }
}
.pub-ss {
    width: 262px; padding: 14px 16px; border-radius: 4px; background: #0f4f9e; color: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45); font-family: 'Segoe UI', -apple-system, sans-serif;
}
.pub-ss .t { font-size: 15px; font-weight: 600; }
.pub-ss .l {
    display: inline-block; margin: 8px 0 0 -3px; padding: 1px 3px; border-radius: 2px;
    font-size: 11.5px; text-decoration: underline; opacity: .92; animation: pub-ssl 4.8s infinite;
}
.pub-ss .row { margin-top: 14px; display: flex; justify-content: flex-end; }
.pub-ss .b {
    height: 26px; padding: 0 14px; display: grid; place-items: center; border-radius: 2px;
    font-size: 12px; border: 1px solid rgba(255, 255, 255, .8); animation: pub-ssb 4.8s infinite;
}
@keyframes pub-ssl { 0%, 12%, 44%, 100% { background: transparent; } 18%, 38% { background: rgba(255, 255, 255, .2); } }
@keyframes pub-ssb { 0%, 50%, 82%, 100% { background: transparent; } 56%, 76% { background: rgba(255, 255, 255, .24); } }

/* ---- Public site: the drawn desktop app --------------------------------------- */
/* fragments/app-shot.html, drawn off the app's own design canvases
   (the app repo's docs/design/canvas): the colors and weights from its
   tokens.css, the sizes from Sidebar, TitleBar, MainTurn and Composer, the
   tool line and its card from S03 3a/3f/3l, the work mark's phases from
   its work_mark.css.
   Every class is am-* — the shared sheet has a .panel, a .chip, a .row */

/* The app's code face (OFL; the latin subset its renderer ships) */
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

.am {
    --am-page: #191919; --am-side: #1f1f1f; --am-popover: #303030;
    --am-tp: rgba(255, 255, 255, .929); --am-ts: rgba(255, 255, 255, .569); --am-tm: rgba(255, 255, 255, .4);
    --am-line: rgba(255, 255, 255, .122); --am-seam: rgba(255, 255, 255, .102);
    --am-field: rgba(255, 255, 255, .05); --am-control: rgba(255, 255, 255, .1);
    --am-ghost-hover: rgba(255, 255, 255, .075); --am-ghost-selected: rgba(255, 255, 255, .149);
    --am-brand: #7170ff; --am-brand-text: #828fff;
    --am-added: #32d74b; --am-removed: #ff2c56;
    --am-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
    --am-ease-out: cubic-bezier(.165, .84, .44, 1);
    --am-ease-overshoot: cubic-bezier(.34, 1.3, .64, 1);
    --am-ease-breathe: cubic-bezier(.4, 0, .6, 1);
    --am-ease-snap: cubic-bezier(.32, .72, 0, 1);
    width: 1280px; height: 800px; display: flex; overflow: hidden; border-radius: 10px;
    background: var(--am-page); color: var(--am-tp); text-align: left; user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', sans-serif;
    font-size: 14px; line-height: 20px; font-weight: 400; font-variation-settings: "wght" 380;
    -webkit-font-smoothing: antialiased; font-synthesis: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
/* The app's two text weights: regular, and control (titles, the avatar) */
.am-t, .am-av { font-weight: 435; font-variation-settings: "wght" 420; }
.am-i { width: 20px; height: 20px; fill: currentColor; flex: none; display: block; }
.am-i.am-i16 { width: 16px; height: 16px; }
.am-i.am-i14 { width: 14px; height: 14px; }
/* A ghost icon button */
.am-btn {
    width: 28px; height: 28px; border-radius: 8px; flex: none;
    display: inline-flex; align-items: center; justify-content: center; color: var(--am-ts);
}

/* -- Sidebar: 288 with its seam inside (Sidebar.dc.html) -- */
.am-side {
    width: 288px; flex: none; display: flex; flex-direction: column;
    background: var(--am-side); border-right: 1px solid var(--am-seam);
}
.am-top {
    height: 45px; flex: none; display: flex; align-items: center; padding: 0 8px;
    border-bottom: 1px solid var(--am-line);
}
.am-tl { width: 74px; height: 44px; flex: none; position: relative; }
.am-tl i {
    position: absolute; top: 16px; left: 5px; width: 12px; height: 12px; border-radius: 50%;
    background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .3);
}
.am-tl i:nth-child(2) { left: 25px; background: #febc2e; }
.am-tl i:nth-child(3) { left: 45px; background: #28c840; }
.am-tbtns { flex: 1; min-width: 0; display: flex; align-items: center; }
/* The row is a pixel short of everything in it; the toggle gives it, as
   it does in the app */
.am-tbtns > .am-toggle { flex: 0 1 auto; margin-left: 2px; color: var(--am-tp); }
.am-nav { display: inline-flex; margin-right: 8px; }
.am-nav > .am-btn { border-radius: 7px; color: var(--am-tp); }
.am-nav > .am-off .am-i { opacity: .5; }
.am-seg {
    margin-left: auto; height: 28px; padding: 1px; border-radius: 7px; flex: none;
    display: flex; background: var(--am-field);
}
.am-seg > span {
    width: 34px; height: 26px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center; color: var(--am-tm);
}
.am-seg > .am-on { background: var(--am-control); box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); color: var(--am-tp); }

.am-sbody { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 4px 6px 8px; }
.am-list { display: flex; flex-direction: column; gap: 2px; }
.am-nrow { height: 32px; margin: 0 2px; border-radius: 8px; display: flex; align-items: center; padding-right: 8px; }
.am-nic { width: 28px; margin: 0 4px 0 2px; flex: none; display: inline-flex; justify-content: center; }
.am-ghead {
    height: 20px; margin: 26px 2px 6px; padding: 0 4px 0 10px; display: flex; align-items: center; gap: 5px;
    font-size: 13px; line-height: 16px; color: var(--am-ts); white-space: nowrap;
}
.am-row {
    height: 32px; margin: 0 2px; border-radius: 8px; display: flex; align-items: center; padding: 0 4px 0 10px;
}
.am-row.am-sel { background: var(--am-ghost-selected); }
.am-rt { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; }
/* A title too long for the row fades out over its last 24 */
.am-rt.am-cut { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
.am-dotbox { margin-left: auto; width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.am-dot { width: 6px; height: 6px; border-radius: 50%; display: block; }
.am-dot-unread { background: #257de0; }
.am-dot-waiting { background: #fbb315; }
.am-dot-running { background: rgba(255, 255, 255, .4); animation: am-blink 1.2s ease-in-out infinite alternate; }
@keyframes am-blink { from { opacity: .3; } to { opacity: 1; } }
/* The open session's dot shows only while its turn runs */
.am:not(.am-working) .am-live { display: none; }

.am-sfoot {
    flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 8px;
    position: relative; z-index: 1; box-shadow: 0 -1px 0 var(--am-line);
}
.am-acct {
    flex: 1; min-width: 0; height: 32px; border-radius: 8px; display: flex; align-items: center; gap: 6px;
    padding: 0 6px 0 2px;
}
.am-av {
    width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(113, 112, 255, .24); color: var(--am-brand-text); font-size: 13px;
}
.am-name { color: var(--am-ts); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-sep, .am-bal { color: var(--am-tm); }
.am-bal { font-variant-numeric: tabular-nums; white-space: nowrap; }
.am-acct > .am-i { margin-left: auto; color: var(--am-tm); }
.am-sfoot > .am-gear { width: 32px; height: 32px; color: var(--am-tp); }

/* -- The tile: title row (TitleBar.dc.html), transcript, composer -- */
.am-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.am-title {
    height: 45px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 8px;
    border-bottom: 1px solid var(--am-line);
}
.am-tpill { height: 28px; min-width: 0; padding: 0 6px 0 8px; border-radius: 8px; display: flex; align-items: center; gap: 4px; }
.am-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-tpill > .am-i { color: var(--am-tm); }
/* Before the session has a title: "New session", grey, no menu */
.am-untitled .am-tpill { color: var(--am-ts); }
.am-untitled .am-tpill > .am-i { display: none; }
.am-acts { margin-left: auto; display: flex; gap: 2px; }

.am-stage { flex: 1; min-height: 0; position: relative; }
/* The 768 column, centred; its edges fade */
.am-scroll {
    --am-end-fade: 24px;
    position: absolute; left: 50%; top: 0; bottom: 100px; width: 768px; margin-left: -384px;
    padding-top: 28px; overflow: hidden;
    -webkit-mask-image: linear-gradient(transparent, #000 20px, #000 calc(100% - var(--am-end-fade)), transparent);
    mask-image: linear-gradient(transparent, #000 20px, #000 calc(100% - var(--am-end-fade)), transparent);
}
/* The column keeps its end in view as the app does, moved up by
   --am-follow (site.js followEnd), gliding there */
.am-col {
    --am-follow: 0px;
    display: flex; flex-direction: column; font-size: 15px; line-height: 21px;
    transform: translateY(calc(var(--am-follow) * -1));
    transition: transform .45s var(--am-ease-out);
}
.am-lead { margin-bottom: 20px; font-size: 13px; line-height: 17px; color: var(--am-ts); }
.am-link { text-decoration: underline; text-underline-offset: 3px; }
/* The user's bubble, right, at most 85%; under it the (hidden) action
   bar's 28, then the reply's items, 10.5 apart */
.am-user {
    align-self: flex-end; max-width: 85%; margin-bottom: 28px; padding: 12px 16px; border-radius: 12px;
    background: var(--am-field); text-wrap: pretty;
}
.am-txt { margin: 10.5px 0 0; text-wrap: pretty; }
.am-code, .am-mono { font-family: var(--am-mono); font-variation-settings: normal; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.am-code { padding: 1px 4px; border-radius: 4px; background: var(--am-ghost-hover); font-size: .9em; line-height: 1; }

/* The tool line: verb, object, counts, caret; a group's summary in the
   secondary color. No per-tool icons */
.am-tool {
    margin-top: 10.5px; height: 20px; display: flex; align-items: center; gap: 4px; min-width: 0;
    font-size: 14px; line-height: 20px; color: var(--am-ts); white-space: nowrap;
}
.am-o { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--am-tp); }
.am-sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.am-mono { font-size: 13px; }
.am-add, .am-del { font-variant-numeric: tabular-nums; }
.am-add { color: var(--am-added); }
.am-del { color: var(--am-removed); }

/* Opened, a group's words turn primary and a card of a row per call opens
   8 under the line, 6 above what follows: rounded 12, a ring and lines
   between the rows, each 12 and 8 in (canvas 3f, 3l) */
.am-tool.am-open { color: var(--am-tp); }
.am-tool.am-open > .am-i { color: var(--am-ts); }
.am-card { padding: 8px 0 6px; }
.am-cells {
    display: flex; flex-direction: column; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--am-line);
    font-size: 14px; line-height: 20px;
}
.am-cell { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 8px 12px; color: var(--am-ts); white-space: nowrap; }
.am-cell + .am-cell { border-top: 1px solid var(--am-line); }
/* A row opened on its body: the row, 8, the body */
.am-cell.am-cell-open { flex-direction: column; align-items: stretch; gap: 8px; }
.am-chead { display: flex; align-items: center; gap: 4px; min-width: 0; }

/* An edit's diff as the app's code view draws one: on the editor's canvas,
   ringed, 4 above and below; a line is its new number in a gutter with a 3
   rule, the +/− column, the code, 13/19 mono; an added or removed line on
   its side's tint, its changed words marked */
.am-diff {
    display: flex; flex-direction: column; overflow: hidden; padding: 4px 0; border-radius: 8px;
    background: #181818; box-shadow: inset 0 0 0 1px var(--am-line);
    font-family: var(--am-mono); font-size: 13px; line-height: 19px; color: #eaecf0;
    font-variation-settings: normal; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
}
.am-dl { display: flex; min-width: max-content; }
.am-dn {
    flex: none; width: 2ch; box-sizing: content-box; padding: 0 2ch 0 1ch; border-left: 3px solid transparent;
    text-align: right; color: var(--am-tm);
}
.am-ds { flex: none; width: 2ch; color: var(--am-tm); }
.am-dt { flex: 1; min-width: 0; padding-right: 1ch; white-space: pre; }
.am-dl-add { background: color-mix(in lab, #191919 80%, #32d74b); }
.am-dl-del { background: color-mix(in lab, #191919 80%, #ff2c56); }
.am-dl-add > .am-dn { border-left-color: var(--am-added); color: var(--am-added); background: color-mix(in lab, #191919 85%, #32d74b); }
.am-dl-del > .am-dn { border-left-color: var(--am-removed); color: var(--am-removed); background: color-mix(in lab, #191919 85%, #ff2c56); }
.am-dl-add > .am-ds { color: var(--am-added); }
.am-dl-del > .am-ds { color: var(--am-removed); }
.am-wa { border-radius: 2px; background: rgba(50, 215, 75, .2); }
.am-wd { border-radius: 2px; background: rgba(255, 44, 86, .2); }
/* Its syntax colors, the app's Claude Dark: types, calls, numbers, punctuation */
.am-sy-ty { color: #fbad60; }
.am-sy-fn { color: #70b8ff; }
.am-sy-nu { color: #5eeded; }
.am-sy-pu { color: #d3d7de; }

/* The app's shimmer (ni-fx): the words in the secondary color, a band of
   the primary sweeping across, three seconds a pass with a rest at each end */
.am-shim {
    color: transparent; -webkit-background-clip: text; background-clip: text;
    background-image: linear-gradient(120deg, var(--am-ts) 37.5%, var(--am-tp) 50%, var(--am-ts) 62.5%);
    background-size: 400% 100%; background-position: 83.33% 0;
    animation: am-shim 3s linear infinite;
}
@keyframes am-shim {
    0%, 15% { background-position: 83.33% 0; animation-timing-function: cubic-bezier(.714, .121, .211, .888); }
    85%, 100% { background-position: 16.67% 0; }
}

/* The work row: the work mark, 12, the running call's label and the
   elapsed-time · tokens tail, all secondary; the tail from two seconds on */
.am-work {
    margin-top: 10.5px; height: 20px; flex: none; display: flex; align-items: center; gap: 12px;
    font-size: 14px; line-height: 20px; color: var(--am-ts); transition: opacity .25s;
}
.am-work.am-gone { opacity: 0; }
.am-wl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-wlabel:empty { display: none; }
.am-tail { font-variant-numeric: tabular-nums; }
.am-wm { width: 20px; height: 20px; flex: none; overflow: visible; }
.am-wm-s { fill: var(--am-brand); transform-box: fill-box; transform-origin: center; }
.am-wm-g { transform-origin: 12px 12px; }
.am-wm-a { --tx: 2.8px; --ty: 3px; }
.am-wm-b { --tx: -5.1px; --ty: -2.7px; }
.am-wm-c { --tx: 4.7px; --ty: -6.7px; }
.am-wm-intro .am-wm-s { animation: am-wm-in .45s var(--am-ease-overshoot) both; }
.am-wm-intro .am-wm-b { animation-delay: 80ms; }
.am-wm-intro .am-wm-c { animation-delay: 160ms; }
.am-wm-thinking .am-wm-g { animation: am-wm-orbit 3.2s cubic-bezier(.45, .05, .55, .95) infinite; }
.am-wm-thinking .am-wm-s { animation: am-wm-breathe 1.6s var(--am-ease-breathe) infinite; }
.am-wm-writing .am-wm-s { animation: am-wm-hop 1.4s cubic-bezier(.37, 0, .63, 1) infinite; }
.am-wm-thinking .am-wm-b, .am-wm-writing .am-wm-b { animation-delay: .2s; }
.am-wm-thinking .am-wm-c, .am-wm-writing .am-wm-c { animation-delay: .4s; }
.am-wm-tools .am-wm-s { animation-duration: 2.4s; animation-iteration-count: infinite; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
.am-wm-tools .am-wm-a { animation-name: am-wm-trade-a; }
.am-wm-tools .am-wm-b { animation-name: am-wm-trade-b; }
.am-wm-tools .am-wm-c { animation-name: am-wm-trade-c; }
.am-wm-outro .am-wm-s { animation: am-wm-centre .3s var(--am-ease-snap) forwards; }
.am-wm-outro .am-wm-a { animation-delay: 80ms; }
.am-wm-outro .am-wm-b { animation-delay: 40ms; }
@keyframes am-wm-in { 0% { transform: scale(0); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes am-wm-orbit { to { transform: rotate(360deg); } }
@keyframes am-wm-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.82); } }
@keyframes am-wm-hop { 0%, 60%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-2.4px) scale(1.12); } }
@keyframes am-wm-trade-a {
    0%, 20% { transform: none; } 33.3%, 53.3% { transform: translate(7.9px, 5.7px) scale(.632); }
    66.6%, 86.6% { transform: translate(-1.9px, 9.7px) scale(.386); } 100% { transform: none; }
}
@keyframes am-wm-trade-b {
    0%, 20% { transform: none; } 33.3%, 53.3% { transform: translate(-9.8px, 4px) scale(.611); }
    66.6%, 86.6% { transform: translate(-7.9px, -5.7px) scale(1.583); } 100% { transform: none; }
}
@keyframes am-wm-trade-c {
    0%, 20% { transform: none; } 33.3%, 53.3% { transform: translate(1.9px, -9.7px) scale(2.591); }
    66.6%, 86.6% { transform: translate(9.8px, -4px) scale(1.636); } 100% { transform: none; }
}
@keyframes am-wm-centre { to { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; } }

/* The composer (Composer.dc.html, Code): one row — "+", the placeholder,
   the stop button while the turn runs — and under it the model, effort,
   permission mode and the context ring */
.am-composer { position: absolute; left: 50%; bottom: 10px; width: 768px; margin-left: -384px; display: flex; flex-direction: column; gap: 8px; }
.am-cbox {
    padding: 8px; border-radius: 14px; display: flex; align-items: center; min-height: 44px;
    background: var(--am-popover); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .078), 0 4px 20px rgba(0, 0, 0, .035);
}
.am-ph {
    flex: 1; min-width: 0; padding: 0 6px; font-size: 15px; line-height: 21px; color: #878787;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.am-ph-busy, .am-working .am-ph-idle { display: none; }
.am-working .am-ph-busy { display: inline; }
.am-cbox > .am-stop { display: none; color: var(--am-tp); }
.am-working .am-cbox > .am-stop { display: inline-flex; animation: am-fade .2s ease-out both; }
.am-cbar { height: 24px; display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 13px; line-height: 17px; }
.am-chip { height: 24px; padding: 0 6px; border-radius: 6px; display: inline-flex; align-items: center; }
.am-chip.am-model { font-size: 14px; }
.am-chip.am-effort { color: var(--am-ts); }
.am-ringb { width: 28px; height: 28px; margin: -2px 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.am-ring { width: 14px; height: 14px; display: block; }
.am-ring circle { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 2; }
.am-ring .am-ring-on { stroke: #257de0; stroke-linecap: round; }

.am-rise { animation: am-rise .26s var(--am-ease-out) both; }
.am-tk { animation: am-fade .22s ease-out both; }
.am-swap { animation: am-fade .35s ease-out both; }
@keyframes am-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes am-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- Public site: narrow screens -------------------------------------------- */

@media (max-width: 1023px) {
    .pub-facts { grid-template-columns: repeat(2, 1fr); }
    .pub-steps { grid-template-columns: minmax(0, 420px); }
}

@media (max-width: 720px) {
    .pub-h1 { font-size: 38px; }
    .pub-sub { font-size: 15.5px; }
    .pub-live { font-size: 11.5px; gap: 7px; }
    .pub-ha { padding: 44px 22px 0; gap: 18px; }
    /* The window keeps its size and runs off the right edge: what shows is
       the sidebar and the start of the session, not a thumbnail */
    .pub-stage { justify-content: flex-start; padding: 36px 0 0 22px; }
    .pub-stage .pub-shot { --s: .5; }
    .pub-dl { padding: 44px 22px 0; }
    .pub-dl .pub-h1 { font-size: 32px; }
    /* The landing's phone window: its size kept, running off the right edge */
    .pub-dl-shot { margin-top: 44px; align-self: stretch; margin-right: -22px; overflow: hidden; }
    .pub-dl-shot .pub-shot { --s: .5; }
    .pub-facts, .pub-dl-cols { grid-template-columns: 1fr; gap: 26px; margin-top: 52px; }
    .pub-dl-cols { gap: 14px; }
    .pub-panel { padding: 20px; }
    .pub-sums { grid-template-columns: 1fr; gap: 4px; }
    .pub-sums code { margin-bottom: 8px; }
    .pub-dl-end { height: 56px; }
    .pub-done { padding: 44px 22px 48px; }
    .pub-done .pub-h1 { font-size: 30px; }
}

/* Reduced motion: no entrance, no reveal, no replay (site.js leaves the
   finished session in place), illustrations at rest */
@media (prefers-reduced-motion: reduce) {
    .pub-enter, .pub-enter-win, .pub-step { animation: none; }
    .pub-reveal { opacity: 1; transform: none; transition: none; }
    .am *, .pub-ill * { animation: none !important; transition: none !important; }
    .pub-keycard .hint { display: none; }
}

/* ---- Public site: content pages ------------------------------------------- */

.pub-page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 32px 64px; }

.pub-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.pub-page-head h1 { margin: 0 0 7px; font-size: 28px; font-weight: 600; letter-spacing: -0.025em; color: var(--text); }
.pub-page-head .sub { font-size: 13.5px; color: var(--text-muted); }
.pub-page-tools { display: flex; gap: 8px; align-items: center; }

.pub-search { position: relative; }
.pub-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.pub-search input {
    width: 260px; height: 34px; padding: 0 10px 0 30px;
    background: var(--surface-sunk); border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px;
    color: var(--text); font-size: 12.5px; font-family: inherit; outline: none;
    transition: border-color .12s;
}
.pub-search input:focus { border-color: rgba(130, 143, 255, .5); }
.pub-search input::placeholder { color: var(--text-faint); }

/* Wire tags in the docs' endpoint table */
.pub-tag {
    display: inline-flex; align-items: center; height: 19px; padding: 0 6px;
    border-radius: 4px; border: 1px solid var(--hairline-strong);
    color: var(--text-muted); font-size: 11px; font-family: var(--mono);
}
.pub-tag + .pub-tag { margin-left: 5px; }

/* ---- Public site: models ---------------------------------------------------- */
/* Cards on the page itself, no panel around them; a card's parts and the
   dialog's sections are divided by hairlines, never by grounds of their own,
   and tags stay neutral — native ones are told apart by brighter text only.
   A card is a button, so everything in it is a span set to the box it needs */

.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 12px; }
.pm-grid[hidden] { display: none; }
.pm-card {
    position: relative; display: flex; flex-direction: column; gap: 11px; min-width: 0;
    padding: 14px 15px 13px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface);
    color: inherit; font: inherit; text-align: left; cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}
.pm-card[hidden] { display: none; }
.pm-card:hover { border-color: var(--hairline-strong); background: var(--surface-raised); }
.pm-card:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.pm-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-prov { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); min-width: 0; }
.pm-prov .dot {
    width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 600; color: var(--text-high); background: var(--surface-elev);
    border: 1px solid var(--hairline-strong); flex: none;
}
/* A provider's mark in place of its initial: single-colour, the initial's own colour */
.pm-prov .dot .pm-mark { width: 12px; height: 12px; fill: currentColor; }
/* The set the marks are drawn from: in the page, never seen */
.pm-logos { position: absolute; width: 0; height: 0; overflow: hidden; }
.pm-kind {
    font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); border: 1px solid var(--hairline-strong);
    border-radius: 4px; padding: 1px 6px; flex: none;
}
.pm-id { display: block; min-width: 0; }
.pm-name {
    display: block; font-size: 15px; font-weight: 600; color: var(--text-high); letter-spacing: -0.01em; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-slug {
    display: block; font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); margin-top: 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-stats { display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 6px; padding-top: 11px; border-top: 1px solid var(--hairline); }
.pm-stat { display: block; min-width: 0; }
.pm-stat-wide { grid-column: span 2; }
.pm-stat .k { display: block; font-size: 10.5px; color: var(--text-faint); }
.pm-stat .v {
    display: block; font-family: var(--mono); font-size: 12.5px; color: var(--text-body); margin-top: 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-foot { display: flex; align-items: center; gap: 5px; min-height: 19px; overflow: hidden; }
.pm-ep {
    display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 4px; font-size: 10.5px;
    font-family: var(--mono); color: var(--text-muted); border: 1px solid var(--hairline-strong); white-space: nowrap;
}
.pm-ep.native { color: var(--text-body); }
.pm-think {
    margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-faint);
    font-family: var(--mono); flex: none; white-space: nowrap;
}
.pm-list .pagination { border-top: 0; padding: 18px 0 0; }

/* The dialog: the console's modal, wide enough for a request to read whole */
.pm-dialog { width: 46rem; max-width: calc(100vw - 32px); max-height: calc(100vh - 48px); }
.pm-dialog .modal-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--hairline); }
.pm-dialog .modal-body { padding: 4px 20px 6px; }
.pm-dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.pm-did { min-width: 0; }
.pm-dhead .pm-prov { margin-bottom: 8px; }
.pm-dhead h3 { font-size: 18px; }
.pm-dslug {
    display: flex; align-items: center; gap: 8px; margin-top: 7px; font-family: var(--mono); font-size: 12.5px;
    color: var(--text-body); overflow-wrap: anywhere;
}
.pm-x {
    flex: none; width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--hairline-strong); background: none;
    color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pm-x:hover { color: var(--text-high); background: var(--surface-elev); }
.pm-sec { padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.pm-sec:last-child { border-bottom: 0; }
.pm-sec h4 { margin: 0 0 10px; font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: .02em; }
.pm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--hairline); border-radius: 8px; }
.pm-fact { padding: 11px 13px; min-width: 0; }
.pm-fact + .pm-fact { border-left: 1px solid var(--hairline); }
.pm-fact-wide { grid-column: span 2; }
.pm-fact .k { font-size: 11px; color: var(--text-faint); }
.pm-fact .v { font-family: var(--mono); font-size: 15px; color: var(--text-high); margin-top: 5px; }
.pm-fact .s { font-family: var(--mono); font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.pm-levels { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-level {
    display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 5px; font-family: var(--mono);
    font-size: 12px; color: var(--text-faint); border: 1px dashed var(--hairline-strong);
}
.pm-level.on { color: var(--text-body); border: 1px solid var(--hairline-strong); }
.pm-help { font-size: 12.5px; color: var(--text-muted); line-height: 1.65; margin: 10px 0 0; }
.pm-sec h4 + .pm-help { margin-top: 0; }
.pm-help code {
    font-family: var(--mono); font-size: 11.5px; color: var(--text-body); background: var(--surface-elev);
    border: 1px solid var(--hairline); border-radius: 4px; padding: 0 4px;
}
.pm-eps { display: flex; flex-direction: column; border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden; }
.pm-eprow { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 12px; padding: 9px 13px; font-size: 12.5px; }
.pm-eprow + .pm-eprow { border-top: 1px solid var(--hairline); }
.pm-eprow .n { color: var(--text-body); }
.pm-eprow .p {
    font-family: var(--mono); font-size: 11.5px; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-badge { font-size: 10.5px; border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.pm-badge.native { color: var(--text-body); border: 1px solid var(--hairline-strong); }
.pm-badge.via { color: var(--text-faint); border: 1px solid var(--hairline); }
.pm-code-tools { display: flex; align-items: center; gap: 8px; }
.pm-lang { display: inline-flex; border: 1px solid var(--hairline-strong); border-radius: 5px; overflow: hidden; }
.pm-lang button {
    height: 22px; padding: 0 8px; background: none; border: 0; color: var(--text-muted); font: inherit;
    font-size: 11.5px; cursor: pointer;
}
.pm-lang button.on { background: var(--surface-elev); color: var(--text-high); }
.pm-dialog .pub-pre { max-height: 300px; }
.pm-dialog .modal-actions {
    border-top: 1px solid var(--hairline); padding: 12px 20px; justify-content: space-between; align-items: center;
}
.pm-dialog .modal-actions a { font-size: 12.5px; }
.pm-dialog a { color: var(--accent); text-decoration: none; }
.pm-dialog a:hover { color: var(--accent-hover); }
.pm-dialog .pub-code-bar { flex-wrap: wrap; row-gap: 0; }
.pm-dialog .pub-code-tabs { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.pm-dialog .pub-code-tabs button { white-space: nowrap; }

@media (max-width: 720px) {
    .pm-grid { grid-template-columns: 1fr; }
    /* The dialog takes the whole screen, its request still readable */
    .pm-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .pm-dialog .modal-head, .pm-dialog .modal-body, .pm-dialog .modal-actions { padding-left: 16px; padding-right: 16px; }
    .pm-fact { padding: 10px 11px; }
    .pm-fact .v { font-size: 14px; }
    .pm-eprow { grid-template-columns: 1fr auto; }
    .pm-eprow .p { grid-column: 1 / -1; grid-row: 2; white-space: normal; word-break: break-all; }
    .pm-dialog .pm-code-tools { width: 100%; justify-content: space-between; padding: 6px 0 8px; border-top: 1px solid var(--hairline); }
}

/* ---- Public site: status --------------------------------------------------- */

.pub-status-head { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.pub-status-head h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.025em; color: var(--text); }
.pub-status-head .updated { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }

.pub-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pub-dot.ok { background: var(--green); box-shadow: 0 0 0 4px rgba(109, 199, 139, .16); }
.pub-dot.bad { background: var(--amber); box-shadow: 0 0 0 4px rgba(206, 163, 74, .16); }

.pub-band-card {
    background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: 8px;
    padding: 16px 18px; display: flex; flex-direction: column; gap: 11px; margin-bottom: 20px;
}
.pub-band-head { display: flex; align-items: center; justify-content: space-between; }
.pub-band-head .t { font-size: 13px; color: var(--text); }
.pub-band-head .pct { font-family: var(--mono); font-size: 11.5px; color: var(--green); }
.pub-band { display: flex; gap: 3px; }
.pub-band span { flex: 1; height: 32px; border-radius: 3px; background: var(--hairline); }
.pub-band span.ok { background: rgba(109, 199, 139, .75); }
.pub-band span.warn { background: rgba(206, 163, 74, .8); }
.pub-band span.bad { background: rgba(235, 87, 87, .8); }
.pub-band-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: #4d5157; }

.pub-endpoints .head { padding: 11px 16px; border-bottom: 1px solid var(--hairline); font-size: 13px; color: var(--text); }
.pub-state {
    display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px;
    border-radius: 5px; font-size: 11.5px;
}
.pub-state .d { width: 5px; height: 5px; border-radius: 50%; }
.pub-state.ok { background: rgba(109, 199, 139, .12); border: 1px solid rgba(109, 199, 139, .28); color: var(--green); }
.pub-state.ok .d { background: var(--green); }
.pub-state.bad { background: rgba(206, 163, 74, .12); border: 1px solid rgba(206, 163, 74, .28); color: var(--amber); }
.pub-state.bad .d { background: var(--amber); }

/* ---- Public site: content pages at phone width ---------------------------- */

@media (max-width: 720px) {
    /* Content lines up with the logo and the footer, which sit 20px in here */
    .pub-page { padding: 28px 20px 48px; }
    /* Search gets a row of its own, the two filters share the next */
    .pub-page-tools { flex-wrap: wrap; width: 100%; }
    .pub-search { flex-basis: 100%; }
    .pub-search input { width: 100%; }
    /* A status card's sub line says what its number counts: on a narrow card
       it wraps instead of trailing off */
    .pub-page .stat-card .d { white-space: normal; }
    /* The three endpoint columns no longer fit side by side, and the panel
       clipped the last one, the state. Each endpoint becomes two lines, path
       over its p50, with the state on the right where it always shows */
    .pub-endpoints table, .pub-endpoints tbody { display: block; }
    .pub-endpoints tr {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
        padding: 9px 11px; border-bottom: 1px solid #191a1b;
    }
    .pub-endpoints tr:last-child { border-bottom: 0; }
    .pub-endpoints td { height: auto; padding: 0; border-bottom: 0; }
    .pub-endpoints td:nth-child(2) { grid-row: 2; text-align: left; margin-top: 2px; font-size: 11.5px; color: var(--text-muted); }
    .pub-endpoints td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---- Public site: docs ------------------------------------------------------ */

.pub-docs { display: flex; align-items: stretch; flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; }

.pub-docs-nav {
    width: 236px; flex: none; border-right: 1px solid var(--hairline);
    padding: 24px 16px; display: flex; flex-direction: column; gap: 2px;
    /* One long page — the nav stays put and tracks the reader's section */
    position: sticky; top: 0; align-self: flex-start;
    max-height: 100dvh; overflow-y: auto;
}
.pub-docs-nav .grp {
    font-size: 11.5px; color: var(--text-faint); letter-spacing: .05em; text-transform: uppercase;
    padding: 14px 8px 5px;
}
.pub-docs-nav .grp:first-child { padding-top: 0; }
.pub-docs-nav .itm { display: block; padding: 5px 8px; border-radius: 5px; font-size: 13px; }
.pub-docs-nav a.itm { color: var(--text-body); text-decoration: none; }
.pub-docs-nav a.itm:hover { color: var(--text); }
.pub-docs-nav .itm.active { background: var(--accent-soft); color: var(--accent); }
/* Entries that exist in the plan but not yet as pages — visibly parked */
.pub-docs-nav span.itm { color: var(--text-faint); cursor: default; }

.pub-docs-body {
    flex: 1; min-width: 0; padding: 32px 40px 64px; max-width: 900px;
    display: flex; flex-direction: column; gap: 26px;
}
.pub-docs-body .eyebrow {
    font-family: var(--mono); font-size: 11.5px; color: var(--accent);
    letter-spacing: .1em; text-transform: uppercase;
}
.pub-docs-body h1 { margin: 7px 0 9px; font-size: 28px; font-weight: 600; letter-spacing: -0.025em; color: var(--text); }
.pub-docs-body .lede { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-muted); }

/* One anchored section of the single docs page */
.pub-doc {
    display: flex; flex-direction: column; gap: 22px;
    padding-top: 26px; border-top: 1px solid var(--hairline);
    scroll-margin-top: 20px;
}
.pub-doc-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.pub-doc-lede { margin: -12px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--text-muted); }

.pub-doc-sec { display: flex; flex-direction: column; gap: 11px; }
.pub-doc-sec > h3 { margin: 0; font-size: 15.5px; font-weight: 500; color: var(--text); }
.pub-doc-sec > p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--text-muted); }
.pub-doc-sec code, .pub-inline-code { font-family: var(--mono); font-size: .95em; color: var(--text-body); }
/* A docs table holds sentences. A console table never wraps a cell and
   scrolls sideways instead (.table td, .table-scroll), but a docs table sits
   in a card that hides its overflow, so a cell that cannot wrap is cut off
   at the card's edge, on a phone in every table. Here cells wrap within the
   column widths each table's colgroup sets, and a token too long for its
   column breaks rather than pushes the table past the card. */
.pub-doc-sec .table td { white-space: normal; overflow-wrap: anywhere; }

.pub-code { border: 1px solid var(--hairline); border-radius: 9px; overflow: hidden; background: var(--surface-sunk); }
.pub-code-bar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface-raised); border-bottom: 1px solid var(--hairline); padding: 0 12px;
}
.pub-code-tabs { display: flex; }
.pub-code-tabs button {
    padding: 10px 13px; background: none; border: 0; cursor: pointer;
    font-family: inherit; font-size: 12.5px; color: var(--text-muted);
    border-bottom: 1.5px solid transparent; margin-bottom: -1px;
}
.pub-code-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.pub-copy {
    display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
    border-radius: 5px; border: 1px solid var(--hairline-strong); background: #1c1c1f;
    color: var(--text-muted); font-size: 11.5px; font-family: inherit; cursor: pointer;
}
.pub-copy:hover { color: var(--text-body); }

.pub-pre {
    margin: 0; padding: 14px 16px; overflow-x: auto;
    font-family: var(--mono); font-size: 12.5px; line-height: 1.85; color: var(--text-muted);
    white-space: pre;
}
.pub-pre .hl { color: var(--text-body); background: rgba(130, 143, 255, .07); box-shadow: -16px 0 0 rgba(130, 143, 255, .07), 16px 0 0 rgba(130, 143, 255, .07); }
.pub-pre[hidden] { display: none; }

.pub-kv {
    display: flex; flex-direction: column; gap: 7px; padding: 13px 14px;
    border-radius: 8px; background: var(--surface-sunk); border: 1px solid var(--hairline);
    font-family: var(--mono); font-size: 12.5px; color: var(--text-body);
}

.pub-err-pre {
    margin: 0; border-radius: 8px; background: var(--surface-sunk); border: 1px solid var(--hairline);
    padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; color: var(--text-muted);
    line-height: 1.8; white-space: pre-wrap; overflow-x: auto;
}

.pub-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.pub-chip {
    display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
    border-radius: 5px; font-size: 11.5px; font-family: var(--mono);
}
.pub-chip.blue { background: rgba(94, 160, 239, .12); border: 1px solid rgba(94, 160, 239, .28); color: var(--blue); }
.pub-chip.amber { background: rgba(206, 163, 74, .12); border: 1px solid rgba(206, 163, 74, .28); color: var(--amber); }
.pub-chip.red { background: rgba(235, 87, 87, .12); border: 1px solid rgba(235, 87, 87, .28); color: var(--danger); }

@media (max-width: 860px) {
    .pub-docs { flex-direction: column; }
    /* Stacked above the page, the nav is a block like any other: kept sticky,
       it pinned its whole unfilled list over every section scrolled under it */
    .pub-docs-nav {
        width: 100%; border-right: 0; border-bottom: 1px solid var(--hairline); padding: 16px;
        position: static; max-height: none;
    }
    .pub-docs-body { padding: 24px 20px 48px; }
}

/* ---- Public site: legal ----------------------------------------------------- */

.pub-legal { width: 100%; max-width: 760px; margin: 0 auto; padding: 48px 32px 80px; }
.pub-legal .eyebrow {
    font-family: var(--mono); font-size: 11.5px; color: var(--accent);
    letter-spacing: .1em; text-transform: uppercase;
}
.pub-legal h1 { margin: 7px 0 9px; font-size: 28px; font-weight: 600; letter-spacing: -0.025em; color: var(--text); }
.pub-legal .lede { margin: 0 0 4px; font-size: 14px; line-height: 1.65; color: var(--text-muted); }
.pub-legal .meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }
.pub-legal h2 { margin: 34px 0 10px; font-size: 15.5px; font-weight: 500; color: var(--text); }
.pub-legal p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.7; color: var(--text-muted); }
.pub-legal a { color: var(--accent); text-decoration: none; }
.pub-legal a:hover { color: var(--accent-hover); }

/* ---- Public site: support --------------------------------------------------- */
/* The legal pages' column and head. The two pages that answer most questions
   come first, as cards; the mailbox comes after them, for everything else,
   so its button is the quiet one */

.pub-support { width: 100%; max-width: 760px; margin: 0 auto; padding: 48px 32px 80px; }
.pub-support .eyebrow {
    font-family: var(--mono); font-size: 11.5px; color: var(--accent);
    letter-spacing: .1em; text-transform: uppercase;
}
.pub-support h1 { margin: 7px 0 9px; font-size: 28px; font-weight: 600; letter-spacing: -0.025em; color: var(--text); }
.pub-support .lede { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-muted); max-width: 600px; }

.pub-help { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.pub-help-card {
    display: flex; flex-direction: column; padding: 22px 24px 20px;
    border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface);
    text-decoration: none; transition: border-color .12s;
}
.pub-help-card:hover { border-color: rgba(255, 255, 255, .16); }
.pub-help-card > .pub-i { font-size: 20px; color: var(--accent); margin-bottom: 14px; }
.pub-help-card h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.005em; }
.pub-help-card p { flex: 1; margin: 0; font-size: 13.5px; line-height: 1.62; color: var(--text-muted); }
.pub-help-card .pub-more { margin-top: 16px; }
.pub-help-card:hover .pub-more { color: var(--text-body); }
.pub-help-status { margin-top: 16px; }

.pub-mail { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--hairline); }
.pub-mail h2 { margin: 0 0 8px; font-size: 15.5px; font-weight: 500; color: var(--text); }
.pub-mail p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--text-muted); max-width: 600px; }
.pub-mail p a { color: var(--accent); text-decoration: none; }
.pub-mail p a:hover { color: var(--accent-hover); }
.pub-mail-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
/* The address itself is the label, set like the other addresses: mono */
.pub-mail-cta .pub-btn { font-family: var(--mono); font-size: 13.5px; font-weight: 400; }

@media (max-width: 720px) {
    .pub-support { padding: 36px 20px 64px; }
    .pub-help { grid-template-columns: 1fr; }
}

/* ---- Public site: docs code tokens ---------------------------------------- */
/* Painted by /static/js/public/docs.js over pre[data-lang] text nodes.
   Restrained four-hue scheme; the default code ink stays muted so the
   colored tokens carry the structure. */

.tok-k { color: var(--violet); }      /* keyword / flag / literal */
.tok-s { color: var(--green); }       /* string */
.tok-c { color: var(--text-faint); }  /* comment */
.tok-n { color: var(--amber); }       /* number */
.tok-p { color: var(--blue); }        /* property / header name */

/* Single-snippet code blocks: a static label where quickstart has tabs */
.pub-code-label { padding: 10px 13px; font-size: 12.5px; color: var(--text-faint); font-family: var(--mono); }

/* ---- Public site: column widths ------------------------------------------- */
/* The CSP (default-src 'self') blocks style attributes, so colgroup widths
   live here, per table. */

.pub-endpoints col:nth-child(1) { width: 50%; }
.pub-endpoints col:nth-child(2) { width: 25%; }
.pub-endpoints col:nth-child(3) { width: 25%; }

.tbl-endpoints col:nth-child(1) { width: 44%; }
.tbl-endpoints col:nth-child(2) { width: 14%; }
.tbl-endpoints col:nth-child(3) { width: 42%; }

.tbl-limits col:nth-child(1) { width: 12%; }
.tbl-limits col:nth-child(2) { width: 32%; }
.tbl-limits col:nth-child(3) { width: 56%; }

.tbl-retention col:nth-child(1) { width: 36%; }
.tbl-retention col:nth-child(2) { width: 30%; }
.tbl-retention col:nth-child(3) { width: 34%; }

/* ============================================================================
 * Overview + Usage (redesign, nico 12-03): the balance leads with its runway,
 * one series at a time as bars (components/bar-chart.js, both pages), share
 * bars on the model lists. .ov-top and .ov-balance .v restate .summary and
 * .stat-card .v at the same specificity, so they stay after those rules.
 * uc-* is shared by both pages, ov-* is the Overview's, us-* the Usage page's
 * ========================================================================== */

/* ---- Overview · cards ---------------------------------------------------- */

/* The balance leads, wider, with its Deposit button and its runway line */
.ov-top { grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); }
.ov-balance { display: flex; flex-direction: column; }
.ov-balance .v { font-size: 28px; }
.ov-balance-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 2px; }
.ov-runway { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.ov-runway b { color: var(--text-body); font-weight: 500; font-family: var(--mono); }
/* Low balance: the figure and its runway turn amber together — no banner, and
   not red, because the user did nothing wrong */
.ov-balance.warn .v, .ov-balance.warn .ov-runway, .ov-balance.warn .ov-runway b { color: var(--amber); }
/* The window a card counts, small at the right of its label */
.ov-when { float: right; font-size: 11.5px; color: var(--text-faint); }

/* ---- Shared · panel heads ------------------------------------------------ */

/* A chart's head: title, the shown total beside it, its switches at the right */
.uc-chart-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px 6px; }
.uc-chart-head .t { font-size: 13.5px; font-weight: 600; color: var(--text-high); }
.uc-chart-head .total { font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); }
.uc-chart-head .total b { color: var(--text-high); font-weight: 500; }
.uc-chart-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* A list's head: title, what rides beside it, a link or a note at the right */
.uc-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.uc-head .t { font-size: 13.5px; font-weight: 600; color: var(--text-high); }
.uc-head .lk { margin-left: auto; font-size: 12.5px; color: var(--text-muted); text-decoration: none; transition: color .12s; }
.uc-head .lk:hover { color: var(--accent); }
.uc-head .note { margin-left: auto; font-size: 12.5px; color: var(--text-faint); }

/* ---- Shared · the one-series bar chart (js/components/bar-chart.js) ------ */

.uc-chart { padding: 6px 16px 14px; }
/* The tooltip is placed in the plot's own pixels */
.uc-plot { position: relative; }
/* Visible: the last day's label may run a few px into the panel's padding */
.uc-plot svg { display: block; overflow: visible; }
.uc-grid { stroke: var(--hairline); }
.uc-tick { font-family: var(--mono); font-size: 10px; fill: var(--text-faint); }
.uc-chart-bar { fill: var(--accent); fill-opacity: .45; }
.uc-chart-bar.on { fill-opacity: 1; }
/* The drawn chart's height (bar-chart.js HEIGHT), so switching to an empty
   series does not make the panel jump */
.uc-chart-none { height: 234px; display: grid; place-items: center; font-size: 12.5px; color: var(--text-faint); }
.uc-tip {
    position: absolute; top: 4px; left: 0; z-index: 2; pointer-events: none;
    padding: 8px 10px; background: var(--surface-elev); border: 1px solid var(--hairline-strong); border-radius: 7px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4); font-size: 12px; color: var(--text-body); white-space: nowrap;
}
.uc-tip .d { color: var(--text-faint); font-size: 11.5px; margin-bottom: 3px; }
.uc-tip b { font-family: var(--mono); color: var(--text-high); font-weight: 500; }

/* A share of the window's spend: a thin track and its fill */
.uc-bar { height: 4px; border-radius: 2px; background: var(--hairline-strong); overflow: hidden; }
.uc-bar i { display: block; height: 100%; background: var(--accent); opacity: .75; }

/* ---- Overview · top models, recent, first run ---------------------------- */

.ov-model { display: grid; grid-template-columns: minmax(0, 1fr) 76px 46px; gap: 4px 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--hairline); }
.ov-model:first-child { border-top: none; }
.ov-model .n { font-size: 12.5px; color: var(--text-high); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-model .m { font-family: var(--mono); font-size: 12px; color: var(--text-body); text-align: right; }
.ov-model .p { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); text-align: right; }
.ov-model .uc-bar { grid-column: 1 / 4; }

/* Recent: Requests | Credits as small tabs in the head, one list under it */
.ov-tabs { display: flex; gap: 2px; margin-left: 10px; }
.ov-tabs .range-opt { padding: 2px 8px; }
.ov-feed { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--hairline); font-size: 12.5px; }
.ov-feed:first-child { border-top: none; }
.ov-feed .t { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }
.ov-feed .n, .ov-feed .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-feed .n { color: var(--text-high); }
.ov-feed .s { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.ov-feed .r { font-family: var(--mono); font-size: 12px; color: var(--text-body); text-align: right; }
.ov-feed .r.bad { color: var(--danger); }
.ov-feed .r.in { color: var(--green); }

/* First run: the three steps side by side where the chart will be */
.ov-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ov-step { padding: 16px 18px; border-left: 1px solid var(--hairline); }
.ov-step:first-child { border-left: none; }
.ov-step .n {
    width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--hairline-strong);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 11.5px; color: var(--text-muted);
}
.ov-step.done .n { border-color: var(--green); color: var(--green); }
.ov-step .t { margin-top: 10px; font-size: 13.5px; font-weight: 500; color: var(--text-high); }
.ov-step.done .t { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--text-faint); }
.ov-step .d { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.ov-step .btn { margin-top: 12px; }

/* ---- Usage ---------------------------------------------------------------- */

/* By model's Share column: the bar and its percent, right-aligned */
.us-share { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.us-share .uc-bar { width: 110px; }
.us-share span { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); min-width: 38px; text-align: right; }

/* A range toggle in the topbar (Usage's, beside Export CSV) is the 30px of
   every topbar action — controls in one row share a height */
.topbar-tools .range-toggle { height: 30px; }
.topbar-tools .range-opt { padding: 0 12px; }

/* ---- Phone width ---------------------------------------------------------- */

@media (max-width: 820px) {
    .ov-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* The title keeps its line; the total and the switches wrap under it */
    .uc-chart-head, .uc-head { flex-wrap: wrap; row-gap: 8px; }
    .ov-steps { grid-template-columns: minmax(0, 1fr); }
    .ov-step { border-left: none; border-top: 1px solid var(--hairline); }
    .ov-step:first-child { border-top: none; }
}

/* ---- Console at phone width ----------------------------------------------- */
/* Last in the file on purpose: these restate properties their components'
   own rules set, and a rule written later at the same specificity wins */

@media (max-width: 820px) {
    /* A head row holds a title and what rides beside it — a legend, a range
       toggle, a note. Narrow, the title keeps its one line and the rest wraps
       under it, where the title used to fold word by word and the Overview
       legend ran out of its card */
    .panel-head, .set-head { flex-wrap: wrap; row-gap: 8px; }
    .panel-title, .set-title { flex: none; white-space: nowrap; }
    /* Toasts keep a margin on both sides; anchored on the right alone, a long
       one ran to the screen's left edge */
    .toast-wrap { left: 14px; right: 14px; bottom: 14px; }
    /* Fixed-layout tables are exactly as wide as their panel, so a phone
       squeezed every column under its header. A floor makes the table wider
       than the panel instead, and its scroller takes the rest */
    #mgmt-table, #prompt-table { min-width: 460px; }
}

/* ---- API keys (redesign, nico 12-03): one summary line over the list, limits
   as thin meters, plain outline actions — red only in the confirm dialog ---- */
.rk-sum { margin-bottom: 14px; font-size: 12.5px; color: var(--text-muted); }
.rk-sum:not([hidden]) { display: flex; align-items: baseline; flex-wrap: wrap; row-gap: 4px; }
.rk-sum > span { padding-right: 16px; min-width: 0; overflow-wrap: anywhere; }
.rk-sum > span + span { padding-left: 16px; border-left: 1px solid var(--hairline-strong); }
.rk-sum b { color: var(--text-high); font: 500 1em var(--mono); }
.rk-sum .rk-when { font-family: inherit; }

.rk-table td { padding-top: 12px; padding-bottom: 12px; }
.rk-name { max-width: 26ch; white-space: normal; overflow-wrap: anywhere; font-size: 13px; font-weight: 500; color: var(--text-high); }
.rk-limit { width: 170px; }
.rk-amount { font: 12px var(--mono); color: var(--text-body); }
.rk-track { height: 3px; margin-top: 6px; border-radius: 2px; overflow: hidden; background: var(--hairline-strong); }
.rk-track > span { display: block; height: 100%; background: var(--text-muted); }
.rk-near .rk-amount { color: var(--amber); }
.rk-near .rk-track > span { background: var(--amber); }
.rk-status { display: inline-flex; align-items: center; gap: 7px; color: var(--text-body); white-space: nowrap; }
.rk-status::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--green); }
.rk-disabled { color: var(--text-muted); }
.rk-status.rk-disabled::before { background: var(--text-faint); }
.rk-expired { color: var(--amber); }
.rk-status.rk-expired::before { background: var(--amber); }
.rk-act { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.rk-act .btn { height: 30px; padding: 0 12px; font-size: 12.5px; }
.rk-act .rk-del, .rk-act .rk-del:not([disabled]):hover { color: var(--danger); }

.rk-form { display: flex; flex-direction: column; gap: 16px; }
.rk-form .field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; }
.rk-form .field label { margin-bottom: 0; color: var(--text-muted); }
.rk-form input, .rk-form .dd-trigger { height: 38px; padding: 0 12px; font-size: 13px; }
.rk-form .dd-trigger { justify-content: space-between; }
.rk-form input::placeholder { color: var(--text-faint); }
.rk-hint { font-size: 11.5px; color: var(--text-faint); }
.rk-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.rk-affix { position: relative; min-width: 0; }
.rk-unit { position: absolute; bottom: 0; height: 38px; display: flex; align-items: center; pointer-events: none; color: var(--text-faint); font-size: 13px; }
.rk-prefix .rk-unit { left: 12px; }
.rk-suffix .rk-unit { right: 12px; }
.rk-prefix input { padding-left: 24px; }
.rk-suffix input { padding-right: 44px; }

.rk-details.modal-sub { margin: 0 0 12px; overflow-wrap: anywhere; }
.rk-reveal { display: flex; align-items: stretch; height: 38px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-control); background: var(--surface-sunk); overflow: hidden; }
.rk-reveal code { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 12px; overflow-x: auto; white-space: nowrap; font: 12px var(--mono); color: var(--text-high); user-select: all; }
.rk-reveal .btn { flex: none; height: auto; padding: 0 14px; gap: 6px; border: 0; border-left: 1px solid var(--hairline-strong); border-radius: 0; background: var(--surface-raised); font-size: 12.5px; }
.rk-reveal .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rk-note { align-items: baseline; margin-top: 12px; font-size: 12.5px; color: var(--amber); }
.rk-note .dot { transform: translateY(-1px); }

/* ---- Settings (redesign, nico 12-03): one column at most 760px, one row per
   item — its state on the left, its buttons on the right ---- */
.se-wrap { max-width: 760px; }
.se-who { display: flex; align-items: center; gap: 14px; padding: 4px 0 22px; }
.se-avatar {
    display: grid; place-items: center; flex: none; width: 48px; height: 48px;
    border: 1px solid rgba(130, 143, 255, .3); border-radius: 50%;
    background: var(--accent-deep); color: var(--accent); font-size: 16px; font-weight: 600;
}
.se-person, .se-body { min-width: 0; overflow-wrap: anywhere; }
.se-name { font-size: 17px; font-weight: 600; color: var(--text-high); }
.se-email, .se-mono { font-family: var(--mono); }
.se-email, .se-detail { margin-top: 3px; font-size: 12.5px; color: var(--text-muted); }

.se-section { border-top: 1px solid var(--hairline); padding: 18px 0 6px; }
.se-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 6px; }
.se-head h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-high); }
.se-head > span { font-size: 12.5px; color: var(--text-faint); }
.se-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.se-row[hidden] { display: none; }
.se-row + .se-row { border-top: 1px solid var(--hairline); }
.se-body { flex: 1; }
.se-label { font-size: 13px; color: var(--text-high); }
.se-row .btn { flex: none; }
.se-inline { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; max-width: 60%; }
.se-inline input {
    box-sizing: border-box; width: 280px; min-width: 0; height: 30px; padding: 0 12px;
    background: var(--surface-sunk); border: 1px solid var(--hairline-strong); border-radius: var(--radius-control);
    color: var(--text-high); font: inherit; font-size: 13px;
}
.se-inline input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.se-icon {
    display: grid; place-items: center; flex: none; width: 30px; height: 30px;
    border: 1px solid var(--hairline-strong); border-radius: 7px; color: var(--text-body);
}
.se-state, .se-when { font-size: 12px; color: var(--text-muted); }
.se-state, .se-tag { margin-left: 4px; }
.se-tag { display: inline-block; padding: 1px 6px; border: 1px solid var(--hairline-strong); border-radius: 4px; font-size: 11px; color: var(--text-muted); }
.se-when { flex: none; text-align: right; }
.se-empty { margin: 0; padding: 12px 0; font-size: 12.5px; color: var(--text-faint); }

.se-page .modal-body input, .se-page .modal .btn { box-sizing: border-box; height: 38px; padding: 0 12px; font-size: 13px; }
.se-page .modal-body .code-cells input { padding: 0; }
.se-recovery-value { margin: 12px 0; padding: 12px 0; border-block: 1px solid var(--hairline); font: 17px var(--mono); letter-spacing: .05em; color: var(--text-high); overflow-wrap: anywhere; }
.se-recovery-tools { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 560px) {
    .se-name-row { flex-wrap: wrap; row-gap: 8px; }
    .se-name-row .se-body { flex-basis: 100%; }
    .se-inline { flex: 1; max-width: none; }
    .se-row { column-gap: 10px; }
}

/* ---- Requests (redesign, nico 12-03): range in the topbar, endpoint under the
   model, status as a dot and a word, the drawer titled by the model ---- */
.rq-range {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px;
    height: 38px; box-sizing: border-box; padding: 3px;
    border-color: var(--hairline-strong); border-radius: var(--radius-control);
}
.rq-range .range-opt { padding: 0 12px; font-size: 13px; border-radius: 4px; }
.rq-export.btn { height: 38px; padding: 0 12px; font-size: 13px; }

.rq-toolbar { padding: 12px 16px; }
.rq-toolbar .search { flex: 1 1 180px; min-width: min(180px, 100%); max-width: 300px; }
.rq-toolbar .search > svg { left: 12px; }
.rq-toolbar .search input { height: 38px; padding: 0 12px 0 34px; font-size: 13px; background: var(--surface-sunk); }
.rq-filter {
    justify-content: space-between; gap: 12px; min-width: min(168px, 100%); max-width: min(300px, 100%);
    height: 38px; padding: 0 12px; font-size: 13px;
}
.rq-filter::after {
    content: ""; flex: none; width: 7px; height: 7px; margin-right: 2px;
    border: solid var(--text-faint); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg);
}
.rq-filter-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; color: var(--text-faint); }
.rq-filter-text .dd-value { display: inline; margin-left: 3px; color: var(--text-body); }
.rq-filter.rq-set { border-color: #3a3b42; }
.rq-set .dd-value { color: var(--text-high); }
.rq-clear { appearance: none; height: 38px; padding: 0 12px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.rq-clear:hover { color: var(--text-high); }
.rq-count { margin-left: auto; font-size: 12.5px; color: var(--text-faint); white-space: nowrap; }
.rq-count b { font-family: var(--mono); font-weight: 500; color: var(--text-body); }
.rq-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }

/* nico 12-03: a one-line cell is centred against the two-line ones in its row */
.rq-table .clickable td { vertical-align: middle; padding-top: 10px; padding-bottom: 10px; font-size: 12px; }
.rq-table .rq-model { align-self: flex-start; font-size: 12.5px; color: var(--text-high); }
.rq-table .rq-model:hover { text-decoration: underline; }
.rq-table .rq-key { color: var(--text-muted); }
.rq-table .fault-sub { margin-top: 2px; font-size: 11px; }
.rq-id { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }
.rq-open-id { appearance: none; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.rq-copy { align-items: center; justify-content: center; width: 20px; height: 20px; color: var(--text-muted); }
@media (hover: hover) {
    .rq-copy { opacity: 0; }
    .rq-table tr:hover .rq-copy, .rq-table tr:focus-within .rq-copy { opacity: 1; }
}

.rq-table .pill, .rq-drawer .pill {
    height: auto; gap: 7px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 12.5px;
}
.rq-table .pill::before, .rq-drawer .pill::before { width: 6px; height: 6px; }
.rq-table .pill-green, .rq-drawer .pill-green { color: var(--text-body); }
.rq-table .pill-green::before, .rq-drawer .pill-green::before { background: var(--green); }
.rq-table .pill-grey, .rq-drawer .pill-grey { color: var(--text-muted); }
.rq-table .pill-grey::before, .rq-drawer .pill-grey::before { background: var(--text-faint); }

.rq-drawer .drawer-head h3 { font-size: 15px; color: var(--text-high); }
.rq-drawer .drawer-head .sub { font-size: 11.5px; color: var(--text-faint); }
.rq-id-row {
    display: flex; align-items: center; gap: 10px; min-height: 34px; margin-top: 14px; padding-left: 12px;
    border: 1px solid var(--hairline-strong); border-radius: var(--radius-control);
}
.rq-id-row .mono { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; color: var(--text-body); }
.rq-id-row .btn {
    flex: none; align-self: stretch; height: auto; padding: 0 12px; border: 0; border-left: 1px solid var(--hairline-strong);
    border-radius: 0 var(--radius-control) var(--radius-control) 0; background: none; color: var(--text-muted);
}
.rq-id-row .btn:hover { color: var(--text-high); }
.rq-drawer .drawer-body { padding: 0; }
.rq-drawer .drawer-section { padding: 16px 22px; }
.rq-drawer .drawer-section:has(> .rq-facts) { padding: 0; }
.rq-drawer .section-title { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: .02em; text-transform: none; margin-bottom: 10px; }
.rq-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.rq-facts > div { padding: 12px 22px; }
.rq-facts > div:nth-child(odd) { border-right: 1px solid var(--hairline); }
.rq-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--hairline); }
.rq-facts dt { font-size: 11.5px; color: var(--text-faint); }
.rq-facts dd { margin: 4px 0 0; font-family: var(--mono); font-size: 13px; color: var(--text-high); overflow-wrap: anywhere; }

.rq-bar { display: flex; gap: 2px; height: 6px; overflow: hidden; margin-bottom: 8px; border-radius: 3px; }
.rq-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; font-size: 11.5px; color: var(--text-faint); }
.rq-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.rq-cached { background: rgba(130, 143, 255, .35); }
.rq-new { background: var(--accent); }
.rq-output { background: var(--text-body); }
.rq-share { margin-right: 4px; font-size: 11.5px; color: var(--text-faint); }
.rq-total { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.rq-error { display: grid; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--danger); }
.rq-category { font-family: var(--mono); font-size: 12px; color: var(--danger); }
.rq-drawer .drawer-note { margin: 0; padding: 14px 22px; border: 0; border-radius: 0; background: none; color: var(--text-faint); }
.rq-drawer .drawer-note svg { display: none; }
