/* ============================================================
   UZB Finance — «Рейтинговый отчёт» design system
   The screen as a rating-agency evidence report: chapter rail,
   numbered exhibit tables, grade chips, seals. No floating cards.
   Warm sepia palette; day (paper) and night (espresso) themes.
   ============================================================ */

:root {
  /* day — warm paper */
  --ground: #F4EFE7;
  --surface: #FBF8F2;
  --ink: #2B2118;
  --muted: #6B5C4B;
  --faint: #6E5F4B;
  --green: #3E7A46;
  --green-soft: #E4EEE2;
  --red: #A6402C;
  --red-soft: #F4E6E1;
  --gold: #A67C2E;
  --gold-text: #7A5A1E;
  --gold-soft: #F1E7CE;
  --hairline: #D9CFBE;
  --hairline-soft: #E6DECF;
  --rule: #2B2118;
  --hover: #ECE4D6;
  --focus: #A67C2E;
  --skeleton: #E7DFD0;
  --skeleton-hi: #F0E9DB;
  --ink-hover: #443626;
  --overlay: rgba(43, 33, 24, 0.38);
  --shadow: rgba(43, 33, 24, 0.16);
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-ui: 'Golos Text', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --measure: 68ch;

  /* legacy aliases consumed by page modules */
  --navy: var(--ink);
  --navy-soft: #EDE6D8;
  --burgundy: var(--red);
  --burgundy-soft: var(--red-soft);
  --up: var(--green);
  --down: var(--red);
  --flat: var(--faint);
  --text-strong: var(--ink);
  --accent: var(--ink);
  --accent-hover: var(--navy-soft);
  --card: var(--surface);
  --border: var(--hairline);
  --border-2: var(--hairline);
  color-scheme: light;
}

/* night — warm espresso */
[data-theme="dark"] {
  --ground: #1B1611;
  --surface: #251F18;
  --ink: #EDE3D3;
  --muted: #B7A78D;
  --faint: #A2937B;
  --green: #82B98C;
  --green-soft: #26372B;
  --red: #D98F7E;
  --red-soft: #3A2622;
  --gold: #D2A855;
  --gold-text: #D2A855;
  --gold-soft: #382F1D;
  --hairline: #3E3527;
  --hairline-soft: #322A1F;
  --rule: #EDE3D3;
  --hover: #2E271E;
  --focus: #D2A855;
  --skeleton: #2B241B;
  --skeleton-hi: #362E22;
  --ink-hover: #F6EFE2;
  --overlay: rgba(0, 0, 0, 0.55);
  --shadow: rgba(0, 0, 0, 0.45);
  --navy-soft: #332A1F;
  color-scheme: dark;
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-ui);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; color: var(--ink); }
h1 { font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 10px; max-width: var(--measure); }
a { color: var(--ink); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--gold-text); text-decoration: underline; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: var(--ink); }
::selection { background: var(--ink); color: var(--ground); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 1px; }
/* the hidden attribute must always win over component display rules
   (modal-overlay/cmdk-overlay set display:flex — without this guard they
   render even when hidden, blocking the page) */
[hidden] { display: none !important; }

.ico-sun { display: none; }
[data-theme="dark"] .ico-sun { display: block; }
[data-theme="dark"] .ico-moon { display: none; }

