:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #fafbfc;
    --border: #e7eaef;
    --border-soft: #eef0f3;
    --border-strong: #d8dce3;
    --ink: #12171f;
    --ink-2: #5b6472;
    --ink-3: #8a93a2;
    --accent: #0e9e74;
    --accent-hover: #0b7e5d;
    --accent-soft: #e4f5ef;
    --accent-ink: #0b6b50;
    --accent-bright: #2fc79a;
    --warning-ink: #8a5a0b;
    --warning-bg: #fbeeda;
    --warning: #d99a1e;
    --danger-ink: #a33232;
    --danger-bg: #fbecec;
    --bar-h: 56px;
    --rail-w: 224px;
    --panel-w: 360px;
    --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
}

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

html, body { margin: 0; }

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}

button, input { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
::selection { background: var(--accent-soft); color: var(--ink); }
.panel__scroll, .pane__body, .table-wrap { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
:where(.nav-link, .segmented button, .toggle, .hist, .group, .sidebar__signout, .disclosure > summary, .link-btn):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
:where(.hist, .group, .disclosure > summary):focus-visible { outline-offset: -2px; }
[hidden] { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { text-align: right; }
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }
.bid-ink { color: var(--accent-ink); }
.offer-ink { color: var(--danger-ink); }
.band-ink { color: var(--warning-ink); }

.desk-bar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 120;
    height: var(--bar-h);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 16px 0 0;
    background: var(--ink);
    color: #e8edf2;
}
.desk-bar__logo {
    display: flex;
    align-items: center;
    width: var(--rail-w);
    height: 100%;
    padding: 0 20px;
    flex-shrink: 0;
}
.desk-bar__logo img { width: 116px; height: auto; display: block; }
.desk-bar__status { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #b9c3cf; min-width: 0; }
.desk-bar__status strong { color: #fff; font-weight: 600; }
.desk-bar__dot {
    width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0;
    background: var(--accent-bright);
    box-shadow: 0 0 0 0 rgba(47, 199, 154, 0.55);
    animation: desk-live 2.4s ease-out infinite;
}
@keyframes desk-live {
    0% { box-shadow: 0 0 0 0 rgba(47, 199, 154, 0.55); }
    70% { box-shadow: 0 0 0 7px rgba(47, 199, 154, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 199, 154, 0); }
}
.desk-bar__chip {
    margin-left: auto;
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #e8edf2;
    white-space: nowrap;
}

.sidebar {
    position: fixed;
    top: var(--bar-h);
    bottom: 0;
    left: 0;
    z-index: 100;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    background: var(--surface-2);
    border-right: 1px solid var(--border);
}
.sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}
.nav-link:not(.nav-link--active):hover { background: var(--border-soft); color: var(--ink); }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ink-3); }
.nav-link--off { opacity: 0.55; cursor: not-allowed; }
.nav-link--active {
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgba(17, 23, 31, 0.05);
}
.nav-link--active svg { color: var(--accent); }
.sidebar__user {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px 18px;
    border-top: 1px solid var(--border);
}
.sidebar__org { font-size: 13px; font-weight: 600; color: var(--ink); }
.sidebar__email { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__signout {
    display: inline-flex; align-items: center; gap: 8px; width: fit-content;
    padding: 0; border: 0; background: none; cursor: pointer;
    color: var(--ink-2); font-size: 12.5px; font-weight: 500;
}
.sidebar__signout:hover { color: var(--danger-ink); }
.sidebar__signout svg { width: 14px; height: 14px; }

.main { min-width: 0; margin-left: var(--rail-w); padding-top: var(--bar-h); }
.container {
    width: 100%;
    max-width: 1280px;
    padding: 20px 40px 64px;
    transition: padding 0.2s ease-out;
}
.has-panel .container { max-width: none; }
@media (min-width: 1280px) {
    .has-panel.panel-open .container { padding-right: calc(var(--panel-w) + 24px); }
}

.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--ink-3); font-size: 12.5px; }
.breadcrumb svg { width: 10px; height: 10px; }
.breadcrumb__current { color: var(--ink-2); font-weight: 500; }

