:root {
  color-scheme: dark;
  --bg: #080b09;
  --bg-elevated: #0c100e;
  --surface: #101612;
  --surface-strong: #151d18;
  --surface-soft: #0d120f;
  --line: #253128;
  --line-bright: #39483c;
  --text: #f2f0e8;
  --muted: #9da79f;
  --faint: #6e7971;
  --gold: #e2be63;
  --gold-bright: #f1d683;
  --gold-soft: rgba(226, 190, 99, 0.12);
  --green: #74b77a;
  --red: #ef8f7f;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.24);
  --page: min(1060px, calc(100vw - 40px));
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: #080f14;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06), transparent 28%, rgba(0, 0, 0, 0.08));
  background-size: 100% 72px;
  content: "";
  pointer-events: none;
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 72% 18%, rgba(35, 79, 59, 0.68), transparent 34rem),
    radial-gradient(circle at 16% 58%, rgba(13, 33, 38, 0.92), transparent 42rem),
    radial-gradient(circle at 84% 82%, rgba(63, 224, 200, 0.08), transparent 30rem),
    #080f14;
  opacity: 0.86;
  pointer-events: none;
}

.topbar,
main,
.footer,
.skip-link {
  position: relative;
  z-index: 2;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(8, 15, 20, 0.92);
  opacity: 1;
  transition:
    opacity 320ms ease,
    visibility 0s linear 320ms;
}

.is-ready .boot-screen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.boot-lockup {
  display: grid;
  width: min(310px, calc(100vw - 48px));
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.boot-kicker {
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.boot-lockup strong {
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.boot-progress {
  position: relative;
  height: 2px;
  margin: 11px 0 7px;
  overflow: hidden;
  background: rgba(63, 224, 200, 0.12);
}

.boot-progress i {
  position: absolute;
  inset: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, #3fe0c8, transparent);
  animation: boot-scan 850ms ease-in-out infinite;
}

.boot-lockup small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #768e8a;
  font-size: 0.61rem;
  letter-spacing: 0.04em;
}

.boot-lockup small i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3fe0c8;
  box-shadow: 0 0 12px rgba(63, 224, 200, 0.7);
}

@keyframes boot-scan {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(340%);
  }
}

button,
input {
  font: inherit;
}

