/* ═══════════════════════════════════════════════════════════════════════════
   Terminal (#/terminal) — the research terminal.

   Its own styling island, like legend.css: the page owns a near-black surface
   and a LIME accent (#C6F83C) that belongs to this screen alone — the rest of
   the app keeps its session-tinted accent. Everything is scoped under
   `.app--mode-terminal .tm` so nothing leaks.

   Typography now comes from the platform system (assets/typography.css, via
   app-styles.css): Calibre/Figtree for UI, JetBrains Mono for figures. This
   sheet used to hold its own mono stack and deliberately skip the mockup's
   Figtree / Instrument Serif; both faces are part of the platform system now,
   so `--tm-mono` just points at the shared token.
   ══════════════════════════════════════════════════════════════════════════ */

/* Tokens live on the `.app` element, not on `.tm`/`.cn`, so the full-bleed rules
   below (which style `.app` and `.app__page`) can reach them too. Shared with the
   Connect page (#/connect, `.cn`) — same surface, same palette.

   The greys are NEUTRAL, not the blue-green they started as: the reference design
   is a plain near-black with no hue in it, and a tint in the surfaces is the
   single most visible way the page reads as "not the design". */
/* `.app--mode-legend` is on this list for ONE reason: the Legend board mounts the
   same floating dock (`buildTerminalDock`), and every `.tm-dock*` rule below is
   written against these tokens. Tokens only — Legend is deliberately absent from
   the surface/full-bleed/scroll rules further down, which would repaint its
   board. */
.app--mode-terminal,
.app--mode-connect,
.app--mode-legend,
/* Settings (#/profile-settings) reads the same scale. The tokens are SCOPED to
   these mode classes, not :root — a route left off this list gets transparent
   borders and no panel fill, which is exactly how Settings first rendered. */