.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; margin-bottom: 28px; }
.pagehead__text { min-width: 0; flex: 1 1 420px; }
.pagehead h1 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.pagehead p { max-width: 68ch; margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.sample-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.sample-pill span { width: 7px; height: 7px; border-radius: 999px; background: var(--warning); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 32px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--ink);
    font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.btn:hover, .btn[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border-strong); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; height: 40px; padding: 0 18px; font-size: 14px; }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--border-soft); border-color: transparent; color: var(--ink); }
.btn--circle { width: 30px; height: 30px; padding: 0; border-radius: 999px; }
.btn svg { width: 16px; height: 16px; }
.count-pill {
    border-radius: 999px; padding: 0 6px;
    background: var(--accent-soft); color: var(--accent-ink);
    font-size: 11.5px; line-height: 18px;
}

.toolbar {
    position: sticky;
    top: var(--bar-h);
    z-index: 20;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    margin: -12px 0 20px;
    padding: 12px 0;
    background: var(--bg);
}
.toolbar__left { display: flex; min-width: 0; flex: 1 1 18rem; align-items: center; gap: 8px; }
.toolbar__right { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.search {
    display: flex; align-items: center; gap: 8px;
    min-width: 0; max-width: 20rem; flex: 1;
    height: 32px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.search:focus-within { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(18, 23, 31, 0.08); }
.search svg { width: 14px; height: 14px; color: var(--ink-3); flex-shrink: 0; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }

.segmented {
    display: flex; gap: 2px; padding: 2px;
    border: 1px solid rgba(18, 23, 31, 0.1); border-radius: 8px;
    background: rgba(18, 23, 31, 0.04);
    box-shadow: inset 0 1px 2px rgba(18, 23, 31, 0.06);
}
.segmented button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 28px; padding: 0 12px; border: 0; border-radius: 6px;
    background: transparent; color: rgba(18, 23, 31, 0.6);
    font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.segmented button:not([aria-pressed="true"]):hover { background: rgba(18, 23, 31, 0.05); color: var(--ink); }
.segmented button[aria-pressed="true"] {
    background: var(--surface); color: var(--ink);
    box-shadow: 0 1px 2px rgba(18, 23, 31, 0.10), 0 0 0 1px rgba(18, 23, 31, 0.06);
}
.segmented button .n { opacity: 0.6; }
.segmented--fill button { flex: 1; }
.sort-arrow { display: none; }
.mv-sort[aria-pressed="true"] .sort-arrow {
    display: block;
    width: 5px; height: 5px; margin-top: 3px;
    border-left: 1.5px solid currentColor; border-top: 1.5px solid currentColor;
    transform: rotate(45deg);
}
.mv-sort[data-dir="desc"] .sort-arrow { margin-top: -3px; transform: rotate(225deg); }

.section__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.section__head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.section__meta { font-size: 12.5px; color: var(--ink-3); }

.board {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}
.board__head, .row__sum {
    display: grid;
    grid-template-columns: 20px minmax(0, 2fr) 7.5rem 8rem 6.5rem 5.5rem minmax(0, 1.3fr);
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
}
.board__head {
    position: sticky;
    top: calc(var(--bar-h) + 56px);
    z-index: 2;
    border-radius: 12px 12px 0 0;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
}
.col-price { text-align: right; white-space: nowrap; }
.col-mech { text-align: center; white-space: nowrap; }
.board__head > span { white-space: nowrap; }
.col-short { display: none; }
.row { border-top: 1px solid var(--border-soft); scroll-margin-top: calc(var(--bar-h) + 104px); }
.nowrap { white-space: nowrap; }
.row:first-of-type { border-top: 0; }
.row:last-of-type, .row:last-of-type > .row__sum { border-radius: 0 0 12px 12px; }
.row__sum {
    padding-top: 10px; padding-bottom: 10px;
    list-style: none; cursor: pointer;
    font-size: 0.86rem;
    transition: background 0.12s ease;
}
.row__sum::-webkit-details-marker { display: none; }
.row__sum:hover, .row[open] > .row__sum { background: var(--surface-2); }
.row[open] > .row__sum { border-bottom: 1px solid var(--border-soft); border-radius: 0; }
.row__sum:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chev {
    display: block;
    width: 6px; height: 6px; margin-left: 2px;
    border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
    transform: rotate(-45deg);
    transition: transform 0.15s ease, border-color 0.12s ease;
}
.row__sum:hover .chev, .order-row:hover .chev, .disclosure > summary:hover .chev, .filing__sum:hover .chev { border-color: var(--ink); }
.row[open] > .row__sum .chev, .disclosure[open] > summary .chev, .filing[open] > .filing__sum .chev, [aria-expanded="true"] > .chev { transform: translateY(-2px) rotate(45deg); }
.inst { display: flex; min-width: 0; align-items: center; gap: 10px; }
.logo {
    position: relative;
    display: grid; place-items: center;
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: 6px;
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.02em;
}
.logo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(18, 23, 31, 0.1); }
.inst__text { display: flex; min-width: 0; flex-direction: column; line-height: 1.15; }
.inst__line { display: flex; min-width: 0; align-items: center; gap: 6px; }
.ticker { font-weight: 700; letter-spacing: 0.02em; }
.inst__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.72rem; color: var(--ink-2); }
.badge-count {
    height: 16px; padding: 0 6px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent-ink);
    font-size: 0.66rem; font-weight: 600; line-height: 16px;
}
.isin { overflow: hidden; text-overflow: ellipsis; font-size: 0.78rem; color: var(--ink-2); }
.ccy { margin-left: 4px; font-size: 0.66rem; color: var(--ink-3); }
.chip { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.band { white-space: nowrap; color: var(--warning-ink); }
.band .sep { margin: 0 2px; color: var(--ink-3); }
.empty-row { padding: 40px 20px; font-size: 13.5px; color: var(--ink-2); }

.detail {
    display: flex; flex-direction: column; gap: 16px;
    padding: 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-soft);
}
.row:last-of-type .detail { border-radius: 0 0 12px 12px; border-bottom: 0; }
.note {
    padding: 12px 16px;
    border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface);
    font-size: 13px; line-height: 1.55; color: var(--ink-2);
}
.stats {
    display: flex; flex-wrap: wrap; align-items: stretch;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.stat { display: flex; flex-direction: column; gap: 3px; flex: 1 1 0; min-width: 140px; padding: 10px 14px; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat__label { font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.stat__val { font-size: 0.98rem; font-weight: 600; line-height: 1.2; }
.stat__sub { font-size: 11.5px; color: var(--ink-3); line-height: 1.2; }
.stat__val .ccy { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.04em; }

.detail__tape {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-auto-rows: 252px;
    gap: 16px;
}
.stats--stack { flex-direction: column; flex-wrap: nowrap; }
.stats--stack .stat { justify-content: center; border-left: 0; border-top: 1px solid var(--border); }
.stats--stack .stat:first-child { border-top: 0; }
.pane {
    display: flex; flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface);
}
.pane__head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 12px; font-weight: 600;
}
.pane__head span + span { font-weight: 400; color: var(--ink-3); }
.pane__body { min-height: 0; flex: 1; overflow-y: auto; }
.trade {
    display: grid; grid-template-columns: minmax(0, 1fr) 5.25rem 4.75rem; align-items: center; gap: 12px;
    padding: 3px 9px;
    border-top: 1px solid var(--border-soft);
    font-family: var(--mono); font-size: 0.8rem;
}
.trade--head { position: sticky; top: 0; z-index: 1; border-top: 0; background: var(--surface); font-family: inherit; font-size: 11.5px; color: var(--ink-3); }
.trade--own { background: rgba(228, 245, 239, 0.6); }
.trade__time { display: flex; align-items: center; font-size: 0.74rem; color: var(--ink-3); }
.trade--own .trade__time { color: var(--ink); }
.trade__price { text-align: right; font-weight: 650; white-space: nowrap; }
.trade__price.up { color: var(--accent-ink); }
.trade__price.down { color: var(--danger-ink); }
.trade__arrow { display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border: 0 solid transparent; border-width: 0 3.5px; }
.trade__price.up .trade__arrow { margin-bottom: 3px; border-bottom: 5px solid currentColor; }
.trade__price.down .trade__arrow { margin-bottom: 1px; border-top: 5px solid currentColor; }
.trade__size { text-align: right; color: var(--ink-2); }
.dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 999px; }
.dot--own { margin-right: 6px; background: var(--accent-ink); }