/* browser chrome theming */
* { scrollbar-width: thin; scrollbar-color: var(--hairline) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--hairline); border: 3px solid var(--ground); border-radius: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
input::placeholder { color: var(--faint); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- utilities ---------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.num, .mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.spacer { flex: 1; }
.up { color: var(--green); }
.down { color: var(--red); }
.section { margin-top: 28px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.microlabel {
  font-family: var(--font-num); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}

/* ---------- header: report masthead ---------- */
.report-head {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.report-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  border-bottom: 1px solid var(--rule);
}
.report-head-inner {
  max-width: 1440px; margin: 0 auto; padding: 16px 28px 10px;
  display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-word { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.brand-sub { font-size: 11px; color: var(--muted); }
.report-nav-inline {
  max-width: 1440px; margin: 0 auto; padding: 4px 28px 10px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.report-nav-inline a {
  color: var(--ink); font-size: 13px; font-weight: 500;
  padding: 3px 1px; border-bottom: 2px solid transparent;
}
.report-nav-inline a:hover { color: var(--gold-text); text-decoration: none; }
.report-nav-inline a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--ink); }
.report-nav-inline a.btn, .report-nav-inline a.btn:hover { color: var(--ground); text-decoration: none; }
.report-head-inner .nav-aux { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.report-head-inner .clock { font-family: var(--font-num); font-size: 12px; color: var(--muted); }
.report-head-inner .clock b { font-weight: 500; color: var(--ink); }

/* seal device: official state chip */
.seal {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px double var(--gold); border-radius: 999px;
  padding: 3px 12px 3px 8px; font-size: 11.5px; color: var(--ink);
  background: var(--surface);
}
.seal::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--gold); flex-shrink: 0;
}
.seal.ok::before { border-color: var(--green); }
.seal.err::before { border-color: var(--red); }

/* ---------- chapter rail layout ---------- */
.report-body {
  max-width: 1440px; margin: 0 auto; padding: 22px 28px 52px;
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 34px;
  align-items: start;
}
.chapter-rail { position: sticky; top: 18px; font-size: 13px; }
.chapter-rail .rail-title {
  font-family: var(--serif); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted);
  margin-bottom: 10px;
}
.chapter-rail a {
  display: block; padding: 6px 10px 6px 12px; color: var(--ink);
  border-left: 2px solid var(--hairline);
}
.chapter-rail a:hover { color: var(--gold-text); text-decoration: none; border-left-color: var(--gold); }
.chapter-rail a.active { border-left-color: var(--ink); font-weight: 600; }
.chapter-rail .rail-foot { margin-top: 18px; padding: 10px 12px 0; border-top: 1px solid var(--hairline); font-size: 11px; color: var(--faint); }
/* rail: tab buttons (dashboard views) */
.rail-tab {
  appearance: none; background: none; border: none; cursor: pointer; text-align: left;
  display: block; width: 100%; padding: 6px 10px 6px 12px;
  font: inherit; font-size: 13.5px; color: var(--ink);
  border-left: 2px solid var(--hairline);
}
.rail-tab:hover { color: var(--gold-text); border-left-color: var(--gold); }
.rail-tab.active { border-left-color: var(--ink); font-weight: 600; }

/* dashboard app shell: no page scroll on capable desktops */
@media (min-width: 1100px) and (min-height: 820px) {
  body:has(.dash-shell) { overflow: hidden; }
  body:has(.dash-shell) .brand-sub,
  body:has(.dash-shell) .issue-line { display: none; }
  body:has(.dash-shell) .report-head-inner { padding: 6px 28px; gap: 18px; }
  body:has(.dash-shell) .report-nav-inline { gap: 14px; }
  .dash-shell {
    height: calc(100vh - 130px);
    overflow: hidden;
    grid-template-columns: 176px minmax(0, 1fr);
    padding: 10px 20px;
    gap: 10px;
    align-items: stretch;
  }
  .dash-shell .chapter-rail { position: static; display: flex; flex-direction: column; }
  .dash-shell .rail-title { width: 100%; }
  .dash-shell .rail-foot { margin-top: auto; }
  .dash-shell .report-main { overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
  .dash-shell .view-section { display: none; height: 100%; min-height: 0; overflow: hidden; }
  .dash-shell .view-section.active { display: block; }
  .dash-shell .view-section.active.view-full { height: 100%; overflow: auto; }
  .dash-shell .view-section.active#view-overview { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 0; }
  .dash-shell #svodka { flex: 0 0 auto; }
  .dash-shell #liders { flex: 0 0 auto; min-height: 0; }
  .dash-shell #liders .card { min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
  .dash-shell #liders .table-wrap { flex: 1; min-height: 0; overflow: auto; max-height: 244px; }
  .dash-shell #liders .doc-foot { display: none; }
  .dash-shell #view-overview .doc-section { margin-top: 0; }
  
  .dash-shell .view-overview .tbl tbody td { padding: 3px 8px 3px 6px; }
  .dash-shell .grid.cols-3 { margin-top: 0; }
  .dash-shell .grid.cols-3 .tbl .cell-main, .dash-shell .grid.cols-3 .tbl .cell-sub { line-height: 1.25; }
  .dash-shell #view-overview .card-head { margin-bottom: 6px; }
  .dash-shell .hero-cards { min-height: 0; }
  .dash-shell .tape-row { padding: 4px 0; font-size: 12px; }
  .dash-shell .hero-cell, .dash-shell .hero-card { padding: 6px 12px; }
  .dash-shell .hero-card.promo .hc-price { font-size: 24px; }
  .dash-shell .hc-sparkwrap { display: none; }
  .dash-shell .exhibit-title { white-space: nowrap; }
  .dash-shell .card-head { flex-wrap: wrap; row-gap: 4px; }
  .dash-shell .minitabs { flex-shrink: 0; }
  .dash-shell .tape-row { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .dash-shell .tp-price { min-width: 0; }
  .dash-shell .tp-vol { margin-left: 0; }
  .dash-shell #liders .table-wrap { max-height: 222px; }
  .dash-shell .footer { display: none; }
  .dash-bottom-row {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 10px; flex: 1 1 0; min-height: 230px;
  }
  .dash-bottom-row .map-card, .dash-bottom-row .tape-card {
    display: flex; flex-direction: column; min-height: 0; margin-top: 0;
  }
  .map-card .market-map { flex: 1; min-height: 168px; height: auto !important; }
  .tape-card .tape-feed { flex: 1; min-height: 0; overflow: auto; }
  .grid.cols-3 .tbl tbody td { padding: 5px 8px 5px 6px; }
  .minitabs { display: inline-flex; gap: 2px; }
  .minitabs button {
    appearance: none; background: none; border: 1px solid transparent; cursor: pointer;
    font-size: 11.5px; color: var(--muted); padding: 2px 8px; border-radius: 2px;
  }
  .minitabs button:hover { color: var(--ink); }
  .minitabs button.active { color: var(--ink); border-color: var(--ink); background: var(--surface); }
  .view-full { height: 100%; overflow: auto; }
}

@media (max-width: 980px) {
  .report-body { grid-template-columns: 1fr; gap: 18px; }
  .chapter-rail { position: static; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
  .chapter-rail .rail-title { width: 100%; }
  .chapter-rail a { border-left: none; border-bottom: 2px solid var(--hairline); padding: 4px 8px; }
  .chapter-rail a.active { border-bottom-color: var(--ink); }
  .chapter-rail .rail-foot { display: none; }
}

/* ---------- page head & exhibits ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 20px 24px 48px; }
.page-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 2px 0 12px; border-bottom: 1px solid var(--hairline);
}
.page-head h1 { flex-shrink: 0; }
/* phones: let long page/ticker titles shrink and wrap instead of overflowing
   (ticker title is h1.tk-title inside .page-head, not .page-head h1) */
@media (max-width: 640px) {
  .page-head h1 { flex-shrink: 1; min-width: 0; font-size: 18px; overflow-wrap: anywhere; }
  .tk-title { font-size: 18px; overflow-wrap: anywhere; }
}

.doc-section { margin-top: 26px; }
.doc-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 0 0 8px; }
.doc-head h2 { font-family: var(--serif); font-size: 17px; }
.doc-foot {
  padding: 7px 0 0; border-top: 1px solid var(--hairline-soft);
  font-size: 11.5px; color: var(--muted);
}
.doc-foot sup { color: var(--gold-text); }
.footnote { font-size: 11.5px; color: var(--muted); }
sup.fn { color: var(--gold-text); font-size: 11px; }

/* exhibit: white evidence panel (legacy .card vocabulary) */
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  padding: 16px 18px 12px; border-radius: 0; box-shadow: none;
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { font-family: var(--serif); font-size: 16px; }
.exhibit-title {
  font-family: var(--font-num); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
  margin-bottom: 8px;
}

/* ---------- grade chip ---------- */
.grade {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0;
  font-family: var(--font-num); font-size: 11px; font-weight: 700;
  border: 1px solid var(--hairline); border-radius: 2px;
  background: var(--ground); color: var(--ink);
}
.grade.g-a { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.grade.g-b { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
.grade.g-c { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.grade.lg { width: 30px; height: 30px; font-size: 14px; }
a.plain .grade { margin-right: 6px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; align-items: flex-end; flex-wrap: wrap; }
.tabs button, .tab {
  appearance: none; background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 5px 10px 7px; border-bottom: 2px solid transparent;
}
.tabs button:hover, .tab:hover { color: var(--ink); text-decoration: none; }
.tabs button.active, .tab.active { color: var(--ink); border-bottom-color: var(--gold); }

/* ---------- tables: evidence exhibits ---------- */
.table-wrap { overflow-x: auto; }
table.tbl, table.table, .table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl thead th, table.table thead th, .table-wrap table thead th {
  font-family: var(--font-num); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); text-align: left;
  padding: 6px 10px 7px 0;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
table.tbl tbody td, table.table tbody td, .table-wrap table tbody td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}
table.tbl tbody tr:hover, .table-wrap table tbody tr:hover { background: var(--hover); }
table.tbl .num, table.tbl td.num, .table-wrap td.num, .table-wrap th.num {
  font-family: var(--font-num); text-align: right; white-space: nowrap;
}
th.num, thead th.num { text-align: right; }
td.r, th.r { text-align: right; }
/* rowlink on <tr> must NOT get display:block — it breaks table-row layout
   (each row lays out as its own anonymous table; columns stop aligning) */
a.rowlink { display: block; color: inherit; }
.rowlink:hover { text-decoration: none; background: var(--hover); }
.ticker-code { font-family: var(--font-num); font-weight: 500; }
.tname { color: var(--muted); font-size: 12px; }
.delta-up { color: var(--green); font-family: var(--font-num); }
.delta-down { color: var(--red); font-family: var(--font-num); }
.delta-zero { color: var(--muted); font-family: var(--font-num); }

/* ---------- badges & dots ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--hairline);
  padding: 2px 9px; border-radius: 2px;
  background: var(--surface);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.badge .dot.ok { background: var(--green); }
.badge .dot.warn { background: var(--gold); }
.badge .dot.err { background: var(--red); }
.pill {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 1px 8px 2px; border-radius: 2px; letter-spacing: 0.04em;
}
.pill.up { background: var(--green-soft); color: var(--green); }
.pill.down { background: var(--red-soft); color: var(--red); }
.plan-tag {
  font-family: var(--font-num); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--muted);
  border: 1px solid var(--hairline); padding: 1px 6px; border-radius: 2px;
}
.plan-tag.pro { color: var(--gold-text); border-color: var(--gold); }

/* ---------- buttons ---------- */
.btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--ground);
  border: 1px solid var(--ink); border-radius: 2px;
  font-size: 13px; font-weight: 500;
  padding: 8px 16px; text-decoration: none;
}
.btn:hover { background: var(--ink-hover); text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.secondary, .btn.ghost { background: transparent; color: var(--ink); }
.btn.secondary:hover, .btn.ghost:hover { background: var(--navy-soft); }
.btn.danger { background: var(--red); border-color: var(--red); color: var(--surface); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.loading { position: relative; color: transparent; }
.btn.loading::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid transparent; border-top-color: var(--ground); opacity: .7;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  appearance: none; background: none; border: 1px solid transparent;
  border-radius: 2px; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
}
.icon-btn:hover { color: var(--ink); background: var(--navy-soft); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label, label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--muted); margin-bottom: 5px;
}
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 2px;
  padding: 8px 10px; font-size: 13.5px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
input:disabled, select:disabled { background: var(--hover); color: var(--muted); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 49%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 49%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.form-error { color: var(--red); font-size: 12.5px; margin-top: 6px; }
.form-ok { color: var(--green); font-size: 12.5px; margin-top: 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.check input { width: auto; margin-top: 3px; }

/* filter bar */
.filters {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--hairline);
}
.filters .field { margin: 0; }
.filters input, .filters select { width: auto; min-width: 110px; }

/* ---------- empty / error / skeleton ---------- */
.empty {
  padding: 26px 0; color: var(--muted); font-size: 13px;
  border-bottom: 1px solid var(--hairline-soft);
}
.error-box {
  border: 1px solid var(--red); background: var(--red-soft); color: var(--red);
  padding: 10px 14px; font-size: 13px; border-radius: 0;
}
.skeleton {
  background: linear-gradient(90deg, var(--skeleton) 25%, var(--skeleton-hi, #EFE8DB) 45%, var(--skeleton) 65%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  border-radius: 2px; min-height: 14px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- grids (page JS layout hooks) ---------- */
.grid { display: grid; gap: 24px; }
.grid.cols-main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) {
  .grid.cols-main-side, .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid.cols-main-side, .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

/* ---------- hero cells (сводка) ---------- */
.hero-cards {
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  border: 1px solid var(--hairline); background: var(--surface);
}
.hero-cell, .hero-card {
  padding: 14px 18px 12px 18px; margin: 0;
  border-right: 1px solid var(--hairline-soft);
  display: flex; flex-direction: column; gap: 3px;
  color: inherit; text-decoration: none; min-width: 0;
}
.hero-cell:last-child, .hero-card:last-child { border-right: none; }
a.hero-card:hover { background: var(--hover); text-decoration: none; }
.hc-name { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.hc-price { font-family: var(--font-num); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.hero-card.promo .hc-price { font-family: var(--serif); font-size: 38px; }
.hero-delta { font-family: var(--font-num); font-size: 12.5px; margin-left: 8px; }
.hc-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hc-sparkwrap { margin-top: 2px; }
@media (max-width: 1000px) {
  .hero-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-cell:nth-child(2n), .hero-card:nth-child(2n) { border-right: none; }
}
@media (max-width: 640px) {
  .hero-cards { grid-template-columns: 1fr; }
  .hero-cell, .hero-card { border-right: none; }
  .hero-card.promo .hc-price { font-size: 28px; }
}

/* dashboard page-specific classes from page JS */
.chg { font-family: var(--font-num); }
.chg.up { color: var(--green); }
.chg.down { color: var(--red); }
.chg.flat { color: var(--muted); }
.pill.up { background: var(--green-soft); }
.pill.down { background: var(--red-soft); }
.pill.flat { background: var(--hover); color: var(--muted); }
.cell-main { display: block; font-family: var(--font-num); font-weight: 500; font-size: 13px; }
.cell-sub { display: block; color: var(--faint); font-size: 11.5px; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.plain { color: inherit; }
a.plain:hover { text-decoration: none; }
a.plain:hover .cell-main { color: var(--gold-text); }
.heat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); border-top: 1px solid var(--hairline-soft); border-left: 1px solid var(--hairline-soft); }
.heat-cell {
  display: flex; flex-direction: column; gap: 1px;
  padding: 7px 9px; border-right: 1px solid var(--hairline-soft); border-bottom: 1px solid var(--hairline-soft);
  box-shadow: inset 3px 0 0 var(--heat, transparent);
  color: inherit; text-decoration: none;
}
a.heat-cell:hover { text-decoration: none; background: var(--hover); }
.hc-code { font-family: var(--font-num); font-size: 11.5px; font-weight: 500; }
.hc-val { font-family: var(--font-num); font-size: 12px; color: var(--ink); }
.hc-chg { font-family: var(--font-num); font-size: 11px; }
.tape-feed { display: flex; flex-direction: column; }
.tape-row { display: flex; align-items: baseline; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--hairline-soft); font-size: 12.5px; }
.tape-row.animate { animation: toast-in .18s ease-out; }
.tp-time { color: var(--faint); font-size: 11.5px; min-width: 44px; }
.tp-code { font-family: var(--font-num); font-weight: 500; color: var(--ink); }
.tp-price { min-width: 90px; text-align: right; }
.tp-qty { color: var(--muted); }
.tp-vol { margin-left: auto; color: var(--muted); }
@media (max-width: 640px) {
  .tape-row { flex-wrap: wrap; row-gap: 1px; }
  .tp-vol { margin-left: 0; }
}
.fx-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hairline-soft); font-size: 13px; }
.fx-ccy { font-family: var(--font-num); font-weight: 500; min-width: 40px; }
.fx-rate { margin-left: auto; }
.fx-diff { font-size: 12px; min-width: 110px; text-align: right; }
.cal-mini-item { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--hairline-soft); font-size: 12.5px; }
.cm-date { font-family: var(--font-num); color: var(--muted); min-width: 70px; }
.chip {
  display: inline-block; font-family: var(--font-num); font-size: 11px;
  border: 1px solid var(--hairline); border-radius: 2px;
  padding: 0 6px 1px; color: var(--ink);
}
.chip:hover { border-color: var(--gold); text-decoration: none; }
.news-item { padding: 12px 0; border-bottom: 1px solid var(--hairline-soft); }
.news-item h3 { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.news-title { font-weight: 500; font-size: 13.5px; color: var(--ink); }
.news-title:hover { color: var(--gold-text); }
.news-meta { font-size: 11.5px; color: var(--faint); display: flex; gap: 10px; flex-wrap: wrap; }
.sentiment { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.sdot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); display: inline-block; }
.sentiment.pos .sdot { background: var(--green); }
.sentiment.neg .sdot { background: var(--red); }
.sentiment.pos { color: var(--green); }
.sentiment.neg { color: var(--red); }
.source-note { font-size: 11.5px; color: var(--muted); padding-top: 7px; }
.card-sub { white-space: nowrap; }
.market-map { min-height: 440px; }
.market-map .empty { display: flex; align-items: center; justify-content: center; height: 440px; }
body.map-expanded #market-map {
  position: fixed;
  inset: 76px 20px 20px;
  height: auto !important;
  min-height: 0;
  z-index: 95;
}
.spark { display: inline-block; vertical-align: middle; }
.spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.5; }

/* ---------- ticker page ---------- */
.ticker-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
@media (max-width: 1000px) { .ticker-layout { grid-template-columns: 1fr; } }
.ticker-side { border-left: 1px solid var(--hairline); padding-left: 20px; }
@media (max-width: 1000px) { .ticker-side { border-left: none; padding-left: 0; } }
.side-section { margin-bottom: 22px; }
.side-section > h3 {
  font-family: var(--font-num); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
  padding-bottom: 6px; border-bottom: 1px solid var(--rule); margin-bottom: 8px;
}
.def-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; border-bottom: 1px solid var(--hairline-soft); }
.def-row dt { color: var(--muted); }
.def-row dd { margin: 0; font-family: var(--font-num); text-align: right; }
.chart-box { width: 100%; height: 420px; position: relative; }
.chart-toolbar { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 0; }
.ranges { display: flex; gap: 2px; }
.ranges button {
  appearance: none; background: none; border: 1px solid transparent; cursor: pointer;
  font-family: var(--font-num); font-size: 11.5px; color: var(--muted);
  padding: 3px 9px; border-radius: 2px;
}
.ranges button:hover { color: var(--ink); background: var(--navy-soft); }
.ranges button.active { color: var(--ink); border-color: var(--ink); background: var(--surface); }
.tk-chart { position: relative; width: 100%; }
/* KLineChart mode: TradingView-style vertical drawing toolbar left of the plot */
.tk-chart-row { display: flex; gap: 8px; align-items: stretch; }
.tk-chart-row .tk-chart { flex: 1 1 auto; min-width: 0; width: auto; }
#kline-toolbar {
  flex: 0 0 44px; width: 44px; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 6px 0;
  background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 2px;
}
.kline-tool {
  appearance: none; background: none; border: 1px solid transparent; cursor: pointer;
  width: 32px; height: 28px; padding: 0; border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.kline-tool:hover { color: var(--ink); background: var(--navy-soft); }
.kline-tool.active { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--gold); }
.kline-tool svg { width: 18px; height: 18px; display: block; }
.kline-tool-sep { width: 22px; height: 1px; background: var(--hairline); margin: 3px 0; flex-shrink: 0; }
@media (max-width: 640px) {
  .tk-chart-row { flex-direction: column; }
  #kline-toolbar {
    flex-direction: row; flex: none; width: auto; padding: 3px 6px;
    overflow-x: auto; justify-content: flex-start;
  }
  .kline-tool-sep { width: 1px; height: 20px; margin: 0 3px; }
}
/* TradingView Charting Library mode: taller card, widget autosizes into it
   (class toggled by ticker.js only when the library is active) */
