@font-face {
  font-family: Inter;
  src: url("./fonts/Inter-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("./fonts/Inter-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("./fonts/Inter-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #101215;
  --sidebar: #15181c;
  --panel: #191d22;
  --field: #121519;
  --border: #2c323a;
  --text: #f1f3f5;
  --muted: #9199a5;
  --yellow: #f3c54a;
  --selected: #302a1b;
  --green: #54c99a;
  --red: #ed777e;
  --radius: 8px;
}
* {
  box-sizing: border-box;
  letter-spacing: 0;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    400 14px/22px Inter,
    Arial,
    sans-serif;
}
h1,
h2,
p,
dl,
dd {
  margin: 0;
}
h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 38px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled,
[aria-disabled="true"] {
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}
.caption {
  font-size: 12px;
  line-height: 18px;
}
.muted {
  color: var(--muted);
}
.yellow {
  color: var(--yellow);
}
.positive {
  color: var(--green);
}
.medium {
  font-weight: 500;
}
hr {
  width: 100%;
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--sidebar);
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand strong {
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
}
.desktop-nav {
  display: grid;
  gap: 8px;
  margin-top: 56px;
}
.desktop-nav a {
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 500;
}
.desktop-nav a[aria-current] {
  background: var(--selected);
  color: var(--yellow);
}
.sidebar-footer {
  margin-top: auto;
  padding-bottom: 116px;
  display: grid;
  gap: 8px;
}
.workspace {
  margin-left: 224px;
  min-height: 100vh;
}
.desktop-header {
  height: 75px;
  border-bottom: 1px solid var(--border);
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.mode-badge {
  font-size: 12px;
  line-height: 18px;
  color: var(--yellow);
  background: var(--selected);
  padding: 8px;
  border-radius: var(--radius);
}
.text-button {
  padding: 0;
  border: 0;
  background: none;
}
.mobile-header {
  display: none;
}
main {
  padding: 32px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.heading-subtitle {
  margin-top: 4px;
}
.surface {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.controls {
  gap: 20px;
}
.control-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 90px;
}
.statuses {
  display: grid;
  gap: 12px;
}
.statuses > div {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  min-height: 34px;
}
.statuses dt {
  color: var(--muted);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 18px;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--field);
}
.mode-selector {
  width: 404px;
  display: grid;
  gap: 8px;
  flex-shrink: 0;
}
.segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.segment {
  border: 0;
  background: var(--field);
  color: var(--muted);
  border-radius: var(--radius);
  padding: 8px;
  min-height: 38px;
  font-weight: 500;
  opacity: 0.48;
}
.segment.selected {
  background: var(--selected);
  color: var(--yellow);
  opacity: 1;
}
.robot-actions {
  display: flex;
  gap: 12px;
}
.button {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  text-align: center;
}
.danger {
  color: var(--red);
}
.primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--bg);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.section-heading a,
.position-card a {
  font-weight: 500;
}
.results {
  gap: 20px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.metrics > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.metric {
  font-size: 32px;
  font-weight: 500;
  line-height: 40px;
  overflow-wrap: anywhere;
}
.positions {
  gap: 16px;
}
.positions-table {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.position-columns,
.position-row {
  display: grid;
  grid-template-columns: 246fr 148fr 374fr 224fr;
  gap: 32px;
}
.position-row {
  min-height: 56px;
  align-items: center;
}
.position-row > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.position-summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.position-row p {
  overflow-wrap: anywhere;
}
.overview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mobile-positions {
  display: none;
}
dialog#mobile-menu {
  border: 0;
  padding: 16px;
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  background: var(--bg);
  color: var(--text);
}
#mobile-menu[open] {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
#mobile-menu::backdrop {
  background: var(--bg);
}
.menu-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.menu-heading button {
  width: 120px;
}
.mobile-nav {
  display: grid;
  gap: 24px;
}
.mobile-nav .button,
#mobile-menu > .button {
  width: 100%;
}
.menu-open {
  overflow: hidden;
}
@media (max-width: 1200px) and (min-width: 901px) {
  main,
  .desktop-header {
    padding-left: 24px;
    padding-right: 24px;
  }
  .control-top {
    align-items: flex-start;
  }
  .mode-selector {
    width: 320px;
  }
  .robot-actions {
    flex-wrap: wrap;
  }
  .position-columns,
  .position-row {
    gap: 16px;
  }
  .metric {
    font-size: 26px;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .sidebar-footer {
    padding-bottom: 20px;
  }
}
@media (max-width: 900px) {
  .sidebar,
  .desktop-header {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
    min-height: 80px;
  }
  .mobile-header strong {
    font-size: 14px;
    font-weight: 500;
  }
  .mobile-header .button {
    width: 78px;
    flex-shrink: 0;
  }
  main {
    padding: 24px 16px 32px;
    gap: 16px;
  }
  h1 {
    font-size: 26px;
  }
  .page-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .surface {
    padding: 16px;
  }
  .controls {
    gap: 16px;
  }
  .control-top {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .statuses > div {
    gap: 12px;
    align-items: center;
  }
  .statuses dt {
    width: 130px;
    flex-shrink: 0;
  }
  .mode-selector {
    width: 100%;
    min-width: 0;
  }
  .segments {
    gap: 12px;
  }
  .segment {
    text-align: left;
  }
  .robot-actions {
    flex-direction: column;
    gap: 12px;
  }
  .robot-actions .button {
    width: 100%;
  }
  .results {
    gap: 16px;
  }
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .metrics {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .metric {
    font-size: 26px;
  }
  .positions-table {
    display: none;
  }
  .mobile-positions {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .position-card {
    background: var(--field);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
  }
  .price-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .price-pair > div {
    display: grid;
    gap: 4px;
  }
  .overview-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
