/* Roboto everywhere: latin text (normal and italic), plus the symbols (arrows, the long/short triangles) and math (infinity)
   subsets, so no character falls back to another font. Each face only claims its own characters, and every
   subset repeats the exact weights of the latin faces: a weight range there would win the match and drop the letters. */
@font-face { font-family: "Roboto Slipstream"; font-weight: 400; font-display: swap; src: url(/vendor/roboto-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 700; font-display: swap; src: url(/vendor/roboto-700.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 900; font-display: swap; src: url(/vendor/roboto-900.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 400; font-style: italic; font-display: swap; src: url(/vendor/roboto-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 700; font-style: italic; font-display: swap; src: url(/vendor/roboto-700-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 900; font-style: italic; font-display: swap; src: url(/vendor/roboto-900-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 400; font-display: swap; src: url(/vendor/roboto-symbols-400.woff2) format("woff2"); unicode-range: U+2190-21FF, U+25A0-27BF; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 400; font-display: swap; src: url(/vendor/roboto-math-400.woff2) format("woff2"); unicode-range: U+2200-22FF; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 700; font-display: swap; src: url(/vendor/roboto-symbols-700.woff2) format("woff2"); unicode-range: U+2190-21FF, U+25A0-27BF; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 700; font-display: swap; src: url(/vendor/roboto-math-700.woff2) format("woff2"); unicode-range: U+2200-22FF; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 900; font-display: swap; src: url(/vendor/roboto-symbols-900.woff2) format("woff2"); unicode-range: U+2190-21FF, U+25A0-27BF; }
@font-face { font-family: "Roboto Slipstream"; font-weight: 900; font-display: swap; src: url(/vendor/roboto-math-900.woff2) format("woff2"); unicode-range: U+2200-22FF; }

/* Everything is sized in rem, and the root grows with the window: 16px on a laptop, ~22px on a wide monitor. */
html { font-size: clamp(15px, 0.2vw + 12px, 18px); }

/* "Carbon": pure black, one neutral grey scale, and colour only where it means something:
   cyan = the brand and trader labels, green/red = long/short and PnL, blue = closing, amber = warnings. */
:root {
  --bg: #000000;
  --surface: #000000;
  --surface-2: #121212;
  --line: #1f1f1f;
  --ink: #f5f5f5;
  --ink-2: #a6a6a6;
  --ink-3: #7a7a7a; /* 4.9:1 on black */
  --paper: #ffffff;
  --accent: #5ad1e6; /* brand and labels; never long, short or PnL */
  --accent-hover: #82def0;
  --accent-tint: rgba(90, 209, 230, .12);
  --close: #5b7cf0;
  --warn: #e9a84a;
  --warn-tint: rgba(233, 168, 74, .14);
  --long: #00d395;
  --short: #ff4f4f;
  --long-tint: rgba(0, 211, 149, .16);
  --short-tint: rgba(255, 79, 79, .16);
  --on-paper: #000000;
  --paper-hover: #d9d9d9;
  --on-long: #08130e;
  --on-short: #1a0905;
  --long-rgb: 0, 211, 149;
  --short-rgb: 255, 79, 79;
  --line-2: #333333;
  --faint: #4d4d4d;
  --tip-bg: rgba(0, 0, 0, .94);
  color-scheme: dark;
  --top: var(--accent);
  --top-tint: var(--accent-tint);
  --radius: 10px;
  --gap: 1rem;
  --pad: 1.5rem;
  --font: "Roboto Slipstream", Roboto, Arial, sans-serif; /* own name, so a browser extension that injects its own "Roboto" cannot take over */
}
/* Light mode: the same Carbon rules on white. Long, short and the accent are darker so text in them stays readable. */
:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --line: #e2e2e2;
  --ink: #111111;
  --ink-2: #555555;
  --ink-3: #6e6e6e;
  --paper: #111111;
  --on-paper: #ffffff;
  --paper-hover: #333333;
  --accent: #08798f;
  --accent-hover: #0a91ab;
  --accent-tint: rgba(8, 121, 143, .10);
  --close: #3d5fd9;
  --warn: #a86a00;
  --warn-tint: rgba(168, 106, 0, .12);
  --long: #00875a;
  --short: #d92d2d;
  --long-rgb: 0, 135, 90;
  --short-rgb: 217, 45, 45;
  --long-tint: rgba(0, 135, 90, .12);
  --short-tint: rgba(217, 45, 45, .10);
  --on-long: #ffffff;
  --on-short: #ffffff;
  --line-2: #cfcfcf;
  --faint: #c4c4c4;
  --tip-bg: rgba(255, 255, 255, .97);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.5 var(--font); font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
b, strong { font-weight: 700; }
h1, h2, h3 { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 0.85rem; }
.empty { color: var(--ink-3); padding: 3rem 1rem; text-align: center; line-height: 1.8; }
.pos, .fav { color: var(--long); }
.neg, .against { color: var(--short); }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 1rem 1.5rem; padding: 0.9rem var(--pad); flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 900; font-size: 1.25rem; letter-spacing: -0.035em; text-decoration: none; color: var(--paper); white-space: nowrap; }
.logo svg { height: 24px; width: 32px; fill: var(--accent); flex: none; }
.mainnav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.mainnav a { text-decoration: none; color: var(--ink-2); padding: 0.4rem 0.8rem; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.mainnav a:hover { color: var(--ink); background: var(--surface-2); }
.mainnav a.active { background: var(--paper); color: var(--on-paper); }
.search { margin-left: auto; }
.search input, .input { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 1rem; width: min(22rem, 100%); outline: none; }
.search input:focus, .input:focus { border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.search input:focus-visible, .input:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--accent); }
.status { color: var(--ink-3); font-size: 0.85rem; white-space: nowrap; }
.status .who { margin-left: 0.9rem; color: var(--ink-2); }
.dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.45rem; background: var(--ink-3); vertical-align: 0.1em; }
.dot.on { background: var(--long); }

.pill { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 0.5rem 1.15rem; cursor: pointer; font-weight: 700; text-decoration: none; white-space: nowrap; }
.pill:hover { border-color: var(--ink-3); }
.pill.white { background: var(--paper); color: var(--on-paper); border-color: var(--paper); }
.pill.accent { background: var(--paper); color: var(--on-paper); border-color: var(--paper); }
.pill.accent:hover { background: var(--paper-hover); border-color: var(--paper-hover); }
.pill.long { background: var(--long); border-color: var(--long); color: var(--on-long); }
.pill.short { background: var(--short); border-color: var(--short); color: var(--on-short); }
.pill:disabled { opacity: .45; cursor: not-allowed; }
.pill .sub { font-weight: 400; opacity: .8; font-size: 0.85em; }
.linkbtn { background: none; border: none; padding: 0; cursor: pointer; color: var(--ink-2); text-decoration: underline; text-underline-offset: 0.2em; }
.linkbtn:hover { color: var(--ink); }
.textlink { color: var(--ink-2); font-weight: 700; text-decoration: none; }
.textlink:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
button.textlink { background: none; border: none; padding: 0; font: inherit; cursor: pointer; }
.chipbtn { border: none; cursor: pointer; font-family: inherit; }
.chipbtn:hover { color: var(--ink); }
.chipbtn.armed { background: var(--short-tint); color: var(--short); }
.notice { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink-2); padding: 0.75rem 1rem; margin-bottom: 1rem; }

/* Sub-nav: filters for the current page, active tab underlined in the accent. */
.subnav { display: flex; align-items: center; gap: 1rem 2rem; padding: 0 var(--pad); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.subtabs { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.subtabs a, .subtabs button { background: none; border: none; border-bottom: 2px solid transparent; padding: 0.7rem 0 0.6rem; cursor: pointer; color: var(--ink-3); text-decoration: none; font-weight: 700; }
.subtabs a:hover, .subtabs button:hover { color: var(--ink); }
.subtabs .active { color: var(--ink); border-bottom-color: var(--accent); }
.subtools { display: flex; gap: 0.6rem 0.8rem; align-items: center; flex-wrap: wrap; padding: 0.4rem 0 0.4rem 1.2rem; border-left: 1px solid var(--line); }
.select { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 0.35rem 0.6rem; max-width: 13rem; }
.check { color: var(--ink-2); display: flex; gap: 0.45rem; align-items: center; cursor: pointer; white-space: nowrap; }
.check input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }

main { padding: 1.1rem var(--pad) 3rem; }

/* Cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.label { color: var(--ink-3); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.grid { display: grid; gap: var(--gap); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(24rem, 100%), 1fr)); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-title { font-weight: 900; font-size: clamp(1.6rem, 1.6vw, 2.2rem); line-height: 1.05; letter-spacing: -0.02em; }
.page-sub { color: var(--ink-2); margin-top: 0.5rem; max-width: 60rem; }

/* Small pill chips: deltas, legends, toggles, labels. */
.chip { display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.8rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.up { background: var(--long-tint); color: var(--long); }
.chip.down { background: var(--short-tint); color: var(--short); }
.chip.close { background: rgba(91, 124, 240, .16); color: var(--close); } /* closing fills in chart legends */
/* Trader badges take the slant of the logo: a parallelogram, italic caps, and the logo bars for how fast they trade. */
.chip.top, .chip.spiraling, .chip.tier { border-radius: 0; clip-path: polygon(0.45rem 0, 100% 0, calc(100% - 0.45rem) 100%, 0 100%);
  padding: 0.22rem 0.95rem; font-style: italic; text-transform: uppercase; letter-spacing: .06em; font-size: 0.7rem; }
.chip.top { background: var(--surface-2); color: var(--ink); }
.chip.top .speed { fill: var(--top); } /* the only colour on a badge: the cyan logo bars */
.chip.spiraling { background: var(--surface-2); color: var(--short); }
.chip.tier { background: var(--surface-2); color: var(--ink-2); }
.speed { display: inline-block; width: 1.35em; height: 0.85em; fill: currentColor; flex: none; vertical-align: -0.05em; }
.speed .off { opacity: .2; }
.toggles { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }
.toggles button { border: 1px solid var(--line); background: none; color: var(--ink-3); border-radius: 999px; padding: 0.15rem 0.7rem; cursor: pointer; font-size: 0.82rem; }
.toggles button:hover { color: var(--ink); }
.toggles button.active { background: var(--paper); color: var(--on-paper); border-color: var(--paper); }

.side { display: inline-flex; align-items: baseline; gap: 0.25rem; font-weight: 700; }
.side .arrow { font-size: .7em; }
.side.long .arrow { color: var(--long); }
.side.short .arrow { color: var(--short); }
.addr { color: var(--ink-2); text-decoration: underline dotted; text-underline-offset: 0.2em; }
.addr-full { color: var(--ink-2); overflow-wrap: anywhere; }
.meta { color: var(--ink-2); font-size: 0.92rem; }
.meta .sep { color: var(--ink-3); margin: 0 0.5rem; }

.stat .v { font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.stat .k { color: var(--ink-3); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em; }
.stat .sub { color: var(--ink-3); font-size: 0.75rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 1.1rem 1rem; }

/* Overview */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(24rem, 1fr); gap: var(--gap); align-items: stretch; margin-bottom: var(--gap); }
.hero-main { padding: 1.5rem 0.5rem 1.2rem 0; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { color: var(--ink-2); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.headline { font-weight: 900; font-size: clamp(2.1rem, 2.6vw, 3.6rem); line-height: 0.98; letter-spacing: -0.035em; margin: 1.1rem 0 1.2rem; max-width: 18ch; }
.lede { color: var(--ink-2); font-size: 1rem; max-width: 44rem; }
.searchrow { display: flex; gap: 0.5rem; margin-top: 1.75rem; max-width: 44rem; }
.searchrow .input { flex: 1; width: auto; padding: 0.75rem 1.25rem; font-size: 1.05rem; }
.searchrow .pill { padding: 0.75rem 1.5rem; }
.ctarow { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
.formmsg { color: var(--short); font-size: 0.9rem; margin-top: 0.5rem; min-height: 1.4em; }
.tracked { display: flex; flex-direction: column; }
.trackrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem; align-items: center; padding: 1.25rem 0; border-top: 1px solid var(--line); flex: 1; }
.trackrow:first-of-type { border-top: none; }
.bignum { font-weight: 900; font-size: clamp(1.5rem, 1.5vw, 2.2rem); line-height: 1.05; letter-spacing: -0.02em; }
.spark { width: 100%; height: 5.5rem; display: block; }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.statrow .card { padding: 1.25rem 1.5rem; }
.statrow .bignum { font-size: clamp(1.4rem, 1.3vw, 1.9rem); }
.highlight { display: flex; flex-direction: column; gap: 0.4rem; text-decoration: none; }
.highlight:hover { border-color: var(--ink-3); }
.highlight .title { font-size: 1.15rem; font-weight: 700; display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.highlight .bignum { margin-top: 0.6rem; }

/* Feed */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(38rem, 100%), 1fr)); gap: var(--gap); }
.event.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { border-color: var(--accent); } to { border-color: var(--line); } }
.highlight:hover .label { color: var(--ink); }
.event-top { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.chips { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.event-title { font-size: 1.2rem; font-weight: 700; display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; align-items: baseline; margin: 0.6rem 0 0.2rem; text-decoration: none; }
.event-title:hover b { text-decoration: underline; text-underline-offset: 0.15em; }
.event-title b { font-weight: 900; }
.record { display: flex; gap: 0.3rem 1.5rem; flex-wrap: wrap; margin: 0.6rem 0 0.9rem; font-size: 0.85rem; color: var(--ink-3); }
.record b { color: var(--ink); font-size: 0.95rem; margin-right: 0.3rem; }
.record b.pos { color: var(--long); } .record b.neg { color: var(--short); }
/* Event headline reads as one sentence: "Top day trader opened ZEC Short 39m ago" */
.event-title { margin-top: 0; }
.event-title .who { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .03em; display: inline-flex; align-items: baseline; gap: 0.4rem; }
.event-title .who.top { color: var(--ink); }
.event-title .who.top .speed { fill: var(--top); }
.event-title .who.spiraling { color: var(--ink); }
.event-title > span:not(.who):not(.when) { font-weight: 400; }
.event-title b.pos { color: var(--long); } .event-title b.neg { color: var(--short); }
.event-title .when { font-size: 0.85rem; font-weight: 400; color: var(--ink-3); }
.event-who { margin-top: 0.6rem; }
.copybar { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); margin: 1rem -1.15rem -1rem; border-top: 1px solid var(--line); }
.copybar button { border: none; padding: 0.65rem; cursor: pointer; font-weight: 900; font-size: 0.95rem; text-transform: uppercase; letter-spacing: .04em; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.copybar button:first-child { border-bottom-left-radius: var(--radius); }
.copybar button:last-child { border-bottom-right-radius: var(--radius); }
.copybar .sub { font-size: 0.75rem; font-weight: 400; opacity: .8; letter-spacing: .06em; }
.copybar .long { background: var(--surface-2); color: var(--long); }
.copybar .short { background: var(--surface-2); color: var(--short); }
.copybar .long:hover { background: var(--long-tint); }
.copybar .short:hover { background: var(--short-tint); }

.newpill { position: sticky; top: 1rem; margin: 0 auto 1rem; display: block; z-index: 4; }

.chart-tools { display: flex; align-items: center; gap: 0.5rem 1rem; font-size: 0.85rem; color: var(--ink-3); margin-bottom: 0.6rem; flex-wrap: wrap; }
.chart-tools .spacer { flex: 1; }
/* Trade charts: bubbles sit on a canvas on top of the chart. */
.chart canvas.bubbles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.chart-legend { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line); gap: 0.35rem 1rem; }
.chart-legend .chip { background: none; padding: 0; color: var(--ink-3); gap: 0.45rem; font-weight: 400; }
.chart-legend .chip b { color: var(--ink); }
.dot-sw { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; flex: none; }
.dot-sw.ring { border: 2.5px solid; }
.line-sw { display: inline-block; width: 1.1rem; border-top: 2px dotted var(--ink); flex: none; }

/* Fill details when hovering or tapping a candle with arrows */
.filltip { position: absolute; z-index: 5; min-width: 15rem; max-width: 22rem; background: var(--tip-bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.6rem 0.75rem; font-size: 0.8rem; color: var(--ink-2); pointer-events: none; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.filltip.pinned { pointer-events: auto; border-color: var(--ink-3); }
.filltip .when { color: var(--ink-3); font-size: 0.75rem; margin-bottom: 0.4rem; display: flex; justify-content: space-between; gap: 1rem; }
.filltip .row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.15rem 0.6rem; align-items: baseline; padding: 0.3rem 0; border-top: 1px solid var(--line); }
.filltip .row:first-of-type { border-top: none; }
.filltip .kind { font-weight: 700; }
.filltip .kind.openLong { color: var(--long); } .filltip .kind.openShort { color: var(--short); }
.filltip .kind.closeLong, .filltip .kind.closeShort { color: var(--close); }
.filltip .amt { text-align: right; color: var(--ink); font-weight: 700; }
.filltip .sub { grid-column: 2 / 4; color: var(--ink-3); font-size: 0.75rem; }
.filltip .close-tip { background: none; border: none; color: var(--ink-3); cursor: pointer; padding: 0; font: inherit; }
.chart { height: clamp(15rem, 30vh, 24rem); position: relative; }
.chart .empty { padding-top: 7rem; }
.entry-tag { position: absolute; left: 0.5rem; z-index: 3; transform: translateY(-50%); pointer-events: none;
  font-size: 0.8rem; padding: 0.1rem 0.5rem; background: var(--bg); border: 1px solid currentColor; border-radius: 999px; }

/* Positions */
.bias { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.bias .coin { font-weight: 900; font-size: 1.15rem; }
.splitbar { display: flex; height: 0.45rem; gap: 2px; margin: 0.7rem 0 0.5rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.splitbar span { min-width: 3px; }
.splitbar .l { background: var(--long); } .splitbar .s { background: var(--short); }
.bias .row { display: flex; justify-content: space-between; gap: 0.5rem; color: var(--ink-2); font-size: 0.85rem; }

.tablecard { padding: 0.5rem 0.75rem 0.75rem; }
.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: var(--ink-3); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em; padding: 0.8rem 0.75rem 0.5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th[data-k]:not([data-k=""]) { cursor: pointer; }
.table th[data-k]:not([data-k=""]):hover { color: var(--ink); }
.table td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: none; }
.table td.num, .table th.num { text-align: right; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table .empty { white-space: normal; }
.table.compact td { padding: 0.5rem 0.5rem; }
.table.compact th { padding-left: 0.5rem; padding-right: 0.5rem; }
.steps td { white-space: normal; }
.steps .muted { display: block; font-size: 0.75rem; }

/* Trader page */
.trader-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: end; margin-bottom: 1.5rem; }
.trader-title { font-weight: 900; font-size: clamp(1.8rem, 2vw, 2.6rem); line-height: 1; letter-spacing: -0.03em; margin-top: 0.6rem; display: flex; gap: 0.3rem 1rem; align-items: baseline; flex-wrap: wrap; }
.trader-title .side { font-size: 0.55em; font-weight: 700; letter-spacing: 0; }
.pricebox { text-align: right; }
.pricebox .chips { justify-content: flex-end; margin-top: 0.5rem; }
.twocol { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(26rem, 1fr); gap: var(--gap); align-items: start; }
.stack { display: grid; gap: var(--gap); min-width: 0; }
.trader-chart .chart { height: clamp(20rem, 50vh, 40rem); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 1rem; }
.facts .k { color: var(--ink-3); font-size: 0.75rem; }
.facts .v { font-weight: 700; margin-top: 0.1rem; }
.copybtns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.4rem; }
.copybtns .pill { justify-content: center; flex-direction: column; gap: 0; padding: 0.6rem 1rem; border-radius: 14px; }
.pnlchart { height: clamp(12rem, 22vh, 18rem); }
.winloss { display: flex; height: 0.5rem; gap: 2px; margin: 0.25rem 0 0.5rem; border-radius: 999px; overflow: hidden; }
.winloss .w { background: var(--long); } .winloss .l { background: var(--short); }
.spread { display: flex; justify-content: space-between; gap: 1rem; }
.last10 { display: flex; gap: 0.3rem; }
.last10 span { flex: 1; text-align: center; padding: 0.3rem 0; font-weight: 700; font-size: 0.85rem; border-radius: 6px; }
.last10 .W { background: var(--long-tint); color: var(--long); }
.last10 .L { background: var(--short-tint); color: var(--short); }

/* Copy trading */
.modebar { border-radius: var(--radius); padding: 0.8rem 1.2rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.modebar .why { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.modebar.dry { background: var(--surface-2); color: var(--ink); border: 1px dashed var(--ink-3); }
.modebar.testnet { background: var(--warn-tint); color: var(--warn); border: 1px solid var(--warn); }
.modebar.live { background: var(--short); color: var(--on-short); }
.modebar.off { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.ticket { position: fixed; top: 0; right: 0; bottom: 0; width: min(34rem, 100vw); z-index: 20; background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field > span { color: var(--ink-3); font-size: 0.8rem; }
.field .input { width: 100%; border-radius: 10px; }
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.rowfields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: end; }
.warn { background: var(--warn-tint); color: var(--warn); border-radius: 10px; padding: 0.6rem 0.9rem; font-size: 0.9rem; }
.result.ok { background: var(--long-tint); color: var(--long); border-radius: 10px; padding: 0.8rem 1rem; }
.result.bad { background: var(--short-tint); color: var(--short); border-radius: 10px; padding: 0.8rem 1rem; }
.ruleform { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.75rem; align-items: end; margin-top: 1rem; }

/* Overview: chart cards, position cards, ranked lists, Go deeper */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); align-items: stretch; }
.cardtitle { font-size: 1.1rem; font-weight: 900; letter-spacing: -0.01em; }
.card-head .legend { margin-top: 0.5rem; }
.sw { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 3px; margin-right: 0.15rem; flex: none; }
.plot { height: clamp(12rem, 24vh, 20rem); position: relative; margin-top: 0.75rem; }
.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.7rem; font-size: 0.85rem; line-height: 1.45; max-width: 22rem; }
.tip.inplot { position: absolute; }
.tip .sw { margin-right: 0.35rem; }
.divbars { display: grid; gap: 0.7rem; margin: 1.1rem 0 1rem; }
.divrow { display: grid; grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr) 6.5rem; align-items: center; }
.divname { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 700; }
.divhalf { display: flex; align-items: center; gap: 0.4rem; height: 1.6rem; font-size: 0.85rem; color: var(--ink-2); min-width: 0; }
.divhalf.left { flex-direction: row-reverse; border-right: 1px solid var(--ink-3); }
.divhalf .bar { height: 100%; min-width: 2px; }
.divhalf .bar.s { background: var(--short); border-radius: 4px 0 0 4px; }
.divhalf .bar.l { background: var(--long); border-radius: 0 4px 4px 0; }
.divhalf .amt { white-space: nowrap; }
.divshare { text-align: right; color: var(--ink-2); font-size: 0.85rem; }
.bars { position: relative; height: clamp(11rem, 20vh, 17rem); margin: 1.6rem 0 0.4rem 2.5rem; }
.grid-y { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.grid-y span { position: absolute; right: calc(100% + 0.5rem); top: -0.6em; font-size: 0.75rem; color: var(--ink-3); }
.cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.9rem; align-items: end; padding: 0 0.4rem; }
.col { height: 100%; display: flex; align-items: flex-end; }
.barstack { width: 100%; display: flex; flex-direction: column-reverse; gap: 2px; position: relative; }
.barstack .seg { min-height: 2px; }
.barstack .seg:last-of-type { border-radius: 4px 4px 0 0; }
.barstack .tot { position: absolute; bottom: calc(100% + 0.25rem); left: 0; right: 0; text-align: center; font-size: 0.8rem; color: var(--ink-2); }
.xlabels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.9rem; margin-left: 2.5rem; padding: 0 0.4rem; font-size: 0.78rem; color: var(--ink-3); text-align: center; }
.ovsection { margin-top: 2.5rem; }
.sectionhead { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.7rem; margin-bottom: var(--gap); }
.sectionhead h2 { font-size: clamp(1.25rem, 1.2vw, 1.6rem); font-weight: 900; letter-spacing: -0.02em; }
.poscards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: var(--gap); }
.poscard { display: flex; flex-direction: column; gap: 0.45rem; text-decoration: none; }
.poscard:hover { border-color: var(--ink-3); }
.posspark { height: 4.5rem; margin-bottom: 0.4rem; }
.posspark svg { width: 100%; height: 3.6rem; display: block; }
.sparkkey { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.72rem; }
.postitle { display: flex; gap: 0.5rem; align-items: baseline; font-size: 1.05rem; }
.ranked { list-style: none; margin: 0; padding: 0; }
.ranked li + li { border-top: 1px solid var(--line); }
.ranked a { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.75rem 0.25rem; text-decoration: none; border-radius: 8px; }
.ranked a:hover { background: var(--surface-2); }
.ranked .rank { color: var(--ink-3); font-weight: 700; text-align: center; }
.ranked .who, .ranked .res { display: grid; gap: 0.15rem; min-width: 0; }
.ranked .res { text-align: right; }
.ranked .res b { font-size: 1.15rem; font-weight: 700; }
.deeper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.deep { text-decoration: none; display: flex; flex-direction: column; gap: 0.4rem; }
a.deep:hover { border-color: var(--ink-3); }
a.deep:hover h3 { text-decoration: underline; text-underline-offset: 0.2em; }
.deep h3 { font-size: 1.2rem; font-weight: 700; }
.deep .art { width: 100%; max-width: 16rem; height: 6rem; margin-bottom: 0.6rem; }
.art .c, .art .g { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.art .c { stroke: var(--ink); }
.art .g { stroke: var(--faint); }
.art .w { stroke-width: 6; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; background: var(--surface-2); border-radius: 6px; padding: 0.1rem 0.4rem; color: var(--ink); }

/* Beheer (admin) */
.marketlist { display: grid; gap: 0; margin-top: 0.75rem; }
.market { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 0.5rem 1.25rem; align-items: center; padding: 0.6rem 0.25rem; border-top: 1px solid var(--line); }
.market .id { font-weight: 700; }
.inline-input { background: var(--surface-2); border: 1px solid var(--accent); border-radius: 6px; padding: 0.15rem 0.45rem; width: 8rem; color: var(--ink); }
.actions { display: inline-flex; gap: 1rem; align-items: center; justify-content: flex-end; }
.armed-note { color: var(--short); font-size: 0.8rem; }

/* PnL cohorts */
.cohort-legend { margin: 0.6rem 0.75rem 0.2rem; }
.select option { background: var(--bg); color: var(--ink); }
.cohort-grid .cell-h { text-align: center; }
.cohort-grid .cell-h span { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-3); }
.cohort-grid td.lean-td { padding: 0.35rem; }
.lean { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 6.5rem; min-height: 2.9rem; border-radius: 8px; text-decoration: none; border: 1px solid transparent; font-weight: 700; }
.lean .sub { font-size: 0.75rem; font-weight: 400; opacity: .85; }
.lean.l { background: rgba(var(--long-rgb), var(--a)); }
.lean.s { background: rgba(var(--short-rgb), var(--a)); }
.lean.none { background: var(--surface-2); color: var(--ink-3); }
.lean:hover { border-color: var(--ink-3); }
.lean.sel { border-color: var(--paper); }
.cohort-detail { margin: var(--gap) 0; scroll-margin-top: 1rem; }
.cstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: var(--gap); }
.cstat { background: var(--surface); padding: 1.1rem 1.2rem; }
.cbig { font-size: 1.3rem; font-weight: 700; margin: 0.4rem 0 0.2rem; }
.cstat p { margin: 0.4rem 0 0; }
.row2 { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.85rem; color: var(--ink-2); }
.meter { display: block; height: 0.45rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 0.7rem 0 0.5rem; }
.meter > span { display: block; height: 100%; background: var(--ink-2); border-radius: 999px; }
.liq { display: inline-flex; align-items: center; gap: 0.5rem; }
.liq .meter { width: 5rem; margin: 0; background: var(--surface-2); }
.liq .meter > span { background: var(--short); }
.lean-spark { width: 100%; height: 4.5rem; margin-top: 0.4rem; }
.last5 { display: inline-flex; gap: 3px; }
.last5 i { width: 0.8rem; height: 0.8rem; border-radius: 2px; background: var(--short); }
.last5 i.w { background: var(--long); }

@media (max-width: 1300px) {
  .twocol { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .duo { grid-template-columns: minmax(0, 1fr); }
  .deeper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --pad: 0.9rem; }
  /* Phone top bar: logo, status and alerts on one row; the menu and coin tabs scroll sideways in a single row. */
  .topbar { gap: 0.6rem 0.75rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .logo { order: 0; }
  .status { order: 1; margin-left: auto; }
  #notifyBtn { order: 2; padding: 0.3rem 0.8rem; }
  .mainnav, .subtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .mainnav::-webkit-scrollbar, .subtabs::-webkit-scrollbar { display: none; }
  .mainnav { order: 3; width: calc(100% + 2 * var(--pad)); margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); }
  .subtabs { width: 100%; gap: 1.2rem; }
  .subtabs a, .subtabs button { white-space: nowrap; }
  .search { order: 4; margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .addr { overflow-wrap: anywhere; }
  .card { overflow-x: auto; } /* wide tables scroll inside their card instead of widening the page */
  .trader-head { grid-template-columns: 1fr; }
  .pricebox { text-align: left; }
  .pricebox .chips { justify-content: flex-start; }
  .trackrow, .rowfields { grid-template-columns: 1fr; }
  .deeper { grid-template-columns: minmax(0, 1fr); }
  .divrow { grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1fr); }
  .divshare { display: none; }
  .market { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}

/* Feed: earlier moves on the same position, and a visible filter bar */
.earlier { margin: -0.3rem 0 0.9rem; padding: 0.55rem 0.75rem; background: var(--surface-2); border-radius: 8px; }
.earlier ul { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; gap: 0.2rem; }
.earlier li { display: grid; grid-template-columns: minmax(0, 1fr) auto 5.5rem; gap: 0.75rem; font-size: 0.85rem; }
.earlier li .num { font-weight: 700; text-align: right; }
.earlier li .muted { text-align: right; }
.filters-label { color: var(--ink-3); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.subtools .select { border-color: var(--line-2); }
.subtools .select:hover { border-color: var(--ink-3); }

/* Positions: a signal per coin, then the biggest positions per coin */
.signals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: var(--gap); margin-bottom: 0.6rem; }
.signal { text-align: left; font: inherit; color: inherit; cursor: pointer; display: grid; gap: 0.3rem; }
.signal:hover { border-color: var(--ink-3); }
.signal .coin { font-weight: 900; font-size: 1.15rem; }
.signal .splitbar { margin: 0.4rem 0 0.2rem; }
.signal .sig { font-size: 0.85rem; }
.leanword { font-weight: 900; text-transform: uppercase; letter-spacing: .03em; font-size: 0.95rem; }
.leanword.long { color: var(--long); } .leanword.short { color: var(--short); } .leanword.mixed { color: var(--ink-2); }
.leanword .muted { font-weight: 400; text-transform: none; letter-spacing: 0; }
.sig-legend { margin-bottom: var(--gap); }
.chip.newchip { background: var(--ink); color: var(--bg); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .05em; }
.coin-sec, #activeSec, #allSec { margin-bottom: var(--gap); }
.sec-head { margin: 0.5rem 0.5rem 0.4rem; }
.tablecard .showmore, .tablecard #allToggle { margin: 0.4rem 0.75rem 0.3rem; }
.table td.rank { color: var(--ink-3); font-weight: 700; width: 2rem; }
.select:disabled { opacity: .45; cursor: not-allowed; }
.pnlpct { font-weight: 400; opacity: 0.75; white-space: nowrap; }
.star { width: 0.9em; height: 0.9em; fill: currentColor; vertical-align: -0.1em; }
.favbtn .star { fill: none; stroke: currentColor; stroke-width: 2; margin-right: 0.35em; }
.favbtn.on { color: var(--ink); }
.favbtn.on .star { fill: currentColor; }
.favmark { color: var(--ink-2); margin-left: 0.35em; display: inline-flex; }
:root[data-theme="light"] .filltip { box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.mbars { display: flex; align-items: stretch; gap: 3px; height: 5rem; margin-top: 1.25rem; border-top: 1px dashed transparent; position: relative; }
.mbars::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line-2); }
.mbar { flex: 1; position: relative; }
.mbar i { position: absolute; left: 0; right: 0; border-radius: 2px; }
.mbar i.up { background: var(--long); }
.mbar i.down { background: var(--short); }
.mbars-axis { display: flex; justify-content: space-between; margin: 0.35rem 0 0.6rem; }
.botlog summary { cursor: pointer; }
.botlog pre { margin: 0.6rem 0 0; max-height: 22rem; overflow: auto; background: var(--surface-2); border-radius: 8px; padding: 0.75rem; font-size: 0.75rem; line-height: 1.5; white-space: pre-wrap; }
