/* Auxflo Card Desk — flat, data-first. Color only where it means something:
   green = under comp, red = losing money / ending now, amber = ending soon. */
/* Brand: black / white + green #00D078 (light) and #5FE08A (dark). */
:root {
  --brand-green: #5FE08A;
  --bg: #0A0A0B;
  --topbar: rgba(10, 10, 11, 0.94);
  --surface: #111214;
  --surface-2: #17181B;
  --surface-3: #1E2024;
  --line: #222428;
  --line-2: #2D3035;
  --text: #F2F3F5;
  --text-2: #A8ADB5;
  --muted: #6E737C;
  --ink: #FFFFFF;
  --pos: #3FDA86;
  --pos-2: #8FE6B3;
  --pos-soft: rgba(63, 218, 134, 0.12);
  --neg: #F0605F;
  --neg-soft: rgba(240, 96, 95, 0.12);
  --warn: #F2B84B;
  --warn-soft: rgba(242, 184, 75, 0.12);
  --warn-text: #F5D9A0;
  --accent: #5FE08A;
  --accent-2: #4CCB77;
  --accent-soft: rgba(95, 224, 138, 0.14);
  --on-accent: #05140B;
  --star: #F2C14E;
  --chip-on-bg: #F2F3F5;
  --chip-on-text: #0A0A0B;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  --font-ui: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-num: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-brand: "Michroma", "Geist", sans-serif;
  --radius: 10px;
  --gutter: 24px;
  --maxw: 1180px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --brand-green: #00D078;
    --bg: #F6F7F8; --topbar: rgba(255, 255, 255, 0.94);
    --surface: #FFFFFF; --surface-2: #F2F3F5; --surface-3: #E9EBEE;
    --line: #E4E6EA; --line-2: #D4D7DC;
    --text: #0A0A0B; --text-2: #4A4F57; --muted: #80858E; --ink: #0A0A0B;
    --pos: #00A35E; --pos-2: #1FA868; --pos-soft: rgba(0, 163, 94, 0.10);
    --neg: #D63B3B; --neg-soft: rgba(214, 59, 59, 0.09);
    --warn: #B7791F; --warn-soft: rgba(183, 121, 31, 0.10); --warn-text: #7A4E10;
    --accent: #00A35E; --accent-2: #008C50; --accent-soft: rgba(0, 208, 120, 0.12); --on-accent: #FFFFFF;
    --star: #D9A21B; --chip-on-bg: #0A0A0B; --chip-on-text: #FFFFFF;
    --shadow: 0 12px 30px rgba(10, 10, 11, 0.12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --brand-green: #00D078;
  --bg: #F6F7F8; --topbar: rgba(255, 255, 255, 0.94);
  --surface: #FFFFFF; --surface-2: #F2F3F5; --surface-3: #E9EBEE;
  --line: #E4E6EA; --line-2: #D4D7DC;
  --text: #0A0A0B; --text-2: #4A4F57; --muted: #80858E; --ink: #0A0A0B;
  --pos: #00A35E; --pos-2: #1FA868; --pos-soft: rgba(0, 163, 94, 0.10);
  --neg: #D63B3B; --neg-soft: rgba(214, 59, 59, 0.09);
  --warn: #B7791F; --warn-soft: rgba(183, 121, 31, 0.10); --warn-text: #7A4E10;
  --accent: #00A35E; --accent-2: #008C50; --accent-soft: rgba(0, 208, 120, 0.12); --on-accent: #FFFFFF;
  --star: #D9A21B; --chip-on-bg: #0A0A0B; --chip-on-text: #FFFFFF;
  --shadow: 0 12px 30px rgba(10, 10, 11, 0.12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-ui); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.num, .pct, .profit, .ends, .tnum { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--topbar); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-inner { position: relative; display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.brand-mark { width: 40px; height: 18px; color: var(--ink); }
.mark-arrow { fill: var(--brand-green); }
.brand-word { font-family: var(--font-brand); font-size: 16px; letter-spacing: 0.22em; color: var(--ink); text-transform: lowercase; line-height: 1; padding-top: 1px; }
.brand-word .bx { color: var(--brand-green); }
.brand-sub { font-size: 13px; color: var(--muted); padding-left: 9px; border-left: 1px solid var(--line-2); }
.nav { display: flex; gap: 2px; height: 100%; }
.nav a {
  display: flex; align-items: center; padding: 0 12px; text-decoration: none; color: var(--text-2);
  font-size: 13.5px; font-weight: 500; position: relative; white-space: nowrap;
}
@media (max-width: 899px) and (min-width: 760px) { .brand-sub { display: none; } .nav a { padding: 0 9px; } .topbar-inner { gap: 16px; } }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.nav .n { margin-left: 6px; font-family: var(--font-num); font-size: 11.5px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.status { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-right: 6px; white-space: nowrap; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.live .dot { background: var(--pos); box-shadow: 0 0 0 3px var(--pos-soft); }
.status.demo .dot { background: var(--warn); }
.status b { color: var(--text-2); font-weight: 500; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.icon-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn[aria-pressed="true"] { color: var(--text); background: var(--surface-3); }
.icon-btn.spinning svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1023px) {
  .icon-btn-label { display: none; }
  .icon-btn { padding: 0 9px; }
}
@media (max-width: 759px) {
  .topbar-inner { flex-wrap: wrap; height: auto; gap: 0 12px; padding-top: 10px; }
  .brand-sub { display: none; }
  .nav { order: 3; width: 100%; height: 42px; margin: 6px calc(var(--gutter) * -1) 0; padding: 0 calc(var(--gutter) - 12px); border-top: 1px solid var(--line); }
  .nav a { flex: 1; justify-content: center; }
  .icon-btn-label, .status .ago { display: none; }
  .icon-btn { padding: 0 9px; }
}

/* ---------- page heads ---------- */
main { padding-bottom: 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px 0 18px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; }
.page-sub { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
.page-sub b { color: var(--text); font-weight: 600; }
.eyebrow { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; font-weight: 500; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.demo-note { margin-top: 18px; padding: 10px 14px; border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); color: var(--warn-text); font-size: 13px; }

/* ---------- home ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.kpi { padding: 16px 18px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi-k { font-size: 12px; color: var(--muted); }
.kpi-v { margin-top: 6px; font-family: var(--font-num); font-size: 24px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi-s { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-v.pos { color: var(--pos); } .kpi-v.warn { color: var(--warn); }
@media (max-width: 759px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpi { padding: 14px; } .kpi-v { font-size: 21px; }
}
.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.home-col { display: grid; gap: 20px; min-width: 0; }
@media (max-width: 899px) { .home-grid { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.panel-head .hint { font-size: 12px; color: var(--muted); }
.panel-empty { padding: 6px 16px 18px; color: var(--muted); font-size: 13px; }
.panel-foot { padding: 10px 16px 14px; border-top: 1px solid var(--line); }

.mini {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 10px 16px; border-top: 1px solid var(--line); text-decoration: none; cursor: pointer;
}
.mini:hover { background: var(--surface-2); }
.mini-photo { width: 36px; height: 46px; border-radius: 4px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); }
.mini-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-name { display: block; font-weight: 550; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-num { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
.mini-num .s { display: block; font-size: 11.5px; color: var(--muted); }
.mini-end { min-width: 64px; }
.res-mini { grid-template-columns: 18px minmax(0, 1fr) auto; }
.res-mark { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.res-mark.ok { background: var(--pos-soft); color: var(--pos); }
.res-mark.no { background: var(--neg-soft); color: var(--neg); }
.res-mark.wait { background: var(--surface-3); color: var(--muted); }
@media (max-width: 459px) { .mini { grid-template-columns: 36px minmax(0, 1fr) auto; } .mini .mini-hide { display: none; } }

/* ---------- deals controls ---------- */
.controls { margin-bottom: 16px; }
.deals-head { display: block; margin-bottom: 16px; }
.deals-head .page-sub { color: var(--muted); }
/* scoreboard: four big numbers that double as the buttons */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.stat { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 14px 18px 16px; border: 0; background: none;
  color: var(--text); text-align: left; cursor: pointer; transition: background .15s; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat:hover { background: var(--surface-2); }
.stat-k { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-v { font-family: var(--font-num); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.stat-s { max-width: 100%; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.warn .stat-v { color: var(--warn); }
.stat.good .stat-v { color: var(--accent); }
.stat.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }
.stat.on .stat-k { color: var(--text); }

/* one thin row of dropdowns + search */
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 16px; }
.fbar .qbox { margin-left: auto; flex: 1 1 150px; min-width: 150px; max-width: 260px; width: auto; height: 34px; border-radius: 17px; }
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 13px; border: 1px solid var(--line-2); border-radius: 17px;
  background: var(--surface); color: var(--text); font-size: 13px; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s; }
.dd-btn:hover { border-color: var(--muted); }
.dd-k { color: var(--muted); }
.dd-v { font-weight: 600; }
.dd-chev { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd.set .dd-btn { background: var(--chip-on-bg); border-color: var(--chip-on-bg); color: var(--chip-on-text); }
.dd.set .dd-k, .dd.set .dd-chev { color: var(--chip-on-text); stroke: var(--chip-on-text); opacity: .7; }
.dd-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 220px; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--surface); box-shadow: 0 14px 36px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .06); }
.dd-list { display: flex; flex-direction: column; }
.dd-list button { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px 0 30px; position: relative; border: 0; border-radius: 8px; background: none;
  color: var(--text); font-size: 13.5px; text-align: left; white-space: nowrap; cursor: pointer; }
.dd-list button:hover { background: var(--surface-2); }
.dd-list button[aria-pressed="true"] { font-weight: 600; }
.dd-list button[aria-pressed="true"]::before { content: ""; position: absolute; left: 12px; top: 11px; width: 8px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.dd-list .chip-n { margin-left: auto; padding-left: 16px; font-family: var(--font-num); font-size: 12px; color: var(--muted); opacity: 1; font-weight: 400; }
.dd-chk { display: flex; align-items: center; gap: 8px; margin: 6px 4px 2px; padding: 8px 6px 2px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.dd-chk input { accent-color: var(--accent); }

.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chips button { height: 30px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.chips button:hover { color: var(--text); border-color: var(--muted); }
.chips button[aria-pressed="true"] { background: var(--chip-on-bg); border-color: var(--chip-on-bg); color: var(--chip-on-text); }
.chip-n { font-family: var(--font-num); margin-left: 3px; opacity: .7; }
.field-range { justify-content: space-between; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--text) var(--fill, 25%), var(--line-2) var(--fill, 25%)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 3px; background: var(--line-2); }
input[type="range"]::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--text); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6.5px; border-radius: 50%; background: var(--text); border: 0; box-shadow: 0 0 0 4px var(--surface); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 12px; top: 10px; width: 6px; height: 6px; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: rotate(45deg); pointer-events: none; }
.select select { -webkit-appearance: none; appearance: none; height: 32px; padding: 0 30px 0 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; }
.more-filters .loser-chk { display: flex; align-items: center; gap: 8px; align-self: end; margin: 0 0 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.more-filters .select select { width: 100%; height: 30px; }

@media (max-width: 759px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat { padding: 12px 14px 14px; }
  .stat-v { font-size: 26px; }
  .fbar { position: relative; gap: 6px; }
  .fbar .qbox { order: -1; flex: 1 0 100%; max-width: none; height: 40px; border-radius: 20px; margin: 0 0 2px; }
  .dd { position: static; }
  .dd-btn { height: 32px; padding: 0 9px 0 11px; font-size: 12.5px; }
  .dd-menu { left: 0; right: 0; min-width: 0; }
}

/* ---------- the board ---------- */
.board { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.board-head, .row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 150px 104px 88px 92px; align-items: center; column-gap: 20px; padding: 0 16px; }
.board-head { height: 36px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.board-head .r, .row .r { text-align: right; }
.row { position: relative; min-height: 76px; padding-top: 12px; padding-bottom: 12px; border-top: 1px solid var(--line); cursor: pointer; }
.list > .row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row.is-open { background: var(--surface-2); }
.row.is-new { animation: fadein .6s ease; }
@keyframes fadein { from { background: var(--accent-soft); } to { background: transparent; } }
.row.is-urgent::before, .row.is-soon::before, .row.is-starred::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; }
.row.is-soon::before { background: var(--warn); }
.row.is-urgent::before { background: var(--neg); }
.row.is-starred::before { background: var(--star); }
.row.is-ended { opacity: .45; }

.photo { position: relative; display: block; width: 56px; height: 76px; border-radius: 6px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line-2); text-decoration: none; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .ext { display: none; }
.slab, .raw-card { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(160deg, var(--c1, #23365F), var(--c2, #0C1426)); }
.slab-label { position: absolute; top: 0; left: 0; right: 0; padding: 2px 0; background: #E9EAEC; color: #1A1A1A; font-size: 8px; font-weight: 700; text-align: center; letter-spacing: .04em; }
.slab-label b { margin-left: 2px; }
.mono { font-family: var(--font-num); font-size: 14px; color: rgba(255,255,255,0.85); }

.info { min-width: 0; }
.name-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.player { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player:hover { text-decoration: underline; text-underline-offset: 3px; }
.star-mark { color: var(--star); font-size: 12px; }
.sub { margin-top: 2px; display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; font-size: 12.5px; color: var(--muted); }
.sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.grade { color: var(--text-2); }
.sale-type { color: var(--text-2); }
.liq.fast { color: var(--pos-2); } .liq.steady { color: var(--text-2); } .liq.slow { color: var(--warn); }
.price-inline { display: none; }
.flag { margin-top: 5px; display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--warn); min-width: 0; }
.flag svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flag span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.num { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.c-price .num-sub { display: flex; justify-content: flex-end; align-items: baseline; gap: 5px; }
.c-price .pct { font-size: 12.5px; }
.warn-i { display: inline-grid; place-items: center; color: var(--warn); cursor: help; flex: none; }
.warn-i svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.num-sub { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.num-sub.tnum { font-family: var(--font-num); }
.pct { font-size: 15px; font-weight: 600; color: var(--text-2); }
.pct.s2 { color: var(--pos-2); }
.pct.s3 { color: var(--pos); }
.pct.over { color: var(--muted); font-weight: 500; }
.strength { display: block; margin-top: 2px; font-family: var(--font-ui); font-size: 11.5px; font-weight: 500; color: var(--muted); }
.profit { font-size: 15px; font-weight: 600; color: var(--pos); }
.profit.thin { color: var(--text-2); }
.profit.neg { color: var(--neg); }
.ends { font-size: 15px; font-weight: 600; }
.ends.soon { color: var(--warn); }
.ends.urgent { color: var(--neg); }
.ends.bin { font-family: var(--font-ui); font-size: 13px; color: var(--text-2); }
.ends.ended { color: var(--muted); }

.actions { display: flex; justify-content: flex-end; gap: 2px; }
.act { width: 30px; height: 30px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.act svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.act:hover { background: var(--surface-3); color: var(--text); }
.act.star[aria-pressed="true"] { color: var(--star); }
.act.star[aria-pressed="true"] svg { fill: currentColor; }
.act.more svg { transition: transform .2s ease; }
.row.is-open .act.more svg { transform: rotate(180deg); }
.nums { display: none; }
@media (hover: hover) and (min-width: 900px) {
  .row .act:not(.more) { opacity: 0; transition: opacity .15s; }
  .row:hover .act, .row:focus-within .act, .row .act.star[aria-pressed="true"] { opacity: 1; }
}

@media (max-width: 899px) {
  .board-head { display: none; }
  .row {
    grid-template-columns: 58px minmax(0, 1fr); grid-template-areas: "photo info" "photo nums";
    row-gap: 10px; column-gap: 12px; padding: 12px 14px; align-items: start;
  }
  .c-photo { grid-area: photo; }
  .info { grid-area: info; padding-right: 66px; }
  .c-price, .c-pct, .c-profit, .c-ends { display: none; }

  .actions { position: absolute; top: 8px; right: 6px; }
  .actions .act[data-act="more"] { display: none; }
  .nums { grid-area: nums; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr); gap: 10px; }
  .nums .n-sub { overflow: hidden; text-overflow: ellipsis; }
  .nums > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .nums .n-sub { font-size: 11.5px; color: var(--muted); font-family: var(--font-num); white-space: nowrap; }
  .nums .n-sub .pct { font-size: 11.5px; }
  .nums .num, .nums .profit, .nums .ends { font-size: 15px; }
}

.empty { padding: 44px 20px; text-align: center; }
.empty h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.empty p { margin: 0 auto; max-width: 420px; color: var(--muted); font-size: 13.5px; }

/* ---------- details drawer ---------- */
.details {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px;
  padding: 18px 16px 22px 96px; background: var(--surface-2); border-top: 1px solid var(--line);
}
@media (max-width: 899px) { .details { grid-template-columns: 1fr; gap: 22px; padding: 16px 14px 20px; } }
.dt-k { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 8px; letter-spacing: -0.005em; }
.dt-p { margin: 0; font-size: 13px; color: var(--text-2); }
.dt-p b { color: var(--text); font-weight: 600; }
.liq-line.fast b { color: var(--pos-2); } .liq-line.slow b { color: var(--warn); }
.spark { display: block; width: 100%; height: 64px; margin: 10px 0 4px; }
.spark-line { fill: none; stroke: var(--text-2); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--surface-2); stroke: var(--text-2); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.spark-now { stroke: var(--pos); stroke-width: 1.2; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.spark-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.spark-legend i { display: inline-block; width: 14px; height: 0; vertical-align: middle; margin-right: 5px; }
.lg-line { border-top: 1.5px solid var(--text-2); }
.lg-now { border-top: 1.5px dashed var(--pos); }
.comps-scroll { max-height: 236px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.comps { width: 100%; border-collapse: collapse; font-size: 12.5px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.comps th { position: sticky; top: 0; background: var(--surface); text-align: left; font-family: var(--font-ui); font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--line); }
.comps td { padding: 6px 10px; border-top: 1px solid var(--line); color: var(--text-2); }
.comps tr:first-child td { border-top: 0; }
.comps td:nth-child(2) { color: var(--text); }
.comps th:last-child, .comps td:last-child { text-align: right; }
.comps td.pos { color: var(--pos); } .comps td.neg { color: var(--muted); }
.comps tr.used td:first-child { box-shadow: inset 2px 0 0 var(--text-2); }
.dt-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.dt-src { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12.5px; color: var(--accent); text-decoration: none; }
.dt-src:hover { text-decoration: underline; }
.dt-src svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.math { width: 100%; border-collapse: collapse; font-size: 13px; }
.math td { padding: 5px 0; color: var(--text-2); }
.math td:last-child { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; color: var(--text); }
.math tr.total td { padding-top: 9px; border-top: 1px solid var(--line-2); color: var(--text); font-weight: 600; }
.math tr.total td:last-child { color: var(--pos); }
.math tr.total.neg td:last-child { color: var(--neg); }
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 8px;
  border: 0; background: var(--accent); color: var(--on-accent); font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.cta:hover { background: var(--accent-2); }
.cta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.dt-cta { margin-top: 14px; }
.flags-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; font-size: 12.5px; color: var(--warn); }
.title-full { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.unhide { margin-top: 12px; height: 30px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 12.5px; }

/* ---------- results ---------- */
.res-head { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.res-head > div { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.res-head > div + div { border-left: 1px solid var(--line); }
.res-head .k { font-size: 12px; color: var(--muted); }
.res-head .v { font-family: var(--font-num); font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.res-big .v { color: var(--pos); }
.res-head .num-sub { white-space: normal; }
@media (max-width: 759px) { .kpi-s { white-space: normal; } }
@media (max-width: 759px) {
  .res-head { grid-template-columns: 1fr 1fr; }
  .res-head > div:nth-child(3) { border-left: 0; }
  .res-head > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.res-verdict { margin: 14px 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; }
.res-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.res-list:empty { display: none; }
.res-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 1fr 1.2fr auto; gap: 16px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.res-row:first-child { border-top: 0; }
.res-name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-row .k { display: block; font-size: 11.5px; color: var(--muted); }
.res-flag, .res-final { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.res-row a { color: var(--accent); text-decoration: none; }
.src { display: block; font-family: var(--font-ui); font-size: 11.5px; color: var(--muted); }
.src.stale { color: var(--warn); }
.res-fix { display: flex; gap: 6px; }
.res-fix input { width: 86px; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg); font-family: var(--font-num); font-size: 12.5px; }
.res-fix button { height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 12.5px; }
@media (max-width: 759px) { .res-row { grid-template-columns: 1fr 1fr; } .res-card { grid-column: 1 / -1; } .res-fix { grid-column: 1 / -1; } }

/* ---------- footer, toasts, banner ---------- */
.foot { margin-top: 20px; display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.foot details summary { cursor: pointer; color: var(--text-2); }
.foot ul { margin: 6px 0 0; padding-left: 18px; }
.err { color: var(--neg); }
.toasts { position: fixed; right: var(--gutter); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-3); border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); box-shadow: var(--shadow); animation: toastin .25s ease; }
.toast b { color: var(--text); }
@keyframes toastin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.alert-banner {
  position: sticky; top: 56px; z-index: 19; display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter);
  background: var(--surface); border-bottom: 1px solid var(--warn); color: var(--warn-text);
}
.ab-star { color: var(--star); font-size: 16px; }
.ab-body { flex: 1; min-width: 0; }
.ab-title { font-weight: 600; font-size: 13.5px; }
.ab-left { font-family: var(--font-num); }
.ab-sub { font-size: 12.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-banner .cta { height: 32px; }
.alert-banner .x { width: 30px; height: 30px; border: 0; background: transparent; color: inherit; font-size: 20px; }

/* ---------- phone alert rules sheet ---------- */
.sheet {
  width: min(600px, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 0; margin: auto;
  border: 1px solid var(--line-2); border-radius: 14px; color: var(--text); background: var(--surface);
  box-shadow: var(--shadow);
}
.sheet::backdrop { background: rgba(5, 10, 24, 0.55); }
#rulesForm { display: flex; flex-direction: column; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 4px; }
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.sheet-sub { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.rules-summary { margin: 12px 22px 4px; padding: 12px 14px; border-radius: 9px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); }
.rules-summary b { color: var(--text); }
.sheet-sec { padding: 16px 22px; border-top: 1px solid var(--line); }
.rules-summary + .sheet-sec { margin-top: 12px; }
.sheet-sec h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.sheet-sec h4 { margin: 0; font-size: 13.5px; font-weight: 550; }
.sheet-sec p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sec-row.slim { padding-top: 14px; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; margin-top: 14px; }
.sheet-grid .field-range { max-width: none; min-width: 0; }
.sheet select { -webkit-appearance: none; appearance: none; height: 28px; padding: 0 8px; margin: 0 2px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 12.5px; }
.money-in { display: flex; align-items: center; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); padding: 0 10px; gap: 4px; }
.money-in span { color: var(--muted); font-size: 13px; }
.money-in input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font-size: 14px; font-family: var(--font-num); outline: none; }
.money-in:focus-within { border-color: var(--accent); }
.switch { position: relative; flex: none; width: 40px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .18s ease; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.switch input:checked + span { background: var(--pos); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
#rulesForm.off .sheet-sec { opacity: 0.4; }
.sheet-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 14px 22px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-foot .grow { flex: 1; }
.ghost-btn { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; }
.ghost-btn:hover { color: var(--text); background: var(--surface-2); }
.ghost-btn:disabled { opacity: 0.6; }
@media (max-width: 599px) {
  .sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; border-bottom: 0; }
  .sheet-head { padding: 18px 16px 4px; }
  .rules-summary { margin: 10px 16px 4px; }
  .sheet-sec { padding: 14px 16px; }
  .sheet-grid { grid-template-columns: 1fr; gap: 12px; }
  .sheet-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
}

/* ---------- My Cards ---------- */
.dt-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.kpi-v.neg { color: var(--neg); }
.pc-panel { margin-top: 20px; }
.pc-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 96px 104px 132px auto; align-items: center; gap: 14px;
  padding: 12px 16px; border-top: 1px solid var(--line);
}
.pc-main { min-width: 0; }
.pc-main a { text-decoration: none; }
.pc-main a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pc-num { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 13.5px; white-space: nowrap; }
.pc-num .k { display: block; font-family: var(--font-ui); font-size: 11.5px; color: var(--muted); }
.pc-num .s { display: block; font-family: var(--font-ui); font-size: 11px; color: var(--muted); }
.pc-act { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.cta.sm, .ghost-btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
@media (max-width: 759px) {
  .pc-row { grid-template-columns: 36px 1fr 1fr 1fr; row-gap: 8px; padding: 12px 14px; }
  .pc-row .mini-photo { grid-row: span 2; }
  .pc-main { grid-column: 2 / -1; }
  .pc-num { text-align: left; }
  .pc-act { grid-column: 2 / -1; justify-content: flex-start; }
}
.text-in { height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 13.5px; width: 100%; }
.text-in:focus { outline: none; border-color: var(--accent); }
input[type="date"].text-in { color-scheme: dark; font-family: var(--font-num); }
.sheet.small { width: min(520px, calc(100vw - 32px)); }
#pForm { display: flex; flex-direction: column; max-height: inherit; overflow-y: auto; }
#pForm .sheet-sec > .field { margin-bottom: 4px; }
#pForm .sheet-grid { margin-top: 12px; }
.p-preview { margin: 14px 0 0; font-family: var(--font-num); font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.p-preview:empty { display: none; }
.p-preview b { font-weight: 600; }
@media (max-width: 599px) { .sheet.small { width: 100vw; max-width: 100vw; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- light / dark toggle icon: shows the mode you'd switch TO ---------- */
#themeBtn .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) #themeBtn .i-sun { display: none; }
  :root:not([data-theme="dark"]) #themeBtn .i-moon { display: block; }
}
:root[data-theme="light"] #themeBtn .i-sun { display: none; }
:root[data-theme="light"] #themeBtn .i-moon { display: block; }
.board, .panel, .kpis, .res-head, .res-list, .res-verdict { box-shadow: 0 1px 2px rgba(10, 22, 54, 0.04); }

/* bigger photos on phones too */
@media (max-width: 899px) { .photo { width: 58px; height: 78px; } }
/* sticky banner sits under the taller bar */
.alert-banner { top: 60px; }

/* ---------- top bar "more" menu (phones) ---------- */
.more-btn { display: none; }
.more-menu { display: contents; }
#themeBtn .theme-label { display: none; }
@media (max-width: 759px) {
  .brand-mark { width: 34px; height: 23px; }
  .brand-word { font-size: 14px; }
  .more-btn { display: inline-flex; }
  .more-btn svg { fill: currentColor; stroke: none; }
  .more-menu {
    display: none; position: absolute; top: 52px; right: 0; z-index: 30; min-width: 190px;
    flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line-2); border-radius: 10px;
    background: var(--surface); box-shadow: var(--shadow);
  }
  .more-menu.open { display: flex; }
  .more-menu .icon-btn { width: 100%; height: 38px; justify-content: flex-start; border: 0; padding: 0 10px; }
  .more-menu .icon-btn-label, #themeBtn .theme-label { display: inline; }
}

/* ---------- Home v2: up next, desk, timeline, tiles, moves ---------- */
.home-head { margin-bottom: 16px; }
.home-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 899px) { .home-top { grid-template-columns: 1fr; } }
.upnext {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0;
  box-shadow: 0 1px 2px rgba(10, 22, 54, 0.04);
}
.upnext.empty-next { display: block; }
.un-photo { display: block; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line-2); }
.un-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.un-body { min-width: 0; display: flex; flex-direction: column; }
.un-eyebrow { font-size: 12px; font-weight: 500; color: var(--accent); }
.un-name { margin-top: 6px; padding: 0; border: 0; background: none; text-align: left; font-size: 24px; font-weight: 650; letter-spacing: -0.025em; color: var(--text); line-height: 1.15; }
.un-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.un-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.un-clock { margin-top: 14px; font-family: var(--font-num); font-size: 44px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.un-stats { display: grid; grid-template-columns: repeat(5, minmax(0, auto)); justify-content: start; gap: 6px 26px; margin-top: 18px; }
.un-stats > div { display: flex; flex-direction: column; gap: 2px; }
.un-stats .k { font-size: 11.5px; color: var(--muted); }
.un-stats .tnum, .un-stats .pct, .un-stats .profit { font-family: var(--font-num); font-size: 16px; font-weight: 500; }
.upnext .flag { margin-top: 12px; }
.un-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.un-thenlist { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 18px; }
.un-thenlist .k { font-size: 11.5px; color: var(--muted); margin-right: 4px; }
.un-then { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 12.5px; }
.un-then:hover { border-color: var(--muted); color: var(--text); }
.un-then .pct { font-size: 12.5px; }
.un-then .tnum { font-family: var(--font-num); font-size: 12px; }
.un-empty { margin-top: 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.un-note { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 460px; }
@media (max-width: 599px) {
  .upnext { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .un-name { font-size: 19px; }
  .un-clock { font-size: 32px; margin-top: 10px; }
  .un-stats { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin-top: 4px; }
  .upnext .flag, .un-actions, .un-thenlist { grid-column: 1 / -1; }
  .un-body { display: contents; }
  .un-eyebrow, .un-name, .un-sub, .un-clock { grid-column: 2; }
  .un-photo { grid-row: span 4; align-self: start; }
}

.desk { display: flex; flex-direction: column; }
.desk-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding: 11px 16px; border-top: 1px solid var(--line); }
.desk-row .k { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); }
.desk-row .v { font-size: 13.5px; color: var(--text); min-width: 0; }
.desk-row .v b { font-weight: 600; }
.desk-row .link-btn { font-size: 12.5px; }
.warn-t { color: var(--warn); }

.tl-panel { margin-top: 20px; }
.tl-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding: 0 16px 14px; }
.timeline { position: relative; min-width: 620px; margin: 0 22px; }
.tl-axis { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-2); }
.tl-tick { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-family: var(--font-num); white-space: nowrap; }
.tl-tick i { position: absolute; left: 50%; bottom: 18px; width: 1px; height: 7px; background: var(--line-2); }
.tl-mark { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0; background: none; }
.tl-img { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--surface-3); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--line-2); }
.tl-mark.s3 .tl-img { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--pos); }
.tl-mark.s2 .tl-img { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--pos-2); }
.tl-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.tl-pct { font-size: 11.5px; font-weight: 600; }
.tl-mark:hover .tl-img { transform: scale(1.06); }
.tl-img { transition: transform .15s ease; }

.home-grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
@media (max-width: 899px) { .home-grid2 { grid-template-columns: 1fr; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; padding: 4px 16px 16px; }
.tile { display: flex; flex-direction: column; gap: 3px; padding: 0; border: 0; background: none; text-align: left; color: var(--text); min-width: 0; }
.tile-img { display: block; aspect-ratio: 3 / 4; border-radius: 7px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); margin-bottom: 6px; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.tile:hover .tile-img img { transform: scale(1.03); }
.tile-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-nums { display: flex; justify-content: space-between; align-items: baseline; margin-top: 3px; font-size: 13px; }
.tile-nums .tnum { font-family: var(--font-num); }
.tile-nums .pct { font-size: 13px; }
.tile-profit { font-size: 12px; }
.move { display: grid; grid-template-columns: minmax(0, 1fr) 84px auto; align-items: center; gap: 14px; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: var(--text); }
.move:hover { background: var(--surface-2); }
.move-name { min-width: 0; }
.tiny-spark { width: 84px; height: 26px; }
.tiny-spark path { fill: none; stroke: var(--text-2); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.move-num { text-align: right; font-family: var(--font-num); font-size: 13px; white-space: nowrap; }
.move-num .up { color: var(--pos); } .move-num .down { color: var(--neg); }
.move-num .s { display: block; font-family: var(--font-ui); font-size: 11.5px; color: var(--muted); }
@media (max-width: 459px) { .move { grid-template-columns: minmax(0, 1fr) auto; } .tiny-spark { display: none; } }
.wait { font-family: var(--font-ui); font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.res-big .v .wait { color: var(--muted); }
.tl-img { position: relative; }
.tl-more { position: absolute; right: -6px; bottom: -4px; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--text); color: var(--bg); font-family: var(--font-num); font-size: 10.5px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.tl-img { overflow: visible; }
.tl-img img { border-radius: 50%; }

/* ---------- drawer v2: chart with hover, what-if price, slim checks strip ---------- */
.details { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px 32px; }
@media (max-width: 899px) { .details { grid-template-columns: 1fr; } }
.chart { margin: 10px 0 12px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; }
.chart-y { grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 0 4px; font-family: var(--font-num); font-size: 10.5px; color: var(--muted); text-align: right; }
.chart-plot { position: relative; height: 150px; cursor: crosshair; touch-action: pan-y; }
.chart-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-area { fill: var(--accent-soft); }
.chart .spark-line { stroke: var(--accent); stroke-width: 1.8; }
.chart circle { fill: var(--surface-2); stroke: var(--accent); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.chart-now { position: absolute; right: 0; transform: translateY(-120%); font-size: 10.5px; color: var(--pos); font-family: var(--font-num); background: var(--surface-2); padding: 0 4px; border-radius: 3px; pointer-events: none; }
.chart-x { grid-column: 2; display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--muted); font-family: var(--font-num); }
.chart-guide { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); pointer-events: none; }
.chart-dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface-2); pointer-events: none; }
.chart-tip {
  position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); display: flex; flex-direction: column; gap: 1px; white-space: nowrap;
  padding: 7px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  font-size: 12px; color: var(--text-2); pointer-events: none; z-index: 2;
}
.chart-tip b { color: var(--text); font-weight: 600; }
.chart-tip .tnum { font-family: var(--font-num); font-size: 15px; color: var(--text); font-weight: 600; }
.chart-tip .pos, .chart-tip .neg { font-size: 11.5px; }
.spark-legend { display: none; }

.dt-math .field-k { display: block; margin-bottom: 6px; }
.wi-in { max-width: 220px; height: 40px; }
.wi-in input { font-size: 16px; }
.wi-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.wi-quick button { height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 11.5px; font-family: var(--font-num); }
.wi-quick button:hover { color: var(--text); border-color: var(--muted); }
.wi-note { margin-top: 10px; }

.dt-checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.chk-seller { color: var(--text-2); margin-right: 4px; }
.chk-seller b { color: var(--text); font-weight: 600; }
.chk { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; }
.chk.warn { background: var(--warn-soft); color: var(--warn); }
.chk.ok { background: var(--pos-soft); color: var(--pos); }
.chk-title { flex: 1 1 260px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.dt-checks .unhide { margin-top: 0; height: 26px; }
/* phone fixes: drawer must never be wider than the screen */
@media (max-width: 899px) {
  .details { grid-template-columns: minmax(0, 1fr); }
  .details > * { min-width: 0; }
}
.chart { grid-template-columns: auto minmax(0, 1fr); }
.comps-scroll { max-width: 100%; }
@media (max-width: 599px) {
  .un-photo { grid-row: span 3; }
  .un-clock { grid-column: 1 / -1; margin-top: 6px; }
}

.use-now { align-self: flex-start; margin-top: 6px; height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 11.5px; font-family: var(--font-num); }
.use-now:hover { color: var(--text); border-color: var(--muted); }

/* ---------- Watchlist ---------- */
.w-search { max-width: 340px; }
.w-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 150px 100px auto; align-items: center; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--line); }
.w-main { min-width: 0; }
.w-num { font-family: var(--font-num); font-size: 13px; white-space: nowrap; }
.w-num .k { display: block; font-family: var(--font-ui); font-size: 11.5px; color: var(--muted); }
.w-num .liq { font-family: var(--font-ui); font-size: 12px; }
.w-act { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.w-act a.act svg { width: 14px; height: 14px; }
.w-helper { margin: 10px 0 8px; }
.w-sales { height: auto; min-height: 120px; padding: 10px; font-family: var(--font-num); font-size: 12px; line-height: 1.5; resize: vertical; }
#wForm { display: flex; flex-direction: column; max-height: inherit; overflow-y: auto; }
#wForm .select select { width: 100%; height: 34px; }
#wForm .sheet-sec .field { margin-top: 12px; }
@media (max-width: 759px) {
  .w-row { grid-template-columns: 1fr 1fr 1fr; row-gap: 8px; padding: 12px 14px; }
  .w-main { grid-column: 1 / -1; }
  .w-act { grid-column: 1 / -1; justify-content: flex-start; }
  .nav a { padding: 0 6px; font-size: 12.5px; }
  .nav .n { display: none; }
}

/* five tabs: keep the top bar on one line at laptop widths */
@media (max-width: 1180px) and (min-width: 760px) {
  .brand-sub { display: none; }
  .topbar-inner { gap: 18px; }
  .nav a { padding: 0 9px; }
  .status .ago { display: none; }
}
@media (max-width: 900px) and (min-width: 760px) {
  .nav .n { display: none; }
  .status { display: none; }
}

/* max bid box */
.maxbid { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.maxbid .field-k { display: block; margin-bottom: 6px; }
.mb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mb-row .money-in { width: 140px; }
.maxbid .dt-note b { color: var(--text); }
.my-max { color: var(--accent); font-weight: 500; }
/* My Cards: change since bought */
.pc-num .s.up { color: var(--pos); } .pc-num .s.down { color: var(--neg); }
.pc-row { grid-template-columns: 36px minmax(0, 1fr) 96px 150px 170px auto; }
@media (max-width: 759px) { .pc-row { grid-template-columns: 36px 1fr 1fr 1fr; } }
.pc-num .s { white-space: normal; }
/* Home: hot BIN up top */
.hot-bin { margin-top: 20px; }
.hot-bin .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.moves-panel { margin-top: 20px; }

/* clickable sales */
.chart.has-link .chart-plot { cursor: pointer; }
.tip-open { margin-top: 3px; font-size: 11px; color: var(--accent); }
.comps td a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.comps td a svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .45; }
.comps tr.has-link:hover td a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.comps tr.has-link:hover td a svg { opacity: 1; }

@media (max-width: 759px) { .brand-mark { width: 36px; height: 16px; } }
.filters-count { color: var(--on-accent); }

/* ---------- Home hero: the brand moment (black band in both modes) ---------- */
.hero {
  position: relative; overflow: hidden; margin: 24px 0 20px; padding: 26px 28px 24px; border-radius: 14px;
  background: #0A0A0B; color: #F2F3F5; border: 1px solid #1E2024;
}
.hero-mark { position: absolute; right: -40px; bottom: -30px; width: min(560px, 62%); height: auto; pointer-events: none; }
.hero-mark path { fill: rgba(255, 255, 255, 0.07); }
.hero-mark .hm-arrow { fill: #5FE08A; opacity: 0.9; }
.hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hero-brand { font-family: var(--font-brand); font-size: 13px; letter-spacing: 0.24em; color: #FFFFFF; }
.hero-brand .bx { color: #5FE08A; }
.hero-sub { font-family: var(--font-ui); letter-spacing: 0; font-size: 12.5px; color: #8E949D; margin-left: 8px; padding-left: 10px; border-left: 1px solid #2D3035; }
.hero-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #A8ADB5; }
.hero-live i { width: 7px; height: 7px; border-radius: 50%; background: #5FE08A; box-shadow: 0 0 0 3px rgba(95, 224, 138, 0.18); }
.hero-live.demo i { background: #F2B84B; box-shadow: none; }
.hero-date { position: relative; margin-top: 26px; font-size: 12.5px; color: #8E949D; }
.hero-title { position: relative; margin: 4px 0 0; font-size: 40px; line-height: 1.05; font-weight: 650; letter-spacing: -0.035em; color: #FFFFFF; }
.hero-line { position: relative; margin: 10px 0 0; max-width: 560px; font-size: 15px; color: #C5C9D0; }
.hero-line b { color: #FFFFFF; font-weight: 600; }
.hero-stats { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; gap: 12px 44px; margin-top: 26px; }
.hero-stats > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hero-stats .k { font-size: 12px; color: #8E949D; }
.hero-stats .v { font-family: var(--font-num); font-size: 30px; font-weight: 500; letter-spacing: -0.04em; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.hero-stats .v.g { color: #5FE08A; }
.hero-stats .v.hot { color: #F2B84B; }
.hero-stats .s { font-size: 12px; color: #8E949D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 759px) {
  .hero { margin-top: 16px; padding: 20px 18px 20px; }
  .hero-mark { width: 82%; right: -60px; bottom: auto; top: 20px; opacity: .75; }
  .hero-title { font-size: 30px; }
  .hero-line { font-size: 14px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 20px; }
  .hero-stats .v { font-size: 24px; }
}

/* ---------- How it works ---------- */
.hero-right { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-how-link { font-size: 12.5px; color: #5FE08A; text-decoration: none; font-weight: 500; }
.hero-how-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1100px) { .nav a.nav-how { display: none; } }
.hero-how { padding-bottom: 30px; }
.hero-how .hero-title { font-size: 46px; max-width: 760px; }
.hero-how .hero-line { max-width: 620px; font-size: 16px; }
.hw-hero-cta { position: relative; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hw-hero-cta .cta { height: 40px; padding: 0 18px; }
.hw-ghost { display: inline-flex; align-items: center; height: 40px; text-decoration: none; color: #E3E5E8; border-color: #3A3D43; }
.hw-ghost:hover { background: #17181B; color: #fff; }
.hw-roadmap { margin-top: 34px; }
.hw-head h2, .hw-cta-band h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.hw-head p, .hw-cta-band p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.hw-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; position: relative; }
.hw-steps::before { content: ""; position: absolute; top: 17px; left: 18px; right: 18px; height: 2px; background: linear-gradient(90deg, var(--brand-green), var(--line-2)); border-radius: 2px; }
.hw-step { position: relative; display: flex; flex-direction: column; min-width: 0; }
.hw-num { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-green); color: #05140B; font-family: var(--font-num); font-weight: 600; font-size: 15px; box-shadow: 0 0 0 5px var(--bg); }
.hw-icon { margin-top: 18px; width: 22px; height: 22px; color: var(--accent); }
.hw-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hw-step h3 { margin: 10px 0 6px; font-size: 16px; font-weight: 650; letter-spacing: -0.015em; }
.hw-step p { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.hw-step p b { color: var(--text); font-weight: 600; }
.hw-visual { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 12.5px; flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 120px; }
.hv-scan { display: flex; flex-direction: column; gap: 6px; }
.hv-scan .tnum { font-family: var(--font-num); font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.hv-pill { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--pos-soft); color: var(--pos); font-size: 11.5px; font-weight: 600; }
.hv-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hv-name { font-weight: 650; font-size: 14px; }
.hv-sub { color: var(--muted); font-size: 11.5px; margin-bottom: 8px; }
.hv-live { color: var(--accent); }
.hv-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; color: var(--text-2); }
.hv-row b { color: var(--text); font-weight: 500; font-family: var(--font-num); }
.hv-row.big { margin-top: 4px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--text); font-weight: 600; }
.hv-row.big b { font-size: 16px; font-weight: 600; }
.hv-ping { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.hv-ping-app { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.hv-dot { width: 14px; height: 14px; border-radius: 4px; background: #5865F2; }
.hv-ping-title { margin-top: 5px; font-weight: 600; font-size: 13px; }
.hv-ping-body { margin-top: 2px; color: var(--text-2); font-size: 12px; }
.hw-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.hw-why-item { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.hw-why-item h3 { margin: 0 0 6px; font-size: 15px; font-weight: 650; }
.hw-why-item h3::before { content: ""; display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--brand-green); margin-bottom: 12px; }
.hw-why-item p { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.hw-gloss { margin-top: 20px; }
.hw-gloss dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hw-gloss dl > div { padding: 12px 16px; border-top: 1px solid var(--line); }
.hw-gloss dl > div:nth-child(odd) { border-right: 1px solid var(--line); }
.hw-gloss dt { font-weight: 600; font-size: 13.5px; }
.hw-gloss dd { margin: 3px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.hw-cta-band { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 20px; padding: 22px 24px; border-radius: 14px; background: #0A0A0B; border: 1px solid #1E2024; color: #F2F3F5; }
.hw-cta-band p { color: #A8ADB5; }
@media (max-width: 899px) {
  .hw-steps { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .hw-steps::before { display: none; }
  .hw-why { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
  .hero-how .hero-title { font-size: 32px; }
  .hero-how .hero-title br { display: none; }
  .hw-steps { grid-template-columns: 1fr; }
  .hw-gloss dl { grid-template-columns: 1fr; }
  .hw-gloss dl > div:nth-child(odd) { border-right: 0; }
  .hero-right { gap: 10px; }
}
/* six nav links: keep the top bar on one line */
@media (max-width: 1400px) and (min-width: 760px) {
  .icon-btn-label { display: none; }
  .icon-btn { padding: 0 9px; }
  .brand-sub { display: none; }
  .status .ago { display: none; }
  .topbar-inner { gap: 20px; }
}

/* ---------- How it works v2: interactive demo ---------- */
.hw-demo { margin-top: 30px; }
.hw-demo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hw-demo-head h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.hw-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.hw-tab { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; transition: border-color .2s, background .2s; }
.hw-tab:hover { border-color: var(--line-2); }
.hw-tab.on { border-color: var(--brand-green); background: var(--surface-2); }
.hw-tab-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-num); font-weight: 600; font-size: 14px; background: var(--surface-3); color: var(--text-2); transition: background .2s, color .2s; }
.hw-tab.on .hw-tab-n { background: var(--brand-green); color: #05140B; }
.hw-tab-t { display: flex; flex-direction: column; min-width: 0; }
.hw-tab-t b { font-size: 14.5px; font-weight: 650; }
.hw-tab-t span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--brand-green); }
.hw-tab.on .hw-bar { animation: hwbar 5.2s linear forwards; }
@keyframes hwbar { to { width: 100%; } }
.hw-stage { position: relative; margin-top: 12px; border-radius: 16px; background: #0A0A0B; border: 1px solid #1E2024; min-height: 360px; overflow: hidden; color: #F2F3F5; }
.hw-scene { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 32px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease, visibility .35s; }
.hw-scene.on { opacity: 1; visibility: visible; transform: none; position: relative; }
.hw-stage .muted { color: #8E949D; }
.sc-big { font-family: var(--font-num); font-size: 52px; font-weight: 500; letter-spacing: -0.05em; color: #5FE08A; line-height: 1; }
.sc-cap { margin-top: 6px; font-size: 15px; font-weight: 600; color: #FFFFFF; }
.sc-note { margin-top: 12px; font-size: 13.5px; color: #A8ADB5; line-height: 1.5; max-width: 300px; }
.sc-note b { color: #FFFFFF; font-weight: 600; }
/* scene 1: scanning feed */
.sc-window { border-radius: 12px; border: 1px solid #2D3035; background: #111214; overflow: hidden; }
.sc-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid #222428; font-size: 11.5px; color: #8E949D; }
.sc-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2D3035; }
.sc-bar span { margin-left: 8px; }
.sc-feed { position: relative; padding: 6px; }
.sc-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 56px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; opacity: 0; transform: translateX(-10px); }
.hw-scene.on .sc-row { animation: scin .4s ease forwards; animation-delay: calc(var(--i) * 0.32s); }
@keyframes scin { to { opacity: 1; transform: none; } }
.sc-img { width: 34px; height: 44px; border-radius: 4px; object-fit: cover; background: #1E2024; display: block; }
.sc-t { min-width: 0; display: flex; flex-direction: column; }
.sc-t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-t span { font-size: 11px; color: #8E949D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-p { font-family: var(--font-num); font-size: 13px; }
.sc-tag { justify-self: end; font-size: 12.5px; font-weight: 600; opacity: 0; }
.sc-tag.pct.s3 { color: #05140B; background: #5FE08A; padding: 2px 7px; border-radius: 6px; }
.sc-skip { color: #6E737C; font-weight: 500; font-size: 11.5px; }
.hw-scene.on .sc-tag { animation: scin .3s ease forwards; animation-delay: calc(var(--i) * 0.32s + 0.9s); }
.sc-beam { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, #5FE08A, transparent); box-shadow: 0 0 14px #5FE08A; opacity: 0; }
.hw-scene.on .sc-beam { animation: beam 2.6s ease-in-out .2s infinite; }
@keyframes beam { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
/* scene 2: compare */
.cp-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cp-img { width: 150px; height: 200px; object-fit: cover; border-radius: 10px; background: #1E2024; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.cp-name { margin-top: 12px; font-weight: 650; font-size: 16px; }
.cp-sub { font-size: 12px; color: #8E949D; }
.cp-k { font-size: 12px; color: #8E949D; }
.cp-spark { width: 100%; height: 90px; margin-top: 6px; }
.cp-line { fill: none; stroke: #5FE08A; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hw-scene.on .cp-line { animation: draw 1.2s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.cp-now { stroke: #F2B84B; stroke-width: 1.4; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.cp-bars { display: grid; gap: 10px; margin-top: 14px; }
.cp-bar { display: grid; grid-template-columns: 118px minmax(0, 1fr) 84px; align-items: center; gap: 10px; font-size: 12.5px; color: #A8ADB5; }
.cp-bar i { height: 12px; border-radius: 6px; width: 0; }
.cp-bar i.now { background: #F2B84B; }
.cp-bar i.comp { background: #5FE08A; }
.hw-scene.on .cp-bar i { animation: grow .9s cubic-bezier(.2,.8,.2,1) .4s forwards; }
.hw-scene.on .cp-bar:nth-child(2) i { animation-delay: .7s; }
@keyframes grow { to { width: var(--w); } }
.cp-bar b { text-align: right; color: #FFFFFF; font-family: var(--font-num); font-weight: 500; }
.cp-verdict { display: flex; align-items: center; gap: 14px; margin-top: 18px; opacity: 0; }
.hw-scene.on .cp-verdict { animation: scin .4s ease 1.5s forwards; }
.cp-pill { padding: 6px 12px; border-radius: 8px; background: #5FE08A; color: #05140B; font-weight: 700; font-size: 15px; font-family: var(--font-num); }
.cp-verdict .profit { color: #5FE08A; font-family: var(--font-num); font-size: 15px; }
/* scene 3: phone */
.ph { position: relative; justify-self: center; width: 250px; height: 320px; border-radius: 34px; border: 6px solid #2D3035; background: linear-gradient(160deg, #1A1C20, #0E0F11); padding: 40px 12px 12px; overflow: hidden; }
.ph-notch { position: absolute; top: 8px; left: 50%; width: 80px; height: 18px; margin-left: -40px; border-radius: 10px; background: #000; }
.ph-time { text-align: center; font-size: 46px; font-weight: 500; letter-spacing: -0.03em; color: #FFFFFF; line-height: 1; }
.ph-date { text-align: center; font-size: 11.5px; color: #A8ADB5; margin-top: 4px; }
.ph-note { margin-top: 12px; padding: 9px 10px; border-radius: 14px; background: rgba(40, 42, 48, 0.92); backdrop-filter: blur(6px); opacity: 0; transform: translateY(-24px) scale(.96); }
.hw-scene.on .ph-note.n1 { animation: drop .5s cubic-bezier(.2,.9,.3,1.2) .5s forwards; }
.hw-scene.on .ph-note.n2 { animation: drop .5s cubic-bezier(.2,.9,.3,1.2) 1.6s forwards; }
@keyframes drop { to { opacity: 1; transform: none; } }
.ph-app { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #C5C9D0; }
.ph-app .muted { margin-left: auto; }
.ph-dc { width: 14px; height: 14px; border-radius: 4px; background: #5865F2; }
.ph-row { display: flex; gap: 8px; margin-top: 5px; }
.ph-row b { display: block; font-size: 11.5px; color: #FFFFFF; line-height: 1.3; }
.ph-row span { display: block; font-size: 10.5px; color: #A8ADB5; margin-top: 2px; }
.ph-img { flex: none; width: 30px; height: 40px; border-radius: 4px; object-fit: cover; background: #1E2024; }
.ph-side { min-width: 0; }
/* scene 4: receipt */
.rc { justify-self: center; width: min(340px, 100%); padding: 18px; border-radius: 14px; background: #111214; border: 1px solid #2D3035; }
.rc-head { position: relative; display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px dashed #2D3035; }
.rc-head b { display: block; font-size: 14px; } .rc-head span { font-size: 11.5px; color: #8E949D; }
.rc-img { width: 34px; height: 46px; border-radius: 4px; object-fit: cover; background: #1E2024; }
.rc-stamp { position: absolute; right: 0; top: 4px; padding: 3px 8px; border: 2px solid #5FE08A; border-radius: 6px; color: #5FE08A !important; font-weight: 800; font-size: 12px !important; letter-spacing: .12em; transform: rotate(-8deg) scale(1.6); opacity: 0; }
.hw-scene.on .rc-stamp { animation: stamp .35s ease 1.5s forwards; }
@keyframes stamp { to { opacity: 1; transform: rotate(-8deg) scale(1); } }
.rc-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; color: #A8ADB5; opacity: 0; }
.hw-scene.on .rc-line { animation: scin .3s ease forwards; animation-delay: calc(var(--i) * 0.22s + 0.2s); }
.rc-line b { color: #FFFFFF; font-weight: 500; font-family: var(--font-num); }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 12px; border-top: 1px solid #2D3035; font-weight: 600; }
.rc-total b { font-size: 26px; color: #5FE08A; font-family: var(--font-num); }
.noimg { display: block; background: #1E2024; }
/* compact why + folded glossary */
.hw-why2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.hw-why2 > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.hw-why2 b { font-size: 14px; font-weight: 650; } .hw-why2 b::before { content: "✓ "; color: var(--accent); }
.hw-why2 span { font-size: 12.5px; color: var(--muted); }
.hw-gloss2 { margin-top: 16px; }
.hw-gloss2 summary { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; }
.hw-gloss2 summary::-webkit-details-marker { display: none; }
.hw-gloss2 summary::after { content: "+"; font-size: 18px; color: var(--muted); margin-left: 10px; }
.hw-gloss2[open] summary::after { content: "−"; }
.hw-gloss2 summary .hint { margin-left: auto; font-weight: 400; }
.hw-gloss2 dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hw-gloss2 dl > div { padding: 10px 16px 12px; border-top: 1px solid var(--line); }
.hw-gloss2 dt { font-weight: 600; font-size: 13px; } .hw-gloss2 dd { margin: 2px 0 0; font-size: 12.5px; color: var(--text-2); }
@media (max-width: 899px) {
  .hw-tabs { display: flex; overflow-x: auto; scrollbar-width: none; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .hw-tabs::-webkit-scrollbar { display: none; }
  .hw-tab { flex: 0 0 auto; padding: 10px 14px 12px; }
  .hw-tab-t span { display: none; }
  .hw-scene { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .hw-stage { min-height: 0; }
  .sc-big { font-size: 38px; }
  .hw-why2, .hw-gloss2 dl { grid-template-columns: 1fr; }
  .cp-img { width: 110px; height: 148px; }
  .cp-bar { grid-template-columns: 92px minmax(0, 1fr) 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-row, .sc-tag, .cp-verdict, .ph-note, .rc-line, .rc-stamp { opacity: 1 !important; transform: none !important; }
  .rc-stamp { transform: rotate(-8deg) !important; }
  .cp-bar i { width: var(--w) !important; }
  .cp-line { stroke-dashoffset: 0 !important; }
}

/* ---------- Wins ---------- */
.wins-kpis { margin-bottom: 16px; }
.wins { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.win { position: relative; display: flex; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.win:hover { border-color: var(--brand-green); transform: translateY(-1px); }
.win-img { flex: none; width: 62px; height: 84px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.win-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.win-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.win-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.win-sold { font-size: 12px; color: var(--muted); } .win-sold b { color: var(--text); font-weight: 500; }
.win-nums { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.win-nums .pct { font-size: 14px; }
.win-profit { font-family: var(--font-num); font-size: 17px; font-weight: 600; color: var(--pos); }
.win-when { font-size: 11.5px; color: var(--muted); margin-top: auto; }
.win-rank { position: absolute; top: -8px; right: 10px; padding: 2px 8px; border-radius: 10px; font-family: var(--font-num); font-size: 11px; font-weight: 700; background: var(--brand-green); color: #05140B; }
.wins-empty { padding: 24px; text-align: center; } .wins-empty h3 { margin: 0 0 6px; font-size: 16px; } .wins-empty p { margin: 0 auto; max-width: 460px; color: var(--text-2); font-size: 13.5px; }
.wins-empty b { color: var(--text); }

/* ---------- top bar v3: bigger logo, three things on the right ---------- */
.topbar-inner { height: 68px; gap: 36px; }
.brand { gap: 12px; }
.brand-mark { width: 58px !important; height: 26px !important; }
.brand-word { font-size: 20px !important; letter-spacing: 0.24em; }
.brand-sub { display: none !important; }
.nav { gap: 6px; }
.nav a { padding: 0 12px !important; font-size: 14px; }
.topbar-right { gap: 10px; }
.status { margin-right: 4px; font-size: 12.5px; }
.status .ago { display: none !important; }
.icon-btn.round { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; }
.icon-btn.round svg { width: 17px; height: 17px; }
.more-btn { display: inline-flex !important; }
.more-btn svg { fill: currentColor; stroke: none; }
.more-menu {
  display: none !important; position: absolute; top: 60px; right: 0; z-index: 30; min-width: 220px;
  flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow);
}
.more-menu.open { display: flex !important; }
.more-menu .icon-btn { width: 100%; height: 40px; justify-content: flex-start; border: 0; padding: 0 10px; border-radius: 8px; font-size: 13.5px; }
.more-menu .icon-btn:hover { background: var(--surface-2); }
.more-menu .icon-btn-label, .more-menu #themeBtn .theme-label { display: inline !important; }
.menu-meta { padding: 8px 10px 6px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.alert-banner { top: 68px; }
@media (max-width: 1100px) and (min-width: 760px) { .topbar-inner { gap: 22px; } .nav a { padding: 0 8px !important; } }
@media (max-width: 759px) {
  .topbar-inner { height: auto; gap: 0 10px; padding-top: 12px; }
  .brand-mark { width: 48px !important; height: 22px !important; }
  .brand-word { font-size: 17px !important; }
  .more-menu { top: 50px; }
  .icon-btn.round { width: 36px; height: 36px; }
}

/* sleeper / typo badges */
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.sleep { background: rgba(124, 108, 255, 0.14); color: #9C8FFF; }
.badge.typo { background: var(--accent-soft); color: var(--accent); }
:root[data-theme="light"] .badge.sleep { color: #5B4BE0; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .badge.sleep { color: #5B4BE0; } }
.chk.sleep { background: rgba(124, 108, 255, 0.12); color: #9C8FFF; }
:root[data-theme="light"] .chk.sleep { color: #5B4BE0; }

/* ---------- Home: feature showcase ---------- */
.features { margin-top: 28px; }
.ft-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ft-head h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.ft-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.ft { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 150px; padding: 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; transition: border-color .15s, transform .15s; }
.ft:hover { border-color: var(--brand-green); transform: translateY(-2px); }
.ft.big { grid-column: span 2; background: #0A0A0B; border-color: #1E2024; color: #F2F3F5; }
.ft-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ft.big .ft-ic { background: rgba(95, 224, 138, 0.14); color: #5FE08A; }
.ft-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ft-t { margin-top: 4px; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.ft-l { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.ft.big .ft-l { color: #A8ADB5; max-width: 340px; }
.ft-go { margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 600; color: var(--accent); opacity: 0; transition: opacity .15s; }
.ft.big .ft-go { color: #5FE08A; }
.ft:hover .ft-go, .ft:focus-visible .ft-go { opacity: 1; }
.ft-live { position: absolute; top: 14px; right: 14px; padding: 3px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; background: #5FE08A; color: #05140B; }
.ft-viz { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-family: var(--font-num); font-size: 13px; }
.typo-viz s { color: #6E737C; } .typo-viz b { color: #5FE08A; font-weight: 600; margin-right: 8px; }
.sleep-viz span { padding: 4px 9px; border-radius: 8px; background: rgba(124, 108, 255, 0.14); color: #B5ABFF; font-size: 12px; }
.sleep-viz b { color: #FFFFFF; }
.ft-soon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ft-soon-k { font-size: 12px; color: var(--muted); margin-right: 4px; }
.ft-chip { padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--line-2); color: var(--text-2); font-size: 12px; }
@media (max-width: 899px) { .ft-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 459px) { .ft-grid { grid-template-columns: 1fr; } .ft.big { grid-column: auto; } .ft { min-height: 0; } .ft-go { opacity: 1; } }
.ft.big { background: linear-gradient(135deg, #102016 0%, #0A0A0B 65%); }

/* ---------- grade flip ---------- */
.badge.flip { background: rgba(242, 184, 75, 0.14); color: var(--warn); }
.gradeflip { grid-column: 1 / -1; padding: 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.gf-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.gf-exp { text-align: right; } .gf-exp span { display: block; font-size: 11.5px; color: var(--muted); }
.gf-exp b { font-family: var(--font-num); font-size: 26px; font-weight: 600; }
.gf-exp.up b { color: var(--pos); } .gf-exp.down b { color: var(--neg); }
.gf-outs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.gf-out { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.gf-k { font-size: 12.5px; font-weight: 600; } .gf-k i { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }
.gf-sell { font-size: 12px; color: var(--muted); }
.gf-v { font-size: 18px; font-weight: 600; } .gf-out.up .gf-v { color: var(--pos); } .gf-out.down .gf-v { color: var(--neg); }
@media (max-width: 599px) { .gf-outs { grid-template-columns: 1fr; } }

/* ---------- Best Offer helper ---------- */
.badge.offer { background: rgba(80, 160, 255, 0.14); color: #4D9BFF; }
.offerbox { grid-column: 1 / -1; padding: 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.of-steps { display: grid; gap: 8px; margin-top: 12px; }
.of-step { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.of-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.of-l { font-size: 13px; font-weight: 600; } .of-l i { display: block; font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.of-v { font-family: var(--font-num); font-size: 18px; font-weight: 600; }
.of-p { text-align: right; font-family: var(--font-num); font-size: 13px; font-weight: 600; min-width: 64px; }
.of-p i { display: block; font-family: var(--font-ui, inherit); font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }
.of-step.up .of-p { color: var(--pos); } .of-step.down .of-p { color: var(--neg); }
.offerbox .dt-actions { margin-top: 10px; }
@media (max-width: 459px) { .of-step { grid-template-columns: 24px minmax(0, 1fr) auto; } .of-p { grid-column: 2 / -1; text-align: left; } .of-p i { display: inline; margin-left: 4px; } }

/* ---------- price-drop watch ---------- */
.badge.drop { background: var(--pos-soft); color: var(--pos); }
.chk.drop { background: var(--pos-soft); color: var(--pos); }

/* ---------- My Cards: portfolio chart + goal ring ---------- */
.pf-panel { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 0; padding: 0; overflow: hidden; }
.pf-main { padding: 16px 18px 14px; min-width: 0; }
.pf-panel .panel-head { padding: 0; border: 0; margin-bottom: 6px; }
.seg.sm { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.seg.sm button { height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; color: var(--text-2); background: none; border: 0; cursor: pointer; }
.seg.sm button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.pf-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.lg::before { content: ""; display: inline-block; width: 14px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 2px solid; }
.lg.prof::before { border-color: var(--pos); } .lg.inv::before { border-color: var(--muted); } .lg.val::before { border-color: #4D9BFF; border-top-style: dashed; }
.pf-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 170px auto; gap: 4px 8px; }
.pf-chart .chart-y { grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--font-num); font-size: 11px; color: var(--muted); }
.pf-chart .chart-x { grid-column: 2; display: flex; justify-content: space-between; font-family: var(--font-num); font-size: 11px; color: var(--muted); }
.pf-plot { position: relative; height: 170px; }
.pf-plot svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pf-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.pf-line.prof { stroke: var(--pos); stroke-width: 2.4; } .pf-line.inv { stroke: var(--muted); opacity: .8; } .pf-line.val { stroke: #4D9BFF; stroke-dasharray: 5 4; }
.pf-area { fill: var(--pos); opacity: .10; }
.pf-zero { stroke: var(--line-2); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.pf-plot .chart-tip span { display: block; }
.pf-empty { position: relative; height: 170px; display: grid; place-items: center; }
.pf-empty svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pf-empty path { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }
.pf-empty p { position: relative; margin: 0; padding: 6px 12px; border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: 13px; }
.goal { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; border-left: 1px solid var(--line); background: var(--surface-2); text-align: center; }
.goal-k { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.goal-ring { position: relative; width: 140px; height: 140px; margin: 6px 0 2px; }
.goal-ring svg { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 11; }
.ring-fg { fill: none; stroke: var(--pos); stroke-width: 11; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.goal.hit .ring-fg { filter: drop-shadow(0 0 6px rgba(0, 208, 120, .45)); }
.goal-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.goal-mid b { font-family: var(--font-num); font-size: 22px; font-weight: 600; }
.goal-mid span { font-size: 12px; color: var(--muted); }
.goal-line { margin: 0; font-size: 13px; font-weight: 600; } .goal.hit .goal-line { color: var(--pos); }
.goal-sub { margin: 0; font-size: 12px; color: var(--muted); }
.goal-edit { display: flex; gap: 6px; margin-top: 6px; } .goal-edit .money-in { width: 110px; }
@media (max-width: 799px) { .pf-panel { grid-template-columns: 1fr; } .goal { border-left: 0; border-top: 1px solid var(--line); } }
@media (prefers-reduced-motion: reduce) { .ring-fg { transition: none; } }

/* ---------- Snap-a-card scanner ---------- */
.head-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.snap-slot { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 5 / 7; max-height: 300px; padding: 12px;
  border: 1.5px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); cursor: pointer; overflow: hidden; transition: border-color .15s; }
.snap-slot:hover, .snap-slot:focus-within { border-color: var(--brand-green); }
.snap-img { position: absolute; inset: 0; background: center / cover no-repeat; }
.snap-slot.has { border-style: solid; }
.snap-slot.has .snap-k { background: rgba(10, 10, 11, .72); color: #fff; padding: 6px 8px; border-radius: 8px; }
.snap-k { position: relative; font-size: 12px; color: var(--muted); line-height: 1.35; }
.snap-k b { display: block; font-size: 14px; color: inherit; } .snap-slot:not(.has) .snap-k b { color: var(--text); }
.scan-spin { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-off { padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.scan-off b { font-size: 14px; } .scan-off p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.scan-off code { font-family: var(--font-num); font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--surface); }
.sc-top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; }
.sc-photo { width: 96px; border-radius: 8px; border: 1px solid var(--line); }
.sc-conf { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--pos); }
.sc-conf.medium { color: var(--warn); } .sc-conf.low { color: var(--neg); }
.sc-title { margin: 2px 0 6px; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.badge.plain { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.sc-why { margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.sc-comps { margin-top: 16px; }
.sc-ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.sc-g { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.sc-g.this { border-color: var(--brand-green); }
.sc-gk { font-size: 12px; font-weight: 600; color: var(--text-2); } .sc-gk i { font-style: normal; margin-left: 6px; color: var(--pos); }
.sc-g b { font-family: var(--font-num); font-size: 18px; font-weight: 600; }
.sc-gs { font-size: 11.5px; color: var(--muted); }
.sc-recent { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.sc-recent .dt-k { width: 100%; }
.sc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sc-acts a.ghost-btn { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
@media (max-width: 459px) { .sc-top { grid-template-columns: 72px minmax(0, 1fr); } .sc-photo { width: 72px; } }
@media (prefers-reduced-motion: reduce) { .scan-spin { animation-duration: 2s; } }

.snap-viz span, .flip-viz span { padding: 4px 9px; border-radius: 8px; background: rgba(95, 224, 138, 0.12); color: #CFF5DC; font-size: 12px; }
.snap-viz b { color: #FFFFFF; font-weight: 600; }
.flip-viz b { color: #5FE08A; }
.snap-grid { justify-items: stretch; }
.snap-slot { width: 100%; max-height: none; max-width: 240px; justify-self: center; }
#sGo:disabled { opacity: .45; cursor: not-allowed; }
.sc-acts svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.sc-acts a.ghost-btn { white-space: nowrap; }

/* ---------- search: players / teams ---------- */
.qbox { position: relative; display: flex; align-items: center; width: min(360px, 100%); height: 40px; padding: 0 10px 0 36px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.qbox:focus-within { border-color: var(--brand-green); box-shadow: 0 0 0 3px var(--accent-soft); }
.qbox > svg { position: absolute; left: 11px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.qbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.qbox input::placeholder { color: var(--muted); }
.qbox input::-webkit-search-cancel-button { cursor: pointer; }
.q-kbd { font-family: var(--font-num); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); }
.qbox:focus-within .q-kbd { display: none; }
.qs { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.qs-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.qs-item:hover, .qs-item.on { background: var(--surface-2); }
.qs-ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-2); font-size: 13px; }
.qs-l { font-size: 13.5px; font-weight: 600; } .qs-l i { display: block; font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.q-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: -4px 0 14px; padding: 10px 14px; border-radius: 10px;
  background: var(--accent-soft); color: var(--text); font-size: 13px; }
.q-sum:empty { display: none; }
#qSum:empty { display: none; }
#searchBtn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 699px) { .qbox { width: 100%; } .q-kbd { display: none; } }

/* phone top bar: keep logo + buttons on one line now that search is there */
@media (max-width: 459px) {
  .topbar-right { gap: 6px; }
  .status b { display: none; }
  .status { margin-right: 0; }
  .topbar-right .icon-btn.round { width: 36px; height: 36px; }
}
@media (max-width: 379px) { .status { display: none; } }

/* ---------- People (owner only) ---------- */
.menu-me { padding: 8px 12px 6px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }
.menu-me b { color: var(--text); font-weight: 600; }
.menu-count { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-left: 6px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 650; }
.pp-list { margin-top: 16px; }
.pp-row { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(80px, 1fr)) 168px; gap: 14px; align-items: center;
  padding: 14px 16px; border-top: 1px solid var(--line); }
.pp-row:first-child { border-top: 0; }
.pp-wait { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.pp-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pp-who > div { min-width: 0; }
.pp-av { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 650; font-size: 14px; }
.pp-on { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--pos); border: 2px solid var(--surface); }
.pp-name { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pp-mail { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-stat span { font-size: 11px; color: var(--muted); }
.pp-stat b { font-weight: 550; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-acts { display: flex; gap: 6px; justify-content: flex-end; }
.pp-acts .sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.pp-h { margin: 26px 0 10px; font-size: 14px; font-weight: 600; }
.pp-logs { padding: 6px 0; }
.pp-log { display: grid; grid-template-columns: 10px auto 1fr auto; gap: 10px; align-items: center; padding: 8px 16px; font-size: 13px; }
.pp-dot { width: 7px; height: 7px; border-radius: 50%; }
.pp-dot.ok { background: var(--pos); } .pp-dot.bad { background: var(--neg); }
.pp-log-who { font-weight: 550; }
.pp-log-what { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-log-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 860px) {
  .pp-row { grid-template-columns: 1fr 1fr; }
  .pp-who { grid-column: 1 / -1; }
  .pp-acts { grid-column: 1 / -1; justify-content: flex-start; }
}

.pp-backup { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.pp-backup b { display: block; font-weight: 600; }
.pp-backup a { text-decoration: none; white-space: nowrap; }
.pp-backup span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
@media (max-width: 560px) { .pp-backup { flex-direction: column; align-items: flex-start; } }

/* Join the Discord */
.dc-ic { width: 18px; height: 18px; }
.dc-banner { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, #5865F2 45%, transparent); background: color-mix(in srgb, #5865F2 10%, var(--surface, transparent)); }
.dc-badge { flex: none; width: 36px; height: 36px; border-radius: 10px; background: #5865F2; color: #fff; display: grid; place-items: center; }
.dc-badge .dc-ic { width: 20px; height: 20px; }
.dc-text { flex: 1; min-width: 0; }
.dc-text b { display: block; font-weight: 600; }
.dc-text span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.dc-banner .cta { text-decoration: none; white-space: nowrap; }
.dc-x { flex: none; background: none; border: 0; color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.dc-x:hover { color: var(--text); }
@media (max-width: 640px) { .dc-banner { flex-wrap: wrap; } .dc-banner .cta { order: 3; width: 100%; text-align: center; } }

/* Discord link in the top nav */
.nav a.nav-discord { display: inline-flex; align-items: center; gap: 7px; color: #8C95FF; }
.nav a.nav-discord:hover { color: #A9B0FF; }
.nav a.nav-discord .dc-ic { width: 17px; height: 17px; }
@media (max-width: 760px) { .nav a.nav-discord span { display: none; } }
.nav a[hidden] { display: none !important; }
.icon-btn[hidden] { display: none !important; }

/* ---------- Your alerts ---------- */
.chips button.on { background: var(--chip-on-bg); border-color: var(--chip-on-bg); color: var(--chip-on-text); }
.switch.sm { width: 34px; height: 20px; }
.switch.sm span::after { width: 14px; height: 14px; }
.switch.sm input:checked + span::after { transform: translateX(14px); }
.al-connect { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, #5865F2 40%, transparent); background: color-mix(in srgb, #5865F2 9%, var(--surface)); }
.al-connect.on { border-color: var(--line); background: var(--surface); }
.al-dc { flex: none; width: 40px; height: 40px; border-radius: 11px; background: #5865F2; color: #fff; display: grid; place-items: center; }
.al-dc .dc-ic { width: 22px; height: 22px; }
.al-ctext { flex: 1; min-width: 0; }
.al-ctext b { display: block; font-weight: 600; }
.al-ctext span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.dc-cta { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: #5865F2; color: #fff; white-space: nowrap; }
.dc-cta:hover { background: #4752C4; }
.dc-cta .dc-ic { width: 18px; height: 18px; }
.al-standard { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.al-standard > div { flex: 1; min-width: 0; }
.al-standard b { display: block; font-weight: 600; }
.al-standard span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.al-h { font-size: 15px; font-weight: 600; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.al-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.al-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, opacity .15s; }
.al-card:hover { border-color: var(--line-2); }
.al-card.off { opacity: .55; }
.al-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.al-top h3 { font-size: 15px; font-weight: 600; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-who { margin: 0; font-size: 13px; color: var(--text-2); }
.al-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.al-chip { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.al-foot { display: flex; align-items: center; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.al-x { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 4px; border-radius: 6px; cursor: pointer; }
.al-x:hover { color: var(--neg); background: var(--neg-soft); }
.al-stars { color: var(--star); letter-spacing: 1px; font-size: 13px; }
.al-stars i { font-style: normal; color: var(--line-2); }
.al-empty { text-align: center; padding: 34px 18px 40px; border: 1px dashed var(--line-2); border-radius: 16px; }
.al-empty h3 { margin: 18px 0 4px; font-size: 17px; }
.al-empty p { margin: 0 0 16px; color: var(--text-2); font-size: 14px; }
.al-demo { display: flex; justify-content: center; }
.al-bubble { text-align: left; max-width: 340px; width: 100%; border-left: 4px solid var(--pos); background: var(--surface-2); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.al-bubble > b { font-size: 13.5px; }
.al-bubble > span { color: var(--text-2); }
.al-bh { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-bottom: 2px; }
.al-bh .dc-ic { width: 16px; height: 16px; color: #8C95FF; }
.al-bh span { font-size: 10px; font-weight: 600; background: #5865F2; color: #fff; padding: 1px 4px; border-radius: 3px; }
.al-empty .al-bubble { animation: al-float 4s ease-in-out infinite; }
@keyframes al-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .al-empty .al-bubble { animation: none; } }
.al-prev { margin-top: 14px; }
.al-prev .field-k { display: block; margin-bottom: 6px; }
#aDialog .field { margin-bottom: 12px; }
@media (max-width: 640px) {
  .al-connect { flex-wrap: wrap; }
  .al-connect .dc-cta { width: 100%; justify-content: center; }
}

/* ---------- Nav fixes (2026-11-12): every tab reachable on phones + narrow screens ---------- */
.nav { min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: 0 0 auto; }
.nav a.nav-how { display: flex; }
@media (max-width: 1100px) and (min-width: 760px) { .nav a.nav-how { display: flex; } }
@media (max-width: 759px) {
  .nav { width: calc(100% + var(--gutter) * 2); max-width: none; justify-content: flex-start; padding: 0 calc(var(--gutter) - 10px); }
  .nav a { flex: 0 0 auto; padding: 0 11px !important; }
  .nav a.nav-how { display: flex !important; }
}
@media (max-width: 759px) {
  .nav { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
         mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%); }
}

/* ---------- My Cards ---------- */
.mc-hero { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 28px; align-items: end; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); margin-bottom: 8px; }
.mc-bars { display: flex; gap: 18px; align-items: flex-end; height: 190px; }
.mc-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 8px; }
.mc-col > b { font-size: 12.5px; font-weight: 500; color: var(--text-2); text-align: center; }
.mc-bar { position: relative; height: var(--h); min-height: 14px; border-radius: 10px 10px 4px 4px; transform-origin: bottom; animation: mc-rise .9s cubic-bezier(.2,.8,.2,1) both; }
.mc-bar span { position: absolute; top: -24px; left: 0; right: 0; text-align: center; font-family: var(--font-num); font-size: 13px; font-weight: 600; color: var(--text); }
.mc-bar.spent { background: repeating-linear-gradient(135deg, var(--surface-3) 0 8px, var(--surface-2) 8px 16px); border: 1px solid var(--line-2); }
.mc-bar.worth { background: linear-gradient(180deg, var(--pos) 0%, color-mix(in srgb, var(--pos) 55%, transparent) 100%); box-shadow: 0 0 40px -10px var(--pos); animation-delay: .15s; }
.mc-bar.worth.down { background: linear-gradient(180deg, var(--neg) 0%, color-mix(in srgb, var(--neg) 55%, transparent) 100%); box-shadow: 0 0 40px -10px var(--neg); }
@keyframes mc-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .mc-bar { animation: none; } }
.mc-sum { display: flex; flex-direction: column; gap: 4px; }
.mc-k { font-size: 13px; color: var(--text-2); }
.mc-big { font-family: var(--font-num); font-size: clamp(34px, 5vw, 52px); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.mc-big.pos { color: var(--pos); } .mc-big.neg { color: var(--neg); }
.mc-pct { font-size: 14px; color: var(--text-2); }
.mc-mini { display: flex; gap: 28px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.mc-mini span { display: block; font-size: 12px; color: var(--muted); }
.mc-mini b { font-family: var(--font-num); font-size: 17px; font-weight: 600; }
.mc-mini b.pos { color: var(--pos); } .mc-mini b.neg { color: var(--neg); }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.mc-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 12px; transition: transform .18s, border-color .18s; }
.mc-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mc-top { display: flex; gap: 14px; align-items: center; }
.mc-art { flex: none; width: 64px; height: 90px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); transition: transform .25s; }
.mc-card:hover .mc-art { transform: rotate(-3deg) scale(1.04); }
.mc-art-g { font: 700 10px var(--font-num); fill: #fff; letter-spacing: .04em; }
.mc-art-i { font: 700 30px var(--font-ui); fill: rgba(255,255,255,.92); }
.mc-art-y { font: 600 8.5px var(--font-ui); fill: rgba(255,255,255,.85); }
.mc-info { min-width: 0; }
.mc-info h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.mc-info p { margin: 2px 0 8px; font-size: 12.5px; color: var(--text-2); }
.mc-chg { display: inline-block; font-family: var(--font-num); font-size: 12.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.mc-chg.up { background: var(--pos-soft); color: var(--pos); }
.mc-chg.down { background: var(--neg-soft); color: var(--neg); }
.mc-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mc-nums span { display: block; font-size: 11.5px; color: var(--muted); }
.mc-nums b { font-family: var(--font-num); font-size: 16px; font-weight: 600; }
.mc-spark { display: block; width: 100%; height: 46px; }
.mc-spark.none { height: auto; font-size: 12px; color: var(--muted); padding: 12px 0; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }
.mc-paid { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.mc-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.mc-spark.up .mc-line { stroke: var(--pos); } .mc-spark.down .mc-line { stroke: var(--neg); }
.mc-area { opacity: .14; } .mc-spark.up .mc-area { fill: var(--pos); } .mc-spark.down .mc-area { fill: var(--neg); }
.mc-dot { fill: var(--text); }
.mc-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding-top: 10px; border-top: 1px solid var(--line); }
.mc-sold-list { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.mc-sold { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.mc-sold:first-child { border-top: 0; }
.mc-sold .profit { font-family: var(--font-num); font-weight: 600; }
.mc-empty { text-align: center; padding: 40px 18px 46px; border: 1px dashed var(--line-2); border-radius: 18px; }
.mc-empty-art { display: flex; justify-content: center; margin-bottom: 18px; }
.mc-empty-art .mc-art { width: 74px; height: 104px; margin: 0 -10px; }
.mc-empty-art .mc-art:nth-child(1) { transform: rotate(-10deg) translateY(6px); }
.mc-empty-art .mc-art:nth-child(2) { position: relative; z-index: 1; transform: translateY(-4px); }
.mc-empty-art .mc-art:nth-child(3) { transform: rotate(10deg) translateY(6px); }
.mc-empty h3 { margin: 0 0 6px; font-size: 18px; }
.mc-empty p { margin: 0 auto 18px; color: var(--text-2); max-width: 380px; }
.mc-empty .cta { text-decoration: none; display: inline-flex; }
@media (max-width: 700px) {
  .mc-hero { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .mc-bars { height: 150px; order: 2; }
  .mc-sold { grid-template-columns: 1fr auto; }
  .mc-sold .muted { grid-column: 1; }
}

/* Home: compact tool tiles */
.ft-compact .ft { min-height: 112px; gap: 4px; }
.ft-compact .ft-t { font-size: 15px; }
.ft-compact .ft-l { font-size: 12.5px; }
.ft-compact .ft-viz { margin-top: 6px; }
.ft-compact .ft:hover { transform: translateY(-2px); }
.ft { transition: transform .18s, border-color .18s; }
.foot-tech summary { cursor: pointer; color: var(--text-2); margin-top: 6px; }
.foot-tech > div { margin-top: 4px; }
.al-monster .ghost-btn { text-decoration: none; white-space: nowrap; }

/* Share your steal */
.sh-sheet { max-width: 460px; }
.sh-body { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#shPreview { width: 100%; max-width: 360px; aspect-ratio: 1080 / 1350; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 20px 50px -20px rgba(0,0,0,.7); background: #0A0A0B; }
.sh-photo { cursor: pointer; }

/* Get set up (new members) */
.setup { margin-top: 20px; padding: 18px 20px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--pos) 35%, var(--line)); background: color-mix(in srgb, var(--pos) 6%, var(--surface)); }
.setup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.setup-head h2 { margin: 0; font-size: 17px; }
.setup-head span { font-size: 13px; color: var(--text-2); }
.setup-bar { height: 6px; border-radius: 99px; background: var(--surface-3); margin: 12px 0 6px; overflow: hidden; }
.setup-bar i { display: block; height: 100%; background: var(--pos); border-radius: 99px; transition: width .5s ease; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.setup-list li:first-child { border-top: 0; }
.setup-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line-2); }
.setup-list li.next .setup-n { background: var(--pos); color: var(--on-accent); border-color: var(--pos); box-shadow: 0 0 0 4px var(--pos-soft); }
.setup-list li.done .setup-n { background: var(--pos-soft); color: var(--pos); border-color: transparent; }
.setup-list li.done .setup-t { opacity: .55; }
.setup-list li.done .setup-t b { text-decoration: line-through; }
.setup-t { flex: 1; min-width: 0; }
.setup-t b { display: block; font-weight: 600; font-size: 14.5px; }
.setup-t span { display: block; font-size: 13px; color: var(--text-2); }
.setup-list .cta, .setup-list .ghost-btn { text-decoration: none; white-space: nowrap; }

/* Settings */
.set-row { display: flex; gap: 10px; }
.set-row .text-in { flex: 1; min-width: 0; }
.set-msg:empty { display: none; }
.set-msg.ok { color: var(--pos); }
.set-msg.bad { color: var(--neg); }
#setDialog .sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* Tools grid (Home): even, simple tiles */
.tl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.tl { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px; border-radius: 14px; text-align: left; font: inherit;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s; }
.tl:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); }
.tl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tl-ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tl-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tl-t { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.tl-l { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.tl-n { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; color: var(--muted); line-height: 1.1; }
.tl-n b { font-family: var(--font-num); font-size: 18px; font-weight: 600; color: var(--pos); }
.tl-go { flex: none; font-size: 22px; color: var(--muted); line-height: 1; }
@media (max-width: 899px) { .tl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .tl-grid { grid-template-columns: 1fr; gap: 8px; } .tl { min-height: 0; padding: 13px 14px; } }

/* phones: 2 Buy It Now cards per row so Home stays short */
@media (max-width: 599px) { .hot-bin .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 4px 12px 14px; } }
@media (max-width: 599px) { .al-monster { flex-direction: column; align-items: flex-start; } .al-monster .ghost-btn { align-self: flex-start; } }

/* FAQ (How it works) */
.hw-faq { margin-top: 28px; display: grid; gap: 10px; }
.hw-faq h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.faq-q { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.faq-q[open] { border-color: var(--line-2); }
.faq-q summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; font-weight: 600; font-size: 15px; }
.faq-q summary::-webkit-details-marker { display: none; }
.faq-q summary i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--pos-soft); position: relative; }
.faq-q summary i::before, .faq-q summary i::after { content: ""; position: absolute; left: 6px; right: 6px; top: 10px; height: 2px; border-radius: 2px; background: var(--pos); transition: transform .2s; }
.faq-q summary i::after { transform: rotate(90deg); }
.faq-q[open] summary i::after { transform: rotate(0); }
.faq-q p { margin: 0; padding: 0 18px 16px; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
/* legal links under every page */
.legal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 18px 0 30px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.legal-foot a { color: var(--text-2); text-decoration: none; }
.legal-foot a:hover { color: var(--text); }
.legal-foot span { color: var(--muted); margin-left: auto; }
@media (max-width: 599px) { .legal-foot span { margin-left: 0; width: 100%; } }
/* support tickets (People) */
.tk { display: grid; gap: 6px; padding: 14px 16px; border-top: 1px solid var(--line); }
.tk:first-child { border-top: 0; }
.tk-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--muted); }
.tk-h b { color: var(--text); font-size: 14px; }
.tk p { margin: 0; font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.tk.closed { opacity: .55; }
.tk .ghost-btn { justify-self: start; }

.tk-reply { border-left: 3px solid var(--pos); padding: 6px 0 6px 12px; }
.tk-reply b { font-size: 12.5px; color: var(--pos); }
.tk-in { width: 100%; min-height: 72px; resize: vertical; }
.tk-acts { display: flex; gap: 8px; }

/* My Cards: example slabs until the first purchase */
.mc-empty-slabs { display: flex; justify-content: center; align-items: flex-end; margin: 6px auto 22px; height: 210px; }
.mc-empty-slabs img { height: 190px; width: auto; border-radius: 8px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.55); background: var(--surface-2); }
.mc-empty-slabs img:nth-child(1) { transform: rotate(-8deg) translate(18px, 6px); }
.mc-empty-slabs img:nth-child(2) { position: relative; z-index: 2; height: 210px; }
.mc-empty-slabs img:nth-child(3) { transform: rotate(8deg) translate(-18px, 6px); }
@media (max-width: 599px) { .mc-empty-slabs { height: 170px; } .mc-empty-slabs img { height: 150px; } .mc-empty-slabs img:nth-child(2) { height: 168px; } }

/* gold star: things only the owner can see */
.own { color: #E8B931; font-size: .72em; margin-left: 4px; vertical-align: .18em; font-weight: 700; line-height: 1; }
.icon-btn.round { position: relative; }
.own-dot { position: absolute; top: -2px; right: -2px; margin: 0; font-size: 10px; vertical-align: 0; }

/* "Wrong card?" reports */
.flag.rep { color: #E8B931; }
.rep-btn { color: var(--muted, #9aa0a6); }
.rep-done { align-self: center; font-size: 13px; color: #E8B931; }
.rp { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line, #222); }
.rp:last-child { border-bottom: 0; }
.rp.closed { opacity: .6; }
.rp-img { width: 72px; height: 96px; object-fit: cover; border-radius: 6px; flex: none; background: #111; }
.rp-body { flex: 1; min-width: 0; }
.rp-title { margin: 6px 0 2px; overflow-wrap: anywhere; }
.rp-note { margin: 4px 0; font-style: italic; }
.rp-k { margin: 10px 0 6px; font-size: 13px; }
.rp-ideas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.rp-ideas .chip { padding: 4px 10px; border-radius: 14px; border: 1px solid var(--line, #333); background: transparent; color: inherit; cursor: pointer; font-size: 13px; }
.rp-ideas .chip.on { border-color: #E8B931; color: #E8B931; }
.rp-in { max-width: 180px; height: 30px; padding: 0 10px; }
@media (max-width: 560px) { .rp-img { width: 54px; height: 72px; } }

/* CardSight preview (owner only until switched on) */
.badge.pv { background: rgba(232, 185, 49, 0.14); color: #E8B931; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 12px 16px; border: 1px solid rgba(232, 185, 49, 0.35); border-radius: 12px;
  background: rgba(232, 185, 49, 0.06); font-size: 13.5px; line-height: 1.45; }
.pv-bar b { color: #E8B931; }
p.dt-src { color: var(--muted); }

/* "only money-makers" switch + starred cards that stopped being a deal */
.loser-chk { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.loser-chk input { accent-color: #5FE08A; }
.badge.nolonger { background: rgba(255, 99, 99, 0.12); color: #FF7A7A; }

/* CardSight: stock pictures, Scan to check, population */
.photo img.stock { object-fit: contain; background: #0d0e10; }
img.mc-photo { object-fit: contain; border-radius: 6px; background: #0d0e10; }
.w-main { display: flex; align-items: center; gap: 10px; }
.w-txt { display: flex; flex-direction: column; min-width: 0; }
.w-thumb { width: 30px; height: 42px; object-fit: contain; border-radius: 3px; flex: none; background: #0d0e10; }
.pop-line { margin: 10px 0 4px; font-size: 13px; line-height: 1.5; }
.badge.lowpop { background: var(--warn-soft); color: var(--warn-text); }
.scan-btn { cursor: pointer; white-space: nowrap; }
.scan-card { display: flex; gap: 16px; padding: 16px; margin-bottom: 14px; align-items: flex-start; }
.scan-img { width: 96px; height: 134px; object-fit: contain; flex: none; border-radius: 6px; background: #0d0e10; }
.scan-body { min-width: 0; flex: 1; }
.scan-body h3 { margin: 0 0 4px; font-size: 17px; }
.scan-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0 6px; }
.scan-nums > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scan-nums .num-sub { overflow-wrap: anywhere; }
.scan-nums b { font-size: 18px; }
.scan-nums b.g { color: var(--pos); }
.scan-wait { display: flex; align-items: center; gap: 10px; padding: 18px 0; color: var(--muted); }
.scan-wait .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: scanspin .8s linear infinite; }
@keyframes scanspin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .scan-card { flex-direction: column; }
  .scan-img { width: 80px; height: 112px; }
  .scan-nums { grid-template-columns: 1fr 1fr; }
  .page-head .scan-btn { width: 100%; justify-content: center; text-align: center; margin-top: 10px; }
}

/* Wins: "Wrong card?" button on each tile */
.win-wrap { position: relative; }
.win-wrap .win { height: 100%; }
.win-x { position: absolute; z-index: 2; right: 8px; bottom: 8px; font: inherit; font-size: 11.5px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.win-x:hover, .win-x:focus-visible { color: var(--text); border-color: var(--warn-text); }

/* Wins: tap a win to see its listing next to the comps */
button.win { font: inherit; text-align: left; width: 100%; cursor: pointer; }
.win-wrap.open .win { border-color: var(--brand-green); }
.win-detail { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: start;
  padding: 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.wd-sold { display: flex; gap: 16px; min-width: 0; }
.wd-img { flex: none; width: 96px; height: 130px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.wd-info { min-width: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.wd-info .dt-note { margin: 0; }
.wd-title { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.wd-stats { display: flex; gap: 22px; }
.wd-stats div { display: flex; flex-direction: column; gap: 2px; }
.wd-stats span { font-size: 11.5px; color: var(--muted); }
.wd-stats b { font-family: var(--font-num); font-size: 16px; font-weight: 600; color: var(--text); }
.wd-stats b.pos { color: var(--pos); }
.wd-comps { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wd-comps .dt-note, .wd-comps .dt-src { margin: 0; }
.win-detail .dt-k { margin: 0; }
.win-detail svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 720px) {
  .win-detail { grid-template-columns: 1fr; gap: 20px; padding: 16px; }
  .wd-img { width: 72px; height: 98px; }
  .wd-stats { gap: 16px; }
}

#dealsSub .linkish { background: none; padding: 0; border: 0; color: var(--accent); font: inherit; font-weight: 500; cursor: pointer; }
#dealsSub .linkish:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Wins: sales left off on purpose */
.not-wins { margin-top: 12px; font-size: 13px; color: var(--muted, #888); }
.not-wins summary { cursor: pointer; }
.not-wins ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }

/* "Double-check": the site isn't sure it's this exact card at this price */
.badge.check { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); cursor: help; margin-left: 6px; font-size: 10.5px; padding: 1px 6px; border-radius: 5px; font-weight: 600; white-space: nowrap; }
.chk.doubt { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