.app--mode-profile-settings {
	--tm-bg: #0a0a0b;
	--tm-panel: #101112;
	--tm-panel-2: #0e0f10;
	--tm-panel-3: #0c0d0e;
	--tm-panel-4: #141516;
	--tm-line: rgba(255, 255, 255, 0.055);
	--tm-line-2: rgba(255, 255, 255, 0.045);
	--tm-hair: rgba(255, 255, 255, 0.065);
	--tm-ink: #f0f0f0;
	--tm-ink-2: #c9cbcc;
	--tm-ink-3: #9a9c9e;
	--tm-ink-4: #6c6f71;
	--tm-ink-5: #45484a;
	--tm-lime: #c6f83c;
	--tm-live: #3ecf8e;
	--tm-loss: #ff6b5e;
	--tm-warn: #e8c34a;
	--tm-live-bg: rgba(62, 207, 142, 0.12);
	--tm-loss-bg: rgba(255, 107, 94, 0.12);
	--tm-mono: var(--mono);
	--tm-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

.app--mode-terminal .tm,
.app--mode-connect .cn {
	color: var(--tm-ink);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.008em;
}

.app--mode-terminal .tm {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 30px;
	box-sizing: border-box;
	width: 100%;
	max-width: 1560px;
	margin: 0 auto;
	padding: clamp(20px, 2.4vw, 34px) clamp(20px, 4.2vw, 76px) 136px;
	min-height: 100%;
}

/* ── full-bleed canvas ────────────────────────────────────────────────────────
   The design is ONE flat near-black sheet, edge to edge. So the background lives
   on the app + page host, NOT on `.tm` — `.tm` is centred at max-width 1560px, and
   painting the background there stopped the black at the content column and left
   the app's own `#05080a` showing in the left/right margins.

   The ambient session wash + aura (`.app::before` / `::after`, both fixed layers)
   are held off for this route too: they tint the margins a different black to the
   content and the seam is exactly what the flat canvas is meant to avoid. This
   sheet is linked after app-styles.css, so equal specificity resolves our way. */
.app--mode-terminal,
.app--mode-connect,
.app--mode-profile-settings {
	background: var(--tm-bg);
}

/* No top bar on this route. The terminal is a full-screen research surface with
   its own dock; the app header sat above it as a second, competing navigation.
   `.app--fullbleed` already zeroes the spine and strip but keeps the header row
   at `--topbar-h`, so we zero that track too and collapse the bar itself. Equal
   specificity to `.app--fullbleed`, and this sheet loads later, so it wins.
   NOTE: the dock only switches terminal screens — with the header gone there is
   no in-page route back to Legend.

   The bar is collapsed with `visibility`, NOT `display: none`. `.app` is a
   3-row grid whose children are placed by auto-flow; taking the header OUT of
   flow slides `.app__body` up into row 1 — the 0px track — which collapses the
   page host to zero height and clips the whole page away, leaving only the
   `position: fixed` dock painting. Keeping the bar in flow holds `.app__body`
   in row 2. `overflow: hidden` stops the bar's own content spilling out of its
   0px track. */
.app--mode-terminal,
.app--mode-connect {
	grid-template-rows: 0 1fr 0;
}

.app--mode-terminal .topbar,
.app--mode-connect .topbar {
	visibility: hidden;
	overflow: hidden;
	pointer-events: none;
}

.app--mode-terminal::before,
.app--mode-terminal::after,
.app--mode-connect::before,
.app--mode-connect::after {
	opacity: 0;
}

/* `.app__page` is `overflow: hidden` globally (it bounds the trading workspace).
   This page is a long document, so it scrolls — without this the sector list and
   every tall screen (screener, calendar, financials) are simply cut off. */
.app--mode-terminal .app__page,
.app--mode-connect .app__page {
	background: var(--tm-bg);
	overflow-y: auto;
	overflow-x: hidden;
}

.tm ::selection {
	background: var(--tm-lime);
	color: #0b1203;
}

.tm-mono {
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
}

/* Every inline SVG figure. Block, not inline — an inline wrapper shrink-wraps to
   nothing and the svg's `width:100%` then resolves against zero. */
.tm-fig {
	display: block;
	width: 100%;
}

.tm-fig > svg {
	display: block;
	width: 100%;
}

@keyframes tmRise {
	from {
		opacity: 0;
		transform: translateY(7px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* The entry animation plays only when the page is ENTERING — a first mount or a
   screen change — never on a price tick. `render()` is a full rebuild fired by
   the 15s feed poll, so an unconditional animation here re-played the whole
   fade-up every 15 seconds: the "flinch". The `tm--enter` class is put on the
   page wrapper by render() only when the screen actually changed. */
.tm--enter .tm-screen {
	animation: tmRise 0.46s cubic-bezier(0.22, 0.68, 0, 1) both;
}

@media (prefers-reduced-motion: reduce) {
	.tm-screen,
	.tm *,
	.tm *::before,
	.tm *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ── header ───────────────────────────────────────────────────────────────── */

.tm-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	flex-wrap: wrap;
	padding: 0 2px;
}

.tm-head__left {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	flex-wrap: wrap;
}

.tm-title {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.028em;
	color: var(--tm-ink);
}

/* The brand mark before the greeting. Was a monochrome glyph tinted by `color`;
   it is the brand image now (src/shell/brand.ts) and brings its own colour. */
.tm-mark {
	display: grid;
	place-items: center;
	/* Follows MARK_SIZE.head in src/shell/brand.ts — the box must not be smaller
	   than the image or `place-items:center` crops it. */
	width: 38px;
	height: 38px;
	flex: none;
	line-height: 0;
}

/* The 2026-08-20 mark is a hard-edged square (brand/spiderx/svg/mark-lime.svg) —
   the old PNG baked its own rounded corners in. Every box that shows it supplies
   the radius now, so one asset can be square in a favicon and rounded in a chip. */
.tm-mark img,
.tm-chip img {
	border-radius: 9px;
}

.tm-moon {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	flex: none;
	color: var(--tm-ink-3);
	line-height: 0;
}

.tm-tab {
	display: inline-flex;
	align-items: center;
	border: 0;
	border-radius: 999px;
	padding: 7px 14px;
	background: transparent;
	color: var(--tm-ink-4);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 500;
	cursor: pointer;
	transition: color 0.2s, background 0.2s;
}

.tm-tab:hover {
	color: #fff;
}

.tm-tab.is-on {
	background: rgba(255, 255, 255, 0.075);
	color: var(--tm-ink);
}

.tm-head__right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tm-eyebrow {
	font-size: 15px;
	color: var(--tm-ink-3);
}

.tm-eyebrow strong {
	color: var(--tm-ink);
	font-weight: inherit;
}

/* Sample-data badge. This page's figures are illustrative — say so, once,
   where it can't be missed, rather than implying a feed that isn't there. */


/* ── instrument switcher ──────────────────────────────────────────────────── */

.tm-instbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 0 2px;
}

/* Same rule as .tm-screen above: animate the switcher in on a screen change,
   not on every feed tick. */
.tm--enter .tm-instbar {
	animation: tmRise 0.46s cubic-bezier(0.22, 0.68, 0, 1) both;
}

.tm-instbar__label {
	font-size: 13px;
	color: var(--tm-ink-4);
}

.tm-instgroup {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
	padding: 4px;
	border: 1px solid var(--tm-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.022);
}

.tm-inst {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 13px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--tm-ink-4);
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
}

.tm-inst:hover {
	color: #fff;
}

.tm-inst.is-on {
	background: rgba(255, 255, 255, 0.085);
	color: var(--tm-lime);
}

.tm-inst__dot {
	width: 5px;
	height: 5px;
	border-radius: 999px;
	background: currentColor;
}

.tm-classpill {
	padding: 5px 11px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	font-size: 12.5px;
	color: var(--tm-ink-3);
}

/* ── shared furniture ─────────────────────────────────────────────────────── */

.tm-card {
	border: 1px solid var(--tm-line);
	border-radius: 16px;
	background: var(--tm-panel);
}

.tm-card--2 {
	border-color: var(--tm-hair);
	background: var(--tm-panel-2);
}

.tm-card--lift {
	position: relative;
	overflow: hidden;
	border-color: rgba(255, 255, 255, 0.055);
	background: radial-gradient(120% 90% at 14% 0%, rgba(255, 255, 255, 0.045), rgba(2, 6, 8, 0) 62%), var(--tm-panel-4);
}

.tm-sech {
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 10.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--tm-ink-4);
}

.tm-h {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.tm-h--lg {
	font-size: 21px;
	letter-spacing: -0.03em;
}

.tm-sub {
	font-size: 13px;
	color: var(--tm-ink-4);
}

.tm-up {
	color: var(--tm-live);
}
.tm-down {
	color: var(--tm-loss);
}
.tm-lime {
	color: var(--tm-lime);
}
.tm-dim {
	color: var(--tm-ink-4);
}

/* Segmented range/period selectors (1D · 1W · 1M …). */
.tm-seg {
	display: flex;
	align-items: center;
	gap: 2px;
}

.tm-seg button {
	padding: 6px 12px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--tm-ink-3);
	font-family: inherit;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.tm-seg button:hover {
	color: var(--tm-ink);
}

.tm-seg button.is-on {
	background: rgba(255, 255, 255, 0.085);
	color: var(--tm-ink);
	font-weight: 600;
}

/* Generic row-table used by most screens. */
.tm-tbl {
	border: 1px solid var(--tm-line);
	border-radius: 16px;
	background: var(--tm-panel);
	overflow: hidden;
}

.tm-tbl__scroll {
	overflow-x: auto;
}

.tm-tbl__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 15px 22px;
	border-bottom: 1px solid var(--tm-line-2);
	font-size: 13.5px;
	color: var(--tm-ink-4);
}

.tm-tbl__head--mono {
	background: rgba(0, 0, 0, 0.35);
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.tm-tbl__row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 22px;
	border-bottom: 1px solid var(--tm-line-2);
	transition: background 0.22s var(--tm-ease);
}

.tm-tbl__row:last-child {
	border-bottom: 0;
}

.tm-tbl__row:hover {
	background: rgba(255, 255, 255, 0.03);
}

.tm-tbl__grow {
	flex: 1;
	min-width: 0;
}

.tm-num {
	text-align: right;
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 13px;
	color: var(--tm-ink-2);
}

/* Circular ticker avatar. */
.tm-av {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	flex: none;
	border-radius: 999px;
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 9.5px;
	font-weight: 600;
	color: #0b1203;
}

.tm-av--lg {
	width: 28px;
	height: 28px;
	font-size: 10px;
}

.tm-trunc {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ── HOME ─────────────────────────────────────────────────────────────────── */

.tm-home {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.29fr);
	gap: 35px;
	align-items: start;
}

.tm-mkt {
	border: 1px solid var(--tm-line);
	border-radius: 16px;
	background: var(--tm-panel);
	padding: 22px 22px 20px;
}

.tm-mkt__date {
	font-size: 14.5px;
	color: var(--tm-ink-4);
}

.tm-mkt__mood {
	margin-top: 5px;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -0.025em;
}

/* The verdict word is MUTED in the reference, not accented — the headline reads
   white, the judgement sits back. */
.tm-mkt__verdict {
	color: var(--tm-ink-3);
}

.tm-mkt__row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 20px;
}

