:root {
  /* EVA Brand Basics — Malachite & Slate */
  --chalk: #FAFAF8;
  --white: #FFFFFF;
  --hairline: #E3E3DE;
  --graphite: #C8C8C2;
  --ink: #0D1112;
  --slate: #465257;
  --soft: #7A848A;
  --m900: #04291B;
  --m600: #0E7A52;
  --m400: #4FB88C;
  --m200: #AEE0CB;
  --m050: #E8F5EE;
  --clay: #B4503C;

  --bg: var(--chalk);
  --card: var(--white);
  --border: var(--hairline);
  --text: var(--ink);
  --muted: var(--soft);
  --accent: var(--m600);
  --good: var(--m600);
  --warn: #8A7040;
  --bad: var(--clay);
  --radius: 0;

  --display: "Source Serif 4", Georgia, serif;
  --sans: "Inter", "Inter Variable", -apple-system, BlinkMacSystemFont, sans-serif;
  --data: "IBM Plex Mono", ui-monospace, monospace;

  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--m050);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 18px 56px;
}

header {
  margin-bottom: 20px;
}

.brand-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.brand-mark-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.brand-wordmark {
  display: block;
  height: 36px;
  width: auto;
}

.brand-wordmark-sm {
  height: 28px;
  margin-bottom: 8px;
}

.brand-product {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  padding-bottom: 2px;
}

.brand-kicker {
  font-family: var(--data);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0;
}

h1 {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  line-height: 1.2;
}

.sub {
  color: var(--slate);
  font-size: 0.875rem;
  margin: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.card h2 {
  font-family: var(--data);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--soft);
  margin: 0 0 12px;
  font-weight: 500;
}

.headline {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 0;
  margin-right: 6px;
  margin-bottom: 6px;
}

.badge-good { background: var(--m050); color: var(--good); }
.badge-warn { background: rgba(138, 112, 64, 0.12); color: var(--warn); }
.badge-bad { background: rgba(180, 80, 60, 0.12); color: var(--bad); }
.badge-none { background: rgba(122, 132, 138, 0.12); color: var(--muted); }

.spot {
  font-family: var(--data);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent);
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.metric {
  background: var(--bg);
  border-radius: 0;
  padding: 12px 14px;
}

