:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-raised: #ffffff;
  --text: #1f2933;
  --muted: #697386;
  --line: #dfe5ee;
  --blue: #1a73e8;
  --blue-rgb: 26, 115, 232;
  --blue-soft: rgba(26, 115, 232, 0.1);
  --orange: #ff4500;
  --orange-rgb: 255, 69, 0;
  --green: #00a86b;
  --red: #e84555;
  --glow-green: rgba(0, 168, 107, 0.18);
  --glow-blue: rgba(26, 115, 232, 0.14);
  --ambient-a: rgba(26, 115, 232, 0);
  --ambient-b: rgba(0, 168, 107, 0);
  --ambient-c: rgba(var(--orange-rgb), 0);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  --shadow-float: 0 12px 28px rgba(16, 24, 40, 0.08);
  --radius: 10px;
  font-family: Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070b;
  --surface: rgba(13, 18, 25, 0.82);
  --surface-soft: rgba(24, 31, 42, 0.76);
  --surface-raised: rgba(20, 27, 38, 0.9);
  --text: #f2f7ff;
  --muted: #9aa8bc;
  --line: rgba(130, 152, 177, 0.24);
  --blue: #33b8ff;
  --blue-rgb: 51, 184, 255;
  --blue-soft: rgba(51, 184, 255, 0.18);
  --orange: #ff7a18;
  --orange-rgb: 255, 122, 24;
  --green: #00e0a4;
  --red: #ff5270;
  --glow-green: rgba(0, 224, 164, 0.32);
  --glow-blue: rgba(51, 184, 255, 0.22);
  --ambient-a: rgba(51, 184, 255, 0.18);
  --ambient-b: rgba(0, 224, 164, 0.13);
  --ambient-c: rgba(255, 82, 112, 0.12);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  --shadow-float: 0 30px 90px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  text-rendering: optimizeLegibility;
  transition: background-color 0.22s ease, color 0.22s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 52% -12%, var(--ambient-a), transparent 38%),
    radial-gradient(circle at 82% 12%, var(--ambient-b), transparent 32%),
    radial-gradient(circle at 18% 24%, var(--ambient-c), transparent 34%),
    var(--bg);
}

[data-theme="dark"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0, rgba(255, 255, 255, 0) 19%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 120px);
  opacity: 0.52;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

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

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: var(--shadow);
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 18px;
}

.auth-card,
.panel,
.workspace-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.auth-card {
  padding: 18px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start end;
  padding: 72px 18px 18px;
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .auth-modal {
  background:
    radial-gradient(circle at 72% 18%, rgba(51, 184, 255, 0.18), transparent 34%),
    rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  width: min(390px, 100%);
}

.auth-dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.auth-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.auth-dialog-header h1 {
  margin: 0 0 4px;
  font-size: 26px;
  color: var(--blue);
  letter-spacing: 0;
}

[data-theme="dark"] .auth-dialog-header h1 {
  color: var(--blue);
  text-shadow: 0 0 22px rgba(var(--blue-rgb), 0.22);
}

.auth-dialog-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.brand-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: block;
  border-radius: 9px;
  object-fit: contain;
}

.brand-logo-large {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.google-auth-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 800;
  box-shadow: var(--shadow);
}