.tk-chart.tv-full { height: 640px; }
.tv-ohlc-line { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; }
.tv-ohlc b { font-weight: 600; color: var(--ink); }
.tv-sparse-note { position: absolute; top: 48px; left: 10px; z-index: 3; font-size: 11px; color: var(--red); }
#tv-interval-bar {
  position: absolute; top: 6px; left: 10px; right: auto; z-index: 4;
  align-items: center; gap: 2px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 2px;
  padding: 3px 6px;
}
#tv-interval-bar .ind-menu { position: relative; display: inline-flex; margin-left: 8px; }
#tv-interval-bar .ind-menu .btn { padding: 3px 10px; font-size: 12px; }
#tv-interval-bar .ind-pop { right: 0; }
@media (max-width: 640px) {
  #tv-interval-bar {
    position: static; margin: 8px 8px 0;
    justify-content: flex-start; flex-wrap: wrap;
  }
  #tv-interval-bar .ind-menu { margin-left: 6px; }
}
.tv-uci-tag { font-size: 11px; opacity: .85; pointer-events: none; }
.tv-session-note { padding: 6px 2px 0; }
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 24px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--hairline-soft); }
.stat-cell { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.st-label { font-family: var(--font-num); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.st-val { font-size: 13.5px; }
.tk-sticky {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px; padding: 8px 24px;
  background: var(--surface); border-bottom: 1px solid var(--rule);
  transform: translateY(-100%); transition: transform .15s ease;
}
.tk-sticky.show { transform: none; }
.ts-code { font-family: var(--font-num); font-weight: 600; }
.ts-price { font-size: 15px; }
.ts-chg { font-size: 12.5px; }
.tk-sticky .tk-actions { margin-left: auto; margin-right: 24px; }
.tk-act-btn {
  appearance: none; background: none; border: 1px solid var(--hairline);
  border-radius: 2px; cursor: pointer; color: var(--muted);
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
}
.tk-act-btn svg { width: 16px; height: 16px; }
.tk-act-btn.active { color: var(--gold-text); border-color: var(--gold); background: var(--gold-soft); }

/* ---------- auth pages ---------- */
.auth-wrap { max-width: 420px; margin: 40px auto 0; }
.auth-wrap h1 { margin-bottom: 6px; }
.auth-wrap .lead { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-alt { margin-top: 16px; font-size: 13px; color: var(--muted); }
.def-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; font-size: 13.5px; }
.def-grid dt { color: var(--muted); }
.def-grid dd { margin: 0; }

/* ---------- command palette ---------- */
.cmdk-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: var(--overlay);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh;
}
.cmdk-overlay[hidden] { display: none; }
.cmdk {
  width: min(560px, 92vw); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: 0 12px 40px var(--shadow);
  overflow: hidden;
}
.cmdk input { width: 100%; border: none; border-bottom: 1px solid var(--hairline); padding: 13px 16px; font-size: 14.5px; border-radius: 0; }
.cmdk input:focus { box-shadow: none; }
.cmdk-list { max-height: 46vh; overflow-y: auto; padding: 6px 0; }
.cmdk-item { display: flex; gap: 10px; align-items: baseline; padding: 8px 16px; font-size: 13.5px; cursor: pointer; }
.cmdk-item.active, .cmdk-item:hover { background: var(--navy-soft); }
.cmdk-item .cmdk-kind { font-family: var(--font-num); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); min-width: 64px; }
.cmdk-item .gs-code { display: inline-flex; align-items: center; }
.cmdk-item mark { background: var(--gold-soft); color: var(--ink); padding: 0 1px; }
.searchbox { position: relative; width: 100%; max-width: 320px; }
.searchbox .search-ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.searchbox input { padding-left: 30px; }
.gs-dd, .dd-pop {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 2px;
  box-shadow: 0 8px 28px var(--shadow);
  max-height: 320px; overflow-y: auto;
}
.gs-item, .dd-item { padding: 8px 12px; font-size: 13px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.gs-item.active, .gs-item:hover, .dd-item:hover { background: var(--navy-soft); }
.gs-kind { font-family: var(--font-num); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* ---------- toasts ---------- */
.toasts {
  position: fixed; bottom: 18px; right: 18px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px; max-width: min(380px, 90vw);
}
.toast {
  background: var(--surface); border: 1px solid var(--hairline);
  padding: 10px 14px; font-size: 13px; border-radius: 2px;
  box-shadow: 0 6px 24px var(--shadow);
  animation: toast-in .18s ease-out;
}
.toast.error { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.toast.ok { border-color: var(--green); background: var(--green-soft); color: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
.toast a { text-decoration: underline; }

/* ---------- user menu ---------- */
.user-menu { position: relative; }
.user-chip {
  appearance: none; background: none; border: 1px solid var(--hairline);
  border-radius: 2px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; font-size: 13px;
}
.user-chip:hover { border-color: var(--ink); }
.user-ava {
  width: 24px; height: 24px; border-radius: 2px;
  background: var(--ink); color: var(--ground);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dd {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 70;
  min-width: 220px; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 2px;
  box-shadow: 0 8px 28px var(--shadow);
  padding: 6px 0;
}
.user-dd a, .user-dd button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 8px 14px; font-size: 13px; color: var(--ink); cursor: pointer;
}
.user-dd a:hover, .user-dd button:hover { background: var(--navy-soft); color: var(--ink); text-decoration: none; }
.user-dd-mail { padding: 6px 14px 8px; font-size: 11.5px; color: var(--faint); border-bottom: 1px solid var(--hairline-soft); margin-bottom: 4px; }
.sess-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.sess-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.lang-slot { display: inline-flex; gap: 4px; }
.lang-slot button {
  appearance: none; background: none; border: 1px solid transparent; cursor: pointer;
  font-family: var(--font-num); font-size: 11px; letter-spacing: 0.06em;
  color: var(--faint); padding: 2px 6px; border-radius: 2px;
}
.lang-slot button.active { color: var(--ink); border-color: var(--ink); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); margin-top: 40px; }
.footer-inner {
  max-width: 1440px; margin: 0 auto; padding: 18px 24px 28px;
  display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline;
  font-size: 12px; color: var(--muted);
}
.footer-brand { font-family: var(--serif); font-weight: 600; color: var(--ink); letter-spacing: 0.04em; }
.footer-note { max-width: var(--measure); }
.footer-meta { margin-left: auto; font-size: 11.5px; color: var(--faint); }

/* ---------- mobile tab bar ---------- */
.mtabbar { display: none; }
@media (max-width: 640px) {
  .container, .report-body { padding: 14px 14px 84px; }
  .report-head-inner, .footer-inner { padding-left: 14px; padding-right: 14px; }
  .report-nav { gap: 14px; overflow-x: auto; flex-wrap: nowrap; }
  .report-nav::-webkit-scrollbar { height: 0; }
  .brand-sub { display: none; }
  .mtabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--surface); border-top: 1px solid var(--rule);
  }
  .mtabbar a, .mtabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 7px 2px 9px; font-size: 11px; color: var(--muted);
    background: none; border: none; cursor: pointer;
  }
  .mtabbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .mtabbar a[aria-current="page"] { color: var(--gold); }
  .footer { padding-bottom: 76px; }
}

