:root {
  --bg: #020202;
  --bg-soft: #070707;
  --panel: #0b0b0b;
  --line: #f4f4f4;
  --muted: #8f8f8f;
  --text: #f7f7f7;
  --green: #4cff88;
  --red: #ff5858;
  --yellow: #ffd74d;
  --cyan: #59efff;
  --danger: #431212;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
  --radius: 0;
  --fill-speed: 180ms ease-in-out;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

#app {
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
  padding: 32px;
  position: relative;
}

.centered-screen {
  display: grid;
  place-items: center;
}

.auth-shell,
.welcome-shell {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.85);
  box-shadow: var(--shadow);
  padding: 28px;
}

.eyebrow,
.label,
.mini-label {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 11px;
}

.auth-title,
.welcome-title {
  margin: 10px 0 6px;
  font-size: clamp(28px, 4vw, 42px);
  font-family: "Space Mono", monospace;
  line-height: 1;
}

.auth-copy,
.welcome-copy,
.helper-copy {
  color: #c3c3c3;
  line-height: 1.6;
}

.auth-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #000;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--cyan);
}

.minimal-screen {
  background: #000;
}

.splash-shell {
  width: auto;
  display: grid;
  place-items: center;
}

.hero-lockup {
  width: min(34vw, 260px);
  display: grid;
  justify-items: stretch;
  gap: 10px;
}

.eme-mark {
  margin: 0;
  font-family: "Space Mono", monospace;
  font-size: clamp(72px, 11vw, 128px);
  line-height: 0.92;
  letter-spacing: 0.12em;
  text-align: center;
  text-indent: 0.12em;
  font-weight: 700;
}

.eme-subtitle {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  padding-top: 7px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  font-size: clamp(8px, 0.74vw, 11px);
  white-space: nowrap;
  color: #d7d7d7;
}

.enter-button {
  width: 100%;
  border: 1px solid var(--line);
  background: #000;
  color: var(--text);
  padding: 10px 16px;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  cursor: pointer;
  transition: background var(--fill-speed), color var(--fill-speed);
}

.enter-button:hover {
  background: var(--line);
  color: #000;
}

.minimal-auth-shell {
  width: 100%;
  display: grid;
  place-items: center;
}

.minimal-form {
  width: min(26vw, 280px);
  display: grid;
  gap: 18px;
}

.minimal-field {
  gap: 6px;
}

.minimal-label {
  font-size: 11px;
  color: #cfcfcf;
  letter-spacing: 0.24em;
}

.minimal-field input {
  border: 1px solid var(--line);
  background: #000;
  color: #fff;
  height: 34px;
  padding: 6px 10px;
}

.auth-button {
  width: 100%;
  justify-self: stretch;
  padding-top: 10px;
  padding-bottom: 10px;
  letter-spacing: 0.28em;
}

.alternate-link {
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  padding: 0;
}

.alternate-link:hover {
  color: var(--text);
}

.brand-footer {
  position: fixed;
  right: 18px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(215, 215, 215, 0.92);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.88);
  padding: 2px 4px;
  z-index: 15;
}

.brand-footer-left {
  left: 24px;
  right: auto;
}

.brand-footer-right {
  right: 24px;
}

.mono-flag {
  display: inline-flex;
  width: 32px;
  height: 10px;
  border: 1px solid #9a9a9a;
  background: #1a1a1a;
}

.mono-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

.inline-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
.ghost-button,
.nav-item,
.ticker-button {
  border: 1px solid var(--line);
  background: #000;
  color: var(--text);
  padding: 9px 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition:
    background var(--fill-speed),
    color var(--fill-speed),
    border-color var(--fill-speed);
}

.button:hover,
.ghost-button:hover,
.nav-item:hover,
.ticker-button:hover {
  background: var(--line);
  color: #000;
}

.button.active,
.nav-item.active {
  background: var(--line);
  color: #000;
}

.button-danger {
  border-color: var(--red);
  color: #ff9d9d;
}

.button-danger:hover {
  background: var(--danger);
  color: #fff;
}

