@font-face {
  font-family:Ubuntu Sans;
  src:url('fonts/ubuntu-sans.ttf') format('truetype');
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
}
:root {
  color-scheme:dark;
  --bg:#131715;
  --surface:#1b211e;
  --surface-alt:#222a25;
  --input:#151b17;
  --text:#eef2eb;
  --muted:#adb9af;
  --line:#38463c;
  --accent:#c1e987;
  --accent-text:#172611;
  --accent-soft:#293923;
  --green:#a4deb6;
  --red:#f3aca7;
  --green-bg:#23332a;
  --red-bg:#332724;
  --shadow:0 12px 36px #0000000a;
  --font:'Ubuntu Sans','Segoe UI',sans-serif;
}
:root[data-theme=light] {
  color-scheme:light;
  --bg:#f3f4ee;
  --surface:#ffffff;
  --surface-alt:#f3f6f0;
  --input:#fafbf8;
  --text:#202c24;
  --muted:#5b695f;
  --line:#d4dcd2;
  --accent:#315e2c;
  --accent-text:#ffffff;
  --accent-soft:#e7efdc;
  --green:#28613d;
  --red:#a23e39;
  --green-bg:#edf5ee;
  --red-bg:#fbefeb;
  --shadow:0 12px 36px #23302005;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:16px/1.5 var(--font);
  -webkit-font-smoothing:antialiased;
}
button,input,a {
  -webkit-tap-highlight-color:transparent;
}
button,input {
  font:inherit;
}
button,a {
  touch-action:manipulation;
}
button {
  cursor:pointer;
  color:inherit;
}
button {
  transition:border-color .15s,box-shadow .15s;
}
button:disabled {
  cursor:not-allowed;
  opacity:.4;
}
button:focus-visible,a:focus-visible,summary:focus-visible {
  outline:3px solid var(--accent);
  outline-offset:4px;
}
a {
  color:inherit;
}
h1,h2,h3,p {
  margin:0;
}
button svg {
  pointer-events:none;
}
.svg-library {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}
.icon {
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0;
}
.hidden {
  display:none!important;
}
.app-container {
  max-width:1280px;
  padding:0 40px;
  margin:auto;
  padding-bottom:16px;
}
.app-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:60px;
  border-bottom:1px solid var(--line);
  gap:20px;
}
.brand {
  display:flex;
  align-items:center;
  gap:13px;
  text-decoration:none;
  font-size:16px;
  font-weight:750;
  letter-spacing:.035em;
}
.brand-light {
  font-weight:450;
  color:var(--muted);
}
.brand-mark {
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  background:var(--accent);
  color:var(--accent-text);
  border-radius:10px;
}
.brand-mark svg {
  width:28px;
  height:28px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.5;
}
.theme-switch {
  display:flex;
  padding:4px;
  gap:3px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
}
.theme-switch button {
  display:flex;
  align-items:center;
  gap:8px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--muted);
  padding:8px 12px;
  min-height:40px;
  font-size:14px;
}
.theme-switch button[aria-pressed=true] {
  background:var(--surface-alt);
  color:var(--text);
}
.theme-switch .icon {
  width:17px;
  height:17px;
}

