:root {
  color-scheme: dark;
  --bg: #07090a;
  --surface: #0c0f11;
  --surface-raised: #101417;
  --surface-soft: rgba(17, 22, 25, 0.84);
  --line: rgba(190, 220, 222, 0.1);
  --line-strong: rgba(190, 220, 222, 0.17);
  --text: #f1f4f4;
  --text-secondary: #a8b0b2;
  --muted: #7f898c;
  --accent: #65c9c4;
  --accent-soft: rgba(101, 201, 196, 0.1);
  --accent-line: rgba(101, 201, 196, 0.28);
  --red: #ff8290;
  --red-soft: rgba(255, 130, 144, 0.1);
  --amber: #d4b276;
  --shadow: 0 24px 70px rgba(0, 8, 10, 0.34);
  --radius-surface: 16px;
  --radius-control: 10px;
  --space-sm: clamp(8px, 0.7vw, 12px);
  --space-md: clamp(12px, 1vw, 16px);
  --space-lg: clamp(16px, 1.4vw, 24px);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono",
    monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 0%, rgba(59, 136, 140, 0.055), transparent 30rem),
    radial-gradient(circle at 100% 35%, rgba(42, 104, 112, 0.04), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
input,
tr[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-form {
  width: min(100%, 360px);
}

.brand-mark {
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 600;
}

.pin-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pin-inputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-sm);
}

.pin-digit {
  width: 100%;
  height: 72px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  outline: 0;
  background: rgba(12, 16, 18, 0.86);
  color: var(--text);
  caret-color: var(--accent);
  font-family: var(--mono);
  font-size: 26px;
  text-align: center;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    transform 100ms ease;
}

.pin-digit:hover {
  border-color: rgba(190, 220, 222, 0.25);
}

.pin-digit:focus {
  border-color: var(--accent);
  background: #0c1113;
  box-shadow: 0 0 0 3px rgba(101, 201, 196, 0.1);
}

.pin-digit:active {
  transform: scale(0.985);
}

.pin-inputs.has-error .pin-digit {
  border-color: rgba(255, 130, 144, 0.68);
}

.login-error {
  min-height: 38px;
  margin: var(--space-sm) 0 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--red);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

.login-error.has-message {
  border-color: rgba(255, 130, 144, 0.2);
  background: var(--red-soft);
}

.terminal {
  width: min(100%, 1900px);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: 0 auto;
  padding: 12px;
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 20;
  flex: 0 0 60px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: rgba(12, 15, 17, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 10px 36px rgba(0, 5, 7, 0.18);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 12px;
}

.brand-name {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.brand-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.session-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 22, 25, 0.7);
  color: var(--text-secondary);
  font-size: 11px;
}

.pulse-dot,
.state-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.session-chip.closed .pulse-dot {
  background: var(--amber);
}

.session-time {
  padding-left: 8px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.topbar-center {
  justify-self: center;
}

.compact-stats {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.compact-stats span {
  padding-right: var(--space-sm);
  border-right: 1px solid var(--line);
}

.compact-stats strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 550;
}

.compact-stats span:nth-child(2) strong {
  color: var(--accent);
}

.compact-sources {
  flex-wrap: nowrap;
}

.server-clock {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.ghost-button,
.inspector-unpin {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    transform 100ms ease;
}

.ghost-button {
  min-height: 36px;
  padding: 0 13px;
}

.ghost-button:hover,
.inspector-unpin:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}

.ghost-button:active,
.inspector-unpin:active,
.segment:active {
  transform: scale(0.98);
}

.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}

.source-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

.source-pill.online {
  border-color: var(--accent-line);
  color: var(--text-secondary);
}

.source-pill.online::before {
  background: var(--accent);
}

.compact-sources .source-pill {
  min-height: 22px;
  padding: 3px 6px;
  font-size: 7px;
}

.workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: var(--space-sm);
  margin: 0;
}

.market-panel,
.inspector {
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--surface-soft);
}

.market-panel {
  display: flex;
  flex-direction: column;
}

