:root {
  --bg: #050608;
  --panel: #0c0e10;
  --panel2: #11161a;
  --line: #2f3c42;
  --line2: #465963;
  --text: #c8d0d2;
  --muted: #718087;
  --green: #00ff88;
  --red: #ff3355;
  --amber: #ffaa00;
  --blue: #00aaff;
  --purple: #b889ff;
  --page-gutter: clamp(3px, .35vw, 8px);
  --page-max: 2520px;
  --font-ui: "Cascadia Mono", "Consolas", "SFMono-Regular", "Roboto Mono", "Liberation Mono", monospace;
  --font-brand: "Segoe UI Variable Display", "Segoe UI", "Inter Tight", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
}

body {
  overflow-x: hidden;
}

body.steam-client {
  --page-gutter: clamp(2px, .25vw, 6px);
  --page-max: 2720px;
}

button, input, select, textarea { font: inherit; }

button {
  border: 1px solid var(--line2);
  border-radius: 0;
  background: #070a0d;
  color: var(--blue);
  min-height: 28px;
  padding: 4px 8px;
  cursor: pointer;
  text-transform: uppercase;
}

button:hover:not(:disabled) { background: #0d1b23; border-color: var(--blue); }
button:disabled { color: #4d5960; cursor: not-allowed; }
button.danger { color: var(--red); }
button.active { color: #06100b; background: var(--green); border-color: var(--green); }
button.action-pending,
button[aria-busy="true"] {
  border-color: rgba(0, 255, 136, .72);
  color: var(--green);
  background: rgba(0, 255, 136, .06);
  box-shadow: 0 0 12px rgba(0, 255, 136, .10);
  pointer-events: none;
}

.desktop-exit-game {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 92px;
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  white-space: nowrap;
  border-color: rgba(255, 51, 85, .8);
  background: rgba(255, 51, 85, .08);
  color: #ff5b7d;
  box-shadow: 0 0 12px rgba(255, 51, 85, .10);
  animation: none !important;
  opacity: 1;
  transform: translateZ(0);
  contain: layout paint;
}

#econosquare-desktop-exit-game,
#econosquare-desktop-shell-exit-game {
  position: static !important;
  margin: 0 !important;
  transform: none !important;
}

.desktop-exit-game:hover:not(:disabled) {
  border-color: var(--red);
  background: rgba(255, 51, 85, .16);
  color: #ff8aa1;
}

.desktop-exit-game:disabled {
  color: #7a4452;
  opacity: .72;
}

.order-preview.pending {
  border-color: rgba(0, 170, 255, .62);
  background: rgba(0, 170, 255, .045);
}

.auth-exit-game {
  margin-top: 8px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line2);
  border-radius: 0;
  background: #070a0d;
  color: var(--blue);
  min-height: 28px;
  padding: 4px 8px;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
}

.button-link:hover {
  background: #0d1b23;
  border-color: var(--blue);
}

input, select, textarea {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #020303;
  color: var(--text);
  padding: 4px 6px;
}

textarea { min-height: 120px; resize: vertical; }
label { display: grid; gap: 4px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #172026; padding: 4px 5px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
tr:hover { background: #11181d; }

.good { color: var(--green); }
.bad { color: var(--red); }
.warn { color: var(--amber); }
.amber { color: var(--amber); }
.blue { color: var(--blue); }
.purple { color: var(--purple); }
.muted { color: var(--muted); }

.sub-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 13px;
  margin-left: 4px;
  padding: 0 4px;
  border: 1px solid rgba(0, 255, 136, .58);
  background: rgba(0, 255, 136, .08);
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(0, 255, 136, .09);
}

.failure-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 14px;
  margin-left: 5px;
  padding: 0 4px;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, .035);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(255, 79, 104, .08);
}

.player-link {
  --player-link-color: var(--green);
  display: inline;
  color: var(--player-link-color);
  font: inherit;
  font-weight: 800;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dotted rgba(0, 255, 136, .36);
}

.player-link:hover,
.player-link:focus-visible {
  color: var(--green);
  border-bottom-color: var(--green);
  text-shadow: 0 0 10px rgba(0, 255, 136, .28);
  outline: none;
}

.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  border: 1px solid rgba(0, 170, 255, .55);
  color: var(--blue);
  background: rgba(0, 170, 255, .055);
  font-size: 10px;
  line-height: 1;
  cursor: help;
  vertical-align: text-top;
  z-index: 5;
}

.info-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  width: min(340px, 72vw);
  transform: translate(-50%, -4px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid #1d4c57;
  background: rgba(4, 8, 10, .97);
  color: var(--text);
  padding: 8px 9px;
  text-align: left;
  text-transform: none;
  white-space: normal;
  line-height: 1.35;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 18px rgba(0, 170, 255, .10);
  transition: opacity .12s ease, transform .12s ease;
  display: none;
}

.info-tip:hover::after,
.info-tip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.info-tip-popup {
  position: fixed;
  z-index: 100000;
  max-width: min(360px, calc(100vw - 28px));
  border: 1px solid #1d4c57;
  background: rgba(4, 8, 10, .98);
  color: var(--text);
  padding: 8px 9px;
  text-align: left;
  text-transform: none;
  white-space: normal;
  line-height: 1.35;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .52), 0 0 18px rgba(0, 170, 255, .13);
  pointer-events: none;
}

.info-tip-popup[hidden] {
  display: none;
}

.desk-helper-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 6px 0;
  color: var(--muted);
  font-size: 11px;
}

.desk-helper-strip span {
  min-width: 0;
}

.start {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.start-card {
  width: min(980px, 100%);
  border: 1px solid var(--line2);
  background: #080b0d;
  padding: 18px;
}

.brand-logo {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.start-logo {
  width: min(760px, 100%);
  margin: 8px 0 14px;
}

.header-logo {
  width: min(230px, 38vw);
  height: 38px;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.auth-start {
  place-items: center;
}

.auth-start-layout {
  display: grid;
  width: min(1360px, 100%);
  grid-template-columns: minmax(760px, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.auth-menu-card {
  width: 100%;
}

.auth-access-rail {
  display: grid;
  gap: 10px;
}

.access-teaser-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.access-teaser-card,
.access-page-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid #173f46;
  background: #051014;
  color: var(--text);
  text-decoration: none;
}

.access-teaser-card:hover,
.access-page-card:hover {
  border-color: var(--green);
  background: #07181d;
}

.access-teaser-card img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  display: block;
  opacity: .82;
}

.access-status {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 1px solid var(--green);
  background: rgba(0, 20, 14, .88);
  color: var(--green);
  padding: 3px 7px;
  text-transform: uppercase;
  font-size: 10px;
}

.access-teaser-meta {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border-top: 1px solid #173f46;
}

.access-teaser-meta b,
.access-page-card b {
  color: var(--green);
  font-size: 13px;
}

.access-teaser-meta small,
.access-page-card small {
  color: var(--blue);
}

.access-teaser-meta em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.35;
  font-size: 11px;
}

.terminal {
  width: min(var(--page-max), calc(100vw - (var(--page-gutter) * 2)));
  min-height: 100vh;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
}

.header {
  border-bottom: 1px solid var(--line2);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(0, 2fr);
  gap: 12px;
  background: #07090b;
}

.title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: var(--red);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: .2; } }

.header-meta, .toolbar, .tabs, .policy-tabs, .save-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.header-meta > span {
  border-left: 1px solid var(--line);
  padding-left: 8px;
}

.donation-link,
.discord-link,
.radio-link,
.forum-mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.radio-link {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.donation-link:hover,
.discord-link:hover,
.radio-link:hover,
.forum-mini-link:hover {
  color: var(--green);
}

.radio-link.is-off {
  color: var(--blue);
}

.radio-link.is-on {
  color: var(--green);
}

.radio-link:focus-visible {
  outline: 1px solid var(--green);
  outline-offset: 3px;
}

.header-meta .donation-link {
  margin-left: auto;
  border-left: 1px solid var(--line);
  padding-left: 8px;
}

.header-discord,
.header-radio {
  border-left: 1px solid var(--line);
  padding-left: 8px;
  min-height: 22px;
}

.entity-wallet-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 6px;
  max-width: min(820px, 72vw);
}

.entity-wallet-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid #18313a;
  background: rgba(0, 18, 22, 0.72);
  color: var(--muted);
  padding: 3px 7px;
  font-size: 10px;
  white-space: nowrap;
}

.entity-wallet-chip b {
  color: var(--text);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-wallet-chip.personal b {
  color: var(--green);
}

.entity-wallet-chip.company b,
.entity-wallet-chip.bank b,
.entity-wallet-chip.holding b {
  color: var(--blue);
}

.entity-wallet-chip small {
  color: var(--muted);
}

.auth-service-links {
  display: grid;
  gap: 7px;
  align-content: start;
  justify-items: start;
  margin: 10px 0 12px;
}

.auth-service-link,
.auth-donation {
  width: fit-content;
}

.auth-mail-warning {
  margin: 8px 0 0;
  padding: 6px 7px;
  border-left: 2px solid var(--amber);
  color: var(--muted);
  background: rgba(255, 183, 0, 0.06);
  line-height: 1.35;
}

.paypal-icon,
.discord-icon,
.radio-icon,
.forum-icon {
  display: block;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  max-width: 18px !important;
  max-height: 18px !important;
  object-fit: contain;
  flex: 0 0 18px;
}

.radio-icon {
  position: relative;
  border: 1px solid rgba(156, 188, 194, 0.55);
  background: rgba(156, 188, 194, 0.10);
}

.radio-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 5px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
  opacity: .85;
}

.radio-icon::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.radio-link.is-on .radio-icon {
  border-color: rgba(0, 255, 136, 0.85);
  background: rgba(0, 255, 136, 0.14);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.22);
}

.header-meta .server-clock {
  margin-left: 0;
  color: var(--amber);
}

.rom-market-time {
  border-color: rgba(255, 170, 0, 0.28) !important;
  background: rgba(255, 170, 0, 0.045);
}

.toolbar { margin-top: 7px; }

.toolbar .button-link {
  font-size: 11px;
  min-height: 28px;
}

.steam-client .header {
  grid-template-columns: minmax(520px, .95fr) minmax(0, 1.6fr);
}

.steam-client .toolbar {
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.steam-client .toolbar > * {
  flex: 0 0 auto;
}

.alert-banner {
  border-bottom: 1px solid var(--line);
  padding: 6px 10px;
  color: var(--amber);
  background: #120f05;
  min-height: 30px;
}

.alert-banner.critical {
  color: var(--red);
  background: #17070b;
}

.layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1.12fr) minmax(680px, 1.92fr) minmax(360px, 1.08fr);
  gap: 1px;
  background: var(--line);
}

.panel {
  min-width: 0;
  overflow: auto;
  background: var(--panel);
  padding: 10px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.metric-grid, .commodity-grid, .debug-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tile, .section-table, .tool-row, .news-row, .role-card {
  border: 1px solid #1f2c32;
  background: var(--panel2);
  padding: 7px;
}

.guided-focus {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 1px rgba(0, 255, 135, .42), 0 0 22px rgba(0, 255, 135, .16);
  animation: guidedFocus 3.4s ease-out 1;
}

@keyframes guidedFocus {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 255, 135, .28), 0 0 12px rgba(0, 255, 135, .12); }
  22%, 62% { box-shadow: 0 0 0 2px rgba(0, 255, 135, .64), 0 0 28px rgba(0, 255, 135, .24); }
}

.user-profile {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.avatar-large,
.avatar-account-button {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line2);
  background: #020303;
  display: grid;
  place-items: center;
}

.avatar-account-button {
  padding: 3px;
  color: var(--blue);
  text-transform: uppercase;
  gap: 1px;
  align-content: center;
}

.avatar-account-button span {
  font-size: 9px;
  line-height: 1;
  transform: translateY(1px);
}

.avatar-large svg,
.avatar-account-button svg,
.avatar-choice svg {
  image-rendering: pixelated;
  display: block;
}

.steam-avatar-img {
  display: block;
  object-fit: cover;
  image-rendering: auto;
}

.social-profile-avatar .steam-avatar-img {
  width: 100%;
  height: 100%;
}

.avatar-account-button .steam-avatar-img {
  width: 54px;
  height: 54px;
}

.forum-avatar .steam-avatar-img {
  width: 38px;
  height: 38px;
}

.forum-identity .forum-avatar .steam-avatar-img {
  width: 42px;
  height: 42px;
}

.avatar-account-button .steam-avatar-img,
.social-profile-avatar .steam-avatar-img,
.forum-avatar .steam-avatar-img {
  border: 1px solid rgba(0, 255, 135, .26);
  background: #020303;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 52px);
  gap: 6px;
  margin-top: 6px;
}

.avatar-choice {
  width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 2px;
  display: grid;
  place-items: center;
}

.xp-bar {
  height: 9px;
  border: 1px solid var(--line);
  background: #020303;
  margin: 5px 0 3px;
}