.setup-panel {
  margin-top:12px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  margin-bottom:24px;
  overflow:hidden;
}
.mode-tabs {
  display:grid;
  grid-template-columns:1fr 1fr;
  padding:7px;
  gap:7px;
}
.tab-btn {
  display:flex;
  align-items:center;
  gap:16px;
  text-align:left;
  padding:16px 20px;
  background:transparent;
  border:1px solid transparent;
  border-radius:10px;
  font-weight:600;
  font-size:17px;
  line-height:1.4;
  color:var(--muted);
}
.tab-btn .icon {
  width:24px;
  height:24px;
}
.tab-btn small {
  display:block;
  font-size:13px;
  font-weight:400;
  color:var(--muted);
  margin-top:2px;
}
.tab-btn[aria-pressed=true] {
  background:var(--accent-soft);
  border-color:var(--line);
  color:var(--text);
}
.tab-btn[aria-pressed=true]>.icon {
  color:var(--accent);
}
.tab-btn:hover {
  background:var(--surface-alt);
}
.strategy-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:16px 26px;
  border-top:1px solid var(--line);
  min-height:79px;
}
.strategy-control {
  display:flex;
  align-items:center;
  gap:18px;
}
.group-label,.strategy-description {
  font-size:14px;
  color:var(--muted);
}
.segmented {
  display:flex;
  gap:4px;
  background:var(--input);
  padding:3px;
  border:1px solid var(--line);
  border-radius:8px;
}
.segmented button {
  border:0;
  background:transparent;
  color:var(--muted);
  padding:7px 14px;
  min-height:36px;
  border-radius:5px;
  font-size:14px;
  font-weight:550;
}
.segmented button[aria-pressed=true] {
  background:var(--surface-alt);
  color:var(--text);
  box-shadow:0 1px 4px #0000000d;
}
.direction-flow {
  display:flex;
  gap:18px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
}
.direction-flow strong {
  margin-left:7px;
  font-size:12px;
  color:var(--text);
  letter-spacing:.05em;
}
.direction-flow>.icon {
  width:17px;
}
.calculator-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  align-items:stretch;
}
.calc-card {
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:16px;
  min-width:0;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.card-header {
  padding:23px 28px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-bottom:1px solid var(--line);
}
h2 {
  font-size:19px;
  line-height:1.3;
  font-weight:600;
  letter-spacing:-.02em;
}
.card-header h2 {
  display:flex;
  gap:13px;
  align-items:center;
}
.section-number {
  font-size:12px;
  font-weight:500;
  color:var(--muted);
  letter-spacing:.04em;
}
.header-hint,.live-status {
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}
.live-status {
  display:flex;
  align-items:center;
  gap:6px;
}
.live-status:before {
  content:'';
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--accent);
}
.live-status.invalid:before {
  background:var(--red);
}
.form-body {
  padding:26px 28px 22px;
}
.capital-grid {
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:20px;
}
label {
  font-weight:550;
  font-size:15px;
  display:block;
}
.field>.input-wrap {
  margin-top:9px;
}
.input-wrap {
  position:relative;
  display:flex;
  align-items:center;
  min-width:0;
}
.input-wrap input {
  display:block;
  width:100%;
  min-width:0;
  border:1px solid var(--line);
  background:var(--input);
  color:var(--text);
  border-radius:8px;
  height:54px;
  padding:12px 37px 12px 15px;
  font-size:20px;
  font-weight:500;
  font-variant-numeric:tabular-nums;
  outline:none;
  transition:border-color .15s,box-shadow .15s;
}
.input-wrap input:hover {
  border-color:var(--muted);
}
.input-wrap input:focus {
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
.input-wrap input[aria-invalid=true] {
  border-color:var(--red);
}
.input-wrap input::placeholder {
  font-size:15px;
  color:var(--muted);
  font-weight:400;
}
.input-wrap>span {
  position:absolute;
  right:16px;
  color:var(--muted);
  pointer-events:none;
}
.field-help {
  font-size:13px;
  color:var(--muted);
  line-height:1.5;
  margin-top:7px;
}
.risk-shortcuts {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:20px;
}
.risk-shortcuts>span {
  color:var(--muted);
  font-size:13px;
}
.quick-chips {
  display:flex;
  gap:7px;
}
.chip {
  border:1px solid var(--line);
  border-radius:6px;
  background:transparent;
  padding:5px 11px;
  font-size:13px;
  min-height:34px;
}
.chip:hover,.chip[aria-pressed=true] {
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--accent);
}

.price-fields {
  display:flex;
  flex-direction:column;
  gap:22px;
  margin-top:20px;
}
.price-row {
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:18px;
  align-items:center;
}
.price-row label {
  display:flex;
  align-items:center;
  gap:8px;
}
.price-row .field-help {
  font-size:12px;
  max-width:230px;
  margin-top:4px;
}
.price-row input {
  text-align:right;
  font-size:19px;
}
.level-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--muted);
  flex-shrink:0;
}
.target-dot {
  background:var(--green);
}
.fail-dot {
  background:var(--red);
}

