:root {
  --bg: #f4f4f1;
  --paper: #ffffff;
  --ink: #1e1f1c;
  --soft-ink: #5f635c;
  --muted: #9a9d96;
  --line: #e6e6e0;
  --line-strong: #d7d7cf;
  --chip: #f0f0ec;
  --red: #b5372e;
  --red-soft: #f5dfdc;
  --green: #138255;
  --green-soft: #dff1e7;
  --gold: #a97814;
  --gold-soft: #f5ecd6;
  --blue: #596b9c;
  --blue-soft: #e7ebf5;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

p,
b,
strong,
span,
h1,
h2,
h3,
li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page {
  display: grid;
  grid-template-columns: 326px minmax(390px, 720px) minmax(260px, 1fr);
  gap: 24px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.drawer,
.right-panel {
  position: sticky;
  top: 22px;
  height: calc(100dvh - 44px);
  overflow: auto;
}

.drawer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
}

.drawer-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.logo-mark::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

.drawer-brand strong {
  display: block;
  letter-spacing: -0.03em;
}

.drawer-brand span,
.search-box span,
.tiny,
.muted {
  color: var(--muted);
}

.language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f7f3;
}

.lang-button {
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--soft-ink);
  background: transparent;
  cursor: pointer;
}

.lang-button.active {
  color: #fff;
  background: #151614;
}

.search-box {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

.drawer-nav {
  display: grid;
  gap: 8px;
}

.drawer-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 13px;
  background: #f7f7f3;
  border: 1px solid transparent;
}

.drawer-nav a:hover {
  border-color: var(--line-strong);
}

.drawer-title,
.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  margin-bottom: 10px;
}

.source-list {
  display: grid;
  gap: 8px;
}

.source-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}

.source-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.source-item.selected {
  border-color: #181915;
  box-shadow: inset 0 0 0 1px #181915;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--soft-ink);
  font-family: var(--mono);
  font-weight: 800;
  font-size: 11px;
}

.source-item strong {
  display: block;
  font-size: 13px;
}

.source-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.mini-alert {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--red);
}

.phone {
  min-height: 100dvh;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 24px 90px rgba(34, 34, 28, 0.08);
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.app-title {
  min-width: 0;
  text-align: center;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-title span {
  color: var(--gold);
}

.app-title-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  vertical-align: -3px;
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
}

.app-title-mark::before,
.app-title-mark::after {
  content: "";
  position: absolute;
}

.app-title-mark::before {
  content: "K";
  position: static;
  height: auto;
  background: transparent;
}

.app-title-mark::after {
  right: -3px;
  bottom: -3px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
}

.appbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 52px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafaf7;
  color: var(--soft-ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.appbar-action:first-child {
  justify-self: start;
}


.surface {
  padding: 26px;
  border-bottom: 1px solid var(--line);
}

.is-hidden {
  display: none !important;
}

.agent-status {
  background: #fbfbf8;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.agent-grid div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.agent-grid span,
.agent-stack span {
  color: var(--muted);
  font-size: 11px;
}

.agent-grid b {
  font-size: 14px;
  line-height: 1.25;
}

.agent-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  align-items: center;
}

.agent-stack b {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--soft-ink);
  font-size: 11px;
}

.agent-candidate-list {
  display: grid;
  gap: 10px;
}

.agent-candidate-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafaf7;
}

.agent-candidate-card.hot_but_fit,
.agent-candidate-card.too_hot {
  border-color: #e8b8b2;
  background: #fff8f7;
}

.agent-candidate-card.quiet_high_fit {
  border-color: #e9d6a8;
  background: #fffdf8;
}

.candidate-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.candidate-topline h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 20px;
}

.candidate-topline p {
  margin: 5px 0 0;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.35;
}

.candidate-layers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.candidate-layers span {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--soft-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.score-line {
  display: grid;
  gap: 6px;
}

.score-line div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.score-line b {
  color: var(--ink);
}

.score-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ecece7;
}