.xp-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.contract-progress span {
  background: linear-gradient(90deg, var(--amber), var(--green));
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.mini-stat-grid span {
  border: 1px solid #172026;
  padding: 5px;
  color: var(--muted);
}

.mini-stat-grid b { color: var(--text); }

.compact-user-card,
.wallet-quick-panel,
.world-pulse-panel,
.market-focus-panel {
  margin-top: 8px;
}

.compact-user-card {
  display: grid;
  gap: 7px;
}

.compact-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallet-row {
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
  align-items: end;
}

.wallet-balances {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-self: end;
  padding-bottom: 5px;
}

.wallet-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.disclosure-panel {
  border: 1px solid #1f2c32;
  background: var(--panel2);
  margin-top: 8px;
}

.disclosure-head {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: #0b1114;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  text-align: left;
}

.disclosure-panel.is-open .disclosure-head {
  border-bottom-color: #1f2c32;
}

.disclosure-arrow,
.disclosure-title,
.disclosure-meta {
  min-width: 0;
}

.disclosure-arrow {
  color: var(--green);
  text-align: center;
}

.disclosure-title {
  color: var(--blue);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disclosure-meta {
  color: var(--muted);
  font-size: 11px;
  text-transform: none;
}

.disclosure-body {
  padding: 7px;
}

.disclosure-body > .section-table:first-child {
  margin-top: 0 !important;
  border: 0;
  background: transparent;
  padding: 0;
}

.disclosure-body .progression-box:first-child {
  margin-top: 0;
}

.market-focus-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.market-pulse-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.market-pulse-strip span,
.market-movers div {
  border: 1px solid #172026;
  background: #071012;
  padding: 6px;
  min-width: 0;
}

.market-pulse-strip span {
  color: var(--muted);
}

.market-pulse-strip b {
  display: block;
  margin-top: 2px;
}

.market-movers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.market-movers div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
}

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

.market-movers em {
  font-style: normal;
}

.market-focus-card {
  min-width: 0;
  min-height: 86px;
  display: grid;
  gap: 2px;
  align-content: start;
  text-align: left;
  background: #071012;
}

.market-focus-card.active {
  border-color: var(--green);
  background: #07140e;
}

.market-focus-card span,
.market-focus-card em,
.market-focus-card small {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.market-focus-card b,
.market-focus-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-focus-card strong {
  color: var(--text);
  font-size: 13px;
}

.market-focus-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-stack {
  display: grid;
  gap: 8px;
}

.auth-stack,
.recovery-form,
.account-settings-grid {
  display: grid;
  gap: 7px;
}

.auth-recovery {
  margin-top: 8px;
  border-top: 1px solid #172026;
  padding-top: 7px;
}

.recovery-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.account-settings-panel {
  border: 1px solid #244a58;
  background: #061014;
  margin-top: 8px;
  padding: 7px;
  display: grid;
  gap: 7px;
}

.account-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.progression-box {
  border: 1px solid #172026;
  background: #090d10;
  margin-top: 8px;
  padding: 7px;
}

.progression-box h4 {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 12px;
}

.progression-box p {
  margin: 5px 0;
}

.skill-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.skill-panel-head h3,
.skill-atlas-topbar h2,
.skill-atlas-detail h3 {
  margin: 0;
  color: var(--green);
  letter-spacing: 0;
}

.skill-branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.skill-branch-card {
  min-height: 64px;
  text-align: left;
  display: grid;
  gap: 3px;
  border-color: #173f46;
  background: #061014;
  text-transform: none;
}

.skill-branch-card b {
  color: var(--blue);
}

.skill-branch-card.available,
.skill-branch-card.has-ready {
  border-color: rgba(0, 255, 136, .46);
  background:
    linear-gradient(90deg, rgba(0,255,136,.10), transparent 48%),
    #061014;
  box-shadow: 0 0 13px rgba(0,255,136,.07);
}

.skill-branch-card.training,
.skill-branch-card.has-training {
  border-color: rgba(0, 170, 255, .42);
  background:
    linear-gradient(90deg, rgba(0,170,255,.10), transparent 48%),
    #061014;
}

.skill-branch-card.completed,
.skill-branch-card.complete {
  border-color: rgba(0, 255, 136, .68);
  background:
    linear-gradient(90deg, rgba(0,255,136,.14), rgba(0,255,136,.03) 58%, transparent),
    #061014;
}

.skill-branch-card.available b,
.skill-branch-card.has-ready b,
.skill-branch-card.completed b,
.skill-branch-card.complete b {
  color: var(--green);
}

.skill-branch-card span,
.skill-branch-card small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-recommend-grid {
  display: grid;
  gap: 7px;
}

.skill-recommend-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid #172026;
  background: #060b0e;
  padding: 6px;
}

.skill-recommend-card.available {
  border-color: rgba(0, 255, 136, .62);
  background:
    linear-gradient(90deg, rgba(0,255,136,.14), rgba(0,255,136,.035) 62%, transparent),
    #060b0e;
  box-shadow: 0 0 16px rgba(0,255,136,.08), inset 3px 0 0 rgba(0,255,136,.52);
}

.skill-recommend-card.training {
  border-color: rgba(0, 170, 255, .58);
  background:
    linear-gradient(90deg, rgba(0,170,255,.13), rgba(0,170,255,.03) 62%, transparent),
    #060b0e;
  box-shadow: inset 3px 0 0 rgba(0,170,255,.45);
}

.skill-recommend-card.locked {
  opacity: .76;
}

.skill-recommend-card.available > div > b {
  color: var(--green);
}

.skill-recommend-card.training > div > b {
  color: var(--blue);
}

.skill-recommend-state {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border: 1px solid rgba(36, 74, 88, .75);
  background: rgba(3, 6, 8, .75);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.skill-recommend-card.available .skill-recommend-state {
  border-color: rgba(0,255,136,.56);
  color: var(--green);
}

.skill-recommend-card.training .skill-recommend-state {
  border-color: rgba(0,170,255,.56);
  color: var(--blue);
}

.skill-recommend-card p,
.skill-action-row small {
  margin: 2px 0;
  color: var(--muted);
  line-height: 1.25;
}

.skill-node-mini {
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-color: #173f46;
  color: var(--blue);
}

.skill-node-mini.completed {
  color: var(--green);
  border-color: rgba(0,255,136,.82);
  background: rgba(0,255,136,.08);
  box-shadow: 0 0 13px rgba(0,255,136,.12);
}

.skill-node-mini.training {
  color: var(--blue);
  border-color: rgba(0,170,255,.72);
  background: rgba(0,170,255,.07);
}

.skill-node-mini.available {
  color: var(--green);
  border-color: rgba(0,255,136,.72);
  background: rgba(0,255,136,.07);
  box-shadow: 0 0 14px rgba(0,255,136,.16);
}

.skill-node-mini.locked { color: var(--muted); border-color: #263239; }

.skill-action-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.skill-action-row.available {
  padding: 3px;
  border: 1px solid rgba(0,255,136,.30);
  background: rgba(0,255,136,.045);
}

.skill-action-row.training {
  padding: 3px;
  border: 1px solid rgba(0,170,255,.26);
  background: rgba(0,170,255,.04);
}

.skill-action-row b,
.skill-action-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-atlas-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(0, 0, 0, .84);
  padding: 12px;
}

.skill-atlas-shell {
  height: 100%;
  border: 1px solid #244a58;
  background:
    radial-gradient(circle at 15% 15%, rgba(0, 255, 136, .10), transparent 24%),
    radial-gradient(circle at 80% 25%, rgba(0, 170, 255, .08), transparent 26%),
    #05080a;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
  gap: 7px;
  padding: 10px;
  box-shadow: 0 0 28px rgba(0, 255, 136, .08);
}

.skill-atlas-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #172026;
  padding-bottom: 6px;
}

.skill-atlas-topbar p {
  margin: 2px 0 0;
  color: var(--muted);
}

.skill-atlas-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.skill-atlas-filters button {
  flex: 0 0 auto;
  min-height: 26px;
  font-size: 11px;
}

.skill-atlas-filters.compact button {
  min-width: 70px;
}

.skill-atlas-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #173f46;
  background: #030608;
  color: var(--muted);
  white-space: nowrap;
}

.skill-atlas-legend b {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.legend-green { color: var(--green); background: var(--green); }
.legend-blue { color: var(--blue); background: var(--blue); }
.legend-amber { color: var(--amber); background: var(--amber); }
.legend-purple { color: var(--purple); background: var(--purple); }
.legend-ready { color: var(--green); background: var(--green); }
.legend-done {
  color: var(--green);
  background: var(--green);
  outline: 2px solid rgba(255,255,255,.65);
}
.legend-training { color: var(--blue); background: var(--blue); }
.legend-locked { color: #5d6870; background: #5d6870; box-shadow: none !important; }

.skill-atlas-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid #172026;
  background: rgba(3, 6, 8, .72);
  padding: 5px;
}

.skill-atlas-status-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid rgba(36, 74, 88, .72);
  background: rgba(5, 12, 15, .86);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
}

.skill-atlas-status-strip b {
  color: var(--text);
}

.skill-atlas-status-strip .ready {
  border-color: rgba(0,255,136,.50);
  color: var(--green);
}

.skill-atlas-status-strip .done {
  border-color: rgba(0,255,136,.42);
}

.skill-atlas-status-strip .training {
  border-color: rgba(0,170,255,.46);
  color: var(--blue);
}

.skill-atlas-status-strip .locked {
  opacity: .72;
}

.skill-atlas-tools {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid #172026;
  background: rgba(3, 6, 8, .72);
  padding: 5px;
}

.skill-atlas-search {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  min-width: min(460px, 100%);
}

.skill-atlas-search input {
  min-width: 260px;
  height: 28px;
}

.skill-atlas-center {
  margin-left: auto;
  min-width: 72px;
}

.skill-atlas-planner {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 1.2fr auto;
  gap: 7px;
  align-items: stretch;
}

.skill-atlas-planner > div {
  min-width: 0;
  border: 1px solid #173f46;
  background: rgba(5, 12, 15, .88);
  padding: 6px 7px;
}

.skill-atlas-planner span,
.skill-atlas-planner small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.skill-atlas-planner span {
  font-size: 10px;
  text-transform: uppercase;
}

.skill-atlas-planner b {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.skill-atlas-planner-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.skill-atlas-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 42%);
  gap: 10px;
}

.skill-atlas-body-wide {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.skill-atlas-map {
  min-height: 0;
  overflow: auto;
  border: 1px solid #172026;
  background:
    linear-gradient(rgba(0,170,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,.035) 1px, transparent 1px),
    #030608;
  background-size: 34px 34px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  align-content: start;
  gap: 9px;
}

.skill-network-map {
  display: block;
  padding: 0;
  position: relative;
  cursor: grab;
  overscroll-behavior: contain;
  scrollbar-color: #244a58 #030608;
}

.skill-network-map.is-panning {
  cursor: grabbing;
  user-select: none;
}

.skill-network-canvas {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(0,255,136,.10), transparent 16%),
    radial-gradient(circle at 20% 22%, rgba(184,137,255,.07), transparent 19%),
    radial-gradient(circle at 82% 72%, rgba(255,170,0,.055), transparent 17%),
    #030608;
}

.skill-network-stage {
  position: relative;
}

.skill-network-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.skill-link {
  stroke: rgba(190, 210, 215, .12);
  stroke-width: .9;
  vector-effect: non-scaling-stroke;
}

.skill-link.cross {
  stroke: rgba(180, 190, 196, .14);
  stroke-width: .8;
}

.skill-link.related {
  stroke: rgba(0, 170, 255, .16);
  stroke-dasharray: 4 6;
}

.skill-link.path {
  stroke: rgba(0, 255, 136, .13);
}

.skill-link.hot {
  stroke: rgba(255, 255, 255, .58);
  stroke-width: 1.9;
}

.skill-link.search-hot {
  stroke: rgba(0, 170, 255, .72);
  stroke-width: 1.8;
}

.skill-link.prereq-hot {
  stroke: rgba(255, 170, 0, .78);
  stroke-width: 2;
}

.skill-link.dimmed {
  stroke-opacity: .18;
}

.skill-cluster-label {
  position: absolute;
  z-index: 2;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(200, 208, 210, .58);
  border: 1px solid rgba(36, 74, 88, .55);
  background: rgba(3, 6, 8, .72);
  padding: 3px 6px;
  font-size: 10px;
  text-transform: uppercase;
  pointer-events: none;
}

.skill-orb {
  position: absolute;
  z-index: 4;
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--skill-color);
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,.75), transparent 12%),
    radial-gradient(circle at 50% 54%, var(--skill-color), rgba(0,0,0,.42) 72%);
  color: #06100b;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  text-transform: none;
  box-shadow: 0 0 12px var(--skill-glow), inset 0 0 10px rgba(0,0,0,.48);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, opacity .16s ease;
}

.skill-orb span {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(255,255,255,.34);
}

.skill-orb i {
  max-width: 42px;
  margin-top: -7px;
  color: rgba(255,255,255,.86);
  font-size: 6px;
  font-style: normal;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.65);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-orb:hover,
.skill-orb:focus-visible {
  z-index: 12;
  transform: scale(1.34);
  filter: saturate(1.2) brightness(1.14);
  box-shadow: 0 0 26px var(--skill-glow), 0 0 0 5px rgba(255,255,255,.06), inset 0 0 10px rgba(0,0,0,.40);
}

.skill-orb.selected {
  z-index: 9;
  transform: scale(1.18);
  outline: 2px solid rgba(255,255,255,.72);
  box-shadow: 0 0 30px var(--skill-glow), 0 0 0 6px rgba(255,255,255,.06);
}

.skill-orb.neighbor:not(.selected) {
  box-shadow: 0 0 20px var(--skill-glow), inset 0 0 10px rgba(0,0,0,.48);
}

.skill-orb.search-hit {
  outline: 2px solid rgba(0, 170, 255, .82);
  box-shadow: 0 0 28px rgba(0,170,255,.34), 0 0 0 5px rgba(0,170,255,.06), inset 0 0 10px rgba(0,0,0,.48);
}

.skill-orb.search-neighbor {
  box-shadow: 0 0 20px rgba(0,170,255,.22), inset 0 0 10px rgba(0,0,0,.48);
}

.skill-orb.prereq-node {
  outline: 2px solid rgba(255, 170, 0, .88);
  box-shadow: 0 0 26px rgba(255,170,0,.30), 0 0 0 5px rgba(255,170,0,.06), inset 0 0 10px rgba(0,0,0,.48);
}

.skill-orb.dimmed {
  opacity: .22;
}

.skill-orb.locked {
  opacity: .42;
  filter: grayscale(.38) brightness(.72);
}

.skill-orb.completed {
  border-width: 3px;
  border-color: var(--green);
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,.82), transparent 13%),
    radial-gradient(circle at 50% 54%, rgba(0,255,136,.98), rgba(0,70,38,.74) 72%);
  box-shadow: 0 0 24px rgba(0,255,136,.32), 0 0 0 4px rgba(0,255,136,.08), inset 0 0 10px rgba(0,0,0,.35);
}

.skill-orb.completed::before {
  content: "DONE";
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  padding: 1px 4px;
  border: 1px solid rgba(0,255,136,.65);
  background: rgba(3, 6, 8, .92);
  color: var(--green);
  font-size: 6px;
  line-height: 1;
  box-shadow: 0 0 10px rgba(0,255,136,.16);
}

.skill-orb.completed i {
  color: rgba(255,255,255,.94);
}

.skill-orb.training {
  border-color: var(--blue);
  box-shadow: 0 0 22px var(--skill-glow), 0 0 0 4px rgba(0,170,255,.08), inset 0 0 10px rgba(0,0,0,.48);
}

.skill-orb.startable {
  cursor: pointer;
  border-color: var(--green);
  filter: saturate(1.2) brightness(1.07);
  box-shadow: 0 0 20px rgba(0,255,136,.26), 0 0 0 5px rgba(0,255,136,.08), inset 0 0 10px rgba(0,0,0,.40);
  animation: skillReadyPulse 2.8s ease-in-out infinite;
}