.orders-pane { overflow: hidden; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface); }
.orders-pane > .pane__head, .disclosure > summary { padding: 6px 10px; }
.disclosure > summary {
    display: flex; align-items: center; gap: 8px;
    list-style: none; cursor: pointer;
    font-size: 12px; font-weight: 600;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { background: var(--surface-2); }
.disclosure > summary .muted { margin-left: auto; font-weight: 400; }
.table-wrap { max-height: 460px; overflow: auto; }
.disclosure .table-wrap { border-top: 1px solid var(--border-soft); }
table.orders { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 13px; }
table.orders th {
    position: sticky; top: 0; z-index: 1;
    padding: 10px; border-bottom: 1px solid var(--border); background: var(--surface-2);
    font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: left;
}
table.orders td { padding: 10px; border-top: 1px solid var(--border-soft); vertical-align: middle; }
table.orders tr.order-row { cursor: pointer; }
table.orders tr.order-row:hover, table.orders tr.order-row.is-open { background: var(--surface-2); }
table.orders .num { text-align: right; }
.toggle {
    display: grid; place-items: center; width: 24px; height: 24px;
    border: 0; border-radius: 6px; background: transparent; cursor: pointer;
}
.toggle:hover { background: var(--border); }
.side-badge {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
    border-radius: 6px; font-size: 12px; font-weight: 600;
}
.side-badge--bid { background: var(--accent-soft); color: var(--accent-ink); }
.side-badge--offer { background: var(--danger-bg); color: var(--danger-ink); }
.fillbar { display: flex; align-items: center; gap: 10px; }
.fillbar__track { width: 40px; height: 4px; flex-shrink: 0; overflow: hidden; border-radius: 999px; background: var(--border); }
.fillbar__fill { display: block; height: 100%; border-radius: 999px; background: rgba(18, 23, 31, 0.7); }
.fillbar__text { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; }
.status {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
    border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap;
    background: var(--border-soft); color: var(--ink-2);
}
.status--part { background: var(--warning-bg); color: var(--warning-ink); }
.status--filled { background: var(--accent-soft); color: var(--accent-ink); }
.status--rejected { background: var(--danger-bg); color: var(--danger-ink); }
.status--quiet { background: transparent; border: 1px solid var(--border); font-weight: 500; }
.outside {
    display: flex; align-items: center; gap: 4px; margin-top: 4px;
    font-size: 11px; font-weight: 600; color: var(--warning-ink); white-space: nowrap;
}
.outside .dot { background: var(--warning); }
.order-detail td { padding: 0 !important; background: var(--surface-2); }
.order-detail__inner {
    display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 20px 32px;
    padding: 16px 16px 16px 40px;
    box-shadow: inset 0 1px 0 var(--border-soft);
}
.warn-note {
    grid-column: 1 / -1;
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border: 1px solid rgba(217, 154, 30, 0.3); border-radius: 8px;
    background: rgba(217, 154, 30, 0.1);
    font-size: 12.5px; line-height: 1.4;
}
.warn-note .dot { margin-top: 5px; width: 8px; height: 8px; background: var(--warning); }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 8px 20px; margin: 0; font-size: 12.5px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
.timeline-title { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 12px 18px; font-size: 12.5px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 12px; bottom: -2px; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 5px; width: 7px; height: 7px; background: var(--ink-3); }
.timeline .dot--fill { background: var(--accent); }
.timeline .dot--rejected { background: var(--danger-ink); }
.timeline__title { font-weight: 600; }
.timeline__when { margin-left: 6px; color: var(--ink-3); }
.timeline__text { display: block; color: var(--ink-2); }

.panel {
    position: fixed;
    top: var(--bar-h); right: 0; bottom: 0;
    z-index: 30;
    display: flex; flex-direction: column;
    width: 100%; max-width: 400px;
    border-left: 1px solid var(--border);
    background: var(--surface);
    box-shadow: -12px 0 32px -12px rgba(18, 23, 31, 0.18);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.2s ease-out, visibility 0.2s;
}
.panel[data-open="true"] { transform: translateX(0); visibility: visible; }
@media (min-width: 1280px) { .panel { max-width: var(--panel-w); } }
.no-motion, .no-motion .container { transition: none !important; }
.panel__head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--border-soft); }
.panel__head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.panel__head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.panel__head > div { min-width: 0; flex: 1; }
.panel__tabs { padding: 0 16px; border-bottom: 1px solid var(--border); }
.panel__tabs .segmented { gap: 20px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.panel__tabs .segmented button { flex: none; height: 40px; padding: 0 2px; border-radius: 0; color: var(--ink-2); }
.panel__tabs .segmented button:not([aria-pressed="true"]):hover { background: none; color: var(--ink); }
.panel__tabs .segmented button[aria-pressed="true"] { background: none; color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
.panel__tabs .segmented button:focus-visible { outline-offset: -2px; }
.panel__filters { padding: 10px 16px; border-bottom: 1px solid var(--border-soft); }
.panel__view { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.panel__scroll { min-height: 0; flex: 1; overflow-y: auto; }
.panel__foot { padding: 10px 16px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--ink-3); }
.group {
    display: block; width: 100%;
    padding: 12px 16px;
    border: 0; border-bottom: 1px solid var(--border-soft);
    background: transparent; text-align: left; cursor: pointer;
    transition: background 0.12s ease;
}
.group:hover { background: var(--surface-2); }
.group__top { display: flex; align-items: center; gap: 10px; }
.group__name { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.15; }
.group__name .ticker { font-size: 0.86rem; }
.group__name .inst__name { font-size: 0.72rem; }
.group__count { flex-shrink: 0; font-size: 12px; color: var(--ink-3); }
.group__count strong { font-weight: 600; color: var(--warning-ink); }
.group__count em { font-style: normal; color: var(--warning-ink); }
.group__arrow { width: 14px; height: 14px; flex-shrink: 0; color: var(--ink-3); transition: transform 0.15s ease; }
.group:hover .group__arrow { transform: translateX(2px); }
.group__latest { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-left: 38px; font-size: 11.5px; }
.group__latest .text { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.group__latest .text.fresh { font-weight: 600; color: var(--ink); }
.group__latest .when { flex-shrink: 0; color: var(--ink-3); }
.dot--ring { border: 1px solid var(--ink-3); }
.dot--grey { background: var(--ink-3); }
.dot--fill { background: var(--accent); }
.dot--rejected { background: var(--danger-ink); }
.dot--new { background: var(--accent-ink); }
.group__side {
    display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
    margin-top: 6px; padding-left: 38px; font-size: 12px;
}
.group__side:first-of-type { margin-top: 10px; }
.group__side .side-badge { justify-self: start; height: 18px; font-size: 11.5px; }
.group__side .n { color: var(--ink-2); }
.group__side .mono { font-weight: 600; white-space: nowrap; }
.group__side .dash { margin: 0 2px; font-weight: 400; color: var(--ink-3); }
.hist { display: block; width: 100%; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--border-soft); background: transparent; text-align: left; cursor: pointer; }
.hist { transition: background 0.12s ease; }
.hist:hover { background: var(--surface-2); }
.hist__top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.hist__top .when { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.hist__what { color: var(--ink-2); }
.hist__what.filled { font-weight: 600; color: var(--ink); }
.hist__what.rejected { font-weight: 600; color: var(--danger-ink); }
.hist__line { display: block; margin-top: 4px; padding-left: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
.panel-empty { padding: 24px 16px; font-size: 13.5px; color: var(--ink-2); }

.w-0 { width: 0; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; }
.w-25 { width: 25%; } .w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; } .w-45 { width: 45%; }
.w-50 { width: 50%; } .w-55 { width: 55%; } .w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; }
.w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; }
.w-100 { width: 100%; }

.auth {
    display: grid;
    min-height: calc(100vh - var(--bar-h));
    margin-top: var(--bar-h);
    place-items: center;
    padding: 40px 16px;
}
.auth .desk-bar__logo { width: auto; }
.auth-card {
    width: 100%; max-width: 420px;
    padding: 32px;
    border: 1px solid var(--border); border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(17, 23, 31, 0.06), 0 12px 40px -18px rgba(17, 23, 31, 0.2);
}
.auth-card h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.auth-card .lede { margin: 6px 0 24px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field input {
    height: 40px; padding: 0 12px;
    border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface);
    font-size: 14px;
}
.field input:focus { outline: 0; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(18, 23, 31, 0.08); }
.field input.code-input { font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.field .hint { font-size: 12px; color: var(--ink-3); }
.alert { margin-bottom: 18px; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.alert--error { background: var(--danger-bg); color: var(--danger-ink); }
.alert--ok { background: var(--accent-soft); color: var(--accent-ink); }
.auth-card .btn--primary { width: 100%; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; font-size: 12px; color: var(--ink-3); }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent-ink); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.auth-foot { margin-top: 20px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 1100px) {
    .container { padding: 20px 24px 56px; }
    .board__head, .row__sum { grid-template-columns: 20px minmax(0, 2fr) 6.5rem 6.5rem 5.5rem minmax(0, 1.2fr); }
    .col-isin { display: none; }
}
@media (max-width: 860px) {
    .detail__tape { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .detail__tape .pane { max-height: 252px; }
    .order-detail__inner { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .desk-bar__logo { width: auto; }
    .desk-bar__status { display: none; }
    .container { padding: 16px 16px 48px; }
    .board__head, .row__sum { grid-template-columns: 12px minmax(0, 1fr) 4rem 5.5rem; gap: 12px; padding-left: 14px; padding-right: 14px; }
    .col-mech, .col-mktcap, .col-long, .row__sum .ccy { display: none; }
    .col-short { display: inline; }
    .order-detail__inner { padding-left: 16px; }
    .orders-pane .table-wrap { overflow-x: hidden; }
    .orders-pane table.orders, .orders-pane table.orders tbody { display: block; min-width: 0; }
    .orders-pane table.orders thead {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
    }
    .orders-pane tr.order-row {
        display: grid;
        grid-template-columns: 24px auto minmax(0, 1fr) auto;
        grid-template-areas: "tog side price status" "tog fill fill placed";
        align-items: center;
        gap: 8px 10px;
        padding: 12px 12px 12px 8px;
        border-top: 1px solid var(--border-soft);
    }
    .orders-pane tbody > tr.order-row:first-child { border-top: 0; }
    .orders-pane tr.order-row > td { padding: 0; border: 0; }
    .orders-pane .c-tog { grid-area: tog; align-self: start; }
    .orders-pane .c-side { grid-area: side; }
    .orders-pane table.orders .c-price { grid-area: price; text-align: left; }
    .orders-pane .c-qty { display: none; }
    .orders-pane .c-fill { grid-area: fill; min-width: 0; }
    .orders-pane .c-fill .fillbar__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .orders-pane .c-status { grid-area: status; justify-self: end; text-align: right; }
    .orders-pane .c-status .outside { justify-content: flex-end; }
    .orders-pane .c-placed { grid-area: placed; justify-self: end; font-size: 12px; white-space: nowrap; }
    .orders-pane tr.order-detail:not([hidden]) { display: block; border-top: 1px solid var(--border-soft); }
    .orders-pane tr.order-detail > td { display: block; }
    .board__head { top: var(--bar-h); position: static; }
    .toolbar { position: static; }
}

.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.count-pill--quiet { background: var(--border-soft); color: var(--ink-2); }

.steps {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 32px; padding: 0; list-style: none;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; }
.steps li + li { border-left: 1px solid var(--border-soft); }
.steps__n {
    display: grid; place-items: center; flex: none;
    width: 22px; height: 22px; margin-top: 1px; border-radius: 999px;
    border: 1px solid var(--border-strong); color: var(--ink-2);
    font-size: 12px; font-weight: 600;
}
.steps p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.steps .steps__title { margin-bottom: 2px; font-size: 13.5px; font-weight: 600; color: var(--ink); }

.demo-note {
    margin: 0 0 20px; padding: 10px 14px;
    border: 1px solid rgba(14, 158, 116, 0.25); border-radius: 10px;
    background: var(--accent-soft); color: var(--accent-ink);
    font-size: 13px; line-height: 1.5;
}

.te-section { margin-bottom: 32px; }
.table-wrap--free { max-height: none; }
.te-table { min-width: 900px; table-layout: fixed; }
.te-table th:nth-child(1) { width: 27%; }
.te-table th:nth-child(2) { width: 19%; }
.te-table th:nth-child(3) { width: 19%; }
.te-table th:nth-child(4) { width: 17%; }
.te-table th:nth-child(5) { width: 18%; }
table.te-table td { padding: 14px 12px; }
.te-table .logo { width: 36px; height: 36px; border-radius: 8px; font-size: 0.56rem; }
.te-table .inst__text { gap: 2px; }
.ver { height: 20px; padding: 0 6px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.te-status .status { margin-bottom: 2px; }
.te-table th:first-child, .te-table td:first-child { padding-left: 16px; }
.te-table th:last-child, .te-table td:last-child { padding-right: 16px; }
.te-company { font-weight: 600; font-size: 13.5px; }
.te-sub { margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.window { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.window__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--border-strong); }
.window__dot--open { background: var(--accent); }
.pack-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; text-decoration: none; }
.pack-link:hover span:nth-child(2) { text-decoration: underline; text-underline-offset: 2px; }
.pack-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.demo-dialog {
    width: min(440px, calc(100vw - 32px)); padding: 0;
    border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 24px 48px -12px rgba(18, 23, 31, 0.28);
}
.demo-dialog::backdrop { background: rgba(18, 23, 31, 0.45); }
.demo-dialog__body { padding: 22px 22px 18px; }
.demo-dialog h2 { margin: 0; font-size: 17px; font-weight: 600; }
.demo-dialog__lede { margin: 6px 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.demo-dialog__fine { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.demo-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.methods label {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 13.5px; cursor: pointer;
}
.methods label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.methods input { accent-color: var(--accent); }
.field-other { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field-other input { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 400; color: var(--ink); }

.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 240px)) auto; align-items: end; gap: 12px; margin-bottom: 28px; }
.filter { position: relative; display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.filter__label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.filter select {
    width: 100%; height: 36px; padding: 0 32px 0 11px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
    font: inherit; font-size: 13px; color: var(--ink);
    appearance: none; cursor: pointer;
    transition: border-color 0.12s ease;
}
.filter::after {
    content: ""; position: absolute; right: 13px; bottom: 15px;
    width: 5px; height: 5px;
    border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2);
    transform: rotate(45deg); pointer-events: none;
}
.filter:has(select:disabled)::after { border-color: var(--border-strong); }
.filter select:hover:not(:disabled) { border-color: var(--border-strong); }
.filter select:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
.filter select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.filters .link-btn { justify-self: start; margin-bottom: 9px; white-space: nowrap; }

.filings { overflow: hidden; }
.filing { border-top: 1px solid var(--border-soft); }
.filing:first-child { border-top: 0; }
.filing[hidden] { display: none; }
.filing__sum {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 20px 16px 16px; list-style: none; cursor: pointer;
    transition: background 0.12s ease;
}
.filing__sum::-webkit-details-marker { display: none; }
.filing__sum:hover, .filing[open] > .filing__sum { background: var(--surface-2); }
.filing__sum:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.filing__sum .logo { width: 36px; height: 36px; border-radius: 8px; font-size: 0.56rem; }
.filing--old .filing__sum .logo { opacity: 0.55; }
.filing__main { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.filing__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filing__type { font-size: 14px; font-weight: 600; }
.filing--old .filing__type { color: var(--ink-2); }
.filing__meta { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; font-size: 12.5px; color: var(--ink-2); }
.filing__meta > span { white-space: nowrap; }
.filing__meta time { font-variant-numeric: tabular-nums; }
.filing__excerpt {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;
    max-width: 92ch; margin-top: 2px; font-size: 13px; line-height: 1.55; color: var(--ink-3);
}
.filing[open] .filing__excerpt { display: none; }
.filing__aside { display: flex; flex: none; align-items: center; gap: 14px; height: 20px; font-size: 12px; color: var(--ink-3); }
.filing__count { font-variant-numeric: tabular-nums; }
.filing__body { padding: 0 20px 20px 66px; background: var(--surface-2); font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.filing__body p { margin: 0; max-width: 92ch; }
.filing__files {
    max-width: 560px; margin: 16px 0 0; padding: 0; list-style: none;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.filing__files li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; font-size: 12.5px; }
.filing__files li + li { border-top: 1px solid var(--border-soft); }
.filing__file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.filing__note { flex: none; color: var(--ink-3); }

@media (max-width: 900px) {
    .steps { grid-template-columns: 1fr; }
    .steps li + li { border-left: 0; border-top: 1px solid var(--border-soft); }
    .filters { grid-template-columns: minmax(0, 1fr); }
    .filing__excerpt { -webkit-line-clamp: 2; }
}

@media (max-width: 560px) {
    .filing__sum { gap: 12px; padding: 14px 14px 14px 12px; }
    .filing__sum .logo { width: 32px; height: 32px; font-size: 0.5rem; }
    .filing__count, .filing__note { display: none; }
    .filing__body { padding: 0 14px 16px 56px; }
    .filter select { height: 40px; font-size: 16px; }
    .filter::after { bottom: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .filing__sum, .filter select, .chev, .panel, .container, .group__arrow { transition: none; }
    .desk-bar__dot { animation: none; }
}

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 32px; align-items: start; }
.home-col { min-width: 0; }
.home-section { margin-bottom: 28px; }
.home-section .section__head { align-items: baseline; }
.home-link { margin-left: auto; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.home-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.home-list { margin: 0; padding: 0; list-style: none; overflow: hidden; }
.home-list > li + li { border-top: 1px solid var(--border-soft); }
.home-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.home-row--top { align-items: flex-start; }
.home-row--link { transition: background 0.12s ease; }
.home-row--link:hover { background: var(--surface-2); }
.home-row--link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.home-row__main { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.home-row__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 500; }
.home-row__title--strong { font-weight: 700; }
.home-row__sub { font-size: 12.5px; color: var(--ink-2); }
.home-row__desc { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.home-row__aside { flex: none; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.home-row__date { width: 88px; flex: none; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.home-row__rank { width: 16px; flex: none; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.home-row__figure { flex: none; font-family: var(--mono); font-size: 13px; font-weight: 600; }
.logo--lg { width: 36px; height: 36px; border-radius: 8px; font-size: 0.62rem; }
.note-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 999px; background: var(--border-strong); }
.note-dot--success { background: var(--accent); }
.note-dot--warning { background: var(--warning); }
.note-dot--neutral { background: var(--ink-3); }
.section__head--rule { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.home-news-title { color: var(--ink-2); font-size: 13px !important; }
.home-news { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.home-news li { display: flex; flex-direction: column; gap: 2px; }
.home-news__headline { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.home-news__meta { font-size: 12px; color: var(--ink-3); }

@media (max-width: 1100px) {
    .home-grid { grid-template-columns: minmax(0, 1fr); }
}
.home-row--top .home-row__title { white-space: normal; }

@media (max-width: 1300px) {
    table.te-table, table.te-table tbody { display: block; min-width: 0; }
    table.te-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    table.te-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "co co" "win win" "set set" "status action";
        gap: 10px 12px;
        padding: 16px;
        border-top: 1px solid var(--border-soft);
    }
    table.te-table tbody > tr:first-child { border-top: 0; }
    table.te-table td, table.te-table th:first-child, table.te-table td:first-child, table.te-table td:last-child { padding: 0; border: 0; }
    table.te-table .te-co { grid-area: co; }
    table.te-table .te-win { grid-area: win; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; white-space: normal; }
    table.te-table .te-win .window { margin-top: 0; }
    table.te-table .te-set { grid-area: set; }
    table.te-table .te-status { grid-area: status; align-self: center; }
    table.te-table .te-action { grid-area: action; align-self: end; }
    table.te-table .te-action:has(.muted) { display: none; }
}
