/* v22 — clearer light typography, SVG market flags, red detail history chart */
.market-flag{display:inline-flex;align-items:center;justify-content:center;width:32px;height:24px;border-radius:6px;overflow:hidden;box-shadow:0 0 0 1px rgba(120,137,158,.25),0 2px 7px rgba(10,25,45,.08);background:#fff;vertical-align:middle;flex:0 0 auto}
.market-flag svg{display:block;width:100%;height:100%}
.market-flag.compact{width:26px;height:19px;border-radius:5px;margin-right:7px}
.market-badge{background:transparent!important;color:inherit!important;border:0!important;box-shadow:none!important}
.market-badge .market-flag{width:38px;height:28px;border-radius:7px}
.stock>.market-flag{grid-column:1;grid-row:1/4;align-self:center;justify-self:center}
#detailMarket{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.detail-market-name{font-weight:700;letter-spacing:.02em;color:inherit}

/* Readability fixes for the light theme. */
html[data-theme="light"] .catalog-company:after{color:#087b70!important;font-weight:700!important;letter-spacing:.005em;text-shadow:none!important}
html[data-theme="light"] .catalog-company b{color:#15283d!important;font-weight:800!important}
html[data-theme="light"] .catalog-company span{color:#293e55!important;font-weight:600!important}
html[data-theme="light"] .catalog-company small{color:#5f7185!important;font-weight:600!important}
html[data-theme="light"] .catalog-quote>b{color:#14263a!important;font-weight:800!important}
html[data-theme="light"] .catalog-quote>span:not(.up):not(.down){color:#64758a!important}
html[data-theme="light"] .session-badge{color:#50667b!important}
html[data-theme="light"] .page-head small,
html[data-theme="light"] .panel small,
html[data-theme="light"] .source small,
html[data-theme="light"] .detail-head small{color:#5e7187!important}
html[data-theme="light"] .detail-head h1{color:#122438!important}
html[data-theme="light"] .detail-head h1 em{color:#5a6f84!important}
html[data-theme="light"] .detail-price b{color:#122438!important}
html[data-theme="light"] .stat{background:#f8fafc!important;border-color:#d2dce6!important;box-shadow:0 3px 12px rgba(39,60,82,.05)!important}
html[data-theme="light"] .stat small{color:#61748a!important;font-weight:700!important}
html[data-theme="light"] .stat b{color:#172a3f!important;font-weight:800!important}
html[data-theme="light"] .history-head h2{color:#172a3f!important}
html[data-theme="light"] .history-head p{color:#607388!important}
html[data-theme="light"] .ranges{background:#edf2f7!important;border-color:#d0dae5!important}
html[data-theme="light"] .ranges button{color:#53677d!important;font-weight:700!important}
html[data-theme="light"] .ranges button.active{background:#e21d2f!important;color:#fff!important;box-shadow:0 3px 10px rgba(226,29,47,.18)!important}
html[data-theme="light"] .axis text{fill:#566b81!important;font-weight:600!important}
html[data-theme="light"] .axis line{stroke:#c8d4df!important}
html[data-theme="light"] .month{background:#f8fafc!important;border-color:#d2dce6!important}
html[data-theme="light"] .month small{color:#607388!important;font-weight:600!important}
html[data-theme="light"] .month b{font-weight:800!important}

/* User-approved fixed red accent for the large detail history chart only. */
#historyChart polyline{stroke:#e21d2f!important;stroke-width:3!important}
.history-area{fill:url(#historyFill)!important}

@media(max-width:900px){
  .market-badge .market-flag{width:34px;height:25px}
  .market-flag{width:30px;height:22px}
  html[data-theme="light"] .catalog-company b{font-size:.82rem!important}
  html[data-theme="light"] .catalog-company span{font-size:.76rem!important}
}

.tab-flag{display:inline-flex;width:21px;height:15px;border-radius:3px;overflow:hidden;vertical-align:-2px;margin-right:5px;box-shadow:0 0 0 1px rgba(100,120,145,.2)}
.tab-flag svg{display:block;width:100%;height:100%}