.skill-orb.startable::after {
  content: "GO";
  position: absolute;
  right: -8px;
  bottom: -4px;
  min-width: 16px;
  height: 12px;
  padding: 1px 3px 0;
  border-radius: 999px;
  background: var(--green);
  border: 1px solid rgba(255,255,255,.72);
  color: #02120a;
  font-size: 6px;
  font-weight: 900;
  line-height: 10px;
  box-shadow: 0 0 12px rgba(0,255,136,.72);
}

@keyframes skillReadyPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(0,255,136,.22), 0 0 0 4px rgba(0,255,136,.06), inset 0 0 10px rgba(0,0,0,.48); }
  50% { box-shadow: 0 0 28px rgba(0,255,136,.40), 0 0 0 7px rgba(0,255,136,.10), inset 0 0 10px rgba(0,0,0,.48); }
}

.skill-orb-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) scale(.92);
  width: 290px;
  display: none;
  border: 1px solid #244a58;
  background: rgba(5, 8, 10, .96);
  color: var(--text);
  padding: 8px;
  text-align: left;
  font-style: normal;
  line-height: 1.35;
  box-shadow: 0 0 24px rgba(0,0,0,.65), 0 0 18px var(--skill-glow);
  pointer-events: none;
}

.skill-orb-tip b,
.skill-orb-tip small,
.skill-orb-tip strong,
.skill-orb-tip u {
  display: block;
}

.skill-orb-tip b {
  color: var(--skill-color);
  margin-bottom: 3px;
}

.skill-orb-tip small {
  color: var(--muted);
  margin-bottom: 5px;
}

.skill-orb-tip strong {
  color: var(--text);
  margin-bottom: 5px;
  font-size: 11px;
}

.skill-orb-tip u {
  color: var(--amber);
  margin-top: 6px;
  text-decoration: none;
  font-size: 10px;
  text-transform: uppercase;
}

.skill-orb:hover .skill-orb-tip,
.skill-orb:focus-visible .skill-orb-tip {
  display: block;
}

.skill-node {
  min-height: 78px;
  padding: 8px;
  display: grid;
  gap: 4px;
  text-align: left;
  text-transform: none;
  border-color: #173f46;
  background: rgba(5, 12, 15, .92);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.015);
}

.skill-node span {
  color: var(--muted);
  font-size: 10px;
}

.skill-node b {
  color: var(--text);
  line-height: 1.16;
}

.skill-node small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-node.completed { border-color: rgba(0,255,136,.58); }
.skill-node.training { border-color: rgba(0,170,255,.75); box-shadow: 0 0 12px rgba(0,170,255,.10); }
.skill-node.available { border-color: rgba(255,170,0,.70); }
.skill-node.locked { opacity: .72; }
.skill-node.selected { background: rgba(0, 255, 136, .08); outline: 1px solid var(--green); }

.skill-atlas-detail {
  min-height: 0;
  overflow: auto;
  border: 1px solid #244a58;
  background: #071014;
  padding: 10px;
}

.skill-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.skill-detail-meta span {
  border: 1px solid #173f46;
  background: #030608;
  color: var(--muted);
  padding: 3px 6px;
}

@media (max-width: 900px) {
  .skill-atlas-overlay { padding: 8px; }
  .skill-atlas-body { grid-template-columns: 1fr; }
  .skill-atlas-detail { max-height: 40vh; }
  .skill-action-row { grid-template-columns: 1fr; }
  .skill-atlas-planner { grid-template-columns: 1fr; }
  .skill-atlas-search input { min-width: 160px; }
  .skill-atlas-center { margin-left: 0; }
  .news-radar-map { min-height: 280px; }
  .news-radar-hub { width: 118px; min-height: 118px; }
  .news-radar-timeline-item { grid-template-columns: 62px 34px 1fr; }
  .market-loop-grid,
  .signal-option-grid { grid-template-columns: 1fr; }
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.market-loop-panel {
  display: grid;
  gap: 8px;
}

.market-loop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 8px;
}

.market-loop-card {
  border: 1px solid #173f46;
  background: linear-gradient(180deg, rgba(7, 16, 20, .96), rgba(5, 8, 10, .96));
  padding: 8px;
  display: grid;
  gap: 6px;
}

.market-loop-card p {
  margin: 0;
  line-height: 1.35;
}

.signal-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.signal-chip-row span {
  border: 1px solid rgba(0, 170, 255, .28);
  background: rgba(0, 170, 255, .06);
  color: var(--text);
  padding: 3px 6px;
  font-size: 10px;
}

.signal-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr));
  gap: 6px;
}

.signal-option {
  min-height: 64px;
  display: grid;
  gap: 2px;
  align-content: center;
  text-align: left;
  border-color: rgba(255, 170, 0, .35);
  background: rgba(255, 170, 0, .045);
}

.signal-option:hover:not(:disabled) {
  border-color: rgba(0, 255, 136, .70);
  background: rgba(0, 255, 136, .065);
}

.signal-option span,
.signal-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.activity-card,
.mission-card {
  border: 1px solid #172026;
  background: #090d10;
  padding: 7px;
  display: grid;
  gap: 5px;
}

.activity-card div {
  display: grid;
  gap: 2px;
}

.activity-card p,
.mission-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.guided-news-card {
  border-color: #244a58;
  background: #071014;
}

.guided-news-preview {
  border: 1px solid #173f46;
  background: #050b0d;
  padding: 6px;
}

.guided-news-preview span {
  font-size: 10px;
}

.guided-news-preview b {
  color: var(--text);
}

.capstone-desk {
  border: 1px solid #2a4d42;
  background:
    linear-gradient(135deg, rgba(0, 255, 136, .055), rgba(0, 170, 255, .035)),
    #06100f;
  margin-top: 9px;
  padding: 9px;
  display: grid;
  gap: 8px;
}

.capstone-desk > p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.capstone-module-strip,
.capstone-eligibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 6px;
}

.capstone-module-strip span,
.capstone-eligibility-card {
  border: 1px solid #1e4a3d;
  background: rgba(0, 255, 136, .055);
  padding: 6px;
  min-width: 0;
}

.capstone-module-strip span {
  color: var(--green);
  font-size: 11px;
}

.capstone-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.capstone-action-row {
  border: 1px solid #17343d;
  background: rgba(0, 170, 255, .045);
  padding: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto);
  gap: 8px;
  align-items: center;
}

.capstone-action-row p {
  margin: 3px 0 0;
  line-height: 1.35;
}

.capstone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 7px;
}

.capstone-grid .section-table,
.capstone-eligibility-card {
  overflow-wrap: anywhere;
}

.capstone-challenge-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.capstone-eligibility-card {
  display: grid;
  gap: 4px;
}

.capstone-eligibility-card span {
  color: var(--muted);
  font-size: 11px;
}

.capstone-eligibility-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.mission-progress {
  height: 8px;
  border: 1px solid var(--line);
  background: #020303;
}

.mission-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--green));
}

.mission-objectives {
  display: grid;
  gap: 4px;
}

.mission-objectives span {
  position: relative;
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
  border: 1px solid #172026;
  background: #050809;
  padding: 3px 4px 5px;
}

.mission-objectives i {
  display: block;
  height: 2px;
  background: var(--blue);
}

.mission-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.network-desk-panel {
  display: grid;
  gap: 8px;
}

.network-topline,
.contact-strip,
.mail-columns,
.network-request-row,
.network-actions {
  display: grid;
  gap: 6px;
}

.network-topline {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  align-items: stretch;
}

.network-topline span,
.contact-strip span,
.network-request-row,
.mail-item {
  border: 1px solid #172026;
  background: #071012;
  padding: 6px;
  min-width: 0;
}

.network-topline b,
.contact-strip b {
  color: var(--text);
}

.network-request-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 6px;
  align-items: end;
}

.network-request-stack {
  display: grid;
  gap: 6px;
}

.network-request-stack h3,
.mail-columns h3 {
  margin: 0;
}

.network-request-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.network-actions {
  grid-template-columns: repeat(2, auto);
}

.contact-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-strip small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-mail-form {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(0, 1fr);
  gap: 6px;
}

.desk-mail-form label:nth-child(3),
.desk-mail-form button {
  grid-column: 1 / -1;
}

.desk-mail-form textarea {
  min-height: 76px;
}

.mail-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mail-list {
  display: grid;
  gap: 6px;
}

.mail-item {
  color: var(--muted);
}

.mail-item.unread {
  border-color: var(--blue);
}

.mail-item.client-contract-mail {
  border-color: rgba(255, 181, 71, .72);
  background: #130d05;
}

.mail-item.client-contract-mail.unread {
  border-color: var(--amber);
  box-shadow: inset 3px 0 0 var(--amber);
}

.mail-item.client-contract-mail summary b {
  color: var(--amber);
}

.mail-item.player-mail {
  border-color: rgba(0, 255, 135, .58);
  background: #06100b;
}

.mail-item.player-mail.unread {
  border-color: var(--green);
  box-shadow: inset 3px 0 0 var(--green);
}

.mail-item.player-mail summary b {
  color: var(--green);
}

.mail-contract-badge {
  display: inline-block;
  margin-right: 6px;
  color: var(--amber);
  font-style: normal;
  font-size: 10px;
}

.mail-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  cursor: pointer;
  color: var(--text);
}

.mail-item summary b,
.mail-item summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-item p {
  white-space: pre-wrap;
  line-height: 1.35;
}

.mail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
}

.lobby-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482600;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 22% 18%, rgba(0, 255, 136, .08), transparent 26%),
    rgba(0, 0, 0, .76);
}

.lobby-overlay-shell {
  width: min(980px, calc(100vw - 44px));
  height: min(680px, calc(100vh - 52px));
  min-height: 420px;
  border: 1px solid #1c5963;
  background:
    linear-gradient(180deg, rgba(6, 19, 23, .98), rgba(2, 7, 8, .98)),
    #020708;
  box-shadow: 0 0 26px rgba(0, 255, 136, .08), 0 0 0 1px rgba(0, 170, 255, .08) inset;
  overflow: hidden;
}

.lobby-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #0a5f67;
  background: #031011;
  padding: 8px;
}

.lobby-head,
.lobby-feed-title,
.lobby-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lobby-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.lobby-head-actions span {
  color: var(--muted);
  font-size: 11px;
}

.lobby-head h3,
.lobby-head p,
.lobby-feed-title b,
.lobby-feed-title span {
  margin: 0;
}

.lobby-head p,
.lobby-feed-title span {
  color: var(--muted);
  line-height: 1.35;
}

.lobby-grid {
  display: grid;
  grid-template-columns: minmax(170px, .34fr) minmax(0, 1fr);
  gap: 8px;
  min-height: 310px;
}

.lobby-channels,
.lobby-feed,
.lobby-channel-group,
.lobby-holding-config {
  display: grid;
  gap: 6px;
}

.lobby-channels {
  align-content: start;
  max-height: 430px;
  overflow: auto;
}

.lobby-channel-group {
  border: 1px solid #13242a;
  background: #050b0d;
  padding: 6px;
}

.lobby-channel-group > b,
.lobby-holding-config > b {
  color: var(--blue);
  font-size: 11px;
}

.lobby-channel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  text-align: left;
  padding: 5px 6px;
}

.lobby-channel span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-channel small {
  color: var(--muted);
}

.lobby-channel.active {
  border-color: var(--green);
  color: var(--text);
  background: rgba(0, 255, 136, .10);
  box-shadow: 0 0 0 1px rgba(0, 255, 136, .10) inset;
}

.lobby-channel.active span {
  color: var(--blue);
}

.lobby-channel.active small {
  color: var(--green);
}

.lobby-channel.locked {
  opacity: .42;
  cursor: not-allowed;
}

.lobby-feed {
  min-width: 0;
}

.lobby-messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid #13242a;
  background: #020708;
  padding: 7px;
}

.lobby-message {
  border-left: 2px solid #16424a;
  padding: 4px 0 4px 7px;
  display: flex;
  gap: 7px;
  align-items: flex-start;
}

.lobby-message-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid rgba(0, 255, 135, .18);
  background: #020303;
  display: grid;
  place-items: center;
  line-height: 0;
}

.lobby-message-avatar .steam-avatar-img {
  width: 24px;
  height: 24px;
}

.lobby-message-body {
  min-width: 0;
  flex: 1;
}

.lobby-message.deleted {
  opacity: .58;
}

.lobby-message.pending {
  border-left-color: var(--amber);
  opacity: .78;
}

.lobby-message-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 11px;
}

.lobby-message-meta em {
  color: var(--amber);
  font-style: normal;
}

.lobby-message p {
  margin: 3px 0 0;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.lobby-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 6px;
}

.lobby-compose input {
  width: 100%;
}

.lobby-asset-link {
  display: inline;
  padding: 0 2px;
  border: 0;
  color: var(--blue);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lobby-holding-config {
  border: 1px solid #173f46;
  padding: 6px;
  background: #061012;
}

.lobby-holding-row {
  display: grid;
  gap: 4px;
}

.lobby-holding-row span {
  color: var(--text);
}

.lobby-holding-row label {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.lobby-overlay .lobby-panel {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 0;
  background: transparent;
  padding: 10px;
}

.lobby-overlay .lobby-grid {
  min-height: 0;
  height: 100%;
  grid-template-columns: 220px minmax(0, 1fr);
}

.lobby-overlay .lobby-channels {
  max-height: none;
}

.lobby-overlay .lobby-feed {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.lobby-overlay .lobby-messages {
  min-height: 0;
  max-height: none;
}

.social-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482620;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 170, 255, .10), transparent 28%),
    radial-gradient(circle at 82% 68%, rgba(153, 82, 255, .08), transparent 30%),
    rgba(0, 0, 0, .76);
}

.social-profile-shell {
  width: min(860px, calc(100vw - 42px));
  max-height: min(760px, calc(100vh - 46px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #1c5963;
  background:
    linear-gradient(180deg, rgba(6, 18, 22, .98), rgba(3, 6, 8, .98)),
    #030708;
  padding: 12px;
  box-shadow: 0 0 28px rgba(0, 170, 255, .10), 0 0 0 1px rgba(0, 255, 136, .06) inset;
  overflow: hidden;
}

.social-profile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.social-profile-topbar {
  border-bottom: 1px solid #17343a;
  padding-bottom: 8px;
}

.social-profile-topbar b {
  color: var(--green);
  letter-spacing: .03em;
}

.social-profile-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding-right: 3px;
}

.social-profile-head {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #17343a;
  background: rgba(3, 12, 14, .58);
  padding: 8px;
}

.social-profile-avatar {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line2);
  background: #020303;
  flex: 0 0 auto;
}

