/* KSU SMIF Dashboard — KSU brand: Hooty Hoo Gold #FFC629, Legacy Black #2D2926, Slap Rock Gray #B2B4B2 */
:root {
  --gold: #ffc629;
  --gold-2: #e8ae0c;
  --gold-soft: rgba(255, 198, 41, 0.12);
  --gold-line: rgba(255, 198, 41, 0.35);
  --black: #0c0b0a;
  --legacy: #2d2926;
  --gray: #b2b4b2;
  --surface: rgba(24, 22, 20, 0.72);
  --surface-solid: #181614;
  --surface-2: rgba(40, 37, 34, 0.75);
  --line: rgba(var(--fg), 0.09);
  --line-2: rgba(var(--fg), 0.16);
  --ink: #f2f0ea;
  --ink-2: #c9c6bd;
  --muted: #8e8a82;
  --up: #3ccf7f;
  --down: #f0625a;
  --warn: #fab219;
  --blue: #3987e5;
  --orange: #d95926;
  --violet: #9085e9;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --fg: 255, 255, 255; /* washes and hairlines are white-on-dark */
  --gold-text: #ffc629;
  --pop: #1c1a17;
  --panel: rgba(22, 20, 18, 0.97);
  --warn-text: #ffd98a;
  --tile-grad: linear-gradient(180deg, #fff, #d9d5ca);
  --ink-strong: #fff;
  --fab-bg: linear-gradient(135deg, #2d2926, #1a1816);
  color-scheme: dark;
}
/* ---------- light mode ---------- */
html[data-theme="light"] {
  --black: #f5f3ee;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-2: rgba(246, 243, 236, 0.9);
  --line: rgba(45, 41, 38, 0.12);
  --line-2: rgba(45, 41, 38, 0.2);
  --ink: #1d1a17;
  --ink-2: #4a4540;
  --muted: #77716a;
  --up: #11804a;
  --down: #c8372e;
  --warn: #9a6400;
  --gold-text: #8a6200;
  --gold-soft: rgba(255, 198, 41, 0.22);
  --gold-line: rgba(196, 146, 0, 0.45);
  --fg: 45, 41, 38;
  --pop: #ffffff;
  --panel: rgba(255, 255, 255, 0.98);
  --warn-text: #7a5000;
  --tile-grad: linear-gradient(180deg, #1d1a17, #4a4540);
  --ink-strong: #000;
  --fab-bg: linear-gradient(135deg, #2d2926, #1a1816);
  --shadow: 0 14px 40px rgba(45, 41, 38, 0.14);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--black); color: var(--ink); font-family: var(--font); }
body { min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
#bg3d { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.bg-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(255, 198, 41, 0.10), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(255, 198, 41, 0.06), transparent 60%),
              linear-gradient(180deg, rgba(12, 11, 10, 0.2), rgba(12, 11, 10, 0.75)); }
.app { position: relative; z-index: 1; }
a { color: var(--gold-text); }
button, input, select, textarea { font-family: inherit; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
header.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(12, 11, 10, 0.72); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1440px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 44px; height: auto; display: block; filter: drop-shadow(0 0 14px rgba(255, 198, 41, 0.35)); transition: transform 0.4s cubic-bezier(.2,.8,.2,1); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.08); }
.brand-text b { display: block; font-size: 15px; letter-spacing: 0.06em; }
.brand-text span { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
nav.tabs { display: flex; gap: 4px; padding: 4px; background: rgba(var(--fg), 0.04); border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs button { border: 0; background: transparent; color: var(--ink-2); padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: 0.2s; }
nav.tabs button:hover { color: var(--ink); background: rgba(var(--fg), 0.06); }
nav.tabs button.active { background: var(--gold); color: #111; box-shadow: 0 6px 20px rgba(255, 198, 41, 0.3); }
nav.tabs button .s { display: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(var(--fg), 0.03); white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.live .dot { background: var(--up); box-shadow: 0 0 0 0 rgba(60, 207, 127, 0.6); animation: pulse 2s infinite; }
.pill.snap .dot { background: var(--warn); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(60, 207, 127, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(60, 207, 127, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 207, 127, 0); } }

/* ---------- layout ---------- */
main { max-width: 1440px; margin: 0 auto; padding: 28px 28px 80px; }
.view { display: none; animation: rise 0.45s ease both; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 6px 0 22px; flex-wrap: wrap; }
.eyebrow { color: var(--gold-text); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
h1 { font-size: clamp(26px, 3.2vw, 40px); margin: 6px 0 4px; letter-spacing: -0.01em; font-weight: 800; }
h1 em { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--gold-text); }
.sub { color: var(--ink-2); font-size: 14px; max-width: 760px; line-height: 1.55; }
h2 { font-size: 15px; margin: 0; font-weight: 700; letter-spacing: 0.01em; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--ink-2); font-weight: 600; }
.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.span-2 { grid-column: span 2; }
.mt { margin-top: 18px; }
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3, .g-21, .g-12 { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } }
@media (max-width: 720px) { .g-4, .g-2 { grid-template-columns: minmax(0, 1fr); } .top-inner { flex-wrap: wrap; padding: 10px 14px; } nav.tabs { order: 3; width: 100%; } main { padding: 18px 14px 60px; } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); position: relative; min-width: 0; }
.card.glow::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, var(--gold-line), transparent 40%, transparent 70%, rgba(255, 198, 41, 0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .hint { color: var(--muted); font-size: 12px; }
.chart { width: 100%; height: 320px; }
.chart.tall { height: 420px; }
.chart.xl { height: 560px; }
.chart.short { height: 240px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; } }
.hero-main { padding: 28px; overflow: hidden; }
.hero-label { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.hero-value { font-size: clamp(40px, 5.5vw, 68px); font-weight: 800; letter-spacing: -0.03em; margin: 6px 0 10px; line-height: 1; }
.hero-value .cents { color: var(--muted); font-size: 0.5em; }
.chg { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; padding: 5px 10px; border-radius: 8px; }
.chg.up { color: var(--up); background: rgba(60, 207, 127, 0.1); }
.chg.down { color: var(--down); background: rgba(240, 98, 90, 0.1); }
.up { color: var(--up); } .down { color: var(--down); }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 20px; color: var(--ink-2); font-size: 13px; }
.hero-meta b { display: block; color: var(--ink); font-size: 17px; margin-top: 3px; }

/* stat tiles */
.tile { padding: 18px 20px; }
.tile .label { color: var(--ink-2); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tile .value { font-size: 26px; font-weight: 800; margin-top: 8px; letter-spacing: -0.01em; }
.tile .foot { color: var(--muted); font-size: 12px; margin-top: 6px; }
.tip { display: inline-grid; place-items: center; width: 15px; height: 15px; touch-action: manipulation; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); font-size: 10px; cursor: help; position: relative; font-weight: 700; flex-shrink: 0; }

/* controls */
.seg { display: inline-flex; background: rgba(var(--fg), 0.04); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--ink-2); padding: 6px 11px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--gold-soft); color: var(--gold-text); }
.btn { border: 1px solid var(--line-2); background: rgba(var(--fg), 0.04); color: var(--ink); padding: 10px 16px; border-radius: 11px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: 0.15s; text-decoration: none; }
.btn:hover { border-color: var(--gold-line); background: rgba(255, 198, 41, 0.07); }
.btn.primary { background: var(--gold); color: #111; border-color: var(--gold-text); }
.btn.primary:hover { background: #ffd355; }
.btn.danger { color: var(--down); }
.btn.sm { padding: 7px 11px; font-size: 12px; border-radius: 9px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.input, select.input { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-2); color: var(--ink); padding: 10px 12px; border-radius: 10px; font-size: 14px; outline: none; min-width: 0; }
.input:focus { border-color: var(--gold-text); box-shadow: 0 0 0 3px rgba(255, 198, 41, 0.15); }
label.field { display: grid; gap: 6px; font-size: 12px; color: var(--ink-2); font-weight: 600; }

/* tables */
.table-wrap { overflow: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); max-height: 640px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { position: sticky; top: 0; background: var(--pop); color: var(--ink-2); font-weight: 600; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; cursor: pointer; user-select: none; z-index: 1; }
thead th.n, td.n { text-align: right; }
thead th:hover { color: var(--gold-text); }
thead th .arr { color: var(--gold-text); margin-left: 4px; }
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:hover td { background: rgba(255, 198, 41, 0.04); }
tbody tr.sector-row td { background: rgba(var(--fg), 0.03); font-weight: 700; color: var(--gold-text); }
td .tk { font-weight: 800; letter-spacing: 0.02em; }
td .nm { color: var(--muted); font-size: 12px; display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.wbar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.wbar i { display: block; height: 6px; border-radius: 3px; background: var(--gold); min-width: 2px; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(var(--fg), 0.06); color: var(--ink-2); }
.tag.gold { background: var(--gold-soft); color: var(--gold-text); }
td input.input { padding: 6px 8px; font-size: 13px; width: 100%; }

/* movers list */
.list { display: grid; gap: 2px; }
.list-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.list-item:last-child { border-bottom: 0; }

/* screener */
.search-box { position: relative; flex: 1; min-width: 240px; }
.search-box .input { width: 100%; padding: 14px 16px 14px 44px; font-size: 16px; border-radius: 14px; }
.search-box svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--pop); border: 1px solid var(--line-2); border-radius: 12px; z-index: 30; overflow: hidden; box-shadow: var(--shadow); display: none; }
.suggest.open { display: block; }
.suggest div { padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.suggest div:hover, .suggest div.hl { background: rgba(255, 198, 41, 0.08); }
.suggest small { color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; font-weight: 600; }
.chip:hover { border-color: var(--gold-text); color: var(--gold-text); }
.stock-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.stock-head .px { font-size: 34px; font-weight: 800; }
.px-wrap { text-align: right; }
@media (max-width: 760px) { .px-wrap { text-align: left; width: 100%; } .px-wrap .chg { margin-top: 4px; } }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.metric { background: rgba(var(--fg), 0.03); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.metric .k { font-size: 11px; color: var(--muted); font-weight: 600; display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.metric .v { font-size: 17px; font-weight: 700; margin-top: 5px; }
.metric .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.range52 { position: relative; height: 6px; background: rgba(var(--fg), 0.08); border-radius: 3px; margin: 10px 0 4px; }
.range52 i { position: absolute; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); transform: translateX(-50%); box-shadow: 0 0 10px rgba(255, 198, 41, 0.6); }
.trade-panel { position: sticky; top: 92px; }
.side-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.side-toggle button { padding: 11px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-weight: 700; cursor: pointer; }
.side-toggle button.on.buy { background: rgba(60, 207, 127, 0.15); color: var(--up); border-color: rgba(60, 207, 127, 0.5); }
.side-toggle button.on.sell { background: rgba(240, 98, 90, 0.15); color: var(--down); border-color: rgba(240, 98, 90, 0.5); }
.calc { background: rgba(0, 0, 0, 0.3); border-radius: 12px; padding: 12px 14px; font-size: 13px; display: grid; gap: 6px; }
.calc div { display: flex; justify-content: space-between; }
.calc div span { color: var(--muted); }
.ticket-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.side-badge { font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 5px; letter-spacing: 0.06em; }
.side-badge.buy { background: rgba(60, 207, 127, 0.15); color: var(--up); }
.side-badge.sell { background: rgba(240, 98, 90, 0.15); color: var(--down); }
.impact { display: grid; gap: 0; }
.impact-row { display: grid; grid-template-columns: 1.4fr 1fr 24px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.impact-row .k { color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.impact-row .a { text-align: right; font-weight: 700; }
.impact-row .b { text-align: right; color: var(--muted); }
.impact-row .ar { color: var(--gold-text); text-align: center; }
.warn-box { border: 1px solid rgba(250, 178, 25, 0.4); background: rgba(250, 178, 25, 0.08); border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--warn-text); display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.warn-box.ok { border-color: rgba(60, 207, 127, 0.35); background: rgba(60, 207, 127, 0.07); color: #a7f0c6; }
.warn-box.bad { border-color: rgba(240, 98, 90, 0.45); background: rgba(240, 98, 90, 0.08); color: #ffb3ad; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 14px; line-height: 1.6; }
.empty b { color: var(--ink); display: block; font-size: 16px; margin-bottom: 6px; }
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.glossary div { background: rgba(var(--fg), 0.03); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.glossary b { color: var(--gold-text); display: block; margin-bottom: 4px; }

/* drop zone */
.drop { display: block; border: 1.5px dashed var(--gold-line); border-radius: 16px; padding: 28px; text-align: center; color: var(--ink-2); cursor: pointer; transition: 0.2s; }
.drop:hover, .drop.over { background: var(--gold-soft); border-color: var(--gold-text); }
.drop b { color: var(--gold-text); }

/* toast + modal */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--pop); border: 1px solid var(--gold-line); color: var(--ink); padding: 12px 18px; border-radius: 12px; z-index: 100; opacity: 0; transition: 0.3s; pointer-events: none; font-size: 14px; box-shadow: var(--shadow); max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); z-index: 90; display: none; place-items: center; padding: 20px; }
.modal-bg.open { display: grid; }
.modal { background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; width: min(520px, 100%); box-shadow: var(--shadow); display: grid; gap: 14px; }
.modal h2 { font-size: 18px; }
.modal p { color: var(--ink-2); font-size: 14px; margin: 0; line-height: 1.5; }
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 30px 20px 40px; position: relative; z-index: 1; line-height: 1.7; }
.skeleton { color: var(--muted); font-size: 13px; display: grid; place-items: center; height: 100%; min-height: 200px; text-align: center; line-height: 1.6; }


/* =================== v2: logos, motion, interactivity, responsive =================== */
/* header wraps instead of hiding tabs */
.top-inner { flex-wrap: wrap; row-gap: 10px; }
@media (max-width: 1380px) {
  nav.tabs { order: 3; width: 100%; flex-wrap: wrap; justify-content: center; overflow: visible; border-radius: 16px; }
  nav.tabs button { flex: 1 1 auto; }
}
@media (max-width: 760px) {
  .top-inner { padding: 10px 12px; gap: 10px; }
  .brand-text span { display: none; }
  .brand-mark { width: 36px; }
  nav.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; }
  nav.tabs button { padding: 9px 4px; font-size: 12px; text-align: center; }
  nav.tabs button .l { display: none; }
  nav.tabs button .s { display: inline; }
  .top-right { gap: 6px; }
  .pill { padding: 6px 9px; font-size: 11px; }
  #refreshBtn { padding: 6px 9px; font-size: 11px; }
}
@media (max-width: 360px) { nav.tabs { grid-template-columns: repeat(3, 1fr); } }

/* ticker tape */
.tape { border-top: 1px solid var(--line); overflow: hidden; height: 34px; position: relative; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tape:empty, .tape.hidden { display: none; }
.tape-track { display: inline-flex; gap: 28px; white-space: nowrap; align-items: center; height: 34px; padding-left: 20px; animation: tape 80s linear infinite; will-change: transform; }
.tape:hover .tape-track { animation-play-state: paused; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tape-item { font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 7px; align-items: center; border: 0; background: none; font-family: inherit; padding: 4px 6px; border-radius: 6px; }
.tape-item:hover { background: rgba(255, 198, 41, 0.08); color: var(--ink); }
.tape-item b { color: var(--ink); letter-spacing: .03em; }
@media (prefers-reduced-motion: reduce) { .tape-track { animation: none; } .tape { overflow-x: auto; } }

/* KSU lockup */
.lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.lockup img { width: 58px; height: auto; filter: drop-shadow(0 4px 18px rgba(255, 198, 41, 0.25)); }
.lockup div { display: grid; line-height: 1.05; }
.lockup b { font-size: 15px; font-weight: 900; letter-spacing: 0.04em; color: var(--ink); }
.lockup b.u { font-weight: 500; letter-spacing: 0.42em; font-size: 12px; margin-top: 2px; }
.lockup span { font-size: 9.5px; letter-spacing: 0.16em; color: var(--gold-text); font-weight: 700; margin-top: 5px; }
.lockup em { font-family: var(--serif); font-size: 13px; color: var(--ink-2); margin-top: 2px; }

/* hero: rotating gold edge + owl watermark */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.hero-main { isolation: isolate; }
.hero-main::before { background: conic-gradient(from var(--ang), transparent 0 55%, rgba(255,198,41,.85) 70%, transparent 85%) !important; animation: spin 7s linear infinite; }
@keyframes spin { to { --ang: 360deg; } }
.hero-owl { position: absolute; right: -40px; bottom: -60px; width: 320px; opacity: 0.09; z-index: -1; pointer-events: none; animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(-1deg); } }
@media (max-width: 760px) { .hero-owl { width: 210px; right: -30px; bottom: -40px; } .hero-main { padding: 22px; } }

/* cursor spotlight + tilt (fine pointers only) */
.card { transition: transform 0.25s cubic-bezier(.2,.8,.2,1), border-color 0.25s, box-shadow 0.25s; }
.card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 198, 41, 0.07), transparent 45%); }
@media (hover: hover) and (pointer: fine) {
  .card:hover { border-color: rgba(255, 198, 41, 0.22); }
  .card:hover::after { opacity: 1; }
  .tile:hover { box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,198,41,.15), 0 0 40px rgba(255,198,41,.06); }
}
.tile .value { background: var(--tile-grad); -webkit-background-clip: text; background-clip: text; }
.tile .value .up, .tile .value .down { -webkit-text-fill-color: currentColor; }
.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: rgba(255, 198, 41, 0.07); }
.list-item.clickable:hover { background: rgba(255,198,41,.05); border-radius: 8px; }

