:root {
  --bg: #f7f8fa; --surface: #ffffff; --surface-2: #f1f3f6; --ink: #0f172a; --muted: #5b6474;
  --line: #e3e7ee; --brand: #163a70; --brand-ink: #ffffff; --brand-soft: #e7edf7; --accent: #f29d1f;
  --up: #0a7b34; --down: #c0281f; --warn-bg: #fff7e6; --warn-line: #f2c46b;
  --ok-bg: #e9f8ef; --err-bg: #fdecec; --radius: 12px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020; --surface: #121a2e; --surface-2: #19223a; --ink: #e6eaf2; --muted: #9aa4b8;
    --line: #26304a; --brand: #f5a83a; --brand-ink: #0b1020; --brand-soft: #2a2416; --accent: #f5a83a;
    --up: #34c473; --down: #ff6b61; --warn-bg: #2b2412; --warn-line: #7a5d1f;
    --ok-bg: #12301f; --err-bg: #3a1717; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); } h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* nav */
.nav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 32px; width: auto; }
@media (max-width: 420px) { .brand img { height: 26px; } }
.nav .links { display: flex; gap: 16px; flex: 1; }
.nav .links a { color: var(--muted); font-weight: 500; } .nav .links a.active, .nav .links a:hover { color: var(--ink); text-decoration: none; }
.nav .right { display: flex; gap: 10px; align-items: center; }
.nav form.search input { width: 180px; }
@media (max-width: 760px) {
  .nav .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .nav .links { order: 3; flex-basis: 100%; overflow-x: auto; }
  .nav form.search { display: none; }
}