.validation-alert {
  color:var(--red);
  border-left:2px solid var(--red);
  padding:10px 12px;
  background:var(--red-bg);
  font-size:14px;
  margin-top:20px;
  border-radius:0 5px 5px 0;
}
.output-card {
  background:var(--surface-alt);
  display:flex;
  flex-direction:column;
}
.results-body {
  padding:24px 28px 16px;
  flex:1;
}
.position-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:var(--muted);
  font-size:11px;
  letter-spacing:.08em;
}
.subtle-label {
  color:var(--muted);
  font-size:13px;
  letter-spacing:0;
}
.position-value {
  display:flex;
  align-items:center;
  gap:12px;
  margin:9px 0 15px;
  min-width:0;
}
.position-value>span:first-child {
  font-size:clamp(30px,4.3vw,58px);
  line-height:1.2;
  font-weight:500;
  letter-spacing:-.055em;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
  min-width:0;
}
.value-unit {
  align-self:flex-end;
  color:var(--muted);
  font-size:25px;
  padding-bottom:6px;
}
.icon-button {
  display:grid;
  place-items:center;
  background:transparent;
  border:1px solid var(--line);
  border-radius:8px;
  min-width:40px;
  min-height:40px;
  color:var(--muted);
  margin-left:auto;
}
.icon-button:hover {
  color:var(--text);
  background:var(--surface);
}
.icon-button.small {
  border:0;
  min-width:36px;
  min-height:36px;
}
.icon-button.small .icon {
  width:17px;
  height:17px;
}
.token-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--line);
  padding-bottom:16px;
  font-size:14px;
  color:var(--muted);
}
.token-row>div {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.token-row strong {
  font-weight:550;
  font-size:17px;
  font-variant-numeric:tabular-nums;
  color:var(--text);
  overflow-wrap:anywhere;
}
.outcomes {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:23px 0;
}
.outcome {
  padding:16px;
  border-radius:9px;
  border:1px solid var(--line);
  min-width:0;
}
.outcome.loss {
  background:var(--red-bg);
}
.outcome.profit {
  background:var(--green-bg);
}
.outcome p {
  font-size:13px;
  color:var(--text);
  font-weight:500;
}
.outcome strong {
  display:block;
  font-size:26px;
  letter-spacing:-.025em;
  font-weight:550;
  line-height:1.5;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
  margin:5px 0;
}
.loss strong,.text-red {
  color:var(--red);
}
.profit strong,.text-green {
  color:var(--green);
}
.outcome>span {
  display:block;
  font-size:12px;
  color:var(--muted);
}
.metrics {
  display:grid;
  gap:12px;
  margin:0;
}
.metrics>div {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:baseline;
}
.metrics dt {
  font-size:14px;
  color:var(--muted);
}
.metrics dd {
  font-size:16px;
  font-weight:550;
  white-space:nowrap;
  margin:0;
  font-variant-numeric:tabular-nums;
}
.metric-hint {
  font-size:11px;
  display:block;
}
.distance-info {
  font-size:12px;
  color:var(--muted);
  margin-top:19px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.result-footnote {
  border-top:1px solid var(--line);
  padding:14px 28px;
  font-size:12px;
  color:var(--muted);
}

.toast {
  position:fixed;
  bottom:26px;
  left:50%;
  transform:translate(-50%,12px);
  background:var(--text);
  color:var(--bg);
  padding:12px 22px;
  border-radius:9px;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s,transform .2s;
  font-size:14px;
  z-index:10;
  max-width:calc(100% - 32px);
  text-align:center;
  box-shadow:0 8px 32px #0003;
}
.toast.show {
  opacity:1;
  transform:translate(-50%,0);
}
.skip-link {
  position:absolute;
  left:20px;
  top:-80px;
  background:var(--accent);
  color:var(--accent-text);
  padding:12px;
  z-index:20;
  border-radius:8px;
}
.skip-link:focus {
  top:12px;
}
@media(max-width:1100px) {
  .app-container {
    padding:0 28px;
  }
  .strategy-row {
    padding:16px 20px;
  }
  .direction-flow {
    gap:10px;
  }
  .card-header {
    padding:22px;
  }
  .form-body,.results-body {
    padding:22px;
  }
  .capital-grid {
    gap:12px;
  }
  .price-row {
    grid-template-columns:1fr 1fr;
    gap:12px;
  }
  .quick-chips {
    gap:5px;
  }
  .chip {
    padding:5px 9px;
  }
  .outcome {
    padding:13px;
  }
  .outcome strong {
    font-size:23px;
  }
  .metric-hint {
    display:block;
  }

}
@media(max-width:850px) {
  .calculator-grid {
    grid-template-columns:1fr;
    gap:18px;
  }
  .app-container {
    max-width:700px;
    padding:0 24px;
  }
  .strategy-row {
    flex-wrap:wrap;
    gap:14px;
  }
  .strategy-control {
    justify-content:space-between;
    width:100%;
  }
  .direction-flow {
    width:100%;
    justify-content:center;
    border-top:1px solid var(--line);
    padding-top:14px;
  }
  .strategy-description {
    font-size:12px;
  }
  .tab-btn {
    padding:14px;
    gap:12px;
    font-size:15px;
  }
  .tab-btn small {
    font-size:11px;
  }
  .position-value>span:first-child {
    font-size:54px;
  }
  .outcome strong {
    font-size:28px;
  }
  .form-body,.results-body {
    padding:24px;
  }
  .price-row input {
    font-size:20px;
  }

  .metric-hint {
    display:inline;
    margin-left:6px;
  }

  .card-header {
    padding:22px 24px;
  }
  .outcomes {
    margin:22px 0;
  }
  .theme-switch button {
    padding:8px 10px;
  }
}
@media(max-width:480px) {
  .app-container {
    padding:0 16px;
  }
  .app-header {
    min-height:60px;
    gap:10px;
  }
  .brand {
    font-size:12px;
    gap:9px;
  }
  .brand-mark {
    width:33px;
    height:33px;
  }
  .theme-switch button {
    padding:8px;
    min-height:36px;
  }
  .theme-switch button span {
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip-path:inset(50%);
  }
  .tab-btn {
    padding:12px 10px;
    gap:8px;
    font-size:13px;
    align-items:flex-start;
  }
  .tab-btn>.icon {
    width:18px;
    height:18px;
    margin-top:2px;
  }
  .tab-btn small {
    font-size:11px;
    line-height:1.5;
    margin-top:5px;
  }
  .strategy-row {
    padding:14px;
  }
  .group-label {
    font-size:13px;
  }
  .segmented button {
    padding:7px 10px;
    font-size:13px;
  }
  .strategy-control {
    gap:10px;
  }
  .direction-flow {
    font-size:12px;
    gap:14px;
  }
  .direction-flow strong {
    font-size:11px;
  }
  .card-header {
    padding:19px;
  }
  .card-header h2 {
    font-size:18px;
    gap:10px;
  }
  .form-body,.results-body {
    padding:20px 18px;
  }
  .capital-grid {
    gap:12px;
    grid-template-columns:1.15fr 1fr;
  }
  .field-help {
    font-size:12px;
  }
  .input-wrap input {
    font-size:18px;
    padding-left:12px;
  }
  .risk-shortcuts {
    gap:10px;
  }
  .risk-shortcuts>span {
    font-size:12px;
  }
  .quick-chips {
    gap:4px;
  }
  .chip {
    padding:5px 8px;
    min-height:36px;
    font-size:12px;
  }
  .price-row {
    gap:12px;
    grid-template-columns:1fr 1fr;
  }
  .price-row input {
    font-size:17px;
  }
  .price-row .field-help {
    font-size:11px;
  }
  .price-row label {
    font-size:14px;
  }
  .price-fields {
    gap:22px;
  }

  .position-value {
    gap:8px;
  }
  .position-value>span:first-child {
    font-size:46px;
  }
  .value-unit {
    font-size:23px;
  }
  .position-head {
    font-size:10px;
    gap:8px;
  }
  .outcomes {
    gap:10px;
  }
  .outcome {
    padding:13px 11px;
  }
  .outcome p {
    font-size:12px;
  }
  .outcome strong {
    font-size:24px;
  }
  .outcome>span {
    font-size:11px;
  }
  .metrics dt {
    font-size:13px;
  }
  .metric-hint {
    display:block;
    margin:0;
  }
  .metrics dd {
    font-size:15px;
  }
  .result-footnote {
    padding:13px 18px;
    font-size:11px;
  }

  .token-row strong {
    font-size:16px;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition:none!important;
    scroll-behavior:auto!important;
  }
}

/* Balanced desktop spacing, with the calculator still visible on one screen. */
@media (min-width: 851px) {
  .app-header { min-height: 62px; }
  .brand-mark { width: 32px; height: 32px; }
  .theme-switch { padding: 3px; }
  .theme-switch button { min-height: 32px; padding: 5px 10px; }
  .setup-panel { margin-top: 12px; margin-bottom: 18px; }
  .mode-tabs { padding: 4px; gap: 4px; }
  .tab-btn { padding: 10px 18px; font-size: 15px; }
  .tab-btn small { display: inline; margin-left: 12px; font-size: 12px; }
  .strategy-row { min-height: 50px; padding: 6px 22px; }
  .segmented { padding: 2px; }
  .segmented button { min-height: 30px; padding: 4px 12px; }
  .calculator-grid { gap: 22px; }
  .card-header { padding: 13px 24px; }
  .card-header h2 { font-size: 18px; }
  .form-body { padding: 18px 24px; }
  .results-body { padding: 16px 24px; }
  .field > .input-wrap { margin-top: 7px; }
  .input-wrap input { height: 44px; padding-top: 9px; padding-bottom: 9px; font-size: 18px; }
  .field-help { margin-top: 5px; font-size: 12px; }
  .risk-shortcuts { margin-top: 14px; }
  .chip { min-height: 32px; padding: 4px 10px; }

  .price-fields { gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
  .price-row .field-help { margin-top: 4px; }

  .position-value { margin: 5px 0 8px; }
  .position-value > span:first-child { font-size: 42px; }
  .value-unit { font-size: 22px; padding-bottom: 4px; }
  .token-row { padding-bottom: 10px; }
  .icon-button.small { min-height: 28px; min-width: 28px; }
  .outcomes { margin: 12px 0; }
  .outcome { padding: 12px 14px; line-height: 1.4; }
  .outcome strong { font-size: 24px; margin: 0; line-height: 1.3; }
  .metrics { gap: 9px; line-height: 1.4; }
  .metric-hint { display: inline; margin-left: 6px; }
  .distance-info { margin-top: 12px; padding-top: 8px; }
  .result-footnote { padding: 9px 24px; }

}

/* Fixed-position field help escapes card clipping and stays inside the viewport. */
/* The entire label is the hit target; no separate information icon. */
.help-label { position: relative; display: inline-flex; align-items: center; max-width: 100%; cursor: help; }
.help-button { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 3px; background: transparent; cursor: help; }
.help-label:has(.help-button:hover), .help-label:has(.help-button:focus-visible) { color: var(--accent); }
.help-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.field-tooltip { position: fixed; z-index: 30; display: block; width: 380px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 32px #0003; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 400; line-height: 1.65; letter-spacing: 0; text-align: left; white-space: normal; }
.field-tooltip[hidden] { display: none; }
.field-tooltip > strong { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 650; color: var(--accent); }
.field-tooltip > span { display: block; }

.help-image { display: block; position: relative; margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #171918; line-height: 0; }
.help-image img { display: block; width: 100%; height: auto; }
.help-image.account { max-width: 220px; }
.help-image::after { content: ''; position: absolute; border: 2px solid #c1e987; border-radius: 3px; pointer-events: none; }
.help-image.account::after { left: 2%; top: 70%; width: 90%; height: 25%; }
.help-image.entry::after { left: 2%; top: 69%; width: 96%; height: 9%; }
.help-image.target::after { left: 2%; top: 84%; width: 96%; height: 9%; }
.help-image.fail::after { left: 2%; top: 77%; width: 96%; height: 8%; }
.help-image.position::after, .help-image.token::after { left: 1%; top: 41%; width: 98%; height: 56%; }
.help-image-caption { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.app-header { position: relative; }
.market-launch { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 7px 17px; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 600; }
.market-launch:hover { background: var(--accent-soft); border-color: var(--accent); }
#selectedMarket { font-size: 11px; font-weight: 450; color: var(--muted); }
#selectedMarket[hidden] { display: none; }
@media (max-width: 850px) {
  .app-header { flex-wrap: wrap; gap: 10px; padding-bottom: 12px; }
  .market-launch { position: static; transform: none; order: 3; width: 100%; justify-content: center; }
}
@media (min-width: 851px) and (max-width: 1100px) { #selectedMarket { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }


/* Keep a little less padding on short laptop windows, without shrinking text. */
@media (min-width: 851px) and (max-height: 700px) {
  .app-container { padding-bottom: 8px; }
  .app-header { min-height: 58px; }
  .setup-panel { margin-top: 8px; margin-bottom: 14px; }
  .form-body { padding-top: 14px; padding-bottom: 14px; }
  .results-body { padding-top: 12px; padding-bottom: 12px; }
}
/* Align the currency symbol with the figure, using a clean financial glyph. */
.position-value .value-unit { font-family: Arial, sans-serif; font-size: 28px; font-weight: 400; line-height: 1; padding-bottom: 6px; color: var(--muted); }
.position-value .field-tooltip, .outcome .field-tooltip { font-size: 14px; font-weight: 400; line-height: 1.65; }
.position-value .field-tooltip > strong, .outcome .field-tooltip > strong { font-size: 13px; line-height: 1.5; margin: 0 0 6px; color: var(--accent); }
.segmented > .help-label { flex: 0 0 auto; }
.segmented .help-trigger { white-space: nowrap; }
/* Market selection belongs to the expectation row, between direction controls. */
.strategy-line{position:relative}
.strategy-line .market-launch{top:50%;bottom:auto;transform:translate(-50%,-50%)}
.segmented .help-trigger{display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap}
@media(max-width:1100px){
  .strategy-line .market-launch{position:static;transform:none;width:max-content;margin:0 auto 12px;justify-content:center}
}
@media(min-width:1101px){.strategy-line #selectedMarket{max-width:155px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.field-tooltip:has(.math-formula){width:max-content;min-width:min(340px,calc(100vw - 24px));max-width:min(760px,calc(100vw - 24px))}
.math-formula,.math-expression{display:block;white-space:normal;overflow-wrap:anywhere;max-width:100%;font-variant-numeric:tabular-nums;padding-bottom:3px}
.math-formula{font-weight:550;color:var(--text)}
.math-caption{display:block;margin-top:19px;margin-bottom:7px;color:var(--muted);font-size:11px;letter-spacing:.04em;text-transform:uppercase}
.math-expression{font-size:15px;font-weight:550;color:var(--accent)}
.math-secondary{margin-top:7px}
.math-note{display:block;max-width:470px;margin-top:13px;color:var(--muted);font-size:12px;white-space:normal}
.price-input-group{display:flex;align-items:center;gap:8px;min-width:0}
.price-input-group .input-wrap{flex:1}
.price-copy{flex:0 0 32px;min-width:32px;min-height:36px;width:32px;padding:5px;border-color:transparent;background:transparent;color:var(--muted);border-radius:8px}
.price-copy .icon{width:17px;height:17px}
.price-copy:hover:not(:disabled){color:var(--accent);border-color:var(--line);background:var(--accent-soft)}
@media(max-width:480px){.price-row{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:8px}.price-input-group{gap:3px}.price-copy{flex-basis:27px;min-width:27px;width:27px;padding:3px}.price-row input{padding-left:7px;padding-right:25px}.price-input-group .input-wrap>span{right:8px}}