.score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.score-line.heat .score-track i {
  background: var(--red);
}

.score-line.fit .score-track i {
  background: var(--green);
}

.candidate-next {
  display: grid;
  gap: 5px;
  padding-top: 2px;
}

.candidate-next span {
  color: var(--muted);
  font-size: 11px;
}

.candidate-next b {
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.4;
}

.empty-state {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  background: #fafaf7;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2,
.profile-name h1 {
  margin: 0;
  letter-spacing: -0.05em;
}

.section-head h2 {
  font-size: 23px;
}

.section-head p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 18px;
  align-items: start;
}

.profile-name,
.signal-card > *,
.activity-card > *,
.queue-card > *,
.sector-card > * {
  min-width: 0;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, #fff 0 16%, #e8e4ec 17% 42%, #cfc7d5 43% 58%, #151415 59%);
  border: 1px solid var(--line);
}

.profile-name h1 {
  font-size: 32px;
  line-height: 1;
}

.handle {
  color: var(--muted);
  margin-top: 6px;
}

.follow-button,
.lens-button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: default;
}

.follow-button {
  color: #fff;
  background: #151614;
}

.lens-button {
  display: inline-flex;
  margin-top: 22px;
  background: #111;
  color: #fff;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--soft-ink);
  background: var(--chip);
  font-size: 13px;
  line-height: 1;
  white-space: normal;
}

.chip.red {
  color: var(--red);
  background: var(--red-soft);
}

.chip.green {
  color: var(--green);
  background: var(--green-soft);
}

.chip.gold {
  color: var(--gold);
  background: var(--gold-soft);
}

.chip.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 26px;
}

.source-detail-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.source-detail-box {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafaf7;
}

.source-detail-box span {
  color: var(--muted);
  font-size: 12px;
}

.source-detail-box b {
  display: block;
  max-width: 100%;
  white-space: normal;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.source-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-link-list a,
.fund-snapshot a {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.source-link-list a:hover,
.fund-snapshot a:hover {
  border-color: #171814;
}

.card-source-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.card-source-link:hover {
  border-color: #171814;
}

.methodology-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fbfbf8;
}

.methodology-head {
  display: grid;
  gap: 6px;
}

.methodology-head span,
.methodology-box span,
.methodology-examples > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.methodology-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.methodology-head p,
.methodology-box p,
.methodology-examples p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.52;
}

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

.methodology-box {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.methodology-box ul,
.methodology-box ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--soft-ink);
  line-height: 1.45;
}

.methodology-examples {
  display: grid;
  gap: 8px;
}

.methodology-examples div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.methodology-examples b {
  color: var(--red);
  font-family: var(--mono);
}

.methodology-deep {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.fund-snapshot {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.fund-snapshot h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.fund-snapshot p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.52;
}

.fund-snapshot ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--soft-ink);
  line-height: 1.45;
}

.methodology-deep > span,
.methodology-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.methodology-principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.methodology-principles article,
.methodology-evidence div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafaf7;
}

.methodology-principles b,
.methodology-evidence b {
  color: var(--ink);
  font-size: 13px;
}

.methodology-principles p,
.methodology-evidence p,
.methodology-note {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.5;
}

.methodology-checklist,
.methodology-evidence {
  display: grid;
  gap: 7px;
  margin: 0;
}

.methodology-checklist {
  padding-left: 20px;
  color: var(--soft-ink);
  line-height: 1.45;
}

.methodology-evidence {
  grid-template-columns: 1fr 1fr;
}

.methodology-note {
  padding: 0 2px;
}

.profile-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.profile-shortcuts a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -0.05em;
}

.stat-value.red {
  color: var(--red);
}

.stock-list {
  display: grid;
  gap: 14px;
}

