/* ============================================================
   HYPER ANALYTICS — концепт "Ink & Amber"
   Мобайл-first дизайн-система. Терминальный янтарь на глубоком
   инке, данные — моноширинные, навигация — плавающий док,
   все формы и фильтры — bottom-sheets.
   ============================================================ */

:root {
    --bg: #0B0D12;
    --bg-soft: #0E1118;
    --srf: #141824;
    --srf-2: #1B2130;
    --srf-3: #232B3D;
    --line: rgba(233, 238, 255, .08);
    --line-strong: rgba(233, 238, 255, .14);
    --text: #EEF1F8;
    --mut: #8B93A8;
    --mut-2: #5C6478;

    --brand: #F5B942;
    --brand-soft: rgba(245, 185, 66, .14);
    --brand-ink: #191104;

    --up: #3DDBA5;
    --up-soft: rgba(61, 219, 165, .13);
    --down: #FF6B7A;
    --down-soft: rgba(255, 107, 122, .12);
    --info: #7AA5FF;
    --info-soft: rgba(122, 165, 255, .13);
    --warn: #F5B942;

    --r-s: 10px;
    --r-m: 16px;
    --r-l: 22px;

    --font-ui: "Archivo", -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-data: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;

    --dock-h: 76px;
    --shadow: 0 18px 50px -12px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.45;
    overscroll-behavior-y: none;
}
body::before { /* атмосфера: тёплое свечение сверху */
    content: "";
    position: fixed; inset: -30% -20% auto -20%; height: 55vh;
    background: radial-gradient(60% 90% at 50% 0%, rgba(245, 185, 66, .07), transparent 70%);
    pointer-events: none; z-index: 0;
}

a { color: var(--info); text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--brand); color: var(--brand-ink); }

/* -------- каркас -------- */
.app { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 0 14px calc(var(--dock-h) + 28px); }

.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 2px 10px;
    background: linear-gradient(180deg, rgba(11, 13, 18, .92) 70%, rgba(11, 13, 18, 0));
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.topbar .tb-title {
    font-family: var(--font-ui); font-weight: 800; font-size: 21px;
    letter-spacing: -.02em; margin: 0; flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-sub { display: block; font-family: var(--font-data); font-size: 11px; font-weight: 400; color: var(--mut); letter-spacing: .02em; margin-top: 1px; }
.icon-btn {
    flex: none; width: 40px; height: 40px; border-radius: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--srf); border: 1px solid var(--line); color: var(--text);
    cursor: pointer; transition: transform .12s ease, background .15s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 19px; height: 19px; }
.brand-dot {
    width: 34px; height: 34px; border-radius: 11px; flex: none;
    background: linear-gradient(135deg, var(--brand), #E08A1E);
    color: var(--brand-ink); font-family: var(--font-ui); font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
    box-shadow: 0 4px 18px rgba(245, 185, 66, .35);
}

/* -------- док -------- */
.dock {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 60; width: min(560px, calc(100% - 24px));
    display: flex; padding: 8px;
    background: rgba(24, 28, 40, .82);
    border: 1px solid var(--line-strong); border-radius: 24px;
    backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: var(--shadow);
}
.dock a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 0 6px; border-radius: 16px; color: var(--mut);
    font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
    transition: color .15s, background .15s, transform .1s;
}
.dock a:active { transform: scale(.93); }
.dock a svg { width: 21px; height: 21px; }
.dock a.on { color: var(--brand); background: var(--brand-soft); }

/* -------- карточки -------- */
.card {
    background: linear-gradient(180deg, var(--srf) 0%, var(--bg-soft) 130%);
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    padding: 16px;
    margin-bottom: 12px;
    position: relative; overflow: hidden;
}
.card-title {
    font-family: var(--font-ui); font-size: 12px; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; color: var(--mut);
    margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
}
.card-title .spacer { flex: 1; }
.card.flat { background: transparent; border: none; padding: 0; overflow: visible; }