/* ---------- market strip ---------- */
.mkt-strip-wrap { border-bottom: 1px solid var(--hairline); background: var(--surface); }
.mkt-strip { max-width: 1440px; margin: 0 auto; padding: 0 24px; display: flex; overflow-x: auto; }
.mkt-strip::-webkit-scrollbar { height: 0; }
.mkt-card {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 18px 9px 0; margin-right: 18px;
  border-right: 1px solid var(--hairline-soft);
  white-space: nowrap; font-size: 12.5px;
  color: var(--ink); text-decoration: none;
}
.mkt-card:last-child { border-right: none; }
.mkt-card:hover { text-decoration: none; background: var(--hover); }
.mk-left { display: inline-flex; align-items: baseline; gap: 8px; }
.mk-name { color: var(--muted); font-size: 12px; }
.mk-val { font-family: var(--font-num); font-size: 13px; }
.mk-chg { font-size: 11.5px; }
.mk-asof { color: var(--faint); font-size: 11px; }
.mk-asof.stale { color: var(--red); }
.mkt-loading { padding: 10px 24px; color: var(--muted); font-size: 12.5px; }

/* ---------- modal (app.js inputModal) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay); padding: 20px;
}
.modal-box {
  background: var(--surface); border: 1px solid var(--hairline);
  width: 100%; max-width: 420px; padding: 18px 20px;
}
.modal-box h3 { font-size: 15px; margin: 0 0 10px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
code.temp-pass { font-family: var(--font-num); font-size: 13px; background: var(--hover); padding: 2px 8px; border-radius: 2px; }

/* ---------- screener shared ---------- */
.filters .fgroup { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; min-height: 30px; }
.check-row { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.check-row input { width: auto; margin: 0; accent-color: var(--ink); }
/* .filters input min-width must not stretch radio/checkbox inputs */
.filters .check-row input { min-width: 0; width: auto; }
.fbar-actions { display: flex; gap: 8px; align-items: flex-end; margin-left: auto; }
.tbl-compact th, .tbl-compact td { padding: 5px 10px 5px 0; }
.tbl-compact td { white-space: nowrap; }
.tbl-sticky thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; }
.tbl .cell-sub { max-width: 240px; }
.pager { display: flex; gap: 8px; align-items: center; padding: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.preset-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--hairline); border-radius: 2px;
  padding: 3px 10px; font-size: 12px; color: var(--ink);
  background: var(--surface); cursor: pointer;
}
.preset-chip:hover { border-color: var(--ink); text-decoration: none; }
.preset-chip.preset-active { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.preset-run, .preset-x {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-num); font-size: 11px; color: inherit; opacity: 0.7;
}
.spark-cell { min-width: 100px; }
.sk-row { height: 14px; }

