/* Self-hosted fonts (OFL, wwwroot/fonts): no third-party request chain before text can render. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400-normal.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: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-latin-500-normal.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: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.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: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-latin-700-normal.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: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/geist-latin-500-normal.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: "Geist"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/geist-latin-600-normal.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: "Geist"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/geist-latin-700-normal.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; }
/* Site-level styles. Theme styling lives in Styles/ (compiled to theme.min.css). */
/* --th-navy, --th-brass: design.css tokens. */
body { padding-bottom: env(safe-area-inset-bottom); }
.text-brass { color: var(--th-brass) !important; }
.bg-brass { background: var(--th-brass) !important; color: #fff; }
.min-w-0 { min-width: 0; }

/* ---- Stream ---- */
/* clip, not hidden: an overflow:hidden ancestor stops the sticky "N new messages" pill from sticking (67l, UX2-C-1). */
.stream { overflow: hidden; overflow: clip; }
.stream-tabs { gap: 1.25rem !important; }
.stream-tab { padding-bottom: .6rem; color: var(--bs-secondary-color); font-weight: 600; border-bottom: 2px solid transparent; text-decoration: none; }
.stream-tab.active, .stream-tab:hover { color: var(--bs-primary); border-bottom-color: var(--bs-primary); }
.stream-message { cursor: pointer; transition: background .1s; }
.stream-message + .stream-message, .stream-list > div + div .stream-message { border-top: 1px solid var(--bs-border-color); }
.stream-message:hover { background: var(--bs-tertiary-bg); }
.post-body { white-space: pre-line; word-break: break-word; }
.thread-focus .post-body { font-size: 1.1rem; }
.thread-root .stream-message { opacity: .9; }
.replies .stream-message { padding-left: 2.5rem !important; }
.reply-highlight .stream-message { background: rgba(27,58,87,.05); }
.composer textarea { resize: none; overflow: hidden; }

/* ---- Avatars ---- */
.avatar-initials { width: 42px; height: 42px; background: var(--bs-primary); color: #fff; font-weight: 600; }
/* People get a muted tint (never green/red) so the same author is recognisable while scrolling
   and avatars don't look like the navy ticker monograms. */
.avatar-tint-0 { background: #4a5d73; } .avatar-tint-1 { background: #6b5b7b; } .avatar-tint-2 { background: #56657f; }
.avatar-tint-3 { background: #3f6b6b; } .avatar-tint-4 { background: #7b6a8a; } .avatar-tint-5 { background: #4f6f7f; }
.avatar-tint-6 { background: #3b5b8a; } .avatar-tint-7 { background: #6b6b6b; }
.avatar-img { object-fit: cover; flex-shrink: 0; max-width: none; }

/* ---- Actions ---- */
.post-actions a { color: var(--bs-secondary-color); text-decoration: none; }
.post-actions a.active, .post-actions a:hover { color: var(--bs-primary); }
.post-actions .reaction { cursor: pointer; color: var(--bs-secondary-color); border: 0; background: transparent; }
.post-actions .reaction:hover, .post-actions .reaction.is-on { color: var(--bs-primary); }

/* ---- Sentiment: coloured edge + labelled pill (green/red reserved for sentiment only) ----
   The faint background wash was dropped after the design review (whole screens read as a
   red/green barcode). To bring it back, uncomment the two background rules below. */
.stream-message.is-bullish { box-shadow: inset 3px 0 0 var(--th-bullish); /* background: rgba(26,157,91,.035); */ }
.stream-message.is-bearish { box-shadow: inset 3px 0 0 var(--th-bearish); /* background: rgba(214,69,69,.035); */ }

/* ---- Cashtag chip: company logo + $TICKER ---- */
/* Plain inline text so "$AAPL" sits on the same baseline as the words around it (an inline-flex
   chip aligns to the logo's bottom edge and drops the ticker below the line). The logo is centred
   on the x-height instead, and nowrap keeps logo and ticker together at a line break. */
.cashtag { display: inline; white-space: nowrap; font-weight: 600; text-decoration: none; color: var(--th-ticker, #1f6fd1); }
.cashtag:hover { text-decoration: underline; }
/* Round logo on a white disc with a hairline ring, as on the incumbent: reads as "a company", not a letter tile. */
.cashtag-logo { width: 18px; height: 18px; border-radius: 50%; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex-shrink: 0; max-width: none; }
.cashtag-monogram { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; font-weight: 700; color: #fff; background: var(--bs-primary); box-shadow: none; }
.cashtag > .cashtag-logo { display: inline-block; width: 1.1em; height: 1.1em; margin-right: .25em; vertical-align: -.18em; }
.cashtag > .cashtag-monogram { display: inline-flex; font-size: .6em; width: 1.83em; height: 1.83em; vertical-align: -.3em; margin-right: .42em; }
.mention, .hashtag { font-weight: 500; text-decoration: none; }
.post-link { word-break: break-all; color: var(--bs-primary); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Ticker hover preview ---- */
.ticker-preview { position: absolute; z-index: 1080; width: 330px; max-width: calc(100vw - 16px); padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: .9rem; }
.ticker-preview .cashtag-logo { width: 44px; height: 44px; font-size: 18px; border-radius: 50%; }

/* ---- Symbol page stats ---- */
.stat-box { background: var(--bs-tertiary-bg); border-radius: .5rem; padding: .75rem; height: 100%; }
.stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); font-weight: 600; }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.symbol-logo { object-fit: contain; background: #fff; border: 1px solid var(--bs-border-color); }
.trending-row { cursor: pointer; }
.trending-row:hover { background: var(--bs-tertiary-bg); }

/* ---- Search typeahead ---- */
.typeahead-menu { top: 100%; left: 0; }

/* ---- Advertising slots: space is reserved so pages never jump ---- */
.ad-slot { position: relative; text-align: center; }
.ad-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-secondary-color); margin-bottom: 2px; }
.ad-placeholder { border: 1px dashed var(--bs-border-color); border-radius: .5rem; background: var(--bs-tertiary-bg); }

/* ---- Phone-width bottom navigation ---- */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; display: flex; justify-content: space-around;
  padding: .4rem 0 calc(.4rem + env(safe-area-inset-bottom)); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; font-size: .7rem; color: var(--bs-secondary-color); text-decoration: none; gap: 2px; }
.bottom-nav a i { font-size: 1.1rem; }
.bottom-nav a.active { color: var(--bs-primary); }

/* ---- Readability (design review): darker body/secondary text for WCAG AA contrast ---- */
:root, [data-bs-theme=light] {
  --bs-body-color: var(--th-text); --bs-body-color-rgb: 36, 52, 71;
  --bs-secondary-color: var(--th-muted); --bs-secondary-color-rgb: 91, 103, 118;
}
[data-bs-theme=light] .text-body-secondary, [data-bs-theme=light] .text-muted { color: var(--th-muted) !important; }
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
[data-bs-theme=light] .badge-bullish { color: var(--th-bullish-ink) !important; } [data-bs-theme=light] .badge-bearish { color: var(--th-bearish-ink) !important; }

/* ---- Footer at every width, clear of the phone bottom nav ---- */
@media (max-width: 767.98px) {
  .site-footer { padding-bottom: calc(var(--th-bottom-nav-h) + 1rem + env(safe-area-inset-bottom)) !important; }
  .site-footer .container { flex-direction: column; text-align: center; align-items: center; }
}

/* ---- Keyboard: visible focus on reactions and actions ---- */
.post-actions .reaction:focus-visible, .post-actions a:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; border-radius: 4px; }
.post-actions a, .post-actions .reaction { min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; }

/* ---- Account settings pills ---- */
.account-nav .nav-link { color: var(--bs-secondary-color); }
.account-nav .nav-link.active { color: #fff !important; background: var(--bs-primary); }
.account-nav .nav-link.active i { color: #fff; }
.account-nav ul { scrollbar-width: none; }

/* ---- Direct messages ---- */
.dm-scroll { max-height: 60vh; overflow-y: auto; }
.dm-bubble { max-width: 78%; padding: .5rem .75rem; border-radius: 1rem; word-break: break-word; }
.dm-text { white-space: pre-wrap; }
.dm-bubble.mine { background: var(--bs-primary); color: #fff; border-bottom-right-radius: .25rem; }
.dm-bubble.theirs { background: var(--bs-tertiary-bg); border-bottom-left-radius: .25rem; }
.dm-meta { opacity: .7; font-size: .7rem; margin-top: .15rem; }
.dm-bubble.mine .dm-meta { color: #dfe7ef; }
.dm-composer textarea { resize: none; max-height: 160px; }

/* Message images: one keeps its aspect (capped height); two to four tile in a grid. */
.post-media { border-radius: .75rem; max-width: 560px; }
.post-media-item { display: block; background: var(--bs-tertiary-bg); border-radius: .75rem; overflow: hidden; }
.post-media img { display: block; max-width: none; object-fit: cover; }
/* One image: shown large, keeping its shape. */
.post-media-1 { width: fit-content; overflow: hidden; }
.post-media-1 img { width: auto; height: auto; max-width: 100%; max-height: 360px; }
/* With its shape known (--ar, --w from the card), the frame is sized before the image loads: at most 360px tall,
   never wider than the column or the image itself, so nothing below it moves (CLS). */
.post-media-1:has(.has-ar) { width: auto; }
.post-media-1 .post-media-item.has-ar { width: min(100%, calc(360px * var(--ar)), var(--w)); }
.post-media-1 .post-media-item.has-ar img { width: 100%; height: auto; max-width: 100%; max-height: none; }
/* 2-4 images: a row of smaller thumbnails that scrolls sideways (swipe, trackpad, or shift+wheel).
   Each keeps its own shape at a fixed height; very wide/tall ones are cropped to 3:1 / 3:4. */
.post-media-strip { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: 0; scrollbar-width: thin; padding-bottom: 4px; border-radius: 0; }
.post-media-strip .post-media-item { flex: none; scroll-snap-align: start; height: 200px; }
.post-media-strip img { height: 200px; width: auto; min-width: 150px; max-width: 600px; }
.post-media-strip .post-media-gif { height: 200px; max-width: none; }
.post-media-strip .post-media-gif video { height: 200px; width: auto; }
.post-media-count { position: absolute; right: 6px; top: 6px; padding: 0 6px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; font-weight: 600; pointer-events: none; }
@media (max-width: 575.98px) { .post-media-strip .post-media-item, .post-media-strip img, .post-media-strip .post-media-gif video { height: 160px; } }
.composer-media:empty { display: none; }
.composer-media { margin-top: .5rem; }
.composer-thumb { position: relative; width: 72px; height: 72px; border-radius: .5rem; overflow: hidden; background: var(--bs-tertiary-bg); }
.composer-thumb img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.composer-thumb.is-uploading img { opacity: .45; }
.composer-thumb.is-uploading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border: 2px solid var(--bs-primary); border-right-color: transparent; border-radius: 50%; animation: th-spin .8s linear infinite; }
.composer-thumb-remove { position: absolute; top: 3px; right: 3px; width: 28px; height: 28px; line-height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: 18px; }
.composer-thumb-remove::before { content: ""; position: absolute; inset: -6px; }
.composer-error { color: var(--bs-body-color); }
.composer-error:not(:empty)::before { content: "\f06a"; font: var(--fa-font-solid); color: var(--th-brass); margin-right: .35rem; }

/* Link card */
.link-card { display: flex; flex-direction: column; max-width: 560px; border: 1px solid var(--bs-border-color); border-radius: .75rem; overflow: hidden; color: inherit; text-decoration: none; background: var(--bs-body-bg); }
.link-card:hover { background: var(--bs-tertiary-bg); }
.link-card img { width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; max-width: none; display: block; border-bottom: 1px solid var(--bs-border-color); }
.link-card-text { display: flex; flex-direction: column; gap: 2px; padding: .6rem .8rem; min-width: 0; }
.link-card-domain { font-size: .78rem; color: var(--bs-secondary-color); }
.link-card-title { font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.link-card-desc { font-size: .85rem; color: var(--bs-secondary-color); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (min-width: 576px) {
  .link-card:has(img) { flex-direction: row; }
  .link-card:has(img) img { width: 132px; aspect-ratio: 1; border-bottom: 0; border-right: 1px solid var(--bs-border-color); flex-shrink: 0; }
}

/* ---- Dark mode (member's choice in Settings → Appearance; signed-out visitors always get light) ---- */
/* Colours come from the design.css tokens (one palette per theme, declared there); these rules only map the base
   theme's variables and components onto them. */
[data-bs-theme=dark] {
  --bs-body-bg: var(--th-canvas); --bs-body-bg-rgb: 11, 18, 27;
  --bs-secondary-bg: var(--th-surface); --bs-tertiary-bg: var(--th-surface-2); --bs-tertiary-bg-rgb: 24, 36, 52;
  --bs-body-color: var(--th-text); --bs-body-color-rgb: 214, 222, 232;
  --bs-secondary-color: var(--th-muted); --bs-secondary-color-rgb: 159, 173, 189;
  --bs-border-color: var(--th-line);
  --bs-primary: var(--th-link); --bs-primary-rgb: 141, 188, 240; /* text/outline accent; fills use --th-primary-fill */
  --bs-link-color: var(--th-link); --bs-link-color-rgb: 141, 188, 240;
  --bs-card-bg: var(--th-surface);
  color-scheme: dark;
}
[data-bs-theme=dark] body { background: var(--bs-body-bg); }
[data-bs-theme=dark] .card, [data-bs-theme=dark] .navbar, [data-bs-theme=dark] header.header-sticky, [data-bs-theme=dark] body > header, [data-bs-theme=dark] .bottom-nav, [data-bs-theme=dark] .dropdown-menu { background-color: var(--th-surface); }
[data-bs-theme=dark] .text-body-secondary, [data-bs-theme=dark] .text-muted { color: var(--th-muted) !important; }
[data-bs-theme=dark] .badge-bullish { color: var(--th-bullish-ink) !important; } [data-bs-theme=dark] .badge-bearish { color: var(--th-bearish-ink) !important; }
[data-bs-theme=dark] .reply-highlight .stream-message { background: rgba(255,255,255,.04); }
[data-bs-theme=dark] .btn-primary { --bs-btn-bg: var(--th-primary-fill); --bs-btn-border-color: var(--th-primary-fill); --bs-btn-hover-bg: var(--th-primary-hover); --bs-btn-hover-border-color: var(--th-primary-hover); --bs-btn-active-bg: var(--th-primary-hover); }
[data-bs-theme=dark] .btn-light { --bs-btn-bg: var(--th-surface-2); --bs-btn-border-color: var(--th-line); --bs-btn-color: var(--th-text); --bs-btn-hover-bg: var(--th-line); --bs-btn-hover-color: var(--th-ink); }
[data-bs-theme=dark] .form-control, [data-bs-theme=dark] .form-select { background-color: var(--th-surface); border-color: var(--th-line-strong); color: var(--th-text); }
[data-bs-theme=dark] .composer textarea { background: transparent; }
[data-bs-theme=dark] .link-card { background: var(--th-surface); }
[data-bs-theme=dark] .cashtag-logo:not(.cashtag-monogram) { box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
[data-bs-theme=dark] .btn-outline-primary { --bs-btn-color: var(--th-link); --bs-btn-border-color: var(--th-primary-hover); --bs-btn-hover-bg: var(--th-primary-fill); --bs-btn-hover-border-color: var(--th-primary-fill); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--th-primary-fill); --bs-btn-active-color: #fff; --bs-btn-disabled-color: var(--th-link); --bs-btn-disabled-border-color: var(--th-primary-hover); }

/* Ticker hover card */
.ticker-card-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--bs-secondary-color); margin-bottom: .25rem; }
.ticker-card-section li + li { margin-top: .15rem; }
.ticker-card-top { display: block; padding: .5rem .65rem; border: 1px solid var(--bs-border-color); border-radius: .6rem; text-decoration: none; }
.ticker-card-top:hover { background: var(--bs-tertiary-bg); }

/* Mini charts. LINES are price; COLUMNS are message activity and always carry a caption.
   Activity bars: muted ink, latest bucket in the accent. Never green/red. */
.activity-bars { display: block; }
.activity-bars .bar { fill: currentColor; opacity: .45; }
.activity-bars .bar-now { fill: var(--th-ticker, #1f6fd1); }
.activity-caption { font-size: .68rem; color: var(--bs-secondary-color); margin-top: 2px; white-space: nowrap; }
.ticker-card .activity-bars { width: 100%; height: 26px; }
.trending-split { width: 96px; }
@media (min-width: 576px) { .trending-split { width: 190px; } }

/* ======================================================================
   Design + UI reviews, 28 Sep (docs/reviews/2026-09-28-*.md)
   ====================================================================== */

/* Tokens (--th-*) are declared once per theme in design.css. Base-theme neutrals that leaked warm grey into the
   navy UI are mapped onto them here. */
[data-bs-theme=dark] {
  --bs-light: var(--th-surface-2); --bs-light-rgb: 24, 36, 52;
  --bs-gray-300: var(--th-line); --bs-gray-900: var(--th-text);
  --bs-mode: var(--th-surface);
  --bs-secondary-bg-subtle: var(--th-surface-2);
  --bs-emphasis-color: var(--th-ink); --bs-heading-color: var(--th-ink);
}
.sentiment-bullish { color: var(--th-bullish-ink) !important; } .sentiment-bearish { color: var(--th-bearish-ink) !important; }
.composer .sentiment-bullish, .composer .sentiment-bearish { font-weight: 600; }
.text-brass { color: var(--th-brass-ink) !important; }
.fa-fire.text-brass, .th-brass-icon { color: var(--th-brass) !important; }
.counter-over { color: var(--th-brass-ink); font-weight: 700; }

/* Fills that carry white text */
[data-bs-theme=dark] .account-nav .nav-link.active,
[data-bs-theme=dark] .avatar-initials:not([class*="avatar-tint-"]),
[data-bs-theme=dark] .form-check-input:checked,
[data-bs-theme=dark] .dm-bubble.mine { background-color: var(--th-primary-fill) !important; border-color: var(--th-primary-fill); color: #fff; }
.dm-bubble.mine .dm-meta { opacity: 1; color: #c9d6e3; }
[data-bs-theme=dark] .btn-primary { --bs-btn-disabled-bg: var(--th-primary-fill); --bs-btn-disabled-border-color: var(--th-primary-fill); --bs-btn-disabled-opacity: .45; }
[data-bs-theme=dark] .btn-light { background: var(--th-surface-2); border-color: var(--th-line); color: var(--th-text); }
[data-bs-theme=dark] .btn-light:hover { background: var(--th-line); color: var(--th-ink); }
[data-bs-theme=dark] .table { --bs-table-bg: transparent; --bs-table-color: var(--bs-body-color); }
[data-bs-theme=dark] .bg-light { background-color: var(--th-surface-2) !important; color: var(--th-text); }

/* Brass badges: dark ink on brass (6.8:1), never white (2.7:1) */
.bg-brass { background: #D49A35 !important; color: #0f1722 !important; }
[data-bs-theme=dark] .bg-brass { background: #F0B64A !important; }

/* Placeholders: readable in light, clearly "not typed" in dark */
.form-control::placeholder { color: var(--th-placeholder); opacity: 1; }
[data-bs-theme=dark] .form-control::placeholder { color: var(--th-placeholder); }

/* Elevation in dark mode: overlays sit one step above cards */
[data-bs-theme=dark] .ticker-preview, [data-bs-theme=dark] .dropdown-menu, [data-bs-theme=dark] .typeahead-menu {
  background-color: var(--th-surface-raised); border-color: var(--th-line-raised); box-shadow: 0 12px 32px rgba(0,0,0,.55); }
[data-bs-theme=dark] .ticker-card-top { border-color: var(--th-line-raised); }

/* Switches: visible "off" state (3:1 boundary), bigger targets */
.form-switch .form-check-input:not(:checked) { border: 1.5px solid #8a96a3; }
[data-bs-theme=dark] .form-switch .form-check-input:not(:checked) { background-color: var(--th-surface); border-color: var(--th-control-border);
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239aa8b8'/%3e%3c/svg%3e"); }
.notif-table .form-switch .form-check-input { width: 2.5rem; height: 1.4rem; cursor: pointer; }
.notif-table th { white-space: nowrap; }
.notif-table .cell-toggle { display: flex; justify-content: center; padding: .5rem; margin: 0; cursor: pointer; }

/* Keyboard focus, everywhere (the base theme compiles a zero-width focus ring) */
:where(a, button, [role=button], summary, .btn, .form-control, .form-select, .form-check-input, .nav-link, .dropdown-item):focus-visible {
  outline: 2px solid var(--th-focus); outline-offset: 2px; box-shadow: none; }
.btn-check:focus-visible + .btn, .btn-check:focus-visible + label { outline: 2px solid var(--th-focus); outline-offset: 2px; }

/* "Show N new" pill: stays in view while you scroll the stream */
[data-new-posts] { position: sticky; top: 72px; z-index: 5; border: 0 !important; background: transparent; pointer-events: none; }
[data-new-posts] .btn { pointer-events: auto; box-shadow: 0 4px 12px rgba(15,23,34,.25); }
@media (max-width: 991.98px) { [data-new-posts] { top: calc(60px + env(safe-area-inset-top)); } }
.stream-message { scroll-margin-top: 84px; }

/* Message actions: one line on phones */
@media (max-width: 575.98px) {
  .post-actions { gap: .15rem !important; flex-wrap: nowrap !important; justify-content: space-between; }
  .post-actions .reaction-group { gap: .15rem !important; }
  .post-actions .ms-auto { margin-left: 0 !important; }
}

/* Link cards and image tiles */
.link-card { background: var(--th-surface); }
.link-card:hover { background: var(--th-surface-2); }
[data-bs-theme=dark] .link-card { background: var(--th-surface); }
[data-bs-theme=dark] .link-card:hover { background: var(--th-surface-raised); }
.post-media-item, .composer-thumb { position: relative; }
.post-media-item::after, .composer-thumb::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); border-radius: inherit; pointer-events: none; }
[data-bs-theme=dark] .post-media-item::after, [data-bs-theme=dark] .composer-thumb::after { box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }

/* Notices in brass, not Bootstrap yellow */
.alert-warning { --bs-alert-bg: #fbf3e2; --bs-alert-border-color: #ecd3a1; --bs-alert-color: #6e4f12; }
[data-bs-theme=dark] .alert-warning { --bs-alert-bg: rgba(200,147,49,.10); --bs-alert-border-color: rgba(217,168,71,.35); --bs-alert-color: #e0b45e; }

/* One ticker mark everywhere: round disc, logo or tinted letter */
.ticker-mark { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0;
  font-weight: 700; color: #fff; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.ticker-mark img { width: 100%; height: 100%; object-fit: contain; max-width: none; }
.ticker-mark.is-letter { box-shadow: none; }
[data-bs-theme=dark] .ticker-mark:not(.is-letter) { box-shadow: 0 0 0 1px rgba(255,255,255,.18); }

/* Trending rows: sparkline and sentiment columns never shift */
@media (min-width: 576px) { .trend-right { display: grid; grid-template-columns: 88px 190px; gap: .75rem; align-items: center; flex-shrink: 0; } }

/* Hover card meta */
.ticker-card-top .meta span { white-space: nowrap; }


/* ---------------------------------------------------------------- composer: drop, GIFs */
.composer { position: relative; }
.composer-drop-hint { display: none; }
.composer.is-dragover { outline: 2px dashed var(--bs-primary); outline-offset: -4px; background: rgba(var(--bs-primary-rgb), .04); }
.composer.is-dragover .composer-drop-hint { display: flex; align-items: center; justify-content: center; position: absolute; inset: 0; font-weight: 600; color: var(--bs-primary); pointer-events: none; }
.composer-gif-btn { font-weight: 700; font-size: .72rem; letter-spacing: .04em; }
.composer-thumb-alt { position: absolute; left: 4px; bottom: 4px; min-width: 36px; min-height: 24px; padding: 0 7px; border: 0; border-radius: 5px; background: rgba(0,0,0,.72); color: #fff; font-size: .68rem; font-weight: 700; line-height: 24px; letter-spacing: .02em; }
.composer-thumb-alt i { font-size: .6rem; margin-left: 2px; }
.composer-thumb-alt:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.composer-thumb-badge ~ .composer-thumb-alt { left: auto; right: 4px; }
.composer-thumb.has-alt .composer-thumb-alt { background: var(--th-brass, #D49A35); color: #09253B; }
.composer-alt-editor { margin-top: .5rem; padding: .6rem; border: 1px solid var(--th-line, var(--bs-border-color)); border-radius: .6rem; background: var(--th-surface-2, var(--bs-body-bg)); }
.composer-thumb-badge { position: absolute; left: 4px; bottom: 4px; padding: 0 5px; border-radius: 4px; background: rgba(0,0,0,.7); color: #fff; font-size: .65rem; font-weight: 700; }
.gif-panel { border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: .6rem; background: var(--bs-body-bg); }
.gif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; }
.gif-grid[aria-busy=true]:empty { min-height: 80px; }
.gif-option { padding: 0; border: 0; border-radius: .4rem; overflow: hidden; background: var(--bs-tertiary-bg); aspect-ratio: 4 / 3; }
.gif-option img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-option:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.giphy-attribution { font-size: .7rem; font-weight: 700; letter-spacing: .03em; color: var(--bs-secondary-color); }

/* ---------------------------------------------------------------- GIFs in the stream */
.post-media-gif { max-width: 320px; }
.post-media-gif video { width: 100%; height: auto; display: block; border-radius: .5rem; background: var(--bs-tertiary-bg); cursor: pointer; }
.giphy-credit { position: absolute; right: 6px; bottom: 6px; padding: 0 5px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff !important; font-size: .62rem; font-weight: 700; text-decoration: none; }

/* ---------------------------------------------------------------- rich embeds */
.embed-card { display: block; margin-top: .5rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; overflow: hidden; background: var(--bs-body-bg); color: inherit; text-decoration: none; max-width: 560px; }
.embed-facade { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; aspect-ratio: 16 / 9; cursor: pointer; }
.embed-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .9; display: block; }
.embed-facade .embed-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.embed-facade:hover .embed-play, .embed-facade:focus-visible .embed-play { background: var(--bs-primary); }
.embed-facade.embed-audio { aspect-ratio: auto; height: 152px; display: flex; align-items: stretch; background: var(--bs-tertiary-bg); color: inherit; text-align: left; }
.embed-facade.embed-audio img { width: 152px; height: 152px; flex: none; opacity: 1; }
.embed-facade.embed-audio .embed-play { position: static; margin: auto 1rem; flex: none; }
.embed-meta { display: block; padding: .5rem .75rem; font-size: .85rem; }
.embed-meta .embed-provider { display: block; font-size: .72rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .04em; }
.embed-meta .embed-title { display: block; font-weight: 600; }
.embed-frame { display: block; width: 100%; border: 0; margin-top: .5rem; border-radius: .75rem; max-width: 560px; }
.embed-frame.embed-video { aspect-ratio: 16 / 9; }
.embed-frame.embed-audio { height: 152px; }
.embed-frame.embed-soundcloud { height: 166px; }
.embed-quote { padding: .75rem; font-size: .9rem; }
.embed-quote blockquote { margin: .35rem 0 0; white-space: pre-line; }
.embed-chart img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.embed-facade.embed-audio .embed-meta { flex: 1; order: 1; align-self: center; }
.embed-facade.embed-audio .embed-play { order: 2; }

/* ---------------------------------------------------------------- composer $/@ suggestions */
.composer-suggest { position: absolute; z-index: 1070; left: 1rem; right: 1rem; max-width: 380px; max-height: 320px; overflow-y: auto;
  margin-top: 2px; padding: .35rem 0; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .6rem;
  box-shadow: 0 10px 30px rgba(15, 30, 50, .18); }
.composer-suggest-group { padding: .5rem .85rem .25rem; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); }
.composer-suggest-item { display: flex; align-items: center; gap: .6rem; padding: .4rem .85rem; cursor: pointer; white-space: nowrap; }
.composer-suggest-item strong { font-weight: 700; }
.composer-suggest-sub { color: var(--bs-secondary-color); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.composer-suggest-item:hover { background: var(--bs-tertiary-bg); }
.composer-suggest-item.active { background: rgba(var(--bs-primary-rgb), .12); }
.suggest-mark { width: 24px; height: 24px; flex: none; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; object-fit: cover; }
.suggest-mark img { width: 100%; height: 100%; object-fit: contain; }
.suggest-mark.is-letter { box-shadow: none; }
[data-bs-theme=dark] .composer-suggest { box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* ---------------------------------------------------------------- image viewer */
.lightbox { width: 100%; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 12, 18, .97); color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox-stage { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 4.5rem; }
.lightbox-stage img { max-width: 100%; max-height: calc(100% - 2rem); object-fit: contain; border-radius: .4rem; }
.lightbox-close { position: absolute; top: .75rem; right: 1rem; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; }
.lightbox-prev { left: 1rem; } .lightbox-next { right: 1rem; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-count { position: absolute; top: 1.1rem; left: 50%; transform: translateX(-50%); font-size: .85rem; color: rgba(255,255,255,.8); }
@media (max-width: 575.98px) { .lightbox-stage { padding: 3.5rem .5rem; } .lightbox-nav { display: none; } }

/* ---------------------------------------------------------------- logo (the Arch) */
/* --th-logo-ink / --th-logo-brass: design.css tokens. */
.th-logo { display: block; }
.th-logo .th-logo-ink, .th-logo g.th-logo-ink path { fill: var(--th-logo-ink); }
.th-logo .th-logo-brass { fill: var(--th-logo-brass); }
@media (max-width: 400px) { .navbar-brand .th-logo { height: 26px !important; } }

/* ---------------------------------------------------------------- price sparklines (a line is always price) */
/* --th-price-up / --th-price-down: design.css tokens. */
.price-line { display: inline-block; vertical-align: middle; overflow: visible; }
.price-line.price-up { color: var(--th-price-up); } .price-line.price-down { color: var(--th-price-down); }
.price-line .price-stroke { stroke: currentColor; }
.price-line .price-area { fill: currentColor; opacity: .08; }
.price-line .price-dot { fill: currentColor; }
.price-up-text { color: var(--th-price-up); } .price-down-text { color: var(--th-price-down); }
.price-caption { font-size: .68rem; color: var(--bs-secondary-color); }

/* ---------------------------------------------------------------- position disclosure, polls */
.badge-position { background: var(--bs-tertiary-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); font-weight: 600; }
.composer-position { width: auto; min-width: 7.5rem; }
.poll-editor { border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .6rem .75rem; max-width: 560px; }
.poll { max-width: 560px; }
.poll-row { position: relative; display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; margin-bottom: .25rem; border-radius: .4rem; background: var(--bs-tertiary-bg); overflow: hidden; }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: rgba(var(--bs-primary-rgb), .14); border-radius: .4rem; }
.poll-row.is-top .poll-bar { background: rgba(var(--bs-primary-rgb), .26); }
.poll-row.is-top .poll-text { font-weight: 600; }
.poll-text, .poll-pct { position: relative; }
.poll-pct { margin-left: auto; font-variant-numeric: tabular-nums; }
.scorecard { border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .6rem .8rem; max-width: 560px; }

/* ---- TradingView widgets (placeholders fill before load, so nothing jumps) ---- */
:root { --tv-h-chart: 320px; --tv-h-full: 520px; --tv-h-panel: 440px; --tv-h-profile: 380px; }
@media (max-width: 575.98px) { :root { --tv-h-chart: 260px; --tv-h-full: 440px; --tv-h-panel: 420px; --tv-h-profile: 400px; } }
.tv-widget { position: relative; display: flex; flex-direction: column; }
.tv-widget[hidden] { display: none; }
.tv-widget-body { flex: 1 1 auto; min-height: 0; }
.tv-widget .tradingview-widget-copyright { font-size: .72rem; line-height: 1.6; padding: 0 .75rem .25rem; color: var(--bs-secondary-color); }
.tv-widget .tradingview-widget-copyright a { color: inherit; }
.tv-tabs { display: flex; gap: .25rem; padding: .5rem .75rem 0; border-bottom: 1px solid var(--bs-border-color); overflow-x: auto; scrollbar-width: none; }
.tv-tabs::-webkit-scrollbar { display: none; }
.tv-tabs [role=tab] { background: none; border: 0; border-bottom: 2px solid transparent; padding: .5rem .6rem; font-size: .875rem; font-weight: 600; color: var(--bs-secondary-color); white-space: nowrap; min-height: 40px; }
.tv-tabs [role=tab][aria-selected=true] { color: var(--bs-emphasis-color); border-bottom-color: var(--th-brass, #D49A35); }
.tv-tabs [role=tab]:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.tv-note { font-size: .72rem; color: var(--bs-secondary-color); padding: .25rem .75rem .5rem; border-top: 1px solid var(--bs-border-color); }
.ticker-card-tv { margin-left: -.5rem; margin-right: -.5rem; }
.markets-grid .card { overflow: hidden; }
@media (max-width: 575.98px) { :root { --tv-h-heat: 440px; } }
.letter-bar { display: flex; flex-wrap: wrap; gap: .25rem; }
.letter-bar a { min-width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .4rem; font-weight: 600; font-size: .875rem; text-decoration: none; color: var(--bs-body-color); background: var(--bs-tertiary-bg); }
.letter-bar a.active { background: var(--th-navy); color: #fff; }
[data-bs-theme=dark] .letter-bar a.active { background: var(--th-primary-fill); }
.related-tickers { display: flex; flex-wrap: wrap; gap: .5rem; }
.related-tickers a { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border: 1px solid var(--bs-border-color); border-radius: 999px; font-size: .85rem; font-weight: 600; text-decoration: none; }
.why-point { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem; background: var(--bs-tertiary-bg); border-radius: .6rem; height: 100%; }
.why-point > i { font-size: 1.1rem; margin-top: .15rem; width: 1.25rem; text-align: center; }
.why-faq { border-top: 1px solid var(--bs-border-color); padding: .6rem 0; }
.why-faq summary { font-weight: 600; cursor: pointer; }
.quote-card { display: block; margin-top: .5rem; padding: .6rem .75rem; border: 1px solid var(--bs-border-color); border-radius: .6rem; color: inherit; text-decoration: none; }
a.quote-card:hover { background: var(--bs-tertiary-bg); }
.quote-card-text { display: block; margin-top: .15rem; white-space: pre-line; overflow-wrap: anywhere; }
.search-filters .form-control, .search-filters .form-select { font-size: 16px; }
/* The Floor rows: compact on phones (one line of detail, counts on one line, tighter rank column). */
.floor-row { gap: .625rem; padding-top: .6rem; padding-bottom: .6rem; }
.floor-row .ticker-mark, .floor-row .cashtag-logo { width: 32px !important; height: 32px !important; }
.floor-split-compact { font-size: .8rem; font-weight: 600; }
@media (max-width: 575.98px) { .floor-row .trending-split { width: 104px; } }
/* Rank sits as a small badge on the logo's top-left corner, so the logo and the bull/bear bar get the room. */
.floor-mark { position: relative; flex-shrink: 0; display: inline-flex; padding: 5px 0 0 5px; }
.floor-rank-badge { position: absolute; top: 0; left: 0; z-index: 1; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--th-navy); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bs-card-bg, #fff); }
[data-bs-theme=dark] .floor-rank-badge { background: var(--th-primary-fill); }
.floor-row:nth-child(-n+3) .floor-rank-badge { background: var(--th-brass); color: #1b1300; }
@media (min-width: 576px) { .floor-row { gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; } .floor-row .ticker-mark, .floor-row .cashtag-logo { width: 36px !important; height: 36px !important; } }

/* Floor tape: internal trending strip under the header (replaces the TradingView tape). */
.floor-tape { display: flex; align-items: stretch; height: 40px; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-body-bg); font-size: .8125rem; overflow: hidden; }
.floor-tape-label { display: flex; align-items: center; gap: .375rem; padding: 0 .75rem; font-weight: 600; white-space: nowrap; color: var(--bs-body-color); text-decoration: none; border-right: 1px solid var(--bs-border-color); flex: none; }
.floor-tape-label i { color: var(--th-brass, #D49A35); }
.floor-tape-viewport { flex: 1; overflow: hidden; min-width: 0; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.floor-tape-track { display: flex; width: max-content; height: 100%; animation: floor-tape-scroll var(--floor-tape-duration, 60s) linear infinite; }
.floor-tape:hover .floor-tape-track, .floor-tape:focus-within .floor-tape-track { animation-play-state: paused; }
.floor-tape-list { display: flex; margin: 0; padding: 0; list-style: none; }
.floor-tape-item { display: flex; align-items: center; gap: .4rem; height: 100%; padding: 0 1rem; white-space: nowrap; color: var(--bs-body-color); text-decoration: none; position: relative; }
.floor-tape-item:hover .floor-tape-sym { text-decoration: underline; }
.floor-tape-item .cashtag-logo { width: 18px; height: 18px; }
.floor-tape-sym { font-weight: 600; }
.floor-tape-price, .floor-tape-chg { font-variant-numeric: tabular-nums; }
.floor-tape-chg { font-weight: 600; }
.floor-tape-chg.is-up { color: var(--th-bullish-ink); } .floor-tape-chg.is-down { color: var(--th-bearish-ink); }
.floor-tape-people, .floor-tape-busy { color: var(--bs-secondary-color); }
.floor-tape-busy { font-style: italic; }
.floor-tape-lean { display: inline-block; width: 28px; height: 4px; border-radius: 2px; background: var(--th-bearish); overflow: hidden; }
.floor-tape-lean i { display: block; height: 100%; background: var(--th-bullish); }
@keyframes floor-tape-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 575.98px) { .floor-tape-label span { display: none; } .floor-tape-people { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .floor-tape-track { animation: none; }
  .floor-tape-viewport { overflow-x: auto; mask-image: none; }
  .floor-tape-list[aria-hidden] { display: none; }
}

/* Join prompt for signed-out readers (takes the place of more messages). */
.join-wall { position: relative; margin: 1rem 0 0; border-radius: .75rem; }
.join-wall-fade { position: absolute; left: 0; right: 0; top: -5rem; height: 5rem; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--bs-body-bg)); }
.join-wall { padding: 0 !important; }
.join-wall-body { padding: 1.75rem 1.25rem; }
.join-wall .btn { min-width: 11rem; }
@media (max-width: 575.98px) { .join-wall .btn { width: 100%; } }