.signal-list {
  display: grid;
  gap: 10px;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fafaf7;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.signal-card {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fafaf7;
}

.signal-card-rich {
  grid-template-columns: 1fr;
}

.signal-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.signal-title-row h3 {
  margin: 0;
}

.signal-main {
  display: grid;
  gap: 8px;
}

.signal-layers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.signal-tickers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.signal-layers button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff;
  color: var(--soft-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 850;
}

.signal-logic {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.signal-logic div {
  display: grid;
  gap: 4px;
}

.signal-logic span {
  color: var(--muted);
  font-size: 11px;
}

.signal-logic b {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.42;
}

.signal-card h3 {
  margin: 9px 0 0;
  font-family: var(--mono);
  font-size: 20px;
}

.signal-card p {
  margin: 6px 0 0;
  color: var(--soft-ink);
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.signal-card > .chip,
.queue-card > .chip {
  justify-self: start;
}

.activity-list,
.queue-list,
.sector-list {
  display: grid;
  gap: 10px;
}

.activity-card,
.queue-card,
.sector-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fafaf7;
}

.activity-card {
  grid-template-columns: 96px 1fr;
}

.queue-card {
  grid-template-columns: 92px 1fr auto;
  align-items: start;
}

.activity-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  padding-top: 4px;
}

.activity-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.activity-card p,
.queue-card p {
  margin: 8px 0;
  color: var(--soft-ink);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.activity-next {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.activity-next span {
  color: var(--muted);
  font-size: 11px;
}

.activity-next b {
  font-size: 13px;
  line-height: 1.35;
}

.queue-card h3 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 20px;
}

.sector-card h3 {
  margin: 0 0 9px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.sector-card p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.55;
}

.stock-row {
  display: grid;
  grid-template-columns: 72px 1fr 148px;
  gap: 14px;
  align-items: center;
}

.stock-row-detailed {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.stock-row-detailed:last-child {
  border-bottom: 0;
}

.ticker {
  font-family: var(--mono);
  color: var(--red);
  font-weight: 850;
  font-size: 18px;
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #ececea;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.stock-counts {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.stock-counts strong {
  color: var(--red);
}

.stock-counts em {
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}

.stock-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.stock-meta button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff;
  color: var(--soft-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 850;
}

.stock-logic {
  grid-column: 2 / 4;
  margin: -4px 0 0;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.layer-table {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.layer-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.layer-note {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafaf7;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.45;
}

.layer-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--soft-ink);
  background: #fafaf7;
  cursor: pointer;
}

.layer-tab.active {
  border-color: #171815;
  color: #fff;
  background: #171815;
}

.layer-row {
  display: grid;
  grid-template-columns: 54px 1fr 90px;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.layer-row.linked {
  cursor: pointer;
}

.layer-row.linked:hover,
.layer-row.selected {
  background: #fffaf0;
}

.layer-row.selected {
  box-shadow: inset 3px 0 0 var(--gold);
}

.layer-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.layer-row:last-child {
  border-bottom: 0;
}

.layer-row.strong {
  background: var(--gold-soft);
}

.layer-code {
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 800;
}

.layer-linked {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.layer-linked span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.layer-linked div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.layer-linked b {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--soft-ink);
  font-family: var(--mono);
  font-size: 11px;
}

.stars {
  color: var(--gold);
  text-align: right;
  font-weight: 850;
}

.comment-list {
  display: grid;
  gap: 14px;
}

.comment-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
}

.time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  padding-top: 4px;
}

.comment-body {
  border-left: 4px solid #20201d;
  padding-left: 14px;
  line-height: 1.62;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 800;
}

.map-card,
.event-card,
.dormant-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: #fff;
}

.map-card.selected {
  border-color: #171814;
  box-shadow: inset 0 0 0 2px #171814;
}

.map-card + .map-card,
.event-card + .event-card,
.dormant-card + .dormant-card {
  margin-top: 16px;
}

.map-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.level {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 5px 8px;
  color: #fff;
  background: var(--blue);
  font-family: var(--mono);
  font-weight: 850;
}

.source-faces {
  display: flex;
  justify-content: flex-end;
}

.source-faces .avatar {
  width: 28px;
  height: 28px;
  margin-left: -7px;
  border: 2px solid #fff;
}

.chip-legend {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fafaf7;
}

.map-layer-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.map-layer-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: #fafaf7;
  color: var(--soft-ink);
  font-size: 12px;
  font-weight: 800;
}