.social-profile-id {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: center;
}

.social-profile-id h2,
.social-profile-id p {
  margin: 0;
}

.social-profile-id h2 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  color: var(--green);
  font-family: var(--font-brand);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.05;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.social-profile-id p {
  color: var(--text);
  overflow-wrap: anywhere;
}

.social-profile-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.social-profile-kpis div,
.social-profile-card {
  border: 1px solid #17343a;
  background: rgba(3, 12, 14, .82);
  padding: 8px;
}

.social-profile-kpis span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.social-profile-kpis b {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.social-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr);
  gap: 10px;
}

.social-profile-card h3 {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 14px;
}

.social-profile-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.social-profile-bio {
  min-height: 126px;
}

.social-profile-bio textarea {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  border: 1px solid #1f4650;
  background: #020708;
  color: var(--text);
  padding: 8px;
  font: inherit;
  line-height: 1.45;
  box-sizing: border-box;
}

.social-profile-bio textarea:focus {
  border-color: var(--green);
  outline: 1px solid rgba(0, 255, 136, .24);
}

.social-profile-edit-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.social-profile-edit-actions small {
  color: var(--muted);
}

.social-profile-save-status {
  margin-top: 6px !important;
  font-size: 12px;
}

.social-achievement-list,
.social-role-list {
  display: grid;
  gap: 6px;
}

.social-achievement,
.social-role-list span {
  display: grid;
  gap: 2px;
  border: 1px solid #17343a;
  background: rgba(0, 170, 255, .045);
  padding: 6px;
}

.social-achievement b,
.social-role-list b {
  color: var(--green);
}

.social-achievement span,
.social-achievement small,
.social-role-list small {
  color: var(--muted);
}

.achievement-total {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.achievement-total em {
  min-width: 18px;
  padding: 1px 3px;
  border: 1px solid currentColor;
  font-style: normal;
  text-align: center;
  background: rgba(255, 255, 255, .035);
}

.rarity-gray { color: #96a0a6; border-color: rgba(150, 160, 166, .50); }
.rarity-green { color: var(--green); border-color: rgba(0, 255, 136, .55); }
.rarity-blue { color: var(--blue); border-color: rgba(0, 170, 255, .58); }
.rarity-purple { color: var(--purple); border-color: rgba(153, 82, 255, .58); }
.rarity-orange { color: #ff9f1a; border-color: rgba(255, 159, 26, .64); }

.social-achievement.rarity-gray {
  border-color: rgba(150, 160, 166, .42);
  background: rgba(150, 160, 166, .045);
}

.social-achievement.rarity-green {
  border-color: rgba(0, 255, 136, .48);
  background: rgba(0, 255, 136, .055);
}

.social-achievement.rarity-blue {
  border-color: rgba(0, 170, 255, .52);
  background: rgba(0, 170, 255, .060);
}

.social-achievement.rarity-purple {
  border-color: rgba(153, 82, 255, .56);
  background: rgba(153, 82, 255, .065);
}

.social-achievement.rarity-orange {
  border-color: rgba(255, 159, 26, .68);
  background: rgba(255, 159, 26, .075);
  box-shadow: 0 0 18px rgba(255, 159, 26, .08);
}

.social-achievement.rarity-gray b { color: #c6ced3; }
.social-achievement.rarity-green b { color: var(--green); }
.social-achievement.rarity-blue b { color: var(--blue); }
.social-achievement.rarity-purple b { color: var(--purple); }
.social-achievement.rarity-orange b { color: #ffb347; }

.social-footprint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: baseline;
}

.social-footprint span {
  color: var(--muted);
}

.social-footprint b {
  color: var(--text);
}

.social-profile-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.social-profile-privacy {
  margin: 0;
  border-top: 1px solid #17343a;
  padding-top: 8px;
}

.mail-contract-actions {
  display: inline-flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.client-contract-panel {
  display: grid;
  gap: 8px;
}

.client-contract-panel .network-topline {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  align-items: stretch;
}

.client-contract-panel .network-topline span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 6px;
  align-items: baseline;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.client-contract-panel .network-topline b {
  justify-self: end;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.client-contract-panel h3 {
  margin: 4px 0 0;
}

.client-contract-card {
  display: grid;
  gap: 6px;
  border: 1px solid #173f46;
  background: #071012;
  padding: 8px;
}

.client-contract-head,
.client-contract-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.client-contract-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 8px;
}

.client-contract-head span,
.client-contract-head small,
.client-contract-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-contract-head span {
  flex: 1 1 180px;
}

.client-contract-head small {
  flex: 0 1 auto;
  text-align: right;
}

.client-contract-head span,
.client-contract-head small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.25;
}

.client-contract-card p {
  margin: 0;
  line-height: 1.35;
}

.client-contract-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  color: var(--muted);
  font-size: 11px;
}

.client-contract-meta span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.section-table {
  overflow-x: auto;
}

.finance-panel table {
  font-size: 11px;
}

.portfolio-terminal {
  display: grid;
  gap: 7px;
}

.portfolio-compliance {
  border: 1px solid #24343b;
  background: #071012;
  padding: 6px;
}

.portfolio-compliance span {
  display: block;
  margin-top: 3px;
}

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

.portfolio-tile,
.allocation-block {
  border: 1px solid #1f2c32;
  background: #071012;
  padding: 7px;
  min-width: 0;
}

.portfolio-tile span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.portfolio-tile strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.portfolio-command-center {
  display: grid;
  gap: 9px;
}

.portfolio-command-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #17242a;
  padding-bottom: 7px;
}

.portfolio-command-head > div:first-child {
  display: grid;
  gap: 2px;
}

.portfolio-command-head b {
  color: var(--green);
  font-size: 14px;
}

.portfolio-command-head span {
  color: var(--muted);
  font-size: 11px;
}

.portfolio-book-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.portfolio-book-tabs button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 152px;
  text-align: left;
  text-transform: none;
  border-color: #1f3b45;
  background: #050c0f;
}

.portfolio-book-tabs button.active {
  border-color: var(--green);
  background: linear-gradient(180deg, rgba(0, 255, 136, .10), rgba(0, 170, 255, .035));
  box-shadow: inset 3px 0 0 var(--green);
}

.portfolio-book-tabs span,
.portfolio-book-tabs small {
  color: var(--muted);
  font-size: 10px;
}

.portfolio-book-tabs b {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-book-summary {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(92px, .75fr));
  gap: 6px;
  align-items: stretch;
}

.portfolio-book-summary > div,
.portfolio-book-summary p {
  min-width: 0;
  margin: 0;
  border: 1px solid #17313a;
  background: #050c0f;
  padding: 7px 8px;
}

.portfolio-book-summary span,
.portfolio-book-summary small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.portfolio-book-summary b {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-compact-entity {
  display: grid;
  gap: 7px;
}

.portfolio-command-shell {
  display: grid;
  gap: 9px;
}

.portfolio-command-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}

.portfolio-command-main {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(280px, .75fr);
  gap: 9px;
  align-items: stretch;
}

.panel.left .portfolio-command-compact .portfolio-command-main {
  grid-template-columns: minmax(0, 1fr);
}

.panel.left .portfolio-command-compact .portfolio-orbit-map {
  min-height: 330px;
}

.panel.left .portfolio-command-compact .portfolio-inspector {
  display: none;
}

.portfolio-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 18px;
  background: rgba(0, 0, 0, .88);
}

.portfolio-overlay-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  border: 1px solid var(--line2);
  background: #05090a;
  padding: 12px;
  overflow: hidden;
}

.portfolio-overlay-topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.portfolio-overlay-topbar h2 {
  margin: 0;
  color: var(--green);
  font-size: 24px;
}

.portfolio-overlay-topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.portfolio-overlay .portfolio-command-center {
  min-height: 0;
  overflow: auto;
}

.portfolio-overlay .portfolio-orbit-map {
  min-height: min(62vh, 620px);
}

.loan-market-preview {
  display: grid;
  gap: 9px;
  border: 1px solid #17343d;
  background: rgba(4, 12, 15, .62);
  padding: 10px;
}

.loan-market-preview h3 {
  margin: 0;
}

.loan-market-preview p {
  margin: 4px 0 0;
}

.loan-market-preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.loan-market-preview-stats span {
  border: 1px solid #16343c;
  background: rgba(0, 170, 255, .04);
  padding: 5px 7px;
  color: var(--muted);
}

.loan-market-preview-stats b {
  color: var(--green);
}

.loan-market-preview ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.loan-market-preview button {
  justify-self: start;
}

.loan-market-overlay {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  padding: 18px;
  background: rgba(0, 0, 0, .88);
}

.loan-market-shell {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  border: 1px solid var(--line2);
  background:
    radial-gradient(circle at 18% 10%, rgba(0, 255, 136, .08), transparent 24%),
    radial-gradient(circle at 82% 4%, rgba(0, 170, 255, .07), transparent 28%),
    #05090a;
  padding: 12px;
  overflow: hidden;
}

.loan-market-topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.loan-market-topbar span,
.loan-market-kicker {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.loan-market-topbar h2 {
  margin: 2px 0 0;
  color: var(--green);
  font-size: 24px;
}

.loan-market-topbar p {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--muted);
}

.loan-market-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
}

.loan-market-summary span {
  border: 1px solid #17343d;
  background: rgba(0, 170, 255, .035);
  padding: 8px;
  color: var(--muted);
}

.loan-market-summary b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
}

.loan-market-filters {
  display: grid;
  gap: 6px;
  border: 1px solid #17242a;
  background: rgba(0, 0, 0, .22);
  padding: 8px;
}

.loan-market-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.loan-market-filter-row > span {
  min-width: 76px;
  color: var(--muted);
  font-size: 11px;
}

.loan-market-filter-row button {
  min-height: 25px;
  padding: 4px 7px;
  font-size: 10px;
}

.loan-market-filter-row button.active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 255, 136, .08);
}

.loan-market-filter-row button span {
  margin-left: 5px;
  color: var(--blue);
}

.loan-market-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.loan-market-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid #17343d;
  background: rgba(2, 8, 10, .86);
  padding: 10px;
}

.loan-market-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.loan-market-card-head h3 {
  margin: 2px 0 0;
  color: var(--green);
  font-size: 16px;
}

.loan-market-card-head b {
  color: var(--blue);
  white-space: nowrap;
}

.loan-market-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.loan-market-metrics span {
  border: 1px solid #142d35;
  background: rgba(0, 170, 255, .035);
  padding: 7px;
  min-width: 0;
}

.loan-market-metrics small {
  display: block;
  color: var(--muted);
}

.loan-market-metrics b {
  display: block;
  color: var(--text);
  overflow-wrap: anywhere;
}

.loan-market-explain {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.loan-market-explain p {
  margin: 0;
}

.loan-market-ticket {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid #17242a;
  padding-top: 8px;
}

.loan-market-ticket label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  min-width: 0;
}

.loan-market-ticket label:nth-child(3) {
  grid-column: 1 / -1;
}

.loan-market-ticket select,
.loan-market-ticket input {
  width: 100%;
  min-width: 0;
}

.loan-market-ticket small {
  color: var(--muted);
}

.loan-market-action-box {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.loan-market-action-box button {
  min-width: 132px;
}

.loan-market-empty {
  border: 1px solid #17343d;
  padding: 18px;
  color: var(--muted);
}

.loan-market-empty b {
  color: var(--green);
}

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

.portfolio-compact-list .holdings-section {
  margin-top: 0 !important;
}

.portfolio-compact-list .holdings-table th:nth-child(4),
.portfolio-compact-list .holdings-table td:nth-child(4),
.portfolio-compact-list .holdings-table th:nth-child(7),
.portfolio-compact-list .holdings-table td:nth-child(7) {
  display: none;
}

.portfolio-allocation-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
  min-height: 520px;
  border: 1px solid #17343d;
  background:
    radial-gradient(circle at 48% 30%, rgba(0, 255, 136, .08), transparent 35%),
    linear-gradient(180deg, rgba(0, 170, 255, .035), rgba(0, 0, 0, 0));
  padding: 10px;
  overflow: hidden;
}

.portfolio-visual-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid #17242a;
  padding-bottom: 7px;
}

.portfolio-visual-head > div:first-child {
  display: grid;
  gap: 2px;
}

.portfolio-visual-head b {
  color: var(--green);
  font-size: 14px;
}

.portfolio-visual-head span {
  color: var(--muted);
  font-size: 11px;
}

.portfolio-visual-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.portfolio-visual-controls button {
  min-height: 24px;
  font-size: 10px;
}

.portfolio-visual-controls button.active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 255, 136, .08);
}

.portfolio-visual-body {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(180px, .34fr);
  gap: 10px;
  min-height: 0;
}

.portfolio-pie-wrap,
.portfolio-column-chart,
.portfolio-bar-chart,
.portfolio-line-chart,
.portfolio-empty-visual {
  position: relative;
  min-height: 420px;
  border: 1px solid #112b33;
  background:
    linear-gradient(rgba(0, 170, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 170, 255, .035) 1px, transparent 1px),
    #03090b;
  background-size: 36px 36px;
  overflow: hidden;
}

.portfolio-pie-svg {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  filter: drop-shadow(0 20px 18px rgba(0, 0, 0, .42));
}

.portfolio-pie-shadow {
  fill: rgba(0, 0, 0, .56);
  transform-origin: 50% 50%;
}

.portfolio-pie-tilt {
  transform-origin: 50% 50%;
  transform: scaleY(.78);
}

.portfolio-pie-slice {
  stroke: #020809;
  stroke-width: .45;
  cursor: pointer;
  opacity: .88;
  transition: opacity .15s ease, transform .15s ease, filter .15s ease;
}

.portfolio-pie-slice:hover,
.portfolio-pie-slice.active {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(0, 255, 136, .45));
  transform: translateY(-1px);
}

.portfolio-pie-inner {
  fill: rgba(3, 9, 11, .86);
  stroke: rgba(0, 255, 136, .42);
  stroke-width: .4;
}