/* buttons + forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--down); }
.btn.sm { padding: 5px 10px; font-size: .85rem; } .btn.block { width: 100%; }
.btn.link { border: 0; background: none; color: var(--brand); padding: 0; font-weight: 500; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 4px; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 4px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }
@media (min-width: 761px) and (max-width: 980px) { .grid4 { grid-template-columns: 1fr 1fr; } }

/* surfaces */
main { padding: 28px 0 56px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card h2 { margin-bottom: 12px; }
.narrow { max-width: 440px; margin: 0 auto; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill.pro { background: var(--brand); color: var(--brand-ink); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 800; color: #fff; white-space: nowrap; }
.chip.STRONG-BUY { background: #065f46; } .chip.BUY, .chip.BULLISH { background: #0a7b34; }
.chip.HOLD, .chip.NEUTRAL, .chip.NO-DATA { background: #6b7280; }
.chip.SELL, .chip.BEARISH { background: #c0281f; } .chip.STRONG-SELL { background: #7f1d1d; }

/* flash */
.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; border: 1px solid var(--line); background: var(--surface); }
.flash.success { background: var(--ok-bg); } .flash.error { background: var(--err-bg); } .flash.info { background: var(--brand-soft); }
.banner { background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
td.r, th.r { text-align: right; }
tr:last-child td { border-bottom: 0; }
.sym { font-weight: 800; } .sym small { display: block; font-weight: 400; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* hero + landing */
.hero { padding: 40px 0 8px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.tickers { display: grid; gap: 10px; }
.ticker { display: flex; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.feature h3 { margin-top: 6px; } .feature .icon { font-size: 1.4rem; }
.section { margin-top: 40px; }
.region-switch a { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.region-switch a.on { border-color: var(--brand); background: var(--brand-soft); }

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 820px; margin: 0 auto; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; }
.plan.featured { border: 2px solid var(--brand); }
.plan .price { font-size: 2.2rem; font-weight: 800; } .plan .price span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 0; list-style: none; } .plan li { padding: 5px 0 5px 24px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--up); font-weight: 800; }
.plan li.no::before { content: "–"; color: var(--muted); }

/* stock page */
.quote-head .price { font-size: 2.2rem; font-weight: 800; }
.chart { width: 100%; height: 180px; display: block; }
.chart path.line { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart path.area { fill: var(--brand-soft); opacity: .7; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.stat .k { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.news li { padding: 8px 0; border-bottom: 1px solid var(--line); list-style: none; }
.news { padding: 0; margin: 0; } .news li:last-child { border-bottom: 0; }
.dotsent { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.dotsent.pos { background: var(--up); } .dotsent.neg { background: var(--down); }

/* autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; margin-top: 4px; box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; display: none; }
.ac-list button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.ac-list button:hover, .ac-list button.on { background: var(--surface-2); }

/* ads */
.ad { margin: 16px 0; text-align: center; min-height: 90px; }
.ad-ph { border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); display: grid; place-items: center; min-height: 90px; font-size: .85rem; }
.ad.sidebar .ad-ph { min-height: 250px; }
.ad-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .88rem; background: var(--surface); }
footer .cols { display: flex; gap: 28px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); } footer .footer-logo { height: 24px; width: auto; margin-bottom: 4px; } footer .disc { margin-top: 16px; font-size: .8rem; max-width: 900px; }
.cookie { position: fixed; bottom: 12px; left: 12px; right: 12px; max-width: 620px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 30px rgba(0,0,0,.18); display: none; z-index: 30; }
.prose { max-width: 760px; } .prose h2 { margin-top: 1.4em; }
details summary { cursor: pointer; font-weight: 600; }
.auth-logo img { display: block; height: 76px; width: auto; margin: 0 auto 14px; }

/* feedback widget */
.fb-btn { position: fixed; right: 16px; bottom: 16px; z-index: 25; background: var(--brand); color: var(--brand-ink);
  border-radius: 999px; padding: 9px 15px; font-weight: 700; font-size: .9rem; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.fb-btn:hover { text-decoration: none; filter: brightness(1.08); }
.fb-panel { position: fixed; right: 16px; bottom: 66px; z-index: 26; width: min(360px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22); max-height: calc(100vh - 90px); overflow-y: auto; }
.fb-panel[hidden], .fb-panel [hidden] { display: none; }
.fb-panel > .spread { flex-wrap: nowrap; align-items: flex-start; }
.fb-x { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.fb-faces { display: flex; justify-content: space-between; margin: 12px 0 6px; }
.fb-faces button, .fb-face { font-size: 1.9rem; line-height: 1; border: 2px solid transparent; background: none; border-radius: 12px;
  padding: 6px; cursor: pointer; transition: transform .1s; }
.fb-faces button:hover, .fb-face:hover { transform: scale(1.15); }
.fb-faces button.on, .fb-face.on, .fb-face:has(input:checked) { border-color: var(--accent); background: var(--brand-soft); }
.fb-face input, .fb-pick input { position: absolute; opacity: 0; pointer-events: none; }
.fb-or { margin: 6px 0 0; }
.fb-note { margin: 10px 0 8px; }
.fb-kinds, .fb-areas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fb-kinds button, .fb-areas button, .fb-pick { border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .84rem; cursor: pointer; display: inline-block; position: relative; margin: 0; font-weight: 500; }
.fb-areas button, .fb-pick.area { font-size: .78rem; padding: 3px 9px; color: var(--muted); }
.fb-kinds button[aria-pressed="true"], .fb-areas button[aria-pressed="true"], .fb-pick:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.fb-panel textarea { margin: 2px 0 8px; resize: vertical; }
.fb-panel input[data-email] { margin-bottom: 8px; }
.fb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; }
.fb-err { color: var(--down); margin: 0 0 8px; }
.fb-done { font-size: 1.05rem; margin: 18px 0 10px; text-align: center; }
@media print { .fb-btn, .fb-panel { display: none; } }

/* feedback inbox */
.fb-bar { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.fb-bar .track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.fb-bar .fill { height: 100%; background: var(--accent); }
.fb-item { border-top: 1px solid var(--line); padding: 14px 0; }
.fb-item:first-child { border-top: 0; }
.fb-item.done { opacity: .6; }
.fb-msg { white-space: pre-wrap; margin: 6px 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: .86rem; background: var(--surface); }
.tabs a.on { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.tabs a:hover { text-decoration: none; }