/* -------- герой (капитал) -------- */
.hero {
    border-radius: var(--r-l); border: 1px solid var(--line);
    background: linear-gradient(160deg, #161B29, #0D1017 70%);
    position: relative; overflow: hidden; margin-bottom: 12px;
    padding: 18px 16px 0;
}
.hero .h-label { font-family: var(--font-data); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mut); }
.hero .h-value {
    font-family: var(--font-data); font-weight: 600; font-size: 40px; letter-spacing: -.03em;
    margin: 4px 0 2px; line-height: 1;
}
.hero .h-value small { font-size: 22px; color: var(--mut); font-weight: 500; }
.hero .h-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; position: relative; z-index: 2; }
.hero .h-chart { margin: 6px -16px 0; display: block; }
.hero::after {
    content: ""; position: absolute; inset: 0 0 auto; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245,185,66,.6), transparent);
}

/* -------- KPI лента -------- */
.kpi-strip {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(128px, 1fr);
    gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px;
    scroll-snap-type: x proximity; scrollbar-width: none;
}
.kpi-strip::-webkit-scrollbar { display: none; }
.kpi {
    scroll-snap-align: start;
    background: var(--srf); border: 1px solid var(--line); border-radius: var(--r-m);
    padding: 12px 13px;
}
.kpi .k-label { font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.kpi .k-value { font-family: var(--font-data); font-size: 19px; font-weight: 600; margin-top: 5px; letter-spacing: -.02em; }
.kpi .k-sub { font-family: var(--font-data); font-size: 11px; color: var(--mut); margin-top: 2px; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi-grid .kpi { padding: 11px 12px; }

/* -------- чипы, сегменты -------- */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-data); font-size: 12px; font-weight: 500;
    padding: 5px 11px; border-radius: 999px;
    background: var(--srf-2); border: 1px solid var(--line); color: var(--mut);
    cursor: pointer; user-select: none; transition: all .15s; white-space: nowrap;
}
.chip.on { background: var(--brand-soft); border-color: rgba(245,185,66,.4); color: var(--brand); }
.chip.up { background: var(--up-soft); color: var(--up); border-color: transparent; }
.chip.down { background: var(--down-soft); color: var(--down); border-color: transparent; }
.chip.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }

.seg {
    display: inline-flex; padding: 3px; gap: 2px;
    background: var(--srf-2); border: 1px solid var(--line); border-radius: 12px;
}
.seg button {
    border: none; background: transparent; color: var(--mut); cursor: pointer;
    font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .02em;
    padding: 6px 12px; border-radius: 9px; transition: all .15s;
}
.seg button.on { background: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 10px rgba(245,185,66,.35); }

