#equity-chart { width: 100%; height: auto; }
.equity-line { stroke: #0047ff; fill: none; stroke-width: 2; }
.benchmark-line { stroke: #818794; fill: none; stroke-width: 2; }
#workspace-boundary { padding: 14px 24px; margin: 0; }
.schedule-toggle { display: block; margin-top: 8px; }
:root {
  color-scheme: light dark;
  --canvas: #f5f5f7;
  --surface: #fff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d8d8dc;
  --blue: #002fa7;
  --red: #b42318;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font:
    14px/1.45 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  background: var(--surface);
  padding: 10px;
  z-index: 9;
}
.skip:focus {
  top: 10px;
}
header {
  min-height: 82px;
  padding: 16px 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
h1 {
  font-size: 22px;
  margin: 1px 0;
}
.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 10px;
  letter-spacing: 1.2px;
  font-weight: 800;
}
.mode {
  font-size: 11px;
  font-weight: 700;
}
.mode span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #d97706;
  border-radius: 50%;
  margin-right: 7px;
}
.wallet-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 6px 12px; margin-inline-start: auto; min-width: 0; }
.wallet-controls button { min-height: 38px; }
.wallet-controls a { color: var(--blue); font-weight: 700; text-decoration: none; }
.wallet-controls small { grid-column: 1 / -1; color: var(--muted); max-width: 360px; overflow-wrap: anywhere; }
.private-session-controls { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 26px; border-bottom: 1px solid var(--line); background: var(--surface); min-width: 0; }
.private-session-controls button, .private-session-controls a { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.private-session-controls small { flex-basis: 100%; color: var(--muted); overflow-wrap: anywhere; }
.private-session-controls [hidden] { display: none; }
.shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: calc(100vh - 82px);
}
aside {
  min-width: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
nav {
  max-width: 100%;
  padding: 16px 10px;
}
nav button {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--muted);
}
nav button.active {
  background: color-mix(in srgb, var(--blue) 8%, transparent);
  color: var(--blue);
  font-weight: 700;
}
aside footer {
  padding: 18px;
  border-top: 1px solid var(--line);
}
aside footer label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
select,
input {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
main {
  min-width: 0;
}
.toolbar {
  height: 66px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.toolbar small {
  display: block;
  color: var(--muted);
}
button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 9px 13px;
  border-radius: 7px;
  cursor: pointer;
}
.view {
  display: none;
  padding: 28px;
  max-width: 1300px;
}
.view.active {
  display: block;
}
h2 {
  font-size: 23px;
  margin: 0 0 6px;
}
.lead {
  color: var(--muted);
  max-width: 760px;
  margin: 0 0 24px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 26px;
}
.inspector {
  border-left: 1px solid var(--line);
  padding-left: 22px;
  background: transparent;
}
.inspector h3 {
  margin-top: 0;
}
.inspector dl div {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.inspector dt {
  color: var(--muted);
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 16px;
}
.fields label {
  font-size: 12px;
  color: var(--muted);
}
.fields input,
.fields select {
  margin-top: 5px;
  color: var(--text);
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  margin-top: 18px;
}
.secondary {
  margin-right: 8px;
}
.destructive {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 40%, var(--line));
}
.table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line);
  margin-top: 22px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.notice {
  border-left: 3px solid #d97706;
  padding: 8px 18px;
  max-width: 760px;
  background: var(--surface);
}
.notice p {
  color: var(--muted);
}
.testnet-workspace {
  align-items: start;
  margin-top: 22px;
}
.testnet-workspace form {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: var(--surface);
}
.testnet-workspace .wide {
  grid-column: 1 / -1;
}
.testnet-workspace .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.testnet-workspace .actions button {
  margin: 0;
}
.payload {
  max-height: 220px;
  overflow: auto;
  margin: 16px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--canvas);
  color: var(--text);
}
.danger {
  color: var(--red);
  font-weight: 700;
}
.timeline {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}
.timeline li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 160px 1fr 180px;
  gap: 12px;
}
.timeline code {
  font-size: 11px;
  color: var(--muted);
}
#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 420px;
  background: #1d1d1f;
  color: white;
  padding: 12px 15px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#toast.show {
  opacity: 1;
}
[dir="rtl"] nav button,
[dir="rtl"] th,
[dir="rtl"] td {
  text-align: right;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --muted: #aaa;
    --line: #39393d;
    --blue: #6d91ff;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (max-width: 760px) {
  header {
    padding: 16px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }
  .wallet-controls { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 0; }
  .wallet-controls small { max-width: none; }
  .mode {
    max-width: 120px;
    text-align: right;
  }
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .shell > aside {
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  nav {
    display: flex;
    overflow: auto;
    padding: 8px;
  }
  nav button {
    width: auto;
    white-space: nowrap;
  }
  .shell > aside footer {
    display: block;
    padding: 8px 14px 12px;
  }
  .shell > aside footer label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .view {
    padding: 20px 14px;
  }
  .toolbar {
    padding: 0 14px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .inspector {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 18px 0;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .timeline li {
    grid-template-columns: 1fr;
  }
  .toolbar small {
    display: none;
  }
}