/* staggered entrance for cards */
.view.active .card { animation: cardIn 0.6s cubic-bezier(.2,.8,.2,1) both; }
.view.active .grid > .card:nth-child(2) { animation-delay: .05s; }
.view.active .grid > .card:nth-child(3) { animation-delay: .1s; }
.view.active .grid > .card:nth-child(4) { animation-delay: .15s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view.active .card, .hero-owl, .hero-main::before { animation: none !important; } }

/* splash */
.splash { position: fixed; inset: 0; z-index: 200; background: radial-gradient(600px 400px at 50% 45%, #1d1912, #0c0b0a 70%); display: grid; place-content: center; justify-items: center; gap: 18px; transition: opacity .5s, visibility .5s; }
.splash img { width: 120px; filter: drop-shadow(0 0 30px rgba(255,198,41,.35)); animation: owlPulse 1.6s ease-in-out infinite; }
.splash span { color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.splash-bar { width: 180px; height: 3px; background: rgba(var(--fg), .08); border-radius: 3px; overflow: hidden; }
.splash-bar i { display: block; width: 40%; height: 100%; background: var(--gold); border-radius: 3px; animation: bar 1.1s ease-in-out infinite; }
@keyframes bar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes owlPulse { 50% { transform: scale(1.06); } }
.splash.done { opacity: 0; visibility: hidden; }
.foot-owl { width: 46px; opacity: .55; margin-bottom: 6px; }

/* mobile fit */
@media (max-width: 760px) {
  .card { padding: 16px; border-radius: 16px; }
  .chart { height: 280px; } .chart.tall { height: 360px; } .chart.xl { height: 460px; }
  .tile .value { font-size: 22px; }
  .hero-value { font-size: 40px; }
  .hero-meta { gap: 14px 20px; } .hero-meta b { font-size: 15px; }
  .card-head { gap: 8px; } .card-head .hint { font-size: 11px; }
  .seg { flex-wrap: wrap; } .seg button { padding: 6px 8px; font-size: 11px; }
  .page-head { margin-bottom: 16px; } .page-head .row { width: 100%; } .page-head .row .input { flex: 1; min-width: 0; }
  .trade-panel { position: static; }
  .impact-row { grid-template-columns: 1.3fr 1fr 16px 1fr; font-size: 12px; }
  .lockup img { width: 46px; } .lockup b { font-size: 13px; } .lockup b.u { font-size: 10px; } .lockup em { font-size: 12px; }
  .stock-head .px { font-size: 26px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glossary { grid-template-columns: 1fr; }
  td .nm { max-width: 140px; }
}

@media (max-width: 1100px) {
  .scr-grid { display: flex; flex-direction: column; align-items: stretch !important; }
  .scr-left { display: contents; }
  #stockCard, #impactCard, #simCard, .trade-panel { width: 100%; max-width: 100%; }
  #stockCard { order: 1; } .trade-panel { order: 2; width: 100%; } #impactCard { order: 3; } #simCard { order: 4; }
  .scr-grid > * { width: 100%; }
}

@media (max-width: 720px) {
  #kpiTiles, #perfTiles, #riskTiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { padding: 14px; } .tile .label { font-size: 11px; } .tile .foot { font-size: 11px; }
}

.pill.local { border-color: rgba(250,178,25,.6); color: var(--warn-text); }
.local-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid rgba(250,178,25,.45); background: rgba(250,178,25,.08); color: #ffe2a3; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

/* single floating explanation box — always kept inside the screen */
.tip::before { content: ''; position: absolute; inset: -10px; } /* bigger tap target */
.tip.on { border-color: var(--gold-text); color: var(--gold-text); }
.tip-pop { position: fixed; z-index: 150; max-width: min(300px, calc(100vw - 24px)); background: var(--pop); color: var(--ink); border: 1px solid var(--gold-line);
  padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.tip-pop.show { opacity: 1; transform: none; pointer-events: auto; }
.tip-pop .x { display: none; }
@media (hover: none) { .tip-pop { padding-right: 34px; } .tip-pop .x { display: grid; place-items: center; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(var(--fg), .08); color: var(--ink); font-size: 13px; cursor: pointer; } }

/* phones: header scrolls away instead of covering half the screen; a small "top" button brings it back */
@media (max-width: 760px) {
  header.top { position: relative; }
  .to-top { position: fixed; right: 14px; bottom: 18px; z-index: 60; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold-line); background: rgba(24,22,20,.92);
    color: var(--gold-text); font-size: 18px; display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; backdrop-filter: blur(8px); }
  .to-top.show { opacity: 1; pointer-events: auto; }
}
@media (min-width: 761px) { .to-top { display: none; } }

/* ---------- trading history ---------- */
.hist-status { border-radius: 12px; padding: 11px 14px; font-size: 13px; line-height: 1.5; margin: 6px 0 12px; border: 1px solid var(--line-2); background: rgba(var(--fg), .03); color: var(--ink-2); }
.hist-status b { color: var(--ink); }
.hist-status.now { border-color: rgba(60,207,127,.35); background: rgba(60,207,127,.07); }
.hist-status.past { border-color: rgba(255,198,41,.35); background: rgba(255,198,41,.06); }
.hist-tl { margin: 4px 0 14px; }
.hist-tl .track { position: relative; height: 14px; background: rgba(var(--fg), .06); border-radius: 7px; }
.hist-tl .track i { position: absolute; top: 0; height: 100%; background: linear-gradient(90deg, #c99a1a, var(--gold)); border-radius: 7px; opacity: .85; }
.hist-tl .track i.open { box-shadow: 0 0 12px rgba(255,198,41,.45); }
.hist-tl .track b, .hist-tl .legend b { position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #141210; }
.hist-tl b.b { background: var(--up); } .hist-tl b.s { background: var(--down); }
.hist-tl .ticks { position: relative; height: 16px; margin-top: 4px; font-size: 10px; color: var(--muted); }
.hist-tl .ticks span { position: absolute; transform: translateX(-50%); }
.hist-tl .legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.hist-tl .legend span { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.hist-tl .legend b { position: static; transform: none; display: inline-block; }
.hist-tl .legend .lg-held { display: inline-block; width: 16px; height: 8px; border-radius: 4px; background: var(--gold); }
.hist-metrics { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-bottom: 4px; }
.hist-table { max-height: 380px; }
.hist-table td { font-size: 12.5px; }
.ttype { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.ttype.buy { background: rgba(60,207,127,.14); color: var(--up); }
.ttype.sell { background: rgba(240,98,90,.14); color: var(--down); }
.ttype.evt { background: rgba(144,133,233,.15); color: #b9b1f5; }
.hist-btn { padding: 5px 9px; }
.modal.wide { width: min(860px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.recon { display: grid; gap: 8px; }
.recon .ok, .recon .warn { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.recon .ok::before { content: '✓'; color: var(--up); font-weight: 800; }
.recon .warn::before { content: '!'; color: var(--warn); font-weight: 800; width: 10px; text-align: center; }
@media (max-width: 760px) { .hist-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .modal.wide { padding: 16px; } }

/* never let wide content (tables, long names) widen the page on phones */
.grid > *, .scr-grid > *, .card, .modal { min-width: 0; }
html, body { max-width: 100%; }
.hist-status, .warn-box span { overflow-wrap: anywhere; }

/* charts never set the width of their card */
.chart { max-width: 100%; overflow: hidden; }

/* search box + its dropdown always float above the cards below */
.search-card { z-index: 40; isolation: auto; }
.view.active .search-card { animation: none; }
.suggest { z-index: 60; max-height: 340px; overflow-y: auto; }
/* on/off switch */
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 34px; height: 20px; border-radius: 999px; background: rgba(var(--fg), .12); position: relative; transition: background .2s; flex-shrink: 0; }
.switch .track i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #d9d6ce; transition: transform .2s, background .2s; }
.switch input:checked + .track { background: rgba(255,198,41,.35); }
.switch input:checked + .track i { transform: translateX(14px); background: var(--gold); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* collapsible sections on the stock card */
.fold { border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--fg), .02); }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; font-weight: 700; font-size: 14px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary small { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: auto; text-align: right; }
.fold > summary::after { content: '▾'; color: var(--gold-text); transition: transform .2s; flex-shrink: 0; }
.fold[open] > summary::after { transform: rotate(180deg); }
.fold > summary:hover { background: rgba(255,198,41,.04); border-radius: 14px; }
.fold > *:not(summary) { margin: 0 14px 14px; }
@media (max-width: 760px) { .fold > summary { flex-wrap: wrap; } .fold > summary small { margin-left: 0; text-align: left; width: calc(100% - 24px); order: 3; } }

/* collapsible sector rows in Position weights */
tr.fold-row { cursor: pointer; }
tr.fold-row:hover td { background: rgba(255,198,41,.07); }
tr.fold-row .caret { display: inline-block; width: 16px; color: var(--gold-text); transition: transform .2s; }
tr.fold-row.open .caret { transform: rotate(90deg); }
tr.fold-row:focus-visible td { outline: 2px solid var(--gold); outline-offset: -2px; }
.adj-toggle { font-size: 12px; } .hist-tx + * {} @media (max-width: 520px) { .adj-toggle { font-size: 11px; } }
.adj-toggle { white-space: normal; max-width: 100%; }
.modal { grid-template-columns: minmax(0, 1fr); }
/* upload trade review */
.tr-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tr-sum > div { background: rgba(var(--fg), .03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.tr-sum small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.tr-sum b { font-size: 14px; }
.tr-table td { vertical-align: top; }
.tr-table .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tr-table .sub.up { color: var(--up, #3ccf7f); } .tr-table .sub.down { color: var(--down, #f0625a); }
.tr-table .nm { display: block; color: var(--muted); font-size: 11px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-src { font-size: 11px; color: var(--gold-text); margin-top: 3px; }
.arrow { color: var(--muted); margin: 0 2px; }
@media (max-width: 600px) { .tr-sum { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .tr-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tr-sum > div { padding: 8px; } .tr-sum b { font-size: 12px; } .tr-sum small { font-size: 9px; }
  .tr-table thead { display: none; }
  .tr-table, .tr-table tbody { display: block; width: 100%; }
  .tr-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 12px; border-bottom: 1px solid var(--line); }
  .tr-table td { padding: 0 !important; border: 0 !important; text-align: left !important; font-size: 13px; }
  .tr-table td:first-child { grid-column: 1 / 3; } .tr-table td:nth-child(2) { justify-self: end; }
  .tr-table td[data-l]::before { content: attr(data-l); display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
  .tr-table .nm { max-width: 100%; }
}
@media (max-width: 600px) {
  .tr-table td { white-space: normal !important; min-width: 0; }
  .tr-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tr-sum > div:first-child { grid-column: 1 / -1; }
}
/* performance chart: view toggle + custom dates */
.seg.sm button { padding: 5px 10px; font-size: 12px; }
.perf-dates { gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin: 0 0 6px; }
.perf-dates input[type=date] { background: rgba(var(--fg), .04); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 5px 8px; font: inherit; color-scheme: dark; }
.perf-dates .hint { color: var(--muted); }
@media (max-width: 600px) { .perf-dates .hint { display: none; } .perf-dates input[type=date] { padding: 4px 6px; } }
/* stock card: GICS line, chart toolbar */
.gics-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.gics-k { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #111; background: var(--gold); border-radius: 4px; padding: 1px 5px; }
.gics-sep { color: var(--muted); }
.stock-chart-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.cmp-box { display: flex; gap: 6px; align-items: center; flex: 1 1 220px; max-width: 360px; }
.cmp-box .input { flex: 1; min-width: 0; padding: 6px 10px; font-size: 13px; text-transform: uppercase; }
.cmp-box .input::placeholder { text-transform: none; }
@media (max-width: 600px) { .cmp-box { max-width: none; } #stkRange button { padding: 5px 8px; } }
/* ---------- Scrappy AI ---------- */
.sc-fab { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1px solid rgba(255,198,41,.5);
  background: var(--fab-bg); color: var(--ink); font: 700 14px Montserrat, sans-serif; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 4px rgba(255,198,41,.08); transition: transform .15s, opacity .15s; }
.sc-fab:hover { transform: translateY(-2px); }
.sc-fab img { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); padding: 3px; }
.sc-fab.hide { opacity: 0; pointer-events: none; }
.sc-panel { position: fixed; right: 20px; bottom: 20px; z-index: 950; width: min(440px, calc(100vw - 40px)); height: min(640px, calc(100vh - 40px)); display: flex; flex-direction: column;
  background: var(--panel); backdrop-filter: blur(14px); border: 1px solid rgba(255,198,41,.25); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none; transition: opacity .18s, transform .18s; }
.sc-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.sc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sc-head img { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); padding: 3px; }
.sc-head > div { flex: 1; min-width: 0; } .sc-head b { display: block; font-size: 15px; } .sc-head small { color: var(--muted); font-size: 11px; }
.sc-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.sc-msg { max-width: 92%; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.sc-msg.me { align-self: flex-end; background: var(--gold); color: #1a1816; font-weight: 600; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.sc-msg.bot { align-self: flex-start; background: rgba(var(--fg), .05); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.sc-msg.bot p { margin: 0 0 6px; } .sc-msg.bot p:last-child { margin-bottom: 0; }
.sc-msg.bot ul { margin: 2px 0 8px; padding-left: 18px; } .sc-msg.bot li { margin: 2px 0; } .sc-msg.bot b { color: var(--ink-strong); }
.sc-msg.err { border-color: rgba(240,98,90,.4); color: #f3b0ab; }
.sc-meta { margin-top: 6px; font-size: 10.5px; color: var(--muted); }
.sc-typing { display: flex; align-items: center; gap: 4px; } .sc-typing em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 6px; }
.sc-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: scDot 1s infinite ease-in-out; }
.sc-typing span:nth-child(2) { animation-delay: .15s; } .sc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes scDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.sc-hello { margin: auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.sc-hello img { width: 64px; height: 64px; border-radius: 50%; background: var(--gold); padding: 6px; margin-bottom: 4px; } .sc-hello b { color: var(--ink); font-size: 16px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.sc-chip { border: 1px solid var(--line); background: rgba(var(--fg), .04); color: var(--ink-2); border-radius: 999px; padding: 6px 11px; font: 600 12px Montserrat, sans-serif; cursor: pointer; }
.sc-chip:hover { border-color: var(--gold-text); color: var(--ink); }
.sc-foot { display: flex; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid var(--line); align-items: flex-end; }
.sc-foot textarea { flex: 1; resize: none; background: rgba(var(--fg), .04); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font: inherit; font-size: 14px; padding: 9px 11px; max-height: 120px; }
.sc-foot textarea:focus { outline: none; border-color: var(--gold-text); }
.sc-note { padding: 0 12px 10px; font-size: 10.5px; color: var(--muted); }
@media (max-width: 640px) {
  .sc-fab { right: 12px; bottom: 12px; padding: 6px 12px 6px 6px; font-size: 13px; } .sc-fab img { width: 30px; height: 30px; }
  .sc-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .sc-foot textarea { font-size: 16px; }
  body.sc-lock { overflow: hidden; }
}
.sc-caret { display: inline-block; width: 7px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--gold); animation: scBlink .8s steps(2) infinite; }
@keyframes scBlink { 50% { opacity: 0; } }
.sc-msg.bot[data-typing] { cursor: pointer; }
/* ---------- KSU program badge + theme toggle ---------- */
.ksu-badge { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 14px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--gold-line);
  background: var(--gold-soft); color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 700; transition: transform .15s, border-color .15s, box-shadow .15s; max-width: 100%; }
.ksu-badge:hover { transform: translateY(-1px); border-color: var(--gold); box-shadow: 0 8px 24px rgba(255,198,41,.18); }
.ksu-badge img { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); padding: 3px; flex-shrink: 0; }
.ksu-badge span { display: grid; line-height: 1.2; min-width: 0; } .ksu-badge small { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ksu-badge i { font-style: normal; color: var(--gold-text); font-size: 14px; }
footer a { color: var(--gold-text); text-decoration: none; } footer a:hover { text-decoration: underline; }
.theme-btn { min-width: 36px; justify-content: center; font-size: 15px; line-height: 1; }
/* light mode: tone the gold 3D background down so it reads on a light page */
html[data-theme="light"] #bg3d { filter: invert(1) hue-rotate(180deg) saturate(1.4); opacity: .45; }
html[data-theme="light"] .bg-glow { opacity: .6; }
html[data-theme="light"] .hero-owl { opacity: .06; }
html, body, .card, .tile, header.top, nav.tabs { transition: background-color .25s, color .25s, border-color .25s; }
html[data-theme="light"] header.top { background: rgba(250, 248, 243, 0.85); }
html[data-theme="light"] .bg-glow { background: radial-gradient(1200px 600px at 85% -10%, rgba(255, 198, 41, 0.16), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(255, 198, 41, 0.10), transparent 60%); }
html[data-theme="light"] .input, html[data-theme="light"] select.input, html[data-theme="light"] .calc { background: rgba(45, 41, 38, 0.04); }
html[data-theme="light"] .modal-bg { background: rgba(45, 41, 38, 0.35); }
html[data-theme="light"] .to-top { background: rgba(255, 255, 255, 0.95); }
html[data-theme="light"] .lockup img { filter: drop-shadow(0 2px 8px rgba(196, 146, 0, 0.25)); }
.warn-box.ok { color: var(--ok-text, #a7f0c6); } .warn-box.bad { color: var(--bad-text, #ffb3ad); }
html[data-theme="light"] { --ok-text: #0c6b3c; --bad-text: #a3261e; }
.sc-fab { color: #f2f0ea; }
.top-inner { gap: 16px; }
@media (min-width: 1381px) and (max-width: 1520px) { #refreshBtn .lbl { display: none; } .brand-text span { font-size: 9.5px; } }
/* phones: iOS zooms into any field with text under 16px — keep every field at 16px on touch screens */
@media (pointer: coarse) and (max-width: 760px) {
  input, select, textarea, .input, .cmp-box .input, .perf-dates input[type=date] { font-size: 16px !important; }
  .tape-track > * { min-height: 34px; display: inline-flex; align-items: center; }
}
.cmp-box { min-width: 0; width: 100%; }
.cmp-box .input { width: auto !important; flex: 1 1 0 !important; min-width: 0 !important; }
.cmp-box .btn { flex-shrink: 0; }
/* phones: Scrappy button becomes a small round owl so it doesn't cover content; back-to-top sits above it */
@media (max-width: 640px) {
  .sc-fab { padding: 4px; width: 52px; height: 52px; justify-content: center; }
  .sc-fab span { display: none; }
  .sc-fab img { width: 42px; height: 42px; }
  .to-top { bottom: 78px !important; }
  main { padding-bottom: 90px; }
}
/* ---------- asset classes: one dot colour each, used on every tab ---------- */
.ac-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; flex-shrink: 0; }
.ac-dot.eq { background: var(--gold); } .ac-dot.fi { background: var(--blue); } .ac-dot.mm { background: var(--violet); } .ac-dot.cash { background: var(--gray); }
.ac-dot + .ac-dot { margin-left: -3px; }
.ac-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.ac-cell { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 12.5px; min-width: 0; }
.ac-cell b { font-size: 15px; } .ac-cell small { grid-column: 2 / 4; color: var(--muted); font-size: 11.5px; }
.ac-split { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ac-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: rgba(var(--fg), 0.02); border-top: 3px solid var(--gray); min-width: 0; }
.ac-card.eq { border-top-color: var(--gold); } .ac-card.fi { border-top-color: var(--blue); } .ac-card.mm { border-top-color: var(--violet); }
.ac-top { display: flex; align-items: center; gap: 4px; } .ac-top b { flex: 1; } .ac-top .num { font-weight: 800; }
.ac-v { font-size: 20px; font-weight: 800; margin: 6px 0 2px; } .ac-what { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.ac-note { font-size: 11.5px; color: var(--muted); margin-top: 6px; } .ac-in { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; color: var(--muted); align-items: center; }
@media (max-width: 900px) { .ac-split, .ac-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ---------- Performance tab ---------- */
.rv-controls { display: grid; gap: 12px; }
.rv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.rv-k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); width: 48px; }
.rv-years { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.rv-years select { width: auto; padding: 6px 8px; font-size: 13px; }
.rv-dl { margin-left: auto; display: inline-flex; gap: 6px; }
.rv-slider { flex: 1 1 320px; max-width: 560px; display: grid; gap: 6px; }
.rv-slider-labels { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.rv-slider input[type=range] { width: 100%; accent-color: var(--gold); height: 22px; background: transparent; }
.rv-slider input[type=range] { -webkit-appearance: none; appearance: none; }
.rv-slider input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--violet) 50%, var(--blue)); }
.rv-slider input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--violet) 50%, var(--blue)); }
.rv-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--legacy); box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: grab; }
.rv-slider input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--legacy); cursor: grab; }
.rv-slider input[type=range] { direction: rtl; } /* value = equity share, so equities sit on the left like the label */
.rv-presets { display: flex; flex-wrap: wrap; gap: 6px; } .rv-presets .chip.on { border-color: var(--gold); color: var(--gold-text); background: var(--gold-soft); }
.rv-bench { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--line); }
.rv-note { color: var(--muted); font-size: 12px; } .rv-note b { color: var(--ink-2); }
.rv-title { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; font-size: 15px; }
@media (max-width: 640px) { .rv-k { width: 100%; } .rv-dl { margin-left: 0; } .rv-title { font-size: 12.5px; } }
.ac-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.ac-strip-slot:empty { display: none; }
@media (max-width: 720px) { #rvTiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } #rvTiles .tile .value { font-size: 22px; } }
.tr-table tr.tr-group td { background: rgba(var(--fg), 0.03); padding: 8px 12px !important; font-size: 12px; }
.tr-table tr.tr-group td span:last-child { color: var(--muted); margin-left: 8px; }
@media (max-width: 600px) { .tr-table tr.tr-group { display: block; padding: 0; } .tr-table tr.tr-group td { display: block; } }
.dq-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dq-sum > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; background: rgba(var(--fg), .02); }
.dq-sum b { font-size: 22px; } .dq-sum span { font-size: 12px; color: var(--muted); } .warn-t { color: var(--warn); }
.dq-p { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin: 12px 0; }
@media (max-width: 720px) { .dq-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ---------- 8-bit owl easter egg ---------- */
.pix-owl { position: fixed; left: 0; top: 0; z-index: 2000; width: 48px; height: 36px; cursor: pointer; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); will-change: transform; }
.pix-owl .f { position: absolute; inset: 0; image-rendering: pixelated; }
.pix-owl .up { animation: owlA .3s infinite; } .pix-owl .down { animation: owlB .3s infinite; }
@keyframes owlA { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes owlB { 0%, 49.9% { opacity: 0; } 50%, 100% { opacity: 1; } }
.pix-hoot { position: fixed; z-index: 2001; transform: translateX(-50%); background: var(--gold); color: #1a1714; font: 800 12px ui-monospace, Menlo, monospace; padding: 5px 9px; border-radius: 4px; box-shadow: 3px 3px 0 #1a1714; pointer-events: none; animation: hootUp 1.6s ease-out forwards; white-space: nowrap; }
@keyframes hootUp { from { opacity: 0; margin-top: 6px; } 15% { opacity: 1; margin-top: 0; } 80% { opacity: 1; } to { opacity: 0; margin-top: -14px; } }
/* ---------- IPS checklist ---------- */
.ips-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: rgba(var(--fg), .02); }
.ips-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; } .ips-head b { font-size: 14px; }
.ips-sum { margin-left: auto; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.ips-sum.ok { color: var(--up); background: rgba(60,207,127,.12); } .ips-sum.bad { color: var(--down); background: rgba(240,98,90,.12); } .ips-sum.info { color: var(--muted); background: rgba(var(--fg), .05); }
.ips-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.ips-g { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ips-row { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.ips-row:last-child { border-bottom: 0; }
.ips-i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; margin-top: 1px; }
.ips-i.pass { background: rgba(60,207,127,.16); color: var(--up); } .ips-i.fail { background: rgba(240,98,90,.16); color: var(--down); }
.ips-i.info { background: rgba(var(--fg), .07); color: var(--muted); } .ips-i.pend { background: rgba(var(--fg), .07); color: var(--muted); }
.ips-l { display: block; font-size: 13px; font-weight: 600; color: var(--ink); } .ips-d { display: block; font-size: 12px; color: var(--muted); }
.ips-row.fail .ips-l { color: var(--down); }
@media (max-width: 720px) { .ips-grid { grid-template-columns: 1fr; } .ips-sum { margin-left: 0; } }
.ips-i.warn { background: rgba(255,198,41,.18); color: var(--gold-text); } .ips-row.warn .ips-l { color: var(--gold-text); }
@media (min-width: 1381px) and (max-width: 1600px) { nav.tabs button { padding-left: 11px !important; padding-right: 11px !important; } .brand-text span { display: none; } }
@media (min-width: 1381px) { nav.tabs button { padding-left: 12px !important; padding-right: 12px !important; } }
@media (min-width: 1381px) { .brand-text span { display: none; } }
.sc-msg.bot p.sc-formula { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: rgba(var(--fg), .05); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 4px 0 8px; overflow-x: auto; }

/* upload guide */
.up-guide .ug-item{border:1px solid var(--line);border-radius:12px;padding:14px 16px;background:rgba(var(--fg),.025)}
.up-guide .ug-tag{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--gold-text,var(--gold));font-weight:700}
.up-guide h3{margin:4px 0 6px;font-size:15px}
.up-guide p,.up-guide li{font-size:13px;line-height:1.55;color:var(--ink-2)}
.up-guide p b,.up-guide li b{color:var(--ink)}
.up-guide ol{margin:6px 0 12px;padding-left:18px}
.up-guide .ug-foot{margin-top:12px;font-size:12px;color:var(--muted);line-height:1.5}
.ips-sum.warn { color: var(--gold-text); background: rgba(255,198,41,.14); }

/* trade impact */
.calc .calc-sec { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.calc .calc-sec b { text-align: right; }
.warn-t { color: var(--gold-text); }
.imp-table td, .imp-table th { white-space: nowrap; }
.imp-table tr.imp-dim td { color: var(--muted); }
.imp-table tr.imp-hit td:first-child { font-weight: 700; color: var(--ink); }
.imp-pop .impact-row { padding: 7px 0; }
.tr-sum .sub { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* previously owned banner (Screener) */
.tag.prev-tag { color: var(--gold-text); border-color: rgba(255,198,41,.45); background: rgba(255,198,41,.08); }
.prev-owned { border: 1px solid rgba(255,198,41,.38); background: linear-gradient(90deg, rgba(255,198,41,.10), rgba(255,198,41,.03)); border-radius: 12px; padding: 12px 14px; }
.prev-owned .po-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prev-owned .po-badge { font-weight: 800; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-text); }
.prev-owned .po-span { font-size: 12px; color: var(--ink-2); flex: 1 1 auto; min-width: 0; }
.prev-owned .po-more { margin-left: auto; }
.prev-owned .po-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 16px; margin-top: 10px; font-size: 13px; }
.prev-owned .po-grid > div { min-width: 0; overflow-wrap: anywhere; }
.prev-owned .po-k { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
@media (max-width: 720px) { .prev-owned .po-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .prev-owned .po-more { margin-left: 0; } }

.cmp-field { position: relative; flex: 1; min-width: 0; }
.cmp-field .input { width: 100%; }
.cmp-field .suggest { min-width: 280px; }
.cmp-box .input#cmpInput { text-transform: none; }
.stock-chart-bar { flex-wrap: wrap; row-gap: 8px; }
.stock-chart-bar .cmp-box { flex: 1 1 280px; max-width: none; }
.stock-chart-bar .cmp-box .btn { flex: 0 0 auto; white-space: nowrap; }
.cmp-box .cmp-field { flex: 1 1 0; min-width: 0; }
.cmp-box .cmp-field .input#cmpInput { width: 100% !important; flex: none !important; }
.stock-chart-bar .cmp-box { max-width: 480px; }
@media (max-width: 600px) { .stock-chart-bar .cmp-box { max-width: none; } .cmp-field .suggest { min-width: 0; } }

/* asset-class strip: dollar amounts big and easy to read */
.ac-strip .ac-cell { display: block; padding: 12px 14px 12px; border-left: 3px solid var(--gray); }
.ac-strip .ac-cell.eq { border-left-color: var(--gold); } .ac-strip .ac-cell.fi { border-left-color: var(--blue); } .ac-strip .ac-cell.mm { border-left-color: var(--violet); }
.ac-strip .ac-l { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ac-strip .ac-l span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-strip .ac-l em { font-style: normal; font-weight: 800; font-size: 13px; color: var(--ink); background: rgba(var(--fg), .06); border-radius: 999px; padding: 2px 8px; }
.ac-strip .ac-usd { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); margin-top: 6px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ac-strip .ac-cell small { display: none; }
@media (max-width: 900px) { .ac-strip .ac-usd { font-size: 21px; } }
@media (max-width: 380px) { .ac-strip .ac-usd { font-size: 18px; } .ac-strip .ac-l { font-size: 12px; } .ac-strip .ac-cell { padding: 10px 11px; } }
@media (max-width: 600px) {
  .ac-strip .ac-l em { display: none; }
  .ac-strip .ac-l span { white-space: normal; overflow: visible; }
  .ac-strip .ac-cell small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
}

/* holdings editor */
.ed-intro { font-size: 13px; color: var(--ink-2); margin: -4px 0 12px; line-height: 1.5; }
.ed-pending { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid rgba(255,198,41,.45); background: rgba(255,198,41,.08); border-radius: 12px; }
.ed-pending > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ed-pending b { color: var(--gold-text); } .ed-pending span { color: var(--ink-2); overflow-wrap: anywhere; }
#tblEdit .input.sm { height: 34px; padding: 4px 10px; font-size: 13px; }
#tblEdit input.n { text-align: right; width: 110px; }
#tblEdit select.input.sm { min-width: 130px; }
#tblEdit td { vertical-align: middle; }
.ed-hold { display: flex; flex-direction: column; min-width: 150px; } .ed-hold b { font-size: 14px; } .ed-hold span { font-size: 12px; color: var(--muted); }
.ed-badge { font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--gold-text); margin-top: 2px; }
.ed-badge.new { color: var(--up); } .ed-badge.sold { color: var(--down); }
.ed-row.ed-edit td, .ed-row.ed-new td { background: rgba(255,198,41,.05); }
.ed-row.ed-gone td { opacity: .7; }
.ed-act { display: flex; gap: 6px; justify-content: flex-end; } .ed-act .btn { white-space: nowrap; }
.ed-buy { color: var(--up); } .ed-sell { color: var(--down); }
.ed-chosen { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--fg), .03); margin: 10px 0 4px; }
.ed-chosen b { font-size: 18px; } .ed-chosen span { color: var(--ink-2); } .ed-chosen em { font-style: normal; font-size: 12px; color: var(--muted); flex-basis: 100%; }
.ed-chosen .ed-px { margin-left: auto; font-weight: 700; color: var(--ink); }
.ed-fields { gap: 10px; margin-top: 10px; } .ed-fields .field { margin: 0; }
.ed-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.ed-warn { color: var(--down); font-size: 12px; padding-top: 6px; }
.btn.danger-solid { background: var(--down); color: #fff; border-color: transparent; } .btn.danger-solid:disabled { opacity: .5; }
.btn:disabled { cursor: not-allowed; opacity: .55; }
@media (max-width: 720px) { .ed-fields.g-3, .ed-fields.g-2 { grid-template-columns: 1fr 1fr; } .ed-pending { flex-direction: column; align-items: stretch; } }
/* every pop-up scrolls on small screens, and floating buttons step aside while one is open */
.modal { max-height: calc(100dvh - 40px); overflow: auto; overscroll-behavior: contain; }
body:has(.modal-bg.open) .sc-fab, body:has(.modal-bg.open) .to-top { display: none !important; }
.ed-check input { accent-color: var(--gold); width: 16px; height: 16px; }
@media (max-width: 600px) { .modal-bg { padding: 10px; } .modal { padding: 18px; } }
.modal .btn.danger-solid { background: #e5484d; color: #fff; border-color: #e5484d; font-weight: 700; }
.modal .btn.danger-solid:disabled { background: rgba(229,72,77,.35); border-color: transparent; }

.imp-mix { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.imp-mix b { color: var(--ink); } .imp-mix .imp-sep { color: var(--muted); }
.imp-basis { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin: 8px 0 10px; padding: 8px 12px; border-left: 3px solid var(--gold); background: rgba(var(--fg), .03); border-radius: 0 8px 8px 0; }
.imp-basis b { color: var(--ink); }

.imp-chart { height: 440px; margin-top: 6px; }
@media (max-width: 600px) { .imp-chart { height: 480px; } }

/* Screener & Trade Lab: the analysts' main tool, highlighted */
nav.tabs button.tab-star:not(.active) { color: var(--gold-text); background: rgba(255,198,41,.10); box-shadow: inset 0 0 0 1px rgba(255,198,41,.55); }
nav.tabs button.tab-star:not(.active):hover { background: rgba(255,198,41,.18); color: var(--ink); }
nav.tabs button.tab-star i { font-style: normal; margin-right: 2px; }
.tl-cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; border: 1px solid rgba(255,198,41,.45); background: linear-gradient(100deg, rgba(255,198,41,.12), rgba(255,198,41,.03) 60%); }
.tl-cta-t { flex: 1 1 380px; min-width: 0; }
.tl-cta .tl-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
.tl-cta h2 { margin: 4px 0 6px; font-size: 20px; }
.tl-cta p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.tl-cta-f { flex: 1 1 420px; display: flex; gap: 10px; min-width: 0; }
.tl-cta-f .input { width: 100%; text-transform: none; }
.tl-cta-f .btn { white-space: nowrap; }
@media (max-width: 600px) { .tl-cta-f { flex-direction: column; } .tl-cta-f .btn { width: 100%; justify-content: center; } }

/* Scrappy: suggested next questions */
.sc-next { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; padding-left: 2px; animation: scNext .35s ease-out both; }
.sc-next .sc-chip { text-align: left; }
.sc-next .sc-chip.more { border-color: rgba(255,198,41,.55); color: var(--gold-text); }
@keyframes scNext { from { opacity: 0; transform: translateY(4px); } }

/* Trade impact: analyst topline vs committee detail */
.pitch-head, .committee-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.imp-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #111; background: var(--gold); border-radius: 999px; padding: 3px 10px; }
.imp-tag.dim { color: var(--ink-2); background: rgba(var(--fg), .08); }
.pitch-head .hint, .committee-head .hint { font-size: 12px; color: var(--muted); }
.committee-head { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 22px; }
.ps-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ps-card { border: 1px solid rgba(255,198,41,.45); background: linear-gradient(160deg, rgba(255,198,41,.10), rgba(255,198,41,.02)); border-radius: 14px; padding: 16px 18px; }
.ps-sec { font-size: 13px; font-weight: 800; color: var(--gold-text); text-transform: uppercase; letter-spacing: .05em; }
.ps-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.ps-big span { font-size: 26px; font-weight: 700; color: var(--ink-2); }
.ps-big i { font-style: normal; font-size: 22px; color: var(--muted); }
.ps-big b { font-size: 38px; font-weight: 800; color: var(--ink); line-height: 1; }
.ps-big em { font-style: normal; font-size: 13px; color: var(--ink-2); flex-basis: 100%; }
.ps-big em strong { margin-left: 6px; }
.ps-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ps-facts > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-facts small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ps-facts b { font-size: 15px; } .ps-facts span { font-size: 12px; color: var(--ink-2); }
.ps-ips.ok { color: var(--up); } .ps-ips.warn { color: var(--gold-text); } .ps-ips.bad { color: var(--down); }
.ps-ips { font-size: 13px !important; }
.ps-stock { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; padding-top: 10px; font-size: 13px; color: var(--ink-2); }
.ps-stock b.up, .ps-stock b.down { font-size: 14px; }
.ps-copy { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--fg), .04); border: 1px dashed var(--line); }
.ps-copy p { flex: 1; margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink); }
.ps-copy .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 600px) { .ps-facts { grid-template-columns: 1fr 1fr; } .ps-copy { flex-direction: column; } }

/* simpler analyst cards */
.ps-card { padding: 16px 20px; }
.ps-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.ps-head b { font-size: 16px; }
.ps-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; margin-top: 12px; }
.ps-two > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ps-two small { font-size: 12px; color: var(--muted); }
.ps-two b { font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ps-two b.ps-over { color: var(--gold-text); } .ps-two b.ps-under { color: var(--blue); }
.ps-two span { font-size: 13px; color: var(--ink-2); }
@media (max-width: 600px) { .ps-two b { font-size: 24px; } }
.imp-mix.imp-split { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }

.ps-total { margin-top: 12px; border: 1.5px solid var(--gold); border-radius: 14px; padding: 16px 20px; background: rgba(255,198,41,.14); }
.ps-total .ps-head b { color: var(--ink); }
.ps-tot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 28px; margin-top: 12px; }
.ps-tot-grid small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ps-tot-grid p { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; margin: 0; padding: 6px 0; border-top: 1px solid var(--line); }
.ps-tot-grid p span { font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; flex: 1 1 120px; }
.ps-tot-grid p b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ps-tot-grid p b.ps-over { color: var(--gold-text); } .ps-tot-grid p b.ps-under { color: var(--blue); }
.ps-tot-grid p em { font-style: normal; font-size: 12px; color: var(--muted); }