.tm-mkt__row--rule {
	border-top: 1px solid var(--tm-line);
	margin-top: 14px;
	padding-top: 12px;
}

.tm-mkt__spark {
	flex: 1;
	min-width: 0;
}

.tm-mkt__spark > svg {
	height: 178px;
}

.tm-mkt__spark--vix > svg {
	height: 56px;
}

.tm-mkt__row > .tm-mkt__tag {
	flex: none;
	text-align: right;
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 11px;
	color: var(--tm-ink-4);
}

.tm-mkt__legend {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.tm-key {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	color: var(--tm-ink-2);
}

.tm-key__swatch {
	width: 2px;
	height: 13px;
}



/* A bordered well that CLIPS its last row mid-height — the reference cuts
   Technology in half rather than fading it out, which is what tells you the list
   continues. */
.tm-sectors {
	margin-top: 16px;
	border: 1px solid var(--tm-line);
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.28);
	padding: 4px 0 0;
	max-height: 442px;
	overflow: hidden;
}

.tm-sector {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 62px 150px;
	align-items: center;
	gap: 12px;
	margin: 0 12px;
	padding: 10px 4px;
	border-bottom: 1px solid var(--tm-line-2);
	transition: background 0.22s var(--tm-ease);
}

.tm-sector:hover {
	background: rgba(255, 255, 255, 0.035);
}

