:root {
    color-scheme: dark;
    --bg-0: #071018;
    --bg-1: #0b1620;
    --bg-2: #101d28;
    --bg-3: #142532;
    --line: #223746;
    --line-strong: #315064;
    --text-0: #e6f0f4;
    --text-1: #9bb0bc;
    --text-2: #6f8794;
    --cyan: #56c7e8;
    --cyan-dim: #173a49;
    --green: #61d69b;
    --amber: #f0b85a;
    --red: #ff7c79;
    --brand-bg: #1c2130;
    --brand-panel: #2a3144;
    --brand-blue: #6b95f0;
    --brand-muted: #9aa3b8;
    --font-body: "Bahnschrift", "Aptos", "Segoe UI", system-ui, sans-serif;
    --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
    min-height: 100%;
    margin: 0;
    background: var(--bg-0);
    color: var(--text-0);
    font-family: var(--font-body);
    font-size: 15px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background-image:
        linear-gradient(rgba(86, 199, 232, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(86, 199, 232, .018) 1px, transparent 1px);
    background-size: 32px 32px;
}

button, input, select { font: inherit; }
a { color: var(--cyan); }

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    left: 8px;
    top: -100px;
    z-index: 100;
    padding: .55rem .8rem;
    background: var(--cyan);
    color: #031016;
    font-weight: 700;
}

.skip-link:focus { top: 8px; }

.app-header {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: stretch;
    min-height: 58px;
    background: rgba(7, 16, 24, .98);
    border-bottom: 1px solid var(--line-strong);
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 220px;
    padding: 0 1rem;
    border-right: 1px solid var(--line);
}

.app-header__logo {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    height: 34px;
    padding: 4px 8px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .24);
}

.app-header__logo img {
    display: block;
    width: 86px;
    height: auto;
}

.app-header__brand > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-header__name {
    font-family: var(--font-mono);
    font-size: .84rem;
    font-weight: 750;
    letter-spacing: .1em;
}

.app-header__brand small {
    color: var(--text-2);
    font-size: .67rem;
    letter-spacing: .14em;
}

.app-header__nav {
    display: flex;
    align-items: stretch;
}

.app-header__nav a {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 102px;
    padding: 0 1rem;
    color: var(--text-1);
    font-size: .76rem;
    font-weight: 650;
    letter-spacing: .07em;
    text-decoration: none;
    text-transform: uppercase;
}

.app-header__nav a:hover,
.app-header__nav a[aria-current="page"] { color: var(--text-0); background: var(--bg-1); }
.app-header__nav a[aria-current="page"]::after {
    position: absolute;
    inset: auto 14px -1px;
    height: 2px;
    background: var(--cyan);
    content: "";
}

.app-header__clock,
.app-header__status,
.app-header__account {
    display: flex;
    align-items: center;
    border-left: 1px solid var(--line);
}

.app-header__clock {
    gap: .55rem;
    padding: 0 1rem;
    color: var(--text-2);
    font-family: var(--font-mono);
    font-size: .7rem;
}

.app-header__clock time { color: var(--text-0); font-size: .82rem; }

.app-header__status {
    gap: .5rem;
    padding: 0 .9rem;
    color: var(--text-1);
    font-family: var(--font-mono);
    font-size: .72rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: var(--text-2);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(111, 135, 148, .1);
}
.status-dot--connected { background: var(--green); box-shadow: 0 0 0 3px rgba(97, 214, 155, .1); }
.status-dot--reconnecting { background: var(--amber); box-shadow: 0 0 0 3px rgba(240, 184, 90, .1); }
.status-dot--disconnected { background: var(--red); box-shadow: 0 0 0 3px rgba(255, 124, 121, .1); }

