/* Tenfold Investing — dark financial-terminal aesthetic. No external assets. */
:root {
  --bg: #0b0e13;
  --bg2: #10141b;
  --card: #141a23;
  --card2: #182029;
  --line: #232c38;
  --text: #e8edf3;
  --muted: #8b96a5;
  --accent: #2f81f7;
  --accent2: #1f6feb;
  --up: #3fb950;
  --down: #f85149;
  --warn: #d29922;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.brand-mark { height: 30px; width: auto; display: block; }
.hero-logo { width: min(400px, 82%); height: auto; display: block; margin: 0 auto 14px; }
.brand-name em { font-style: normal; color: var(--accent); }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-select {
  display: none; flex: 1; min-width: 0;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font-size: 16px; font-weight: 600;
}
.tab {
  background: none; border: none; color: var(--muted);
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.tab:hover { color: var(--text); background: var(--card); }
.tab.active { color: var(--text); background: var(--card2); box-shadow: inset 0 -2px 0 var(--accent); }
.demo-badge {
  background: var(--warn); color: #111; border: none; border-radius: 999px;
  font-weight: 800; font-size: 11px; letter-spacing: 1px; padding: 6px 12px; cursor: pointer;
}
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px; color: #3fb950;
  border: 1px solid #2ea043; border-radius: 999px; padding: 5px 11px;
  background: rgba(63,185,80,.08); white-space: nowrap;
}
.live-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #3fb950; box-shadow: 0 0 6px #3fb950; }

/* ---------- alerts / toast ---------- */
.alert-wrap { max-width: 1100px; margin: 0 auto; width: 100%; padding: 0 20px; }
.alert {
  margin-top: 12px; padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid var(--warn); background: #2a2113; color: #f0c96a; font-size: 14px;
}
.alert.error { border-color: var(--down); background: #2a1518; color: #ffa198; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 200;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}

/* ---------- setup ---------- */
.setup { display: flex; justify-content: center; padding: 48px 20px; }
.setup-card { max-width: 640px; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 36px; }
.setup-card h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.5px; }
.lede { color: var(--muted); font-size: 16px; margin-top: 0; }
.setup-steps { display: grid; gap: 14px; margin: 24px 0; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-n {
  flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--accent);
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.setup-form { display: flex; gap: 10px; margin-top: 8px; }
.setup-or { text-align: center; color: var(--muted); margin: 18px 0 10px; font-size: 13px; }
.setup-or span { background: var(--card); padding: 0 12px; position: relative; }
.setup .btn.ghost { width: 100%; }

/* ---------- layout ---------- */
main { max-width: 1100px; margin: 0 auto; width: 100%; padding: 20px; flex: 1; }
.view { display: none; }
.view.active { display: block; animation: fade .18s ease-in; }
@keyframes fade { from { opacity: .4; } to { opacity: 1; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 10px; font-size: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- forms & buttons ---------- */
input[type=text], input[type=password], input[type=email], input[type=number], select, textarea {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: var(--font);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.trade-form label.wide { grid-column: 1 / -1; }
.hist-wrap { margin: 0 0 10px; }
.hist-btn { font-size: 12.5px; }
.hist-panel { margin-top: 8px; }
.hist-panel .table-wrap > table.fin { min-width: 0; } /* 2-column yearly tables fit the sidebar; the 540px floor is for the wide statements tables */
.hist-panel h4 { margin: 10px 0 4px; font-size: 13px; }
.hist-panel h4:first-child { margin-top: 0; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.btn {
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.btn.primary:hover { background: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: var(--down); color: #ffa198; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.linklike { background: none; border: none; color: var(--accent); cursor: pointer; font-size: inherit; padding: 0; text-decoration: underline; }
.search-row { display: flex; gap: 10px; }
.search-row input { flex: 1; }
#wlListSel { flex: 1 1 auto; min-width: 0; max-width: 34em; }
#wlSortSel { flex: 0 1 auto; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }

/* ---------- quotes ---------- */
.quote-rows { display: grid; gap: 8px; }
.qrow {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
}
.qrow.clickable { cursor: pointer; }
.qrow.clickable:hover { border-color: var(--accent); }
.qsym { font-family: var(--mono); font-weight: 700; min-width: 70px; }
.qname { color: var(--muted); font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qprice { font-family: var(--mono); font-weight: 700; }
.qchg { font-family: var(--mono); font-size: 13px; min-width: 110px; text-align: right; }
.up { color: var(--up); } .down { color: var(--down); }
.qx { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 2px 6px; }
.qx:hover { color: var(--down); }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }

/* ---------- research detail ---------- */
.qhead { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.qhead .sym { font-size: 26px; font-weight: 800; font-family: var(--mono); }
.qhead .price { font-size: 30px; font-weight: 800; font-family: var(--mono); }
.qhead .chg { font-size: 16px; font-family: var(--mono); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.stat .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat .v { font-family: var(--mono); font-weight: 700; font-size: 15px; margin-top: 2px; }
.chart-wrap { position: relative; margin: 8px 0; }
canvas.chart { width: 100%; height: 280px; display: block; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; cursor: crosshair; touch-action: pan-y; }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--card2); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 10px; font-family: var(--mono); font-size: 12px; display: none; z-index: 5;
  white-space: nowrap;
}
.src-label { font-size: 12px; color: var(--muted); margin-top: 6px; }
table.metrics { width: 100%; border-collapse: collapse; font-size: 14px; }
table.metrics td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.metrics td:first-child { color: var(--muted); }
table.metrics td:last-child { font-family: var(--mono); text-align: right; font-weight: 600; }
.news-list { display: grid; gap: 10px; }
.news-item { padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; }
.news-item a { color: var(--text); text-decoration: none; font-weight: 600; }
.news-item a:hover { color: var(--accent); }
.news-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.search-results { display: grid; gap: 6px; margin-top: 12px; }
.sr { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.sr:hover { border-color: var(--accent); }
.profile { display: grid; gap: 6px; font-size: 14px; }
.profile .prow { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.profile .prow span:first-child { color: var(--muted); }

/* ---------- screener ---------- */
.progress { height: 8px; background: var(--bg2); border-radius: 999px; margin-top: 12px; overflow: hidden; border: 1px solid var(--line); }
.progress .bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.table-wrap { overflow-x: auto; }
table.results { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
table.results th {
  text-align: left; padding: 10px 8px; color: var(--muted); font-size: 12px; text-transform: uppercase;
  letter-spacing: .4px; cursor: pointer; user-select: none; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.results th.num, table.results td.num { text-align: right; font-family: var(--mono); }
table.results td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
table.results tbody tr { cursor: pointer; }
table.results tbody tr:hover { background: var(--card2); }
table.results td.sym { font-family: var(--mono); font-weight: 700; }

/* ---------- learn ---------- */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.gcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.gcard h3 { margin: 0 0 8px; font-size: 16px; color: var(--accent); }
.gcard p { margin: 8px 0; font-size: 14px; }
.gcard .how { background: var(--bg2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 13.5px; }

/* ---------- financials / filings / earnings (Phase 3) ---------- */
table.fin { width: 100%; border-collapse: collapse; font-size: 13px; }
table.fin th, table.fin td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: right; font-family: var(--mono); white-space: nowrap; }
table.fin th:first-child, table.fin td:first-child { text-align: left; font-family: inherit; color: var(--muted); white-space: normal; }
table.fin th { color: var(--text); font-weight: 600; }
/* Wide statement/history tables (Ethan, Oct 4): never let columns
   crush together on a phone — the table keeps a readable minimum
   width inside its scroller, the row-label column sticks while
   scrolling sideways, and zebra striping keeps rows distinct. */
.table-wrap > table.fin { min-width: 540px; }
table.fin th:first-child, table.fin td:first-child {
  position: sticky; left: 0; background: var(--card); z-index: 1;
}
table.fin tbody tr:nth-child(even) { background: rgba(127, 148, 180, 0.05); }
.fin-sub { margin: 16px 0 4px; font-size: 14px; }
.filings { display: grid; gap: 8px; }
.filing { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; }
.form-tag { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--accent2); color: #fff; }
.filing-meta { color: var(--muted); font-size: 13px; flex: 1; min-width: 160px; }
.filing a { font-size: 13px; }
.alert-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 14px; background: var(--accent2); color: #fff; }
.alert-bar[hidden] { display: none; }
.alert-item { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; text-align: left; }
.alert-item:hover { background: rgba(255,255,255,.25); }
.alert-x { margin-left: auto; background: none; border: none; color: #fff; font-size: 15px; cursor: pointer; padding: 2px 6px; }
/* Notifications panel (Oct 4, 2026): floating at the right, under the header, on every page. */
.notif-fab { position: fixed; top: 70px; right: 14px; z-index: 61; display: inline-flex; align-items: center; gap: 7px;
  background: var(--card, #151b26); color: var(--ink, #e8edf5); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.35); }
.notif-fab:hover { border-color: var(--accent, #2f81f7); }
.notif-count { background: #d64545; color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 7px; }
.notif-count[hidden] { display: none; }
.notif-panel { position: fixed; top: 118px; right: 14px; z-index: 61; width: min(336px, calc(100vw - 28px));
  max-height: calc(100vh - 140px); overflow-y: auto; background: var(--card, #151b26); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.45); padding: 12px 14px; }
.notif-panel[hidden] { display: none; }
.notif-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.notif-head h3 { margin: 0; font-size: 16px; }
.notif-close { background: none; border: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 4px 6px; }
.notif-list { display: grid; gap: 8px; }
.notif-item { display: flex; gap: 6px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: rgba(255,255,255,.02); }
.notif-main { flex: 1; background: none; border: none; color: inherit; text-align: left; cursor: pointer; padding: 0; display: grid; gap: 2px; }
.notif-title { font-weight: 600; font-size: 14px; }
.notif-sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.notif-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; padding: 2px 4px; }
.notif-empty { margin: 4px 0; line-height: 1.45; }
.notif-foot { margin: 10px 0 0; line-height: 1.4; }
@media (max-width: 760px) {
  .notif-fab { top: 64px; right: 10px; padding: 7px 11px; }
  .notif-fab-label { display: none; }
  .notif-panel { top: 108px; right: 10px; }
}
.filing-digest { flex: 1 1 100%; border-top: 1px dashed var(--line); padding-top: 8px; font-size: 14px; }
.filing-digest ul { margin: 4px 0; }
.earn-list { display: grid; gap: 6px; }
.earn-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.earn-row:hover { border-color: var(--accent); }

/* ---------- Phase 4: explainers, tools, analysis, slideshows ---------- */
.xq {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--card2); border: 1px solid var(--line); color: var(--muted);
  font-size: 11px; font-weight: 700; cursor: pointer; padding: 0; margin-left: 5px;
  vertical-align: 1px; line-height: 1;
}
.xq:hover { color: var(--text); border-color: var(--accent); }
.expl-pop {
  position: fixed; z-index: 300; background: var(--card2);
  border: 1px solid var(--accent); border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6); font-size: 13.5px;
}
.expl-pop h4 { margin: 0 24px 6px 0; font-size: 15px; color: var(--accent); }
.expl-pop p { margin: 6px 0; }
.expl-pop .how { background: var(--bg2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 0 8px 8px 0; margin-top: 8px; }
.expl-x {
  position: absolute; top: 6px; right: 8px; background: none; border: none;
  color: var(--muted); font-size: 18px; cursor: pointer; padding: 2px 6px;
}
.expl-x:hover { color: var(--text); }

/* tools */
.tool-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
.tool-grid > * { min-width: 0; } /* a wide child (yearly-data table) must scroll inside its column, never blow the column out over the results */
@media (max-width: 760px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-inputs { display: grid; gap: 12px; align-content: start; }
.tool-out { min-width: 0; }
.big-result { font-size: 34px; font-weight: 800; font-family: var(--mono); margin: 2px 0 4px; }
.slider { display: grid; gap: 6px; }
.sval { font-family: var(--mono); color: var(--text); font-weight: 700; }
input[type=range] { accent-color: var(--accent); width: 100%; padding: 0; }
canvas.tool-chart { height: 220px; }

/* checklist + score */
.checks { display: grid; gap: 8px; }
.check { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; }
.ck { font-weight: 800; width: 20px; text-align: center; flex: 0 0 20px; }
.ck.pass { color: var(--up); } .ck.fail { color: var(--down); } .ck.na { color: var(--muted); }
.check-label { font-weight: 600; flex: 1; }
.check-note { color: var(--muted); font-size: 13px; text-align: right; }
.score-total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.score-num { font-size: 40px; font-weight: 800; font-family: var(--mono); }
.score-rows { display: grid; gap: 6px; }
.score-row { display: flex; gap: 10px; align-items: center; }
.score-name { min-width: 170px; font-size: 14px; }
.scorebar { flex: 1; height: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.scorefill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.score-val { font-family: var(--mono); font-weight: 700; min-width: 34px; text-align: right; }
.score-basis { margin: -2px 0 8px 180px; }
@media (max-width: 560px) { .score-basis { margin-left: 0; } .score-name { min-width: 130px; } }

/* slideshows */
#slideshows { display: grid; gap: 0; }
.slideshow .slide-body { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 10px 0; min-height: 150px; }
.slide-count { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.slide-h { margin: 0 0 8px; font-size: 17px; color: var(--accent); }
.slide-p { margin: 0; font-size: 14.5px; }
.slide-nav { display: flex; align-items: center; gap: 14px; }
.dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.sdot.on { background: var(--accent); }
.slide-nav .btn:disabled { opacity: .35; cursor: default; }

/* ---------- footer ---------- */
.footer {
  max-width: 1100px; margin: 0 auto; width: 100%; padding: 24px 20px 40px;
  border-top: 1px solid var(--line); color: var(--muted);
}
.footer p { margin: 6px 0; font-size: 13px; }

@media (max-width: 560px) {
  .setup-card { padding: 24px; }
  .setup-form { flex-direction: column; }
  .search-row { flex-direction: column; }
  .qhead .price { font-size: 24px; }
  canvas.chart { height: 220px; }
  .topbar { padding: 10px 12px; }
  main { padding: 14px; }
}

/* ---------- Company insights (Phase 5) ---------- */
.ins-h { font-size: 15px; margin: 16px 0 6px; }
.ins-list { margin: 6px 0 10px 20px; padding: 0; }
.ins-list li { margin: 5px 0; line-height: 1.45; }
.bull { color: var(--up); }
.bear { color: var(--down); }

/* ---------- Portfolio / paper trading (Phase 6) ---------- */
.pf-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.alloc-wrap { margin: 12px 0; }
canvas.alloc { width: 100%; height: 46px; display: block; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.alloc-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tradebox { margin-top: 10px; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 10px; }
.trade-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 12px; align-items: end; }
.side-wrap { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.side-label { font-size: 13px; font-weight: 600; }
.side-toggle { display: flex; gap: 8px; }
.side-toggle .btn.on-buy { border-color: var(--up); color: var(--up); }
.side-toggle .btn.on-sell { border-color: var(--down); color: var(--down); }
.notes { display: grid; gap: 8px; }
.perf-float { position: static; background: var(--card2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; margin: 16px 0; box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }
.dep-add { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.dep-add input { flex: 1; min-width: 0; }
.dep-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.note { padding: 9px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.note.good { border-color: #2ea043; }
.note.warn { border-color: var(--warn); }

/* ---------- Phase 7: accounts, landing, paywall, community, contests ---------- */

/* account chip */
.acct { position: relative; }
.acct-btn {
  background: var(--card2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; max-width: 220px;
}
.acct-btn:hover { border-color: var(--accent); }
#acctName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn .caret { font-size: 10px; color: var(--muted); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--card2); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6); z-index: 100; padding: 6px;
}
.acct-email { padding: 8px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; }
.acct-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--text); padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.acct-item:hover { background: var(--card); }

/* landing */
.hero { text-align: center; padding: 48px 20px 30px; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: 40px; margin: 14px 0 10px; letter-spacing: -1px; }
.pill {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .4px;
  color: var(--warn); border: 1px solid var(--warn); border-radius: 999px; padding: 6px 14px;
  background: rgba(210,153,34,.08); margin: 0;
}
.hero-cta { justify-content: center; margin: 20px 0 6px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feat h3 { margin: 0 0 6px; font-size: 15px; color: var(--accent); }
.feat p { margin: 0; font-size: 13.5px; color: var(--muted); }
.pricing { text-align: center; max-width: 560px; margin: 0 auto 18px; }
.pricing-wide { text-align: center; max-width: 880px; margin: 0 auto 18px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; text-align: left; }
.plan { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.plan.hot { border-color: var(--up); }
.plan h3 { margin: 0 0 2px; font-size: 16px; }
.plan .unlock { margin: 10px 0 0; }
.price.sm { font-size: 30px; }
.pay-card.wide { max-width: 880px; }
.wl-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.wl-form input { min-width: 260px; flex: 0 1 320px; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }
.price { font-size: 44px; font-weight: 800; font-family: var(--mono); margin: 6px 0; }
.price .per { font-size: 16px; color: var(--muted); font-weight: 600; font-family: var(--font); }
.unlock { list-style: none; padding: 0; margin: 16px auto; display: inline-block; text-align: left; }
.unlock li { margin: 7px 0; font-size: 14.5px; }
.unlock li::before { content: "✓ "; color: var(--up); font-weight: 800; }
details.faq { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 8px 0; background: var(--bg2); }
details.faq summary { cursor: pointer; font-weight: 700; font-size: 14.5px; }
details.faq p { margin: 8px 0 2px; color: var(--muted); font-size: 14px; }
.foot-links { text-align: center; }

/* auth */
.auth-card { max-width: 520px; margin: 40px auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.auth-card h1 { margin: 0 0 16px; font-size: 26px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.auth-tab.on { border-color: var(--accent); color: var(--text); background: var(--card2); }
.auth-fields { display: grid; gap: 12px; margin-bottom: 14px; }
.auth-go { width: 100%; margin-top: 4px; }
.tos { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; margin: 12px 0; font-weight: 400; color: var(--text); }
.tos input[type=checkbox] { width: auto; margin-top: 4px; flex: 0 0 auto; accent-color: var(--accent); }
#authError { margin-bottom: 14px; }

/* paywall */
.pay-card { max-width: 560px; margin: 40px auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 36px; text-align: center; }
.pay-card h1 { margin: 12px 0 8px; font-size: 30px; }

/* legal */
.legal { max-width: 760px; }
.legal h2 { font-size: 24px; }
.legal h3 { font-size: 16px; margin: 22px 0 6px; color: var(--accent); }
.legal p { font-size: 14.5px; color: var(--text); }
.legal p.muted { color: var(--muted); }

/* community */
.vote-btn .vcount { font-family: var(--mono); font-weight: 800; margin-left: 6px; }
.vote-btn.on-bull { border-color: var(--up); color: var(--up); }
.vote-btn.on-bear { border-color: var(--down); color: var(--down); }
.proj-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin: 10px 0; }
@media (max-width: 560px) { .proj-form { grid-template-columns: 1fr; } }

/* contests */
.contest { padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px }
.contest-main { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; flex-wrap: wrap }
.contest-main .logo { width: 24px; height: 24px; border-radius: 6px }
.cname { font-weight: 600 }
.pick-counts { margin: 0 0 8px }
.beat-n { color: var(--up) }
.miss-n { color: var(--down) }
.pick-btn.beat { border-color: var(--up); color: var(--up) }
.pick-btn.miss { border-color: var(--down); color: var(--down) }
.pick-btn.beat.on { background: var(--up); border-color: var(--up); color: #fff }
.pick-btn.miss.on { background: var(--down); border-color: var(--down); color: #fff }
.contest-pick { margin-top: 0; }
table.board td:first-child { font-weight: 600; }

/* research upgrades: logos, names, chart ranges, more-metrics, tools */
.logo { width: 18px; height: 18px; object-fit: contain; vertical-align: -3px; margin-right: 5px; border-radius: 3px; }
.logo-mono { display: inline-flex; align-items: center; justify-content: center; color: #eef2f6; font-size: 8px; font-weight: 700; letter-spacing: .02em; object-fit: initial; }
.contest-main .logo-mono { font-size: 10px; }
.qhead .logo-mono { font-size: 13px; }
.pop-row .logo-mono { font-size: 10px; }
.qhead .logo { width: 28px; height: 28px; vertical-align: -7px; }
.qname { color: var(--muted); font-size: 12px; }
.ranges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 10px; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
/* Most-popular rows on the dashboard (Oct 4, 2026) */
.pop-row { width: 100%; background: none; border: none; border-bottom: 1px solid var(--line); color: inherit; cursor: pointer; text-align: left; padding: 8px 4px; }
.pop-row:last-child { border-bottom: none; }
.pop-row:hover { background: rgba(255,255,255,.03); }
.pop-rank { font-weight: 700; color: var(--muted); width: 1.4em; flex: 0 0 auto; }
.pop-row .logo { width: 22px; height: 22px; border-radius: 5px; flex: 0 0 auto; }
/* Saved model rows (Oct 4, 2026): everything on ONE line — symbol, details,
   result, Load and Delete side by side; details truncate, never wrap. */
.sproj { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 6px 0; overflow-x: auto; }
.sproj .qsym { flex: 0 0 auto; font-weight: 700; }
.sproj .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sproj .btn { flex: 0 0 auto; }
.ranges .btn.sm.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.crange { display: inline-flex; gap: 6px; align-items: center; margin-left: 4px; }
.crange input[type="date"] { padding: 4px 6px; font-size: 12px; max-width: 135px; }
details.more-metrics { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
details.more-metrics summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.slider .snum { width: 70px; margin-top: 2px; }
.avg-note { font-weight: 400; }
.pres-tag { background: #1f6feb; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin: 0 8px; }
.sproj { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.moat-score { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.moat-head { display: flex; align-items: baseline; gap: 10px; }
.moat-num { font-size: 30px; font-weight: 800; font-family: var(--mono); }
.moat-band { font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: .5px; }
/* Learn guides: line names bold, meanings in plain body text (not mono) */
table.guide-table th { text-align: left; }
table.guide-table td { font-family: inherit; font-weight: 400; white-space: normal; text-align: left; line-height: 1.5; }
table.guide-table td:first-child { font-weight: 700; color: var(--text); white-space: nowrap; }
/* Mockup statements in Learn guides */
table.stmt td.num { font-family: var(--mono); text-align: right; white-space: nowrap; }
table.stmt th:nth-child(2), table.stmt th:nth-child(3) { text-align: right; }
table.stmt tr.sub td { font-weight: 700; border-top: 1px solid var(--line); }
table.stmt tr.sub td:first-child { color: var(--text); }
table.stmt tr.total td { font-weight: 700; border-top: 2px solid var(--text); }
table.stmt tr.total td:first-child { color: var(--text); }
table.stmt tr.stmt-sec td { font-weight: 700; color: var(--accent); padding-top: 14px; border-bottom: none; }

/* Ticker suggest box (replaces giant native datalists) + analyst consensus */
.suggest { position: relative; max-height: 212px; overflow-y: auto; }
.suggest .sr { position: relative; z-index: 5; }
.cons-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--panel-2); margin: 6px 0; }
.cons-seg { display: block; height: 100%; }
.cons-seg.sb, .cdot.sb { background: #1f9d55; }
.cons-seg.b, .cdot.b { background: #57c785; }
.cons-seg.h, .cdot.h { background: #d8b13c; }
.cons-seg.s, .cdot.s { background: #e07a4a; }
.cons-seg.ss, .cdot.ss { background: #d64545; }
.cons-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--muted); }
.cdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }

/* Watchlist picker (Research) */
.wl-picker { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); max-width: 420px; }
.wl-picker-h { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.wl-pick-row { display: block; width: 100%; text-align: left; background: none; border: none; border-top: 1px solid var(--line); color: var(--text); padding: 8px 4px; cursor: pointer; font-size: 14px; }
.wl-pick-row:hover { background: rgba(127, 127, 127, 0.08); }
.wl-pick-mark { display: inline-block; width: 18px; color: var(--accent); }

.vstack { display: flex; flex-direction: column; gap: 18px; }
.pt-wrap { margin-bottom: 10px; }
.pt-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 600; margin-bottom: 4px; }
.pt-bar { position: relative; height: 10px; border-radius: 5px; background: var(--panel-2, #e8ecf3); margin: 16px 2px 8px; }
.pt-mark { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.pt-mark.avg { width: 14px; height: 14px; border-radius: 50%; background: var(--accent, #2f6fed); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); z-index: 2; }
.pt-mark.cur { width: 3px; height: 20px; border-radius: 2px; background: var(--text, #14181f); z-index: 1; }
.pt-labels { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .86em; color: var(--muted, #66707e); }
.chart-chg { margin-top: 8px; font-weight: 600; min-height: 1.2em; }
.checklist { list-style: none; padding: 0; margin: 6px 0 12px; }
.checklist li { position: relative; padding: 4px 0 4px 26px; }
.checklist li::before { content: "✓"; position: absolute; left: 3px; top: 4px; color: var(--up, #3fb950); font-weight: 700; }

/* ---------- Mobile friendliness (Ethan, Oct 3) ----------
   Desktop layout is untouched: everything below applies only on
   small screens. Bigger touch targets, no focus-zoom on inputs,
   a dropdown page picker instead of the scrolling tab row, and
   calmer spacing. */
button { touch-action: manipulation; }
body { -webkit-tap-highlight-color: transparent; }
/* The page itself must never scroll sideways: wide data lives inside
   .table-wrap scrollers, and anything unforeseen gets clipped at the
   viewport edge instead of shifting the whole layout. */
html, body { overflow-x: hidden; overflow-x: clip; }
img, svg, canvas, video { max-width: 100%; }
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
.profile .prow span:first-child { flex: 0 1 auto; }
.profile .prow span:last-child { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.toast { max-width: calc(100vw - 32px); text-align: center; }
.card a, .news-item a, .ins-list a { overflow-wrap: anywhere; }
table.metrics td:last-child { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .tabs { display: none; }
  .nav-select { display: block; }
  .topbar { gap: 10px; padding: 10px 12px; }
  .brand-name { font-size: 16px; }
  .brand-mark { height: 26px; }
  main { padding: 14px 12px; }
  .card { padding: 14px; margin-bottom: 14px; }
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 40px; padding: 9px 14px; }
  .btn.sm { min-height: 36px; padding: 8px 12px; font-size: 13px; }
  .acct-btn { min-height: 40px; }
  .qrow { gap: 8px; padding: 10px; }
  .qsym { min-width: 54px; }
  .qname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .perf-float { position: static; box-shadow: none; }
  .pf-stats { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .suggest { max-height: 240px; }
  .dep-add input { min-height: 40px; }
  .qchg { min-width: 92px; }
  .filing { flex-wrap: wrap; }
  .filing-meta { min-width: 120px; }
  .score-name { min-width: 110px; }
  .qhead { flex-wrap: wrap; }
  .news-item { padding: 10px; }
  /* Dashboard rows on mobile get a two-line rhythm: symbol and price
     up top, the change (or the index's source label) on its own line
     underneath — nothing competes for the same cramped line. */
  .qrow { flex-wrap: wrap; row-gap: 2px; }
  .qprice { font-size: 15px; font-weight: 600; }
  .qchg { order: 4; flex-basis: 100%; font-size: 12.5px; }
  #dashIndices .qname { order: 4; flex-basis: 100%; font-size: 12px; }
  #dashIndices .qchg { order: 3; flex-basis: auto; }
  .earn-row { flex-wrap: wrap; row-gap: 2px; }
  .earn-row .qchg { flex-basis: 100%; min-width: 0; text-align: left; white-space: normal; font-size: 13px; }
  #dashWlSel { width: 100%; min-height: 42px; }
  #dashNewsMore { width: 100%; }
  .news-item a { font-size: 15px; line-height: 1.4; }
}
