/* Horus AI — lapis & brass identity, light/dark, Arabic RTL.
   Accent is user-configurable: JS sets --accent-user on :root. */
:root {
  --accent-user: #2C46A0;
  --bg: #F1F4F3; --surface: #FFFFFF; --surface-2: #E8ECEA; --line: #D3DBD8; --ink: #14201D; --muted: #5A6762;
  --accent: var(--accent-user);
  --accent-soft: color-mix(in srgb, var(--accent) 13%, var(--surface));
  --on-accent: #FFFFFF;
  --brass: #9A6F1C; --brass-soft: #F5ECD8;
  --up: #0D8558; --up-soft: #DCF1E7; --down: #BC3A27; --down-soft: #F8E0DB; --warn: #A86E12; --warn-soft: #FAEED6;
  --s1: var(--accent); --s2: #9A6F1C; --s3: #1C8585; --s4: #B0457A; --s5: #5E6E2A; --s6: #7A4FB5; --s7: #C0632B; --s8: #3F7FBF;
  --shadow: 0 1px 2px rgba(20, 32, 29, .06), 0 4px 16px rgba(20, 32, 29, .05);
  --f-display: "Readex Pro", "Noto Kufi Arabic", Tahoma, system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --f-num: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 12px;
  --side-w: 228px;
  --bottom-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1412; --surface: #141E1B; --surface-2: #1B2724; --line: #283632; --ink: #E5ECE9; --muted: #93A39D;
    --accent: color-mix(in srgb, var(--accent-user) 62%, #FFFFFF);
    --accent-soft: color-mix(in srgb, var(--accent-user) 30%, var(--surface));
    --on-accent: #0D1412;
    --brass: #D8AE5C; --brass-soft: #3A2F18;
    --up: #3DC48C; --up-soft: #11352A; --down: #F0765F; --down-soft: #3C1F1A; --warn: #E5AA48; --warn-soft: #3A2E15;
    --s2: #D8AE5C; --s3: #4FC3C3; --s4: #E48AB5; --s5: #A9BE5C; --s6: #B191E6; --s7: #EE9A62; --s8: #7FB3EA;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1412; --surface: #141E1B; --surface-2: #1B2724; --line: #283632; --ink: #E5ECE9; --muted: #93A39D;
  --accent: color-mix(in srgb, var(--accent-user) 62%, #FFFFFF);
  --accent-soft: color-mix(in srgb, var(--accent-user) 30%, var(--surface));
  --on-accent: #0D1412;
  --brass: #D8AE5C; --brass-soft: #3A2F18;
  --up: #3DC48C; --up-soft: #11352A; --down: #F0765F; --down-soft: #3C1F1A; --warn: #E5AA48; --warn-soft: #3A2E15;
  --s2: #D8AE5C; --s3: #4FC3C3; --s4: #E48AB5; --s5: #A9BE5C; --s6: #B191E6; --s7: #EE9A62; --s8: #7FB3EA;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; line-height: 1.3; text-wrap: balance; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.08rem; } h3 { font-size: .95rem; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); } .up { color: var(--up); } .down { color: var(--down); } .warn-t { color: var(--warn); }
.ic { flex: none; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 14px; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { font-family: var(--f-display); font-size: 1.15rem; letter-spacing: .05em; }
.brand small { color: var(--muted); font-size: .72rem; }
.search { position: relative; flex: 1; max-width: 420px; min-width: 0; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 8px 36px 8px 12px; }
.search .ic { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-results { position: absolute; inset: calc(100% + 4px) 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 320px; overflow: auto; z-index: 40; }
.search-results a { display: flex; gap: 10px; padding: 8px 12px; text-decoration: none; color: var(--ink); align-items: baseline; }
.search-results a:hover, .search-results a.on { background: var(--accent-soft); }
.top-actions { display: flex; gap: 8px; align-items: center; margin-inline-start: auto; }
.session-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; background: var(--surface-2); font-size: .8rem; white-space: nowrap; }
.session-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.session-pill.open i { background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); animation: pulse 1.6s infinite; }
.session-pill.demo i { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.icon-btn { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.ticker { border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ticker::-webkit-scrollbar { display: none; }
.ticker-in { display: flex; gap: 22px; padding-block: 6px; font-size: .8rem; white-space: nowrap; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ticker-in span { display: inline-flex; gap: 6px; align-items: baseline; }
.ticker .k { color: var(--muted); }
.demo-badge { color: var(--brass); background: var(--brass-soft); border-radius: 99px; padding: 0 8px; font-size: .72rem; }

.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100% - 100px); }
.side { position: sticky; top: 100px; align-self: start; height: calc(100vh - 100px); overflow-y: auto; padding: 14px 10px; border-inline-end: 1px solid var(--line); background: var(--surface); }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 500; }
.side a:hover { background: var(--surface-2); color: var(--ink); }
.side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.side .grp { font-size: .7rem; color: var(--muted); letter-spacing: .04em; margin: 14px 12px 4px; }
.side .badge { margin-inline-start: auto; background: var(--down); color: #fff; border-radius: 99px; font-size: .68rem; padding: 0 7px; font-family: var(--f-num); }
main { min-width: 0; padding-block: 20px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.main-in { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.main-in > *, .card > *, .grid > * { min-width: 0; }

.bottomnav { display: none; }
@media (max-width: 1023px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  main { padding-bottom: calc(var(--bottom-h) + 24px + env(safe-area-inset-bottom, 0px)); }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .bottomnav a, .bottomnav button { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; font-size: .7rem; color: var(--muted); text-decoration: none; border: 0; background: none; cursor: pointer; }
  .bottomnav [aria-current="page"] { color: var(--accent); }
  .brand small, .search-wide { display: none; }
}
@media (max-width: 640px) {
  .session-pill span { display: none; }
  .topbar-in { gap: 8px; }
  .search { max-width: none; }
}
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 50; display: grid; align-items: end; }
.sheet { background: var(--surface); border-radius: 16px 16px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet a { display: grid; justify-items: center; gap: 4px; padding: 12px 4px; border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: .8rem; }

/* ---------- building blocks ---------- */
.pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.pagehead p { color: var(--muted); max-width: 70ch; margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3, .g-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .g2 { grid-template-columns: minmax(0, 1fr); } }
.kpi { display: grid; gap: 2px; align-content: start; }
.kpi .lbl { color: var(--muted); font-size: .8rem; }
.kpi .val { font-size: 1.4rem; font-weight: 500; }
.kpi .sub { font-size: .78rem; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 99px; font-size: .76rem; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.chip.up { background: var(--up-soft); color: var(--up); }
.chip.up2 { background: color-mix(in srgb, var(--up-soft) 55%, var(--surface)); color: var(--up); border: 1px solid var(--up-soft); }
.chip.down { background: var(--down-soft); color: var(--down); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.acc { background: var(--accent-soft); color: var(--accent); }
.chip.brass { background: var(--brass-soft); color: var(--brass); }
.na { color: var(--muted); font-size: .76rem; border: 1px dashed var(--line); border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.spill { display: inline-block; min-width: 2.4em; text-align: center; border-radius: 7px; padding: 1px 6px; font-weight: 500; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.meter { display: inline-flex; align-items: center; gap: 7px; }
.meter i { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); flex: 1; position: relative; overflow: hidden; min-width: 34px; }
.meter i::after { content: ""; position: absolute; inset: 0 0 0 auto; width: var(--w); background: var(--c); border-radius: 3px; }
.meter b { font-weight: 500; font-size: .84rem; min-width: 1.8em; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.buy { background: var(--up); border-color: var(--up); color: #fff; }
.btn.sell { background: var(--down); border-color: var(--down); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.sm { padding: 4px 10px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 9px 14px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 9px; padding: 3px 10px; min-width: 0; }
.field label { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.field select, .field input { border: 0; background: transparent; padding: 5px 2px; min-width: 0; }
.field input[type="search"], .field input[type="text"] { width: 140px; }
.field input[type="range"] { accent-color: var(--accent); width: 110px; }
.input { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 10px; width: 100%; }
textarea.input { min-height: 140px; font-family: var(--f-num); font-size: .8rem; direction: ltr; }
label.lbl { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }

/* tables */
.tablewrap { overflow-x: auto; margin-inline: -16px; padding-inline: 16px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .85rem; }
th { text-align: right; font-weight: 500; color: var(--muted); font-size: .74rem; padding: 0; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; z-index: 1; }
th:not(:has(.th-sort)) { padding: 8px 9px; }
.th-sort { border: 0; background: none; width: 100%; text-align: inherit; padding: 8px 9px; cursor: pointer; color: inherit; font: inherit; display: inline-flex; gap: 4px; align-items: center; }
.th-sort:hover { color: var(--ink); }
.sort-ind { font-size: .6rem; color: var(--accent); }
td { padding: 8px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr[data-href] { cursor: pointer; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
table.sticky1 td:first-child, table.sticky1 th:first-child { position: sticky; right: 0; background: var(--surface); z-index: 2; box-shadow: -1px 0 0 var(--line); }
td .nm { display: block; color: var(--muted); font-size: .72rem; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.sym { font-family: var(--f-num); font-weight: 500; color: var(--accent); text-decoration: none; }
.empty { text-align: center; padding: 22px; }
td.c, th.c { text-align: center; }
.star { border: 0; background: none; cursor: pointer; color: var(--line); padding: 2px; }
.star.on { color: var(--brass); }
.star.on svg { fill: currentColor; }

.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 160px) minmax(0, 1fr) 4.2em; gap: 10px; align-items: center; font-size: .84rem; }
.bar-row .track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; position: relative; }
.bar-row .fill { position: absolute; inset: 0 0 0 auto; border-radius: 4px; background: var(--accent); }
.bar-row .v { font-family: var(--f-num); text-align: left; direction: ltr; }

.list { display: grid; gap: 8px; }
.reason { display: flex; gap: 9px; align-items: flex-start; font-size: .86rem; }
.reason .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.stat { background: var(--surface-2); border-radius: 9px; padding: 9px 11px; display: grid; gap: 1px; }
.stat small { color: var(--muted); font-size: .74rem; }
.stat b { font-family: var(--f-num); font-weight: 500; font-size: 1rem; }
.note { font-size: .8rem; color: var(--muted); }
.banner { border-radius: 10px; padding: 10px 14px; font-size: .86rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner.info { background: var(--accent-soft); color: var(--ink); }
.banner.warn { background: var(--warn-soft); color: var(--ink); }
.banner.ok { background: var(--up-soft); }
.banner.bad { background: var(--down-soft); }
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; direction: ltr; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
pre.code { direction: ltr; text-align: left; background: var(--surface-2); border-radius: 9px; padding: 12px; font-family: var(--f-num); font-size: .76rem; overflow: auto; margin: 0; line-height: 1.5; max-height: 320px; }
.chart { height: 400px; direction: ltr; }
@media (max-width: 600px) { .chart { height: 300px; } }
.svgchart { direction: ltr; overflow-x: auto; }
.svgchart svg { display: block; width: 100%; height: auto; min-width: 480px; }
svg text { font-family: var(--f-num); font-size: 10.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .78rem; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

/* modal & toast */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .4); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: min(460px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal.wide { width: min(760px, 100%); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal-b { padding: 16px; display: grid; gap: 12px; }
#toasts { position: fixed; z-index: 70; inset: auto 16px calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom, 0px)) auto; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
@media (min-width: 1024px) { #toasts { bottom: 20px; } }
.toast { background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 14px; font-size: .85rem; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; }
.toast.in { border-inline-start: 4px solid var(--up); }
.toast.out-flow { border-inline-start: 4px solid var(--down); }
.toast.warn { border-inline-start: 4px solid var(--warn); }
.toast.out { opacity: 0; transform: translateY(8px); }
.update-bar { position: fixed; inset: auto 16px calc(var(--bottom-h) + 16px) 16px; z-index: 65; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 12px; }
@media (min-width: 1024px) { .update-bar { inset: auto 24px 24px auto; width: 380px; } }

/* page-specific */
.opp { display: grid; gap: 7px; }
.opp a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); text-decoration: none; color: var(--ink); }
.opp a:hover { outline: 1px solid var(--line); }
.opp .nm { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flash-feed { display: grid; gap: 6px; max-height: 520px; overflow-y: auto; }
.flash-item { display: grid; grid-template-columns: 4px auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; background: var(--surface-2); text-decoration: none; color: var(--ink); }
.flash-item .bar { align-self: stretch; border-radius: 2px; }
.flash-item.in .bar { background: var(--up); } .flash-item.out .bar { background: var(--down); }
.flash-item.new { animation: flashin 1.2s ease-out; }
@keyframes flashin { from { background: var(--accent-soft); } }
.rec4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .rec4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hz { border: 1px solid var(--line); border-radius: 11px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.hz.ok { border-color: color-mix(in srgb, var(--up) 45%, var(--line)); }
.hz-h { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kv { display: grid; grid-template-columns: auto auto; justify-content: space-between; gap: 2px 10px; font-size: .82rem; }
.kv span { color: var(--muted); }
.pf-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.case { display: grid; gap: 3px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: right; width: 100%; }
.case[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.verdict { border-radius: 9px; padding: 11px 13px; display: grid; gap: 3px; }
.verdict.bad { background: var(--down-soft); } .verdict.luck { background: var(--warn-soft); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; line-height: 0; }
.qr img, .qr canvas, .qr svg { width: 200px; height: 200px; }
.wl-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.wl-tabs button { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 99px; cursor: pointer; }
.wl-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.news-item { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .78rem; color: var(--muted); }
.news-item h3 { font-family: var(--f-body); font-weight: 600; font-size: .95rem; }
.imp-high { color: var(--down); } .imp-mid { color: var(--warn); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.field { max-width: 100%; }
.field select { max-width: min(240px, 55vw); text-overflow: ellipsis; }
.stat b, .kpi .val, .kv b { unicode-bidi: isolate; }
.stat b.num, .kv b.num { text-align: right; }
.list > *, .bars > *, .opp > * { min-width: 0; }
.brand b { letter-spacing: .08em; }
.brand .brand-ai { font-style: normal; color: #0E9FB4; }