.app-header__account {
    gap: .7rem;
    padding: 0 .8rem;
}
.app-header__user {
    max-width: 170px;
    overflow: hidden;
    color: var(--text-1);
    font-size: .67rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.button {
    min-height: 32px;
    padding: .4rem .8rem;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: var(--bg-2);
    color: var(--text-0);
    cursor: pointer;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.button:hover { border-color: var(--cyan); color: var(--cyan); }
.button--primary { border-color: var(--cyan); background: var(--cyan); color: #061219; }
.button--ghost, .button--quiet { background: transparent; }

main {
    flex: 1 1 auto;
    min-height: 0;
    width: min(100%, 1920px);
    margin: 0 auto;
    padding: 14px 16px 22px;
}

.app-footer {
    flex: 0 0 auto;
    padding: .65rem 1rem;
    border-top: 1px solid var(--line);
    color: var(--text-2);
    font-family: var(--font-mono);
    font-size: .67rem;
    text-align: center;
}

.eyebrow {
    display: block;
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.market-strip {
    display: grid;
    grid-template-columns: minmax(180px, 1.35fr) repeat(5, minmax(125px, 1fr));
    border: 1px solid var(--line);
    border-top: 2px solid var(--line-strong);
    background: var(--bg-1);
}

.market-strip[data-freshness="Live"] { border-top-color: var(--green); }
.market-strip[data-freshness="Delayed"] { border-top-color: var(--amber); }
.market-strip[data-freshness="Stale"],
.market-strip[data-freshness="Unavailable"] { border-top-color: var(--red); }

.market-strip__lead,
.market-metric {
    min-height: 62px;
    padding: .72rem .85rem;
    border-right: 1px solid var(--line);
}
.market-strip__lead {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(90deg, rgba(86, 199, 232, .08), transparent);
}
.market-strip__session { margin-top: .28rem; font-family: var(--font-mono); font-size: .92rem; }
.market-metric { display: flex; flex-direction: column; justify-content: center; gap: .22rem; }
.market-metric:last-child { border-right: 0; }
.market-metric .label {
    color: var(--text-2);
    font-size: .67rem;
    font-weight: 650;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.market-metric .value { font-size: .78rem; font-weight: 600; }
.market-metric .value--muted { color: var(--text-1); }
.market-metric--warning { color: var(--amber); }
.market-strip > .market-metric--warning {
    grid-column: 1 / -1;
    min-height: 40px;
    border-top: 1px solid rgba(240, 184, 90, .35);
    border-right: 0;
    border-left: 3px solid var(--amber);
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.status-label {
    width: fit-content;
    padding: 2px 5px;
    border: 1px solid var(--line-strong);
    color: var(--text-1);
    font-family: var(--font-mono);
    font-size: .67rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.status-label--live { border-color: rgba(97, 214, 155, .45); color: var(--green); }
.status-label--delayed { border-color: rgba(240, 184, 90, .45); color: var(--amber); }
.status-label--stale, .status-label--unavailable { border-color: rgba(255, 124, 121, .45); color: var(--red); }

.workspace-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 0 .7rem;
}
.workspace-heading h1 {
    margin: .15rem 0 0;
    font-size: 1.55rem;
    font-stretch: condensed;
    font-weight: 650;
    letter-spacing: -.025em;
}
.snapshot-stamp {
    display: flex;
    gap: 1rem;
    color: var(--text-2);
    font-family: var(--font-mono);
    font-size: .67rem;
}
.snapshot-stamp strong { color: var(--text-0); }

.workstation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    min-height: 0;
    border: 1px solid var(--line);
    background: var(--bg-1);
}
.tape-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.page-index {
    height: 100dvh;
    overflow: hidden;
}
.page-index main {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    overflow: hidden;
}
.page-index .market-strip,
.page-index .workspace-heading { flex: 0 0 auto; }
.page-index .workstation { flex: 1 1 0; }

.worklist-controls {
    display: flex;
    align-items: end;
    gap: .55rem;
    min-height: 56px;
    padding: .55rem .65rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
}
.worklist-controls label:not(.search-control) {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.worklist-controls label > span {
    color: var(--text-2);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.worklist-controls input,
.worklist-controls select {
    height: 32px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: var(--bg-0);
    color: var(--text-0);
    font-size: .74rem;
}
.worklist-controls select { min-width: 112px; padding: 0 1.6rem 0 .5rem; }
.search-control {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 220px;
}
.search-control input { width: 100%; padding: 0 2rem 0 1.8rem; }
.search-control__icon { position: absolute; left: .55rem; color: var(--cyan) !important; font-size: 1rem !important; }
kbd {
    padding: 1px 4px;
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: 2px;
    background: var(--bg-0);
    color: var(--text-1);
    font-family: var(--font-mono);
    font-size: .67rem;
}
.search-control kbd { position: absolute; right: .45rem; }
.result-count {
    margin: 0 .2rem .45rem auto;
    color: var(--text-1);
    font-family: var(--font-mono);
    font-size: .68rem;
    white-space: nowrap;
}

.table-scroll { overflow: auto; border: 1px solid var(--line); }
.table-scroll--worklist {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    border: 0;
}

.worklist-table,
.diagnostics-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--font-mono);
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
}
.worklist-table th,
.worklist-table td,
.diagnostics-table th,
.diagnostics-table td {
    padding: .5rem .65rem;
    border-right: 1px solid rgba(34, 55, 70, .58);
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}
.worklist-table thead th,
.diagnostics-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    height: 35px;
    padding-top: .45rem;
    padding-bottom: .45rem;
    background: #0c1923;
    color: var(--text-2);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.worklist-table thead th[data-sort] { cursor: pointer; user-select: none; }
.worklist-table thead th[data-sort]:hover { color: var(--cyan); }
.worklist-table thead th[aria-sort="ascending"]::after { color: var(--cyan); content: " ↑"; }
.worklist-table thead th[aria-sort="descending"]::after { color: var(--cyan); content: " ↓"; }
.worklist-table tbody tr { cursor: pointer; transition: background-color 80ms ease; }
.worklist-table tbody tr:nth-child(even) { background: rgba(16, 29, 40, .35); }
.worklist-table tbody tr:hover { background: var(--bg-3); }
.worklist-table tbody tr[aria-selected="true"] {
    background: var(--cyan-dim);
    box-shadow: inset 3px 0 var(--cyan);
}
.worklist-table tbody tr[hidden] { display: none; }
.worklist-table .rank-column { width: 46px; color: var(--text-2); text-align: right; }
.worklist-table .ticker-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 100px;
    background: #0d1923;
    color: var(--text-0);
    font-size: .82rem;
}
.worklist-table tr[aria-selected="true"] .ticker-cell { background: #163847; }
.ticker-cell span, .ticker-cell small { display: block; }
.ticker-cell small { margin-top: 2px; color: var(--text-2); font-size: .67rem; font-weight: 400; }
.worklist-table tr[aria-selected="true"] .ticker-cell small { color: var(--text-1); }
.worklist-table th.numeric,
.worklist-table td.numeric,
.diagnostics-table th.numeric,
.diagnostics-table td.numeric,
.diagnostics-summary .numeric { text-align: right; }
.disposition-label { color: var(--cyan); font-weight: 700; }
.evidence-cell {
    max-width: 250px;
    overflow: hidden;
    color: var(--text-1);
    text-overflow: ellipsis;
}
.evidence-cell--contrary { color: var(--amber); }
.filtered-empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: .4rem;
    min-height: 260px;
    color: var(--text-1);
}
.filtered-empty strong { color: var(--text-0); font-size: .9rem; }
.filtered-empty[hidden] { display: none; }

.inspector {
    min-height: 0;
    overflow-y: auto;
    border-left: 1px solid var(--line-strong);
    background: #0a151e;
}
.inspector__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    min-height: 82px;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(86, 199, 232, .09), transparent 62%);
}
.inspector__header h2 { margin: .2rem 0 0; font-family: var(--font-mono); font-size: 1.45rem; }
.inspector__facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
    border-bottom: 1px solid var(--line);
}
.inspector__facts div { padding: .7rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inspector__facts div:nth-child(even) { border-right: 0; }
.inspector dt, .lineage-list dt {
    color: var(--text-2);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.inspector dd { margin: .25rem 0 0; color: var(--text-0); font-family: var(--font-mono); font-size: .72rem; }
.inspector__section { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.inspector__section h3 { margin: 0 0 .45rem; color: var(--text-1); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.inspector__section p { margin: 0; color: var(--text-0); font-size: .76rem; line-height: 1.55; }
.inspector__section--contrary { border-left: 2px solid var(--amber); }
.inspector__section--contrary p { color: #d9c19a; }
.lineage-list { display: grid; gap: .5rem; margin: 0; }
.lineage-list div { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
.lineage-list dd { color: var(--text-1); text-align: right; }
.inspector__hint { margin: .85rem 1rem; color: var(--text-2); font-size: .68rem; }
.inspector[data-empty="true"] .inspector__facts,
.inspector[data-empty="true"] .inspector__section { display: none; }
.inspector[data-empty="true"] .inspector__header { opacity: .72; }

.state-panel {
    position: relative;
    max-width: 760px;
    margin: 11vh auto;
    padding: 2.5rem;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-left: 3px solid var(--amber);
    background: var(--bg-1);
}
.state-panel::after {
    position: absolute;
    right: -42px;
    top: -42px;
    width: 130px;
    height: 130px;
    border: 1px solid rgba(86, 199, 232, .12);
    content: "";
    transform: rotate(45deg);
}
.state-panel__code { color: var(--amber); font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; }
.state-panel h1 { max-width: 580px; margin: .75rem 0; font-size: 2rem; letter-spacing: -.03em; }
.state-panel p { max-width: 630px; color: var(--text-1); line-height: 1.65; }
.text-link { display: inline-block; margin-top: .7rem; font-weight: 700; text-decoration: none; }

.page-account-login {
    min-height: 100dvh;
    overflow-x: hidden;
    background: var(--brand-bg);
    color: #eef1f7;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

.page-account-login main {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.login-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
        radial-gradient(ellipse 90% 55% at 40% -5%, rgba(100, 140, 230, .18), transparent 58%),
        radial-gradient(ellipse 55% 45% at 100% 25%, rgba(150, 100, 210, .12), transparent 52%),
        radial-gradient(ellipse 45% 40% at 0% 75%, rgba(70, 100, 180, .12), transparent 50%),
        linear-gradient(180deg, #222836 0%, #1c2130 28%, #181d2a 100%);
    background-size: 64px 64px, 64px 64px, auto, auto, auto, auto;
}

.login-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(100% - 2.5rem, 720px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: 1rem 0 1.15rem;
}

.login-header {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-bottom: .65rem;
}

.login-header-link {
    border-bottom: 1px solid transparent;
    color: var(--brand-muted);
    font-size: .8125rem;
    font-weight: 500;
    text-decoration: none;
}
.login-header-link:hover { border-bottom-color: rgba(255, 255, 255, .2); color: #eef1f7; }
.login-header-link:focus-visible { outline-color: var(--brand-blue); }

.login-main {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: calc(.55rem + 10px);
    width: 100%;
    padding-top: .15rem;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    padding: .7rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 10px 28px rgba(0, 0, 0, .2), 0 2px 6px rgba(0, 0, 0, .08);
}
.login-brand img { display: block; width: min(288px, 50vw); max-width: 100%; height: auto; }
.login-brand:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 4px; }

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 1.55rem 1.45rem 1.45rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, .06) 0%, transparent 42%),
        linear-gradient(180deg, rgba(52, 60, 82, .88) 0%, rgba(36, 42, 58, .94) 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 20px 50px rgba(0, 0, 0, .28), 0 4px 14px rgba(0, 0, 0, .16);
    backdrop-filter: blur(14px);
}

.login-card-head { margin-bottom: 1.25rem; }
.login-card-eyebrow {
    margin: 0 0 .35rem;
    color: #8b94a8;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.login-card h1 { margin: 0; color: #e8ecf4; font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em; }
.login-card-sub { margin: .4rem 0 0; color: #8b94a8; font-size: .875rem; line-height: 1.5; }
.login-form { display: flex; flex-direction: column; gap: .95rem; }
.login-field label {
    display: block;
    margin-bottom: .4rem;
    color: #b0b8c8;
    font-size: .8125rem;
    font-weight: 550;
}
.login-field input {
    width: 100%;
    min-height: 2.85rem;
    padding: .7rem .9rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    outline: none;
    background: rgba(12, 16, 28, .45);
    color: #eef1f7;
    font-size: .9375rem;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.login-field input:hover { border-color: rgba(255, 255, 255, .18); }
.login-field input:focus {
    border-color: rgba(107, 149, 240, .65);
    background: rgba(12, 16, 28, .55);
    box-shadow: 0 0 0 3px rgba(107, 149, 240, .18);
}
.login-submit {
    width: 100%;
    min-height: 2.95rem;
    margin-top: .15rem;
    border-color: var(--brand-blue);
    border-radius: 10px;
    background: var(--brand-blue);
    color: #101625;
    font-size: .9375rem;
    text-transform: none;
}
.login-submit:hover { border-color: #8aacfa; background: #7da3f4; color: #0c1220; }
.field-validation, .validation-summary { color: #f0b4b4; font-size: .8125rem; line-height: 1.5; }
.field-validation:empty { display: none; }
.validation-summary { margin: 0 0 .9rem; }
.validation-summary ul { margin: 0; padding: .65rem .75rem; border: 1px solid rgba(239, 100, 100, .35); border-radius: 8px; background: rgba(239, 100, 100, .08); list-style: none; }
.validation-summary-valid { display: none; }
.login-card-foot { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.login-card-foot p { margin: 0; color: #8b94a8; font-size: .8125rem; line-height: 1.55; }
.login-card-foot .login-secure-line {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .75rem;
    color: #6f788c;
    font-size: .75rem;
}
.login-lock { display: inline-flex; color: #7e879c; }
.login-lock svg { width: 14px; height: 14px; }
.login-footer {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}
.login-footer-copy { margin: 0; color: #7e879c; font-size: .72rem; line-height: 1.45; text-align: center; }
.login-footer-brand { display: block; flex: 0 0 auto; line-height: 0; opacity: .78; }
.login-footer-brand img { width: 30px; height: 30px; }

.diagnostics-heading { align-items: center; padding-top: .65rem; }
.diagnostics-heading p { margin: .3rem 0 0; color: var(--text-1); font-size: .8rem; }
.diagnostics-empty { margin-top: 7vh; }
.diagnostics-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    margin-bottom: .8rem;
    border: 1px solid var(--line);
    border-top: 2px solid var(--cyan);
    background: var(--bg-1);
}
.diagnostics-summary > div {
    display: flex;
    min-height: 54px;
    flex-direction: column;
    justify-content: center;
    gap: .3rem;
    padding: .6rem .8rem;
    border-right: 1px solid var(--line);
}
.diagnostics-summary > div:last-child { border-right: 0; }
.diagnostics-summary .label,
.panel-count {
    color: var(--text-2);
    font-family: var(--font-mono);
    font-size: .67rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.diagnostics-summary strong { font-family: var(--font-mono); font-size: .8rem; }
.diagnostics-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
}
.diagnostics-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-1);
}
.diagnostics-panel--wide { grid-column: 1 / -1; }
.diagnostics-panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    gap: 1rem;
    padding: .65rem .8rem;
    border-bottom: 1px solid var(--line-strong);
    background: linear-gradient(90deg, rgba(86, 199, 232, .065), transparent 45%);
}
.diagnostics-panel--errors > header {
    background: linear-gradient(90deg, rgba(255, 124, 121, .06), transparent 45%);
}
.diagnostics-panel h2 { margin: .18rem 0 0; font-size: 1rem; font-weight: 650; }
.diagnostics-panel .table-scroll { border: 0; }
.diagnostics-table th,
.diagnostics-table td { height: 36px; }
.diagnostics-table tbody tr:nth-child(even) { background: rgba(16, 29, 40, .35); }
.diagnostics-table tbody tr:hover { background: var(--bg-3); }
.diagnostics-table-scroll { max-height: 300px; }
.table-empty {
    height: 82px !important;
    color: var(--text-2);
    text-align: center !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1180px) {
    .app-header { grid-template-columns: auto auto 1fr auto auto; }
    .market-strip { grid-template-columns: repeat(3, 1fr); }
    .market-strip__lead { grid-row: span 2; }
    .workstation { grid-template-columns: minmax(0, 1fr) 300px; }
    .worklist-controls { flex-wrap: wrap; }
    .result-count { margin-left: 0; }
}

@media (max-width: 820px) {
    .app-header { grid-template-columns: minmax(0, 1fr) auto auto auto; }
    .app-header__brand { min-width: 0; border-right: 0; }
    .app-header__nav { grid-row: 2; grid-column: 1 / -1; border-top: 1px solid var(--line); }
    .app-header__nav a { min-height: 40px; }
    .app-header__clock { padding: 0 .65rem; }
    .app-header__status { display: flex; padding: 0 .65rem; }
    .app-header__user { display: none; }
    .market-strip { grid-template-columns: repeat(2, 1fr); }
    .market-strip__lead { grid-row: auto; }
    .workspace-heading { align-items: start; }
    .snapshot-stamp { flex-direction: column; gap: .2rem; text-align: right; }
    .page-index { height: auto; min-height: 100dvh; overflow: auto; }
    .page-index main { flex: 1 0 auto; overflow: visible; }
    .workstation { display: block; }
    .inspector { border-top: 1px solid var(--line-strong); border-left: 0; }
    .table-scroll--worklist { height: 460px; min-height: 0; }
    .worklist-controls { align-items: stretch; }
    .search-control { width: 100%; }
    .diagnostics-summary { grid-template-columns: repeat(3, 1fr); }
    .diagnostics-summary > div { border-bottom: 1px solid var(--line); }
    .diagnostics-layout { grid-template-columns: 1fr; }
    .diagnostics-panel--wide { grid-column: auto; }
}

@media (max-width: 540px) {
    main { padding-inline: 8px; }
    .app-header__brand { gap: .5rem; padding-inline: .6rem; }
    .app-header__logo { padding-inline: 6px; }
    .app-header__logo img { width: 64px; }
    .app-header__brand small { display: none; }
    .app-header__clock { gap: .25rem; padding-inline: .4rem; }
    .app-header__clock > span { display: none; }
    .app-header__status { padding-inline: .55rem; }
    .app-header__status .status-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .app-header__account { padding-inline: .4rem; }
    .market-strip { grid-template-columns: 1fr 1fr; }
    .market-strip__lead { grid-column: 1 / -1; }
    .workspace-heading { display: block; }
    .snapshot-stamp { margin-top: .6rem; text-align: left; }
    .worklist-controls label:not(.search-control) { width: calc(50% - .3rem); }
    .worklist-controls select { width: 100%; }
    .result-count { width: 100%; margin: .25rem 0; }
    .diagnostics-summary { grid-template-columns: 1fr 1fr; }
    .login-shell { width: min(100% - 2rem, 720px); padding: 1.25rem 0 1.75rem; }
    .login-brand { padding: .85rem 1rem; }
    .login-brand img { width: min(268px, 100%); }
    .login-card { padding: 1.4rem 1.2rem 1.3rem; }
}

@media (max-height: 820px) {
    .login-shell { padding-top: .75rem; padding-bottom: .85rem; }
    .login-header { margin-bottom: .5rem; }
    .login-main { gap: calc(.4rem + 10px); }
    .login-brand { padding: .5rem .95rem; }
    .login-brand img { width: min(260px, 42vw); }
    .login-card { padding: 1.15rem 1.25rem 1.1rem; }
    .login-card-head { margin-bottom: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
    }
}