/* ---------- watchlist shared ---------- */
.wl-kind-chip {
  display: inline-block; font-family: var(--font-num); font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink); border: 1px solid var(--hairline); padding: 0 4px; margin-left: 6px; vertical-align: 1px;
}

/* ---------- auth/account/admin shared ---------- */
.auth-wrap .btn[type="submit"] { width: 100%; }
.acc-form { max-width: 380px; }
.adm-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-bottom: 10px; }
.adm-tools input { max-width: 280px; }
.adm-tools input[type="number"] { max-width: 150px; }
.tbl .adm-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tbl .log-msg { color: var(--muted); font-size: 12px; }

/* calendar (report rebuild) */
.cal-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px;
  align-items: start; margin-top: 26px;
}
@media (max-width: 980px) { .cal-layout { grid-template-columns: 1fr; } }
.cal-title { font-size: 14px; font-weight: 500; }
.cal-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 8px 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 12.5px; color: var(--muted);
}
.cal-banner a { font-weight: 500; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline);
}
.cal-dow {
  padding: 6px 10px 5px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--rule);
  font-family: var(--font-num); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink);
}
.cal-day {
  min-height: 76px; padding: 8px 10px 7px;
  border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 3px;
  cursor: pointer; background: var(--surface);
}
.cal-day:hover { background: var(--hover); }
.cal-day.out { background: var(--ground); cursor: default; }
.cal-day.out .cd-num { color: var(--faint); }
.cd-num { font-family: var(--font-num); font-size: 12.5px; color: var(--ink); }
.cal-day.today .cd-num {
  font-weight: 700; text-decoration: underline;
  text-decoration-color: var(--gold); text-underline-offset: 3px;
}
.cal-day.selected { background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.cd-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cal-dots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.cal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cal-dot.report { background: var(--ink); }
.cal-dot.dividend { background: var(--green); }
.cal-dot.coupon { background: var(--gold); }
.cal-dot.announcement { background: var(--muted); }
.cal-dot.fact { background: var(--faint); }
.cal-dot.redemption { background: var(--red); }
.legend-rows { display: block; }
.legend-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--hairline-soft);
  font-size: 13px; color: var(--ink);
}
.legend-row:last-child { border-bottom: none; }