.auth-footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.auth-badges,
.status-cluster,
.top-actions,
.metric-tray,
.diagnostic-grid,
.order-filters,
.detail-metrics,
.chip-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.order-filters {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.filter-control {
  position: relative;
}

.diagnostic-grid {
  gap: 18px;
}

.badge,
.status-pill,
.chip {
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #030303;
}

.filter-chip {
  width: 100%;
  cursor: pointer;
  color: var(--text);
  text-align: center;
  transition:
    background var(--fill-speed),
    color var(--fill-speed),
    border-color var(--fill-speed);
}

.filter-chip:hover {
  background: var(--line);
  color: #000;
}

.filter-chip.active {
  background: var(--line);
  color: #000;
}

.filter-reset {
  border-color: rgba(255, 255, 255, 0.6);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #000;
  z-index: 12;
}

.filter-option {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #050505;
  color: var(--text);
  padding: 8px 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
  transition:
    background var(--fill-speed),
    color var(--fill-speed),
    border-color var(--fill-speed);
}

.filter-option:hover,
.filter-option.active {
  background: var(--line);
  color: #000;
  border-color: var(--line);
}

.status-pill.green,
.value.positive,
.pill-positive,
td.positive {
  color: var(--green);
}

.status-pill.red,
.value.negative,
.pill-negative,
td.negative {
  color: var(--red);
}

.status-pill.yellow {
  color: var(--yellow);
}

.status-pill.cyan {
  color: var(--cyan);
}

.dashboard {
  padding: 98px 24px 96px;
}

.topbar {
  position: fixed;
  top: 14px;
  left: 24px;
  right: 24px;
  min-height: 46px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.96);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  z-index: 20;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.nav-cluster,
.account-cluster {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.account-cluster {
  justify-content: flex-end;
  margin-left: auto;
}

.topbar-heading {
  justify-self: center;
  opacity: 0;
  pointer-events: none;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d7d7d7;
  white-space: nowrap;
}

.topbar-heading.visible {
  opacity: 1;
}

.page-header.contextual-page-heading {
  display: none;
}

.avatar,
.profile-button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 10px;
  background: #000;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
}

.profile-button {
  min-width: 30px;
  padding: 0;
  overflow: hidden;
}

.profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-item,
.live-indicator {
  min-width: 88px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1;
}

.ticker-button {
  width: 58px;
  min-width: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1;
}

.page {
  display: grid;
  gap: 36px;
}

.back-button {
  justify-self: start;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: #000;
  color: #d8d8d8;
  padding: 6px 10px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--fill-speed), color var(--fill-speed);
}

.back-button:hover {
  background: var(--line);
  color: #000;
}

.diagnostics-page {
  gap: 48px;
}