.portfolio-pie-core {
  position: absolute;
  left: 50%;
  top: 45%;
  z-index: 3;
  display: grid;
  gap: 2px;
  width: 132px;
  min-height: 78px;
  place-items: center;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.portfolio-pie-core span,
.portfolio-pie-core small {
  color: var(--muted);
  font-size: 10px;
}

.portfolio-pie-core b {
  color: var(--green);
  font-size: 15px;
}

.portfolio-allocation-legend {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow: auto;
}

.portfolio-allocation-legend button {
  display: grid;
  grid-template-columns: 10px minmax(54px, .45fr) auto;
  gap: 6px;
  align-items: center;
  text-align: left;
  min-height: 42px;
  border-color: #17343d;
  background: #050c0f;
}

.portfolio-allocation-legend button.active {
  border-color: var(--green);
  background: rgba(0, 255, 136, .08);
}

.portfolio-allocation-legend i {
  width: 9px;
  height: 22px;
  box-shadow: 0 0 10px currentColor;
}

.portfolio-allocation-legend span {
  color: var(--text);
}

.portfolio-allocation-legend b {
  color: var(--green);
  text-align: right;
}

.portfolio-allocation-legend small {
  grid-column: 2 / 4;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-column-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  align-items: end;
  gap: 8px;
  padding: 14px;
}

.portfolio-column {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 100%;
  border-color: transparent;
  background: transparent;
  text-align: center;
  padding: 0;
}

.portfolio-column::before {
  content: "";
  display: block;
  height: var(--bar-height);
  min-height: 18px;
  border: 1px solid color-mix(in srgb, var(--bar-color) 74%, #ffffff 10%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bar-color) 58%, transparent), rgba(0,0,0,.18));
  box-shadow: inset 0 7px 14px rgba(255,255,255,.08), 0 0 16px color-mix(in srgb, var(--bar-color) 34%, transparent);
}

.portfolio-column span,
.portfolio-column b {
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-column.active::before,
.portfolio-column:hover::before {
  box-shadow: inset 0 7px 14px rgba(255,255,255,.13), 0 0 22px color-mix(in srgb, var(--bar-color) 60%, transparent);
}

.portfolio-bar-chart {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
}

.portfolio-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(72px, .32fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  text-align: left;
  border-color: #17343d;
  background: #03090b;
  overflow: hidden;
}

.portfolio-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-width);
  background: linear-gradient(90deg, color-mix(in srgb, var(--bar-color) 48%, transparent), transparent);
  pointer-events: none;
}

.portfolio-bar span,
.portfolio-bar b,
.portfolio-bar em {
  position: relative;
  z-index: 1;
}

.portfolio-bar b {
  color: var(--green);
}

.portfolio-bar em {
  color: var(--muted);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-line-chart {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 14px;
}

.portfolio-line-chart svg {
  width: 100%;
  height: 100%;
  min-height: 330px;
}

.portfolio-grid-line {
  fill: none;
  stroke: rgba(87, 113, 124, .23);
  stroke-width: .35;
}

.portfolio-area-fill {
  fill: rgba(0, 255, 136, .14);
  stroke: none;
}

.portfolio-line-path {
  fill: none;
  stroke: var(--green);
  stroke-width: .9;
  filter: drop-shadow(0 0 6px rgba(0, 255, 136, .45));
}

.portfolio-line-point {
  stroke: #020809;
  stroke-width: .5;
  cursor: pointer;
}

.portfolio-line-point:hover,
.portfolio-line-point.active {
  stroke: var(--green);
  stroke-width: 1;
}

.portfolio-line-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.portfolio-line-labels button {
  min-height: 22px;
  font-size: 10px;
}

.portfolio-empty-visual {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.portfolio-empty-visual b {
  color: var(--green);
  font-size: 22px;
}

.portfolio-orbit-map {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #17343d;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 255, 136, .11) 0 9%, transparent 10%),
    radial-gradient(circle at 50% 50%, transparent 0 27%, rgba(0, 170, 255, .13) 27.4% 27.9%, transparent 28.3% 41%, rgba(0, 255, 136, .10) 41.4% 41.9%, transparent 42.3% 52%, rgba(255, 170, 0, .08) 52.4% 52.9%, transparent 53.3%),
    linear-gradient(180deg, rgba(0, 170, 255, .035), rgba(0, 0, 0, 0));
}

.portfolio-orbit-map.empty {
  display: grid;
  place-items: center;
}

.portfolio-orbit-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.portfolio-orbit-lines line {
  stroke: rgba(87, 113, 124, .34);
  stroke-width: .45;
}

.portfolio-orbit-lines line.gain {
  stroke: rgba(0, 255, 136, .36);
}

.portfolio-orbit-lines line.loss {
  stroke: rgba(255, 51, 85, .34);
}

.portfolio-orbit-lines line.active {
  stroke: rgba(0, 255, 136, .82);
  stroke-width: .85;
}

.portfolio-core,
.portfolio-node {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 999px;
  text-transform: none;
}

.portfolio-core {
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 146px;
  min-height: 146px;
  padding: 14px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--green);
  background: radial-gradient(circle, rgba(0, 255, 136, .18), rgba(5, 13, 15, .96) 64%);
  box-shadow: 0 0 26px rgba(0, 255, 136, .16);
}

.portfolio-core span,
.portfolio-node span,
.portfolio-node small {
  color: var(--muted);
  font-size: 10px;
}

.portfolio-core b {
  color: var(--green);
  font-size: 15px;
  line-height: 1.15;
}

.portfolio-core small {
  color: var(--muted);
  font-size: 10px;
}

.portfolio-node {
  left: var(--x);
  top: var(--y);
  z-index: 3;
  width: var(--node-size);
  height: var(--node-size);
  min-height: var(--node-size);
  padding: 5px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 170, 255, .72);
  background: rgba(5, 12, 15, .96);
  box-shadow: 0 0 14px rgba(0, 170, 255, .08);
}

.portfolio-node b {
  color: var(--text);
  font-size: 13px;
}

.portfolio-node.gain {
  border-color: rgba(0, 255, 136, .72);
}

.portfolio-node.loss {
  border-color: rgba(255, 51, 85, .72);
}

.portfolio-node.active {
  background: rgba(0, 33, 22, .96);
  box-shadow: 0 0 22px rgba(0, 255, 136, .26);
}

.portfolio-node.type-future,
.portfolio-node.type-option,
.portfolio-node.type-structured-product {
  border-color: rgba(190, 120, 255, .78);
}

.portfolio-node.type-corporate-bond,
.portfolio-node.type-rate {
  border-color: rgba(255, 170, 0, .76);
}

.portfolio-inspector {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid #17343d;
  background: #071012;
  padding: 10px;
}

.portfolio-inspector-head {
  display: grid;
  gap: 3px;
}

.portfolio-inspector-head span {
  color: var(--blue);
}

.portfolio-inspector-head b {
  color: var(--green);
  font-size: 15px;
}

.portfolio-inspector-head small {
  color: var(--muted);
}

.portfolio-inspector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.portfolio-trade-pad {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) repeat(4, auto);
  gap: 5px;
  align-items: center;
}

.holding-actions button.hold-confirming,
.portfolio-trade-pad button.hold-confirming {
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: inset 0 -2px 0 rgba(255, 184, 0, 0.35);
}

.portfolio-quick-qty,
.portfolio-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.portfolio-signals {
  border-top: 1px solid #17242a;
  padding-top: 6px;
}

.portfolio-signals b {
  color: var(--blue);
}

.portfolio-signals span {
  border: 1px solid #1f3b45;
  background: #02090b;
  padding: 2px 5px;
  color: var(--muted);
  font-size: 10px;
}

.portfolio-signals em {
  color: var(--green);
  font-style: normal;
}

.portfolio-tabs {
  display: grid;
  gap: 7px;
}

.portfolio-tab-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
}

.portfolio-tab-row button.active {
  border-color: var(--green);
  background: rgba(0, 255, 136, .08);
  color: var(--green);
}

.portfolio-tab-body {
  min-width: 0;
}

.portfolio-audit-lite {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 620px);
  overflow: auto;
}

.portfolio-audit-table {
  min-width: 760px;
}

.portfolio-audit-table td,
.portfolio-audit-table th {
  white-space: nowrap;
}

.portfolio-audit-table td:first-child,
.portfolio-audit-table th:first-child {
  white-space: normal;
}

.portfolio-tab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.portfolio-allocation-view .portfolio-analytics-panel {
  margin-top: 0;
}

.portfolio-chart-comparison {
  display: grid;
  grid-template-columns: minmax(300px, .98fr) minmax(260px, .78fr);
  gap: 8px;
  align-items: stretch;
  margin: 8px 0;
}

.portfolio-chart-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 272px;
  border: 1px solid #17343d;
  background:
    linear-gradient(rgba(0, 170, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 170, 255, .028) 1px, transparent 1px),
    #03090b;
  background-size: 32px 32px;
  padding: 8px;
  overflow: hidden;
}

.portfolio-chart-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  border-bottom: 1px solid #17242a;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.portfolio-chart-card-head b {
  color: var(--green);
  font-size: 12px;
}

.portfolio-chart-card-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-chart-card canvas.chart-canvas {
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 248px;
}

.market-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin: 8px 0;
}

.market-chart-card {
  display: grid;
  grid-template-rows: auto minmax(250px, 1fr) auto;
  min-width: 0;
  min-height: 330px;
  border: 1px solid #17343d;
  background:
    linear-gradient(rgba(0, 170, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, .025) 1px, transparent 1px),
    #03090b;
  background-size: 30px 30px;
  padding: 8px;
  overflow: hidden;
}

.market-chart-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  border-bottom: 1px solid #17242a;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.market-chart-card-head b {
  color: var(--green);
  font-size: 12px;
}

.market-chart-card-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-chart-card canvas.chart-canvas {
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 250px;
}

.market-chart-meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.portfolio-correlation-card {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.portfolio-correlation-scale {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
}

.portfolio-correlation-scale::before {
  content: "Asset";
}

.portfolio-correlation-rows {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 0;
  overflow: auto;
}

.portfolio-correlation-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 30px;
  border-color: #17343d;
  background: rgba(5, 12, 15, .92);
  text-align: left;
}

.portfolio-correlation-row.active,
.portfolio-correlation-row:hover {
  border-color: var(--green);
  background: rgba(0, 255, 136, .07);
}

.portfolio-correlation-label {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-correlation-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 18px;
  border: 1px solid #132329;
  background: #020607;
  overflow: hidden;
  padding: 0 5px;
}

.portfolio-correlation-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-width);
  pointer-events: none;
}

.portfolio-correlation-track.weight i {
  background: linear-gradient(90deg, rgba(0, 170, 255, .68), rgba(0, 255, 136, .10));
}

.portfolio-correlation-track.pnl.gain i {
  background: linear-gradient(90deg, rgba(0, 255, 136, .66), rgba(0, 255, 136, .08));
}

.portfolio-correlation-track.pnl.loss i {
  background: linear-gradient(90deg, rgba(255, 51, 85, .66), rgba(255, 51, 85, .08));
}

.portfolio-correlation-track b {
  position: relative;
  z-index: 1;
  color: var(--green);
  font-size: 10px;
}

.portfolio-correlation-track.pnl.loss b {
  color: #ff8a9d;
}

.portfolio-correlation-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .portfolio-chart-comparison,
  .market-chart-grid {
    grid-template-columns: 1fr;
  }
}

.portfolio-risk-lens {
  display: grid;
  gap: 8px;
}

.risk-lens-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(110px, .8fr);
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid #132329;
  padding: 5px 0;
}

.risk-lens-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
}

.risk-lens-row b {
  color: var(--green);
}

.risk-lens-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.portfolio-entity-head {
  display: grid;
  gap: 3px;
  border: 1px solid #17343d;
  background: #071012;
  padding: 9px;
}

.portfolio-entity-head span {
  color: var(--blue);
}

.portfolio-entity-head b {
  color: var(--green);
  font-size: 15px;
}

.portfolio-entity-head small {
  color: var(--muted);
}

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

.allocation-block p {
  margin: 4px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.authority-books {
  border-top: 1px solid #1f2c32;
  padding-top: 8px;
}

.authority-books table {
  font-size: 11px;
}

.holdings-section {
  padding: 8px;
}

.holdings-table tr.founder-stake-row td {
  background: rgba(0, 255, 136, 0.035);
  border-top-color: rgba(0, 255, 136, 0.22);
}

.holdings-table tr.collateral-deposit-row td {
  background: rgba(255, 170, 0, 0.045);
  border-top-color: rgba(255, 170, 0, 0.24);
}

.holdings-table tr.collateral-deposit-row b {
  color: var(--amber);
}

.founder-stake-inspector .order-preview {
  border-color: rgba(255, 170, 0, 0.32);
}

.ceo-books-panel {
  display: grid;
  gap: 8px;
}

.ceo-book-context {
  border-top: 1px solid #173f46;
  padding-top: 7px;
}

.ceo-book-context summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--blue);
}

.ceo-book-context summary b {
  color: var(--green);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ceo-book-context summary small {
  color: var(--muted);
}

.ceo-book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.ceo-book-grid h3 {
  font-size: 12px;
  margin: 0 0 5px;
}

.ceo-book-table {
  min-width: 560px;
  font-size: 11px;
}

.holdings-table {
  min-width: 900px;
  table-layout: fixed;
}

.holdings-table th,
.holdings-table td {
  padding: 7px 8px;
  vertical-align: middle;
}

.holdings-table th:nth-child(1) { width: 19%; }
.holdings-table th:nth-child(2) { width: 13%; }
.holdings-table th:nth-child(3),
.holdings-table th:nth-child(4),
.holdings-table th:nth-child(5),
.holdings-table th:nth-child(6),
.holdings-table th:nth-child(7) { width: 7.5%; }
.holdings-table th:nth-child(8) { width: 30.5%; }

.holdings-table td:first-child,
.holdings-table th:first-child,
.holdings-table td:nth-child(2),
.holdings-table th:nth-child(2) {
  text-align: left;
}

.holdings-table b,
.holdings-table span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.holdings-table b {
  color: var(--text);
}

.holdings-table .good b,
.holdings-table .good span {
  color: var(--green);
}

.holdings-table .bad b,
.holdings-table .bad span {
  color: var(--red);
}

.holding-asset span {
  margin-top: 2px;
  color: var(--muted);
}

.holding-action-cell {
  text-align: right;
}

.holding-actions {
  display: grid;
  grid-template-columns: 62px minmax(82px, 1fr) 88px 62px;
  gap: 4px;
  align-items: center;
  min-width: 312px;
}

.holding-actions .mini-button {
  margin-left: 0;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.holding-actions input {
  min-height: 24px;
  height: 24px;
  padding: 2px 5px;
  font-size: 11px;
}

.role-mandate-card ul {
  margin: 5px 0 0;
  padding-left: 16px;
}

.role-mandate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 6px;
  margin-top: 6px;
}

.role-mandate-grid > div {
  border: 1px solid #1f2c32;
  background: #071012;
  padding: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.role-desk {
  border: 1px solid #233641;
  background: #080f12;
  margin-top: 8px;
  padding: 7px;
}

.role-desk h3 {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: 12px;
}

.role-desk table {
  font-size: 11px;
}

.role-blueprint-desk {
  border-color: #244334;
  background: #06110f;
}

.role-blueprint-desk p {
  margin: 5px 0;
}

.role-blueprint-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr));
}