.metric .label {
  font-family: var(--data);
  font-size: 9px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.metric .value {
  font-family: var(--data);
  font-size: 1rem;
  font-weight: 500;
}

.metric .value.pos { color: var(--good); }
.metric .value.neg { color: var(--bad); }

.ops-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ops-row input {
  flex: 1 1 160px;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.ops-row .btn {
  padding: 8px 12px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}
.ops-row .btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

.chart-img {
  width: 100%;
  max-width: 100%;
  max-height: 280px;
  height: auto;
  object-fit: contain;
  object-position: center center;
  border-radius: 0;
  display: block;
  background: var(--bg);
}

.h4-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.h4-chart {
  margin: 0;
  min-width: 0;
}

.h4-chart figcaption {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.h4-chart .chart-img {
  max-height: 320px;
}

@media (min-width: 900px) {
  .h4-charts {
    grid-template-columns: 1fr 1fr;
  }
}

ul.plain {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.plain li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

ul.plain li:last-child { border-bottom: none; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 320px;
}

th, td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-family: var(--data);
  color: var(--soft);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
}

.pos-row { color: var(--good); }
.neg-row { color: var(--bad); }

.mill-clip-hint {
  margin: -4px 0 8px;
  font-size: 0.75rem;
}

tr.mill-clip-row {
  cursor: pointer;
}

tr.mill-clip-row:hover td {
  background: rgba(13, 17, 18, 0.03);
}

tr.mill-clip-row.is-open td {
  border-bottom-color: transparent;
}

tr.mill-clip-detail-row td {
  background: rgba(13, 17, 18, 0.025);
  padding: 8px 8px 12px;
}

.mill-clip-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

.mill-clip-detail strong {
  color: var(--text);
  font-weight: 600;
}

.mill-pnl-pct {
  font-size: 0.92em;
  opacity: 0.85;
}

footer {
  margin-top: 28px;
  font-family: var(--data);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
  text-align: left;
}

a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: var(--m600); }

.macro-ignored { opacity: 0.65; }

.macro-status {
  font-size: 0.7rem;
  color: var(--muted);
  margin-right: 4px;
}

.macro-gate { color: var(--warn); font-weight: 600; }

.badge[title] {
  cursor: help;
}

.badge-macro-sev-5 { background: rgba(180, 80, 60, 0.25); color: var(--bad); }
.badge-macro-sev-4 { background: rgba(138, 112, 64, 0.25); color: var(--warn); }
.badge-macro-sev-3 { background: rgba(14, 122, 82, 0.2); color: var(--accent); }
.badge-macro-sev-2 { background: rgba(122, 132, 138, 0.2); color: var(--muted); }
.badge-macro-sev-1 { background: rgba(122, 132, 138, 0.15); color: var(--muted); }

/* A bias score still waiting on the hourly LLM refine. Inset ring instead of a
   border so the outlined badge keeps the same footprint as a refined one. */
.badge-unrefined { box-shadow: inset 0 0 0 1px rgba(122, 132, 138, 0.45); }
.bias-src {
  font-weight: 500;
  font-size: 0.85em;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* —— Trade journal —— */
.journal-card h2 {
  margin-bottom: 4px;
}

.journal-intro {
  margin: 0 0 14px;
}

.journal-subhead {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 16px 0 8px;
}

.journal-subhead:first-of-type {
  margin-top: 4px;
}

.trade-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
}

.trade-card {
  display: block;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}

.trade-card.is-open,
.trade-card.is-open > .trade-summary,
.trade-card.is-open > .trade-body {
  background: var(--bg);
}

.trade-card.trade-live {
  border-color: rgba(14, 122, 82, 0.55);
  box-shadow: 0 0 0 1px rgba(14, 122, 82, 0.12);
}

.trade-card.trade-archived {
  opacity: 0.88;
}

/* Button toggle — no native <details> marker.
   Button itself is the flex row (nested flex inside <button> is unreliable). */
.trade-summary {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.trade-summary:focus,
.trade-summary:active,
.trade-summary:hover {
  background: var(--bg);
  color: var(--text);
}

.trade-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.trade-body[hidden] {
  display: none !important;
}

.trade-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
}

.trade-title-text {
  line-height: 1.2;
}

.trade-chevron {
  color: var(--muted);
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: transform 0.15s ease;
  line-height: 1;
}

.trade-card.is-open > .trade-summary .trade-chevron {
  transform: rotate(90deg);
}

.trade-summary-main {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.trade-badges {
  display: block;
  margin-bottom: 4px;
  text-align: left;
}

.trade-prices,
.trade-pnl,
.trade-meta {
  display: block;
  text-align: left;
}

.badge-live {
  background: var(--m050);
  color: var(--accent);
}

.trade-prices {
  font-family: var(--data);
  font-weight: 500;
  font-size: 0.95rem;
}

.trade-pnl {
  font-family: var(--data);
  font-weight: 500;
  font-size: 1rem;
  margin-top: 2px;
}

.trade-pnl-pct {
  font-weight: 500;
  font-size: 0.85rem;
  opacity: 0.9;
}

.trade-meta {
  margin-top: 2px;
}

.trade-thumb-wrap {
  display: block;
  flex: 0 0 88px;
  width: 88px;
  height: 56px;
  margin-top: 2px;
  margin-left: auto;
  overflow: hidden;
  border-radius: 0;
  background: var(--card);
  border: 1px solid var(--border);
}

.trade-thumb-wrap .trade-thumb {
  display: block;
  width: 88px;
  max-width: none;
  height: 56px;
  max-height: none;
  object-fit: cover;
  object-position: left center;
  border: 0;
  border-radius: 0;
}

.trade-body {
  padding: 0 14px 14px;
  background: var(--bg);
  border-top: none;
}

.trade-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 12px 0;
  max-width: 100%;
}

.trade-case-study {
  margin: 12px 0 8px;
}

.trade-case-study .chart-img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center top;
  background: var(--ink);
  border-radius: 0;
  border: 1px solid var(--border);
}

.trade-case-study figcaption {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.trade-chart {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.trade-chart .chart-img {
  width: 100%;
  height: 200px;
  max-height: none;
  object-fit: cover;
  object-position: left center;
}

.trade-chart figcaption {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.levels-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 10px;
}

.levels-strip .level {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 10px;
  min-width: 72px;
}

.levels-strip .label {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.levels-strip .value {
  font-size: 0.85rem;
  font-weight: 600;
}

.trade-distances {
  margin: 0 0 10px;
}

.trade-tags {
  margin-bottom: 10px;
}

.rationale h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 600;
}

.rationale p {
  margin: 0;
  font-size: 0.9rem;
  white-space: pre-wrap;
  line-height: 1.55;
}

.trade-cycles {
  margin: 12px 0 0;
}

.journal-archived {
  opacity: 0.95;
}

@media (min-width: 600px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
  h1 { font-size: 1.7rem; }
  .brand-wordmark { height: 42px; }
  .brand-product { font-size: 1.55rem; }
}

img.zoomable {
  cursor: zoom-in;
}

.chart-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13, 17, 18, 0.72);
  cursor: zoom-out;
}

.chart-lightbox[hidden] {
  display: none !important;
}

.chart-lightbox-img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: default;
}