.tm-sector__name {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	font-size: 14px;
	color: var(--tm-ink-2);
}

.tm-sector__pct {
	text-align: right;
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 12px;
}

.tm-sector__track {
	position: relative;
	height: 12px;
	background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.052) 0 1.2px, transparent 1.2px 4.2px);
}

/* Anchored RIGHT: the coloured run ends at the track's right edge and grows
   leftward with the magnitude, which is how the reference reads. */
.tm-sector__fill {
	position: absolute;
	inset: 0 0 0 auto;
}

.tm-feed {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.tm-recap {
	padding: 24px 28px 28px;
}

.tm-recap__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.tm-chip {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 5px 13px 5px 5px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	font-size: 13.5px;
	font-weight: 500;
}

/* Dark badge with a light glyph — the reference's recap mark is monochrome, not
   an accent chip. */
/* Was a dark disc with the letter `x` set in it. It is the brand mark image now
   (src/shell/brand.ts), which brings its own lime tile — so no background, no
   type, and a slightly softer radius clip than the round disc it replaces. */
.tm-chip__mark {
	flex: none;
	/* Scales with MARK_SIZE.chip — the radius is the tile's own, so it grows too. */
	border-radius: 9px;
}

.tm-recap__when {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	font-size: 12.5px;
	color: var(--tm-ink-4);
}

.tm-recap__body {
	margin: 0;
	font-size: 20px;
	line-height: 1.45;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--tm-ink);
	text-wrap: pretty;
}

.tm-recap__body a {
	color: var(--tm-ink);
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-color: rgba(255, 255, 255, 0.45);
}

.tm-news {
	border: 1px solid var(--tm-line-2);
	border-radius: 14px;
	background: var(--tm-panel);
	padding: 22px 26px 24px;
	transition: border-color 0.22s var(--tm-ease);
}

.tm-news:hover {
	border-color: rgba(255, 255, 255, 0.14);
}

.tm-news__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
}

.tm-news__tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 11px 4px 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
}

.tm-news__badge {
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	flex: none;
	border-radius: 999px;
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 9px;
	font-weight: 600;
	color: #fff;
}

/* Multi-source story: overlapping source dots then "+N". */
.tm-news__stack {
	display: inline-flex;
}

.tm-news__src {
	width: 20px;
	height: 20px;
	flex: none;
	border-radius: 999px;
	border: 1.5px solid var(--tm-panel);
}