/* admin (report rebuild) */
.an-stats { margin-top: 0; }
.an-bar { display: inline-block; height: 10px; min-width: 2px; background: var(--green); vertical-align: middle; }
#adm-analytics .card-head { margin-bottom: 4px; }
#adm-analytics .tbl + .card-head, #adm-analytics .empty + .card-head { margin-top: 18px; }

/* ---------- dashboard (report rebuild) ---------- */
.report-main { min-width: 0; }
#svodka .hero-cards { border: 1px solid var(--hairline); border-right: none; }
#session-seal { font-size: 11.5px; }
.grid.cols-3 .card { display: flex; flex-direction: column; }
.grid.cols-3 .card .table-wrap { flex: 1; }
.grid.cols-3 .card .doc-foot { margin-top: auto; }
.events-list { display: flex; flex-direction: column; }
.ev-row {
  display: flex; align-items: baseline; gap: 14px;
  padding: 8px 2px; border-bottom: 1px solid var(--hairline-soft);
  color: inherit; font-size: 13px;
}
a.ev-row:hover { text-decoration: none; background: var(--hover); }
a.ev-row:hover .ev-title { color: var(--gold-text); }
.ev-date { color: var(--muted); font-size: 12px; min-width: 76px; }
.ev-kind { color: var(--muted); min-width: 96px; }
.ev-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .ev-row { flex-wrap: wrap; gap: 8px; }
  .ev-title { flex-basis: 100%; white-space: normal; }
}

/* ---------- report rebuild: shared form/picker additions ---------- */
.page-head select { width: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field-err { color: var(--red); font-size: 12px; margin-top: 4px; }
.dd { position: relative; }
.dd input { width: 100%; }
.filters .dd { flex: 1 1 260px; }
.dd-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* portfolio (report rebuild) */
table.tbl tfoot td, .table-wrap table tfoot td {
  padding: 8px 10px 8px 0;
  border-top: 1px solid var(--rule);
  border-bottom: none;
  font-weight: 600;
}
table.tbl tfoot td.num, .table-wrap table tfoot td.num { font-family: var(--font-num); }
.pf-tx-expander {
  appearance: none; background: none; border: none; cursor: pointer;
  font-family: var(--font-num); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); padding: 2px 0;
}
.pf-tx-expander:hover { color: var(--ink); }
.pf-tx-list td { white-space: nowrap; }
.pf-tx-list td > span + span { margin-left: 16px; }
.pf-tx-del {
  appearance: none; background: none; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; color: var(--red); font-size: 13px; line-height: 1; padding: 1px 7px;
  margin-left: 14px;
}
.pf-tx-del:hover { border-color: var(--red); }
.alloc-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 4px 24px; align-items: center; }
@media (max-width: 800px) { .alloc-wrap { grid-template-columns: 1fr; } }
.alloc-chart { width: 100%; height: 260px; }
.donut-legend { display: flex; flex-direction: column; }
.donut-row {
  display: flex; align-items: baseline; gap: 10px; padding: 6px 0;
  border-bottom: 1px solid var(--hairline-soft); font-size: 13px;
}
.donut-row:last-child { border-bottom: none; }
.dl-swatch { width: 10px; height: 10px; flex: none; display: inline-block; }
.dl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-pct { margin-left: auto; min-width: 62px; text-align: right; }
.dl-val { color: var(--muted); min-width: 110px; text-align: right; }
.donut-others { padding-top: 6px; font-size: 11.5px; color: var(--faint); }

/* watchlist (report rebuild) */
.spark-sm { display: inline-block; min-width: 96px; }
.range-bar { position: relative; height: 4px; width: 100%; background: var(--hairline-soft); }
.range-bar .rb-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--ink); }
.range-bar .rb-dot {
  position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); border: 1px solid var(--surface);
  transform: translate(-50%, -50%);
}
.range-labels {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 4px; font-size: 11px; color: var(--faint);
}
.wl-alert-btn {
  appearance: none; background: none; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; color: var(--faint); width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.wl-alert-btn svg { width: 16px; height: 16px; }
.wl-alert-btn:hover { color: var(--ink); background: var(--navy-soft); }
.wl-alert-btn.has { color: var(--gold-text); }

/* compare (report rebuild) */
.cmp-picker { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.cmp-picker .dd { flex: 1 1 280px; max-width: 520px; }
.picked-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 32px; padding-top: 3px; }
.chip-x {
  appearance: none; background: none; border: none; cursor: pointer;
  color: var(--faint); font-size: 13px; line-height: 1; padding: 0 0 0 3px;
}
.chip-x:hover { color: var(--red); }
.chart-box.is-empty { height: auto; min-height: 0; }
.chart-box.is-empty .empty { padding: 22px 0; }
.tv-legend { min-height: 18px; font-size: 12px; color: var(--muted); padding: 0 2px 6px; }
.tv-legend b { color: var(--ink); font-family: var(--font-num); font-weight: 500; }

/* ---------- screener (report rebuild) ---------- */
.scr-filters { padding: 12px 14px 2px; border-bottom: none; }
.scr-filters .field { margin: 0 0 10px; }
.scr-presets {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 0 0;
}
.scr-search { flex: 1 1 280px; min-width: 280px; max-width: 480px; }
.scr-search-row { display: flex; gap: 6px; align-items: center; }
.scr-search-row input[type="text"] { flex: 1; min-width: 260px; }
.scr-search .scr-q-clear { flex-shrink: 0; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--ink); }
.tbl th.sortable.sorted { color: var(--ink); }
.tbl th.sortable.sort-asc::after { content: "↑"; margin-left: 4px; color: var(--gold-text); }
.tbl th.sortable.sort-desc::after { content: "↓"; margin-left: 4px; color: var(--gold-text); }