/* -------- вкладки -------- */
.tabs {
    display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
    margin: 2px -14px 14px; padding: 0 14px 2px;
    position: sticky; top: 62px; z-index: 30;
    background: linear-gradient(180deg, var(--bg) 75%, transparent);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
    flex: none; border: none; cursor: pointer;
    background: transparent; color: var(--mut);
    font-family: var(--font-ui); font-size: 13.5px; font-weight: 700;
    padding: 9px 13px; border-radius: 12px; transition: all .15s; position: relative;
}
.tabs button.on { color: var(--text); background: var(--srf-2); }
.tabs button.on::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px;
    border-radius: 2px; background: var(--brand);
}
.tab-pane { display: none; animation: fadeUp .25s ease; }
.tab-pane.on { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* -------- списки-строки -------- */
.row-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--srf); border: 1px solid var(--line); border-radius: var(--r-m);
    padding: 12px 13px; margin-bottom: 8px; position: relative; overflow: hidden;
    transition: transform .12s ease, border-color .15s; cursor: pointer;
}
.row-card:active { transform: scale(.985); }
.row-card .rc-main { flex: 1; min-width: 0; }
.row-card .rc-title { font-family: var(--font-ui); font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row-card .rc-sub { font-family: var(--font-data); font-size: 11.5px; color: var(--mut); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-card .rc-right { text-align: right; flex: none; }
.row-card .rc-num { font-family: var(--font-data); font-weight: 600; font-size: 15px; }
.row-card .rc-num-sub { font-family: var(--font-data); font-size: 11px; color: var(--mut); margin-top: 2px; }
.row-card .rc-spark { position: absolute; right: 0; top: 0; bottom: 0; width: 46%; opacity: .5; pointer-events: none;
    mask-image: linear-gradient(90deg, transparent, #000 55%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%); }

/* тепловая полоса позиции */
.heat { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px; }
.heat-bg { position: absolute; inset: 0; pointer-events: none; opacity: .1; }

/* -------- бейджи -------- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: var(--font-data); font-size: 10px; font-weight: 600; letter-spacing: .06em;
    padding: 2.5px 7px; border-radius: 7px; text-transform: uppercase;
}
.b-active { background: var(--up-soft); color: var(--up); }
.b-test { background: var(--info-soft); color: var(--info); }
.b-watch { background: var(--brand-soft); color: var(--brand); }
.b-archive { background: rgba(139, 147, 168, .15); color: var(--mut); }
.b-long { background: var(--up-soft); color: var(--up); }
.b-short { background: var(--down-soft); color: var(--down); }
.b-liq { background: var(--down); color: #1c0508; }
.b-part { background: var(--info-soft); color: var(--info); }
.b-off { background: rgba(139,147,168,.15); color: var(--mut); }
.grade {
    font-family: var(--font-data); font-weight: 700; font-size: 12px;
    width: 24px; height: 24px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.g-A { background: var(--up); color: #04120c; }
.g-B { background: var(--up-soft); color: var(--up); }
.g-C { background: var(--brand-soft); color: var(--brand); }
.g-D { background: var(--down-soft); color: var(--down); }
.g-F { background: var(--down); color: #1c0508; }
.g-Q { background: var(--srf-3); color: var(--mut); }
.stars { color: var(--brand); font-size: 12px; letter-spacing: 1.5px; }
.stars .dim { color: var(--srf-3); }
.tagp {
    display: inline-flex; font-family: var(--font-data); font-size: 10.5px;
    padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--mut);
}

.up-t { color: var(--up); } .down-t { color: var(--down); } .mut-t { color: var(--mut); }

/* -------- кнопки -------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-family: var(--font-ui); font-weight: 700; font-size: 14px;
    border-radius: 14px; padding: 12px 18px; border: 1px solid var(--line-strong);
    background: var(--srf-2); color: var(--text); cursor: pointer;
    transition: transform .12s, filter .15s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; box-shadow: 0 6px 22px rgba(245,185,66,.3); }
.btn-danger { background: var(--down-soft); color: var(--down); border-color: rgba(255,107,122,.35); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 130px; }

.fab {
    position: fixed; right: max(16px, calc(50% - 268px)); bottom: calc(var(--dock-h) + 22px); z-index: 55;
    width: 54px; height: 54px; border-radius: 18px; border: none; cursor: pointer;
    background: var(--brand); color: var(--brand-ink);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(245,185,66,.4); transition: transform .15s;
}
.fab:active { transform: scale(.9) rotate(90deg); }
.fab svg { width: 24px; height: 24px; }

/* -------- формы -------- */
.field { margin-bottom: 13px; }
.field label { display: block; font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--mut); margin-bottom: 6px; letter-spacing: .03em; }
.field .hint { font-size: 11.5px; color: var(--mut-2); margin-top: 5px; }
input[type=text], input[type=password], input[type=number], select, textarea {
    width: 100%; background: var(--bg-soft); border: 1px solid var(--line-strong);
    border-radius: 12px; color: var(--text); padding: 11px 13px;
    font-family: var(--font-data); font-size: 14px; outline: none;
    transition: border-color .15s, box-shadow .15s; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238B93A8' viewBox='0 0 16 16'%3E%3Cpath d='M2 5l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
textarea { min-height: 88px; resize: vertical; font-family: var(--font-body); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; padding: 4px 0; }
.check input { width: 19px; height: 19px; accent-color: var(--brand); }

/* тумблер */
.switch { position: relative; display: inline-flex; flex: none; width: 46px; height: 27px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .tr { position: absolute; inset: 0; border-radius: 999px; background: var(--srf-3); transition: background .2s; cursor: pointer; }
.switch .tr::after { content: ""; position: absolute; width: 21px; height: 21px; border-radius: 50%; top: 3px; left: 3px; background: #fff; transition: transform .2s cubic-bezier(.4, 1.6, .6, 1); }
.switch input:checked + .tr { background: var(--up); }
.switch input:checked + .tr::after { transform: translateX(19px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.switch-row .sw-label { font-weight: 600; font-size: 14.5px; }
.switch-row .sw-sub { font-size: 12px; color: var(--mut); margin-top: 2px; }

/* -------- bottom sheet -------- */
.sheet-backdrop {
    position: fixed; inset: 0; z-index: 90; background: rgba(5, 7, 12, .6);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .25s; pointer-events: none;
}
.sheet {
    position: fixed; left: 50%; bottom: 0; z-index: 95;
    width: min(640px, 100%); max-height: 88dvh;
    transform: translate(-50%, 105%); transition: transform .32s cubic-bezier(.32, .9, .35, 1);
    background: var(--srf); border: 1px solid var(--line-strong); border-bottom: none;
    border-radius: 26px 26px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,.6);
    display: flex; flex-direction: column;
}
.sheet-open .sheet { transform: translate(-50%, 0); }
.sheet-open .sheet-backdrop { opacity: 1; pointer-events: auto; }
.sheet .sh-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--srf-3); margin: 10px auto 2px; flex: none; }
.sheet .sh-head { display: flex; align-items: center; gap: 10px; padding: 8px 18px 12px; flex: none; }
.sheet .sh-title { font-family: var(--font-ui); font-weight: 800; font-size: 17px; flex: 1; }
.sheet .sh-body { overflow-y: auto; padding: 2px 18px calc(20px + env(safe-area-inset-bottom)); }

/* -------- тосты -------- */
.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--dock-h) + 24px); z-index: 120; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast {
    background: var(--srf-3); border: 1px solid var(--line-strong); border-left: 3px solid var(--brand);
    border-radius: 14px; padding: 12px 15px; font-size: 13.5px;
    box-shadow: var(--shadow); animation: toastIn .3s cubic-bezier(.3, 1.4, .5, 1);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }

/* -------- утилиты -------- */
.mono { font-family: var(--font-data); }
.muted { color: var(--mut); }
.small { font-size: 12px; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: none; }
.stat-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; }
.stat-pairs .sp { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.stat-pairs .sp b { font-family: var(--font-data); font-weight: 600; }
.empty { text-align: center; color: var(--mut); padding: 34px 16px; }
.empty .e-ico { font-size: 30px; margin-bottom: 8px; }
.search-bar { position: relative; margin-bottom: 10px; }
.search-bar input { padding-left: 38px; }
.search-bar svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--mut); pointer-events: none; }
.score-bar { height: 6px; border-radius: 6px; background: var(--srf-3); overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--up)); }
.danger-card { border-color: rgba(255,107,122,.3); }
.danger-card .card-title { color: var(--down); }
.link-ico { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-data); font-size: 11px; color: var(--info); }
.addr { font-family: var(--font-data); font-size: 11.5px; color: var(--mut); }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(61,219,165,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(61,219,165,0); } 100% { box-shadow: 0 0 0 0 rgba(61,219,165,0); } }
.chart-svg { display: block; width: 100%; height: auto; }
.axis-l { font-family: var(--font-data); font-size: 9.5px; fill: var(--mut-2); }