.google-auth-button:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.google-auth-button:disabled,
.auth-dialog .primary-button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.google-auth-mark {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(from -40deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
  color: white;
  font-size: 15px;
  font-weight: 900;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-tab,
.segment-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 700;
}

.auth-tab.active,
.segment-button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

[data-theme="dark"] .auth-tab,
[data-theme="dark"] .auth-form input {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(145, 170, 200, 0.18);
  color: var(--text);
}

[data-theme="dark"] .auth-tab.active,
[data-theme="dark"] .auth-form .primary-button {
  background: var(--blue);
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(var(--blue-rgb), 0.24);
}

.auth-tabs .auth-tab.active {
  background: var(--blue);
  border-color: var(--blue);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.auth-form input,
.search-box input,
.flow-search input,
.symbol-input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.auth-form input:focus,
.search-box input:focus,
.flow-search input:focus,
.symbol-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.primary-button,
.secondary-button,
.icon-button,
.profile-button,
.dashboard-button,
.login-button {
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-button {
  background: var(--blue);
  color: white;
}

.auth-dialog .primary-button {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.auth-dialog .primary-button:hover,
.auth-tabs .auth-tab.active:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.secondary-button {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--text);
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.form-hint.error {
  color: var(--red);
}

.form-hint.success {
  color: var(--green);
}

.form-hint.info {
  color: var(--muted);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 54px;
  display: grid;
  grid-template-columns: minmax(208px, auto) minmax(280px, 680px) minmax(208px, auto);
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .topbar {
  background: rgba(4, 7, 12, 0.84);
  border-bottom-color: rgba(145, 170, 200, 0.16);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 0;
  min-width: 0;
}

.topbar-right {
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.topbar-icon-button:hover,
.profile-button:hover {
  background: var(--surface-soft);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 0 4px;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-wordmark {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .topbar-brand {
  color: var(--blue);
  text-shadow: 0 0 24px rgba(var(--blue-rgb), 0.28);
}

.topbar-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 32px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.theme-option {
  min-height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.theme-option.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .theme-switch {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(145, 170, 200, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .theme-option.active {
  background: linear-gradient(135deg, rgba(0, 224, 164, 0.26), rgba(51, 184, 255, 0.2));
  color: #f7fbff;
  box-shadow: 0 0 24px rgba(0, 224, 164, 0.14);
}

.search-box {
  width: 100%;
  min-width: 0;
  position: relative;
}

.topbar-search {
  justify-self: stretch;
}

.search-box .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border: 2px solid var(--muted);
  border-radius: 50%;
  opacity: 0.78;
}

.search-box .search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  border-radius: 999px;
  background: var(--muted);
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-box input {
  width: 100%;
  min-height: 38px;
  padding-left: 44px;
  border-radius: 999px;
  border-color: transparent;
  background: var(--surface-soft);
}

[data-theme="dark"] .search-box input {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(145, 170, 200, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.icon-button,
.profile-button {
  width: 52px;
  background: transparent;
  color: var(--muted);
}

.icon-button,
.profile-button {
  border-radius: 50%;
  background: var(--surface-soft);
  border-color: var(--line);
}

.topbar .icon-button,
.topbar .profile-button {
  width: 36px;
  min-height: 36px;
  border-color: transparent;
  background: transparent;
}

.profile-button {
  background: var(--blue);
  color: white;
}

.dashboard-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border-color: color-mix(in srgb, var(--blue) 42%, transparent);
  background: var(--surface-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.dashboard-button:hover,
.dashboard-button:focus-visible {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  outline: none;
}

.dashboard-button:focus-visible {
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.login-button {
  width: auto;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
}

.trial-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--orange) 72%, transparent);
  border-radius: 999px;
  background: var(--orange);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(var(--orange-rgb), 0.2);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.trial-button:hover,
.trial-button:focus-visible {
  background: color-mix(in srgb, var(--orange) 88%, #000000);
  border-color: color-mix(in srgb, var(--orange) 88%, #000000);
  color: #ffffff;
  outline: none;
}

.trial-button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 26%, transparent);
}

[data-theme="dark"] .login-button {
  background: var(--blue);
  box-shadow: 0 12px 30px rgba(var(--blue-rgb), 0.28);
}

[data-theme="dark"] .dashboard-button {
  border-color: rgba(var(--blue-rgb), 0.34);
  background: rgba(var(--blue-rgb), 0.12);
  color: #dff1ff;
  box-shadow: 0 12px 30px rgba(var(--blue-rgb), 0.14);
}

[data-theme="dark"] .trial-button {
  box-shadow: 0 12px 30px rgba(var(--orange-rgb), 0.24);
}

.layout {
  --left-rail-extra-width: 40px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 258px;
  gap: 10px;
  align-items: stretch;
  max-width: 1760px;
  margin: 0 auto;
  padding: 10px;
}

.site-footer {
  max-width: 1760px;
  margin: 0 auto;
  padding: 2px 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.site-footer a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--orange);
}

.left-rail,
.right-rail {
  position: sticky;
  top: 64px;
  align-self: stretch;
  min-height: calc(100vh - 74px);
  min-height: calc(100dvh - 74px);
  height: auto;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .left-rail,
[data-theme="dark"] .right-rail,
[data-theme="dark"] .workspace-card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--surface);
  border-color: rgba(145, 170, 200, 0.18);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
}

[data-theme="dark"] .left-rail {
  background:
    linear-gradient(180deg, rgba(11, 17, 27, 0.9), rgba(7, 10, 16, 0.82)),
    var(--surface);
}

.left-rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: calc(100% + var(--left-rail-extra-width));
  margin-left: calc(var(--left-rail-extra-width) * -1);
  overflow: hidden;
  padding: 8px;
}

.right-rail {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 8px;
}

.right-rail .panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.aux-rail-stack {
  display: grid;
  gap: 10px;
  align-content: start;
}

.aux-rail-priority,
.aux-rail-panel {
  min-width: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft) 48%, transparent);
}

.aux-rail-priority:empty {
  display: none;
}

.aux-rail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.aux-rail-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.aux-rail-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.aux-rail-header .chip {
  flex: 0 0 auto;
  min-height: 21px;
  padding-inline: 8px;
  color: var(--blue);
}

.aux-rail-empty {
  padding: 12px 4px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

[data-theme="dark"] .aux-rail-priority,
[data-theme="dark"] .aux-rail-panel {
  border-color: rgba(145, 170, 200, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.rail-item {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0 10px;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
}

.rail-item.active,
.rail-item:hover {
  background: var(--blue-soft);
}

.rail-item.active {
  color: var(--blue);
}

[data-theme="dark"] .rail-item {
  color: #d9e5f6;
}

[data-theme="dark"] .rail-item.active,
[data-theme="dark"] .rail-item:hover {
  background: linear-gradient(90deg, rgba(51, 184, 255, 0.18), rgba(0, 224, 164, 0.06));
}

[data-theme="dark"] .rail-item.active {
  color: #67d4ff;
  text-shadow: 0 0 18px rgba(51, 184, 255, 0.22);
}

.rail-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
}

.rail-dot.blue {
  background: var(--blue);
}

.rail-dot.orange {
  background: var(--orange);
}

.rail-dot.slate {
  background: #697386;
}

.rail-dot.green {
  background: var(--green);
}

.rail-dot.violet {
  background: #7c3aed;
}

.rail-section {
  --watch-action-width: 22px;
  --watch-sort-offset: 5px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.rail-section-header {
  min-height: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto var(--watch-action-width);
  align-items: center;
  column-gap: 2px;
  padding: 0 6px 0 8px;
}

.rail-header-actions {
  display: contents;
}

.watchlist-title {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.rail-section h2,
.panel h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.rail-section h2 {
  padding: 0;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rail-manage-button {
  width: var(--watch-action-width);
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 0 7px;
  cursor: pointer;
}

.manage-bars {
  width: 14px;
  height: 12px;
  display: block;
  border-radius: 3px;
  background:
    linear-gradient(currentColor, currentColor) center 1px / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center 5px / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center 9px / 14px 2px no-repeat;
}

.rail-manage-button:hover,
.rail-manage-button:focus-visible,
.rail-manage-button[aria-pressed="true"] {
  background: rgba(255, 106, 0, 0.12);
  color: var(--orange);
  outline: none;
}

.watchlist-sort-control {
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  justify-self: end;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 0 4px;
  cursor: pointer;
  transform: translateX(var(--watch-sort-offset));
}

.watchlist-sort-control:hover,
.watchlist-sort-control:focus-visible,
.watchlist-sort-control.active {
  background: rgba(255, 106, 0, 0.12);
  color: var(--orange);
  outline: none;
}

.sort-caret {
  width: 7px;
  height: 8px;
  display: inline-flex;
  position: relative;
}

.sort-caret::before,
.sort-caret::after {
  content: "";
  position: absolute;
  left: 1px;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  opacity: 0.55;
}

.sort-caret::before {
  top: 0;
  border-bottom: 4px solid currentColor;
}

.sort-caret::after {
  bottom: 0;
  border-top: 4px solid currentColor;
}

.watchlist-sort-control[data-sort-mode="decline"] .sort-caret::before,
.watchlist-sort-control[data-sort-mode="gain"] .sort-caret::after {
  opacity: 0.18;
}

.watchlist-sort-control[data-sort-mode="decline"] .sort-caret::after,
.watchlist-sort-control[data-sort-mode="gain"] .sort-caret::before {
  opacity: 1;
}

.watchlist-manage-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  margin: 6px 0 2px;
  padding: 0 6px 0 8px;
}

.watchlist-manage-tools span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.watchlist-rail {
  --watch-row-height: 44px;
  display: grid;
  grid-auto-rows: var(--watch-row-height);
  align-content: start;
  flex: 1 1 auto;
  gap: 0;
  margin-top: 8px;
  min-height: 0;
  max-height: calc(100vh - 214px);
  max-height: calc(100dvh - 214px);
  overflow: auto;
  padding: 0;
}

.watch-row {
  width: 100%;
  min-height: var(--watch-row-height);
  height: var(--watch-row-height);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 5px 30px 5px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  position: relative;
  cursor: pointer;
}

.watch-row:last-child {
  border-bottom: 0;
}

.watchlist-managing .watch-row {
  grid-template-columns: 12px 18px minmax(0, 1fr) auto;
  cursor: grab;
  padding-left: 3px;
}

.watchlist-managing .watch-row:active {
  cursor: grabbing;
}

.watch-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.watch-drag-handle {
  width: 10px;
  height: 16px;
  display: none;
  border-radius: 4px;
  opacity: 0.55;
  background:
    linear-gradient(var(--muted), var(--muted)) center 4px / 10px 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center 8px / 10px 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center 12px / 10px 2px no-repeat;
}

.watchlist-managing .watch-drag-handle {
  display: block;
}

.watch-row.active,
.watch-row:hover {
  color: var(--blue);
  background: var(--surface-soft);
}

[data-theme="dark"] .watch-row.active,
[data-theme="dark"] .watch-row:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.watch-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.watch-row.dragging {
  opacity: 0.45;
}

.watch-row.drag-over {
  background: rgba(255, 106, 0, 0.08);
  outline: 1px solid rgba(255, 106, 0, 0.48);
  outline-offset: -1px;
}

.watch-rank {
  width: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.watch-quote {
  display: grid;
  gap: 2px;
  justify-self: end;
  justify-items: end;
  min-width: 0;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.12s ease;
}

.watch-main strong {
  font-size: 13px;
  line-height: 1.1;
}

.watch-main span,
.watch-quote span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-delete {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0;
  line-height: 0;
  font-weight: 800;
  padding: 0;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.watch-delete::before {
  content: "\00d7";
  display: block;
  font-size: 16px;
  line-height: 1;
}

.watch-row:has(.watch-delete:hover) .watch-quote,
.watch-row:has(.watch-delete:focus-visible) .watch-quote {
  opacity: 0;
}

.watch-delete:hover,
.watch-delete:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.watch-delete:hover,
.watch-delete:focus-visible {
  background: rgba(232, 69, 85, 0.12);
  color: var(--red);
  outline: none;
}

.rail-logout {
  margin-top: auto;
}

.content {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.content.options-lab-content {
  gap: 6px;
  min-height: calc(100dvh - 74px);
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: visible;
}

.content.iv-content {
  gap: 6px;
  min-height: calc(100dvh - 74px);
  align-content: start;
}

.content.option-workspace-content.options-lab-content,
.content.option-workspace-content.iv-content {
  gap: 8px;
}

.content.option-workspace-content {
  gap: 8px;
  padding: 0 12px 12px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .content.option-workspace-content {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(13, 18, 25, 0.94);
  border-color: rgba(145, 170, 200, 0.22);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.36);
}

.panel,
.workspace-card {
  padding: 10px;
}

[data-theme="dark"] .content > .workspace-card,
[data-theme="dark"] .content .workspace-card {
  transform: translateZ(0);
}

.panel-header,
.card-header,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-header span,
.subtle,
.meta,
.metric-label {
  color: var(--muted);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: start;
}

.workspace-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(44px, auto) 34px;
  align-content: stretch;
  position: relative;
  z-index: 2;
  min-height: 112px;
  padding: 12px 12px 0;
  overflow: visible;
  gap: 10px;
}

.workspace-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 12px;
  align-items: center;
}

.ticker-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  row-gap: 4px;
}

.ticker-line h1,
.page-title h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.ticker-line h1 {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  line-height: 1;
}

.inline-quote {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  white-space: nowrap;
  font-weight: 800;
}

.inline-price {
  display: inline-flex;
  align-items: center;
  font-size: 23px;
  line-height: 1;
}

.inline-change {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  line-height: 1;
}

.delayed-chip {
  font-size: 11px;
  min-height: 22px;
  padding: 0 8px;
}

.watchlist-toggle {
  position: relative;
  isolation: isolate;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: color 0.14s ease, transform 0.14s ease;
}

.watchlist-toggle::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border: 1px solid rgba(145, 170, 200, 0.24);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  opacity: 0;
  transform: scale(0.74);
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  -webkit-backdrop-filter: blur(12px) saturate(1.35);
  backdrop-filter: blur(12px) saturate(1.35);
}

.watchlist-toggle span {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.watchlist-toggle:not(.active) span {
  font-size: 0;
}

.watchlist-toggle:not(.active) span::before,
.watchlist-toggle:not(.active) span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.watchlist-toggle:not(.active) span::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.watchlist-toggle.active span {
  font-size: 20px;
}

.watchlist-toggle:hover,
.watchlist-toggle:focus-visible {
  color: var(--orange);
  transform: translateY(-1px);
}

.watchlist-toggle:hover::before,
.watchlist-toggle:focus-visible::before {
  border-color: rgba(var(--orange-rgb), 0.38);
  opacity: 1;
  transform: scale(1);
}

.watchlist-toggle.active {
  color: var(--orange);
}

[data-theme="dark"] .watchlist-toggle::before {
  border-color: rgba(164, 183, 211, 0.32);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(126, 231, 213, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .watchlist-toggle:hover::before,
[data-theme="dark"] .watchlist-toggle:focus-visible::before {
  border-color: rgba(var(--orange-rgb), 0.48);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 24px rgba(var(--orange-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.price {
  font-size: 40px;
  line-height: 1;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 0;
}

[data-theme="dark"] .inline-price,
[data-theme="dark"] .price,
[data-theme="dark"] .metric-value.positive,
[data-theme="dark"] .positive {
  text-shadow: 0 0 18px var(--glow-green);
}

[data-theme="dark"] .negative {
  text-shadow: 0 0 18px rgba(255, 82, 112, 0.22);
}

.negative {
  color: var(--red) !important;
}

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

.orange-text {
  color: var(--orange) !important;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.chip.orange {
  background: rgba(var(--orange-rgb), 0.12);
  color: var(--orange);
  border-color: transparent;
}

[data-theme="dark"] .chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(145, 170, 200, 0.18);
}

[data-theme="dark"] .chip.orange {
  background: rgba(var(--orange-rgb), 0.16);
  color: var(--orange);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.metric-box {
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 6px 7px;
}

[data-theme="dark"] .metric-box {
  border: 1px solid rgba(145, 170, 200, 0.12);
  background: rgba(255, 255, 255, 0.055);
}

.metric-value {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  font-weight: 800;
}

.tab-row,
.strategy-row,
.expiry-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.workspace-tab-row {
  position: relative;
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0;
  min-height: 34px;
  padding: 0;
  overflow-x: visible;
  overflow-y: visible;
}

.workspace-hero-card .workspace-tab-row {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: min(100%, calc(100% - 224px));
  max-width: calc(100% - 224px);
  z-index: 3;
  padding-top: 0;
  transform: none;
  align-self: end;
}

.workspace-tab-row::-webkit-scrollbar {
  display: none;
}

.workspace-tab-button {
  position: relative;
  min-height: 31px;
  padding: 0 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  z-index: 1;
  font-size: 14px;
  color: var(--muted);
}

.workspace-tab-button.active {
  border-color: transparent;
  background: transparent;
  color: var(--blue);
  box-shadow: none;
  transform: none;
  z-index: 2;
}

.workspace-tab-button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
  border: 0;
  clip-path: none;
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .workspace-tab-button.active::after {
  background: var(--blue);
  box-shadow: 0 0 14px rgba(51, 184, 255, 0.28);
}

.workspace-tab-surface {
  margin-top: 0;
  min-height: 46px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.workspace-tab-surface + .workspace-card {
  margin-top: 6px;
}

.flow-tab-card {
  min-height: 46px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
}

.flow-tab-row {
  min-height: 30px;
  gap: 8px;
  padding-bottom: 0;
  align-items: center;
}

.flow-tab-row .tab-button {
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.flow-tab-row .tab-button.active {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.option-workspace-content > .workspace-hero-card,
.option-workspace-content > .workspace-tab-surface,
.content > .flow-tab-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

[data-theme="dark"] .option-workspace-content > .workspace-hero-card,
[data-theme="dark"] .option-workspace-content > .workspace-tab-surface,
[data-theme="dark"] .content > .flow-tab-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.option-lab-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  align-content: start;
  height: 71px;
}

.option-lab-toolbar > div {
  position: absolute;
  inset: 5px 0;
  height: 61px;
}

.option-lab-filter-card {
  align-self: start;
  display: block;
  height: 71px;
  min-height: 0;
  padding: 0 10px;
}

.option-lab-filter-card.workspace-tab-surface {
  height: auto;
  min-height: 46px;
  padding: 7px 10px;
}

.iv-filter-card.workspace-tab-surface {
  min-height: 46px;
  padding: 7px 10px;
}

.workspace-tab-surface .option-lab-toolbar {
  height: auto;
  min-height: 0;
}

.workspace-tab-surface .option-lab-toolbar > div {
  position: static;
  inset: auto;
  height: auto;
}

.workspace-tab-surface .option-lab-toolbar .strategy-row {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  height: 30px;
  min-height: 30px;
  gap: 8px;
}

.workspace-tab-surface .option-lab-toolbar .strategy-row + .strategy-row {
  margin-top: 6px !important;
}

.workspace-tab-surface .iv-mode-toolbar {
  min-height: 30px;
  gap: 8px;
}

.workspace-tab-surface .iv-mode-toolbar .strategy-button,
.workspace-tab-surface .option-lab-toolbar .strategy-button {
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.workspace-tab-surface .iv-mode-toolbar .strategy-button.active,
.workspace-tab-surface .option-lab-toolbar .strategy-button.active {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--text);
}

.option-lab-toolbar .symbol-input {
  width: 100%;
}

.option-lab-toolbar .strategy-button {
  min-height: 34px;
  padding: 0 10px;
}

.option-lab-toolbar .symbol-input {
  min-height: 36px;
}

.tab-button,
.strategy-button,
.expiry-button {
  min-height: 34px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 0 11px;
  font-weight: 800;
  font-size: 14px;
}

[data-theme="dark"] .tab-button,
[data-theme="dark"] .strategy-button,
[data-theme="dark"] .expiry-button,
[data-theme="dark"] .segment-button,
[data-theme="dark"] .symbol-input,
[data-theme="dark"] .workbench-symbol-input {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(145, 170, 200, 0.22);
  color: #d8e3f3;
}

.tab-button.active,
.strategy-button.active,
.expiry-button.active {
  background: var(--blue-soft);
  color: var(--text);
  border-color: var(--blue);
}

[data-theme="dark"] .tab-button.active,
[data-theme="dark"] .strategy-button.active,
[data-theme="dark"] .expiry-button.active,
[data-theme="dark"] .segment-button.active {
  background: rgba(51, 184, 255, 0.18);
  color: #f8fbff;
  border-color: rgba(51, 184, 255, 0.7);
  box-shadow: 0 0 24px rgba(51, 184, 255, 0.12);
}

.option-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 8px;
}

.option-workspace-single {
  grid-template-columns: minmax(0, 1fr);
}

.strategy-card {
  padding: 9px 10px;
}

[data-theme="dark"] .strategy-card,
[data-theme="dark"] .option-workbench-card {
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .strategy-card::before,
[data-theme="dark"] .option-workbench-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 26%, transparent 74%, rgba(0, 224, 164, 0.05));
  opacity: 0.78;
}

[data-theme="dark"] .strategy-card > *,
[data-theme="dark"] .option-workbench-card > * {
  position: relative;
  z-index: 1;
}

.strategy-card .card-header {
  margin-bottom: 8px;
}

.strategy-card .card-header h2 {
  margin: 0;
}

.strategy-card .card-header p {
  margin: 4px 0 0;
}

.strategy-card .expiry-row {
  margin-top: 8px;
}

.option-workbench-card {
  padding: 8px 10px;
}

.option-workbench-card .card-header {
  margin-bottom: 4px;
}

.option-workbench-card .card-header h2 {
  font-size: 23px;
}

.option-workbench-card .card-header p {
  margin-top: 2px;
  font-size: 13px;
}

.workbench-symbol-row {
  display: grid;
  grid-template-columns: 118px auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  width: 100%;
  height: 28px;
  margin-top: 0;
}

.workbench-symbol-input {
  width: 118px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  box-sizing: border-box;
}

.workbench-quote {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.workbench-symbol-row > .subtle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-workbench-card .expiry-row {
  margin-top: 4px;
}

.option-workbench-card .expiry-button {
  min-height: 32px;
  padding: 0 10px;
}

.strategy-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 12px;
}

.option-workbench-card .strategy-controls {
  gap: 10px;
  padding-top: 6px;
}

.control-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 800;
}

.option-workbench-card .control-label {
  margin-bottom: 4px;
  font-size: 13px;
}

.control-track {
  width: 100%;
  height: 16px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  --fill: 46%;
}

.control-track:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.control-track::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #26a7df 0 var(--fill), rgba(101, 103, 107, 0.32) var(--fill) 100%);
}

[data-theme="dark"] .control-track::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #00e0c2 0 var(--fill), rgba(145, 170, 200, 0.22) var(--fill) 100%);
  box-shadow: 0 0 18px rgba(0, 224, 194, 0.18);
}

.control-track::-webkit-slider-thumb {
  width: 9px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #8a8f98;
  cursor: grab;
}

[data-theme="dark"] .control-track::-webkit-slider-thumb {
  background: #d8e4f3;
  box-shadow: 0 0 18px rgba(0, 224, 194, 0.22);
}

.control-track:active::-webkit-slider-thumb {
  cursor: grabbing;
}

.control-track::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #26a7df 0 var(--fill), rgba(101, 103, 107, 0.32) var(--fill) 100%);
}

[data-theme="dark"] .control-track::-moz-range-track {
  background: linear-gradient(90deg, #00e0c2 0 var(--fill), rgba(145, 170, 200, 0.22) var(--fill) 100%);
  box-shadow: 0 0 18px rgba(0, 224, 194, 0.18);
}

.control-track::-moz-range-thumb {
  width: 9px;
  height: 14px;
  border: 0;
  border-radius: 4px;
  background: #8a8f98;
  cursor: grab;
}

[data-theme="dark"] .control-track::-moz-range-thumb {
  background: #d8e4f3;
  box-shadow: 0 0 18px rgba(0, 224, 194, 0.22);
}

.table-mode-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 12px;
}

.option-workbench-card .table-mode-row {
  gap: 8px;
  margin-top: 8px;
}

.option-workbench-card .segment-button {
  min-height: 34px;
}

.strike-ruler {
  --strike-accent: var(--green);
  height: 116px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, var(--surface) 0, transparent 9%, transparent 91%, var(--surface) 100%),
    linear-gradient(to bottom, transparent 53%, rgba(105, 115, 134, 0.18) 53%, rgba(105, 115, 134, 0.18) 56%, transparent 56%);
}

[data-theme="dark"] .strike-ruler {
  background:
    linear-gradient(90deg, var(--surface) 0, transparent 9%, transparent 91%, var(--surface) 100%),
    linear-gradient(to bottom, transparent 53%, rgba(145, 170, 200, 0.22) 53%, rgba(145, 170, 200, 0.22) 56%, transparent 56%),
    radial-gradient(circle at 50% 42%, rgba(0, 224, 164, 0.09), transparent 38%);
}

.strike-ruler-put {
  --strike-accent: var(--red);
}

.option-workbench-card .strike-ruler {
  height: 88px;
}

.strike-ruler::before,
.strike-ruler::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12%;
  pointer-events: none;
  z-index: 3;
}

.strike-ruler::before {
  left: 0;
  background: linear-gradient(90deg, var(--surface) 0%, rgba(255, 255, 255, 0) 100%);
}

.strike-ruler::after {
  right: 0;
  background: linear-gradient(270deg, var(--surface) 0%, rgba(255, 255, 255, 0) 100%);
}

[data-theme="dark"] .strike-ruler::before {
  background: linear-gradient(90deg, rgba(13, 18, 25, 0.92) 0%, rgba(13, 18, 25, 0) 100%);
}

[data-theme="dark"] .strike-ruler::after {
  background: linear-gradient(270deg, rgba(13, 18, 25, 0.92) 0%, rgba(13, 18, 25, 0) 100%);
}

.strike-scroll {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: none;
  cursor: grab;
}

.strike-scroll.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.strike-scroll::-webkit-scrollbar {
  display: none;
}

.strike-spacer {
  flex: 0 0 50%;
}

.strike-tick {
  position: relative;
  flex: 0 0 72px;
  scroll-snap-align: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-weight: 800;
}

.strike-tick::before,
.strike-tick::after {
  content: "";
  position: absolute;
  top: 65px;
  width: 1px;
  height: 13px;
  border-radius: 999px;
  background: rgba(105, 115, 134, 0.16);
}

.strike-tick::before {
  left: 25%;
}

.strike-tick::after {
  left: 75%;
}

.strike-tick-line {
  position: absolute;
  left: 50%;
  top: 58px;
  width: 2px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(105, 115, 134, 0.34);
}

.option-workbench-card .strike-tick-line {
  top: 45px;
  height: 20px;
}

.option-workbench-card .strike-tick::before,
.option-workbench-card .strike-tick::after {
  top: 48px;
  height: 8px;
}

.strike-tick.major .strike-tick-line {
  height: 44px;
  background: rgba(105, 115, 134, 0.52);
}

.option-workbench-card .strike-tick.major .strike-tick-line {
  height: 34px;
}

.strike-value {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  white-space: nowrap;
  color: rgba(101, 103, 107, 0.64);
  font-weight: 800;
  line-height: 1;
}

.strike-tick.active .strike-value {
  color: var(--text);
  z-index: 4;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 800;
}

.strike-marker {
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(-50%);
  min-width: 82px;
  text-align: center;
  background: linear-gradient(180deg, #0de8a1 0%, var(--green) 100%);
  color: white;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 22px;
  font-weight: 800;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 7px 18px rgba(0, 168, 107, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

[data-theme="dark"] .strike-marker {
  background: linear-gradient(180deg, #10ffd0 0%, #00b884 100%);
  box-shadow: 0 0 32px rgba(0, 224, 164, 0.42), 0 16px 46px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.option-workbench-card .strike-marker {
  min-width: 70px;
  padding: 5px 8px;
  font-size: 19px;
}

.strike-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--green);
}

.strike-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  width: 3px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green), rgba(0, 168, 107, 0.28));
  transform: translateX(-50%);
}

.strike-ruler-put .strike-marker {
  background: linear-gradient(180deg, color-mix(in srgb, var(--red) 74%, white) 0%, var(--red) 100%);
  box-shadow: 0 7px 18px rgba(232, 69, 85, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .strike-ruler-put .strike-marker {
  background: linear-gradient(180deg, color-mix(in srgb, var(--red) 82%, white) 0%, var(--red) 100%);
  box-shadow: 0 0 32px rgba(255, 82, 112, 0.36), 0 16px 46px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.strike-ruler-put .strike-marker::before {
  border-top-color: var(--red);
}

.strike-ruler-put .strike-marker::after {
  background: linear-gradient(180deg, var(--red), rgba(232, 69, 85, 0.3));
}

.strike-ruler-buy .strike-marker {
  top: auto;
  bottom: 2px;
}

.strike-ruler-buy .strike-marker::before {
  top: auto;
  bottom: calc(100% - 1px);
  border-top: 0;
  border-bottom: 7px solid var(--green);
}

.strike-ruler-put.strike-ruler-buy .strike-marker::before {
  border-bottom-color: var(--red);
}

.strike-ruler-buy .strike-marker::after {
  top: auto;
  bottom: calc(100% + 6px);
  background: linear-gradient(0deg, var(--green), rgba(0, 168, 107, 0.28));
}

.strike-ruler-put.strike-ruler-buy .strike-marker::after {
  background: linear-gradient(0deg, var(--red), rgba(232, 69, 85, 0.3));
}

.option-workbench-card .strike-marker::after {
  height: 31px;
}

.risk-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
}

.option-workbench-card .risk-strip {
  gap: 4px;
}

.risk-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 19px;
}

.option-workbench-card .risk-strip strong {
  margin-top: 2px;
  font-size: 17px;
}

.breakeven {
  text-align: center;
  font-weight: 800;
  font-size: 19px;
  margin: 10px 0;
}

.option-workbench-card .breakeven {
  font-size: 16px;
  margin: 5px 0;
}

.heatmap-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scenario-graph-wrap {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

[data-theme="dark"] .scenario-graph-wrap,
[data-theme="dark"] .heatmap-wrap {
  background: rgba(5, 8, 15, 0.86);
  border-color: rgba(145, 170, 200, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.scenario-graph {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: block;
}

.scenario-stat-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 14px 8px;
  text-align: center;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

[data-theme="dark"] .scenario-stat-row {
  background: rgba(255, 255, 255, 0.045);
}

.scenario-stat {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.scenario-stat strong {
  color: var(--text);
  font-size: 13px;
  text-transform: none;
}

.scenario-stat.positive strong {
  color: var(--green);
}

.scenario-plot-bg {
  fill: var(--surface);
}

[data-theme="dark"] .scenario-plot-bg {
  fill: #070b14;
}

.scenario-grid {
  stroke: rgba(101, 103, 107, 0.14);
  stroke-width: 1;
}

[data-theme="dark"] .scenario-grid {
  stroke: rgba(145, 170, 200, 0.13);
}

.scenario-red-area {
  fill: rgba(232, 69, 85, 0.16);
}

.scenario-green-area {
  fill: rgba(0, 168, 107, 0.15);
}

[data-theme="dark"] .scenario-red-area {
  fill: rgba(255, 82, 112, 0.22);
}

[data-theme="dark"] .scenario-green-area {
  fill: rgba(0, 224, 164, 0.2);
}

.scenario-zero {
  stroke: rgba(28, 30, 33, 0.58);
  stroke-width: 1.1;
}

.scenario-current-line {
  stroke: rgba(101, 103, 107, 0.7);
  stroke-width: 1.2;
  stroke-dasharray: 2 4;
}

.scenario-break-even-line {
  stroke: var(--blue);
  stroke-width: 1.4;
}

.scenario-current-dot {
  fill: var(--surface);
  stroke: var(--blue);
  stroke-width: 1.5;
}

.scenario-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scenario-line-current {
  stroke: var(--blue);
}

[data-theme="dark"] .scenario-line-current {
  filter: drop-shadow(0 0 7px rgba(51, 184, 255, 0.3));
}

.scenario-line-expiry {
  stroke: var(--muted);
  stroke-width: 2;
  stroke-dasharray: 4 6;
  opacity: 0.8;
}

.scenario-legend-current {
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
}

.scenario-legend-expiry {
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 4 5;
}

.scenario-y-label,
.scenario-x-label,
.scenario-marker-label,
.scenario-breakeven-label,
.scenario-loss-label,
.scenario-legend-label {
  fill: var(--text);
  font-weight: 800;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
}

.scenario-y-label {
  text-anchor: end;
  font-size: 10px;
}

.scenario-x-label {
  text-anchor: middle;
  font-size: 10px;
}

.scenario-marker-label {
  font-size: 11px;
}

.scenario-breakeven-label {
  fill: var(--blue);
  font-size: 11px;
}

.scenario-loss-label {
  fill: var(--red);
  font-size: 12px;
}

.scenario-legend-label {
  fill: var(--muted);
  font-size: 11px;
  stroke-width: 2px;
}

.option-workbench-card .heatmap-wrap {
  max-height: min(38vh, 390px);
}

.workbench-surface {
  min-height: 0;
  height: 100%;
}

.workbench-surface > .heatmap-wrap,
.workbench-surface > .scenario-graph-wrap {
  height: 100%;
}

.heatmap {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.heatmap th,
.heatmap td {
  height: 27px;
  padding: 0 8px;
  text-align: right;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 15px;
}

.option-workbench-card .heatmap th,
.option-workbench-card .heatmap td {
  height: 22px;
  padding: 0 6px;
  font-size: 13px;
}

.option-workbench-card .heatmap .axis {
  min-width: 112px;
}

.heatmap th {
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.heatmap .axis {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--text);
  min-width: 128px;
}

[data-theme="dark"] .heatmap th,
[data-theme="dark"] .heatmap .axis {
  background: rgba(12, 18, 28, 0.96);
}

[data-theme="dark"] .heatmap th,
[data-theme="dark"] .heatmap td {
  border-color: rgba(255, 255, 255, 0.055);
}

[data-theme="dark"] .hm-pos-3 {
  background: #00b85f;
}

[data-theme="dark"] .hm-pos-2 {
  background: #087a59;
}

[data-theme="dark"] .hm-pos-1 {
  background: #10584f;
}

[data-theme="dark"] .hm-flat {
  background: #17243c;
}

[data-theme="dark"] .hm-neg-1 {
  background: #651438;
}

[data-theme="dark"] .hm-neg-2 {
  background: #981236;
}

[data-theme="dark"] .hm-neg-3 {
  background: #d41446;
}

.option-lab-toolbar .strategy-row {
  position: absolute;
  left: 0;
  right: 0;
  gap: 5px;
  height: 28px;
  min-height: 28px;
  align-items: center;
  padding-bottom: 0;
  margin: 0 !important;
}

.option-lab-toolbar .strategy-row:first-child {
  top: 0;
}

.option-lab-toolbar .strategy-row + .strategy-row {
  top: 33px;
  margin-top: 0 !important;
}

.option-lab-toolbar .strategy-button {
  height: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  font-size: 12px;
  line-height: 1;
  border-radius: 7px;
}

.option-lab-toolbar .symbol-input {
  min-height: 32px;
  font-size: 13px;
}

.strategy-context-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 198px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.68)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

[data-theme="dark"] .strategy-context-card {
  border-color: rgba(145, 170, 200, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    rgba(12, 18, 28, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.strategy-context-copy {
  min-width: 0;
}

.strategy-constraint-row {
  display: flex;
  align-items: center;
  justify-content: stretch;
  min-width: 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  height: 32px;
  z-index: 9;
}

.strategy-constraint-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.strategy-constraint-toggle strong {
  color: var(--text);
  font: inherit;
}

.strategy-constraint-toggle.active {
  border-color: var(--orange);
  background: var(--orange);
  color: white;
}

.strategy-constraint-toggle.active strong {
  color: white;
}

.strategy-context-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.strategy-context-heading strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-family {
  flex: 0 0 auto;
  min-width: 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

[data-theme="dark"] .strategy-family {
  background: rgba(51, 184, 255, 0.14);
  color: rgba(172, 225, 255, 0.9);
}

.strategy-context-copy p {
  margin: 4px 0 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-tag-row {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 1px;
}

.strategy-tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.1);
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.strategy-tag-up,
.strategy-tag-credit,
.strategy-tag-income,
.strategy-tag-safe {
  background: rgba(0, 168, 107, 0.12);
  color: #078657;
}

.strategy-tag-down,
.strategy-tag-risk {
  background: rgba(232, 69, 85, 0.12);
  color: #c43143;
}

.strategy-tag-debit {
  background: rgba(255, 69, 0, 0.12);
  color: var(--orange);
}

.strategy-tag-vol {
  background: rgba(124, 58, 237, 0.12);
  color: #6d35d7;
}

[data-theme="dark"] .strategy-tag {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(226, 232, 240, 0.82);
}

[data-theme="dark"] .strategy-tag-up,
[data-theme="dark"] .strategy-tag-credit,
[data-theme="dark"] .strategy-tag-income,
[data-theme="dark"] .strategy-tag-safe {
  background: rgba(0, 190, 125, 0.13);
  color: rgba(126, 239, 186, 0.88);
}

[data-theme="dark"] .strategy-tag-down,
[data-theme="dark"] .strategy-tag-risk {
  background: rgba(255, 91, 111, 0.13);
  color: rgba(255, 151, 166, 0.9);
}

[data-theme="dark"] .strategy-tag-debit {
  background: rgba(255, 111, 54, 0.14);
  color: rgba(255, 170, 126, 0.92);
}

[data-theme="dark"] .strategy-tag-vol {
  background: rgba(168, 85, 247, 0.14);
  color: rgba(216, 180, 254, 0.9);
}

.strategy-payoff-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.strategy-payoff-card span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-payoff-svg {
  width: 94px;
  height: 52px;
  overflow: visible;
}

.payoff-axis,
.payoff-center {
  stroke: rgba(100, 116, 139, 0.42);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.payoff-center {
  stroke-dasharray: 3 4;
  opacity: 0.7;
}

.payoff-shadow,
.payoff-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.payoff-shadow {
  stroke: rgba(15, 23, 42, 0.1);
  stroke-width: 8;
}

.payoff-line {
  stroke-width: 4;
}

[data-theme="dark"] .payoff-axis,
[data-theme="dark"] .payoff-center {
  stroke: rgba(203, 213, 225, 0.36);
}

[data-theme="dark"] .payoff-shadow {
  stroke: rgba(0, 0, 0, 0.32);
}

.custom-strategy-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 8px;
  border: 1px dashed rgba(24, 119, 242, 0.34);
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue-soft) 52%, transparent);
}

[data-theme="dark"] .custom-strategy-control {
  border-color: rgba(51, 184, 255, 0.28);
  background: rgba(51, 184, 255, 0.055);
}

.custom-leg-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 0;
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

[data-theme="dark"] .custom-leg-pill {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(236, 242, 249, 0.86);
}

.custom-builder-panel {
  --custom-builder-columns: 76px 76px 118px 104px 60px 74px 88px 94px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 2px 4px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .custom-builder-panel {
  background: transparent;
  box-shadow: none;
}

.custom-builder-header {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.custom-builder-header > div:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.custom-builder-header strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.custom-builder-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 15%, transparent);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

[data-theme="dark"] .custom-builder-kicker {
  background: rgba(51, 184, 255, 0.2);
  color: #69e5ff;
}

.custom-builder-summary-strip {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.custom-builder-summary-strip span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.custom-builder-summary-strip b {
  color: var(--text);
  font: inherit;
}

[data-theme="dark"] .custom-builder-summary-strip span {
  border-color: rgba(145, 170, 200, 0.16);
  background: rgba(255, 255, 255, 0.055);
}

.custom-builder-quick-row {
  display: grid;
  grid-template-columns: var(--custom-builder-columns);
  gap: 7px;
  align-items: center;
  justify-content: start;
  min-width: 0;
  padding: 0 6px;
}

.custom-builder-input {
  width: 100%;
  height: 30px;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 850;
}

.custom-builder-number,
.custom-builder-qty {
  text-align: right;
}

.custom-builder-strike-input {
  width: 100%;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  padding: 0 2px;
  text-align: center;
  appearance: textfield;
  font-variant-numeric: tabular-nums;
}

.custom-builder-strike-input::-webkit-outer-spin-button,
.custom-builder-strike-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.custom-builder-expiration-input {
  width: 100%;
}

.custom-builder-qty {
  width: 100%;
  padding-right: 6px;
}

.custom-builder-strike-stepper {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  width: 100%;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
}

[data-theme="dark"] .custom-builder-strike-stepper {
  border-color: rgba(145, 170, 200, 0.2);
  background: rgba(8, 13, 22, 0.54);
}

.custom-builder-strike-stepper .custom-builder-input {
  height: 28px;
  border-top: 0;
  border-bottom: 0;
  background: transparent;
}

.custom-builder-step-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 28px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(226, 232, 240, 0.82));
  color: var(--muted);
  padding: 0;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset -1px 0 0 rgba(148, 163, 184, 0.2);
}

.custom-builder-step-button:last-child {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 1px 0 0 rgba(148, 163, 184, 0.2);
}

.custom-builder-step-button:hover,
.custom-builder-step-button:focus-visible {
  color: var(--blue);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(214, 228, 255, 0.9));
}

[data-theme="dark"] .custom-builder-step-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(145, 170, 200, 0.08));
  color: rgba(236, 242, 249, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset -1px 0 0 rgba(145, 170, 200, 0.14);
}

[data-theme="dark"] .custom-builder-input {
  border-color: rgba(145, 170, 200, 0.2);
  background: rgba(8, 13, 22, 0.54);
  color: rgba(236, 242, 249, 0.94);
}

.custom-builder-input:focus-visible,
.custom-builder-add-button:focus-visible,
.custom-builder-mini-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.custom-builder-add-button {
  grid-column: 6 / -1;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: var(--orange);
  color: white;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.custom-builder-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.custom-builder-table-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.custom-builder-section-title {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

[data-theme="dark"] .custom-builder-table-wrap {
  border-color: rgba(145, 170, 200, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.custom-builder-table {
  width: 100%;
  min-width: min(720px, 100%);
  table-layout: fixed;
  border-collapse: collapse;
}

.custom-builder-col-action {
  width: 10%;
}

.custom-builder-col-type {
  width: 10%;
}

.custom-builder-col-strike {
  width: 16%;
}

.custom-builder-col-expiration {
  width: 16%;
}

.custom-builder-col-qty {
  width: 8%;
}

.custom-builder-col-price {
  width: 12%;
}

.custom-builder-col-net {
  width: 14%;
}

.custom-builder-col-actions {
  width: 14%;
}

.custom-builder-table th,
.custom-builder-table td {
  height: 38px;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text);
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.custom-builder-table th {
  height: 30px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

[data-theme="dark"] .custom-builder-table th,
[data-theme="dark"] .custom-builder-table td {
  border-bottom-color: rgba(145, 170, 200, 0.12);
}

.custom-builder-leg-row {
  cursor: pointer;
}

.custom-builder-leg-row.active {
  background: color-mix(in srgb, var(--blue-soft) 45%, transparent);
}

[data-theme="dark"] .custom-builder-leg-row.active {
  background: rgba(51, 184, 255, 0.1);
}

.custom-builder-price-cell {
  white-space: nowrap;
}

.custom-builder-price-cell strong {
  display: block;
  font-size: 12px;
}

.custom-builder-price-cell span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.custom-builder-net-cell {
  font-weight: 900;
  white-space: nowrap;
}

.custom-builder-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  white-space: nowrap;
}

.custom-builder-mini-button {
  height: 26px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  padding: 0 7px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.custom-builder-details-button {
  width: 56px;
  padding: 0;
}

.custom-builder-icon-button {
  position: relative;
  width: 30px;
  padding: 0;
  font-size: 0;
  line-height: 0;
}

.custom-builder-delete-button {
  border: 0;
  background: transparent;
  color: #9aa5b5;
  filter: drop-shadow(0 5px 8px rgba(78, 91, 110, 0.16));
}

.custom-builder-delete-button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(121, 134, 154, 0.92);
  border-top: 0;
  border-radius: 0 0 3px 3px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.6) 0 2px, transparent 2px 5px, rgba(255, 255, 255, 0.38) 5px 7px, transparent 7px),
    linear-gradient(180deg, #f6f8fb, #c7ced9 62%, #9aa5b5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -2px 2px rgba(65, 77, 96, 0.18),
    0 2px 4px rgba(78, 91, 110, 0.18);
  transform: translateX(-50%);
}

.custom-builder-delete-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 17px;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #ffffff, #cbd3df);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 2px rgba(65, 77, 96, 0.18),
    0 -3px 0 -1px #d9dee8;
  transform: translateX(-50%);
}

.custom-builder-delete-button:hover,
.custom-builder-delete-button:focus-visible {
  background: transparent;
  color: #6f7b8e;
  transform: translateY(-1px);
}

.custom-builder-mini-button.danger {
  color: var(--red);
}

[data-theme="dark"] .custom-builder-mini-button {
  border-color: rgba(145, 170, 200, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(236, 242, 249, 0.9);
}

[data-theme="dark"] .custom-builder-mini-button.danger {
  color: #ff8aa0;
}

.custom-builder-empty {
  color: var(--muted) !important;
  font-weight: 800;
  text-align: center !important;
}

.option-workbench-card {
  padding: 6px 8px;
}

.option-workbench-card .workbench-top-stack {
  display: grid;
  grid-template-rows: 28px 32px;
  row-gap: 5px;
  height: 65px;
  min-height: 65px;
  align-items: start;
}

.option-workbench-card .workbench-top-stack-embedded {
  grid-template-rows: 32px;
  height: 32px;
  min-height: 32px;
  row-gap: 0;
}

.options-lab-content .option-workbench-card .workbench-top-stack {
  grid-template-rows: 28px 32px;
  height: 65px;
  min-height: 65px;
}

.options-lab-content .option-workbench-card .workbench-top-stack-embedded {
  grid-template-rows: 32px;
  height: 32px;
  min-height: 32px;
}

.option-workbench-card .card-header {
  height: 28px;
  min-height: 28px;
  margin-bottom: 0;
}

.option-workbench-card .card-header h2 {
  font-size: 18px;
}

.option-workbench-card .card-header p {
  font-size: 12px;
}

.option-workbench-card .chip {
  padding: 3px 8px;
  font-size: 11px;
}

.option-workbench-card .expiry-row {
  gap: 6px;
  margin-top: 3px;
}

.expiry-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 0;
  height: 32px;
  min-height: 28px;
  min-width: 0;
}

.expiry-bar .expiry-row {
  margin-top: 0;
  min-width: 0;
}

.options-lab-content .option-workbench-card .expiry-bar {
  height: 32px;
  min-height: 32px;
  overflow: visible;
}

.option-side-control-stack {
  position: relative;
  display: block;
  width: 148px;
  min-width: 148px;
  height: 32px;
  justify-self: end;
  overflow: visible;
}

.option-side-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(48px, 1fr));
  align-items: center;
  width: 100%;
  height: 32px;
  box-sizing: border-box;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.side-toggle-button {
  min-height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.side-toggle-button.active {
  background: var(--orange);
  color: white;
}

.side-toggle-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.option-workbench-card .expiry-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 13px;
  border-radius: 7px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.option-workbench-card .expiry-button.active {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.option-workbench-card .strike-ruler {
  height: 58px;
  background:
    linear-gradient(90deg, var(--surface) 0, transparent 9%, transparent 91%, var(--surface) 100%),
    linear-gradient(to bottom, transparent 50%, rgba(105, 115, 134, 0.18) 50%, rgba(105, 115, 134, 0.18) 54%, transparent 54%);
}

.option-workbench-card .strike-tick {
  flex-basis: 58px;
  font-size: 11px;
}

.option-workbench-card .strike-tick-line {
  top: 25px;
  height: 12px;
}

.option-workbench-card .strike-tick::before,
.option-workbench-card .strike-tick::after {
  top: 28px;
  height: 6px;
}

.option-workbench-card .strike-tick.major .strike-tick-line {
  top: 22px;
  height: 18px;
}

.option-workbench-card .strike-value {
  font-size: 12px;
  bottom: 2px;
}

.option-workbench-card .strike-marker {
  min-width: 54px;
  top: 0;
  padding: 2px 7px;
  font-size: 13px;
  border-radius: 7px;
}

.option-workbench-card .strike-marker::after {
  top: calc(100% + 4px);
  height: 18px;
}

.option-workbench-card .strike-ruler-buy .strike-marker {
  top: auto;
  bottom: 0;
}

.option-workbench-card .strike-ruler-buy .strike-marker::before {
  top: auto;
  bottom: calc(100% - 1px);
  border-top: 0;
  border-bottom: 7px solid var(--strike-accent);
}

.option-workbench-card .strike-ruler-buy .strike-marker::after {
  top: auto;
  bottom: calc(100% + 4px);
  background: linear-gradient(0deg, var(--strike-accent), color-mix(in srgb, var(--strike-accent) 24%, transparent));
}

.iv-strike-control-bar {
  display: grid;
  grid-template-columns: minmax(360px, 0.58fr) minmax(190px, 1fr) auto;
  align-items: center;
  gap: 12px;
  height: 32px;
  min-height: 32px;
  min-width: 0;
}

.iv-strike-control-bar .expiry-row {
  align-items: center;
  height: 30px;
  min-width: 0;
  padding-bottom: 0;
}

.iv-strike-control-bar .strike-ruler-spacer {
  min-width: 0;
  height: 30px;
}

.iv-content .option-workbench-card.embedded-workbench-card .expiry-row-carousel {
  align-items: center;
  gap: 6px;
  height: 30px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 50%, transparent);
  scroll-behavior: auto;
  scroll-padding-inline: 0;
  scroll-snap-type: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  overscroll-behavior-inline: contain;
  touch-action: pan-y;
}

.iv-content .option-workbench-card.embedded-workbench-card .expiry-row-carousel.dragging {
  cursor: grabbing;
  user-select: none;
}

.iv-content .option-workbench-card.embedded-workbench-card .expiry-row-carousel::-webkit-scrollbar {
  display: none;
}

.iv-content .option-workbench-card.embedded-workbench-card .expiry-button {
  flex: 0 0 auto;
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: 14px;
  border-radius: 7px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

[data-theme="dark"] .iv-content .option-workbench-card.embedded-workbench-card .expiry-row-carousel {
  border-color: rgba(145, 170, 200, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.iv-content .option-workbench-card.embedded-workbench-card .option-side-toggle {
  min-height: 30px;
}

.iv-content .option-workbench-card.embedded-workbench-card .side-toggle-button {
  min-height: 26px;
}

.iv-strike-control-bar .option-side-toggle {
  justify-self: end;
}

.iv-strike-control-bar .iv-strike-ruler {
  --strike-accent: var(--green);
  --ruler-bg: rgba(248, 250, 252, 0.72);
  --ruler-edge: var(--surface);
  --ruler-tick: rgba(37, 43, 54, 0.64);
  --ruler-tick-minor: rgba(37, 43, 54, 0.42);
  --ruler-label: rgba(43, 50, 64, 0.72);
  --ruler-label-selected: color-mix(in srgb, var(--text) 88%, black);
  --ruler-label-selected-shadow: 0 1px 6px rgba(255, 255, 255, 0.58);
  --marker-bg: color-mix(in srgb, var(--green) 24%, transparent);
  height: 30px;
  min-width: 0;
  background:
    linear-gradient(90deg, var(--ruler-edge) 0, rgba(255, 255, 255, 0) 7%, rgba(255, 255, 255, 0) 93%, var(--ruler-edge) 100%),
    linear-gradient(180deg, var(--ruler-bg), color-mix(in srgb, var(--ruler-bg) 30%, transparent));
}

.iv-strike-control-bar .iv-strike-ruler.strike-ruler-put {
  --strike-accent: var(--red);
  --marker-bg: color-mix(in srgb, var(--red) 22%, transparent);
}

[data-theme="dark"] .iv-strike-control-bar .iv-strike-ruler {
  --ruler-bg: rgba(4, 5, 26, 0.88);
  --ruler-edge: rgba(13, 18, 25, 0.98);
  --ruler-tick: rgba(219, 225, 238, 0.78);
  --ruler-tick-minor: rgba(219, 225, 238, 0.52);
  --ruler-label: rgba(246, 248, 255, 0.86);
  --ruler-label-selected: var(--text);
  --ruler-label-selected-shadow: 0 1px 6px rgba(0, 0, 0, 0.32);
  --marker-bg: color-mix(in srgb, var(--green) 22%, transparent);
  background:
    linear-gradient(90deg, var(--ruler-edge) 0, rgba(13, 18, 25, 0) 7%, rgba(13, 18, 25, 0) 93%, var(--ruler-edge) 100%),
    linear-gradient(180deg, var(--ruler-bg), rgba(4, 5, 26, 0.72));
}

[data-theme="dark"] .iv-strike-control-bar .iv-strike-ruler.strike-ruler-put {
  --strike-accent: var(--red);
  --marker-bg: color-mix(in srgb, var(--red) 20%, transparent);
}

.iv-strike-control-bar .strike-tick {
  flex-basis: 54px;
  font-size: 10px;
}

.iv-strike-control-bar .strike-tick-line {
  top: 1px;
  width: 1px;
  height: 6px;
  background: var(--ruler-tick);
  opacity: var(--strike-focus, 0.62);
}

.iv-strike-control-bar .strike-tick-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 1px;
  height: 6px;
  border-radius: inherit;
  background: inherit;
}

.iv-strike-control-bar .strike-tick::before,
.iv-strike-control-bar .strike-tick::after {
  top: 3px;
  width: 1px;
  height: 4px;
  background: var(--ruler-tick-minor);
  opacity: var(--strike-focus, 0.62);
  box-shadow: 0 20px 0 var(--ruler-tick-minor);
}

.iv-strike-control-bar .strike-tick.major .strike-tick-line {
  top: 0;
  height: 8px;
  background: var(--ruler-tick);
}

.iv-strike-control-bar .strike-tick.major .strike-tick-line::after {
  top: 22px;
  height: 8px;
}

.iv-strike-control-bar .strike-value {
  top: 50%;
  bottom: auto;
  font-size: 12px;
  color: var(--ruler-label);
  opacity: var(--strike-focus, 0.58);
  transform: translate(-50%, -50%);
  transition: opacity 140ms ease, color 140ms ease;
}

.iv-strike-control-bar .strike-ruler.previewing .strike-value {
  transition: none;
}

.iv-strike-control-bar .strike-ruler:not(.previewing) .strike-tick.active .strike-tick-line,
.iv-strike-control-bar .strike-ruler:not(.previewing) .strike-tick.active .strike-tick-line::after,
.iv-strike-control-bar .strike-ruler:not(.previewing) .strike-tick.active::before,
.iv-strike-control-bar .strike-ruler:not(.previewing) .strike-tick.active::after,
.iv-strike-control-bar .strike-tick.preview .strike-tick-line,
.iv-strike-control-bar .strike-tick.preview .strike-tick-line::after,
.iv-strike-control-bar .strike-tick.preview::before,
.iv-strike-control-bar .strike-tick.preview::after {
  opacity: 0;
}

.iv-strike-control-bar .strike-ruler:not(.previewing) .strike-tick.active .strike-value,
.iv-strike-control-bar .strike-tick.preview .strike-value {
  color: var(--ruler-label-selected);
  opacity: 1;
  text-shadow: var(--ruler-label-selected-shadow);
  z-index: 6;
}

.iv-strike-control-bar .iv-strike-ruler .strike-marker {
  top: 1px;
  bottom: auto;
  min-width: 0;
  width: 3px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--strike-accent) 12%, transparent) 0%,
    var(--strike-accent) 20%,
    var(--strike-accent) 80%,
    color-mix(in srgb, var(--strike-accent) 12%, transparent) 100%
  );
  color: transparent;
  box-shadow:
    0 0 8px color-mix(in srgb, var(--strike-accent) 58%, transparent),
    0 0 18px color-mix(in srgb, var(--strike-accent) 34%, transparent);
  z-index: 3;
  transform: translateX(-50%);
}

.iv-strike-control-bar .iv-strike-ruler .strike-marker::before {
  display: none;
}

.iv-strike-control-bar .iv-strike-ruler .strike-marker::after {
  display: none;
}

.options-lab-content .option-workbench-card .strike-ruler {
  --strike-accent: var(--green);
  --ruler-bg: rgba(248, 250, 252, 0.72);
  --ruler-edge: var(--surface);
  --ruler-tick: rgba(37, 43, 54, 0.64);
  --ruler-tick-minor: rgba(37, 43, 54, 0.42);
  --ruler-label: rgba(43, 50, 64, 0.64);
  --ruler-label-selected: color-mix(in srgb, var(--text) 78%, var(--muted));
  --ruler-label-selected-shadow: 0 1px 5px rgba(255, 255, 255, 0.42);
  --marker-label: rgba(247, 255, 251, 0.9);
  --marker-label-shadow: 0 1px 1px rgba(0, 68, 48, 0.14);
  height: 30px;
  align-self: center;
  min-width: 0;
  overflow: visible;
  background:
    linear-gradient(90deg, var(--ruler-edge) 0, rgba(255, 255, 255, 0) 7%, rgba(255, 255, 255, 0) 93%, var(--ruler-edge) 100%),
    linear-gradient(180deg, var(--ruler-bg), color-mix(in srgb, var(--ruler-bg) 30%, transparent));
}

.options-lab-content .option-workbench-card .strike-ruler-put {
  --strike-accent: var(--red);
}

.options-lab-content .option-workbench-card .credit-spread-ruler {
  --strike-accent: var(--green);
  --credit-spread-range-bg:
    linear-gradient(90deg,
      rgba(248, 250, 252, 0.08) 0%,
      rgba(248, 250, 252, 0.46) 14%,
      rgba(248, 250, 252, 0.54) 50%,
      rgba(248, 250, 252, 0.46) 86%,
      rgba(248, 250, 252, 0.08) 100%),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.48) 0%,
      rgba(241, 245, 249, 0.22) 52%,
      rgba(255, 255, 255, 0.34) 100%);
  --credit-spread-range-border: rgba(203, 213, 225, 0.38);
  --credit-spread-range-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 -1px 0 rgba(148, 163, 184, 0.08),
    inset 0 0 18px rgba(255, 255, 255, 0.2),
    0 6px 18px rgba(15, 23, 42, 0.04);
  --credit-spread-range-filter: blur(8px) saturate(1.06);
}

.options-lab-content .option-workbench-card .credit-spread-ruler.strike-ruler-put {
  --strike-accent: var(--red);
}

[data-theme="dark"] .options-lab-content .option-workbench-card .strike-ruler {
  --ruler-bg: rgba(4, 5, 26, 0.88);
  --ruler-edge: rgba(13, 18, 25, 0.98);
  --ruler-tick: rgba(219, 225, 238, 0.78);
  --ruler-tick-minor: rgba(219, 225, 238, 0.52);
  --ruler-label: rgba(222, 230, 244, 0.66);
  --ruler-label-selected: rgba(236, 242, 249, 0.84);
  --ruler-label-selected-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
  --marker-label: rgba(224, 255, 244, 0.82);
  --marker-label-shadow: 0 1px 2px rgba(0, 28, 24, 0.32);
  background:
    linear-gradient(90deg, var(--ruler-edge) 0, rgba(13, 18, 25, 0) 7%, rgba(13, 18, 25, 0) 93%, var(--ruler-edge) 100%),
    linear-gradient(180deg, var(--ruler-bg), rgba(4, 5, 26, 0.72));
}

[data-theme="dark"] .options-lab-content .option-workbench-card .credit-spread-ruler {
  --credit-spread-range-bg:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.015) 0%,
      rgba(255, 255, 255, 0.08) 18%,
      rgba(255, 255, 255, 0.045) 50%,
      rgba(255, 255, 255, 0.08) 82%,
      rgba(255, 255, 255, 0.015) 100%),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.035) 42%,
      rgba(255, 255, 255, 0.09) 100%);
  --credit-spread-range-border: rgba(255, 255, 255, 0.16);
  --credit-spread-range-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    inset 22px 0 30px rgba(255, 255, 255, 0.07),
    inset -22px 0 30px rgba(255, 255, 255, 0.07),
    0 12px 34px rgba(0, 0, 0, 0.34);
  --credit-spread-range-filter: blur(16px) saturate(1.8) contrast(1.06) brightness(1.04);
}

.options-lab-content .option-workbench-card .strike-marker {
  top: -22px;
  bottom: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 24px;
  padding: 0 8px;
  box-sizing: border-box;
  border: 0;
  border-radius: 9px;
  background:
    radial-gradient(120% 150% at 50% -45%, rgba(255, 255, 255, 0.48), transparent 54%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--strike-accent) 58%, transparent) 0%,
      color-mix(in srgb, var(--strike-accent) 86%, rgba(255, 255, 255, 0.22)) 16%,
      color-mix(in srgb, var(--strike-accent) 96%, rgba(255, 255, 255, 0.08)) 50%,
      color-mix(in srgb, var(--strike-accent) 86%, rgba(255, 255, 255, 0.22)) 84%,
      color-mix(in srgb, var(--strike-accent) 58%, transparent) 100%);
  -webkit-backdrop-filter: blur(0) saturate(1);
  backdrop-filter: blur(0) saturate(1);
  color: var(--marker-label);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-shadow: var(--marker-label-shadow);
  box-shadow:
    0 7px 18px color-mix(in srgb, var(--strike-accent) 24%, transparent),
    0 0 18px color-mix(in srgb, var(--strike-accent) 16%, transparent),
    inset 9px 0 12px color-mix(in srgb, rgba(255, 255, 255, 0.22) 38%, transparent),
    inset -9px 0 12px color-mix(in srgb, rgba(255, 255, 255, 0.22) 38%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transform: translateX(-50%);
  transition:
    -webkit-backdrop-filter 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    backdrop-filter 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.option-workbench-card .strike-ruler:not(.iv-strike-ruler) .strike-marker {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.options-lab-content .option-workbench-card .strike-marker:hover,
.options-lab-content .option-workbench-card .strike-marker:active,
.options-lab-content .option-workbench-card .strike-marker.dragging {
  -webkit-backdrop-filter: blur(9px) saturate(1.45);
  backdrop-filter: blur(9px) saturate(1.45);
  filter: saturate(1.08) brightness(1.04);
  background:
    radial-gradient(120% 150% at 50% -45%, rgba(255, 255, 255, 0.6), transparent 56%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--strike-accent) 38%, transparent) 0%,
      color-mix(in srgb, var(--strike-accent) 78%, rgba(255, 255, 255, 0.36)) 18%,
      color-mix(in srgb, var(--strike-accent) 96%, rgba(255, 255, 255, 0.12)) 50%,
      color-mix(in srgb, var(--strike-accent) 78%, rgba(255, 255, 255, 0.36)) 82%,
      color-mix(in srgb, var(--strike-accent) 38%, transparent) 100%);
  box-shadow:
    0 10px 22px color-mix(in srgb, var(--strike-accent) 30%, transparent),
    0 0 26px color-mix(in srgb, var(--strike-accent) 30%, transparent),
    inset 10px 0 16px color-mix(in srgb, rgba(255, 255, 255, 0.34) 42%, transparent),
    inset -10px 0 16px color-mix(in srgb, rgba(255, 255, 255, 0.34) 42%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transform: translateX(-50%) scale(1.04);
}

.options-lab-content .option-workbench-card .strike-marker.dragging {
  cursor: pointer;
}

.options-lab-content .option-workbench-card .strike-marker::before {
  top: calc(100% - 1px);
  bottom: auto;
  border-left-width: 6px;
  border-right-width: 6px;
  border-top: 7px solid var(--strike-accent);
  border-bottom: 0;
}

.options-lab-content .option-workbench-card .strike-marker::after {
  top: calc(100% + 6px);
  bottom: auto;
  width: 3px;
  height: 19px;
  background: linear-gradient(180deg, var(--strike-accent), color-mix(in srgb, var(--strike-accent) 20%, transparent));
}

.options-lab-content .option-workbench-card .strike-ruler-buy .strike-marker {
  top: -22px;
  bottom: auto;
}

.options-lab-content .option-workbench-card .strike-ruler-buy .strike-marker::before {
  top: calc(100% - 1px);
  bottom: auto;
  border-top: 7px solid var(--strike-accent);
  border-bottom: 0;
}

.options-lab-content .option-workbench-card .strike-ruler-buy .strike-marker::after {
  top: calc(100% + 6px);
  bottom: auto;
  background: linear-gradient(180deg, var(--strike-accent), color-mix(in srgb, var(--strike-accent) 20%, transparent));
}

.options-lab-content .option-workbench-card .strike-ruler-sell .strike-marker {
  top: auto;
  bottom: -22px;
}

.options-lab-content .option-workbench-card .strike-ruler-sell .strike-marker::before {
  top: auto;
  bottom: calc(100% - 1px);
  border-top: 0;
  border-bottom: 7px solid var(--strike-accent);
}

.options-lab-content .option-workbench-card .strike-ruler-sell .strike-marker::after {
  top: auto;
  bottom: calc(100% + 6px);
  background: linear-gradient(0deg, var(--strike-accent), color-mix(in srgb, var(--strike-accent) 20%, transparent));
}

.options-lab-content .option-workbench-card .strike-tick {
  flex-basis: 54px;
  font-size: 10px;
}

.options-lab-content .option-workbench-card .strike-tick-line {
  top: 1px;
  width: 1px;
  height: 6px;
  background: var(--ruler-tick);
  opacity: var(--strike-focus, 0.62);
}

.options-lab-content .option-workbench-card .strike-tick-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 1px;
  height: 6px;
  border-radius: inherit;
  background: inherit;
}

.options-lab-content .option-workbench-card .strike-tick::before,
.options-lab-content .option-workbench-card .strike-tick::after {
  top: 3px;
  width: 1px;
  height: 4px;
  background: var(--ruler-tick-minor);
  opacity: var(--strike-focus, 0.62);
  box-shadow: 0 20px 0 var(--ruler-tick-minor);
}

.options-lab-content .option-workbench-card .strike-tick.major .strike-tick-line {
  top: 0;
  height: 8px;
  background: var(--ruler-tick);
}

.options-lab-content .option-workbench-card .strike-tick.major .strike-tick-line::after {
  top: 22px;
  height: 8px;
}

.options-lab-content .option-workbench-card .strike-value {
  top: 50%;
  bottom: auto;
  font-size: 12px;
  color: var(--ruler-label);
  opacity: var(--strike-focus, 0.58);
  transform: translate(-50%, -50%);
  transition: opacity 140ms ease, color 140ms ease;
}

.options-lab-content .option-workbench-card .strike-ruler.previewing .strike-value {
  transition: none;
}

.options-lab-content .option-workbench-card .strike-ruler:not(.previewing) .strike-tick.active .strike-tick-line,
.options-lab-content .option-workbench-card .strike-ruler:not(.previewing) .strike-tick.active .strike-tick-line::after,
.options-lab-content .option-workbench-card .strike-ruler:not(.previewing) .strike-tick.active::before,
.options-lab-content .option-workbench-card .strike-ruler:not(.previewing) .strike-tick.active::after,
.options-lab-content .option-workbench-card .strike-tick.preview .strike-tick-line,
.options-lab-content .option-workbench-card .strike-tick.preview .strike-tick-line::after,
.options-lab-content .option-workbench-card .strike-tick.preview::before,
.options-lab-content .option-workbench-card .strike-tick.preview::after {
  opacity: 0;
}

.options-lab-content .option-workbench-card .strike-ruler:not(.previewing) .strike-tick.active .strike-value,
.options-lab-content .option-workbench-card .strike-tick.preview .strike-value {
  color: var(--ruler-label-selected);
  opacity: 1;
  text-shadow: var(--ruler-label-selected-shadow);
  z-index: 6;
}

.options-lab-content .option-workbench-card .credit-spread-ruler .strike-tick.credit-spread-leg .strike-tick-line,
.options-lab-content .option-workbench-card .credit-spread-ruler .strike-tick.credit-spread-leg .strike-tick-line::after,
.options-lab-content .option-workbench-card .credit-spread-ruler .strike-tick.credit-spread-leg::before,
.options-lab-content .option-workbench-card .credit-spread-ruler .strike-tick.credit-spread-leg::after {
  opacity: 0;
}

.options-lab-content .option-workbench-card .credit-spread-ruler .strike-tick.credit-spread-between .strike-value {
  color: color-mix(in srgb, var(--ruler-label-selected) 72%, var(--ruler-label));
  opacity: 0.82;
}

.credit-spread-ruler .strike-scroll {
  z-index: 2;
}

.credit-spread-range {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 6px;
  border: 1px solid var(--credit-spread-range-border);
  background: var(--credit-spread-range-bg);
  -webkit-backdrop-filter: var(--credit-spread-range-filter);
  backdrop-filter: var(--credit-spread-range-filter);
  box-shadow: var(--credit-spread-range-shadow);
  overflow: hidden;
  opacity: 1;
  pointer-events: none;
  transform: translateZ(0);
  transition: left 120ms ease, width 120ms ease, opacity 120ms ease;
  z-index: 1;
}

[data-theme="dark"] .credit-spread-range::before,
[data-theme="dark"] .credit-spread-range::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

[data-theme="dark"] .credit-spread-range::before {
  background:
    radial-gradient(110% 240% at 10% -95%, rgba(255, 255, 255, 0.22), transparent 42%),
    radial-gradient(115% 240% at 92% 190%, rgba(255, 255, 255, 0.1), transparent 44%);
  filter: blur(0.2px);
  opacity: 0.72;
}

[data-theme="dark"] .credit-spread-range::after {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.26) 0%,
      transparent 24%,
      transparent 72%,
      rgba(255, 255, 255, 0.08) 100%),
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.16) 0%,
      transparent 7%,
      transparent 93%,
      rgba(255, 255, 255, 0.16) 100%);
  opacity: 0.7;
}

.credit-spread-range[hidden] {
  display: none;
}

.credit-spread-marker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 24px;
  padding: 0 8px;
  box-sizing: border-box;
  border: 0;
  border-radius: 9px;
  background:
    radial-gradient(120% 150% at 50% -45%, rgba(255, 255, 255, 0.48), transparent 54%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--strike-accent) 58%, transparent) 0%,
      color-mix(in srgb, var(--strike-accent) 86%, rgba(255, 255, 255, 0.22)) 16%,
      color-mix(in srgb, var(--strike-accent) 96%, rgba(255, 255, 255, 0.08)) 50%,
      color-mix(in srgb, var(--strike-accent) 86%, rgba(255, 255, 255, 0.22)) 84%,
      color-mix(in srgb, var(--strike-accent) 58%, transparent) 100%);
  -webkit-backdrop-filter: blur(0) saturate(1);
  backdrop-filter: blur(0) saturate(1);
  color: var(--marker-label);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-shadow: var(--marker-label-shadow);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  overflow: visible;
  z-index: 7;
  transform: translateX(-50%);
  transition:
    -webkit-backdrop-filter 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    backdrop-filter 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow:
    0 7px 18px color-mix(in srgb, var(--strike-accent) 24%, transparent),
    0 0 18px color-mix(in srgb, var(--strike-accent) 16%, transparent),
    inset 9px 0 12px color-mix(in srgb, rgba(255, 255, 255, 0.22) 38%, transparent),
    inset -9px 0 12px color-mix(in srgb, rgba(255, 255, 255, 0.22) 38%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.strategy-leg-marker-text {
  display: block;
  min-width: 0;
}

.strategy-leg-qty-badge {
  position: absolute;
  top: 50%;
  right: -7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 4px;
  background: color-mix(in srgb, var(--strike-accent) 88%, #0f172a);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 5px 12px color-mix(in srgb, var(--strike-accent) 32%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  text-shadow: none;
  transform: translate(50%, -50%);
  z-index: 3;
}

.credit-spread-marker:hover,
.credit-spread-marker.dragging {
  -webkit-backdrop-filter: blur(9px) saturate(1.45);
  backdrop-filter: blur(9px) saturate(1.45);
  filter: saturate(1.08) brightness(1.04);
  background:
    radial-gradient(120% 150% at 50% -45%, rgba(255, 255, 255, 0.6), transparent 56%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--strike-accent) 38%, transparent) 0%,
      color-mix(in srgb, var(--strike-accent) 78%, rgba(255, 255, 255, 0.36)) 18%,
      color-mix(in srgb, var(--strike-accent) 96%, rgba(255, 255, 255, 0.12)) 50%,
      color-mix(in srgb, var(--strike-accent) 78%, rgba(255, 255, 255, 0.36)) 82%,
      color-mix(in srgb, var(--strike-accent) 38%, transparent) 100%);
  transform: translateX(-50%) scale(1.04);
}

.credit-spread-marker.dragging {
  cursor: pointer;
  box-shadow:
    0 10px 22px color-mix(in srgb, var(--strike-accent) 32%, transparent),
    0 0 30px color-mix(in srgb, var(--strike-accent) 34%, transparent),
    inset 10px 0 16px color-mix(in srgb, rgba(255, 255, 255, 0.34) 42%, transparent),
    inset -10px 0 16px color-mix(in srgb, rgba(255, 255, 255, 0.34) 42%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.credit-spread-marker:hover:not(.dragging) {
  box-shadow:
    0 10px 22px color-mix(in srgb, var(--strike-accent) 30%, transparent),
    0 0 26px color-mix(in srgb, var(--strike-accent) 30%, transparent),
    inset 10px 0 16px color-mix(in srgb, rgba(255, 255, 255, 0.34) 42%, transparent),
    inset -10px 0 16px color-mix(in srgb, rgba(255, 255, 255, 0.34) 42%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.credit-spread-marker::before,
.credit-spread-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.credit-spread-marker::before {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.credit-spread-marker::after {
  width: 3px;
  height: 19px;
  border-radius: 999px;
}

.credit-spread-marker-sell {
  top: auto;
  bottom: -22px;
}

.credit-spread-marker-sell::before {
  bottom: calc(100% - 1px);
  border-bottom: 7px solid var(--strike-accent);
}

.credit-spread-marker-sell::after {
  bottom: calc(100% + 6px);
  background: linear-gradient(0deg, var(--strike-accent), color-mix(in srgb, var(--strike-accent) 20%, transparent));
}

.credit-spread-marker-buy {
  top: -22px;
  bottom: auto;
}

.credit-spread-marker-buy::before {
  top: calc(100% - 1px);
  border-top: 7px solid var(--strike-accent);
}

.credit-spread-marker-buy::after {
  top: calc(100% + 6px);
  background: linear-gradient(180deg, var(--strike-accent), color-mix(in srgb, var(--strike-accent) 20%, transparent));
}

.option-workbench-card .risk-strip {
  gap: 3px;
  font-size: 12px;
}

.option-workbench-card .metric-label {
  font-size: 12px;
}

.option-workbench-card .risk-strip strong {
  margin-top: 1px;
  font-size: 14px;
}

.option-workbench-card .breakeven {
  margin: 4px 0;
  font-size: 14px;
}

.option-workbench-card .heatmap th,
.option-workbench-card .heatmap td {
  height: 20px;
  padding: 0 4px;
  font-size: 12px;
}

.option-workbench-card .heatmap .axis {
  min-width: 96px;
}

.option-workbench-card .workbench-footer {
  display: grid;
  gap: 4px;
  padding-top: 4px;
  align-content: end;
}

.option-workbench-card .date-control {
  display: grid;
  gap: 2px;
}

.option-workbench-card .control-label {
  margin-bottom: 2px;
  font-size: 14px;
  line-height: 1;
}

.option-workbench-card .strategy-controls {
  gap: 8px;
  padding-top: 0;
}

.option-workbench-card .segment-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 14px;
}

.option-workbench-card .table-mode-row {
  align-items: end;
  gap: 6px;
  margin-top: 2px;
}

.option-workbench-card .table-mode-row .tab-row {
  padding-bottom: 0;
}

.options-lab-content .option-workbench,
.iv-content .option-workbench {
  height: auto;
  min-height: 0;
}

.options-lab-content .option-workbench-card,
.iv-content .option-workbench-card {
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-rows: 65px 58px auto auto auto auto;
  align-content: stretch;
  overflow: visible;
}

.options-lab-content .option-workbench-card {
  grid-template-rows: 65px 52px auto auto;
  align-content: start;
  row-gap: 8px;
}

.options-lab-content .option-workbench-card.embedded-workbench-card {
  grid-template-rows: 32px 52px auto auto;
}

.options-lab-content .option-workbench-card.custom-builder-mode {
  grid-template-rows: auto minmax(220px, auto) auto;
}

.options-lab-content .option-workbench-card.custom-builder-mode.embedded-workbench-card {
  grid-template-rows: auto minmax(220px, auto) auto;
}

.options-lab-content .option-workbench-card.custom-builder-mode .workbench-surface {
  min-height: 220px;
}

.iv-content .option-workbench-card.embedded-workbench-card {
  grid-template-rows: 32px 58px auto;
}

.iv-content .option-workbench-card.embedded-workbench-card.iv-inline-strike {
  grid-template-rows: 32px;
}

.iv-content .option-workbench-card.no-strike-ruler {
  grid-template-rows: 65px auto;
}

.iv-content .option-workbench-card.embedded-workbench-card.no-strike-ruler {
  grid-template-rows: 32px;
}

.iv-content .option-workbench-card.embedded-workbench-card.no-strike-ruler .workbench-top-stack {
  height: 32px;
  min-height: 32px;
}

.iv-content .option-workbench-card.embedded-workbench-card.no-strike-ruler .expiry-bar {
  height: 32px;
  min-height: 32px;
  align-items: center;
}

.options-lab-content .option-workbench-card.graph-mode,
.iv-content .option-workbench-card.graph-mode {
  grid-template-rows: 65px 58px minmax(0, 1fr) auto;
}

.options-lab-content .option-workbench-card.graph-mode {
  grid-template-rows: 65px 52px minmax(0, 1fr) auto;
}

.options-lab-content .option-workbench-card.graph-mode.embedded-workbench-card {
  grid-template-rows: 32px 52px minmax(0, 1fr) auto;
}

.iv-content .option-workbench-card.graph-mode.embedded-workbench-card {
  grid-template-rows: 32px 58px minmax(0, 1fr) auto;
}

.options-lab-content .option-workbench-card.custom-builder-mode.graph-mode,
.options-lab-content .option-workbench-card.custom-builder-mode.graph-mode.embedded-workbench-card {
  grid-template-rows: auto minmax(360px, auto) auto;
}

.options-lab-content .option-workbench-card.custom-builder-mode.graph-mode .workbench-surface {
  min-height: 360px;
  overflow: hidden;
}

.options-lab-content .option-workbench-card.custom-builder-mode.graph-mode .scenario-graph-wrap {
  height: 100%;
  min-height: 360px;
}

.options-lab-content .option-workbench-card .workbench-top-stack,
.iv-content .option-workbench-card .workbench-top-stack,
.options-lab-content .option-workbench-card .card-header,
.iv-content .option-workbench-card .card-header,
.options-lab-content .option-workbench-card .expiry-bar,
.iv-content .option-workbench-card .expiry-bar,
.options-lab-content .option-workbench-card .expiry-row,
.iv-content .option-workbench-card .expiry-row,
.options-lab-content .option-workbench-card .strike-ruler,
.iv-content .option-workbench-card .strike-ruler,
.options-lab-content .option-workbench-card .risk-strip,
.iv-content .option-workbench-card .risk-strip,
.options-lab-content .option-workbench-card .breakeven,
.iv-content .option-workbench-card .breakeven,
.options-lab-content .option-workbench-card .workbench-surface,
.iv-content .option-workbench-card .workbench-surface,
.options-lab-content .option-workbench-card .workbench-footer,
.iv-content .option-workbench-card .workbench-footer {
  min-height: 0;
}

.options-lab-content .option-workbench-card .workbench-surface,
.iv-content .option-workbench-card .workbench-surface {
  height: auto;
}

.options-lab-content .option-workbench-card .heatmap-wrap,
.iv-content .option-workbench-card .heatmap-wrap {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.options-lab-content .option-workbench-card .heatmap-wrap {
  margin-top: 10px;
}

.options-lab-content .option-workbench-card .heatmap,
.iv-content .option-workbench-card .heatmap {
  height: auto;
  table-layout: auto;
}

.options-lab-content .option-workbench-card .scenario-graph-wrap,
.iv-content .option-workbench-card .scenario-graph-wrap {
  height: 100%;
  min-height: 0;
}

.options-lab-content .option-workbench-card.graph-mode .scenario-graph,
.iv-content .option-workbench-card.graph-mode .scenario-graph {
  min-height: 0;
}

.options-lab-content .option-workbench-card .workbench-footer,
.iv-content .option-workbench-card .workbench-footer {
  align-self: end;
}

.options-lab-content .option-workbench-card .workbench-footer {
  align-self: start;
  padding-top: 4px;
}

/* Option Workspace final visual pass: light, continuous top controls. */
.option-workspace-content > .workspace-hero-card {
  min-height: 102px;
  padding: 1px 12px 0;
  gap: 6px;
}

.option-workspace-content > .workspace-hero-card,
.option-workspace-content > .workspace-tab-surface,
.content > .flow-tab-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.option-workspace-content .workspace-tab-row {
  gap: 32px;
}

.option-workspace-content .workspace-tab-button {
  min-height: 34px;
  padding: 0 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  box-shadow: none;
}

.option-workspace-content .workspace-tab-button.active {
  background: transparent;
  border-color: transparent;
  color: var(--blue);
}

.option-workspace-content .workspace-tab-button.active::after {
  height: 2px;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 999px;
  background: var(--blue);
  clip-path: none;
}

.option-workspace-content > .workspace-tab-surface,
.content > .flow-tab-card {
  min-height: 40px;
  padding: 3px 10px;
  align-items: center;
}

.option-workspace-content > .workspace-tab-surface .strategy-row,
.option-workspace-content > .workspace-tab-surface .iv-mode-toolbar,
.content > .flow-tab-card .flow-tab-row {
  min-height: 30px;
  gap: 8px;
  padding-bottom: 0;
}

.option-workspace-content > .workspace-tab-surface .option-lab-toolbar .strategy-row + .strategy-row {
  margin-top: 5px !important;
}

.option-workspace-content > .workspace-tab-surface .strategy-button,
.content > .flow-tab-card .tab-button {
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  box-shadow: none;
}

.option-workspace-content > .workspace-tab-surface .strategy-button.active,
.content > .flow-tab-card .tab-button.active {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--text);
}

.option-workspace-content .option-workbench-card.embedded-workbench-card {
  padding: 2px 10px 4px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.option-workspace-content .option-workbench-card.embedded-workbench-card .workbench-top-stack {
  min-height: 30px;
  height: 30px;
}

.option-workspace-content .option-workbench-card .expiry-bar {
  min-height: 30px;
  height: 30px;
}

.option-workspace-content .option-workbench-card .expiry-button {
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.option-workspace-content .option-workbench-card .expiry-button.active {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--text);
}

.option-workspace-content .ticker-line {
  transform: translateY(0);
}

.option-workspace-content .workspace-hero-grid > .metric-grid {
  transform: translateY(1px);
}

.option-workspace-content .ticker-line h1 {
  transform: none;
}

.option-workspace-content .iv-detail-card .card-header {
  min-height: 22px;
}

[data-theme="dark"] .option-workspace-content > .workspace-hero-card,
[data-theme="dark"] .option-workspace-content > .workspace-tab-surface,
[data-theme="dark"] .content > .flow-tab-card,
[data-theme="dark"] .option-workspace-content .option-workbench-card.embedded-workbench-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

[data-theme="dark"] .option-workspace-content .option-workbench-card.embedded-workbench-card::before {
  display: none;
}

[data-theme="dark"] .option-workspace-content > .workspace-tab-surface .strategy-button,
[data-theme="dark"] .content > .flow-tab-card .tab-button {
  background: transparent;
  border-color: transparent;
}

[data-theme="dark"] .option-workspace-content > .workspace-tab-surface .strategy-button.active,
[data-theme="dark"] .content > .flow-tab-card .tab-button.active {
  background: rgba(51, 184, 255, 0.16);
  border-color: rgba(51, 184, 255, 0.62);
}

/* Keep Option Workspace top controls on one continuous canvas. */
.option-workspace-content .option-workspace-single > .workspace-card,
.option-workspace-content .iv-detail-card,
.option-workspace-content .option-workbench-card.embedded-workbench-card,
.option-workspace-content .news-row,
.option-workspace-content .flow-row,
.option-workspace-content .list-row {
  background: transparent;
  box-shadow: none;
}

.option-workspace-content .option-workspace-single > .workspace-card,
.option-workspace-content .iv-detail-card,
.option-workspace-content .iv-panel-surface {
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
}

.option-workspace-content .iv-small-metric,
.option-workspace-content .option-workspace-single .metric-box {
  background: transparent;
}

.option-workspace-content .news-row:hover,
.option-workspace-content .flow-row:hover,
.option-workspace-content .list-row:hover {
  background: color-mix(in srgb, var(--surface-soft) 44%, transparent);
}

[data-theme="dark"] .option-workspace-content .option-workspace-single > .workspace-card,
[data-theme="dark"] .option-workspace-content .iv-detail-card,
[data-theme="dark"] .option-workspace-content .option-workbench-card.embedded-workbench-card,
[data-theme="dark"] .option-workspace-content .news-row,
[data-theme="dark"] .option-workspace-content .flow-row,
[data-theme="dark"] .option-workspace-content .list-row {
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

[data-theme="dark"] .option-workspace-content .strategy-card::before,
[data-theme="dark"] .option-workspace-content .option-workbench-card::before {
  display: none;
}

[data-theme="dark"] .scenario-zero {
  stroke: rgba(228, 230, 235, 0.68);
}

.hm-pos-3 {
  background: #08a142;
  color: white;
}

.hm-pos-2 {
  background: #0c7a45;
  color: white;
}

.hm-pos-1 {
  background: #0f5344;
  color: white;
}

.hm-flat {
  background: #17223a;
  color: white;
}

.hm-neg-1 {
  background: #5f1435;
  color: white;
}

.hm-neg-2 {
  background: #8f1032;
  color: white;
}

.hm-neg-3 {
  background: #c20e3d;
  color: white;
}

.chart-box {
  height: 260px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(var(--line), var(--line)) 0 55% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 0 18%, rgba(24, 119, 242, 0.08) 18% 82%, transparent 82%);
  overflow: hidden;
}

[data-theme="dark"] .chart-box {
  background:
    linear-gradient(var(--line), var(--line)) 0 55% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 0 18%, rgba(51, 184, 255, 0.08) 18% 82%, transparent 82%),
    radial-gradient(circle at 74% 20%, rgba(0, 224, 164, 0.14), transparent 38%),
    #070b14;
  border-color: rgba(145, 170, 200, 0.18);
}

.chart-line {
  position: absolute;
  inset: 24px 18px 34px;
}

.chart-status-box {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chart-midline {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-axis {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.positions-list,
.news-list,
.flow-list {
  display: grid;
  gap: 8px;
}

.flow-list {
  gap: 6px;
}

.list-row,
.news-row,
.flow-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.list-row:hover,
.news-row:hover,
.flow-row:hover {
  background: var(--surface-soft);
}

[data-theme="dark"] .list-row,
[data-theme="dark"] .news-row,
[data-theme="dark"] .flow-row {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(145, 170, 200, 0.16);
}

[data-theme="dark"] .list-row:hover,
[data-theme="dark"] .news-row:hover,
[data-theme="dark"] .flow-row:hover {
  background: rgba(255, 255, 255, 0.075);
}

.flow-row {
  grid-template-columns: 68px minmax(0, 1fr) 82px 82px;
  align-items: center;
  gap: 6px 10px;
  min-height: 50px;
  padding: 7px 9px;
  font-size: 13px;
  line-height: 1.22;
}

.flow-symbol {
  font-size: 16px;
  font-weight: 800;
}

.flow-premium {
  font-size: 14px;
  font-weight: 800;
  color: var(--green);
}

.flow-side {
  justify-self: end;
}

.flow-row .subtle {
  font-size: 12px;
}

.flow-row .chip {
  min-height: 22px;
  padding: 0 7px;
  font-size: 11px;
}

.flow-empty {
  min-height: 58px;
  display: grid;
  place-items: center start;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.page-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 12px;
}

.flow-title-tools {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-search {
  display: block;
}

.flow-search input {
  width: 180px;
  min-height: 34px;
  padding: 0 12px;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
}

.ticker-saved-strategies {
  display: grid;
  gap: 9px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.ticker-saved-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticker-saved-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}

.ticker-saved-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ticker-saved-open-all,
.ticker-saved-delete,
.strategy-list-actions button,
.strategies-filter-clear {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.ticker-saved-open-all:hover,
.ticker-saved-delete:hover,
.strategy-list-actions button:hover,
.strategies-filter-clear:hover {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  color: var(--blue);
}

.ticker-saved-strip {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.ticker-saved-chip {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  align-items: stretch;
  flex: 0 0 auto;
  min-width: 250px;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.ticker-saved-chip.active {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  box-shadow: 0 0 0 2px var(--blue-soft);
}

.ticker-saved-chip > button:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.ticker-saved-chip strong,
.strategy-list-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-saved-chip span,
.strategy-list-main span,
.strategy-list-metrics span,
.strategy-list-date span,
.strategies-list-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.ticker-saved-delete {
  min-height: 0;
  border-width: 0 0 0 1px;
  border-radius: 0;
  color: var(--red);
  background: transparent;
}

.ticker-saved-empty,
.strategies-empty-state {
  display: grid;
  gap: 4px;
  min-height: 48px;
  align-content: center;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.strategies-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 92px;
}

.strategies-page-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.08;
}

.strategies-filter-card {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(120px, 0.7fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.strategies-filter-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.strategies-filter-card input,
.strategies-filter-card select {
  min-height: 36px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.strategies-list-card {
  display: grid;
  gap: 10px;
}

.strategies-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.strategies-list-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.strategies-list {
  display: grid;
  gap: 8px;
}

.strategy-list-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 78px 78px minmax(120px, 0.65fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.strategy-list-row.active {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  box-shadow: 0 0 0 2px var(--blue-soft);
}

.strategy-list-main,
.strategy-list-metrics,
.strategy-list-date {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.strategy-list-metrics strong,
.strategy-list-date strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.strategy-list-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.strategy-list-actions button.danger {
  color: var(--red);
}

.account-content {
  display: grid;
  gap: 12px;
  align-content: start;
}

.account-empty-card,
.account-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 92px;
}

.account-empty-card h1,
.account-dashboard-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.08;
}

.account-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.account-header-actions .secondary-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
}

.account-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-status.success {
  border-color: color-mix(in srgb, var(--green) 36%, var(--line));
  color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
}

.account-status.error {
  border-color: color-mix(in srgb, var(--red) 36%, var(--line));
  color: var(--red);
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
}

.account-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 220px;
}

.account-support-card {
  min-height: 170px;
}

.account-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.account-card-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.12;
}

.account-form {
  display: grid;
  gap: 10px;
}

.account-password-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-password-form button {
  grid-column: 1 / -1;
}

.account-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-form input {
  min-height: 40px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  outline: none;
}

.account-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.account-form .primary-button,
.account-action-link {
  min-height: 38px;
  border-radius: 8px;
}

.account-summary-list {
  display: grid;
  gap: 8px;
}

.account-summary-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.account-summary-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.account-summary-list strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.account-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-width: 132px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.account-action-link.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.account-action-link:hover,
.account-action-link:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
}

.account-action-link.primary:hover,
.account-action-link.primary:focus-visible {
  color: #fff;
  filter: brightness(1.04);
}

.account-support-email {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

[data-theme="dark"] .account-status,
[data-theme="dark"] .account-summary-list > div,
[data-theme="dark"] .account-support-email,
[data-theme="dark"] .account-form input {
  border-color: rgba(145, 170, 200, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.iv-page-title {
  align-items: center;
}

.iv-title-tools {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  flex-wrap: wrap;
}

.iv-title-tools .segment-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.iv-symbol-search input {
  width: 108px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 10px;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
}

.iv-symbol-search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.iv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 16px;
  align-items: stretch;
}

.iv-chart-card {
  min-width: 0;
}

.iv-chart-card .card-header h2,
.iv-stats-card .card-header h2 {
  margin: 0;
}

.iv-chart-wrap {
  min-width: 0;
  margin-top: 10px;
}

.iv-chart {
  display: block;
  width: 100%;
  min-height: 260px;
  overflow: visible;
}

[data-theme="dark"] .iv-chart-card,
[data-theme="dark"] .iv-detail-card,
[data-theme="dark"] .iv-stats-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.026)),
    rgba(10, 15, 24, 0.86);
}

.iv-grid-line {
  stroke: var(--line);
  stroke-width: 1;
  opacity: 0.7;
}

.iv-axis-line,
.iv-axis-tick {
  stroke: var(--muted);
  stroke-width: 1.2;
  opacity: 0.75;
}

.iv-axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.iv-line {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}

.iv-point {
  fill: var(--surface);
  stroke: var(--blue);
  stroke-width: 2.5;
}

.iv-point.estimated {
  stroke-dasharray: 2 2;
  opacity: 0.72;
}

.iv-crash-point {
  stroke: var(--orange);
}

.iv-filter-card {
  padding-top: 10px;
  padding-bottom: 10px;
}

.iv-mode-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  flex-wrap: wrap;
}

.iv-mode-toolbar .strategy-button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.iv-detail-card {
  display: grid;
  gap: 10px;
}

.iv-detail-card .card-header h2 {
  margin: 0;
  font-size: 22px;
}

.iv-detail-card .card-header .subtle {
  margin-top: 2px;
}

.iv-header-chips {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.iv-context-workspace-card {
  display: grid;
  gap: 7px;
  padding: 8px 10px;
}

.iv-context-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}

.iv-context-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.iv-context-title-row h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
}

.iv-context-subtitle {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iv-context-workspace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.iv-context-workspace-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.iv-context-workspace-cell span,
.iv-context-workspace-cell em {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.iv-context-workspace-cell strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.iv-context-workspace-cell em {
  font-style: normal;
}

.iv-panel-surface {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  padding: 10px;
}

.iv-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.iv-small-metric {
  min-height: 58px;
  padding: 8px 10px;
}

.iv-small-metric .metric-value {
  font-size: 16px;
}

.iv-smile-android-chart {
  min-height: 230px;
}

.iv-surface-card {
  overflow: hidden;
}

.iv-surface3d {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(circle at 20% 18%, rgba(24, 119, 242, 0.16), transparent 34%),
    radial-gradient(circle at 82% 20%, rgba(0, 168, 107, 0.13), transparent 32%),
    linear-gradient(180deg, var(--surface), var(--surface-soft));
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.iv-surface3d.dragging {
  cursor: grabbing;
}

[data-theme="dark"] .iv-surface3d {
  background:
    radial-gradient(circle at 20% 18%, rgba(51, 184, 255, 0.2), transparent 34%),
    radial-gradient(circle at 76% 14%, rgba(0, 255, 194, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(10, 16, 27, 0.94), rgba(4, 8, 16, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 26px 70px rgba(0, 0, 0, 0.28);
}

.iv-surface3d::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(100, 116, 139, 0.12) 50%, transparent 51%),
    linear-gradient(0deg, transparent 0 49%, rgba(100, 116, 139, 0.10) 50%, transparent 51%);
  background-size: 54px 54px;
  opacity: 0.26;
  mask-image: radial-gradient(circle at 50% 46%, black, transparent 78%);
}

.iv-surface-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.iv-surface-label-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.iv-surface-axis-label {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.09);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.iv-surface-axis-label.axis-title {
  color: var(--orange);
  letter-spacing: 0.02em;
}

.iv-surface-axis-label.axis-y {
  color: var(--green);
}

[data-theme="dark"] .iv-surface-axis-label {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(12, 18, 31, 0.74);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  color: rgba(226, 232, 240, 0.82);
}

[data-theme="dark"] .iv-surface-axis-label.axis-y {
  color: rgba(20, 241, 149, 0.9);
}

.iv-surface-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.iv-surface-overlay {
  position: absolute;
  z-index: 2;
  left: 14px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.iv-surface-overlay strong {
  color: var(--green);
}

.iv-surface-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.iv-surface-caption span {
  min-width: 0;
}

.iv-point.call-point {
  stroke: var(--green);
}

.iv-point.put-point {
  stroke: var(--red);
}

.iv-empty-panel {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.iv-list-surface {
  display: grid;
  padding: 0 12px;
}

.iv-decay-row,
.iv-term-row {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 104px;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 9px 0;
}

.iv-row-date,
.iv-row-value {
  display: grid;
  gap: 2px;
}

.iv-row-date strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.1;
}

.iv-row-date span,
.iv-row-value span,
.iv-row-subtle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.iv-row-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.iv-row-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.iv-row-topline strong {
  color: var(--text);
  font-size: 15px;
}

.iv-decay-bar,
.iv-term-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.iv-decay-bar span,
.iv-term-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}

.iv-term-bar span {
  background: var(--blue);
}

.iv-decay-bar span.danger {
  background: var(--red);
}

.iv-decay-bar span.cool {
  background: var(--green);
}

.iv-row-value {
  justify-items: end;
  color: var(--orange);
}

.iv-row-value strong {
  font-size: 18px;
  line-height: 1.1;
}

.iv-row-value.danger {
  color: var(--red);
}

.iv-row-value.cool {
  color: var(--green);
}

.iv-row-value.muted {
  color: var(--muted);
}

.iv-row-divider {
  position: absolute;
  left: 96px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
}

.iv-empty-label {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.iv-chart-skeleton {
  opacity: 0.84;
  transform-box: fill-box;
  transform-origin: center;
}

.iv-skeleton-line {
  fill: none;
  stroke: rgba(var(--orange-rgb), 0.2);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 760;
}

.iv-skeleton-line.secondary {
  stroke: rgba(105, 115, 134, 0.16);
  stroke-width: 2;
}

.iv-skeleton-bar {
  fill: rgba(105, 115, 134, 0.1);
}

.iv-skeleton-bar.short {
  fill: rgba(105, 115, 134, 0.075);
}

.iv-chart[aria-busy="true"] .iv-chart-skeleton {
  animation: chartSkeletonBreath 1.75s ease-in-out infinite;
}

.iv-chart[aria-busy="true"] .iv-skeleton-line {
  animation: chartSkeletonTrace 1.75s ease-in-out infinite;
}

.iv-chart[aria-busy="true"] .iv-skeleton-line.secondary {
  animation-delay: 0.14s;
}

.iv-chart[aria-busy="true"] .iv-skeleton-bar {
  animation: chartSkeletonPulse 1.75s ease-in-out infinite;
}

.iv-chart[aria-busy="true"] .iv-skeleton-bar.short {
  animation-delay: 0.14s;
}

.iv-chart[aria-busy="false"] .iv-line,
.iv-chart[aria-busy="false"] .iv-point,
.iv-chart[aria-busy="false"] .iv-chart-skeleton,
.iv-chart[aria-busy="false"] .iv-skeleton-line,
.iv-chart[aria-busy="false"] .iv-skeleton-bar {
  animation: none;
}

[data-theme="dark"] .iv-skeleton-line {
  stroke: rgba(var(--orange-rgb), 0.28);
}

[data-theme="dark"] .iv-skeleton-line.secondary {
  stroke: rgba(145, 170, 200, 0.18);
}

[data-theme="dark"] .iv-skeleton-bar {
  fill: rgba(255, 255, 255, 0.075);
}

@keyframes chartSkeletonTrace {
  0%,
  100% {
    opacity: 0.62;
    stroke-dashoffset: 76;
  }

  50% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes chartSkeletonPulse {
  0%,
  100% {
    opacity: 0.46;
  }

  50% {
    opacity: 0.9;
  }
}

@keyframes chartSkeletonBreath {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.998);
  }

  50% {
    opacity: 0.96;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .iv-chart[aria-busy="true"] .iv-chart-skeleton,
  .iv-chart[aria-busy="true"] .iv-skeleton-line,
  .iv-chart[aria-busy="true"] .iv-skeleton-bar {
    animation: none;
  }
}

.iv-error-label {
  fill: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.iv-smile-current {
  stroke: var(--green);
  stroke-width: 1.8;
  stroke-dasharray: 5 5;
  opacity: 0.65;
}

.iv-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 0 4px 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.iv-legend-swatch {
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

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

.iv-stats-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.iv-metrics {
  display: grid;
  gap: 8px;
}

.iv-note {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.iv-note strong {
  color: var(--text);
  font-size: 16px;
}

.iv-table {
  display: grid;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.iv-table-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 80px 100px 110px;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  font-size: 14px;
}

.iv-table-row:last-child {
  border-bottom: 0;
}

.iv-table-head {
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 800;
}

.iv-table-row strong {
  color: var(--text);
}

.iv-table-empty {
  color: var(--muted);
}

.iv-content .option-workbench-card [data-iv-contract-details] {
  display: grid;
  gap: 0;
  min-height: 0;
}

.iv-contract-summary {
  margin-top: 0;
}

.iv-contract-summary strong {
  font-size: 14px;
}

.iv-contract-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.iv-contract-line .chip {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.iv-contract-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.iv-contract-hero > div {
  display: grid;
  gap: 4px;
}

.iv-contract-hero strong {
  font-size: 24px;
  line-height: 1;
}

.iv-contract-hero small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.iv-hero-value {
  color: var(--orange);
}

.iv-contract-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.iv-contract-metrics .metric-box {
  min-height: 60px;
  padding: 8px;
}

.iv-contract-metrics .metric-value {
  font-size: 15px;
  word-break: break-word;
}

.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.brief-body {
  color: var(--text);
  line-height: 1.55;
}

.hot-stock-list,
.pulse-list,
.compact-flow {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.contract-monitor {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.contract-monitor-top {
  display: grid;
  gap: 3px;
  padding: 2px 2px 9px;
  border-bottom: 1px solid var(--line);
}

.contract-monitor-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.contract-monitor-top strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}

.contract-monitor-quote {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.contract-monitor-quote > div,
.contract-monitor-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 62%, transparent);
}

.contract-monitor-quote span,
.contract-monitor-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.contract-monitor-quote strong,
.contract-monitor-cell strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-qty-input {
  width: min(100%, 86px);
  min-width: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.contract-qty-input:focus {
  border-bottom-color: var(--accent);
}

.contract-monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.contract-monitor-data .contract-monitor-cell {
  background: transparent;
}

.contract-monitor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 800;
}

.contract-monitor-foot .chip {
  min-height: 22px;
  padding-inline: 8px;
}

[data-theme="dark"] .contract-monitor-quote > div,
[data-theme="dark"] .contract-monitor-cell {
  border-color: rgba(145, 170, 200, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

[data-theme="dark"] .contract-monitor-data .contract-monitor-cell {
  background: rgba(255, 255, 255, 0.025);
}

.strategy-risk-panel,
.saved-strategies-panel {
  display: grid;
  gap: 10px;
}

.strategy-risk-header {
  align-items: center;
}

.strategy-save-button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--blue) 28%, transparent);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.strategy-save-button:hover {
  filter: brightness(1.04);
}

.strategy-save-button:focus-visible,
.saved-strategy-load:focus-visible,
.saved-strategy-actions button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.strategy-risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.strategy-risk-cell,
.strategy-risk-breakeven,
.iv-context-list > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 62%, transparent);
}

.strategy-risk-cell {
  display: grid;
  gap: 3px;
}

.strategy-risk-cell span,
.strategy-risk-breakeven span,
.iv-context-list span,
.saved-strategy-main span,
.saved-strategy-metrics span,
.saved-strategy-actions span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.strategy-risk-cell strong,
.strategy-risk-breakeven strong,
.iv-context-list strong,
.saved-strategy-main strong,
.saved-strategy-metrics strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.strategy-risk-cell.primary strong {
  color: var(--blue);
  font-size: 18px;
}

.strategy-risk-cell.positive strong {
  color: var(--green);
}

.strategy-risk-greeks .strategy-risk-cell {
  background: transparent;
}

.strategy-risk-breakeven {
  display: grid;
  gap: 4px;
}

.strategy-risk-breakeven strong {
  font-size: 12px;
  line-height: 1.25;
}

.iv-context-panel {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.iv-context-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.iv-context-title strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.iv-context-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.iv-context-list {
  display: grid;
  gap: 6px;
}

.iv-context-list > div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.8fr);
  gap: 3px 7px;
  align-items: baseline;
}

.iv-context-list strong {
  text-align: right;
}

.iv-context-list em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
}

.saved-strategy-list {
  display: grid;
  gap: 7px;
}

.saved-strategy-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 56%, transparent);
}

.saved-strategy-item.active {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 54%, var(--surface-soft));
}

.saved-strategy-load {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.saved-strategy-main,
.saved-strategy-metrics {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.saved-strategy-main strong,
.saved-strategy-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-strategy-metrics {
  justify-items: end;
}

.saved-strategy-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.saved-strategy-actions button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--red) 28%, transparent);
  border-radius: 7px;
  background: transparent;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

[data-theme="dark"] .strategy-risk-cell,
[data-theme="dark"] .strategy-risk-breakeven,
[data-theme="dark"] .iv-context-list > div,
[data-theme="dark"] .saved-strategy-item {
  border-color: rgba(145, 170, 200, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

[data-theme="dark"] .strategy-risk-greeks .strategy-risk-cell {
  background: rgba(255, 255, 255, 0.025);
}

[data-theme="dark"] .saved-strategy-item.active {
  border-color: rgba(103, 212, 255, 0.38);
  background: rgba(51, 184, 255, 0.1);
}

.contract-monitor-strategy {
  margin-top: 10px;
}

.contract-monitor-strategy:first-child {
  margin-top: 0;
}

.contract-monitor-strategy .strategy-context-card {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 12px 14px;
}

.contract-monitor-strategy .strategy-context-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.contract-monitor-strategy .strategy-context-heading strong {
  grid-column: 1;
  grid-row: 1;
  font-size: 18px;
  line-height: 1.16;
  letter-spacing: 0;
}

.contract-monitor-strategy .strategy-family {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  padding: 4px 9px;
}

.contract-monitor-strategy .strategy-context-heading strong,
.contract-monitor-strategy .strategy-context-copy p,
.contract-monitor-strategy .strategy-payoff-card span {
  white-space: normal;
}

.contract-monitor-strategy .strategy-context-copy p {
  margin: 8px 0 10px;
  font-size: 13px;
  line-height: 1.42;
}

.contract-monitor-strategy .strategy-tag-row {
  flex-wrap: wrap;
  gap: 8px;
  row-gap: 7px;
  overflow: visible;
}

.contract-monitor-strategy .strategy-tag {
  padding: 5px 10px;
  font-size: 11px;
}

.contract-monitor-strategy .strategy-payoff-card {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding-top: 4px;
}

.contract-monitor-strategy .strategy-payoff-svg {
  width: 100%;
  height: 142px;
}

.hot-stock-row {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.hot-stock-row:last-child {
  border-bottom: 0;
}

.hot-stock-row:hover,
.hot-stock-row.active {
  color: var(--blue);
  background: var(--surface-soft);
}

.hot-stock-rank {
  width: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.hot-stock-main,
.hot-stock-quote {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hot-stock-main strong {
  font-size: 13px;
  line-height: 1.1;
}

.hot-stock-main span,
.hot-stock-quote span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-stock-quote {
  justify-items: end;
  font-size: 12px;
  font-weight: 800;
}

.pulse-item,
.compact-flow-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.pulse-item:last-child,
.compact-flow-item:last-child {
  border-bottom: 0;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: inline-block;
  position: relative;
}

.chart-icon::before,
.flow-icon::before {
  content: "";
  position: absolute;
  inset: 7px 5px 6px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: skew(-18deg);
}

.chart-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 4px;
  top: 8px;
  height: 12px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: rotate(-32deg);
}

.grid-icon {
  display: grid;
  grid-template-columns: repeat(3, 6px);
  grid-template-rows: repeat(3, 6px);
  gap: 3px;
  place-content: center;
}

.grid-icon::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  box-shadow: 9px 0 currentColor, 18px 0 currentColor, 0 9px currentColor, 9px 9px currentColor, 18px 9px currentColor, 0 18px currentColor, 9px 18px currentColor, 18px 18px currentColor;
}

.news-icon::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 3px solid currentColor;
  border-radius: 3px;
}

.news-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 12px;
  height: 3px;
  background: currentColor;
  box-shadow: 0 6px currentColor;
}

.flow-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.sun-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid currentColor;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(170px, auto) minmax(220px, 1fr) auto;
  }

  .iv-strike-control-bar {
    grid-template-columns: minmax(306px, 0.45fr) minmax(180px, 1fr) auto;
    gap: 10px;
  }

  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .right-rail {
    display: none;
  }

  .option-workspace,
  .news-grid,
  .iv-grid {
    grid-template-columns: 1fr;
  }

  .iv-contract-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .iv-metric-strip {
    grid-template-columns: 1fr;
  }

  .iv-decay-row,
  .iv-term-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .iv-row-value {
    grid-column: 2;
    justify-items: start;
  }

  .iv-row-divider {
    left: 0;
  }
}

@media (max-width: 820px) {
  html,
  body,
  .app-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
    height: 56px;
    min-height: 56px;
    gap: 8px;
    padding: 8px;
  }

  .topbar-status {
    display: none;
  }

  .topbar .theme-switch {
    display: none;
  }

  .topbar .icon-button,
  .topbar .profile-button {
    width: 36px;
    min-height: 36px;
  }

  .topbar-brand {
    min-height: 36px;
    max-width: 136px;
    padding: 0;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
  }

  .topbar-brand .brand-logo {
    width: 30px;
    height: 30px;
  }

  .topbar-search {
    min-width: 0;
  }

  .search-box .search-icon {
    left: 12px;
  }

  .search-box input {
    min-height: 38px;
    padding-left: 36px;
    font-size: 16px;
  }

  .topbar .login-button,
  .topbar .dashboard-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .topbar .trial-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .layout {
    --left-rail-extra-width: 0px;
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
    overflow: hidden;
  }

  .account-empty-card,
  .account-dashboard-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
  }

  .account-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .account-password-form {
    grid-template-columns: 1fr;
  }

  .account-summary-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .account-summary-list strong {
    text-align: left;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 0 14px 24px;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .left-rail {
    position: static;
    height: auto;
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    overflow: visible;
  }

  .rail-section,
  .rail-logout {
    display: none;
  }

  .rail-item {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 0 6px;
    font-size: 12px;
    line-height: 1.05;
    text-align: center;
  }

  .rail-dot {
    display: none;
  }

  .inline-price {
    font-size: 24px;
  }

  .inline-change {
    font-size: 14px;
  }

  .price {
    font-size: 38px;
  }

  .content,
  .content.option-workspace-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .content.option-workspace-content {
    padding: 0 8px 8px;
  }

  .ticker-saved-header,
  .strategies-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ticker-saved-chip {
    min-width: 236px;
  }

  .strategies-filter-card {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .strategy-list-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .strategy-list-main,
  .strategy-list-actions {
    grid-column: 1 / -1;
  }

  .strategy-list-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .iv-context-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .iv-context-compact-header {
    align-items: flex-start;
  }

  .iv-context-title-row {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .workspace-hero-card {
    min-height: auto;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 8px 4px 0;
  }

  .workspace-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .workspace-hero-grid > .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ticker-line {
    min-height: auto;
  }

  .ticker-line h1,
  .page-title h1 {
    font-size: 20px;
  }

  .workspace-hero-card .workspace-tab-row,
  .option-workspace-content .workspace-tab-row {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .workspace-tab-button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    font-size: 14px;
  }

  .metric-grid,
  .risk-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .option-lab-toolbar {
    grid-template-columns: 1fr;
    height: auto;
  }

  .option-lab-toolbar > div {
    position: static;
    inset: auto;
    height: auto;
  }

  .option-lab-filter-card,
  .option-lab-filter-card.workspace-tab-surface {
    height: auto;
    min-height: 0;
    padding: 6px 8px;
  }

  .option-lab-toolbar .strategy-row,
  .workspace-tab-surface .option-lab-toolbar .strategy-row {
    height: auto;
    min-height: 34px;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .option-lab-toolbar .strategy-button,
  .workspace-tab-surface .option-lab-toolbar .strategy-button {
    flex: 0 0 auto;
    min-height: 34px;
    height: 34px;
    padding: 0 11px;
    font-size: 13px;
  }

  .strategy-context-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    min-height: auto;
  }

  .strategy-context-copy p {
    white-space: normal;
  }

  .strategy-payoff-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .strategy-payoff-svg {
    width: 112px;
  }

  .custom-strategy-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: auto;
  }

  .custom-builder-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .custom-builder-summary-strip {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .custom-builder-quick-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
  }

  .custom-builder-add-button {
    grid-column: span 2;
  }

  .custom-builder-body {
    grid-template-columns: 1fr;
  }

  .custom-builder-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .custom-builder-table {
    min-width: 680px;
  }

  .content.options-lab-content {
    height: auto;
    min-height: auto;
    grid-template-rows: none;
    overflow: hidden;
  }

  .iv-content .option-workbench-card.embedded-workbench-card.iv-inline-strike {
    grid-template-rows: 92px;
  }

  .iv-strike-control-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 30px 56px;
    gap: 6px 8px;
    height: 92px;
    min-height: 92px;
  }

  .iv-strike-control-bar .expiry-row {
    grid-column: 1;
    grid-row: 1;
    height: 30px;
  }

  .iv-strike-control-bar .option-side-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .iv-strike-control-bar .strike-ruler {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .iv-strike-control-bar-no-ruler {
    grid-template-rows: 30px;
    height: 30px;
    min-height: 30px;
  }

  .iv-strike-control-bar-no-ruler .strike-ruler-spacer {
    display: none;
  }

  .options-lab-content .option-workbench-card {
    height: auto;
    display: block;
    max-width: 100%;
    padding: 6px;
    overflow: hidden;
  }

  .option-workbench-card .workbench-top-stack,
  .option-workbench-card .workbench-top-stack-embedded,
  .option-workspace-content .option-workbench-card.embedded-workbench-card .workbench-top-stack {
    height: auto;
    min-height: 0;
    grid-template-rows: none;
  }

  .expiry-bar,
  .options-lab-content .option-workbench-card .expiry-bar,
  .option-workspace-content .option-workbench-card .expiry-bar {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .expiry-bar .expiry-row,
  .option-workbench-card .expiry-row {
    width: 100%;
    min-height: 34px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .option-workbench-card .expiry-button,
  .option-workspace-content .option-workbench-card .expiry-button {
    flex: 0 0 auto;
    min-height: 34px;
    height: 34px;
    padding: 0 11px;
    font-size: 13px;
  }

  .option-side-control-stack {
    width: 100%;
    min-width: 0;
    height: auto;
    display: grid;
    gap: 7px;
    justify-self: stretch;
  }

  .strategy-constraint-row {
    position: static;
    height: 36px;
  }

  .strategy-constraint-toggle,
  .option-side-toggle {
    height: 36px;
    min-height: 36px;
  }

  .side-toggle-button {
    min-height: 30px;
    font-size: 13px;
  }

  .options-lab-content .option-workbench-card .strike-ruler {
    margin: 11px 0;
  }

  .options-lab-content .option-workbench-card .workbench-surface {
    width: 100%;
    height: auto;
    overflow: hidden;
  }

  .options-lab-content .option-workbench-card .heatmap-wrap {
    height: auto;
    max-height: none;
    overflow: hidden;
    border-radius: 7px;
  }

  .options-lab-content .option-workbench-card .scenario-graph-wrap,
  .iv-content .option-workbench-card .scenario-graph-wrap {
    width: 100%;
    min-height: 260px;
    overflow: hidden;
  }

  .options-lab-content .option-workbench-card .scenario-graph,
  .iv-content .option-workbench-card .scenario-graph {
    width: 100%;
    min-height: 260px;
  }

  .options-lab-content .option-workbench-card .heatmap {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  .options-lab-content .option-workbench-card .heatmap th,
  .options-lab-content .option-workbench-card .heatmap td {
    height: 18px;
    padding: 0 2px;
    font-size: 10px;
    line-height: 1;
    text-align: center;
  }

  .options-lab-content .option-workbench-card .heatmap .axis {
    position: static;
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    padding: 0 3px;
    text-align: right;
  }

  .options-lab-content .option-workbench-card .heatmap .axis .subtle {
    font-size: 10px;
  }

  .options-lab-content .option-workbench-card .heatmap th:not(.axis),
  .options-lab-content .option-workbench-card .heatmap td {
    width: calc((100% - 72px) / var(--heatmap-column-count, 6));
  }

  .options-lab-content .option-workbench-card .workbench-footer {
    display: grid;
    gap: 10px;
    padding-top: 10px;
    align-self: stretch;
  }

  .options-lab-content .option-workbench-card .strategy-controls {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 0;
  }

  .options-lab-content .option-workbench-card .control-label {
    margin-bottom: 4px;
    font-size: 13px;
  }

  .options-lab-content .option-workbench-card .control-track {
    height: 28px;
    touch-action: pan-x;
  }

  .options-lab-content .option-workbench-card .control-track::-webkit-slider-runnable-track {
    height: 5px;
  }

  .options-lab-content .option-workbench-card .control-track::-webkit-slider-thumb {
    width: 18px;
    height: 24px;
    margin-top: -9px;
    border-radius: 7px;
  }

  .options-lab-content .option-workbench-card .control-track::-moz-range-track {
    height: 5px;
  }

  .options-lab-content .option-workbench-card .control-track::-moz-range-thumb {
    width: 18px;
    height: 24px;
    border-radius: 7px;
  }

  .options-lab-content .option-workbench-card .table-mode-row {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 0;
  }

  .options-lab-content .option-workbench-card .table-mode-row .tab-row {
    display: grid;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .options-lab-content .option-workbench-card .table-mode-row .tab-row:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .options-lab-content .option-workbench-card .table-mode-row .tab-row:last-child {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .options-lab-content .option-workbench-card .segment-button {
    min-height: 38px;
    padding: 0 6px;
    font-size: 12px;
    white-space: normal;
    line-height: 1.1;
  }

  .flow-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .flow-side,
  .flow-premium {
    justify-self: start;
  }

  .flow-page-title {
    align-items: start;
  }

  .flow-title-tools {
    width: min(100%, 360px);
    justify-content: start;
  }

  .flow-search {
    flex: 1 1 180px;
  }

  .flow-search input {
    width: 100%;
  }

  .iv-page-title {
    align-items: start;
  }

  .iv-title-tools {
    width: 100%;
    justify-content: start;
  }

  .iv-symbol-search,
  .iv-symbol-search input {
    width: 100%;
  }

  .iv-title-tools .segment-button {
    flex: 1 1 132px;
  }

  .iv-chart {
    min-height: 230px;
  }

  .iv-surface3d {
    min-height: 280px;
  }

  .iv-surface-caption {
    flex-wrap: wrap;
    justify-content: start;
  }

  .iv-surface-overlay {
    left: 10px;
    top: 10px;
    max-width: calc(100% - 20px);
    font-size: 11px;
  }

  .iv-contract-hero {
    grid-template-columns: 1fr;
  }

  .iv-contract-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .iv-table-row {
    grid-template-columns: minmax(90px, 1fr) 52px 70px 88px;
    gap: 8px;
    padding: 0 8px;
    font-size: 13px;
  }
}