.map-layer-tab.active {
  border-color: #171814;
  background: #171814;
  color: #fff;
}

.chip-legend-item {
  display: grid;
  grid-template-columns: 28px 54px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--soft-ink);
  font-size: 13px;
}

.legend-chip-sample {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
}

.legend-chip-sample.red {
  border-color: #e8b8b2;
  background: var(--red-soft);
}

.legend-chip-sample.green {
  border-color: #b6dfcc;
  background: var(--green-soft);
}

.legend-chip-sample.gold {
  border-color: #e9d6a8;
  background: var(--gold-soft);
}

.legend-chip-sample.border {
  border-color: #171814;
  box-shadow: inset 0 0 0 2px #171814;
}

.legend-chip-sample.gray {
  background: #eeeeea;
}

.layer-headline {
  margin-top: 7px;
  color: var(--soft-ink);
  font-size: 13px;
  line-height: 1.45;
}

.method-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.method-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  background: #fafaf7;
}

.method-card strong {
  display: block;
  font-size: 15px;
}

.method-card p {
  margin: 6px 0 11px;
  color: var(--soft-ink);
  line-height: 1.45;
}

.method-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.method-split div {
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
}

.method-split span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}

.method-split b {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.ticker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.ticker-chip {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: #fff;
  color: #666963;
}

.ticker-chip.bull,
.ticker-chip.red {
  color: var(--red);
  background: var(--red-soft);
  border-color: #e8b8b2;
}

.ticker-chip.gold {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: #e9d6a8;
}

.ticker-chip.bear {
  color: var(--green);
  background: var(--green-soft);
  border-color: #b6dfcc;
}

.ticker-chip.focus {
  box-shadow: inset 0 0 0 2px #171814;
}

.ticker-chip-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.ticker-chip-head strong {
  font-family: var(--mono);
  font-size: 17px;
  color: var(--ink);
}

.ticker-chip-head span,
.ticker-chip-status {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--soft-ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
}

.ticker-chip-status {
  color: inherit;
}

.ticker-chip-meta {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px 7px;
  font-size: 11px;
  line-height: 1.35;
}

.ticker-chip-meta span {
  color: var(--muted);
}

.ticker-chip-meta b {
  color: var(--ink);
}

.event-card {
  display: grid;
  gap: 12px;
}

.event-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.event-title h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.event-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--soft-ink);
  font-weight: 750;
}

.dormant-card {
  display: grid;
  gap: 10px;
}

.dormant-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dormant-head h3 {
  margin: 0;
  font-size: 22px;
  font-family: var(--mono);
}

.reason-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--soft-ink);
}

.brief-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  margin-bottom: 16px;
}

.decision-card h2 {
  margin: 8px 0 6px;
  font-size: 22px;
  line-height: 1.1;
}

.decision-card p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.45;
}

.daily-signal-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.daily-signal {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.daily-signal:first-child {
  border-top: 0;
  padding-top: 0;
}

.daily-signal strong {
  display: block;
  margin: 3px 0 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.daily-signal .time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.decision-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.decision-meta span,
.decision-stats span {
  color: var(--muted);
  font-size: 11px;
}

.decision-meta b,
.decision-stats b {
  font-size: 13px;
}

.decision-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.decision-stats div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.decision-stats b {
  font-size: 22px;
  font-family: var(--mono);
  color: var(--ink);
}

.decision-links {
  display: grid;
  gap: 8px;
}

.decision-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.decision-links a::after {
  content: ">";
  color: var(--muted);
  font-family: var(--mono);
}

.layer-mini-list {
  display: grid;
  gap: 7px;
}

.layer-mini-list span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbf8;
  color: var(--soft-ink);
  font-size: 12px;
  font-weight: 750;
}

.decision-legend {
  display: grid;
  gap: 9px;
}

.decision-legend div {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--soft-ink);
  font-size: 13px;
}

