/* v6 research pages — mobile-first, RTL, reuses desk.css variables */
.r-main { max-width: 1180px; margin: 0 auto; padding: 14px; display: grid; gap: 14px; }
.r-main .panel { margin: 0; padding: 16px; }
.r-main h2 { margin: 0; font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.up { color: var(--up); }
.down { color: var(--down); }
.warn { color: var(--warn); }
.big { font-size: 1.9rem; font-weight: 700; }
.r-nav { display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 20; scrollbar-width: none; }
.r-nav::-webkit-scrollbar { display: none; }
.r-nav a { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 0.88rem; min-height: 36px; display: inline-flex; align-items: center; }
.r-nav a[aria-current="page"] { background: var(--accent); color: var(--button-text); border-color: var(--accent); font-weight: 600; }
.r-note { padding: 12px 14px; border: 1px solid var(--warn); border-radius: 10px; background: color-mix(in srgb, var(--warn) 9%, var(--panel)); line-height: 1.9; font-size: 0.9rem; }
.src-line { color: var(--muted); font-size: 0.78rem; margin: 8px 0 0; overflow-wrap: anywhere; }
.src-line a, .sources a { color: inherit; }
.ai-box { border: 1px dashed var(--accent); border-radius: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--accent) 6%, var(--panel)); line-height: 2; white-space: pre-line; }
.ai-box .ai-tag { display: inline-block; font-size: 0.72rem; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; margin-bottom: 6px; white-space: normal; }
.filters { display: grid; gap: 10px; margin-bottom: 10px; }
.filters label { display: grid; gap: 4px; font-size: 0.82rem; color: var(--muted); }
.filters input { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.filters button { min-height: 42px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.chips button { min-height: 32px; padding: 2px 12px; border-radius: 999px; font-size: 0.82rem; }
.chips button[aria-pressed="true"] { background: var(--accent); color: var(--button-text); border-color: var(--accent); }
.chips a { font-size: 0.82rem; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; }
/* disclosures */
.disc-list, .news-list, .ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.disc { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface); display: grid; gap: 6px; min-width: 0; }
.disc-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 0.82rem; color: var(--muted); }
.disc-top a.co { color: var(--text); font-weight: 600; text-decoration: none; }
.disc-top a.co:hover { text-decoration: underline; }
.disc h3 { margin: 0; font-size: 0.97rem; line-height: 1.8; font-weight: 500; overflow-wrap: anywhere; }
.disc .why { border-inline-start: 3px solid var(--accent); padding: 4px 10px; background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 0 6px 6px 0; }
.disc .why b { color: var(--accent); font-size: 0.8rem; display: block; }
.disc .why small { color: var(--muted); font-size: 0.72rem; }
.disc .pending { color: var(--muted); font-size: 0.8rem; }
.disc .orig { font-size: 0.82rem; justify-self: start; }
.tag { display: inline-block; font-size: 0.72rem; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.t-div { color: var(--up); border-color: currentColor; }
.tag.t-res { color: var(--accent); border-color: currentColor; }
/* news */
.news-item { border-bottom: 1px solid var(--line); padding: 8px 0; display: grid; gap: 2px; }
.news-item a { color: var(--text); text-decoration: none; font-weight: 500; line-height: 1.8; overflow-wrap: anywhere; }
.news-item a:hover { text-decoration: underline; }
.news-item small { color: var(--muted); font-size: 0.76rem; }
/* global */
.g-groups { display: grid; gap: 14px; }
.g-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.g-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); display: grid; gap: 2px; min-width: 0; }
.g-card .nm { font-weight: 600; font-size: 0.84rem; overflow-wrap: anywhere; }
.g-card .sy { color: var(--muted); font-size: 0.7rem; direction: ltr; text-align: end; }
.g-card .px { font-size: 1.15rem; font-weight: 700; }
.g-card .ch { font-size: 0.84rem; }
.g-card .tm { color: var(--muted); font-size: 0.7rem; }
.fresh { display: inline-block; font-size: 0.7rem; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); justify-self: start; }
.fresh.realtime { color: var(--up); border-color: currentColor; }
.fresh.delayed { color: var(--warn); border-color: currentColor; }
.fresh.stale, .fresh.gap { color: var(--down); border-color: currentColor; }
/* events */
.ev { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface); display: grid; gap: 2px; }
.ev time { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; font-size: 0.85rem; }
.ev small { color: var(--muted); font-size: 0.76rem; }
/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.r-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.r-table th, .r-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
.r-table th { color: var(--muted); font-weight: 500; font-size: 0.78rem; }
.r-table td a { color: var(--text); }
.imp-High { color: var(--down); font-weight: 600; }
.imp-Medium { color: var(--warn); }
/* company */
.co-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.co-title h1 { margin: 0; font-size: 1.5rem; }
.co-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 6px; }
.chart { margin: 12px 0 0; }
.chart svg { width: 100%; height: 180px; display: block; background: var(--surface); border-radius: 8px; border: 1px solid var(--line); }
.chart polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .area { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: none; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 10px 0 0; }
.kv div { min-width: 0; }
.kv dt { color: var(--muted); font-size: 0.76rem; }
.kv dd { margin: 0; font-weight: 600; }
.ratio-grid { display: grid; gap: 10px; }
.ratio { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); display: grid; gap: 3px; }
.ratio header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ratio .v { font-size: 1.2rem; font-weight: 700; }
.ratio p { margin: 0; font-size: 0.84rem; line-height: 1.8; }
.ratio small { color: var(--muted); font-size: 0.72rem; }
h3.sub { font-size: 0.92rem; margin: 12px 0 4px; color: var(--muted); }
.data-used { margin-top: 10px; font-size: 0.8rem; }
.data-used pre { white-space: pre-wrap; overflow-wrap: anywhere; direction: ltr; text-align: left; background: var(--surface); padding: 10px; border-radius: 8px; max-height: 320px; overflow: auto; font-size: 0.74rem; }
.sources { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 0.84rem; color: var(--muted); }
@media (min-width: 720px) {
  .r-main { padding: 20px; gap: 18px; }
  .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ratio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr auto; align-items: end; }
  .chart svg { height: 240px; }
}
@media (min-width: 1040px) {
  .g-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ratio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* v7 tasi (SAHMK) */
.t-two { display: grid; gap: 16px; }
@media (min-width: 980px) { .t-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.breadth { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin-top: 12px; background: var(--line); }
.breadth .b-up { background: var(--up); } .breadth .b-down { background: var(--down); } .breadth .b-flat { background: var(--muted); opacity: .5; }
.co-prof { margin-top: 4px; }
.breadth span { display: block; height: 100%; }
#t-kv dd { text-align: right; }

/* v9 bot */
.r-table td.why { white-space: normal; min-width: 300px; line-height: 1.7; }
.r-table td.up, .r-table .num.up { color: var(--up, #3fb68b); }
.r-table td.down, .r-table .num.down { color: var(--down, #e5646b); }

/* Labs LAB-008/LAB-009 (2026-10-20): page title is the header h1; scrollable tables are focusable regions */
.brand .brand-h1 { margin: 0; font-size: 18px; font-weight: 700; line-height: inherit; letter-spacing: inherit; }
@media (max-width: 560px) { .brand .brand-h1 { font-size: 16px; } }
.table-wrap[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---- v11 hub pages ---- */
.kv.kv4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kv.kv4 dd { overflow-wrap: anywhere; }
.res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.res h3 .per { color: var(--accent); font-weight: 600; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.res-grid .rk { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.res-grid .rk span { color: var(--muted); font-size: 0.74rem; }
.res-grid .rk b { font-size: 1rem; }
.res-grid .rk small { font-size: 0.74rem; }
.res .reason summary { cursor: pointer; font-size: 0.8rem; color: var(--muted); }
.res .reason p { margin: 6px 0 0; line-height: 1.9; font-size: 0.86rem; }
.res-act { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.star { min-height: 32px; padding: 2px 12px; border-radius: 999px; font-size: 0.8rem; }
.star[aria-pressed="true"] { color: var(--warn); border-color: var(--warn); }
.tag.up { color: var(--up); border-color: currentColor; }
.tag.down { color: var(--down); border-color: currentColor; }
.tag.warn, .tag.t-warn { color: var(--warn); border-color: currentColor; }
.tag.muted { opacity: 0.75; }
.ipo-grid, .watch-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ipo, .watch { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface); display: grid; gap: 6px; min-width: 0; align-content: start; }
.ipo h3, .watch h3 { margin: 0; font-size: 0.98rem; line-height: 1.7; overflow-wrap: anywhere; }
.ipo .kv .wide { grid-column: 1 / -1; }
.ipo .orig, .watch a { font-size: 0.82rem; overflow-wrap: anywhere; }
.watch .rm { margin-inline-start: auto; min-height: 30px; padding: 0 10px; font-size: 0.78rem; }
.ev-list .ev { border-bottom: 1px solid var(--line); padding: 8px 0; line-height: 1.8; overflow-wrap: anywhere; }
.ev-list .ev time { color: var(--muted); font-size: 0.8rem; margin-inline-end: 8px; }
.stat-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 4px; background: var(--surface); }
.stat b { font-size: 1.5rem; text-align: start; }
.stat span { color: var(--muted); font-size: 0.82rem; line-height: 1.6; }
.r-table th.fc, .r-table td.fc { background: color-mix(in srgb, var(--warn) 7%, transparent); }
.r-table td.wrap { white-space: normal; min-width: 180px; line-height: 1.6; }
.r-table td.small { font-size: 0.74rem; color: var(--muted); white-space: normal; min-width: 150px; }
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.heat .cell { border-radius: 8px; padding: 8px; min-height: 64px; display: grid; align-content: space-between; gap: 4px; color: #fff; font-size: 0.78rem; line-height: 1.4; }
.heat .cell b { font-size: 0.95rem; }
.tg { border-color: #229ed9; }
.tg-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; background: #229ed9; color: #fff; text-decoration: none; font-weight: 600; }
.small { font-size: 0.84rem; }
.th-sort { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; min-height: 28px; }
input.mini { width: 96px; min-height: 34px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
#ny-list a { font-size: 0.78rem; }

/* ---- v12 US market ---- */
.us-sub { margin: 0 0 12px; }
.us-sub a[aria-current="page"] { background: var(--accent); color: var(--button-text); border-color: var(--accent); }
.us-heat { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); grid-auto-flow: dense; }
.us-heat .cell { text-decoration: none; min-height: 58px; }
.us-heat .cell.s2 { grid-column: span 2; }
.us-heat .cell.s3 { grid-column: span 2; grid-row: span 2; font-size: 0.9rem; }
.us-heat .cell.s3 b { font-size: 1.2rem; }
.us-heat .cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.us-spark { width: 100%; height: 48px; display: block; }
.us-spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.us-fin td.num, .us-fin th.num { font-variant-numeric: tabular-nums; }
.us-fin td:first-child, .us-fin th:first-child { position: sticky; inset-inline-start: 0; background: var(--surface, var(--bg)); z-index: 1; }
.stat .small { font-size: 0.74rem; }
@media (max-width: 560px) { .us-heat { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); } .us-heat .cell.s3 { grid-row: span 1; } }
.r-main > * { min-width: 0; }
#uc-body:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
@media (min-width: 760px) { #uc-body:not([hidden]) { gap: 18px; } }
.r-page .kv dd.num { text-align: right; }
/* v12: statements keep real (scrollable) tables on phones; list tables become labelled cards */
@media (max-width: 560px) {
  .table-wrap:has(> table.us-fin) { overflow-x: auto; }
  table.us-fin { white-space: nowrap; }
  table.us-fin thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  table.us-fin tbody { display: table-row-group; }
  table.us-fin tbody tr { display: table-row; border: 0; padding: 0; }
  table.us-fin td, table.us-fin th { padding: 7px 6px; border-bottom: 1px solid var(--line); overflow-wrap: normal; }
  table.us-fin td:first-child { grid-column: auto; grid-row: auto; }
}
/* v13 live TV card on /tasi */
.live-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; line-height: 1.7; }
.live-card:hover, .live-card:focus-visible { border-color: var(--accent); }
.live-card b { color: var(--accent); }
.live-card .live-go { margin-inline-start: auto; color: var(--accent); font-weight: 700; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; flex: 0 0 auto; box-shadow: 0 0 0 0 rgba(229,72,77,.6); animation: livepulse 1.8s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.55); } 70% { box-shadow: 0 0 0 9px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
