:root {
    color-scheme: dark;
    --bg: #070b12;
    --panel: #0e1521;
    --panel-2: #111b2a;
    --line: #223047;
    --line-soft: #172338;
    --text: #eef4ff;
    --muted: #8796ab;
    --accent: #45d6b2;
    --accent-strong: #66f1cd;
    --blue: #5c9dff;
    --warning: #f4be5b;
    --danger: #ff667d;
    --success: #45d6b2;
    --shadow: 0 18px 48px rgb(0 0 0 / 24%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% -10%, rgb(69 214 178 / 10%), transparent 28rem),
        radial-gradient(circle at 90% 4%, rgb(92 157 255 / 8%), transparent 26rem),
        var(--bg);
}

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

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 72px;
    padding: 0 34px;
    border-bottom: 1px solid rgb(34 48 71 / 72%);
    background: rgb(7 11 18 / 88%);
    backdrop-filter: blur(18px);
}

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

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgb(69 214 178 / 45%);
    border-radius: 10px;
    color: var(--accent-strong);
    background: rgb(69 214 178 / 10%);
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    letter-spacing: .01em;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.main-nav a {
    padding: 10px 13px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 14px;
    transition: color .15s ease, background .15s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--text);
    background: var(--panel-2);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.language-switch {
    display: inline-flex;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.language-switch button {
    border: 0;
    padding: 5px 8px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    border-radius: 7px;
}

.language-switch button.is-active {
    color: var(--accent);
    background: rgba(69, 214, 178, 0.12);
}

.user-menu form {
    margin: 0;
}

.page-shell {
    width: min(1540px, calc(100% - 48px));
    margin: 0 auto;
    padding: 44px 0 64px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 7px;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 720;
    letter-spacing: -.035em;
}

h2 {
    margin-bottom: 14px;
    font-size: 20px;
    letter-spacing: -.02em;
}

h3 {
    margin: 24px 0 10px;
    font-size: 14px;
    letter-spacing: .01em;
}

.eyebrow {
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
}

.muted {
    color: var(--muted);
}

.page-heading .muted,
.compact-panel .muted {
    margin-bottom: 0;
}

.panel,
.metric-card,
.login-card {
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: linear-gradient(145deg, rgb(17 27 42 / 92%), rgb(12 19 30 / 96%));
    box-shadow: var(--shadow);
}

.panel {
    padding: 22px;
}

.panel + .panel {
    margin-top: 18px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-heading h2,
.panel-heading p {
    margin-bottom: 0;
}

.content-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.content-grid .panel + .panel {
    margin-top: 0;
}

.content-grid-main {
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr);
}

.content-grid-thirds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    padding: 19px 20px;
}

.metric-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgb(92 157 255 / 65%), transparent);
    content: "";
}

.metric-card > span,
.metric-card > small,
.metric-card > strong {
    display: block;
}