.role-module-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0;
}

.role-module-strip span {
  border: 1px solid #1d4b42;
  background: rgba(0, 255, 136, 0.06);
  color: var(--cyan);
  padding: 3px 6px;
  font-size: 11px;
}

.role-focus-strip span {
  border-color: #24384f;
  background: rgba(0, 200, 255, 0.06);
  color: var(--text);
}

.role-metric-strip span {
  border-color: #50421b;
  background: rgba(255, 176, 0, 0.07);
  color: var(--amber);
}

.role-circularity-box {
  border-top: 1px solid #163138;
  margin-top: 7px;
  padding-top: 6px;
}

.role-circularity-box p {
  color: var(--muted);
  margin: 0 0 5px;
}

.central-bank-desk {
  border-color: #244a58;
  background: #061014;
}

.treasury-desk {
  border-color: #4a3a22;
  background: #100d07;
}

.tile span { display: block; color: var(--muted); font-size: 11px; }
.tile strong { display: block; margin-top: 3px; font-size: 15px; }

.deep-header, .login-row {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 260px);
  gap: 10px;
  align-items: start;
}

.deep-title {
  color: var(--green);
  font-size: 18px;
}

.deep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.section-table h3 {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 13px;
}

.opening-desk {
  border-color: #244a58;
  background: #071014;
}

.opening-grid,
.health-grid,
.bot-tuning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.opening-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  align-items: stretch;
}

.opening-step {
  border: 1px solid #21323a;
  background: #060b0e;
  min-height: 112px;
  padding: 7px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 6px;
}

.opening-step span {
  color: var(--amber);
  font-size: 10px;
}

.opening-step.done {
  border-color: #174432;
}

.opening-step.done span {
  color: var(--green);
}

.opening-step b {
  color: var(--text);
  line-height: 1.2;
}

.opening-step small {
  color: var(--muted);
  line-height: 1.25;
}

.opening-step button {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

.policy-console {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.tool-row {
  display: grid;
  grid-template-columns: 1fr 82px 78px 62px 78px;
  gap: 6px;
  align-items: end;
}

.order-ticket-row {
  grid-template-columns: minmax(190px, 1.35fr) minmax(170px, .95fr) 76px 64px 64px auto;
}

.order-ticket-row > *,
.limit-order-row > * {
  min-width: 0;
}

.order-ticket-row > span {
  align-self: center;
}

.order-ticket-row > span.muted {
  grid-column: 1 / -1;
}

.book-scope-note {
  border-top: 1px solid #18313a;
  color: var(--muted);
  margin: 7px 0 0;
  padding-top: 7px;
  font-size: 11px;
}

.tool-name small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.limit-order-row {
  display: grid;
  grid-template-columns: 150px 92px 96px minmax(180px, 1fr);
  gap: 6px;
  align-items: end;
  margin-top: 6px;
}

.limit-order-row span {
  align-self: center;
}

.ticket-guard {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  border-top: 1px solid #18313a;
  margin-top: 8px;
  padding-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.ticket-guard b {
  color: var(--text);
}

.hidden {
  display: none !important;
}

.order-book-depth {
  border-top: 1px solid #18313a;
  margin-top: 8px;
  padding-top: 8px;
}

.book-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 7px;
}

.book-caption {
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 4px;
}

.order-book-depth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.order-depth-table {
  width: 100%;
  min-width: 0;
}

.limit-orders-section table {
  min-width: 860px;
}

.trade-tape-section table {
  min-width: 620px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #174432;
  color: var(--green);
  background: #04100c;
  padding: 7px 9px;
  font-weight: 700;
}

.market-online {
  border-color: var(--green);
  background: rgba(0, 255, 136, .06);
  color: var(--green);
}

.news-section {
  display: grid;
  gap: 5px;
}

.news-radar-panel {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #17242a;
}

.news-radar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.news-radar-filters button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  border-color: #1d3440;
  color: var(--muted);
}

.news-radar-filters button.active {
  border-color: var(--green);
  background: rgba(0, 255, 136, .08);
  color: var(--green);
}

.news-radar-filters span {
  color: var(--blue);
}

.news-radar-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 10px;
  align-items: stretch;
}

.news-radar-map {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid #18313a;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 255, 136, .08) 0 9%, transparent 10%),
    radial-gradient(circle at 50% 50%, transparent 0 27%, rgba(0, 170, 255, .12) 27.4% 27.8%, transparent 28.2% 38%, rgba(0, 255, 136, .10) 38.4% 38.8%, transparent 39.2% 47%, rgba(255, 170, 0, .08) 47.4% 47.8%, transparent 48.2%),
    linear-gradient(180deg, rgba(0, 255, 136, .035), rgba(0, 0, 0, 0));
}

.news-radar-map::before,
.news-radar-map::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
}

.news-radar-map::before {
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(70, 89, 99, .35) 50%, transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(70, 89, 99, .35) 50%, transparent calc(50% + 1px));
}

.news-radar-map::after {
  border: 1px solid rgba(0, 255, 136, .16);
  box-shadow: inset 0 0 28px rgba(0, 170, 255, .05);
}

.news-radar-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.news-radar-line {
  stroke: rgba(98, 121, 130, .34);
  stroke-width: .35;
}

.news-radar-line.active {
  stroke: rgba(0, 255, 136, .72);
  stroke-width: .7;
}

.news-radar-hub,
.news-radar-node {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 999px;
  text-transform: none;
}

.news-radar-hub {
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 138px;
  min-height: 138px;
  padding: 15px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--green);
  background: radial-gradient(circle, rgba(0, 255, 136, .18), rgba(4, 15, 13, .96) 62%);
  color: var(--text);
  box-shadow: 0 0 26px rgba(0, 255, 136, .16);
}

.news-radar-hub span,
.news-radar-node span {
  color: var(--blue);
  font-size: 10px;
  letter-spacing: 0;
}

.news-radar-hub b {
  color: var(--green);
  font-size: 12px;
  line-height: 1.2;
  white-space: normal;
}

.news-radar-hub em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.news-radar-node {
  z-index: 3;
  width: var(--node-size);
  height: var(--node-size);
  min-height: var(--node-size);
  padding: 4px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 170, 255, .72);
  background: rgba(5, 12, 15, .96);
  color: var(--text);
  box-shadow: 0 0 14px rgba(0, 170, 255, .08);
}

.news-radar-node b {
  color: var(--text);
  font-size: 11px;
}

.news-radar-node.mid {
  opacity: .76;
}

.news-radar-node.old {
  opacity: .48;
  filter: saturate(.72);
}

.news-radar-node.active {
  border-color: var(--green);
  background: rgba(0, 33, 22, .96);
  box-shadow: 0 0 20px rgba(0, 255, 136, .24);
}

.news-radar-hub.exposed,
.news-radar-node.exposed,
.news-radar-timeline-item.exposed,
.news-log-row.exposed {
  outline: 1px solid rgba(255, 170, 0, .64);
  outline-offset: 2px;
}

.news-radar-hub.sev-crit,
.news-radar-hub.sev-critical,
.news-radar-hub.sev-breaking,
.news-radar-node.sev-crit,
.news-radar-node.sev-critical,
.news-radar-node.sev-breaking {
  border-color: var(--red);
  box-shadow: 0 0 20px rgba(255, 51, 85, .20);
}

.news-radar-node.sev-warn,
.news-radar-node.sev-warning {
  border-color: var(--amber);
}

.news-radar-focus {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.news-radar-focus-card {
  display: grid;
  gap: 6px;
  min-height: 156px;
  border: 1px solid #18313a;
  background: #071013;
  padding: 10px;
}

.news-radar-focus-card b {
  color: var(--green);
  font-size: 14px;
  line-height: 1.25;
}

.news-radar-focus-card p {
  margin: 0;
  line-height: 1.35;
}

.news-radar-focus-card small {
  color: var(--blue);
}

.news-radar-score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.news-radar-score-strip span {
  position: relative;
  overflow: hidden;
  min-height: 28px;
  border: 1px solid #1b313b;
  background: #04090b;
  padding: 3px 5px;
}

.news-radar-score-strip span::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: var(--score);
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.news-radar-score-strip i {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 10px;
}

.news-radar-score-strip b {
  color: var(--text);
  font-size: 12px;
}

.news-exposure-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(255, 170, 0, .45);
  background: rgba(255, 170, 0, .06);
  padding: 4px 6px;
}

.news-exposure-badge b {
  color: var(--amber);
  font-size: 10px;
}

.news-exposure-badge span {
  color: var(--text);
}

.news-tactical-brief {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.news-tactical-brief span {
  min-width: 0;
  border: 1px solid #16313a;
  background: rgba(0, 170, 255, .035);
  padding: 5px 6px;
}

.news-tactical-brief b,
.news-tactical-brief em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-tactical-brief b {
  color: var(--blue);
  font-size: 10px;
  text-transform: uppercase;
}

.news-tactical-brief em {
  color: var(--text);
  font-style: normal;
  white-space: nowrap;
}

.news-tactical-brief.compact {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.news-tactical-brief.compact span {
  padding: 3px 5px;
}

.news-tactical-brief.compact b {
  font-size: 9px;
}

.news-tactical-brief.compact em {
  color: var(--muted);
  font-size: 10px;
}

.news-causal-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.news-causal-chain span {
  border: 1px solid #203944;
  background: rgba(0, 170, 255, .045);
  padding: 2px 5px;
  color: var(--muted);
  font-size: 10px;
}

.news-radar-markets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.news-radar-timeline {
  display: grid;
  align-content: start;
  gap: 5px;
  overflow: hidden;
}

.news-radar-timeline-item {
  display: grid;
  grid-template-columns: 72px 40px 1fr;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 4px 6px;
  border-color: #18313a;
  text-align: left;
  color: var(--text);
  text-transform: none;
}

.news-radar-timeline-item.active {
  border-color: var(--green);
  background: rgba(0, 255, 136, .06);
}

.news-radar-timeline-item em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-log-panel {
  display: grid;
  gap: 6px;
  border-top: 1px solid #17242a;
  padding-top: 8px;
}

.news-log-list {
  display: grid;
  gap: 3px;
}

.news-log-row {
  display: grid;
  grid-template-columns: 92px 52px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid #121c22;
  padding: 3px 0;
}

.news-log-row p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
  min-width: 0;
  margin: 0;
}

.news-log-row strong {
  color: var(--text);
}

.news-log-row em,
.news-log-row small {
  color: var(--muted);
  font-style: normal;
}

.breaking-item,
.news-item {
  display: grid;
  grid-template-columns: 92px 54px 1fr;
  gap: 7px;
  border-bottom: 1px solid #162128;
  padding: 4px 0;
}

.breaking-item {
  background: #160609;
  border-left: 3px solid var(--red);
  padding-left: 6px;
}

.breaking-item p,
.news-item p {
  margin: 0;
  white-space: normal;
}

.news-desk,
.news-why,
.news-tactical,
.news-markets {
  display: block;
  margin-top: 2px;
}

.news-desk {
  color: var(--blue);
  font-size: 10px;
  text-transform: uppercase;
}

.news-why {
  color: var(--muted);
}

.news-tactical {
  color: var(--green);
}

.news-markets {
  color: var(--muted);
}

.news-market-link {
  margin: 2px 4px 0 0;
  padding: 1px 5px;
  border-color: #244453;
  font-size: 10px;
}

.admin-news-desk textarea,
.news-contributor-panel textarea {
  min-height: 72px;
  resize: vertical;
}

.news-contributor-panel {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.portfolio-decision-hub,
.loan-market-score-strip,
.mandate-quick-read,
.next-move-grid,
.asset-reality-profile {
  display: grid;
  gap: 6px;
}

.portfolio-decision-hub {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  border: 1px solid #17313a;
  background: rgba(0, 255, 136, .035);
  padding: 7px;
}

.portfolio-decision-hub span,
.loan-market-score-strip span,
.asset-reality-profile div,
.mandate-quick-grid span,
.next-move-grid div {
  min-width: 0;
  border: 1px solid #162d35;
  background: rgba(3, 9, 11, .86);
  padding: 6px 7px;
}

.portfolio-decision-hub b,
.portfolio-decision-hub em,
.portfolio-decision-hub small,
.loan-market-score-strip b,
.loan-market-score-strip em,
.asset-reality-profile b,
.asset-reality-profile span,
.mandate-quick-grid b,
.mandate-quick-grid em,
.next-move-grid b,
.next-move-grid p {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-decision-hub b,
.loan-market-score-strip b,
.asset-reality-profile b,
.mandate-quick-grid b,
.next-move-grid b {
  color: var(--blue);
  font-size: 10px;
  text-transform: uppercase;
}

.portfolio-decision-hub em,
.loan-market-score-strip em,
.asset-reality-profile span,
.mandate-quick-grid em {
  color: var(--text);
  font-style: normal;
  white-space: nowrap;
}

.portfolio-decision-hub small {
  color: var(--muted);
  font-size: 10px;
}

.portfolio-pro-suite {
  display: grid;
  gap: 8px;
  border: 1px solid #17313a;
  background:
    linear-gradient(135deg, rgba(0, 170, 255, .045), rgba(0, 255, 136, .025)),
    #04090b;
  padding: 8px;
}

.portfolio-pro-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #142831;
  padding-bottom: 7px;
}

.portfolio-pro-head h3,
.portfolio-pro-head p,
.portfolio-pro-panel h4,
.portfolio-why-list p,
.portfolio-terminal-output p {
  margin: 0;
}

.portfolio-pro-head h3 {
  color: var(--blue);
  font-size: 13px;
}

.portfolio-pro-head p,
.portfolio-pro-head span,
.portfolio-why-list p,
.portfolio-terminal-output p {
  color: var(--muted);
  line-height: 1.35;
}

.portfolio-pro-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(280px, 1fr);
  gap: 8px;
}

.portfolio-pro-panel {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  border: 1px solid #142831;
  background: rgba(2, 7, 8, .92);
  padding: 8px;
}

.portfolio-pro-panel h4 {
  color: var(--green);
  font-size: 12px;
  text-transform: uppercase;
}

.portfolio-risk-radar,
.portfolio-scenario-list,
.portfolio-why-list,
.portfolio-terminal-output {
  display: grid;
  gap: 5px;
}

.portfolio-risk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 6px;
  position: relative;
  min-width: 0;
  border: 1px solid #112630;
  background: #04090b;
  padding: 5px 6px 7px;
  overflow: hidden;
}

