/* POLY_MARK: deep ink, mint accent, restrained. Dark by default; light follows the device. No inline styles anywhere (CSP). */
:root {
  --bg: #080c18;
  --surface: #111729;
  --surface-2: #19213a;
  --line: #232c4d;
  --text: #eef2ff;
  --muted: #8591b8;
  --accent: #2ee6c5;
  --accent-2: #5b8cff;
  --accent-ink: #03201a;
  --good: #34d399;
  --bad: #fb7185;
  --warn: #fbbf24;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f5fb; --surface: #ffffff; --surface-2: #eaeefa; --line: #dbe1f2;
    --text: #0d1530; --muted: #5b6890; --accent: #0eb69a; --accent-2: #3b6df0; --accent-ink: #ffffff;
    --good: #059669; --bad: #e11d48; --warn: #b45309; --shadow: 0 8px 24px rgba(30, 50, 110, 0.09);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums; }
main { max-width: 560px; margin: 0 auto; padding: 14px 16px 44px; }
[hidden] { display: none !important; }

/* header */
.brand { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; }
.logo { width: 34px; height: 34px; flex: none; }
.logo-bg { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.logo-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.logo-dot { fill: var(--accent); }
.wordmark { font-size: 19px; font-weight: 800; letter-spacing: 0.08em; }
.wordmark span { color: var(--accent); }
.pill { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.dot { display: inline-block; vertical-align: middle; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--good); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.18); }
.dot.warn { background: var(--warn); }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 20px 18px 18px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, rgba(46, 230, 197, 0.16), transparent 55%),
              radial-gradient(120% 140% at 100% 100%, rgba(91, 140, 255, 0.14), transparent 55%), var(--surface);
  box-shadow: var(--shadow); }
.hero .cap { text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; color: var(--muted); font-weight: 700; }
.hero .big { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 6px 0 4px; }
.hero .big small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.hero .delta { font-size: 14px; font-weight: 700; }
.hero .sub { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--muted); }
.hero .sub b { color: var(--text); }
.pos { color: var(--good); }
.neg { color: var(--bad); }

/* tabs */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 16px 0 14px; padding: 4px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); position: sticky; top: 8px; z-index: 5; box-shadow: var(--shadow); }
.tab { appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700;
  padding: 9px 4px; border-radius: 10px; cursor: pointer; }
.tab.active { background: var(--accent); color: var(--accent-ink); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.card.flat { background: transparent; }
.title { font-weight: 700; word-break: break-word; }
.label { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0; font-size: 14px; }
.row span:last-child { text-align: right; font-weight: 600; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 18px 2px 8px; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.note { font-size: 12px; color: var(--muted); margin: 0 2px 10px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; }
.stat .v { font-size: 20px; font-weight: 800; }
.stat .l { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.2; }

.chip { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; }
.chip.TRADE { background: var(--good); color: #04130c; }
.chip.NO_TRADE { background: var(--surface-2); color: var(--muted); }
.chip.NEEDS_REVIEW { background: var(--warn); color: #1c1200; }
.chip.BUY { background: var(--accent); color: var(--accent-ink); }

.ev-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.nums b { color: var(--text); }
.why { margin-top: 10px; font-size: 13px; color: var(--muted); }
.orig { font-size: 12px; color: var(--muted); margin-top: 3px; word-break: break-word; }
.pro, .con { font-size: 12px; margin-top: 4px; color: var(--muted); word-break: break-word; }
.pro::before { content: "＋ "; color: var(--good); font-weight: 800; }
.con::before { content: "－ "; color: var(--bad); font-weight: 800; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.more { margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--accent); }
details[open] .more { display: none; }
.detail { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

.bar { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 3px 0 7px; }
.bar .fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.w0 { width: 0 } .w10 { width: 10% } .w20 { width: 20% } .w30 { width: 30% } .w40 { width: 40% } .w50 { width: 50% }
.w60 { width: 60% } .w70 { width: 70% } .w80 { width: 80% } .w90 { width: 90% } .w100 { width: 100% }

.link { appearance: none; background: transparent; border: 1px solid var(--line); color: var(--accent); font: inherit; font-size: 13px;
  font-weight: 700; width: 100%; padding: 11px; border-radius: 14px; cursor: pointer; margin-top: 2px; }

.banner { padding: 11px 14px; border-radius: 14px; margin: 0 0 12px; font-weight: 700; font-size: 14px; }
.banner.stop { background: var(--bad); color: #fff; }
.banner.demo { background: #fbbf24; color: #1c1200; }
.banner.err { background: var(--surface); border: 1px solid var(--line); color: var(--bad); }
.foot { margin: 22px 4px 0; font-size: 11px; color: var(--muted); text-align: center; }