.metric-card > span {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.metric-card > strong {
    margin: 13px 0 5px;
    font-size: 27px;
    font-variant-numeric: tabular-nums;
}

.metric-card > small {
    color: var(--muted);
}

.metric-positive > strong {
    color: var(--success);
}

.metric-negative > strong {
    color: var(--danger);
}

.value-positive {
    color: var(--success);
}

.value-negative {
    color: var(--danger);
}

.status-cluster {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.status-pill,
.tag,
.decision {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.status-pill {
    gap: 7px;
    padding: 8px 11px;
    color: var(--muted);
    font-size: 10px;
}

.status-pill::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.status-pill.is-online {
    border-color: rgb(69 214 178 / 25%);
    color: var(--success);
    background: rgb(69 214 178 / 7%);
}

.status-pill.is-offline {
    border-color: rgb(255 102 125 / 23%);
    color: var(--danger);
    background: rgb(255 102 125 / 6%);
}

.status-pill.is-warning {
    border-color: rgb(244 190 91 / 28%);
    color: var(--warning);
    background: rgb(244 190 91 / 7%);
}

.decision-row {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}

.decision {
    padding: 9px 13px;
    border-color: rgb(244 190 91 / 30%);
    color: var(--warning);
    background: rgb(244 190 91 / 9%);
    font-size: 12px;
}

.decision-enter_long,
.decision-buy {
    border-color: rgb(69 214 178 / 30%);
    color: var(--success);
    background: rgb(69 214 178 / 9%);
}

.decision-enter_short,
.decision-sell {
    border-color: rgb(255 102 125 / 30%);
    color: var(--danger);
    background: rgb(255 102 125 / 9%);
}

.confidence {
    color: var(--muted);
    font-size: 13px;
}

.trade-levels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.trade-levels > div {
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: rgb(5 10 17 / 35%);
}

.trade-levels span,
.trade-levels strong {
    display: block;
}

.trade-levels span {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}

.trade-levels strong {
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.analysis-copy,
.prose-panel p {
    color: #c2cee0;
    line-height: 1.7;
    white-space: pre-line;
}

.text-link {
    color: var(--accent);
    font-size: 13px;
    font-weight: 650;
}

.text-link:hover,
.text-link:focus-visible {
    color: var(--accent-strong);
}

.inline-warning {
    margin-bottom: 16px;
    padding: 11px 13px;
    border: 1px solid rgb(244 190 91 / 24%);
    border-radius: 9px;
    color: #e6cb93;
    background: rgb(244 190 91 / 7%);
    font-size: 12px;
    line-height: 1.55;
}

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

.mono-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    word-break: break-all;
}

.reliability-table {
    margin-top: 18px;
}

.data-list {
    margin: 0;
}

.data-list > div {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-soft);
}

.data-list > div:last-child {
    border-bottom: 0;
}

.data-list dt {
    color: var(--muted);
}

.data-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.compact-panel h2 {
    margin-bottom: 8px;
}

.compact-panel .text-link {
    display: inline-block;
    margin-top: 17px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text);
    background: transparent;
    font-weight: 650;
}

.button-primary {
    color: #07110e;
    background: var(--accent);
}

.button-primary:hover,
.button-primary:focus-visible {
    background: var(--accent-strong);
}

.button-ghost {
    border-color: var(--line);
    color: #b8c5d8;
    background: rgb(17 27 42 / 50%);
}

.button-ghost:hover,
.button-ghost:focus-visible {
    border-color: #3b506e;
    color: var(--text);
}

.notice {
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid rgb(92 157 255 / 24%);
    border-radius: 10px;
    color: #bed5f7;
    background: rgb(92 157 255 / 8%);
}

.notice-error {
    border-color: rgb(255 102 125 / 25%);
    color: #ffb2bf;
    background: rgb(255 102 125 / 7%);
}

.notice-warning {
    border-color: rgb(244 190 91 / 25%);
    color: #ead19c;
    background: rgb(244 190 91 / 7%);
}

.analysis-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgb(8 13 22 / 65%);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.analysis-status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.analysis-status-current {
    border-color: rgb(69 214 178 / 28%);
    color: var(--success);
    background: rgb(69 214 178 / 7%);
}

.analysis-status-previous,
.analysis-status-pending {
    border-color: rgb(244 190 91 / 28%);
    color: var(--warning);
    background: rgb(244 190 91 / 7%);
}

.analysis-status-unavailable {
    border-color: rgb(255 102 125 / 25%);
    color: var(--danger);
}

.market-freshness {
    margin: -6px 0 10px;
}

.filter-form,
.timeframe-switch {
    display: flex;
    gap: 7px;
}

.market-heading-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.instrument-badge,
.instrument-switch select {
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--accent);
    padding: 9px 12px;
    font: inherit;
    font-weight: 700;
    letter-spacing: .04em;
}

select,
input {
    border: 1px solid var(--line);
    border-radius: 9px;
    outline: none;
    color: var(--text);
    background: #0b121e;
}

select {
    min-height: 38px;
    padding: 8px 34px 8px 11px;
}

input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
}

select:focus,
input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(69 214 178 / 10%);
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.table-panel > .panel-heading {
    padding: 20px 22px 0;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    background: rgb(6 11 18 / 35%);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

tbody tr:hover {
    background: rgb(92 157 255 / 3%);
}

.empty-cell {
    padding: 42px 16px;
    color: var(--muted);
    text-align: center;
}

.tag {
    padding: 5px 8px;
    color: #a9bdd8;
    background: rgb(92 157 255 / 6%);
    font-size: 9px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 16px;
}

.pagination a {
    color: var(--accent);
    font-size: 18px;
}

.position-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
}

.position-card span {
    color: var(--muted);
    font-size: 13px;
}

.reason-list {
    margin: 0;
    padding-left: 20px;
    color: #c2cee0;
    line-height: 1.65;
}

.raw-json {
    margin-top: 18px;
}

.raw-json summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 650;
}

.raw-json pre {
    max-height: 620px;
    margin: 18px -4px 0;
    padding: 16px;
    overflow: auto;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    color: #b8c7db;
    background: #070b12;
    font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.empty-state {
    display: grid;
    min-height: 300px;
    place-items: center;
    text-align: center;
}

.empty-state > div {
    max-width: 520px;
}

.chart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
}

.chart-layout .panel + .panel {
    margin-top: 0;
}