.brief-card ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--soft-ink);
  margin-top: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red {
  background: var(--red);
}

.dot.green {
  background: var(--green);
}

.dot.black {
  background: #111;
}

.dot.gold {
  background: var(--gold);
}

@media (max-width: 1180px) {
  .page {
    grid-template-columns: 280px minmax(390px, 1fr);
  }

  .right-panel {
    display: none;
  }
}

@media (max-width: 820px) {
  .page {
    display: block;
    padding: 0;
  }

  .drawer {
    position: static;
    height: auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    gap: 14px;
  }

  .drawer-section {
    display: none;
  }

  .drawer-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 3px;
  }

  .drawer-nav a,
  .drawer-nav button.layer-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    padding: 10px 8px;
    width: auto;
    min-width: 70px;
  }

  .phone {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .profile-row,
  .stock-row,
  .signal-card,
  .activity-card,
  .queue-card,
  .comment-card {
    grid-template-columns: 1fr;
  }

  .follow-button {
    justify-self: start;
  }

  .surface,
  .chips,
  .source-detail-box,
  .signal-card,
  .activity-card,
  .queue-card,
  .sector-card {
    max-width: 100%;
  }

  .source-link-list a,
  .fund-snapshot a,
  .card-source-link {
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
  }

  .stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .agent-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ticker-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .surface {
    padding: 22px 18px;
  }

  .profile-row {
    gap: 14px;
  }

  .stats {
    gap: 12px;
  }

  .agent-grid {
    grid-template-columns: 1fr;
  }

  .candidate-topline {
    display: grid;
    grid-template-columns: 1fr;
  }

  .candidate-topline .chip {
    justify-self: start;
  }

  .stat-value {
    font-size: 23px;
  }

  .layer-row {
    grid-template-columns: 44px 1fr 76px;
    padding: 12px;
  }

  .ticker-grid {
    grid-template-columns: 1fr;
  }

  .method-split {
    grid-template-columns: 1fr;
  }

  .methodology-grid,
  .methodology-examples div,
  .methodology-principles,
  .methodology-evidence {
    grid-template-columns: 1fr;
  }

  .stock-counts {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .stock-logic {
    grid-column: 1;
  }
}

/* Clean app overrides */
.stock-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 150px;
  gap: 14px;
  align-items: start;
}

.stock-name {
  display: grid;
  gap: 6px;
}

.stock-name strong {
  font-family: var(--mono);
  font-size: 17px;
}

.stock-name span {
  color: var(--muted);
  font-size: 12px;
}

.stock-logic {
  display: grid;
  gap: 6px;
}

.stock-logic b {
  color: var(--ink);
}

.stock-logic p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.5;
}

.stock-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.drawer-nav button.layer-tab {
  width: 100%;
  justify-content: center;
}

.source-item {
  width: 100%;
  text-align: left;
}

.profile-avatar.avatar {
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 820px) {
  .stock-row {
    grid-template-columns: 1fr;
  }

  .stock-counts {
    justify-content: flex-start;
  }

  .page,
  .phone,
  .surface,
  .methodology-panel,
  .methodology-box,
  .source-detail-grid,
  .source-detail-box,
  .fund-snapshot,
  .signal-card,
  .stock-row,
  .activity-card,
  .queue-card,
  .map-card {
    min-width: 0;
    max-width: 100%;
  }

  .page {
    width: 100%;
    overflow: hidden;
  }

  .drawer-nav button.layer-tab {
    flex: 0 0 auto;
    width: auto;
    min-width: 78px;
    white-space: nowrap;
  }

  .profile-name .chips,
  .source-link-list,
  .signal-tickers,
  .signal-layers,
  .layer-switch {
    min-width: 0;
    max-width: 100%;
  }

  .source-detail-box b,
  .methodology-head p,
  .methodology-box p,
  .fund-snapshot p,
  .stock-logic p,
  .queue-card p {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
