/* Only the simulator uses a dark workspace. Site navigation uses studio.css. */
.terminal-surface {
  color-scheme: dark;
  --canvas: #101017; --surface: #191922; --raised: #252531; --rule: #383847;
  --text: #f2f0f8; --faint: #b8b7c7; --highlight: #c2b7ff; --up: #76dfba; --down: #ff9396;
  background: var(--canvas); color: var(--text);
}
.desk-wrap { width: min(1420px, calc(100% - 2 * clamp(12px, 4vw, 62px))); margin-inline: auto; padding-bottom: 36px; min-height: 60vh; }
.desk-bar { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px clamp(14px, 3vw, 46px); padding-top: 10px; border-bottom: 1px solid var(--rule); }
.desk-bar strong { color: var(--highlight); font-size: .93rem; }
.desk-tabs { display: flex; flex-wrap: wrap; gap: 0 clamp(10px, 2vw, 27px); }
.desk-tabs a { padding: 10px 0; font-size: .87rem; color: var(--faint); border-bottom: 2px solid transparent; }
.desk-tabs [aria-current] { border-color: var(--highlight); color: var(--text); }
.terminal-surface :is(h1, h2, h3, p, dd) { margin: 0; }
.terminal-surface h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.055em; font-weight: 600; line-height: 1.05; }
.terminal-surface h2 { font-size: 1.12rem; letter-spacing: -.025em; }
.terminal-surface h3 { font-size: .9rem; }
.terminal-surface small, .terminal-surface .muted { color: var(--faint); font-size: .82rem; }
.terminal-surface .up { color: var(--up); }
.terminal-surface .down { color: var(--down); }
.terminal-surface :is(.pagelead, .charthead, .cardtitle, .tools, .chartfoot, .level) { display: flex; align-items: center; gap: 10px; }
.terminal-surface :is(.pagelead, .cardtitle, .chartfoot, .level) { justify-content: space-between; }
.terminal-surface .pagelead { margin: 26px 0 16px; align-items: end; }
.terminal-surface .eyebrow { margin-bottom: 6px; color: var(--highlight); font: 600 .7rem ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.terminal-surface .clock { color: var(--faint); font: .82rem ui-monospace, monospace; }
.terminal-surface .notice { margin: 1rem 0; padding: .8rem; border-left: 3px solid var(--highlight); background: var(--raised); color: var(--text); }
.terminal-surface .workspace { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(260px, .85fr); gap: 14px; }
.terminal-surface :is(.card, .metrics > div) { min-width: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
.terminal-surface .ribbon { display: flex; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: thin; }
.terminal-surface .ribbon a { flex: 1 0 125px; display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; padding: 12px; border-right: 1px solid var(--rule); font: 600 .78rem ui-monospace, monospace; }
.terminal-surface .ribbon strong { grid-column: 1 / -1; }
.terminal-surface .ribbon small { font-size: .72rem; font-weight: 400; }
.terminal-surface :is(.charthead, .cardtitle, .panelheading, .tools, .chartfoot) { padding: 14px clamp(12px, 1.65vw, 22px); }
.terminal-surface .charthead h2, .terminal-surface .panelheading h2 { font-size: 1.35rem; }
.terminal-surface .round { flex: none; width: 37px; height: 37px; display: grid; place-items: center; background: #e4ad59; color: #1a1713; border-radius: 50%; font-size: 1.35rem; font-weight: bold; }
.terminal-surface .bigprice { margin-left: auto; text-align: right; font: 600 clamp(1.08rem, 2.3vw, 2.05rem) ui-monospace, monospace; letter-spacing: -.055em; }
.terminal-surface .bigprice small, .terminal-surface .bigprice span:last-child { letter-spacing: 0; font-size: .72rem; }
.terminal-surface .bigprice span:last-child { display: block; line-height: 1.6; }
.terminal-surface .tools { flex-wrap: wrap; border-block: 1px solid var(--rule); gap: 6px; font-size: .82rem; padding-block: 8px; }
.terminal-surface .tools div { display: flex; gap: 3px; }
.terminal-surface .tools a, .terminal-surface #ma { display: inline-block; padding: 6px 8px; border-radius: 3px; }
.terminal-surface #ma { background: transparent; color: var(--text); border: 1px solid var(--rule); margin-left: auto; font: inherit; }
.terminal-surface .tools [aria-current], .terminal-surface #ma[aria-pressed=true] { background: #343044; color: var(--highlight); }
.terminal-surface .plot { padding: 10px 8px 3px; }
.terminal-surface .ohlc { min-height: 20px; margin-left: 6px; color: var(--faint); font: .72rem ui-monospace, monospace; }
.terminal-surface canvas { display: block; width: 100%; height: clamp(260px, 26vw, 425px); touch-action: pan-y; }
.terminal-surface .chartfoot { border-top: 1px solid var(--rule); color: var(--faint); font: .72rem ui-monospace, monospace; }
.terminal-surface .cardtitle { border-bottom: 1px solid var(--rule); font-size: .83rem; }
.terminal-surface :is(.cardtitle a, .empty a) { color: var(--highlight); }
.terminal-surface .orderticket form { display: grid; gap: 8px; padding: 0 clamp(12px, 1.65vw, 22px) 18px; }
.terminal-surface .order-side { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; border: 0; padding: 3px; margin: 0 0 5px; border-radius: 5px; background: var(--canvas); }
.terminal-surface .order-side label { position: relative; text-align: center; cursor: pointer; }
.terminal-surface .order-side input { position: absolute; opacity: 0; }
.terminal-surface .order-side span { display: block; padding: 8px; border-radius: 4px; font-weight: 650; }
.terminal-surface .order-side input[value=buy]:checked + span { background: #203f35; color: var(--up); }
.terminal-surface .order-side input[value=sell]:checked + span { background: #4b2a32; color: var(--down); }
.terminal-surface .order-side input:focus-visible + span { outline: 2px solid var(--highlight); }
.terminal-surface .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(100%); }
.terminal-surface .orderticket label { display: block; color: var(--faint); font-size: .86rem; }
.terminal-surface .orderticket label small { float: right; }
.terminal-surface .orderticket :is(select, input:not([type=radio]):not([type=hidden])) { width: 100%; min-width: 0; padding: .65rem .78rem; border: 1px solid #505061; border-radius: 4px; font: inherit; color: var(--text); background: var(--canvas); }
.terminal-surface #limitrow label { margin-bottom: 6px; }
.terminal-surface .ticketnums { margin: 5px 0; font-size: .82rem; }
.terminal-surface .ticketnums div { display: flex; justify-content: space-between; gap: 7px; line-height: 1.7; }
.terminal-surface .ticketnums dt { color: var(--faint); }
.terminal-surface :is(.primary, .minor) { display: inline-block; border-radius: 5px; text-align: center; font: inherit; font-weight: 600; padding: .62rem .85rem; }
.terminal-surface .primary { border: 1px solid var(--highlight); color: #201939; background: var(--highlight); }
.terminal-surface .minor { border: 1px solid var(--rule); color: var(--text); background: var(--raised); font-size: .82rem; }
.terminal-surface :is(.scroll, .wide, .markets-card) { overflow-x: auto; }
.terminal-surface table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.terminal-surface :is(td, th) { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--rule); }
.terminal-surface th { color: var(--faint); white-space: nowrap; font-size: .74rem; font-weight: 500; }
.terminal-surface :is(td, th):first-child { text-align: left; }
.terminal-surface tr:last-child td { border-bottom: 0; }
.terminal-surface td small { margin-left: 6px; }
.terminal-surface .book { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 15px; }
.terminal-surface .book > div + div { border-left: 1px solid var(--rule); padding-left: 12px; }
.terminal-surface .book h3 { color: var(--faint); margin-bottom: 8px; }
.terminal-surface .level { gap: 4px; padding: 4px 0; font: .78rem ui-monospace, monospace; }
.terminal-surface .level b { font-weight: 500; }
.terminal-surface .metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.terminal-surface .metrics > div { padding: 16px; }
.terminal-surface .metrics strong { display: block; margin-top: 8px; font: 600 clamp(1rem, 2vw, 1.6rem) ui-monospace, monospace; overflow-wrap: anywhere; }
.terminal-surface .empty { padding: 1.8rem .8rem; color: var(--faint); text-align: center; }
@media (max-width: 880px) {
  .terminal-surface .workspace { grid-template-columns: minmax(0, 1.55fr) minmax(245px, 1fr); }
  .terminal-surface .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .terminal-surface .workspace { grid-template-columns: minmax(0, 1fr); }
  .terminal-surface .depth { grid-row: 3; }
  .terminal-surface .pagelead { margin: 20px 0 12px; }
  .terminal-surface :is(td, th) { padding: 9px 8px; }
  .terminal-surface td small { display: block; margin-left: 0; }
}
@media (max-width: 390px) {
  .desk-tabs { column-gap: 11px; }
  .desk-tabs a { font-size: .8rem; }
  .terminal-surface .charthead { gap: 6px; }
  .terminal-surface .charthead h2 { font-size: 1.07rem; }
  .terminal-surface .round { width: 29px; height: 29px; }
  .terminal-surface .metrics > div { padding: 10px; }
  .terminal-surface .tools { gap: 4px; }
  .terminal-surface .tools a, .terminal-surface #ma { padding-inline: 5px; }
}