.tm-news__src + .tm-news__src {
	margin-left: -7px;
}

.tm-news__ticker {
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 11.5px;
}

.tm-news__when {
	font-size: 12.5px;
	color: var(--tm-ink-4);
}

.tm-news__body {
	margin: 0;
	font-size: 16.5px;
	line-height: 1.5;
	color: var(--tm-ink-2);
	text-wrap: pretty;
}

.tm-news__move {
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 12px;
	padding: 2px 6px;
	border-radius: 5px;
}

/* ── STOCK DETAIL ─────────────────────────────────────────────────────────── */

.tm-stack {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.tm-split {
	display: grid;
	gap: 18px;
}

.tm-split--15 {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
}
.tm-split--135 {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
}
.tm-split--13 {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
}
.tm-split--125 {
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}



























.tm-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 15px;
	border: 1px solid var(--tm-hair);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--tm-ink);
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
	transition: border-color 0.22s var(--tm-ease), color 0.16s;
}

.tm-btn:hover {
	border-color: rgba(198, 248, 60, 0.4);
	color: var(--tm-lime);
}

.tm-btn--cta {
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--tm-lime);
	color: #0b1203;
	font-size: 14.5px;
	font-weight: 600;
	box-shadow: 0 0 0 1px rgba(226, 255, 170, 0.3), 0 8px 28px rgba(198, 248, 60, 0.22);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.tm-btn--cta:hover {
	transform: translateY(-2px);
	border-color: transparent;
	color: #0b1203;
}



/* ── EARNINGS ─────────────────────────────────────────────────────────────── */

.tm-eps__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.tm-eps__keys {
	display: flex;
	gap: 14px;
	margin-top: 6px;
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 11px;
	color: var(--tm-ink-4);
}

.tm-eps__key {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tm-eps__key i {
	width: 6px;
	height: 6px;
	border-radius: 999px;
}

.tm-eps__growth {
	display: flex;
	gap: 16px;
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 11.5px;
	color: var(--tm-ink-4);
}

.tm-eps__chart {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	height: 190px;
	padding-bottom: 26px;
	border-bottom: 1px solid var(--tm-hair);
}

.tm-eps__bar {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.tm-eps__pair {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	width: 100%;
	height: 156px;
}

.tm-eps__pair span {
	flex: 1;
	border-radius: 2px 2px 0 0;
}

.tm-eps__f {
	background: rgba(255, 255, 255, 0.13);
}

.tm-eps__label {
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 9.5px;
	color: var(--tm-ink-4);
	white-space: nowrap;
}

/* ── LEGEND TERMINAL ──────────────────────────────────────────────────────── */

.tm-call {
	padding: 22px 24px 24px;
}

.tm-call__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 16px;
}

.tm-call__chip {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 6px 14px 6px 7px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.055);
	border: 1px solid var(--tm-hair);
	font-size: 13px;
	color: var(--tm-lime);
}


.tm-call__body {
	margin: 0;
	font-size: 20px;
	line-height: 1.42;
	font-weight: 600;
	letter-spacing: -0.02em;
	text-wrap: pretty;
}

.tm-call__by {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--tm-hair);
}

.tm-call__av {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	flex: none;
	border-radius: 999px;
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 12px;
	font-weight: 600;
	color: #0b1203;
}

.tm-live-dot {
	position: absolute;
	right: -1px;
	bottom: -1px;
	width: 9px;
	height: 9px;
	border-radius: 999px;
	background: var(--tm-live);
	border: 2px solid var(--tm-panel);
}

.tm-tape {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 18px;
}

.tm-tape__row {
	display: flex;
	align-items: center;
	gap: 11px;
	font-size: 14px;
	color: var(--tm-ink-2);
}

.tm-tape__row strong {
	color: var(--tm-ink);
	font-weight: 600;
}

.tm-cons {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 18px;
}

.tm-cons__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 7px;
	font-size: 14px;
	color: var(--tm-ink-2);
}

.tm-cons__track {
	display: block;
	height: 8px;
	border-radius: 4px;
	background: var(--tm-hair);
	overflow: hidden;
}

.tm-cons__fill {
	display: block;
	height: 100%;
}

/* ── BEHAVIOR ─────────────────────────────────────────────────────────────── */

