/* Korgi Screener: the colour theme «Аврора», data-theme="aurora". Light and dark do not read this file.
 *
 * Identity: indigo night surfaces, each section has its own accent (data-mod on <html>, set by the shell),
 * so the active tab, selected controls, marks and the main chart line share one hue on a page.
 * Meaning stays fixed: green up/buy, red down/sell, amber warning, importance red/orange/green.
 * Accents avoid green and red on purpose, so a selected control never reads as profit or loss.
 *
 * Canvas code parses tokens: --bg, --surface, --pos, --neg, --s-* and --a-* solids stay #rrggbb.
 * Selectors start with html:root so they outrank `:root:not([data-theme="light"]) ...` on a dark OS,
 * whatever order the module stylesheets load in.
 * Contrast is measured by a script: text 4.5:1, marks 3:1, on every surface below. Change a token, run it again.
 */
html:root[data-theme="aurora"] {
  --bg: #0d1033; --surface: #161a47; --panel: #1b2054; --hover: #262c6b;
  --ink: #f2f3ff; --ink-2: #d5d8fb; --muted: #b0b6ea; --faint: #979fe0;
  --line: #2b3276; --line-2: #414a9c; --band: rgba(90, 209, 255, .14);
  --s-main: #5ad1ff; --s-ref: #c3a6ff; --s-3: #ffb27a; --s-blue: #6fb1ff; --s-amber: #ffc857;
  --pos: #33e4bd; --neg: #ff9ba6; --warn: #ffc857;
  --pos-bg: rgba(51, 228, 189, .15); --neg-bg: rgba(255, 133, 147, .15); --warn-bg: rgba(255, 200, 87, .14);
  --imp-high: #ff939e; --imp-high-fill: #ff5468; --imp-high-bg: rgba(255, 84, 104, .20);
  --imp-med: #ffb65e; --imp-med-fill: #ff9a2e; --imp-med-bg: rgba(255, 154, 46, .18);
  --imp-low: #52e8b0; --imp-low-fill: #2fd08f; --imp-low-bg: rgba(47, 208, 143, .17);
  --shadow: 0 14px 40px rgba(4, 5, 30, .62);
  --sel: #5ad1ff; --sel-2: #8ea4ff; --on-sel: #0b0d2e; --on-neg: #2a0512; --scrim: rgba(6, 7, 34, .66); --of-text: exact; --gridline: #232963;
  --glow-1: rgba(90, 209, 255, .13); --glow-2: rgba(183, 155, 255, .15);
  color-scheme: dark;
}
/* section accents: --sel and --s-main solid, --sel-2 is the far end of the gradient */
html:root[data-theme="aurora"][data-mod="bvol"] { --sel: #b9a0ff; --sel-2: #6fc7ff; --s-main: #b9a0ff; --s-ref: #6fc7ff; --band: rgba(185, 160, 255, .16); --glow-1: rgba(185, 160, 255, .17); --glow-2: rgba(111, 199, 255, .11); }
html:root[data-theme="aurora"][data-mod="news"] { --sel: #62c8ff; --sel-2: #a5a6ff; --s-main: #62c8ff; --glow-1: rgba(98, 200, 255, .15); --glow-2: rgba(165, 166, 255, .11); }
html:root[data-theme="aurora"][data-mod="options"] { --sel: #ff94d6; --sel-2: #b9a0ff; --s-main: #ff94d6; --s-ref: #7cc9ff; --band: rgba(255, 148, 214, .15); --glow-1: rgba(255, 148, 214, .13); --glow-2: rgba(185, 160, 255, .13); }
html:root[data-theme="aurora"][data-mod="margin"] { --sel: #ffd071; --sel-2: #ffa274; --s-main: #ffd071; --s-ref: #7cc9ff; --band: rgba(255, 208, 113, .14); --glow-1: rgba(255, 208, 113, .11); --glow-2: rgba(255, 162, 116, .11); }
html:root[data-theme="aurora"][data-mod="analytics"] { --sel: #4fe3ee; --sel-2: #7fa9ff; --s-main: #4fe3ee; --glow-1: rgba(79, 227, 238, .12); --glow-2: rgba(127, 169, 255, .13); }
html:root[data-theme="aurora"][data-mod="charts"] { --sel: #8fb2ff; --sel-2: #c3a6ff; --s-main: #8fb2ff; --s-ref: #a9a4ec; --s-3: #d79bd8; }
html:root[data-theme="aurora"][data-mod="margin-terminal"] { --sel: #ffa87c; --sel-2: #ff94d6; --s-main: #ffa87c; --glow-1: rgba(255, 168, 124, .12); --glow-2: rgba(255, 148, 214, .10); }
html:root[data-theme="aurora"][data-mod="wallets"] { --sel: #cdee6e; --sel-2: #4fe3ee; --s-main: #cdee6e; --s-ref: #7cc9ff; --band: rgba(205, 238, 110, .13); --glow-1: rgba(205, 238, 110, .09); --glow-2: rgba(79, 227, 238, .11); }
html:root[data-theme="aurora"][data-mod="admin"] { --sel: #d5c8ff; --sel-2: #8ea4ff; --s-main: #d5c8ff; }

/* data roles of Analytics and Маржа */
html:root[data-theme="aurora"] .m-analytics {
  --a-buy: #2fdcb0; --a-sell: #ff6580; --a-net: #c3a6ff; --a-price: #d5d8fb;
  --a-zero: rgba(242, 243, 255, .40); --a-grid: #232963;
  --a-c1: #6ea8ff; --a-c2: #ff9d5c; --a-c3: #3fe0d0; --a-c4: #ffd65c; --a-c5: #ff8ad1; --a-c6: #8ee06a; --a-c7: #b9a0ff; --a-c8: #ff7a8a;
  --a-div-mid: #1e2359; --a-div-neg: #ff5a75; --a-div-pos: #2ee6a6; --a-div-pos2: #62b8ff;
  --a-seq-lo: #1a1f55; --a-seq-hi: #7ce6ff;
  --a-tint-pos: rgba(47, 220, 176, .17); --a-tint-neg: rgba(255, 101, 128, .17);
}
html:root[data-theme="aurora"] .m-margin-terminal {
  --mt-n2: rgba(98, 184, 255, .50); --mt-n1: rgba(98, 184, 255, .22);
  --mt-p1: rgba(255, 200, 87, .17); --mt-p2: rgba(255, 200, 87, .38); --mt-p3: rgba(255, 90, 117, .50);
  --mt-borrow: #92c4ff; --mt-repay: #ffb08f; --mt-ok: #52e8b0;
}

/* ---------- ground ---------- */
html:root[data-theme="aurora"] { background: var(--bg); }
html:root[data-theme="aurora"] body { background: transparent; position: relative; isolation: isolate; }
html:root[data-theme="aurora"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, var(--glow-1), transparent 70%),
    radial-gradient(1000px 560px at 92% -4%, var(--glow-2), transparent 70%);
}
html:root[data-theme="aurora"] ::selection { background: color-mix(in srgb, var(--sel) 38%, transparent); }
html:root[data-theme="aurora"] { scrollbar-color: var(--line-2) transparent; }
html:root[data-theme="aurora"] .theme-light-icon, html:root[data-theme="aurora"] .theme-dark-icon { display: none; }
html:root[data-theme="aurora"] .theme-color-icon { display: block; }
html:root[data-theme="aurora"] #k-theme { color: var(--sel); border-color: color-mix(in srgb, var(--sel) 45%, var(--line)); }

/* ---------- header ---------- */
html:root[data-theme="aurora"] .brand .logo-bg, html:root[data-theme="aurora"] .brand .logo-ear { fill: #ffb454; }
html:root[data-theme="aurora"] .brand .logo-fg { stroke: #2a1402; }
html:root[data-theme="aurora"] .tab.on,
html:root[data-theme="aurora"] .btn.primary,
html:root[data-theme="aurora"] .seg button.on { background-image: linear-gradient(100deg, var(--sel), color-mix(in srgb, var(--sel) 45%, var(--sel-2))); }
html:root[data-theme="aurora"] .btn.primary { border-color: transparent; }
html:root[data-theme="aurora"] .btn.primary:hover { background-image: none; background-color: var(--sel); filter: brightness(1.08); }

/* ---------- headings: the section hue, the one large gradient on a page ---------- */
html:root[data-theme="aurora"] .eyebrow { color: var(--sel); }
html:root[data-theme="aurora"] h1 span { background: linear-gradient(95deg, var(--sel), var(--sel-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- surfaces ---------- */
html:root[data-theme="aurora"] .card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045); }

/* a floating message reads as a raised card, not as a block of accent */
html:root[data-theme="aurora"] .toast { background: var(--hover); color: var(--ink); border: 1px solid var(--line-2); }
html:root[data-theme="aurora"] .toast.error { background: var(--neg); color: var(--on-neg); border-color: transparent; }

/* ---------- dimmed text: the theme's tints sit lower, so dimming keeps 4.5:1 ---------- */
html:root[data-theme="aurora"] .m-wallets .w-wl-row.paused .w-wl-name, html:root[data-theme="aurora"] .m-wallets .w-wl-row.paused .w-wl-val { opacity: .85; }
html:root[data-theme="aurora"] .m-wallets .w-tr-row.off .w-tr-main, html:root[data-theme="aurora"] .m-wallets .w-tr-row.off .w-tr-ic { opacity: .8; }
html:root[data-theme="aurora"] .m-news .nw-day-wd { opacity: 1; }
html:root[data-theme="aurora"] .m-news .nw-dim { opacity: .8; }
html:root[data-theme="aurora"] .m-admin .kadm-n { opacity: 1; }
html:root[data-theme="aurora"] .m-margin-terminal .mt-zk { color: var(--ink); }
html:root[data-theme="aurora"] .m-analytics .v-options-flow .of-matrix td.of-on-light { color: #000; }
html:root[data-theme="aurora"] .m-analytics .v-options-flow .of-matrix td.of-on-dark { color: #fff; }

/* ---------- small data marks: one role, one hue ---------- */
html:root[data-theme="aurora"] .m-wallets .w-spark polyline { stroke: var(--sel); }
html:root[data-theme="aurora"] .m-wallets .w-bar:nth-child(7n+1) .w-bar-track i { background: #cdee6e; }
html:root[data-theme="aurora"] .m-wallets .w-bar:nth-child(7n+2) .w-bar-track i { background: #4fe3ee; }
html:root[data-theme="aurora"] .m-wallets .w-bar:nth-child(7n+3) .w-bar-track i { background: #b9a0ff; }
html:root[data-theme="aurora"] .m-wallets .w-bar:nth-child(7n+4) .w-bar-track i { background: #ffa87c; }
html:root[data-theme="aurora"] .m-wallets .w-bar:nth-child(7n+5) .w-bar-track i { background: #ff94d6; }
html:root[data-theme="aurora"] .m-wallets .w-bar:nth-child(7n+6) .w-bar-track i { background: #6fb1ff; }
html:root[data-theme="aurora"] .m-wallets .w-bar:nth-child(7n+7) .w-bar-track i { background: #ffd071; }