.chart-panel {
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.chart-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
    align-items: center;
    min-height: 52px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    gap: 8px 14px;
}

.chart-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

#chart-cursor {
    min-width: 0;
    min-height: 18px;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-key {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    min-height: 35px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--muted);
    background: rgb(6 11 18 / 35%);
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.chart-key span,
.chart-key button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chart-key button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.chart-key button.is-active {
    border-color: rgb(69 214 178 / 45%);
    color: var(--text);
    background: rgb(69 214 178 / 8%);
}

.chart-key button:not(.is-active) {
    opacity: .48;
}

.chart-key i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
}

.chart-key .key-alternate {
    background: var(--warning);
}

.chart-key .key-correction { background: #ff9f5a; }

.chart-key .key-stop {
    background: var(--danger);
}

.chart-key .key-target {
    background: var(--success);
}

.chart-key .key-fibonacci {
    background: #b58cff;
}

.chart-key .key-channel { background: #38c7d9; }
.chart-key .key-pattern { background: #ff6fb7; }
.chart-key .key-event { background: #f5e663; }
.chart-key .key-imbalance { background: #20bfa0; }

.chart-info-button {
    border: 1px solid rgb(92 157 255 / 45%);
    border-radius: 999px;
    padding: 4px 10px;
    color: #a9caff;
    background: rgb(92 157 255 / 8%);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.chart-info-button:hover,
.chart-info-button:focus-visible { background: rgb(92 157 255 / 18%); }

.chart-info-dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: min(780px, calc(100vh - 40px));
    border: 1px solid #263b54;
    border-radius: 16px;
    padding: 24px;
    color: var(--text);
    background: #0d1725;
    box-shadow: 0 24px 80px rgb(0 0 0 / 55%);
}

.chart-info-dialog::backdrop { background: rgb(2 7 13 / 76%); backdrop-filter: blur(3px); }
.chart-info-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.chart-info-heading h2 { margin: 3px 0 0; }
.chart-info-close { border: 0; padding: 0 4px; color: var(--muted); background: transparent; font-size: 30px; line-height: 1; cursor: pointer; }
.chart-info-intro, .chart-info-note { color: var(--muted); line-height: 1.55; }
.chart-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; margin: 20px 0; }
.chart-info-grid > div { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; min-height: 58px; border-bottom: 1px solid rgb(113 129 153 / 16%); }
.chart-info-grid i { display: block; width: 22px; height: 4px; border-radius: 4px; background: #5c9dff; }
.chart-info-grid span { display: flex; flex-direction: column; gap: 3px; }
.chart-info-grid strong { font-size: 13px; }
.chart-info-grid small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.chart-info-grid .line-swatch { height: 0; border-top: 3px dashed currentColor; background: transparent; }
.chart-info-grid .zone-swatch { height: 16px; border: 1px solid currentColor; background: currentColor; opacity: .5; }
.chart-info-grid .event-swatch { width: 12px; height: 12px; margin-left: 5px; border-radius: 2px; transform: rotate(45deg); }
.chart-info-grid .info-impulse { background: #5c9dff; }
.chart-info-grid .info-correction { background: #ff9f5a; }
.chart-info-grid .info-primary-scenario { color: #9be564; }
.chart-info-grid .info-alternate { color: #f4be5b; }
.chart-info-grid .info-stop { color: #ff667d; }
.chart-info-grid .info-target { color: #45d6b2; }
.chart-info-grid .info-fibonacci { color: #b58cff; }
.chart-info-grid .info-channel { color: #38c7d9; }
.chart-info-grid .info-pattern { height: 16px; border: 1px solid #ff6fb7; background: rgb(255 111 183 / 18%); }
.chart-info-grid .info-event { background: #f5e663; }
.chart-info-grid .info-bullish-fvg { color: #20bfa0; }
.chart-info-grid .info-bearish-fvg { color: #c94b68; }

.decision-factor {
    margin-top: 18px;
    border: 1px solid rgb(32 191 160 / 28%);
    border-radius: 10px;
    padding: 13px;
    background: rgb(32 191 160 / 6%);
}
.decision-factor strong, .decision-factor small { display: block; }
.decision-factor small { margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.decision-factor p:last-child { margin-bottom: 0; }

@media (max-width: 680px) {
    .chart-info-dialog { padding: 18px; }
    .chart-info-grid { grid-template-columns: 1fr; }
}

.chart-navigation {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.chart-navigation button {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 4px 9px;
    color: var(--text);
    background: var(--panel-2);
    cursor: pointer;
}

.chart-navigation button.is-active {
    border-color: rgb(69 214 178 / 60%);
    color: var(--accent-strong);
    background: rgb(69 214 178 / 12%);
    box-shadow: inset 0 0 0 1px rgb(69 214 178 / 8%);
}

.chart-frame {
    position: relative;
    width: 100%;
    height: clamp(440px, 64vh, 740px);
    background: #080d16;
}

#market-chart {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#market-chart.is-dragging {
    cursor: grabbing;
}

.chart-error {
    position: absolute;
    inset: 0;
    display: grid;
    padding: 28px;
    place-items: center;
    color: #ffb2bf;
    background: rgb(7 11 18 / 88%);
    text-align: center;
}

.chart-error[hidden] {
    display: none;
}

.chart-comment {
    min-height: 45px;
    margin: 0;
    padding: 13px 16px;
    border-top: 1px solid var(--line-soft);
    line-height: 1.5;
}

.chart-comment[hidden] { display: none; }

.chart-object-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 16px 14px;
}

.chart-object-card {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    padding: 9px 11px;
    background: rgb(8 15 25 / 72%);
}

.chart-object-card strong,
.chart-object-card span { display: block; }
.chart-object-card strong { margin-bottom: 4px; color: var(--text); font-size: 12px; }
.chart-object-card span { color: var(--muted); font-size: 11px; line-height: 1.45; }

.market-side-panel {
    align-self: start;
}

.market-side-panel .decision {
    margin-bottom: 18px;
}

.market-source-list {
    margin: 2px 0 12px;
    padding: 9px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    font-size: 11px;
}

.market-source-list > div {
    padding: 7px 0;
    border: 0;
}

.market-analysis-link {
    display: inline-block;
    margin-bottom: 16px;
}

.explain-stack {
    display: grid;
    gap: 7px;
    margin-top: 18px;
}

.explain-stack details {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 9px 10px;
    background: rgb(7 12 20 / 45%);
}

.explain-stack summary {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.explain-stack p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.micro-note {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.archive-language-note {
    margin-top: 12px;
    padding: 10px 11px;
    border: 1px solid rgb(244 190 91 / 22%);
    border-radius: 8px;
    color: #d7c18d;
    background: rgb(244 190 91 / 6%);
    font-size: 11px;
    line-height: 1.5;
}

.fact-list { display: grid; gap: 7px; }
.fact-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--line-soft);
    padding: 7px 0;
}
.fact-row span { color: var(--muted); }

.timeframe-switch button {
    min-width: 48px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #0b121e;
}

.timeframe-switch button:hover,
.timeframe-switch button:focus-visible,
.timeframe-switch button.is-active {
    border-color: rgb(69 214 178 / 50%);
    color: var(--accent-strong);
    background: rgb(69 214 178 / 8%);
}

.login-wrap {
    display: grid;
    min-height: calc(100vh - 175px);
    place-items: center;
}

.login-card {
    width: min(440px, 100%);
    padding: 32px;
}

.login-card h1 {
    font-size: 30px;
}

.stack-form {
    display: grid;
    gap: 9px;
    margin-top: 24px;
}

.stack-form label {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.stack-form .button {
    margin-top: 12px;
}

@media (max-width: 1100px) {
    .topbar {
        grid-template-columns: auto 1fr;
        padding: 0 22px;
    }

    .main-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        padding: 2px 0 11px;
        overflow-x: auto;
    }

    .user-menu {
        justify-self: end;
    }

    .content-grid-main,
    .chart-layout {
        grid-template-columns: 1fr;
    }

    .market-side-panel {
        display: block;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .topbar {
        min-height: 64px;
        padding: 0 14px;
    }

    .user-menu > span {
        display: none;
    }

    .main-nav a {
        padding: 9px 10px;
        white-space: nowrap;
    }

    .page-shell {
        width: min(100% - 24px, 1540px);
        padding-top: 26px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-cluster {
        justify-content: flex-start;
    }

    .metric-grid,
    .content-grid-thirds,
    .trade-levels {
        grid-template-columns: 1fr 1fr;
    }

    .market-side-panel {
        display: block;
    }

    .chart-frame {
        height: 500px;
    }

    .chart-toolbar {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    #chart-cursor {
        width: 100%;
        text-align: left;
    }

    .chart-object-summary { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
    .brand small {
        display: none;
    }

    .metric-grid,
    .content-grid-thirds,
    .trade-levels {
        grid-template-columns: 1fr;
    }

    .timeframe-switch {
        width: 100%;
        overflow-x: auto;
    }

    .filter-form {
        width: 100%;
    }

    .filter-form select {
        flex: 1;
    }

    .data-list > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .data-list dd {
        text-align: left;
    }
}

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