.portfolio-risk-row span,
.portfolio-risk-row b,
.portfolio-risk-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-risk-row small {
  color: var(--muted);
  font-size: 10px;
}

.portfolio-risk-row em {
  color: var(--text);
  font-style: normal;
  text-align: right;
}

.portfolio-risk-row i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--risk-width);
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
}

.portfolio-scenario-controls,
.portfolio-terminal-form,
.portfolio-terminal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.portfolio-scenario-controls button,
.portfolio-terminal-chips button {
  padding: 4px 6px;
  font-size: 10px;
}

.portfolio-scenario-controls button.active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 255, 136, .08);
}

.portfolio-scenario-controls label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.portfolio-scenario-list span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  min-width: 0;
  border: 1px solid #112630;
  background: #04090b;
  padding: 5px 6px;
}

.portfolio-scenario-list b,
.portfolio-scenario-list em,
.portfolio-scenario-list small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-scenario-list em {
  font-style: normal;
}

.portfolio-scenario-list small {
  color: var(--muted);
}

.portfolio-terminal-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.portfolio-terminal-form input {
  width: 100%;
  min-width: 0;
}

.portfolio-terminal-output {
  border: 1px solid #112630;
  background: #020607;
  padding: 7px;
}

.portfolio-terminal-output b {
  color: var(--blue);
}

.asset-reality-profile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 7px;
}

.loan-market-score-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mandate-quick-read {
  grid-template-columns: minmax(210px, .62fr) minmax(0, 1fr);
  border: 1px solid #17313a;
  background:
    linear-gradient(90deg, rgba(0,255,136,.06), rgba(0,170,255,.025)),
    #050c0f;
  padding: 7px;
  margin: 7px 0;
}

.mandate-quick-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  border-right: 1px solid #17313a;
  padding-right: 7px;
}

.mandate-quick-main span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.mandate-quick-main b {
  color: var(--green);
  overflow-wrap: anywhere;
}

.mandate-quick-main p {
  margin: 0;
  color: var(--text);
  line-height: 1.35;
}

.mandate-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.next-move-coach {
  margin-top: 8px;
}

.next-move-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.next-move-grid p {
  margin: 4px 0 6px;
  color: var(--muted);
  white-space: normal;
}

.next-move-grid button {
  min-height: 26px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
}

.corp-tool {
  display: grid;
  grid-template-columns: 130px repeat(4, minmax(74px, 1fr)) 108px;
  gap: 6px;
  align-items: end;
  margin-top: 6px;
}

.corp-tool b {
  color: var(--blue);
  align-self: center;
}

.company-relocation {
  grid-template-columns: 130px minmax(140px, 1fr) minmax(160px, 1.4fr) 108px;
}

.coherence-panel details {
  border-top: 1px solid #152028;
  padding-top: 5px;
}

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  color: var(--green);
  background: #020303;
}

.ticker-track {
  display: inline-flex;
  gap: 24px;
  padding: 6px 0;
  animation: ticker 65s linear infinite;
}

@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.log {
  max-height: 220px;
  overflow: auto;
  background: #060808;
  padding: 7px 10px;
}

.log-row, .news-row {
  display: grid;
  grid-template-columns: 110px 54px 1fr;
  gap: 8px;
  border-bottom: 1px solid #141c21;
  padding: 4px 0;
}

.log-row p, .news-row p { margin: 0; white-space: normal; }

.spark-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}

canvas {
  width: 100%;
  max-width: 320px;
  height: 32px;
  background: #050607;
}

.analytics-lab { display: grid; gap: 7px; }

.ladder-panel {
  display: grid;
  gap: 8px;
}

.ladder-card {
  border: 1px solid #17303a;
  background: linear-gradient(180deg, rgba(0, 255, 136, .04), rgba(0, 170, 255, .025));
  padding: 8px;
}

.ladder-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.ladder-card-head b {
  color: var(--green);
}

.ladder-card-head span,
.ladder-card-head small {
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.ladder-rows {
  display: grid;
  gap: 5px;
}

.ladder-entry {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 50px;
  gap: 7px;
  align-items: center;
  border-top: 1px solid #14222a;
  padding-top: 5px;
}

.ladder-rank {
  color: var(--blue);
  font-weight: 700;
}

.ladder-entry b {
  color: var(--text);
}

.ladder-entry p {
  margin: 2px 0 0;
  color: var(--muted);
  line-height: 1.25;
}

.ladder-score {
  justify-self: end;
  font-weight: 800;
}

.chart-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.report-explorer {
  display: grid;
  gap: 8px;
}

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

.report-history-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.75fr) minmax(0, 1.25fr);
  gap: 8px;
  align-items: start;
}

.market-intelligence-panel {
  display: grid;
  gap: 8px;
}

.market-intelligence-brief {
  border: 1px solid #1f3b45;
  background: linear-gradient(180deg, rgba(0, 170, 255, .055), rgba(0, 255, 136, .025));
  padding: 8px;
}

.market-intelligence-brief h3 {
  margin: 0 0 5px;
  color: var(--green);
}

.market-intelligence-brief p {
  margin: 0;
  line-height: 1.35;
}

.report-list {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
}

.report-pick {
  text-align: left;
  color: var(--text);
  background: #071012;
  border-color: #1f2c32;
  text-transform: none;
}

.report-pick span,
.report-pick small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  white-space: normal;
}

.report-pick.active {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.cause-chain {
  display: grid;
  gap: 7px;
}

.cause-head,
.cause-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.cause-card,
.cause-context {
  border: 1px solid #1f2c32;
  background: #071012;
  padding: 7px;
}

.cause-card ol {
  margin: 6px 0 6px 20px;
  padding: 0;
}

.cause-card li {
  margin: 3px 0;
}

.mini-button {
  margin-left: 6px;
  padding: 2px 6px;
  min-height: 0;
  font-size: 10px;
}

.rulebook {
  display: grid;
  gap: 8px;
}

.rulebook-head {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 260px);
  gap: 8px;
  align-items: start;
}

.rule-grid {
  display: grid;
  gap: 8px;
}

.rule-card {
  border: 1px solid #1f2c32;
  background: #071012;
  padding: 7px;
}

.rule-card h3 {
  color: var(--green);
}

.compact-table {
  font-size: 11px;
}

.compact-table th,
.compact-table td {
  padding: 3px 4px;
}

.coeff-input {
  width: 92px;
  min-width: 0;
  padding: 3px 4px;
  font-size: 11px;
}

.calibration-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
  align-items: end;
}

.calibration-toolbar p {
  grid-column: 1 / -1;
}

.calibration-preview {
  border-color: #34505c;
}

.scenario-preview {
  border-color: #5c4634;
}

.matrix-preview {
  border-color: #4b5c34;
}

.server-ops {
  display: grid;
  gap: 8px;
}

.ops-block {
  border: 1px solid #1f2c32;
  background: #071012;
  padding: 7px;
  display: grid;
  gap: 6px;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.world-health-block {
  border-color: #244a58;
}

.health-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.bot-ecology-panel {
  display: grid;
  gap: 7px;
}

.bot-tuning-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  align-items: end;
}

.market-rules-panel {
  border-color: #34495c;
}

.market-rules-panel p {
  margin: 0;
  color: var(--text);
}

.preview-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
}

.pipeline-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
}

canvas.chart-canvas {
  width: 100%;
  max-width: none;
  height: 260px;
}

.json-box { font-size: 11px; white-space: pre-wrap; overflow: auto; max-height: 320px; }

.access-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 255, 136, .12), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(0, 170, 255, .12), transparent 30%),
    var(--bg);
}

.access-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.access-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.access-logo {
  width: min(520px, 100%);
  margin: 6px 0 8px;
}

.access-landing,
.access-detail-hero,
.access-info-grid .section-table {
  border: 1px solid var(--line2);
  background: rgba(8, 11, 13, .94);
}

.access-landing {
  padding: 18px;
}

.access-landing h1,
.access-detail-hero h1 {
  margin: 6px 0 8px;
  color: var(--green);
  font-family: var(--font-brand);
  font-size: clamp(32px, 6vw, 72px);
  line-height: .98;
}

.access-lede {
  max-width: 760px;
  color: var(--text);
  line-height: 1.55;
}

.access-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.access-page-card {
  gap: 6px;
  padding-bottom: 10px;
}

.access-page-card img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
  opacity: .88;
}

.access-page-card b,
.access-page-card small,
.access-page-card p {
  margin-left: 10px;
  margin-right: 10px;
}

.access-page-card p {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 0;
  margin-bottom: 0;
}

.access-detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.access-detail-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #173f46;
}

.access-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.access-info-grid ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.access-info-grid li {
  margin: 7px 0;
  line-height: 1.45;
}

.support-shell {
  width: min(1180px, calc(100% - 32px));
}

.support-hero {
  display: grid;
  gap: 12px;
  position: relative;
  overflow: hidden;
  padding: 24px 28px 28px;
  border-color: rgba(184, 137, 255, .34);
  background:
    linear-gradient(135deg, rgba(184, 137, 255, .08), transparent 36%),
    linear-gradient(24deg, rgba(255, 170, 0, .055), transparent 46%),
    rgba(8, 11, 13, .96);
  box-shadow: inset 2px 0 0 rgba(184, 137, 255, .72), 0 0 34px rgba(184, 137, 255, .07);
}

.support-hero::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 28px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(184, 137, 255, .16);
  background: radial-gradient(circle at 50% 50%, rgba(184, 137, 255, .08), transparent 67%);
  transform: rotate(7deg);
  pointer-events: none;
}

.support-kicker {
  color: var(--purple);
  letter-spacing: .06em;
}

.support-hero .access-logo {
  width: min(520px, 70vw);
  margin: 8px 0 8px;
}

.support-hero h1 {
  max-width: none;
  white-space: nowrap;
  color: #eef5f2;
  font-size: clamp(38px, 4.25vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(0, 255, 136, .08), 0 0 24px rgba(184, 137, 255, .12);
}

.support-hero h1 span {
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 170, 0, .16);
}

.support-lede {
  max-width: 920px;
  color: #d8e2e4;
}

.support-lede + .support-lede {
  color: #a8bac0;
}

.support-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.support-paypal {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 170, 0, .74);
  background:
    linear-gradient(90deg, rgba(255, 170, 0, .16), rgba(184, 137, 255, .09)),
    #071014;
  color: var(--amber);
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 3px 0 0 rgba(255, 170, 0, .86), 0 0 18px rgba(255, 170, 0, .07);
}

.support-paypal:hover {
  border-color: var(--purple);
  background:
    linear-gradient(90deg, rgba(184, 137, 255, .20), rgba(255, 170, 0, .12)),
    #091018;
  color: #ffd88a;
  box-shadow: 0 0 22px rgba(184, 137, 255, .16);
}

.support-paypal img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.support-grid .section-table {
  border-color: rgba(184, 137, 255, .24);
  background: linear-gradient(180deg, rgba(184, 137, 255, .035), rgba(8, 11, 13, .9));
}

.support-grid .section-table:nth-child(2) {
  border-color: rgba(255, 170, 0, .24);
  background: linear-gradient(180deg, rgba(255, 170, 0, .030), rgba(8, 11, 13, .9));
}

.support-grid ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.support-grid li {
  margin: 7px 0;
  line-height: 1.45;
}

.join-shell {
  width: min(1240px, calc(100% - 32px));
}

.join-hero {
  display: grid;
  gap: 12px;
  border-color: rgba(0, 200, 255, .28);
  background:
    linear-gradient(135deg, rgba(0, 200, 255, .065), transparent 34%),
    linear-gradient(24deg, rgba(184, 137, 255, .06), transparent 50%),
    rgba(8, 11, 13, .96);
  box-shadow: inset 2px 0 0 rgba(0, 200, 255, .62), 0 0 30px rgba(0, 200, 255, .06);
}

.join-hero h1 {
  white-space: nowrap;
  color: #eef5f2;
  font-size: clamp(38px, 4.1vw, 60px);
  letter-spacing: 0;
}

.join-hero h1 span {
  color: var(--purple);
  text-shadow: 0 0 18px rgba(184, 137, 255, .18);
}

.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 12px;
  margin-top: 12px;
}

.join-form-card {
  border-color: rgba(0, 200, 255, .25);
  background: linear-gradient(180deg, rgba(0, 200, 255, .035), rgba(8, 11, 13, .93));
}

.join-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.join-form label {
  display: grid;
  gap: 6px;
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
}

.join-form input,
.join-form select,
.join-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #284f57;
  background: #030809;
  color: var(--text);
  font: inherit;
  padding: 9px 10px;
  text-transform: none;
}

.join-form textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.45;
}

.join-wide {
  grid-column: 1 / -1;
}

.join-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.join-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.join-actions button {
  min-height: 42px;
  border-color: rgba(184, 137, 255, .72);
  background: linear-gradient(90deg, rgba(184, 137, 255, .22), rgba(0, 200, 255, .10));
  color: #d9fbff;
}

.join-actions button:disabled {
  opacity: .55;
}

.join-role-list {
  display: grid;
  gap: 12px;
  align-content: start;
}

.join-role-list .section-table {
  border-color: rgba(184, 137, 255, .24);
}

.join-role-list ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.join-role-list li {
  margin: 8px 0;
  line-height: 1.42;
}

@media (max-width: 920px) {
  .support-hero h1 {
    white-space: normal;
    font-size: clamp(36px, 9vw, 56px);
  }

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

  .join-hero h1 {
    white-space: normal;
    font-size: clamp(34px, 8vw, 52px);
  }

  .join-grid,
  .join-form {
    grid-template-columns: 1fr;
  }
}

.forum-shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.forum-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 16px;
  align-items: end;
  border: 1px solid var(--line2);
  background: rgba(8, 11, 13, .94);
  padding: 18px;
  margin-bottom: 12px;
}

.forum-logo {
  width: min(500px, 100%);
  margin: 4px 0 6px;
}

.forum-lede {
  margin: 0;
  max-width: 720px;
  color: var(--text);
  line-height: 1.45;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(420px, 1.08fr) minmax(420px, 1.2fr);
  gap: 12px;
  align-items: start;
}

.forum-layout > aside,
.forum-layout > main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.forum-panel {
  background: rgba(12, 14, 16, .95);
}