/* логин */
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: min(380px, 100%); text-align: center; }
.login-logo {
    width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22px;
    background: linear-gradient(135deg, var(--brand), #E08A1E); color: var(--brand-ink);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-ui); font-weight: 800; font-size: 32px;
    box-shadow: 0 16px 44px rgba(245,185,66,.4); animation: floatY 4s ease-in-out infinite;
}
@keyframes floatY { 50% { transform: translateY(-7px); } }
.login-title { font-family: var(--font-ui); font-weight: 800; font-size: 26px; letter-spacing: -.02em; margin: 0 0 4px; }

/* ============================================================
   ДЕСКТОП (≥1000px) — надстройка над мобильной базой.
   Мобильные правила выше не меняются: здесь только рейл,
   широкая колонка, 2-колоночные сетки и таблицы.
   ============================================================ */
.dock-brand { display: none; }
.dtable-wrap { display: block; }

@media (min-width: 1000px) {
    body { font-size: 14px; }
    .app {
        max-width: 1220px;
        margin-left: max(248px, calc((100vw - 1220px - 248px) / 2 + 248px));
        margin-right: auto;
        padding: 0 28px 48px;
    }
    .topbar { padding-top: 20px; }
    .topbar .tb-title { font-size: 24px; }

    /* --- рейл --- */
    .dock.dock-rail {
        left: 20px; top: 20px; bottom: auto; transform: none;
        width: 204px; max-height: calc(100dvh - 40px); overflow-y: auto;
        flex-direction: column; align-items: stretch; gap: 3px;
        padding: 14px 10px; border-radius: 24px;
    }
    .dock-rail .dock-brand {
        display: flex; align-items: center; gap: 11px;
        padding: 4px 8px 16px; margin-bottom: 8px;
        border-bottom: 1px solid var(--line);
        font-family: var(--font-ui); font-weight: 800; font-size: 13px;
        line-height: 1.15; letter-spacing: .01em;
    }
    .dock-rail a {
        flex-direction: row; justify-content: flex-start; gap: 12px;
        padding: 10px 12px; font-size: 13.5px; border-radius: 13px;
    }
    .dock-rail a:nth-last-child(1) { margin-top: 10px; border-top: 1px solid var(--line); border-radius: 0 0 13px 13px; padding-top: 14px; color: var(--mut-2); }
    .dock-rail a svg { width: 19px; height: 19px; }

    .fab { right: 40px; bottom: 40px; }
    .toast-wrap { bottom: 32px; }

    /* --- масштаб контента --- */
    .hero { padding: 24px 24px 0; }
    .hero .h-value { font-size: 52px; }
    .hero .h-chart { margin: 8px -24px 0; }
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .kpi .k-value { font-size: 21px; }
    .tabs { top: 70px; margin-left: -6px; padding-left: 6px; }

    /* --- 2-колоночные сетки секций --- */
    .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: start; }
    .cols2 > * { min-width: 0; }
    .span2 { grid-column: 1 / -1; }
}

/* -------- таблицы (используются только на десктопе) -------- */
.table-card { padding: 6px 4px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dtable th {
    font-family: var(--font-ui); font-size: 10.5px; font-weight: 700;
    letter-spacing: .09em; text-transform: uppercase; color: var(--mut);
    text-align: left; padding: 11px 12px; white-space: nowrap;
    border-bottom: 1px solid var(--line-strong); user-select: none;
}
.dtable th[onclick] { cursor: pointer; }
.dtable th[onclick]:hover { color: var(--text); }
.dtable th.sort-on { color: var(--brand); }
.dtable td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dtable tbody tr:last-child td { border-bottom: none; }
.dtable tbody tr { transition: background .12s; }
.dtable tbody tr:hover { background: var(--srf-2); }
.dtable tbody tr[data-href] { cursor: pointer; }
.dtable .num { font-family: var(--font-data); text-align: right; white-space: nowrap; }
.dtable th.num { text-align: right; }
.dtable .cell-main { font-family: var(--font-ui); font-weight: 700; font-size: 14px; }
.dtable .cell-sub { font-size: 11.5px; color: var(--mut); margin-top: 2px; }
.dtable .spark-cell { width: 120px; height: 34px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