.diagnostics-page .layout-grid {
  grid-template-columns: 1fr;
  gap: 28px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.page-header-centered {
  justify-content: center;
  align-items: center;
}

.page-title {
  margin: 6px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-title-thin {
  width: 100%;
  text-align: center;
  font-weight: 300;
  letter-spacing: 0.12em;
}

.layout-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 18px;
}

.diagnostics-block {
  margin-top: 6px;
}

.panel {
  border: 1px solid var(--line);
  background: #030303;
  padding: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-title {
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.metric-card {
  border: 1px solid var(--line);
  padding: 18px 20px;
  background: #000;
}

.metric-card .value,
.hero-stat {
  margin-top: 10px;
  font-size: clamp(20px, 2.4vw, 30px);
}

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

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

.chart-shell {
  background: #010101;
  padding: 0;
}

.chart-interactive {
  position: relative;
}

.chart-tooltip {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 170px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.96);
  padding: 10px 12px;
  pointer-events: none;
  z-index: 4;
}

.chart-tooltip-label {
  margin-bottom: 8px;
  color: #dcdcdc;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chart-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  line-height: 1.5;
}

.chart-tooltip-row strong {
  font-weight: 600;
}

.chart-tooltip-row.tone-portfolio strong,
.chart-tooltip-row.tone-default strong {
  color: #ffffff;
}

.chart-tooltip-row.tone-sp500 strong {
  color: #b8b8b8;
}

.chart-tooltip-row.tone-market strong {
  color: #8f8f8f;
}

.chart-tooltip-row.tone-gold strong {
  color: #d8d8d8;
}

.chart-tooltip-row.tone-negative strong {
  color: var(--red);
}

.chart-crosshair {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
  pointer-events: none;
  z-index: 3;
}

.chart-shell svg {
  width: 100%;
  height: 320px;
  display: block;
}

.chart-shell.small svg {
  height: 200px;
}

.gridline {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.axis-label,
.x-axis-label {
  fill: #8d8d8d;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.chart-path {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
}

.portfolio-line {
  stroke: #ffffff;
  stroke-width: 2.2;
}

.sp500-line {
  stroke: #8f8f8f;
  stroke-width: 1.7;
}

.market-line {
  stroke: #5d5d5d;
  stroke-width: 1.7;
  stroke-dasharray: 5 4;
}

.gold-line {
  stroke: #d0d0d0;
  stroke-width: 1.7;
  stroke-dasharray: 2 5;
}

.chart-fill {
  fill: rgba(255, 255, 255, 0.06);
}

.drawdown-path {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  white-space: nowrap;
}

thead th {
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.list {
  display: grid;
  gap: 12px;
}

.list-row {
  display: grid;
  grid-template-columns: 1.3fr repeat(2, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  padding: 12px;
}

.regime-bar {
  height: 10px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 40% 24% 21% 15%;
  margin-top: 8px;
}

.regime-bar span:nth-child(1) {
  background: rgba(76, 255, 136, 0.7);
}

.regime-bar span:nth-child(2) {
  background: rgba(255, 215, 77, 0.7);
}

.regime-bar span:nth-child(3) {
  background: rgba(255, 88, 88, 0.7);
}

.regime-bar span:nth-child(4) {
  background: rgba(89, 239, 255, 0.7);
}

.account-menu {
  position: absolute;
  top: 60px;
  right: 24px;
  width: 290px;
  border: 1px solid var(--line);
  background: #000;
  padding: 14px;
  display: none;
  z-index: 25;
}

.account-menu.open {
  display: grid;
  gap: 8px;
}

.menu-item {
  border: 1px solid var(--line);
  padding: 12px;
  width: 100%;
  background: #000;
  color: var(--text);
  text-align: left;
  transition: background var(--fill-speed), color var(--fill-speed);
}

.menu-item:hover {
  background: var(--line);
  color: #000;
}

.danger-zone {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 8px;
  padding-top: 10px;
}

.ai-box {
  border: 1px solid var(--line);
  padding: 14px;
  background: #020202;
  line-height: 1.7;
}

.ai-disclaimer {
  color: var(--yellow);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.system-checks {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.check-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 8px;
}

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

.sync-label {
  font-size: 10px;
  white-space: nowrap;
}

.live-indicator {
  border: 1px solid currentColor;
  background: #000;
}

.live-indicator.is-live {
  color: var(--green);
}

.live-indicator.is-down {
  color: var(--red);
}

.graph-panel {
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  justify-self: center;
}

.graph-header {
  margin-bottom: 18px;
  justify-content: space-between;
  align-items: flex-start;
}

.compare-toggles {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toggle-chip {
  border: 1px solid var(--line);
  background: #000;
  color: var(--muted);
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--fill-speed), color var(--fill-speed);
}

.toggle-chip.active,
.toggle-chip:hover {
  background: var(--line);
  color: #000;
}

.portfolio-chart {
  border: 0;
  padding: 0;
  background: transparent;
}

.portfolio-chart svg {
  height: 470px;
}

.graph-meta {
  display: grid;
  gap: 10px;
}

.graph-value-block {
  display: grid;
  gap: 6px;
}

.graph-value {
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1;
}

.graph-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7f7f7f;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legend-item.active {
  color: #d8d8d8;
}

.legend-marker {
  width: 14px;
  height: 2px;
  background: #7f7f7f;
  display: inline-block;
}

.portfolio-marker {
  background: #ffffff;
}

.sp500-marker {
  background: #8f8f8f;
}

.market-marker {
  background: #5d5d5d;
}

.gold-marker {
  background: #d0d0d0;
}

.graph-controls {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.chart-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.range-switcher {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.range-chip {
  width: 42px;
  height: 32px;
  border: 1px solid var(--line);
  background: #000;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background var(--fill-speed), color var(--fill-speed);
}

.range-chip.active,
.range-chip:hover {
  background: var(--line);
  color: #000;
}

.portfolio-home .panel-title {
  margin: 0;
}

.portfolio-home {
  width: 100%;
  margin: 0 auto;
  gap: 46px;
}

.account-page {
  width: min(100%, 980px);
  margin: 0 auto;
}

.account-page-narrow {
  max-width: 760px;
}

.settings-grid {
  display: grid;
  gap: 18px;
}

.settings-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.setting-row {
  display: grid;
  gap: 10px;
}

.settings-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #000;
  color: var(--text);
  padding: 12px 14px;
  min-height: 42px;
}

.settings-select {
  appearance: none;
  cursor: pointer;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #bdbdbd;
  pointer-events: none;
}

.settings-input-short {
  max-width: 112px;
  text-transform: uppercase;
}

.settings-confirm {
  min-width: 108px;
  min-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

.dp-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.avatar-upload {
  display: none;
}

.auth-panel-wide {
  max-width: 720px;
}

.danger-wide {
  width: 100%;
  border-color: var(--red);
  color: #ffb0b0;
}

.danger-wide:hover {
  background: #2b1111;
  color: #fff;
}

.emergency-page {
  --ops-gap: clamp(14px, 1.8vw, 24px);
  width: 100%;
  margin: 0 auto;
  gap: var(--ops-gap);
  min-height: calc(100vh - 194px);
  padding: var(--ops-gap) 0;
  align-content: stretch;
}

.emergency-grid {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--ops-gap);
  min-height: calc(100vh - 194px - (var(--ops-gap) * 2));
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 0;
}

.emergency-card {
  border: 1px solid var(--line);
  background: #030303;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  flex: 0 0 172px;
  width: 172px;
  min-width: 172px;
  max-width: 172px;
  height: calc(100vh - 194px - (var(--ops-gap) * 2));
  min-height: 0;
  gap: 18px;
}

.emergency-card-button {
  width: 100%;
  cursor: pointer;
  color: var(--text);
  text-align: center;
  transition:
    background var(--fill-speed),
    color var(--fill-speed),
    border-color var(--fill-speed);
}

.emergency-card-button:hover {
  background: var(--line);
  color: #000;
}

.engine-card-active {
  background: var(--line);
  color: #000;
}

.emergency-top {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
}

.emergency-icon {
  align-self: center;
  justify-self: center;
  font-size: clamp(48px, 6vw, 86px);
  line-height: 1;
}

.emergency-bottom {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.portfolio-home .table-wrap {
  overflow-x: hidden;
}

.data-table-compact {
  min-width: 0;
}

.admin-detail-grid {
  grid-template-columns: 1.3fr 0.9fr;
}

.account-detail-list {
  margin-top: 16px;
}

.account-detail-row {
  grid-template-columns: minmax(0, 1fr);
}

.portfolio-home table {
  min-width: 0;
  table-layout: fixed;
}

.portfolio-home th,
.portfolio-home td {
  padding: 10px 6px;
  font-size: 11px;
  white-space: normal;
  line-height: 1.35;
  vertical-align: top;
}

.home-brand-block {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 0 10px;
}

.home-eme {
  font-size: clamp(54px, 7vw, 88px);
}

.home-eme-subtitle {
  width: min(34vw, 260px);
}

.home-center-brand {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #d7d7d7;
  text-align: center;
}

.welcome-gate {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.welcome-gate-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-align: center;
  color: #d8d8d8;
}

.down-arrow {
  border: 0;
  background: transparent;
  color: #d2d2d2;
  font-size: 22px;
  font-weight: 200;
  transform: scaleX(1.6) scaleY(0.85);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.orders-stack {
  display: grid;
  gap: 24px;
}

.order-group {
  display: grid;
  gap: 10px;
}

.order-date {
  padding: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #b9b9b9;
}

.order-grid {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 0.7fr 0.5fr 0.7fr 0.9fr 0.8fr 0.9fr 1fr 1fr 1fr 0.7fr;
  gap: 12px;
  align-items: start;
}

.order-line {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11px;
  line-height: 1.4;
  transition: background var(--fill-speed), border-color var(--fill-speed);
}

.order-line:hover {
  background: rgba(255, 255, 255, 0.04);
  border-top-color: rgba(255, 255, 255, 0.38);
}

.order-cell {
  display: grid;
  gap: 6px;
}

.order-key {
  color: #8d8d8d;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.order-val {
  color: #f1f1f1;
}

@media (max-width: 1180px) {
  .layout-grid,
  .hero-metrics,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-detail-grid,
  .settings-inline {
    grid-template-columns: 1fr;
  }

  .order-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    left: 18px;
    right: 18px;
    padding: 10px 14px;
  }

  .account-cluster,
  .nav-cluster,
  .status-cluster {
    justify-content: center;
  }

  .topbar-heading {
    display: none;
  }

  .graph-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .graph-controls {
    justify-items: start;
  }

  .dashboard {
    padding-top: 132px;
  }
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    left: 18px;
    right: 18px;
    padding: 10px 14px;
    gap: 10px;
  }

  .nav-cluster {
    justify-content: center;
  }

  .account-cluster {
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
  }

  .topbar-heading {
    display: none;
  }

  .dashboard {
    padding-top: 132px;
  }
}

@media (max-width: 720px) {
  .screen,
  .dashboard {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .list-row {
    grid-template-columns: 1fr;
  }

  .hero-lockup,
  .splash-shell {
    width: auto;
  }

  .eme-mark {
    font-size: clamp(58px, 18vw, 96px);
  }

  .eme-subtitle {
    letter-spacing: 0.18em;
    text-indent: 0.18em;
    font-size: 8px;
  }

  .enter-button {
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }

  .minimal-form {
    width: min(72vw, 280px);
  }

  .brand-footer {
    font-size: 8px;
    gap: 6px;
    right: 8px;
    bottom: 8px;
    padding: 2px 3px;
  }

  .mono-flag {
    width: 24px;
    height: 8px;
  }

  .home-eme-subtitle {
    width: min(72vw, 240px);
  }

  .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    padding: 8px 10px;
    gap: 10px;
  }

  .nav-item,
  .button,
  .ghost-button,
  .ticker-button {
    padding: 7px 9px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .avatar {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .profile-button {
    min-width: 28px;
    height: 28px;
    width: 28px;
    padding: 0;
  }

  .sync-label {
    font-size: 9px;
  }

  .live-indicator,
  .toggle-chip {
    font-size: 9px;
    padding: 7px 8px;
    letter-spacing: 0.1em;
  }

  .nav-item,
  .live-indicator {
    min-width: 74px;
    height: 28px;
    padding: 0 6px;
  }

  .ticker-button {
    width: 54px;
    min-width: 54px;
    padding: 5px 6px;
  }

  .chart-shell svg {
    height: 320px;
  }

  .portfolio-chart svg {
    height: 390px;
  }

  .dashboard {
    padding-top: 130px;
  }

  .page-header.contextual-page-heading {
    display: flex;
  }

  .portfolio-home {
    gap: 34px;
  }

  .hero-metrics {
    gap: 14px;
  }

  .toggle-chip {
    padding: 8px 10px;
  }

  .graph-legend {
    gap: 10px;
  }

  .range-switcher {
    gap: 8px;
  }

  .range-chip {
    width: 38px;
    height: 28px;
    font-size: 9px;
  }

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

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

  .emergency-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: 0;
  }

  .emergency-card {
    width: 100%;
    min-height: 280px;
  }
}