.forum-loading {
  width: min(640px, 100%);
  margin: 24px auto;
}

.forum-identity,
.forum-post-author {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.forum-identity {
  align-self: stretch;
  border: 1px solid #173f46;
  background: #061014;
  padding: 8px;
}

.forum-identity b,
.forum-post-author b {
  display: block;
  color: var(--green);
}

.forum-identity span,
.forum-post-author span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.forum-avatar {
  width: fit-content;
  border: 1px solid var(--line);
  background: #020303;
  line-height: 0;
}

.forum-board {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: start;
  margin-top: 6px;
  text-align: left;
  text-transform: none;
}

.forum-board span {
  color: var(--green);
  font-weight: 700;
}

.forum-board small {
  color: var(--blue);
  white-space: nowrap;
}

.forum-board em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  line-height: 1.3;
}

.forum-board.active,
.forum-thread-row.active {
  border-color: var(--green);
  background: #07180f;
}

.forum-thread-head,
.forum-thread-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(78px, .4fr) 48px minmax(96px, .48fr);
  gap: 8px;
  align-items: center;
}

.forum-thread-head {
  padding: 6px 4px;
  color: var(--muted);
  border-bottom: 1px solid #172026;
  font-size: 11px;
  text-transform: uppercase;
}

.forum-thread-row {
  width: 100%;
  min-height: 58px;
  margin-top: 5px;
  text-align: left;
  text-transform: none;
  color: var(--text);
}

.forum-thread-row > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.forum-thread-row b {
  color: var(--green);
  overflow-wrap: anywhere;
}

.forum-thread-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.forum-thread-detail h2 {
  margin: 10px 0;
  color: var(--green);
  font-family: var(--font-brand);
  font-size: 24px;
  line-height: 1.05;
}

.forum-post {
  display: grid;
  gap: 8px;
  border-top: 1px solid #172026;
  padding: 10px 0;
}

.forum-post.original {
  border-top-color: var(--line2);
  border-bottom: 1px solid #172026;
}

.forum-post p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: normal;
}

.forum-replies {
  display: grid;
}

.forum-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border-top: 1px solid #172026;
  padding-top: 10px;
}

.forum-form textarea {
  min-height: 112px;
}

.anon-forum-hero {
  align-items: stretch;
}

.anon-forum-identity {
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
}

.anon-forum-identity .button-link,
.anon-forum-identity .live-badge {
  grid-column: 1 / -1;
  width: fit-content;
}

.anon-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #20515b;
  background: linear-gradient(145deg, #061014, #10242a);
  color: var(--green);
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 12px rgba(0, 200, 255, .08);
}

.anon-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.anon-panel-head h3,
.anon-composer h3 {
  margin: 0;
}

.anon-composer {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.anon-forum-status {
  margin-bottom: 12px;
  color: var(--green);
}

.anon-forum-status.error {
  color: var(--red);
  border-color: rgba(255, 27, 85, .55);
}

.anon-empty {
  margin-top: 8px;
}

.anon-rules ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.45;
}

.forum-form select,
.forum-form input {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #03090b;
  color: var(--text);
  padding: 8px;
  font-family: inherit;
  letter-spacing: 0;
}

@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .header { grid-template-columns: 1fr; }
  .deep-grid, .auth-start-layout, .start-grid, .opening-grid, .health-grid, .bot-tuning-grid, .account-settings-grid, .access-teaser-row, .access-page-grid, .access-detail-hero, .access-info-grid, .support-grid, .forum-hero, .forum-layout { grid-template-columns: 1fr; }
  .forum-thread-head { display: none; }
  .forum-thread-row { grid-template-columns: 1fr; }
  .chart-controls, .report-controls, .report-history-grid, .rulebook-head, .pipeline-list, .calibration-toolbar, .preview-points, .corp-tool, .portfolio-grid, .portfolio-command-main, .portfolio-book-summary, .portfolio-visual-body, .portfolio-inspector-grid, .portfolio-tab-grid, .portfolio-trade-pad, .allocation-grid, .ceo-book-grid, .limit-order-row, .order-ticket-row, .order-book-depth-grid, .market-focus-grid, .market-pulse-strip, .market-movers, .wallet-row, .network-topline, .network-request-grid, .network-request-row, .contact-strip, .desk-mail-form, .mail-columns, .lobby-grid, .lobby-compose, .news-radar-layout, .news-radar-score-strip, .news-log-row, .news-tactical-brief, .news-tactical-brief.compact, .social-profile-grid, .social-profile-kpis, .loan-market-summary, .loan-market-body, .loan-market-metrics, .loan-market-ticket, .loan-market-score-strip, .portfolio-decision-hub, .portfolio-pro-grid, .asset-reality-profile, .mandate-quick-read, .mandate-quick-grid, .next-move-grid { grid-template-columns: 1fr; }
  .entity-wallet-strip {
    justify-content: flex-start;
    max-width: 100%;
  }
  .portfolio-visual-head,
  .portfolio-overlay-topbar,
  .portfolio-command-head,
  .loan-market-topbar,
  .social-profile-head,
  .loan-market-action-box {
    display: grid;
  }
  .wallet-balances { white-space: normal; }
}

@media (max-width: 900px) {
  .news-radar-map { min-height: 280px; }
  .news-radar-hub { width: 118px; min-height: 118px; }
  .news-radar-timeline-item { grid-template-columns: 62px 34px 1fr; }
}

/* Admin desktop: intentionally separate from the player cockpit. */
.admin-desktop-body {
  background: #010403;
  min-height: 100vh;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login-card,
.admin-card,
.admin-topbar,
.admin-tabs,
.admin-alert {
  border: 1px solid #17343d;
  background: #071012;
}

.admin-login-card {
  width: min(520px, 100%);
  padding: 22px;
}

.admin-brand-row,
.admin-brand,
.admin-topbar,
.admin-status-strip,
.admin-top-actions,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-brand-row h1,
.admin-login-card h1,
.admin-card h2,
.admin-card h3 {
  margin: 0 0 8px;
  color: var(--green);
  letter-spacing: 0;
}

.admin-shell {
  width: min(1760px, calc(100vw - 24px));
  margin: 12px auto 28px;
}

.admin-topbar {
  justify-content: space-between;
  padding: 10px 12px;
}

.admin-brand div,
.admin-brand-row div {
  display: grid;
  gap: 2px;
}

.admin-brand span,
.admin-brand-row p {
  color: var(--muted);
  margin: 0;
}

.admin-status-strip {
  flex-wrap: wrap;
  color: var(--muted);
  justify-content: center;
}

.admin-top-actions {
  justify-content: flex-end;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  padding: 8px;
  margin-top: 8px;
  overflow-x: auto;
}

.admin-tabs button.active,
.admin-user-list button.active,
.admin-report-list button.active {
  background: #001b15;
  border-color: var(--green);
  color: var(--green);
}

.admin-alert {
  margin-top: 8px;
  padding: 8px 10px;
}

.admin-alert.good {
  color: var(--green);
}

.admin-alert.bad {
  color: var(--red);
}

.admin-content {
  margin-top: 8px;
}

.admin-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card {
  padding: 12px;
  min-width: 0;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.admin-metric {
  border: 1px solid #132a31;
  background: #020809;
  padding: 8px;
  min-height: 58px;
}

.admin-metric span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.admin-metric b {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  align-items: end;
}

.admin-card label,
.admin-login-card label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  margin: 7px 0;
}

.admin-card textarea {
  min-height: 92px;
  resize: vertical;
}

.admin-actions {
  flex-wrap: wrap;
  margin-top: 8px;
}

.admin-actions .danger,
.admin-card button.danger {
  border-color: var(--red);
  color: var(--red);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #14252b;
  padding: 5px 6px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--blue);
  font-size: 10px;
  text-transform: uppercase;
}

.admin-news-line {
  border-bottom: 1px solid #14252b;
  padding: 6px 0;
}

.admin-news-line p {
  margin: 3px 0;
  white-space: normal;
}

.admin-news-line span {
  color: var(--muted);
}

.admin-user-list {
  display: grid;
  gap: 6px;
  max-height: 62vh;
  overflow: auto;
}

.admin-report-list {
  display: grid;
  gap: 6px;
  max-height: 68vh;
  overflow: auto;
}

.admin-user-list button {
  text-align: left;
  display: grid;
  gap: 2px;
  padding: 8px;
}

.admin-report-list button {
  text-align: left;
  display: grid;
  gap: 2px;
  padding: 8px;
  border-color: #17343d;
}

.admin-report-list button:hover {
  border-color: var(--blue);
}

.admin-user-list span,
.admin-user-list em,
.admin-report-list span,
.admin-report-list em {
  color: var(--muted);
  font-style: normal;
}

.admin-divider {
  border-top: 1px solid #143039;
  margin: 12px 0;
}

.admin-preview {
  border-top: 1px solid #143039;
  margin-top: 10px;
  padding-top: 8px;
}

.admin-audit-log {
  min-height: 62vh;
  max-height: 70vh;
  overflow: auto;
  white-space: pre-wrap;
  background: #020607;
  border: 1px solid #132a31;
  padding: 10px;
  color: #aac4cc;
}

.operator-desktop-body {
  background:
    radial-gradient(circle at 80% 8%, rgba(0, 170, 255, .08), transparent 32%),
    radial-gradient(circle at 12% 16%, rgba(0, 255, 136, .06), transparent 26%),
    #010403;
}

.operator-shell {
  width: min(1680px, calc(100vw - 24px));
}

.operator-topbar,
.operator-tabs button.active,
.operator-login-card {
  border-color: #1b4550;
}

.operator-topbar {
  box-shadow: inset 0 -1px 0 rgba(0, 255, 136, .08);
}

.operator-card {
  background:
    linear-gradient(180deg, rgba(0, 170, 255, .035), rgba(0, 0, 0, 0)),
    #071012;
}

.operator-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.operator-chip-row span {
  border: 1px solid #1f3b45;
  background: #02090b;
  color: var(--blue);
  padding: 3px 6px;
  font-size: 10px;
}

.operator-rule {
  border-left: 2px solid var(--green);
  margin: 7px 0;
  padding: 5px 0 5px 8px;
  color: var(--muted);
}

.operator-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.operator-task-grid article {
  min-height: 94px;
  border: 1px solid #17343d;
  background: #020809;
  padding: 9px;
}

.operator-task-grid b {
  color: var(--green);
}

.operator-task-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 980px) {
  .admin-topbar,
  .admin-grid-2 {
    grid-template-columns: 1fr;
  }
  .admin-topbar {
    display: grid;
  }
  .admin-status-strip,
  .admin-top-actions {
    justify-content: flex-start;
  }
}


/* MI-SCROLL-FIX */
.section-table.market-intelligence-panel { overflow-x: visible; }
.market-intelligence-panel table { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.market-intelligence-panel .compact-table { display: block; overflow-x: auto; max-width: 100%; }
/* END MI-SCROLL-FIX */

/* WELCOME_BRIEF_STYLES */
.welcome-brief{position:fixed;right:16px;bottom:16px;width:332px;max-width:calc(100vw - 24px);background:var(--panel);border:1px solid var(--line);border-radius:5px;z-index:50;font-family:var(--font-ui);box-shadow:0 10px 30px rgba(0,0,0,.5);}
.wb-head{display:flex;align-items:center;gap:9px;padding:9px 11px;background:var(--panel2);border-bottom:1px solid var(--line);}
.wb-ico{width:12px;height:12px;background:var(--green);flex:0 0 auto;border-radius:2px;}
.wb-title-wrap{flex:1;min-width:0;}
.wb-title{font-size:12px;letter-spacing:.08em;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wb-subtitle{font-size:10.5px;color:var(--muted);}
.wb-ctrl{all:unset;cursor:pointer;width:24px;height:24px;line-height:24px;text-align:center;color:var(--muted);font-size:16px;border-radius:3px;}
.wb-ctrl:hover{color:var(--text);background:#0d1b23;}
.wb-body{padding:11px;max-height:62vh;overflow:auto;}
.wb-label{font-size:10px;letter-spacing:.1em;color:var(--blue);margin:0 0 6px;}
.wb-count{color:#050608;background:var(--green);border-radius:3px;padding:0 6px;font-size:10px;margin-left:4px;}
.wb-list{display:flex;flex-direction:column;margin-bottom:13px;}
.wb-row{display:flex;gap:8px;align-items:flex-start;padding:6px 7px;background:var(--panel2);}
.wb-row + .wb-row{border-top:1px solid var(--bg);}
.wb-dot{width:6px;height:6px;background:var(--green);margin-top:4px;flex:0 0 auto;}
.wb-row-main{min-width:0;display:flex;flex-direction:column;}
.wb-from{font-size:11.5px;color:var(--text);}
.wb-sub{font-size:10.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wb-empty{margin:0 0 13px;font-size:11px;}
.wb-admin{border:1px solid #3a2f52;border-left:2px solid var(--purple);border-radius:3px;background:#0f0b17;padding:8px 9px;margin-bottom:12px;}
.wb-admin-label{color:var(--purple);}
.wb-admin-body{font-size:11.5px;color:var(--text);line-height:1.4;}
.wb-news-label{color:var(--amber);}
.wb-news{background:var(--panel2);border-left:2px solid var(--red);border-radius:3px;padding:7px 9px;margin-bottom:13px;}
.wb-sev{font-size:9.5px;color:var(--red);border:1px solid var(--red);border-radius:2px;padding:0 5px;margin-right:6px;}
.wb-news-head{font-size:11.5px;color:var(--text);line-height:1.35;margin-top:4px;}
.wb-season-label{color:var(--purple);}
.wb-season{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--panel2);border-radius:3px;padding:7px 9px;margin-bottom:13px;font-size:11px;}
.wb-actions{display:flex;gap:8px;}
.wb-act{all:unset;cursor:pointer;flex:1;text-align:center;font-size:11px;letter-spacing:.05em;border:1px solid var(--line);border-radius:3px;padding:7px 0;}
.wb-act-green{color:var(--green);}
.wb-act-blue{color:var(--blue);}
.wb-act:hover{background:#0d1b23;}
.wb-pill{all:unset;cursor:pointer;position:fixed;right:16px;bottom:16px;z-index:50;display:inline-flex;align-items:center;gap:8px;background:var(--panel2);border:1px solid var(--line);border-radius:4px;padding:8px 13px;color:var(--text);font-family:var(--font-ui);font-size:11.5px;letter-spacing:.06em;box-shadow:0 8px 24px rgba(0,0,0,.5);}
.wb-pill-dot{width:8px;height:8px;background:var(--green);border-radius:2px;}