button,
summary,
a,
input[type="radio"] + span {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--gold);
  color: #15120a;
  font-weight: 750;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: var(--page);
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--page);
  min-height: 92px;
  margin-inline: auto;
  border-bottom: 1px solid rgba(226, 190, 99, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-ascii {
  width: 76px;
  color: var(--gold-bright);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.quiet-link {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

.quiet-link:hover {
  color: var(--text);
}

.hero {
  display: block;
  padding-block: clamp(56px, 7vw, 88px) clamp(64px, 8vw, 96px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: 690;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.hero-lead {
  max-width: 690px;
  margin: 32px 0 0;
  color: #b7c0b9;
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  line-height: 1.62;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 32px;
  color: var(--faint);
  font-size: 0.88rem;
}

.text-link {
  color: var(--text);
  font-weight: 700;
  text-decoration-color: rgba(226, 190, 99, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.text-link:hover {
  color: var(--gold-bright);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(226, 190, 99, 0.25);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(226, 190, 99, 0.08), transparent 48%),
    rgba(16, 22, 18, 0.9);
  box-shadow: var(--shadow);
}

.hero-card::after {
  position: absolute;
  top: -54px;
  right: -54px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(226, 190, 99, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 24px rgba(226, 190, 99, 0.025),
    0 0 0 52px rgba(226, 190, 99, 0.02);
  content: "";
}

.hero-card-topline,
.result-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.hero-card-topline {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
}

.status-dot::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.hero-card-value {
  margin: 38px 0 3px;
  font-size: clamp(2.3rem, 4vw, 3.3rem);
  font-weight: 650;
  letter-spacing: -0.055em;
}

.hero-card-caption {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.coverage-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.coverage-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  color: #cbd1cc;
  font-size: 0.87rem;
  font-weight: 650;
}

.coverage-list span {
  color: var(--faint);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.strategy-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.strategy-steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-top-color: rgba(226, 190, 99, 0.4);
  border-radius: 3px;
  background:
    linear-gradient(150deg, rgba(226, 190, 99, 0.045), transparent 42%),
    rgba(12, 17, 14, 0.7);
}

.strategy-step-num {
  padding-top: 3px;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.strategy-step-body b {
  display: block;
  margin-bottom: 9px;
  font-size: 1.02rem;
  font-weight: 690;
  letter-spacing: -0.01em;
}

.strategy-step-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.62;
}

.strategy-step-body p b {
  display: inline;
  margin: 0;
  color: var(--gold-bright);
  font-size: inherit;
  font-weight: 700;
}

.strategy-cta {
  margin: 18px 0 0;
  color: var(--faint);
  font-size: 0.92rem;
  line-height: 1.5;
}

.strategy,
.calculator-section,
.ladder-section,
.live-section {
  padding-block: 64px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 44px;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 660;
  letter-spacing: -0.05em;
  line-height: 1;
}

.section-heading > p {
  max-width: 390px;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.94rem;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.position-builder,
.result-panel,
.live-controls,
.snapshot-primary,
.snapshot-metrics,
.chart-panel {
  border: 1px solid var(--line);
  background: rgba(12, 17, 14, 0.92);
}

.position-builder {
  display: grid;
  overflow: visible;
  border-top-color: rgba(226, 190, 99, 0.5);
  border-radius: 3px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.builder-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(226, 190, 99, 0.055), transparent 34%),
    #0a0e0c;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.builder-console-head span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #cdd3ce;
}

.builder-console-head i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(116, 183, 122, 0.7);
}

.builder-console-head small {
  font: inherit;
}

fieldset {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 20px;
  row-gap: 16px;
  padding: 0;
  margin: 0;
  border: 0;
}

.builder-legend {
  display: flex;
  grid-column: 1;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 0;
  color: #c8cec9;
}

.builder-legend span {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.builder-legend b {
  max-width: none;
  font-size: 0.78rem;
  font-weight: 690;
  letter-spacing: 0.035em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
}

.builder-stage {
  padding: 32px 22px 26px;
  border-bottom: 1px solid var(--line);
}

.builder-stage > .builder-legend {
  margin-bottom: 6px;
}

.builder-stage > :not(.builder-legend) {
  grid-column: 1;
  min-width: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.field-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pair-config {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 1px;
  align-items: stretch;
  padding: 1px;
  background: var(--line);
}

.pair-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 108px;
  min-height: 112px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(226, 190, 99, 0.17), transparent 58%),
    #111711;
  color: var(--gold-bright);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pair-preview i {
  color: var(--faint);
  font-style: normal;
  font-weight: 500;
}

.symbol-input {
  text-transform: uppercase;
}

.field-grid-capital.is-single-field {
  grid-template-columns: 1fr;
}

.field {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px 16px 12px;
  border-left: 2px solid transparent;
  background: #0a0f0c;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}

.field:hover {
  background: #0c120e;
}

.field:focus-within {
  border-left-color: var(--gold);
  background: #0d130f;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-header label {
  color: #b7c0b9;
  font-size: 0.65rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field small {
  color: var(--faint);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.09em;
}

.field em {
  color: var(--faint);
  font-size: 0.65rem;
  font-style: normal;
  line-height: 1.4;
}

.info-tip {
  position: relative;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  outline: 0;
  background: rgba(226, 190, 99, 0.035);
  color: var(--muted);
  cursor: help;
  font-family: Georgia, serif;
  font-size: 0.68rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    color 140ms ease;
}

.info-tip::before,
.info-tip::after {
  position: absolute;
  right: -8px;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.info-tip::before {
  bottom: calc(100% + 6px);
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(226, 190, 99, 0.25);
  border-bottom: 1px solid rgba(226, 190, 99, 0.25);
  background: #192019;
  content: "";
  transform: translate(-8px, 5px) rotate(45deg);
}

.info-tip::after {
  bottom: calc(100% + 11px);
  width: min(260px, 72vw);
  padding: 12px 13px;
  border: 1px solid rgba(226, 190, 99, 0.25);
  border-radius: 10px;
  background: #192019;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
  color: #d8ddd8;
  content: attr(data-tooltip);
  font-family: var(--font);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.48;
  text-align: left;
}

.info-tip:hover,
.info-tip:focus-visible,
.info-tip.is-open {
  border-color: rgba(226, 190, 99, 0.7);
  background: var(--gold-soft);
  color: var(--gold-bright);
}

.info-tip:hover::before,
.info-tip:hover::after,
.info-tip:focus-visible::before,
.info-tip:focus-visible::after,
.info-tip.is-open::before,
.info-tip.is-open::after {
  opacity: 1;
  transform: translateY(0);
}

.info-tip:hover::before,
.info-tip:focus-visible::before,
.info-tip.is-open::before {
  transform: translate(-8px, 0) rotate(45deg);
}

.info-tip-compact {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  font-size: 0.6rem;
}

.field input {
  width: 100%;
  height: 38px;
  padding: 0 0 7px;
  border: 0;
  border-bottom: 1px solid #2f3a32;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.18rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  transition:
    border-color 150ms ease,
    color 150ms ease;
}

.field input::placeholder {
  color: #58635b;
}

.field input:hover {
  border-color: #536157;
}

.field input:focus {
  border-color: var(--gold);
  background: transparent;
  box-shadow: none;
}

.field input[aria-invalid="true"] {
  border-color: rgba(239, 143, 127, 0.72);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.range-preview {
  --entry-position: 83.33%;
  --entry-label-position: 83.33%;
  padding: 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(116, 183, 122, 0.025), rgba(226, 190, 99, 0.045)),
    #090d0b;
  transition: border-color 150ms ease;
}

.range-preview.is-warning {
  border-color: rgba(239, 143, 127, 0.45);
}

.range-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.range-preview-head > div {
  display: grid;
  gap: 3px;
}

.range-preview-head b {
  font-size: 0.76rem;
}

.range-preview-head small {
  color: var(--muted);
  font-size: 0.68rem;
}

.range-preview.is-warning .range-preview-head small {
  color: var(--red);
}

.range-preview-badge {
  color: var(--faint);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.range-track {
  position: relative;
  height: 22px;
  margin: 22px 4px 6px;
}

.range-track-line {
  position: absolute;
  top: 10px;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(116, 183, 122, 0.65), rgba(226, 190, 99, 0.82));
  box-shadow: 0 0 18px rgba(226, 190, 99, 0.08);
}

.range-marker {
  position: absolute;
  top: 5px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--surface-soft);
  border-radius: 50%;
  transform: translateX(-50%);
}

.range-marker-min {
  left: 0;
  background: var(--green);
}

.range-marker-entry {
  left: var(--entry-position);
  width: 15px;
  height: 15px;
  top: 3px;
  background: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(226, 190, 99, 0.12);
}

.range-marker-max {
  left: 100%;
  background: var(--gold);
}

.range-preview.is-demo .range-marker,
.range-preview.is-demo .range-track-line {
  opacity: 0.55;
}

.range-readout {
  position: relative;
  height: 43px;
  margin-top: 7px;
  font-variant-numeric: tabular-nums;
}

.range-readout > span {
  position: absolute;
  display: grid;
  gap: 2px;
}

.range-readout > span:first-child {
  left: 0;
  text-align: left;
}

.range-readout > span:last-child {
  right: 0;
  text-align: right;
}

.range-readout .range-entry-value {
  left: var(--entry-label-position);
  color: var(--gold-bright);
  text-align: center;
  transform: translateX(-50%);
}

.range-readout small {
  color: var(--faint);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.range-readout small i {
  font-style: normal;
}

.range-readout b {
  font-size: 0.7rem;
}

.form-message {
  min-height: 20px;
  margin: -12px 0 -16px;
  color: var(--red);
  font-size: 0.78rem;
}

.form-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
  padding: 18px 24px;
  background:
    linear-gradient(90deg, rgba(226, 190, 99, 0.05), transparent 36%),
    #090d0b;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 780;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:focus-visible {
  outline: 3px solid rgba(226, 190, 99, 0.18);
  outline-offset: 2px;
}

.button-primary {
  min-width: 210px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.12), transparent 32%),
    var(--gold);
  color: #17130a;
  letter-spacing: 0.015em;
}

.button-primary:hover {
  background: var(--gold-bright);
}

.button-secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.button-secondary:hover {
  border-color: var(--line-bright);
  color: var(--text);
}

.result-panel {
  position: static;
  min-height: 0;
  overflow: visible;
  border-top-color: rgba(226, 190, 99, 0.5);
  border-radius: 3px;
  background:
    linear-gradient(155deg, rgba(226, 190, 99, 0.07), transparent 45%),
    #0b100d;
}

.result-empty,
.result-content {
  height: 100%;
  min-width: 0;
  padding: clamp(24px, 3vw, 32px);
}

.result-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  text-align: center;
}

.empty-orbit {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 30px;
  border: 1px solid rgba(226, 190, 99, 0.25);
  border-radius: 50%;
}

.empty-orbit::before,
.empty-orbit::after {
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(226, 190, 99, 0.15);
  border-radius: 50%;
  content: "";
}

.empty-orbit::after {
  inset: 34px;
  background: rgba(226, 190, 99, 0.08);
}

.empty-orbit span {
  position: absolute;
  top: 9px;
  left: 46px;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(226, 190, 99, 0.45);
}

.empty-orbit i {
  position: absolute;
  right: 14px;
  bottom: 17px;
  z-index: 1;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.result-empty .eyebrow {
  margin-bottom: 10px;
}

.result-empty h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.result-empty > p:last-child {
  max-width: 350px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.result-content {
  display: flex;
  flex-direction: column;
}

.result-topline {
  flex-wrap: wrap;
}

.result-topline > div {
  min-width: 0;
}

.result-topline .eyebrow {
  margin-bottom: 9px;
}

.result-size-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.result-topline h3 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(2.15rem, 4vw, 3.15rem);
  font-weight: 670;
  letter-spacing: -0.06em;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.result-topline h3 small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.result-status {
  padding: 6px 9px;
  border: 1px solid rgba(116, 183, 122, 0.25);
  border-radius: 999px;
  background: rgba(116, 183, 122, 0.08);
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.result-notional {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  padding: 1px;
  margin: 22px 0 30px;
  background: var(--line);
}

.result-notional p {
  display: grid;
  gap: 7px;
  padding: 14px 15px;
  margin: 0;
  background: rgba(8, 13, 10, 0.96);
}

.result-notional span {
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-notional b {
  color: var(--text);
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric-list {
  margin: 0;
}

.metric-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.metric-list dt {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-align: right;
}

.metric-list .metric-total {
  margin-top: 6px;
  border-color: rgba(226, 190, 99, 0.28);
}

.metric-list .metric-total dt,
.metric-list .metric-total dd {
  color: var(--gold-bright);
}

.live-section {
  scroll-margin-top: 20px;
}

.ladder-section {
  scroll-margin-top: 20px;
}

.live-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  padding: 22px;
  border-top-color: rgba(226, 190, 99, 0.38);
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(226, 190, 99, 0.045), transparent 33%),
    #0b100d;
}

.live-controls .field {
  flex: 1 1 170px;
  min-width: 155px;
  align-content: start;
}

.live-controls .current-price-field {
  flex: 1.7 1 290px;
}

.live-controls .button {
  align-self: end;
}

.live-controls .button {
  flex: 1 1 200px;
  min-width: 180px;
  white-space: nowrap;
}

.ladder-price-cell > span,
.ladder-order-cell > span,
.ladder-price-cell > small,
.ladder-order-cell > small {
  display: block;
}

.ladder-price-cell > small,
.ladder-order-cell > small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 560;
  white-space: nowrap;
}

.live-controls .form-message {
  flex-basis: 100%;
  width: 100%;
  min-height: 0;
  margin: 0;
}

.snapshot-content {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

/* Explicit Net PnL decomposition: the components must visibly add up, or a
   large short profit next to a negative result reads as a contradiction. */
.pnl-breakdown {
  padding: 16px 18px 15px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(12, 17, 14, 0.92);
}

.pnl-breakdown-title {
  margin: 0 0 12px;
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.pnl-breakdown-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.pnl-breakdown-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.pnl-breakdown-list dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.pnl-breakdown-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.pnl-breakdown-list .is-total {
  margin-top: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.pnl-breakdown-list .is-total dt {
  color: var(--text);
  font-weight: 750;
}

.pnl-breakdown-list .is-total dd {
  font-size: 0.95rem;
  font-weight: 780;
}

.pnl-breakdown-note {
  max-width: 78ch;
  margin: 13px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.6fr) minmax(0, 1.4fr);
  gap: 18px;
}

.snapshot-primary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  padding: 32px;
  border-radius: 3px;
  border-top-color: rgba(116, 183, 122, 0.36);
  background:
    linear-gradient(145deg, rgba(226, 190, 99, 0.08), transparent 65%),
    var(--surface);
}

.net-pnl {
  margin: 2px 0 6px;
  color: var(--green);
  font-size: clamp(2.6rem, 5vw, 4.3rem);
  font-weight: 670;
  letter-spacing: -0.065em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.net-pnl-usd {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.net-pnl.is-negative,
.metric-negative {
  color: var(--red) !important;
}

.metric-positive {
  color: var(--green) !important;
}

.range-status {
  align-self: flex-start;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 720;
}

.ladder-execution-status {
  max-width: 34ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.snapshot-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px;
  margin: 0;
  border-radius: 3px;
}

.snapshot-metrics > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  min-height: 120px;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.snapshot-metrics > div:nth-child(2n) {
  border-right: 0;
}

.snapshot-metrics > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.snapshot-metrics dt {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.75rem;
}

.snapshot-metrics dd {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.chart-panel {
  overflow: hidden;
  padding: 28px 30px 22px;
  margin: 0;
  border-radius: 3px;
  border-top-color: rgba(226, 190, 99, 0.38);
}

.chart-panel figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 10px;
}

.chart-panel .eyebrow {
  margin-bottom: 8px;
}

.chart-panel h3 {
  margin: 0;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
}

.chart-explainer {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.chart-unit-note {
  margin: 7px 0 0;
  color: var(--faint);
  font-size: 0.68rem;
}

.chart-legend {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 0.68rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  display: inline-block;
  width: 12px;
  height: 2px;
}

.legend-current {
  background: var(--gold);
}

.legend-entry {
  border-top: 2px dashed var(--muted);
}

.chart-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.chart-pan-hint {
  display: none;
}

#pnl-chart {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
  outline: none;
}

#pnl-chart:focus-visible {
  outline: 2px solid rgba(226, 190, 99, 0.72);
  outline-offset: -2px;
}

.chart-zero {
  stroke: #526056;
  stroke-width: 1;
}

.chart-axis-label {
  fill: #7e8a81;
  font-family: var(--font);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart-axis-title {
  fill: #9aa59d;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.chart-line {
  fill: none;
  stroke: var(--gold-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-area {
  fill: url(#pnl-area-gradient);
}

.chart-marker-entry {
  stroke: #7e8a81;
  stroke-dasharray: 6 6;
  stroke-width: 1.5;
}

.chart-marker-current {
  stroke: var(--gold);
  stroke-width: 1.5;
}

.chart-current-dot {
  fill: var(--gold-bright);
  stroke: #201b0e;
  stroke-width: 4;
}

.chart-marker-label {
  fill: #abb4ad;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chart-hit-area {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.chart-zoom-strip {
  fill: transparent;
  cursor: ew-resize;
  pointer-events: all;
  touch-action: none;
}

.chart-hover {
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease;
}

.chart-hover.is-visible {
  opacity: 1;
}

.chart-hover-line {
  stroke: rgba(241, 214, 131, 0.62);
  stroke-dasharray: 3 4;
  stroke-width: 1;
}

.chart-hover-dot {
  fill: var(--gold-bright);
  stroke: #17130a;
  stroke-width: 4;
}

.chart-tooltip {
  --tooltip-x: 14px;
  --tooltip-y: 14px;
  position: absolute;
  z-index: 5;
  display: grid;
  width: 196px;
  gap: 3px;
  padding: 13px 14px;
  border: 1px solid rgba(226, 190, 99, 0.34);
  border-radius: 4px;
  background: rgba(7, 12, 9, 0.96);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.42);
  pointer-events: none;
  transform: translate(var(--tooltip-x), var(--tooltip-y));
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip.is-left {
  --tooltip-x: calc(-100% - 14px);
}

.chart-tooltip.is-above {
  --tooltip-y: calc(-100% - 14px);
}

.chart-tooltip > span {
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-tooltip > b {
  color: var(--text);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.chart-tooltip dl {
  display: grid;
  gap: 6px;
  padding-top: 9px;
  margin: 7px 0 0;
  border-top: 1px solid var(--line);
}

.chart-tooltip dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.chart-tooltip dt {
  color: var(--muted);
  font-size: 0.66rem;
}

.chart-tooltip dd {
  margin: 0;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  counter-reset: faq-item;
}

.faq-list details {
  align-self: start;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  counter-increment: faq-item;
  transition: background-color 150ms ease;
}

.faq-list details:hover,
.faq-list details[open] {
  background: linear-gradient(90deg, rgba(226, 190, 99, 0.035), transparent 70%);
}

.faq-list summary {
  position: relative;
  padding: 22px 52px 22px 46px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 680;
  list-style: none;
}

.faq-list summary::before {
  position: absolute;
  top: 24px;
  left: 0;
  color: var(--gold);
  content: counter(faq-item, decimal-leading-zero);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: 4px;
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 400;
  content: "+";
  transform: translateY(-50%);
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  padding: 0 20px 24px 46px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.65;
}

.faq-list details a {
  color: var(--gold-bright);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 120px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer p {
  margin: 0;
}

@media (max-width: 1080px) {
  :root {
    --page: min(100% - 32px, 820px);
  }

  .hero,
  .calculator-grid,
  .snapshot-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 50px;
  }

  .hero-card {
    max-width: 540px;
  }

  .how-it-works {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .how-steps li:first-child {
    border-left: 0;
  }

  .result-empty {
    min-height: 300px;
  }

  .result-panel {
    position: static;
    min-height: 0;
  }

  .current-price-field {
    flex-basis: 100%;
  }

  .live-controls .button {
    flex-basis: calc(50% - 6px);
  }

  .snapshot-primary {
    min-height: 220px;
  }
}

@media (max-width: 680px) {
  :root {
    --page: calc(100% - 24px);
    --radius-lg: 18px;
    --radius-md: 14px;
  }

  .topbar {
    min-height: 76px;
  }

  .brand-ascii {
    width: 58px;
  }

  .hero {
    padding-block: 64px 84px;
  }

  .hero h1 {
    font-size: clamp(2.72rem, 13.5vw, 4.2rem);
  }

  .hero-lead {
    margin-top: 26px;
    font-size: 1rem;
  }

  .hero-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .how-it-works {
    padding: 20px;
    margin-bottom: 64px;
  }

  .how-steps {
    grid-template-columns: 1fr;
  }

  .how-steps li,
  .how-steps li:first-child {
    min-height: auto;
    padding: 13px 4px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .info-tip::after {
    width: min(250px, 76vw);
  }

  .builder-console-head {
    padding-inline: 16px;
  }

  .builder-console-head small {
    display: none;
  }

  .builder-stage {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 30px 16px 24px;
  }

  .strategy-steps {
    grid-template-columns: 1fr;
  }

  .builder-stage .builder-legend,
  .builder-stage > :not(.builder-legend) {
    grid-column: 1;
  }

  .pair-preview {
    min-height: 62px;
  }

  .form-action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .form-action-bar {
    padding: 20px 16px;
  }

  .form-action-bar > .form-message {
    max-width: none;
    text-align: left;
  }

  .range-preview {
    padding: 15px;
  }

  .range-preview-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .range-readout small {
    font-size: 0.5rem;
  }

  .range-readout b {
    font-size: 0.62rem;
  }

  .range-readout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    height: auto;
    min-height: 43px;
  }

  .range-readout > span,
  .range-readout > span:first-child,
  .range-readout > span:last-child,
  .range-readout .range-entry-value {
    position: static;
    transform: none;
  }

  .range-readout .range-entry-value {
    text-align: center;
  }

  .calculator-section,
  .ladder-section,
  .live-section,
  .faq-section {
    padding-block: 64px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 26px;
  }

  .field-grid,
  .field-grid-three,
  .pair-config,
  .live-controls,
  .snapshot-metrics,
  .faq-list {
    grid-template-columns: 1fr;
  }

  .result-notional {
    grid-template-columns: 1fr;
  }

  .live-controls .current-price-field,
  .live-controls .form-message {
    grid-column: auto;
  }

  .snapshot-metrics > div,
  .snapshot-metrics > div:nth-child(3n),
  .snapshot-metrics > div:nth-last-child(-n + 3) {
    min-height: 90px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .snapshot-metrics > div:last-child {
    border-bottom: 0;
  }

  .chart-panel {
    padding-inline: 20px;
  }

  .chart-panel figcaption {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-wrap {
    overflow-x: auto;
    scrollbar-color: var(--line-bright) transparent;
  }

  .chart-pan-hint {
    position: sticky;
    left: 0;
    display: block;
    width: max-content;
    margin: 3px 0 12px;
    color: var(--faint);
    font-size: 0.68rem;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-canvas {
    background:
      radial-gradient(circle at 72% 18%, rgba(35, 79, 59, 0.7), transparent 34rem),
      radial-gradient(circle at 16% 58%, rgba(13, 33, 38, 0.95), transparent 42rem),
      radial-gradient(circle at 84% 82%, rgba(63, 224, 200, 0.08), transparent 30rem),
      #080f14;
  }

  .boot-progress i {
    width: 100%;
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Live asset search + candlestick range selector (Step 01)
   ============================================================ */

.builder-live-stage {
  gap: 18px;
}

.asset-search {
  position: relative;
}

.asset-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.asset-search-input {
  min-width: 0;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
}

.asset-search-input:focus {
  outline: none;
  border-color: var(--gold);
}

.asset-search-input::placeholder {
  color: var(--faint);
}

.asset-search-button {
  min-width: 104px;
  padding: 0 18px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  color: var(--gold-bright);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  transition: background-color 150ms ease, color 150ms ease;
}

.asset-search-button:hover:not(:disabled) {
  background: var(--gold);
  color: #17130a;
}

.asset-search-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.asset-search-button:focus-visible {
  outline: 3px solid rgba(226, 190, 99, 0.18);
  outline-offset: 2px;
}

.asset-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.asset-search-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 4px 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.asset-search-item > * {
  min-width: 0;
}

.asset-search-item b,
.asset-search-item small {
  overflow-wrap: anywhere;
}

.asset-search-item:last-child { border-bottom: 0; }
.asset-search-item:hover { background: var(--gold-soft); }
.asset-search-item b { font-size: 14px; color: var(--gold-bright); }
.asset-search-item small { font-size: 11px; color: var(--muted); }
.asset-search-item i {
  font-style: normal;
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.asset-search-status {
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--faint);
}

.asset-search-status:empty {
  display: none;
}

.live-quote {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.live-quote-price {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.live-quote-price small {
  color: var(--muted);
  font-size: 12px;
}

.flip-pair-button {
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  background: rgba(226, 190, 99, 0.035);
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.flip-pair-button:hover,
.flip-pair-button:focus-visible {
  border-color: var(--gold-bright);
  background: var(--gold-soft);
  color: var(--gold-bright);
}

.live-quote-price b {
  font-size: 26px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.live-change {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.live-change.metric-positive { color: var(--green); }
.live-change.metric-negative { color: var(--red); }

.live-quote-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.live-source {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.tf-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.tf-switch button {
  padding: 5px 13px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.tf-switch button.is-active {
  background: var(--gold-soft);
  color: var(--gold-bright);
}

/* Disabled while a pool loads — the switch must not look clickable meanwhile. */
.tf-switch button:disabled {
  cursor: default;
  opacity: 0.45;
}

.candle-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 8px 8px 4px;
}

.candle-chart {
  width: 100%;
  height: 375px;
  display: block;
  touch-action: none;
}

/* While a pool's price and candles load, an overlay fills the reserved chart
   area so the chart never pops in "from nowhere" (which shifted everything
   below it) and the previous pool's candles are not left on screen. */
.candle-loading { display: none; }
.candle-wrap.is-loading .candle-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}
/* Keep the chart chrome laid out (no jump) but out of sight over an empty plot. */
.candle-wrap.is-loading .chart-scale-bar,
.candle-wrap.is-loading .candle-chart,
.candle-wrap.is-loading .candle-hint { visibility: hidden; }
.candle-spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: candle-spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .candle-spinner { animation-duration: 2s; }
}
@keyframes candle-spin { to { transform: rotate(360deg); } }

.candle-body-up { fill: var(--green); }
.candle-body-down { fill: var(--red); }
.candle-wick-up { stroke: var(--green); stroke-width: 1; opacity: 0.85; }
.candle-wick-down { stroke: var(--red); stroke-width: 1; opacity: 0.85; }

.ladder-chart-wrap {
  margin-bottom: 20px;
  padding: 10px 10px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.ladder-chart {
  display: block;
  width: 100%;
  height: 340px;
}

.ladder-chart-caption {
  margin: 8px 4px 2px;
  color: var(--faint);
  font-size: 0.78rem;
  line-height: 1.5;
}

.ladder-lvl { stroke-width: 1; }
.ladder-lvl-add { stroke: var(--gold); stroke-dasharray: 4 5; opacity: 0.5; }
.ladder-lvl-entry { stroke: var(--gold-bright); stroke-width: 1.4; opacity: 0.9; }

.ladder-lvl-label {
  fill: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ladder-lvl-label.is-entry {
  fill: var(--gold-bright);
  font-weight: 700;
}

.candle-band { fill: rgba(226, 190, 99, 0.07); }
.ladder-band { fill: rgba(226, 190, 99, 0.07); }

/* Recessive chrome: hairline, solid, one step off the surface. Dashed grid
   reads as a threshold when it is only a reference. */
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
  opacity: 0.55;
}

.chart-axis-rule {
  stroke: var(--line-bright);
  stroke-width: 1;
  opacity: 0.7;
}

.chart-crosshair {
  stroke: var(--line-bright);
  stroke-width: 1;
  pointer-events: none;
}

.chart-time-label {
  fill: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
}

.chart-readout {
  fill: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.chart-readout.is-hover { fill: var(--text); }

.candle-axis-label {
  fill: var(--faint);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.range-line { stroke-width: 1.25; }
.range-line-max { stroke: var(--gold); }
.range-line-min { stroke: var(--gold); }
.range-line-entry { stroke: var(--text); stroke-width: 1; opacity: 0.55; }

.range-handle {
  cursor: grab;
  touch-action: none;
}
.range-handle:active { cursor: grabbing; }
.range-handle-hit { fill: transparent; }
.range-handle-grip { fill: var(--gold); }
.range-handle-grip:hover { fill: var(--gold-bright); }
.range-handle-label {
  fill: #0b0f0c;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.range-handle-pct {
  fill: #0b0f0c;
  font-size: 11.5px;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.candle-hint {
  margin: 6px 4px 2px;
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

.candle-status {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.candle-status.is-error { color: var(--red); }

.range-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.range-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  min-width: 0;
}

.range-badge small { font-size: 11px; color: var(--faint); }
.range-badge b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.range-badge i {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.range-badge-max { border-color: rgba(226, 190, 99, 0.35); }
.range-badge-min { border-color: rgba(226, 190, 99, 0.35); }

.manual-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.manual-toggle input { accent-color: var(--gold); }

/* Manual fieldsets stay in the DOM but are collapsed until requested. */
.position-builder [data-manual] { display: none; }
.position-builder.show-manual [data-manual] { display: grid; }

/* ============================================================
   Hedge ladder (Step 03 output)
   ============================================================ */

.ladder-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(12, 17, 14, 0.92);
}

.ladder-lead {
  max-width: 70ch;
}

.ladder-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.ladder-head h4 {
  margin: 4px 0 6px;
  font-size: 17px;
}

.ladder-lead {
  margin: 0;
  max-width: 46ch;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.ladder-step-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--faint);
  flex-wrap: wrap;
}

.position-builder:not(.is-configured) .stage-config {
  display: none;
}

.step-hint {
  display: block;
  margin-top: 10px;
  color: var(--faint);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.5;
}

/* The bounded-vs-unbounded loss statement. Carries more weight than the notes
   below it, so it gets full-strength text rather than the muted tone. */
.loss-limit-note {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(226, 190, 99, 0.4);
  border-left-width: 3px;
  border-radius: 3px;
  background: rgba(226, 190, 99, 0.08);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.65;
}

.loss-limit-note b {
  color: var(--gold-bright);
}

.loss-limit-note br {
  content: "";
  display: block;
  margin-top: 8px;
}

.hedge-benefit-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(226, 190, 99, 0.28);
  border-left-width: 3px;
  border-radius: 3px;
  background: rgba(226, 190, 99, 0.05);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.ladder-step-note {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
}

.ladder-step-switch button {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.ladder-step-switch button.is-active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold-bright);
}

.ladder-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.ladder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 520px;
}

.ladder-table th,
.ladder-table td {
  padding: 10px 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ladder-table th:first-child,
.ladder-table td:first-child {
  text-align: left;
}

.ladder-table thead th {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.ladder-table tbody tr {
  border-bottom: 1px solid var(--line);
}
.ladder-table tbody tr:last-child { border-bottom: 0; }
.ladder-table tbody tr.is-entry td { color: var(--gold-bright); }
.ladder-table tbody tr.is-floor { background: var(--gold-soft); }

.ladder-action {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.ladder-action i {
  width: 14px;
  font-style: normal;
  text-align: center;
}

.ladder-action b {
  font-size: 0.68rem;
  font-weight: 760;
}

.ladder-action-down {
  color: var(--gold-bright);
}

.ladder-order-cell > .ladder-action-up {
  margin-top: 5px;
  color: var(--green);
  font-size: 0.72rem;
}

.ladder-hedge-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.ladder-hedge-bar {
  width: 46px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.ladder-hedge-bar span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.ladder-note {
  margin: 0;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .range-badges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .range-badge { padding: 8px; }
  .range-badge small { font-size: 9px; }
  .range-badge b { font-size: 11px; }
  .range-badge i { font-size: 10px; }
  .candle-chart { height: 312px; }
  .ladder-block { padding: 14px; }
}

/* ---- Current-price shift control ----------------------------------------
   Kept deliberately flat: this control sits inside a field that shares a row
   with two other fields, so every extra pixel of height shows up as dead space
   next to them. */

.price-shift {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -2px;
}

.price-shift[hidden] {
  display: none;
}

.price-shift-range {
  width: 100%;
  height: 14px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  accent-color: var(--gold);
  cursor: pointer;
}

.price-shift-quick {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
}

.price-shift-quick button {
  flex: 1 1 0;
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.price-shift-quick button:hover {
  border-color: var(--line-bright);
  color: var(--text);
}

.price-shift-quick button.is-active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold-bright);
}

.current-price-field em {
  font-variant-numeric: tabular-nums;
}

.current-price-field em.is-warning {
  color: var(--gold);
}

.net-pnl-note {
  max-width: 40ch;
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(226, 190, 99, 0.28);
  border-left-width: 3px;
  border-radius: 3px;
  background: rgba(226, 190, 99, 0.05);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.net-pnl-note[hidden] {
  display: none;
}

/* A Net PnL of exactly zero is neither profit nor loss — the default green
   reads as a gain and hides the fact that nothing has been hedged yet. */
.net-pnl.is-flat,
.net-pnl-usd.is-flat {
  color: var(--muted);
}

/* Action bar: message left, submit pinned to the right corner. */
.form-action-bar > .form-message {
  max-width: 340px;
  min-height: 0;
  margin: 0;
  text-align: left;
}

/* The pool link now lives in the result panel: you get the calculation first,
   then open the pool. */
.result-pool-link {
  width: 100%;
  margin-top: 16px;
}

.result-pool-link[hidden] {
  display: none;
}

/* Bar carries only the validation message now, so it collapses when empty. */
.form-action-bar[hidden] {
  display: none;
}

/* ---- Chart scale controls ------------------------------------------------ */

.chart-scale-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

/* Only the zoom group is left in the bar; keep it on the right. */
.chart-scale-bar-end {
  justify-content: flex-end;
}

.scale-zoom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.scale-zoom button {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.scale-zoom button:hover {
  border-color: var(--line-bright);
  color: var(--text);
}

.scale-zoom button {
  min-width: 30px;
  font-size: 13px;
}

.scale-zoom button:last-child {
  min-width: 0;
  font-size: 11px;
}

.candle-chart,
.ladder-chart {
  touch-action: pan-y;
  cursor: grab;
}

.candle-chart.is-panning,
.ladder-chart.is-panning {
  cursor: grabbing;
}

/* A bound dragged outside the visible window is pinned to the edge — dashing it
   says "the real level is further out" instead of lying about its price. */
.range-line.is-clipped {
  stroke-dasharray: 5 4;
  opacity: 0.75;
}

.scale-zoom #price-scale-toggle,
.scale-zoom #ladder-scale-toggle {
  min-width: 0;
  font-size: 11px;
}

.scale-zoom #price-scale-toggle.is-active,
.scale-zoom #ladder-scale-toggle.is-active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold-bright);
}