/* ---------- news (report rebuild) ---------- */
.card .filters { border-bottom: none; padding: 2px 0 6px; }
.card .filters .field { margin: 0; }
.news-relevance { white-space: normal; margin: -2px 0 8px; }
.news-item h3 { font-family: var(--serif); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.news-title { font-size: 16px; font-weight: 600; }
.news-meta { align-items: baseline; }
.news-meta .ndot { color: var(--faint); }

/* ---------- ticker (report rebuild) ---------- */
/* page head: serif issuer title, quote row, actions */
.tk-pagehead { align-items: flex-start; }
.tk-pagehead > .small { color: var(--muted); padding-top: 6px; }
.tk-head { flex: 1; min-width: 0; }
.tk-id-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tk-title { font-size: 26px; letter-spacing: -0.01em; }
.tk-code.ticker-code { font-size: 15px; }
.tk-isin { font-family: var(--font-num); font-size: 11.5px; letter-spacing: 0.04em; }
.tk-price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.tk-price { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }
.tk-chg { font-size: 14px; }
.tk-close-ref { font-size: 12px; }
.tk-meta { display: flex; gap: 20px; margin-left: auto; font-size: 11px; color: var(--muted); }
.tk-meta span { display: flex; flex-direction: column; gap: 1px; }
.tk-meta b { font-weight: 500; color: var(--ink); font-family: var(--font-num); }
.tk-actions { display: inline-flex; gap: 6px; }
.bond-facts {
  display: flex; gap: 8px 22px; flex-wrap: wrap; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--hairline);
  font-size: 12px; color: var(--muted); letter-spacing: 0.02em;
}
.bond-facts b { font-family: var(--font-num); font-weight: 600; color: var(--ink); }

/* chart exhibit: interval bar lifted off the paper tone */
#tv-interval-bar { background: var(--surface); border: 1px solid var(--hairline); border-radius: 2px; padding: 2px 5px; }
.ind-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12.5px; padding: 5px 10px; cursor: pointer; }
.ind-row:hover { background: var(--hover); }
.switch {
  position: relative; width: 26px; height: 15px; flex-shrink: 0;
  border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface);
}
.switch::after {
  content: ""; position: absolute; top: 1px; left: 1px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--faint); transition: left .15s ease;
}
.switch.on { background: var(--ink); border-color: var(--ink); }
.switch.on::after { left: 12px; background: var(--ground); }
.ind-pop {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 2px;
  min-width: 200px; padding: 4px 0;
  box-shadow: 0 8px 28px var(--shadow);
}
.ind-pop[hidden] { display: none; }