.tm-score {
	border: 1px solid rgba(255, 255, 255, 0.055);
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(2, 6, 8, 0) 58%), var(--tm-panel);
	padding: 22px 24px;
}

.tm-score__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.tm-score__figure {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-top: 14px;
}

.tm-score__n {
	font-size: 52px;
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--tm-lime);
}

.tm-score__of {
	font-size: 15px;
	color: var(--tm-ink-3);
}

.tm-score__note {
	margin: 16px 0 0;
	font-size: 15.5px;
	line-height: 1.5;
	color: var(--tm-ink-2);
	text-wrap: pretty;
}

.tm-score__note strong {
	color: var(--tm-ink);
	font-weight: 600;
}

.tm-heat {
	display: grid;
	grid-template-columns: repeat(18, 1fr);
	gap: 5px;
	margin-top: 18px;
}

.tm-heat span {
	aspect-ratio: 1;
	border-radius: 3px;
}

.tm-heat__key {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 14px;
	font-family: var(--tm-mono); font-variant-numeric:tabular-nums;
	font-size: 10.5px;
	color: var(--tm-ink-4);
}

.tm-heat__scale {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.tm-heat__scale i {
	width: 9px;
	height: 9px;
	border-radius: 2px;
}

.tm-bias {
	border-radius: 16px;
	background: var(--tm-panel);
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 11px;
}

.tm-bias__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.tm-bias__title {
	font-size: 15.5px;
	font-weight: 600;
	letter-spacing: -0.018em;
}

.tm-bias__sev {
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11.5px;
}

.tm-bias__desc {
	flex: 1;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--tm-ink-3);
	text-wrap: pretty;
}

.tm-bias__cost {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--tm-line-2);
	font-size: 12.5px;
	color: var(--tm-ink-4);
}

.tm-fineprint {
	margin: 16px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--tm-line);
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--tm-ink-5);
}

/* ── DOCK ─────────────────────────────────────────────────────────────────── */

.tm-dock {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 22px;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 0 30px;
	pointer-events: none;
}

.tm-dock__edge {
	position: relative;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border: 0;
	background: none;
	padding: 0;
	color: var(--tm-ink-5);
	pointer-events: auto;
	cursor: default;
	transition: color 0.16s;
}

.tm-dock__edge:hover {
	color: var(--tm-ink-3);
}

.tm-dock__armed {
	position: absolute;
	top: 0;
	right: 0;
	width: 5px;
	height: 5px;
	border-radius: 999px;
	background: var(--tm-lime);
}

.tm-dock__mid {
	display: flex;
	align-items: center;
	gap: 10px;
	pointer-events: auto;
}

.tm-dock__bar {
	display: flex;
	align-items: center;
	gap: 2px;
	max-width: min(94vw, 560px);
	background: rgba(9, 13, 14, 0.82);
	backdrop-filter: blur(26px) saturate(1.4);
	-webkit-backdrop-filter: blur(26px) saturate(1.4);
	border: 1px solid rgba(255, 255, 255, 0.055);
	border-radius: 999px;
	padding: 5px;
	box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tm-dock__btn {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--tm-ink-4);
	cursor: pointer;
	transition: background 0.22s var(--tm-ease), color 0.16s, transform 0.24s var(--tm-ease);
}

.tm-dock__btn:hover {
	background: rgba(255, 255, 255, 0.06);
	color: var(--tm-ink);
}

.tm-dock__btn:active {
	transform: scale(0.94);
}

.tm-dock__btn.is-on {
	background: rgba(255, 255, 255, 0.085);
	color: var(--tm-ink);
}

.tm-dock__sep {
	width: 1px;
	height: 18px;
	margin: 0 6px;
	background: rgba(255, 255, 255, 0.07);
}

.tm-dock__search {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 999px;
	background: rgba(9, 13, 14, 0.82);
	backdrop-filter: blur(26px) saturate(1.4);
	-webkit-backdrop-filter: blur(26px) saturate(1.4);
	border: 1px solid rgba(255, 255, 255, 0.055);
	color: var(--tm-ink-4);
	box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
	cursor: pointer;
	transition: color 0.16s, border-color 0.22s var(--tm-ease);
}

.tm-dock__search:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.17);
}

/* ── responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
	.tm-home,
	.tm-split--15,
	.tm-split--135,
	.tm-split--13,
	.tm-split--125 {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 720px) {
	.tm-dock__bar {
		overflow-x: auto;
	}
}

/* ── connect CTA — the primary action while disconnected ─────────────────── */
.tm-connectcta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin-top: 18px;
	padding: 18px 20px;
	border: 1px solid rgba(198, 248, 60, 0.22);
	border-radius: 14px;
	background: linear-gradient(180deg, rgba(198, 248, 60, 0.07), rgba(198, 248, 60, 0.02));
}

.tm-connectcta__h {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--tm-ink);
}

.tm-connectcta__p {
	margin-top: 4px;
	max-width: 46ch;
	font-size: 13px;
	line-height: 1.5;
	color: var(--tm-ink-3);
}

.tm-connectcta__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	padding: 11px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--tm-lime);
	color: #0b1400;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s var(--tm-ease), box-shadow 0.2s;
}

.tm-connectcta__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px -12px rgba(198, 248, 60, 0.7);
}

.tm-connectcta__btn svg {
	transition: transform 0.2s var(--tm-ease);
}

.tm-connectcta__btn:hover svg {
	transform: translateX(2px);
}

/* ── account strip — the same slot once a firm account is connected ──────── */
.tm-acct {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
	align-items: center;
	gap: 18px;
	margin-top: 18px;
	padding: 15px 20px;
	border: 1px solid var(--tm-line);
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.28);
}

.tm-acct__id {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--tm-ink);
}

.tm-acct__dot {
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: var(--tm-live, #3ecf8e);
	box-shadow: 0 0 9px rgba(62, 207, 142, 0.8);
}

.tm-acct__cell {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tm-acct__k {
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--tm-ink-4);
}

.tm-acct__v {
	font-family: var(--tm-mono);
	font-variant-numeric: tabular-nums;
	font-size: 17px;
	font-weight: 600;
	color: var(--tm-ink);
}

.tm-acct__of {
	font-size: 11px;
	color: var(--tm-ink-4);
}

@media (max-width: 900px) {
	.tm-acct {
		grid-template-columns: 1fr 1fr;
	}
}

/* ── overnight stats strip, under the chart ──────────────────────────────── */
.tm-onstats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-top: 14px;
	padding: 12px 0 0;
	border-top: 1px solid var(--tm-line);
}

.tm-onstats__cell {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.tm-onstats__k {
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--tm-ink-4);
}

.tm-onstats__v {
	font-family: var(--tm-mono);
	font-variant-numeric: tabular-nums;
	font-size: 15px;
	color: var(--tm-ink);
}

/* ── today's releases, top of the right column ───────────────────────────── */
.tm-releases {
	padding: 20px 22px 14px;
}

.tm-releases__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.tm-releases__tz {
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--tm-ink-4);
}

.tm-rel {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 9px 2px;
	border-bottom: 1px solid var(--tm-line-2);
}

.tm-rel:last-child {
	border-bottom: 0;
}

.tm-rel__time {
	font-family: var(--tm-mono);
	font-variant-numeric: tabular-nums;
	font-size: 12.5px;
	color: var(--tm-ink-3);
}

.tm-rel__name {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	font-size: 13.5px;
	color: var(--tm-ink-2);
}

/* A dot, not a colour on the text: the high-impact prints are the ones you
   flatten into, and they need to be findable in one pass down the column. */
.tm-rel__flag {
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--tm-lime);
}

.tm-rel--high .tm-rel__name {
	color: var(--tm-ink);
	font-weight: 500;
}

.tm-rel__hits {
	font-family: var(--tm-mono);
	font-variant-numeric: tabular-nums;
	font-size: 11px;
	letter-spacing: 0.06em;
	color: var(--tm-ink-4);
}


/* The connect CTA's button + its failure line. The button opens a demo account
   directly (see shell/auto-connect.ts); the line only appears if that fails, and
   carries the reason plus the way out. */
.tm-connectcta__act {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.tm-connectcta__btn[disabled] {
	opacity: 0.65;
	cursor: default;
}

.tm-connectcta__err {
	max-width: 320px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--tm-loss);
}

.tm-connectcta__err[hidden] {
	display: none;
}