.chart-lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: var(--card);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.chart-lightbox-close:hover {
  background: var(--border);
}

body.lightbox-open {
  overflow: hidden;
}

@media (min-width: 900px) {
  .trade-charts {
    grid-template-columns: 1fr 1fr;
  }

  .trade-thumb-wrap {
    flex-basis: 120px;
    width: 120px;
    height: 72px;
  }

  .trade-thumb-wrap .trade-thumb {
    width: 120px;
    height: 72px;
  }

  .chart-img {
    max-height: 300px;
  }

  .trade-chart .chart-img {
    height: 220px;
    max-height: none;
  }
}

.load-more { margin-top: 12px; background: transparent; border: 1px solid rgba(122, 132, 138, 0.35); color: var(--text); border-radius: 0; padding: 8px 14px; cursor: pointer; }
.load-more:disabled { opacity: 0.5; cursor: default; }

/* Intelligence Hub tabs */
.hub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0;
}
.hub-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--soft);
  border-radius: 0;
  padding: 10px 14px;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: var(--data);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.hub-tab:hover { color: var(--ink); }
.hub-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--m600);
  background: transparent;
}
.sleeve-jump { cursor: pointer; }
.sleeve-jump:hover { outline: 1px solid var(--border); }
.stance-table td, .stance-table th { text-align: center; }
.stance-table td:first-child, .stance-table th:first-child { text-align: left; }
.stance-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 0;
  font-family: var(--data);
  font-size: 0.72rem;
  border: 1px solid var(--border);
}
.stance-bullish { color: var(--good); border-color: rgba(14, 122, 82, 0.45); background: var(--m050); }
.stance-bearish { color: var(--bad); border-color: rgba(180, 80, 60, 0.45); background: rgba(180, 80, 60, 0.08); }
.stance-neutral, .stance-none { color: var(--muted); }
.funding-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* —— Marked structure board (Brain tab) —— */
.structure-row + .structure-row { margin-top: 18px; }

.structure-product {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.structure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 720px) {
  .structure-grid { grid-template-columns: 1fr; }
}

.structure-chart {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  background: var(--bg);
}

.structure-chart figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
}

.structure-tf {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.structure-chart img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

/* —— News desk (Brain tab + Eva Trades macro monitor) —— */
.news-feed {
  width: 100%;
  max-height: 620px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Section headers inside a scrolling feed (Active / Recent ingested). */
.news-section {
  margin: 0;
  padding: 8px 14px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.news-empty {
  margin: 0;
  padding: 12px 14px;
}

.news-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.news-item:last-child { border-bottom: none; }
.news-item:hover { background: rgba(14, 122, 82, 0.05); }

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

.news-source {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-left: 2px;
}
.news-when { white-space: nowrap; }
.news-age {
  margin-left: auto;
  white-space: nowrap;
  opacity: 0.85;
}

.news-title {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

a.news-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

.news-blurb {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.cycle-plot-wrap { margin-top: 14px; }
#brain-cycle-plot {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}
.cycle-plot-hint { margin-top: 6px; font-size: 0.75rem; }
.cycle-phases, .cycle-static { margin-top: 14px; }
.cycle-phases summary, .cycle-static summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 4px 0;
}
.cycle-phases summary:hover, .cycle-static summary:hover { color: var(--text); }
.seg-up { color: var(--good); }
.seg-down { color: var(--bad); }

.feed-wrap { max-width: 720px; }
.feed-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.feed-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-family: var(--data);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}
.feed-live {
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(14, 122, 82, 0.7);
  animation: feed-pulse 1.8s ease-out infinite;
}
@keyframes feed-pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 122, 82, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(14, 122, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 122, 82, 0); }
}
.feed-session { text-align: right; min-width: 160px; }
.feed-session .sub { margin: 4px 0 0; }
.feed-metrics { grid-template-columns: repeat(3, 1fr); }
.feed-status { min-height: 1.2em; margin: 0 0 8px; }
.feed-card-hq {
  border-color: rgba(138, 112, 64, 0.45);
}
.feed-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.feed-title {
  font-size: 1.05rem;
  margin: 8px 0 4px;
}
.feed-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--muted);
}
.feed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.feed-accept, .feed-reject {
  padding: 8px 14px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.feed-accept { border-color: rgba(14, 122, 82, 0.45); color: var(--good); }
.feed-reject { border-color: rgba(180, 80, 60, 0.35); color: var(--bad); }
.feed-accept:hover, .feed-reject:hover { background: var(--card); }
.feed-new { animation: feed-in 0.35s ease-out; }
@keyframes feed-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .feed-session { text-align: left; }
  .feed-metrics { grid-template-columns: 1fr 1fr; }
}

/* —— Trade ladder state (shared journal cards) —— */
.tp-pips {
  display: block;
  margin: 2px 0 6px;
}