/* tab panels as report sections */
.tk-tabpanel { margin-top: 16px; min-height: 200px; }
.tk-sec-title {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  padding-bottom: 8px; border-bottom: 1px solid var(--rule); margin-bottom: 14px;
}
.tk-tabpanel h3 { font-family: var(--serif); font-size: 15px; }
.tk-tabpanel .source-note, .tk-tabpanel .fin-note, .tk-tabpanel .disclaimer {
  border-top: 1px solid var(--hairline-soft); margin-top: 12px; padding-top: 7px;
  font-size: 11.5px; color: var(--muted);
}
.disclaimer { max-width: var(--measure); }
.tk-hist summary { cursor: pointer; font-size: 13px; font-weight: 500; padding: 6px 0; color: var(--ink); }
.tk-hist[open] > summary { margin-bottom: 8px; }
.tk-52w { margin-top: 16px; max-width: 420px; }
.tk-52w-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.range-bar { position: relative; height: 6px; background: var(--hairline-soft); }
.rb-fill { position: absolute; top: 0; height: 100%; background: var(--hairline); }
.rb-dot {
  position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; background: var(--ink); border: 2px solid var(--surface);
}
.range-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.fin-tabs { margin-bottom: 12px; }
.gov-badge { font-size: 11px; }
.empty-state { padding: 24px 0; }
.es-title { font-family: var(--serif); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.es-sub { font-size: 12.5px; color: var(--muted); }
.news-list { display: flex; flex-direction: column; }
.news-summary { font-size: 12.5px; color: var(--muted); margin-top: 3px; max-width: var(--measure); }

/* analysis passport sections */
.an-sec { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.an-sec:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.an-sec > h3 { font-family: var(--serif); font-size: 16px; margin-bottom: 10px; }
.an-sub { font-family: var(--font-num); font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.06em; }
.an-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.an-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  border: 1px solid var(--hairline); background: var(--surface);
  padding: 5px 10px; font-size: 12px;
}
.an-chip-l { color: var(--muted); font-size: 11px; }
.an-chip-v { font-weight: 600; font-size: 12.5px; }
.an-na { color: var(--faint); }
.an-na-block { color: var(--muted); font-size: 13px; padding: 12px 0; }
.an-na-note { font-size: 11px; color: var(--faint); }
.an-active { font-size: 12.5px; margin-bottom: 10px; }
.an-active b { font-weight: 600; }
.an-note { font-size: 12px; color: var(--muted); margin-top: 8px; max-width: var(--measure); }
.an-quote { margin: 6px 0 0; padding: 6px 10px; border-left: 2px solid var(--hairline); font-size: 12.5px; color: var(--muted); }
.an-trigger {
  font-family: var(--font-num); font-size: 11px; color: var(--faint);
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.an-pcts { margin-top: 10px; }
.an-pct-row {
  display: grid; grid-template-columns: minmax(140px, 230px) 1fr 54px auto;
  gap: 10px; align-items: center; padding: 5px 0; font-size: 12.5px;
}
.an-pct-l { color: var(--muted); }
.an-pct-bar { position: relative; height: 8px; background: var(--hairline-soft); }
.an-pct-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.an-pct-fill.up { background: var(--green); }
.an-pct-fill.down { background: var(--red); }
.an-pct-v { font-size: 12px; text-align: right; }
.an-you {
  font-family: var(--font-num); font-size: 11px; letter-spacing: 0.08em;
  color: var(--gold-text); border: 1px solid var(--gold); padding: 0 4px; margin-left: 4px;
}
tr.an-self { background: var(--gold-soft); }

/* technical rating block */
.tech-wrap { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.tech-wrap.compact { gap: 16px; align-items: center; }
.tech-gauge { flex-shrink: 0; }
.tech-verdict { font-family: var(--serif); font-size: 15px; font-weight: 600; margin-top: 2px; text-align: center; }
.tech-verdict.up { color: var(--green); }
.tech-verdict.down { color: var(--red); }
.tech-verdict.flat { color: var(--muted); }
.tech-counts { display: flex; gap: 14px; font-size: 12px; margin-top: 6px; }
.tech-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; flex: 1; min-width: 260px; }
@media (max-width: 860px) { .tech-tables { grid-template-columns: 1fr; } }
.tech-tbl td { font-size: 12.5px; }
.tech-sig { font-weight: 600; }
.tech-sig.up { color: var(--green); }
.tech-sig.down { color: var(--red); }
.tech-sig.flat { color: var(--muted); }

/* multi-horizon performance */
.perf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px 20px; }
.perf-cell { display: flex; flex-direction: column; gap: 3px; }
.perf-label {
  font-family: var(--font-num); font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.perf-val { font-size: 13px; font-weight: 600; }
.perf-bar { position: relative; height: 4px; background: var(--hairline-soft); }
.perf-bar i { position: absolute; top: 0; bottom: 0; background: var(--ink); }
.perf-bar i.up { background: var(--green); }
.perf-bar i.down { background: var(--red); }
.perf-bar i.flat { background: var(--hairline); }

/* mini bar charts (monthly returns etc.) */
.amb { margin-top: 8px; }
.amb-track { display: flex; align-items: stretch; }
.amb-cell { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.amb-plot { position: relative; height: var(--amb-h, 90px); }
.amb-zero { position: absolute; left: 0; right: 0; top: var(--zero, 50%); height: 1px; background: var(--hairline); }
.amb-bar { position: absolute; left: 24%; right: 24%; }
.amb-bar.pos { background: var(--green); }
.amb-bar.neg { background: var(--red); }
.amb-na {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  text-align: center; color: var(--faint); font-size: 11px;
}
.amb-l { font-size: 11px; color: var(--faint); text-align: center; overflow: hidden; white-space: nowrap; }

/* fundamentals */
.fund-figs { display: flex; flex-wrap: wrap; gap: 8px; }
.fund-fig {
  display: flex; flex-direction: column; gap: 2px; min-width: 120px;
  border: 1px solid var(--hairline); background: var(--surface); padding: 7px 12px;
}
.fund-fig.na { opacity: 0.6; }
.fund-fig-l { font-size: 11px; color: var(--muted); }
.fund-fig-v { font-size: 13.5px; font-weight: 600; }
.fund-chart-title { font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; }
.fund-chart { height: 220px; }
.fund-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 10px; }
@media (max-width: 860px) { .fund-minis { grid-template-columns: 1fr; } }
.fund-mini-chart { height: 150px; }
.fund-pct-verdict { font-size: 11px; color: var(--muted); }
.fund-pct-verdict.up { color: var(--green); }
.fund-pct-verdict.down { color: var(--red); }

/* Kapdepo widget */
.gi-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--hairline); margin-bottom: 10px; }
.gi-tabs button {
  appearance: none; background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 5px 10px 6px;
}
.gi-tabs button:hover { color: var(--ink); }
.gi-tabs button.active { color: var(--ink); border-bottom-color: var(--gold); }
.gi-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.gi-metric-row, .gi-freq-row { display: flex; gap: 4px; flex-wrap: wrap; }
.gi-metric-btn, .gi-freq-btn {
  appearance: none; background: none; border: 1px solid var(--hairline); border-radius: 2px;
  cursor: pointer; font-size: 11.5px; padding: 2px 9px; color: var(--muted);
}
.gi-metric-btn:hover, .gi-freq-btn:hover { color: var(--ink); }
.gi-metric-btn.active, .gi-freq-btn.active { color: var(--ink); border-color: var(--ink); background: var(--surface); }
.gi-chart { height: 260px; }
.gi-news { max-height: 340px; overflow-y: auto; }

/* order book */
.ob-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
@media (max-width: 760px) { .ob-wrap { grid-template-columns: 1fr; } }
.ob-head { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.ob-row {
  display: grid; grid-template-columns: 1fr 1.1fr 1.1fr 1.1fr; gap: 8px;
  font-size: 12px; padding: 2px 4px;
}
.ob-row span:nth-child(n+2) { text-align: right; }
.ob-colhead { color: var(--muted); font-size: 11px; padding-bottom: 3px; }
.ob-bid { background: linear-gradient(to right, var(--green-soft) var(--depth, 0%), transparent var(--depth, 0%)); }
.ob-ask { background: linear-gradient(to left, var(--red-soft) var(--depth, 0%), transparent var(--depth, 0%)); }
.ob-last { font-weight: 600; box-shadow: inset 2px 0 0 var(--ink); }
.ob-mid {
  display: flex; gap: 10px; align-items: baseline; padding: 6px 4px;
  font-size: 12.5px; border-top: 1px solid var(--hairline); margin-top: 6px;
}

/* bond schedule */
.tk-sched-wrap { max-height: 320px; overflow-y: auto; margin-top: 8px; }
.tk-bond-next { background: var(--gold-soft); }

/* side rail: grade chip on the quote facts */
.tk-grade-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tk-grade-score { font-family: var(--font-num); font-size: 11px; color: var(--muted); }

/* dashboard 3-up list exhibits: compact instrument column so price/delta fit */
.grid.cols-3 .tbl .cell-sub { max-width: 140px; font-size: 11px; }
.grid.cols-3 .tbl tbody td { padding-right: 8px; }
.grid.cols-3 .tbl th, .grid.cols-3 .tbl td { white-space: nowrap; }
.grid.cols-3 .tbl .cell-sub { max-width: 118px; }
.grid.cols-3 .tbl tbody td { padding-right: 6px; }
.grid.cols-3 .pill { padding: 1px 5px 2px; }
.grid.cols-3 .tbl td.num { padding-left: 4px; }

/* thin vertical separators between table columns */
table.tbl thead th, table.tbl tbody td,
.table-wrap table thead th, .table-wrap table tbody td {
  border-left: 1px solid var(--hairline-soft);
  padding-left: 10px;
}
table.tbl thead th:first-child, table.tbl tbody td:first-child,
.table-wrap table thead th:first-child, .table-wrap table tbody td:first-child {
  border-left: none;
  padding-left: 0;
}

/* narrow 3-up lists: keep all columns inside the card with separators on */
.grid.cols-3 .tbl thead th, .grid.cols-3 .tbl tbody td {
  padding-left: 6px;
  padding-right: 6px;
}
.grid.cols-3 .tbl .cell-sub { max-width: 96px; }
.grid.cols-3 .grade { margin-right: 4px; }
.grid.cols-3 .tbl .cell-sub { max-width: 84px; }
.grid.cols-3 .grade { margin-right: 3px; width: 20px; height: 20px; font-size: 11px; }

/* dashboard list rows: chip inline with code (halves row height) */
.code-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.code-line .cell-main { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-shell .grid.cols-3 .tbl .cell-sub { max-width: 150px; }