.panel-toolbar {
  flex: 0 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 16px 15px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading {
  min-width: 180px;
}

.panel-heading p,
.instrument-head p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.panel-toolbar h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.toolbar-actions {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-sm);
  min-width: 0;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #090c0e;
}

.segment {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease,
    transform 100ms ease;
}

.segment.active {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.filter-control {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #090c0e;
  color: var(--muted);
}

.filter-control:focus-within {
  border-color: var(--accent-line);
}

.filter-control > span {
  font-size: 10px;
  white-space: nowrap;
}

.filter-control select,
.filter-control input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.filter-control select {
  width: 52px;
  cursor: pointer;
}

.filter-control select option {
  background: var(--surface-raised);
  color: var(--text);
}

.market-filter select {
  width: 68px;
}

.gap-filter input {
  width: 43px;
  font-family: var(--mono);
}

.gap-filter input::placeholder {
  color: #657074;
  opacity: 1;
}

.search-box {
  width: 190px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #090c0e;
  color: var(--muted);
}

.search-box > span {
  font-size: 11px;
}

.search-box:focus-within {
  border-color: var(--accent-line);
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.search-box input::placeholder {
  color: #657074;
  opacity: 1;
}

.reset-filter-button {
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.reset-filter-button:hover {
  background: var(--red-soft);
  color: var(--red);
}

.table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-color: #273034 transparent;
  scrollbar-width: thin;
}

.market-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
}

.market-table thead {
  position: sticky;
  top: 0;
  z-index: 4;
}

.market-table th {
  height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 16, 18, 0.97);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.015em;
  text-align: left;
}

.sort-button {
  width: 100%;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.sort-button:hover,
.sort-button.active {
  color: var(--accent);
}

.market-table th.numeric .sort-button {
  text-align: right;
}

.market-table th.numeric,
.market-table td.numeric {
  text-align: right;
}

.market-table td {
  height: 62px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(190, 220, 222, 0.055);
  white-space: nowrap;
}

.market-table tbody tr {
  cursor: pointer;
}

.market-table tbody tr:focus-visible {
  background: rgba(101, 201, 196, 0.045);
  box-shadow: inset 2px 0 var(--accent);
  outline: 0;
}

.market-table tbody tr.selected {
  background: rgba(101, 201, 196, 0.075);
  box-shadow: inset 2px 0 var(--accent);
}

.symbol-cell strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.symbol-cell span,
.venue-hint,
.price-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
}

