/* iAnalyze: navy and gold; colours from the theme so light and dark phones both read well */
:root { --acc: #E2A93B; --deep: #13294B; --bg: #F4F6FA; --panel: #fff; --line: #DDE3EC; --ink: #16202E; --muted: #5B6778;
  --up: #1E7D4F; --down: #B42318; --bar: #3D6FB6; --bar2: #9DB6D9; --note: #FFF6E0; --notei: #7A5200; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #0B1220; --panel: #121C2E; --line: #24334D; --ink: #E8EEF7; --muted: #A3B0C4; --up: #6FD39A; --down: #FF9A90; --bar: #6E9BDB; --bar2: #33507E; --note: #3A2C0E; --notei: #FFD27A; }
}
body { background: var(--bg); color: var(--ink); }
.top { background: var(--deep); color: #fff; }
.top .brand small { color: #F2CF86; }
.tabs { display: flex; gap: 6px; padding: 8px 14px 0; background: var(--bg); position: sticky; top: 0; z-index: 5; overflow-x: auto; }
.tabs button { flex: 1; min-width: 96px; font: inherit; font-weight: 600; padding: 9px 10px; border-radius: 12px 12px 0 0; border: 1px solid var(--line); border-bottom: 0; background: var(--panel); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--deep); background: var(--acc); border-color: var(--acc); }
@media (prefers-color-scheme: dark) { .tabs button[aria-selected="true"] { color: #13294B; } }
main { padding: 12px 14px 48px; }
@media (min-width: 760px) { main, .tabs { max-width: 920px; margin: 0 auto; } }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; }
.box h2 { font-size: 1.02rem; margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: .9rem; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--deep); color: #fff; border-color: var(--deep); }
@media (prefers-color-scheme: dark) { .chips button[aria-pressed="true"] { background: var(--acc); color: #13294B; border-color: var(--acc); } }
.chips .grp { width: 100%; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 4px; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.head .px { font-size: 1.6rem; font-weight: 800; }
.head .chg { font-weight: 700; }
.up { color: var(--up); } .down { color: var(--down); }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart text { fill: var(--muted); font-size: 22px; }
.chart .grid { stroke: var(--line); }
.chart .ln { fill: none; stroke: var(--bar); stroke-width: 2; }
.chart .area { fill: var(--bar); opacity: .12; }
.chart .dot { fill: var(--acc); stroke: var(--panel); stroke-width: 2; }
.chart .cross { stroke: var(--muted); stroke-dasharray: 3 3; }
.readout { font-size: .85rem; color: var(--muted); min-height: 1.3em; margin: 4px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; }
.tile small { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
.tile b { font-size: 1.05rem; color: var(--ink); } .tile span { display: block; font-size: .78rem; color: var(--muted); }
.gb { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 2px solid var(--acc); border-radius: 14px; padding: 12px; margin: 10px 0; }
.gb img { width: 52px; height: 52px; flex: none; }
.gb p { margin: 0; line-height: 1.5; } .gb small { display: block; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.note { background: var(--note); color: var(--notei); border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: .92rem; line-height: 1.45; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.t td.n { text-align: right; font-variant-numeric: tabular-nums; }
.balls { display: flex; flex-wrap: wrap; gap: 5px; }
.ball { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--deep); color: #fff; font-weight: 700; font-size: .85rem; }
@media (prefers-color-scheme: dark) { .ball { background: var(--acc); color: #13294B; } }
.ball small { font-size: .6rem; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 620px) { .three { grid-template-columns: 1fr; } }
.three h3 { font-size: .9rem; margin: 0 0 6px; }
.three .sub { font-size: .78rem; color: var(--muted); margin: 6px 0 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.foot { margin-top: 24px; font-size: .8rem; color: var(--muted); }
.top .inst { font-weight: 700; }
@media (max-width: 440px) { .top .ilbl { display: none; } }
.tabs button { min-width: 82px; }
.story h2 { margin: 2px 0 6px; } .story p { margin: 0 0 6px; line-height: 1.5; } .story .why { background: var(--bg); border-radius: 8px; padding: 6px 9px; }
.links { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 5px; } .links a { color: var(--ink); }
.hb { display: grid; gap: 7px; }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 3px 0; }
.hrow .hl { grid-column: 1 / 3; } .hrow .hv { font-variant-numeric: tabular-nums; font-size: .88rem; white-space: nowrap; }
.hbar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; align-self: center; }
.hbar span { display: block; height: 100%; background: var(--bar2); border-radius: 99px; }
.hrow.won .hbar span { background: var(--bar); }
.hrow.cut { border-bottom: 2px dashed var(--acc); padding-bottom: 8px; margin-bottom: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .85rem; margin-bottom: 8px; } .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.rg { margin: 8px 0; } .rgl { display: flex; flex-direction: column; } .stack { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin-top: 4px; background: var(--bg); }
.c0 { background: #3D6FB6; } .c1 { background: #E2A93B; } .c2 { background: #2BA58A; } .c3 { background: #9AA5B1; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.btn { cursor: pointer; font: inherit; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.btn.pri { background: var(--deep); color: #fff; border-color: var(--deep); font-weight: 700; }
.linkb { background: none; border: 0; padding: 0; color: var(--bar); text-decoration: underline; cursor: pointer; font: inherit; }
select { font: inherit; padding: 7px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); max-width: 100%; }
details.paste { margin-top: 8px; } details.paste textarea { width: 100%; box-sizing: border-box; min-height: 110px; margin: 6px 0; font: inherit; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
details.col { border-top: 1px solid var(--line); padding: 8px 0; } details.col summary { cursor: pointer; } details.col .tiles { margin-top: 8px; }
.scroll { overflow-x: auto; } .scroll table.t td, .scroll table.t th { white-space: nowrap; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; } @keyframes sp { to { transform: rotate(360deg); } }
@media print { .top, .tabs, .row, details.paste, .foot button, .linkb { display: none !important; } .box { break-inside: avoid; } details.col { display: block; } }
.alerts { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; } .alerts li { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
#alv { width: 130px; font: inherit; padding: 7px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.head h2 { margin: 0; }
.donut { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; } .donut svg { width: 170px; height: 170px; flex: none; }
.donut .dl { fill: var(--muted); font-size: 16px; } .donut .dv { fill: var(--ink); font-size: 20px; font-weight: 800; }
.legend2 { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font-size: .9rem; } .legend2 i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend2.row2 { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.chart .axl { fill: var(--ink); font-weight: 600; }
.gb details.more { margin-top: 8px; } .gb details.more summary { cursor: pointer; color: var(--bar); font-weight: 600; font-size: .92rem; } .gb details.more p { margin-top: 6px; font-size: .94rem; color: var(--muted); }
.cap { margin: 2px 0 8px; font-weight: 600; line-height: 1.4; }