.tp-pip {
  display: inline-block;
  margin: 0 6px 4px 0;
  padding: 2px 8px;
  border-radius: 0;
  border: 1px solid rgba(122, 132, 138, 0.35);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: help;
}

.tp-pip.is-hit {
  border-color: rgba(14, 122, 82, 0.5);
  background: rgba(14, 122, 82, 0.16);
  color: var(--good);
}

/* A trailed stop is risk that has already been taken off the table, so it
   reads as information rather than a warning. */
.tp-pip.pip-stop {
  border-color: rgba(14, 122, 82, 0.5);
  background: rgba(14, 122, 82, 0.14);
  color: var(--accent);
  text-transform: none;
}

.levels-strip .level-note {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  color: var(--muted);
}

.levels-strip .level-note.pos { color: var(--good); }
.levels-strip .level-note.neg { color: var(--bad); }
.levels-strip .value.pos { color: var(--good); }
.levels-strip .value.neg { color: var(--bad); }

.levels-strip .level-tp-hit {
  border-color: rgba(14, 122, 82, 0.45);
  background: rgba(14, 122, 82, 0.08);
}

.levels-strip .level-trailed {
  border-color: rgba(14, 122, 82, 0.45);
  background: rgba(14, 122, 82, 0.08);
}

.exit-legs {
  margin: 0 0 12px;
}

.exit-legs h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 600;
}

.exit-legs li {
  font-size: 0.82rem;
}

/* —— Investor view (/investors) —— */
.inv-header { margin-bottom: 18px; }

.inv-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 6px;
}

.inv-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--data);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}

/* Coinbase-style whole-account margin usage pill (top corner). */
.inv-acct-health {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px;
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: var(--data);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.inv-acct-health strong {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.inv-acct-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: rgba(122, 132, 138, 0.6);
}

.inv-acct-health.band-good .inv-acct-dot { background: var(--good); }
.inv-acct-health.band-good strong { color: var(--good); }
.inv-acct-health.band-warn .inv-acct-dot { background: var(--warn); }
.inv-acct-health.band-warn strong { color: var(--warn); }
.inv-acct-health.band-bad { border-color: rgba(180, 80, 60, 0.6); }
.inv-acct-health.band-bad .inv-acct-dot { background: var(--bad); }
.inv-acct-health.band-bad strong { color: var(--bad); }

.inv-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.inv-nav { margin: 0 0 14px; }
.inv-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.inv-range {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 3px;
}
.inv-range-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--data);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 0;
  cursor: pointer;
}
.inv-range-btn.is-on {
  background: var(--ink);
  color: var(--chalk);
  box-shadow: none;
}
.inv-nav-delta {
  font-family: var(--data);
  font-size: 0.85rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.inv-nav-delta.pos { color: var(--good); }
.inv-nav-delta.neg { color: var(--bad); }
#inv-nav-svg {
  width: 100%;
  height: 148px;
  display: block;
}
.inv-nav-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
}

.inv-hero-cell {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 14px 16px;
}

.inv-hero-cell .label {
  font-family: var(--data);
  font-size: 9px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 4px;
}

/* Deliberately oversized: the brief was that a reader answers "how is it
   doing" in about two seconds, without reading a table. */
.inv-hero-cell .value {
  font-family: var(--data);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.inv-hero-cell .value.pos { color: var(--good); }
.inv-hero-cell .value.neg { color: var(--bad); }

.inv-note {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

.inv-note.pos { color: var(--good); }
.inv-note.neg { color: var(--bad); }

.inv-footnote {
  margin: 12px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.inv-health-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inv-health-figure {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.inv-health-value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 12px;
  border-radius: 0;
  font-variant-numeric: tabular-nums;
}

.inv-health-caption {
  font-size: 0.82rem;
  color: var(--muted);
}

.inv-health-bar {
  position: relative;
  height: 10px;
  border-radius: 0;
  background: rgba(122, 132, 138, 0.18);
  overflow: hidden;
}

.inv-health-fill {
  display: block;
  height: 100%;
  border-radius: 0;
  transition: width 0.4s ease;
}

.inv-health-fill.band-good { background: var(--good); }
.inv-health-fill.band-warn { background: var(--warn); }
.inv-health-fill.band-bad { background: var(--bad); }
.inv-health-fill.band-none { background: rgba(122, 132, 138, 0.4); }

.inv-day-scroll {
  max-height: 420px;
  overflow-y: auto;
}

.inv-day-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}

.inv-day-scroll tfoot th {
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  text-transform: none;
  color: var(--text);
}

@media (min-width: 700px) {
  .inv-hero-grid { grid-template-columns: repeat(4, 1fr); }
  .inv-health-top { flex-direction: row; align-items: center; gap: 20px; }
  .inv-health-bar { flex: 1 1 auto; }
}