.price-main {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.target-price {
  color: var(--accent);
  font-size: 16px;
  font-weight: 650;
}

.direction {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.direction.long {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.direction.short {
  border-color: rgba(255, 130, 144, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

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

.direction.mapping {
  border-color: rgba(212, 178, 118, 0.25);
  background: rgba(212, 178, 118, 0.08);
  color: var(--amber);
}

.gap-positive {
  color: var(--red);
}

.gap-negative,
.fresh {
  color: var(--accent);
}

.age-live,
.stale {
  color: var(--amber);
}

.loading-row td,
.empty-row td {
  height: 220px;
  color: var(--muted);
  text-align: center;
  cursor: default;
}

.loading-row td > span {
  vertical-align: middle;
}

.loader {
  display: inline-block;
  width: 76px;
  height: 7px;
  margin-right: 12px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(101, 201, 196, 0.08) 0%,
      rgba(101, 201, 196, 0.34) 50%,
      rgba(101, 201, 196, 0.08) 100%
    );
  background-size: 200% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .loader {
    animation: loading-sheen 1.5s ease-in-out infinite;
  }
}

@keyframes loading-sheen {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.table-footer {
  flex: 0 0 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
}

.inspector {
  position: static;
  align-self: stretch;
  max-height: none;
  overflow-y: auto;
  scrollbar-color: #273034 transparent;
  scrollbar-width: thin;
}

.empty-inspector {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 30px;
  background:
    radial-gradient(circle at 0% 100%, rgba(101, 201, 196, 0.06), transparent 19rem);
}

.empty-label {
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 10px;
}

.empty-inspector h3 {
  margin: 0;
  font-size: 27px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.empty-inspector p {
  max-width: 275px;
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.instrument-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px 17px;
  border-bottom: 1px solid var(--line);
}

.instrument-head-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.inspector-unpin {
  min-height: 28px;
  padding: 0 9px;
  color: var(--accent);
  font-size: 9px;
  white-space: nowrap;
}

.instrument-head h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 550;
  letter-spacing: -0.04em;
}

.instrument-head > div:first-child > span {
  display: block;
  max-width: 235px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direction-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.direction-badge.long {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.direction-badge.short {
  border-color: rgba(255, 130, 144, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.direction-badge.mapping {
  border-color: rgba(212, 178, 118, 0.25);
  background: rgba(212, 178, 118, 0.08);
  color: var(--amber);
}

.market-identity {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.exchange-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.market-identity span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.market-identity strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
}

.basis-hero {
  padding: 21px 20px;
  border-bottom: 1px solid var(--line);
}

.basis-hero > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

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

.basis-hero strong {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 500;
}

.basis-route {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 15px 0 10px;
}

.basis-route span {
  font-family: var(--mono);
  font-size: 8px;
}

.basis-route i {
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255, 130, 144, 0.6),
    var(--line-strong) 50%,
    rgba(101, 201, 196, 0.6)
  );
}

.basis-hero small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.detail-section {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
  border-bottom: 0;
}

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

.section-title span {
  font-size: 13px;
  font-weight: 620;
}

.section-title small {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.price-box {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #090c0e;
}

.price-box > span {
  color: var(--muted);
  font-size: 10px;
}

.price-box strong {
  display: block;
  margin: 7px 0 6px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-box small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-box {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.target-box strong {
  color: var(--accent);
  font-size: 25px;
  font-weight: 650;
}

.facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 16px;
  margin: 0;
}

.facts-grid div {
  min-width: 0;
}

.facts-grid dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.facts-grid dd {
  margin: 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.capability {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #697477;
  font-family: var(--mono);
  font-size: 8px;
}

.capability.enabled {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.latency-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.latency-bars > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #090c0e;
}

.latency-bars span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.latency-bars strong {
  display: block;
  margin-top: 5px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: rgba(17, 22, 25, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .search-box {
    width: 170px;
  }

  .compact-sources {
    display: none;
  }
}

@media (max-width: 980px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .terminal {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    position: sticky;
    top: 8px;
    flex-basis: auto;
  }

  .topbar-center {
    order: 3;
    grid-column: 1 / -1;
  }

  .session-chip {
    justify-content: center;
  }

  .workspace {
    flex: none;
    grid-template-columns: 1fr;
  }

  .market-panel {
    height: min(720px, calc(100dvh - 24px));
  }

  .inspector {
    height: auto;
    min-height: 480px;
  }

  .table-wrap {
    max-height: none;
  }

  .inspector #instrumentDetails {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .instrument-head,
  .market-identity,
  .basis-hero {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .terminal {
    padding: 8px;
  }

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

  .brand-sub,
  .server-clock,
  .compact-stats {
    display: none;
  }

  .session-chip {
    width: 100%;
  }

  .workspace {
    gap: 8px;
  }

  .panel-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px;
  }

  .toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .filter-control {
    flex: 1 1 132px;
  }

  .segmented {
    flex: 0 0 auto;
  }

  .search-box {
    flex: 1 1 180px;
    width: auto;
  }

  .reset-filter-button {
    flex: 0 0 auto;
  }

  .table-footer span:nth-child(n + 2) {
    display: none;
  }

  .inspector #instrumentDetails {
    display: block;
  }

  .empty-inspector {
    min-height: 360px;
    padding: 24px;
  }

}

@media (max-width: 420px) {
  .login-shell {
    padding: 14px;
  }

  .pin-inputs {
    gap: 8px;
  }

  .pin-digit {
    height: 54px;
  }

  .brand-name {
    font-size: 12px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .ghost-button {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar {
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
