/* Project styles.
   Loaded after Bootstrap in layouts/base.html, so anything here wins. */



@font-face {
  font-family: 'InterVariable';
  src: url('../fonts/InterVariable.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}



@font-face {
  font-family: 'Euclid';
  src: url('../fonts/Euclid.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
}


@font-face {
  font-family: 'Heldustry';
  src: url('../fonts/Heldustry.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'D-DIN';
  src: url('../fonts/D-DIN.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'D-DIN';
  src: url('../fonts/D-DIN-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'D-DIN';
  src: url('../fonts/D-DIN-Italic.otf') format('opentype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'HTL';
  src: url('../fonts/HTL.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --app-accent: #0d6efd;
  --bs-font-sans-serif: 'Heldustry', sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
}

body {
  font-feature-settings: "kern";
}

/* Make the logout button in the navbar look like the sibling nav links. */
.auth-card {
  width: 100%;
  max-width: 700px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block: 1.5rem;
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--bs-border-color);
}

.auth-email-summary {
  background: var(--bs-tertiary-bg);
  overflow-wrap: anywhere;
}

.app-navbar {
  background-color: #fff;
}

.app-navbar-inner {
  max-width: 1400px;
  margin-inline: auto;
  padding-block: 0.35rem;
}

.app-navbar .navbar-brand {
  margin-right: 1.25rem;
}

.app-navbar-name {
  font-size: 1.35rem;
}

.app-navbar-tagline {
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-align: justify;
  text-align-last: justify;
  text-transform: uppercase;
}

.app-navbar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-inline: 0.65rem !important;
}

.app-navbar-register {
  margin: 0.2rem 0 0.2rem 0.4rem;
}

.app-navbar-search {
  position: relative;
  z-index: 1030;
  flex: 1 1 18rem;
  max-width: 25rem;
  margin-left: auto;
}

.app-navbar-search-control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.35rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: #fff;
  padding: 0.35rem 0.65rem;
}

.app-navbar-search:focus-within .app-navbar-search-control {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.12);
}

.app-navbar-search.is-open .app-navbar-search-control {
  border-color: var(--bs-primary);
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.12);
}

.app-navbar-search-control > .fa-search {
  flex: 0 0 auto;
  color: var(--bs-secondary-color);
}

.app-navbar-search-input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--bs-body-color);
  font: inherit;
}

.app-navbar-search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.app-navbar-search-spinner {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--bs-border-color);
  border-top-color: var(--bs-primary);
  border-radius: 50%;
  animation: app-navbar-search-spin 700ms linear infinite;
}

@keyframes app-navbar-search-spin {
  to { transform: rotate(360deg); }
}

.app-navbar-search-results {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  max-height: min(28rem, 70vh);
  overflow-y: auto;
  border: 1px solid var(--bs-primary);
  border-top: 0;
  border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
  background: #fff;
  box-shadow: 0 0.5rem 1rem rgba(33, 37, 41, 0.16);
}

.app-navbar-search-heading,
.app-navbar-search-message {
  margin: 0;
  padding: 0.55rem 0.75rem;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

.app-navbar-search-heading {
  background: var(--bs-light);
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.app-navbar-search-option {
  display: block;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid rgba(33, 37, 41, 0.07);
  color: var(--bs-body-color);
  line-height: 1.25;
  text-decoration: none;
}

.app-navbar-search-option:hover,
.app-navbar-search-option:focus,
.app-navbar-search-option.is-active {
  background: var(--bs-light);
  color: var(--bs-primary);
  outline: 0;
}

.app-navbar-search-option-title,
.app-navbar-search-option-meta {
  display: block;
}

.app-navbar-search-option-title {
  font-weight: 600;
}

.app-navbar-search-option-meta {
  margin-top: 0.2rem;
  color: var(--bs-secondary-color);
  font-size: 0.78rem;
}

.navbar .btn-link.nav-link {
  border: 0;
  padding: 0.5rem 0.5rem;
  text-decoration: none;
}

.main {
  min-height: 100vh;
}

.main > .container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  padding-bottom: 0;
}

.content > .footer {
  position: static;
  margin-top: auto; /* keeps the footer pinned to the bottom on short pages */
}

/* Reporting and workspace chrome uses the same card language as page content. */
.globe-reporting-page .app-navbar,
.globe-reporting-page .app-footer,
.options-workspace-page .app-navbar,
.options-workspace-page .app-footer {
  border: 1px solid rgba(33, 37, 41, 0.14) !important;
  border-radius: 0.6rem;
  background-color: #fff;
  box-shadow: none !important;
}

.globe-reporting-page .app-navbar,
.options-workspace-page .app-navbar {
  top: 0.75rem;
  margin-bottom: 0.75rem;
}

.globe-reporting-page .app-footer,
.options-workspace-page .app-footer {
  margin-bottom: 1.75rem;
  padding: 1rem;
  overflow: hidden;
}

/* Standard footer used by report, region, account, and options pages. */
.app-footer {
  padding-block: 2.5rem 1.25rem;
}

.app-footer-main {
  align-items: center;
}

.app-footer-heading {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.app-footer-copy {
  margin-bottom: 0.75rem;
  color: var(--bs-secondary-color);
}

.app-footer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.app-footer-form .btn {
  min-width: 6.5rem;
}

.app-footer-privacy {
  display: block;
  margin-top: 0.5rem;
}

.app-footer-icons {
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.app-footer-icons .nav-link {
  display: flex;
  padding: 0.35rem 0;
  border-radius: 0.375rem;
}

.app-footer-icons .nav-link:hover,
.app-footer-icons .nav-link:focus-visible {
  background: var(--bs-tertiary-bg);
}

.app-footer-icon {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}

.app-footer-legal {
  display: block;
  line-height: 1.6;
}

.app-footer-links {
  text-align: right;
}

@media (max-width: 991.98px) {
  .app-navbar .navbar-collapse {
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid var(--bs-border-color);
  }

  .app-navbar .nav-link {
    padding: 0.55rem 0 !important;
  }

  .app-navbar-search {
    max-width: none;
    margin: 0.5rem 0;
  }

  .app-navbar-search-results {
    position: static;
    max-height: 50vh;
  }

  .app-navbar-account {
    padding-top: 0.25rem;
    border-top: 1px solid var(--bs-border-color);
  }

  .app-navbar-register {
    display: inline-flex;
    width: fit-content;
    margin: 0.25rem 0;
    padding-inline: 0.75rem !important;
  }
}

@media (max-width: 575.98px) {
  .globe-reporting-page .app-navbar,
  .options-workspace-page .app-navbar {
    top: 0.35rem;
  }

  .app-footer {
    padding-block: 2rem 1rem;
  }

  .app-footer-form {
    grid-template-columns: 1fr;
  }

  .app-footer-form .btn {
    width: 100%;
  }

  .app-footer-links {
    text-align: left;
  }
}

.fit-cover {
  object-fit: cover;
}

.ticker-chart {
  width: 100%;
  height: 420px;
  min-height: 420px;
}

.ticker-chart > div,
.ticker-chart .tv-lightweight-charts {
  width: 100%;
  height: 100%;
}

.is-hidden,
.chart-feedback.d-none,
.chart-notice.d-none {
  display: none !important;
}

.metric-strip .border,
.company-section,
.chain-sidecar {
  background: #fff;
}

.company-sections {
  align-items: stretch;
}

.company-section {
  border-color: rgba(33, 37, 41, 0.12) !important;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04);
}

.section-detail-list dt,
.section-detail-list dd {
  margin-bottom: 0.75rem;
}

.section-detail-list dd:last-of-type,
.section-detail-list dt:last-of-type {
  margin-bottom: 0;
}

.chain-value {
  padding: 0.45rem 0.5rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: #fff;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

.chain-value.is-selected {
  background: rgba(13, 110, 253, 0.12);
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.45);
  border-radius: 0.25rem;
}

.chain-expiry-tabs .btn small {
  display: inline;
}

.chain-table table {
  min-width: 1280px;
}

.chain-table td,
.chain-table th {
  white-space: nowrap;
}

.chain-table td {
  padding: 0;
  vertical-align: middle;
}

.chain-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chain-table .calls-head {
  background: rgba(25, 135, 84, 0.08);
  color: #146c43;
}

.chain-table .puts-head {
  background: rgba(220, 53, 69, 0.08);
  color: #b02a37;
}

.chain-table .strike-head,
.chain-strike {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8f9fa;
}

.chain-strike b {
  font-size: 0.95rem;
}

.chain-table tbody tr:hover .chain-value,
.chain-table.table-hover tbody tr:hover .chain-value {
  background: #eef4ff;
}

.chain-table tbody tr:hover .chain-value.is-selected {
  background: rgba(13, 110, 253, 0.18);
}

.atm-row .chain-strike,
.atm-row .chain-value {
  background: #fff6bf;
}

.atm-row:hover .chain-strike,
.atm-row:hover .chain-value {
  background: #fff2a8;
}

.rejected-row {
  background: #fffafa;
}

.chain-sidecar {
  border: 1px solid rgba(33, 37, 41, 0.12);
}

.sidecar-actions {
  display: grid;
  gap: 0.5rem;
}

.sidecar-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(13, 110, 253, 0.3);
  border-radius: 0.375rem;
  background: #fff;
}

.sidecar-actions a:hover {
  background: rgba(13, 110, 253, 0.06);
}

.positive {
  color: #198754 !important;
}

.negative {
  color: #dc3545 !important;
}

.muted {
  color: #6c757d !important;
}

.news-item img {
  max-width: 96px;
  border-radius: 0.5rem;
}

.warning {
  border-left: 4px solid #ffc107;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.table-actions a {
  text-decoration: none;
}

@media (max-width: 1199.98px) {
  .chain-strike,
  .chain-table .strike-head {
    position: static;
  }
}

/* ------------------------------------------------------------------ */
/* Overview universal search builder (options_engine overview page).  */
/* Uses Bootstrap variables; loaded after Bootstrap so this wins.     */
/* ------------------------------------------------------------------ */

.overview-table {
  min-width: 1600px;
}

.overview-table th,
.overview-table td {
  white-space: nowrap;
}

.overview-table .sticky-action {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 84px;
  background: var(--bs-body-bg);
  box-shadow: -12px 0 16px -16px rgba(20, 33, 29, 0.45);
}

.overview-table thead .sticky-action {
  z-index: 3;
  background: var(--bs-tertiary-bg);
}

.overview-table-status {
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.overview-table-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.875rem;
}

.overview-table-nav {
  display: flex;
  gap: 0.625rem;
  align-items: center;
}

.overview-filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.overview-builder-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.overview-builder-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.overview-search-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.overview-summary-metrics {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.overview-builder-modal {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: block;
}

.overview-builder-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.overview-builder-dialog {
  position: relative;
  width: min(96vw - 32px, 1000px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  margin: 24px auto;
  padding: 1.25rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.25);
}

.overview-builder-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.overview-builder-tablist {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.overview-builder-tablist .is-active {
  font-weight: 700;
}

.overview-builder-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.overview-builder-inline-actions {
  display: flex;
  gap: 0.5rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.overview-condition-list,
.overview-saved-list,
.overview-column-list {
  display: grid;
  gap: 0.625rem;
}

.overview-condition-row {
  display: grid;
  grid-template-columns: auto 90px minmax(140px, 1fr) minmax(120px, 1fr) minmax(110px, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: var(--bs-tertiary-bg);
}

.overview-condition-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.overview-condition-values:has(input:only-child),
.overview-condition-values:has(select:only-child) {
  grid-template-columns: minmax(0, 1fr);
}

.overview-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.625rem;
}

.overview-column-option,
.overview-saved-item {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: var(--bs-tertiary-bg);
}

.overview-column-option span {
  display: grid;
  gap: 2px;
}

.overview-column-option small,
.overview-saved-item small {
  color: var(--bs-secondary-color);
}

.overview-saved-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.overview-saved-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.overview-builder-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
  margin-top: 0.5rem;
}

@media (max-width: 960px) {
  .overview-condition-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .overview-builder-dialog {
    width: calc(100vw - 16px);
    margin: 8px auto;
    max-height: calc(100vh - 16px);
    padding: 0.875rem;
  }

  .overview-builder-dialog-head,
  .overview-builder-dialog-foot,
  .overview-builder-toolbar {
    flex-direction: column;
  }

  .overview-condition-row,
  .overview-condition-values {
    grid-template-columns: 1fr;
  }
}

/* Contract analysis modal (option chain) */
.contract-modal {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.contract-modal.is-hidden {
  display: none !important;
}

.contract-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.contract-modal-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(85vh, 900px);
  overflow-y: auto;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.25);
}

.contract-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.contract-modal-header {
  padding-right: 2rem;
}

.contract-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.contract-modal-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
}

.contract-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-secondary-color);
  margin: 1.1rem 0 0.4rem;
}

.contract-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem 0.75rem;
}

.contract-metric {
  display: grid;
  gap: 2px;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--bs-tertiary-bg);
}

.contract-metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
}

.contract-info-icon {
  cursor: help;
  margin-left: 0.3rem;
  font-size: 0.8em;
  opacity: 0.6;
}

.contract-info-icon:hover,
.contract-info-icon:focus {
  opacity: 1;
}


.contract-metric-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.contract-modal-actions .sidecar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Payoff profile (contract modal) */
.contract-payoff {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: var(--bs-tertiary-bg);
}

.contract-payoff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.contract-payoff-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
}

.contract-payoff-legend i,
.contract-payoff-legend .legend-long,
.contract-payoff-legend .legend-short {
  display: inline-block;
  width: 1.1rem;
  height: 0;
  border-top-width: 2px;
  border-top-style: solid;
  margin: 0 0.15rem;
}

.contract-payoff-legend .legend-long { border-top-color: #198754; }
.contract-payoff-legend .legend-short { border-top-color: #dc3545; border-top-style: dashed; }

.contract-payoff-chart {
  position: relative;
  width: 100%;
  min-height: 240px;
}

.contract-payoff-readout {
  font-variant-numeric: tabular-nums;
  padding: 0.25rem 0.25rem 0;
}

/* Modal hierarchy: hero strip, section cards, columns */
.contract-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
}

.contract-hero-stat {
  display: grid;
  gap: 2px;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--bs-tertiary-bg);
}

.contract-hero-stat span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-secondary-color);
}

.contract-hero-stat b {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.contract-range-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(220,53,69,0.35), rgba(25,135,84,0.35));
  margin: 0.25rem 0 0.75rem;
}

.contract-range-bar span {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bs-body-bg);
  border: 2px solid var(--bs-emphasis-color, #212529);
}

.contract-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.contract-section {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem 0.75rem;
  background: var(--bs-tertiary-bg);
}

.contract-section h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-secondary-color);
  margin: 0 0 0.45rem;
}

.contract-section .contract-metrics {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.contract-section .contract-metric {
  background: var(--bs-body-bg);
}

.contract-verdict {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  margin-top: 0.9rem;
  background: var(--bs-tertiary-bg);
}

.contract-verdict > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contract-verdict-score {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.contract-verdict details {
  margin-top: 0.45rem;
  font-size: 0.85rem;
}

.contract-verdict summary {
  cursor: pointer;
  color: var(--bs-secondary-color);
}

.reason-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.reason-list li {
  margin-bottom: 0.15rem;
}

.screen-checks {
  width: 100%;
  font-size: 0.82rem;
  margin-top: 0.5rem;
  border-collapse: collapse;
}

.screen-checks td {
  padding: 0.15rem 0.5rem 0.15rem 0;
  border-bottom: 1px solid var(--bs-border-color);
  font-variant-numeric: tabular-nums;
}

.screen-checks tr:last-child td { border-bottom: 0; }
.screen-checks td:first-child { width: 1.2rem; }
.screen-checks .check-ok td:first-child { color: #198754; }
.screen-checks .check-fail td:first-child { color: #dc3545; font-weight: 700; }
.screen-checks .check-fail td:nth-child(2) { font-weight: 600; }
.screen-checks td:last-child { color: var(--bs-secondary-color); }

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem 0.75rem;
  margin-top: 0.6rem;
}

.score-part-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
  margin-bottom: 2px;
}

.score-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(108, 117, 125, 0.2);
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #0d6efd, #20c997);
}

@media (max-width: 575.98px) {
  .contract-hero {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Probability & assignment risk section */
.contract-prob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem 0.75rem;
}

.contract-prob-grid .prob-primary .contract-metric-value {
  font-size: 1.05rem;
}

.contract-risk-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.contract-risk-flag {
  max-width: 100%;
  cursor: help;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 20px;
}

.pill.green {
  background: #d1e7dd;
  color: #0f5132;
}

.pill.red {
  background: #f8d7da;
  color: #842029;
}

.pill.muted {
  background: #edf0ed;
  color: #66716c;
}

.pill.amber {
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffecb5;
}

.empty-state {
  padding: 26px;
  border: 1px dashed #cbd4ce;
  border-radius: 7px;
  color: #66716c;
  text-align: center;
}

/* ---- Options overview dashboard (dense panel grid, light theme) ---- */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(360px, 2fr) minmax(240px, 1.1fr);
  grid-template-areas:
    'summary chart watchlist'
    'movers  movers sector'
    'news    news   sector';
  gap: 1rem;
}

.dashboard-panel .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(33, 37, 41, 0.08);
  padding: 0.55rem 0.9rem;
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dashboard-panel-head > span:first-child {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #66716c;
}

#market-summary-panel { grid-area: summary; }
#chart-panel { grid-area: chart; }
#watchlist-panel { grid-area: watchlist; }
#movers-panel { grid-area: movers; }
#sector-panel { grid-area: sector; }
#news-panel { grid-area: news; }

.dashboard-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.dashboard-chart { width: 100%; min-height: 320px; }

.dashboard-table th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #66716c;
}

.dashboard-watch-row { cursor: pointer; }
.dashboard-watch-row:hover { background: rgba(13, 110, 253, 0.05); }

.dashboard-heatmap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.dashboard-heat-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(33, 37, 41, 0.12);
  text-decoration: none;
  background: #f8f9fa;
}

.dashboard-heat-tile.is-up { background: rgba(25, 135, 84, 0.12); border-color: rgba(25, 135, 84, 0.35); }
.dashboard-heat-tile.is-down { background: rgba(220, 53, 69, 0.10); border-color: rgba(220, 53, 69, 0.30); }
.dashboard-heat-tile:hover { filter: brightness(0.96); }

.dashboard-heat-sector {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #495057;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-heat-value { font-weight: 600; font-size: 0.95rem; }
.dashboard-heat-tile.is-up .dashboard-heat-value { color: #146c43; }
.dashboard-heat-tile.is-down .dashboard-heat-value { color: #b02a37; }

.dashboard-headlines li { border-bottom: 1px dashed rgba(33, 37, 41, 0.08); padding-bottom: 0.5rem; }
.dashboard-headlines li:last-child { border-bottom: 0; padding-bottom: 0; }

@media (max-width: 1199.98px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'summary chart'
      'watchlist movers'
      'sector sector'
      'news news';
  }
}

@media (max-width: 767.98px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas: 'summary' 'chart' 'watchlist' 'movers' 'sector' 'news';
  }
}

/* Shared page hierarchy and internal brand reference. */
.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--bs-body-bg), var(--bs-tertiary-bg));
}

.page-hero > div:first-child { max-width: 760px; }
.page-hero-actions, .page-hero-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.65rem; }
.page-hero-meta { flex-direction: column; align-items: flex-end; }
.eyebrow { color: var(--bs-primary); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.company-title { display: inline-block; margin-left: 0.65rem; color: var(--bs-secondary-color); font-size: 0.55em; font-weight: 500; }

.status-chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.65rem; border: 1px solid var(--bs-border-color); border-radius: 999px; background: var(--bs-body-bg); color: var(--bs-secondary-color); font-size: 0.78rem; font-weight: 600; }
.status-chip.is-good { color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); border-color: var(--bs-success-border-subtle); }
.status-chip.is-warning { color: var(--bs-warning-text-emphasis); background: var(--bs-warning-bg-subtle); border-color: var(--bs-warning-border-subtle); }
.status-dot { display: inline-block; width: 0.55rem; height: 0.55rem; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.status-dot.is-good { color: var(--bs-success); }
.status-dot.is-warning { color: var(--bs-warning); }

.guideline-nav { position: sticky; top: 5.5rem; }
.guideline-nav a { display: block; padding: 0.42rem 0; color: var(--bs-secondary-color); text-decoration: none; }
.guideline-nav a:hover { color: var(--bs-primary); }
.guideline-section { scroll-margin-top: 6rem; }
.guideline-principle { display: flex; min-height: 100%; flex-direction: column; gap: 0.35rem; padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 0.6rem; background: var(--bs-tertiary-bg); }
.guideline-principle span, .state-example small { color: var(--bs-secondary-color); }
.brand-swatch { height: 3.75rem; border: 1px solid rgba(0,0,0,.08); border-radius: 0.5rem; }
.guideline-list, .guideline-checks { display: grid; gap: 0.55rem; padding-left: 1.2rem; }
.guideline-steps { display: grid; gap: 0.75rem; padding-left: 1.25rem; }
.state-example { display: flex; min-height: 9rem; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.65rem; padding: 1rem; border: 1px dashed var(--bs-border-color); border-radius: 0.6rem; }

/* Options overview and ticker workspace. */
.summary-metric-grid, .metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.summary-metric-grid > div, .metric-grid > div { padding: 0.8rem; border: 1px solid var(--bs-border-color); border-radius: 0.55rem; background: var(--bs-tertiary-bg); }
.summary-metric-grid dt, .metric-grid dt { color: var(--bs-secondary-color); font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; }
.summary-metric-grid dd, .metric-grid dd { margin: 0.15rem 0 0; color: var(--bs-emphasis-color); font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.market-breadth { height: 0.5rem; }
.key-value { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; font-size: 0.85rem; }
.key-value span { color: var(--bs-secondary-color); }
.empty-inline { padding: 1.25rem; color: var(--bs-secondary-color); text-align: center; }
.empty-state-card .card-body { padding: clamp(2rem, 8vw, 5rem); }
.empty-state-icon { display: block; margin-bottom: 1rem; color: var(--bs-primary); font-size: 2rem; }
.overview-results { margin-inline: -0.25rem; border: 1px solid var(--bs-border-color); border-radius: 0.55rem; }

.freshness-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 0.75rem 1rem; border: 1px solid var(--bs-border-color); border-radius: 0.65rem; background: var(--bs-body-bg); }
.freshness-bar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.freshness-bar dl { display: flex; gap: 1.25rem; margin: 0; }
.freshness-bar dl div { display: grid; grid-template-columns: auto auto; gap: 0.35rem; font-size: 0.78rem; }
.freshness-bar dt { color: var(--bs-secondary-color); font-weight: 500; }
.freshness-bar dd { margin: 0; font-weight: 650; }

.workspace-nav { display: flex; gap: 0.35rem; overflow-x: auto; padding: 0.35rem; border: 1px solid var(--bs-border-color); border-radius: 0.65rem; background: var(--bs-body-bg); scrollbar-width: thin; }
.workspace-nav a { flex: 0 0 auto; padding: 0.5rem 0.75rem; border-radius: 0.45rem; color: var(--bs-secondary-color); font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.workspace-nav a:hover, .workspace-nav a:focus { color: var(--bs-primary); background: var(--bs-tertiary-bg); }
#overview, #gates, #fundamentals, #news, #chain, #plan, #execution { scroll-margin-top: 6rem; }
.ticker-symbol { padding: 0.28rem 0.55rem; border-radius: 0.4rem; background: var(--bs-primary); color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; }
.metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quote-panel { display: flex; flex-direction: column; padding: 1.15rem; border-radius: 0.65rem; background: var(--bs-dark); color: #fff; }
.quote-panel > span { color: rgba(255,255,255,.65); font-size: 0.76rem; text-transform: uppercase; }
.quote-panel > strong { font-size: 2.25rem; font-variant-numeric: tabular-nums; }
.quote-panel > small:last-child { margin-top: 0.5rem; color: rgba(255,255,255,.65) !important; }
.refresh-panel { padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 0.65rem; background: var(--bs-tertiary-bg); }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1rem 1.25rem; background: transparent; }
.chart-control-grid { display: grid; grid-template-columns: minmax(120px, .5fr) minmax(120px, .5fr) minmax(300px, 2fr); gap: 1rem; align-items: end; }
.chart-control-grid .form-label { margin: 0; }
.overlay-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; min-height: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--bs-border-color); border-radius: 0.4rem; }
.overlay-controls legend { width: auto; margin: 0; color: var(--bs-secondary-color); font-size: 0.72rem; }
.ticker-chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin-bottom: 0.75rem; padding: 0.65rem 0.8rem; border-radius: 0.45rem; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); font-size: 0.8rem; }
.section-title { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.gate-score { margin: 1.25rem 0 0.5rem; }
.gate-score strong { font-size: 2rem; }
.gate-score span { color: var(--bs-secondary-color); }
.detail-list, .section-detail-list { display: grid; gap: 0.5rem; }
.detail-list > div, .section-detail-list > div { display: flex; justify-content: space-between; gap: 1rem; }
.detail-list dt, .section-detail-list dt { color: var(--bs-secondary-color); font-size: 0.8rem; font-weight: 500; }
.detail-list dd, .section-detail-list dd { margin: 0; text-align: right; font-weight: 600; }
.news-list { display: grid; gap: 0.75rem; }
.news-item { display: flex; gap: 1rem; padding: 0.85rem; border: 1px solid var(--bs-border-color); border-radius: 0.55rem; color: inherit; text-decoration: none; }
.news-item:hover { border-color: var(--bs-primary); background: var(--bs-tertiary-bg); }
.news-item > span { display: flex; flex-direction: column; gap: 0.3rem; }
.news-item small { color: var(--bs-secondary-color); }
.chain-expiry-tabs { display: flex; gap: 0.5rem; overflow-x: auto; margin-bottom: 1rem; padding-bottom: 0.25rem; }
.chain-expiry-tabs .btn { flex: 0 0 auto; }
.chain-expiry-tabs small { display: block; font-size: 0.65rem; }
.chain-table td:not(:has(.chain-value)), .chain-table th { padding: 0.45rem; text-align: right; font-variant-numeric: tabular-nums; }
.chain-table .calls-head { text-align: left; }
.chain-table .puts-head { text-align: right; }
.execution-checks { display: grid; gap: 0.75rem; }
.execution-checks label { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.7rem; border: 1px solid var(--bs-border-color); border-radius: 0.45rem; }
.symbol-search { display: flex; width: min(420px, 100%); gap: 0.5rem; margin: 1.25rem auto 0; }

@media (max-width: 991.98px) {
  .page-hero { align-items: flex-start; flex-direction: column; }
  .page-hero-actions, .page-hero-meta { align-items: flex-start; justify-content: flex-start; }
  .guideline-nav { position: static; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-control-grid { grid-template-columns: 1fr 1fr; }
  .overlay-controls { grid-column: 1 / -1; }
}

@media (max-width: 575.98px) {
  .page-hero { padding: 1rem; }
  .page-hero-actions { width: 100%; }
  .page-hero-actions .btn { flex: 1 1 auto; }
  .freshness-bar dl { width: 100%; justify-content: space-between; gap: 0.5rem; }
  .freshness-bar dl div { display: block; }
  .metric-grid { grid-template-columns: 1fr; }
  .chart-control-grid { grid-template-columns: 1fr; }
  .overlay-controls { grid-column: auto; }
  .ticker-chart { height: 320px; min-height: 320px; }
  .symbol-search { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* -------------------------------------------------------------------------- */
/* Options workspace refinement                                               */
/* -------------------------------------------------------------------------- */

.options-workspace {
  /* Match reporting.css: white surfaces, neutral borders, semantic accents. */
  --options-line: rgba(33, 37, 41, 0.14);
  --options-line-strong: rgba(33, 37, 41, 0.24);
  --options-surface: var(--bs-body-bg, #fff);
  --options-surface-subtle: var(--bs-light, #f8f9fa);
  --options-ink: var(--bs-body-color, #212529);
  --options-muted: #5f6872;
  --options-radius: 0.6rem;
  --options-control-radius: var(--bs-border-radius-sm);
  color: var(--options-ink);
  padding-block: 1rem 3rem;
  min-width: 0;
}

.options-workspace-page {
  background-color: var(--bs-body-bg, #fff);
}

.options-workspace .card {
  border-color: var(--options-line);
  border-radius: var(--options-radius);
  box-shadow: none;
  overflow: hidden;
}

.options-workspace .card-header {
  border-bottom-color: var(--options-line);
}

.options-workspace .text-muted,
.options-workspace .text-body-secondary {
  color: var(--options-muted) !important;
}

.options-workspace .btn,
.options-workspace .form-control,
.options-workspace .form-select {
  border-radius: var(--options-control-radius);
}

.options-workspace .btn {
  font-weight: 600;
}

.options-workspace .form-label {
  color: var(--options-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.options-workspace :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.options-workspace .options-page-hero {
  position: relative;
  align-items: center;
  padding: clamp(1rem, 2vw, 1.5rem);
  border-color: var(--options-line);
  border-radius: var(--options-radius);
  background: var(--options-surface);
  box-shadow: none;
  overflow: hidden;
}

.options-workspace .options-page-hero h1 {
  color: var(--options-ink);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.025em;
}

.options-workspace .options-page-hero > div:first-child > .text-muted {
  max-width: 64ch;
  font-size: 0.92rem;
  line-height: 1.55;
}

.options-workspace .page-hero-actions {
  flex: 0 0 auto;
}

.options-workspace .status-chip {
  min-height: 2.2rem;
  border-radius: var(--options-control-radius);
  padding-inline: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}

.options-workspace .eyebrow {
  margin-bottom: 0.4rem !important;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.055em;
}

/* Overview dashboard */
.options-workspace .options-dashboard {
  grid-template-columns: minmax(250px, 0.9fr) minmax(400px, 1.8fr) minmax(250px, 1fr);
  gap: 1.5rem;
}

.options-workspace .dashboard-panel {
  min-width: 0;
}

.options-workspace .dashboard-panel .card-header {
  min-height: 3.2rem;
  padding: 1rem;
  background: var(--options-surface-subtle);
}

.options-workspace .dashboard-panel > .card-body {
  padding: 1rem;
}

.options-workspace .dashboard-panel-title {
  margin: 0;
  color: var(--options-ink);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
}

.options-workspace .dashboard-panel-head small {
  color: var(--options-muted);
  font-size: 0.8125rem;
}

.options-workspace .summary-metric-grid {
  gap: 0.6rem;
}

.options-workspace .summary-metric-grid > div,
.options-workspace .metric-grid > div {
  min-width: 0;
  padding: 0.75rem 0.8rem;
  border: 0;
  border-bottom: 1px solid var(--options-line);
  border-radius: 0;
  background: transparent;
}

.options-workspace .summary-metric-grid dt,
.options-workspace .metric-grid dt {
  color: var(--options-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.045em;
}

.options-workspace .summary-metric-grid dd,
.options-workspace .metric-grid dd,
.options-workspace .key-value strong {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.options-workspace .summary-metric-grid dd {
  font-size: 1.16rem;
  line-height: 1.25;
}

.options-workspace .market-breadth {
  height: 0.6rem;
  border-radius: 999px;
  background: #e9edf3;
}

.options-workspace .key-value {
  align-items: baseline;
  padding: 0.32rem 0;
}

.options-workspace .dashboard-chart {
  min-height: 330px;
}

.options-workspace .dashboard-table {
  font-variant-numeric: tabular-nums;
}

.options-workspace .dashboard-table > :not(caption) > * > * {
  padding: 0.58rem 0.8rem;
  border-color: var(--options-line);
}

.options-workspace .dashboard-table thead th {
  background: var(--options-surface-subtle);
  color: var(--options-muted);
  font-size: 0.75rem;
  letter-spacing: 0.045em;
}

.options-workspace .dashboard-watch-row {
  transition: background-color 0.15s ease;
}

.options-workspace .dashboard-watch-row:focus-visible {
  position: relative;
  z-index: 1;
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.options-workspace .dashboard-heatmap {
  gap: 0.65rem;
}

.options-workspace .dashboard-heat-tile {
  min-height: 6.2rem;
  gap: 0.8rem;
  padding: 0.8rem;
  border-color: var(--options-line);
  border-radius: var(--options-radius);
  background: var(--options-surface-subtle);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.options-workspace .dashboard-heat-tile:hover,
.options-workspace .dashboard-heat-tile:focus-visible {
  border-color: var(--options-line-strong);
  box-shadow: none;
  filter: none;
}

.options-workspace .dashboard-heat-sector {
  font-size: 0.8125rem;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
}

.options-workspace .dashboard-heat-tile.is-up {
  background: rgba(var(--bs-success-rgb), 0.06);
  border-color: rgba(var(--bs-success-rgb), 0.25);
}

.options-workspace .dashboard-heat-tile.is-down {
  background: rgba(var(--bs-danger-rgb), 0.06);
  border-color: rgba(var(--bs-danger-rgb), 0.25);
}

.options-workspace .dashboard-headlines li {
  padding: 0.58rem 0;
  border-bottom-style: solid;
  border-bottom-color: var(--options-line);
}

.options-workspace .dashboard-headlines li:first-child {
  padding-top: 0;
}

.options-workspace .dashboard-headlines a {
  color: var(--options-ink);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.options-workspace .dashboard-headlines a:hover {
  color: var(--bs-primary);
}

/* Overview screener */
.options-workspace .options-screener > .card-body {
  padding: clamp(1rem, 2vw, 1.5rem) !important;
}

.options-workspace .overview-builder-toolbar {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--options-line);
}

.options-workspace .overview-builder-actions {
  justify-content: flex-end;
}

.options-workspace .overview-search-summary {
  align-items: flex-start;
  margin-top: 0.85rem;
}

.options-workspace .overview-summary-metrics .badge,
.options-workspace .overview-filter-chips .badge {
  padding: 0.45rem 0.6rem;
  border-color: var(--options-line) !important;
  border-radius: var(--options-control-radius);
  background: var(--options-surface-subtle) !important;
  color: var(--options-muted) !important;
  font-weight: 550;
}

.options-workspace .overview-results {
  margin-inline: 0;
  border-color: var(--options-line);
  border-radius: var(--options-radius);
}

.options-workspace .overview-table {
  margin-bottom: 0;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.options-workspace .overview-table > :not(caption) > * > * {
  padding: 0.58rem 0.65rem;
  border-color: var(--options-line);
}

.options-workspace .overview-table thead th {
  background: var(--options-surface-subtle);
  color: var(--options-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.options-workspace .overview-table .sticky-action {
  box-shadow: -12px 0 20px -18px rgba(15, 23, 42, 0.85);
}

.options-workspace .overview-builder-dialog {
  width: min(calc(100vw - 2rem), 1080px);
  padding: clamp(1rem, 2vw, 1.5rem);
  border-color: var(--options-line);
  border-radius: var(--options-radius);
  max-height: calc(100dvh - 2rem);
  margin-block: 1rem;
  overscroll-behavior: contain;
}

body.options-workspace-page:has(.overview-builder-modal:not(.is-hidden)) {
  overflow: hidden;
}

.options-workspace .overview-builder-tablist .is-active {
  color: var(--bs-white);
  background: var(--bs-primary);
  border-color: var(--bs-primary);
}

.options-workspace .overview-builder-dialog-head {
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--options-line);
}

.options-workspace .overview-builder-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}

.options-workspace .overview-condition-row > label {
  min-width: 0;
  font-size: 0.8125rem;
}

.options-workspace .overview-condition-row > label > select {
  width: 100%;
  min-height: 2.25rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--options-line);
  border-radius: var(--options-control-radius);
  background-color: var(--options-surface);
  color: var(--options-ink);
}

.options-workspace .overview-condition-values > :is(input, select) {
  min-width: 0;
}

.options-workspace .overview-builder-tablist {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--options-line);
}

.options-workspace .overview-condition-row,
.options-workspace .overview-column-option,
.options-workspace .overview-saved-item {
  border-color: var(--options-line);
  background: var(--options-surface-subtle);
  border-radius: var(--options-control-radius);
}

.options-workspace .overview-builder-dialog-foot {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--options-line);
}

/* Ticker decision workspace */
.options-workspace .company-title {
  margin-left: 0.75rem;
  color: var(--options-muted);
  font-size: 0.52em;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.options-workspace .freshness-bar {
  padding: 0.8rem 1rem;
  border-color: var(--options-line);
  border-radius: var(--options-radius);
  background: #fff;
  box-shadow: none;
}

.options-workspace .freshness-bar > div:first-child {
  gap: 0.6rem;
}

.options-workspace .freshness-bar dl {
  gap: 0;
}

.options-workspace .freshness-bar dl div {
  min-width: 7.5rem;
  padding: 0.1rem 0.9rem;
  border-left: 1px solid var(--options-line);
}

.options-workspace .freshness-bar dt {
  font-size: 0.75rem;
}

.options-workspace .freshness-bar dd {
  color: var(--options-ink);
  font-variant-numeric: tabular-nums;
}

.options-workspace .workspace-nav {
  position: sticky;
  top: 5.5rem;
  z-index: 1010;
  padding: 0.4rem;
  border-color: var(--options-line);
  background: var(--options-surface);
  box-shadow: none;
}

.options-workspace .workspace-nav a {
  padding: 0.52rem 0.8rem;
  color: var(--options-muted);
  font-size: 0.875rem;
}

.options-workspace :is(#overview, #gates, #fundamentals, #news, #chain, #plan, #execution) {
  scroll-margin-top: 9rem;
}

.options-workspace .options-underlying > .card-body {
  padding: clamp(1rem, 2.2vw, 1.5rem) !important;
}

.options-workspace .ticker-symbol {
  padding: 0.35rem 0.62rem;
  border-radius: var(--options-control-radius);
}

.options-workspace .metric-grid {
  gap: 0.65rem;
}

.options-workspace .metric-grid dd {
  font-size: 1rem;
  line-height: 1.35;
}

.options-workspace .quote-panel {
  min-height: 9.2rem;
  justify-content: center;
  padding: 1.25rem;
  border: 1px solid var(--options-line);
  border-radius: var(--options-radius);
  background: var(--options-surface-subtle);
  color: var(--options-ink);
  box-shadow: none;
}

.options-workspace .quote-panel > span,
.options-workspace .quote-panel > small:last-child {
  color: var(--options-muted) !important;
}

.options-workspace .quote-panel > strong {
  margin-block: 0.1rem;
  font-size: clamp(2rem, 3vw, 2.55rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.options-workspace .refresh-panel {
  padding: 1rem;
  border-color: var(--options-line);
  background: var(--options-surface-subtle);
}

.options-workspace .refresh-panel h3 {
  margin-bottom: 0.8rem;
  color: var(--options-ink);
}

.options-workspace .section-heading {
  min-height: 4.75rem;
  padding: 1rem;
  background: var(--options-surface-subtle);
}

.options-workspace .section-heading h2 {
  color: var(--options-ink);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.options-workspace .options-chart-card > .card-body,
.options-workspace .options-chain-card > .card-body {
  padding: 1rem;
}

.options-workspace .chart-control-grid {
  gap: 0.8rem;
}

.options-workspace .overlay-controls {
  min-height: 2.5rem;
  border-color: var(--options-line);
  border-radius: var(--options-control-radius);
  background: var(--options-surface-subtle);
}

.options-workspace .ticker-chart-legend {
  gap: 0.6rem 1.1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--options-line);
  background: var(--options-surface-subtle);
}

.options-workspace .section-title {
  align-items: flex-end;
  margin-bottom: 0.9rem;
}

.options-workspace .decision-grid .card-body {
  padding: 1.1rem;
}

.options-workspace .decision-grid .h6 {
  color: var(--options-ink);
  font-weight: 650;
}

.options-workspace .gate-score {
  margin: 1rem 0 0.55rem;
}

.options-workspace .gate-score strong {
  color: var(--options-ink);
  font-size: 2.15rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.options-workspace .detail-list > div,
.options-workspace .section-detail-list > div {
  align-items: baseline;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--options-line);
}

.options-workspace :is(.detail-list, .section-detail-list) > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.options-workspace .detail-list dd,
.options-workspace .section-detail-list dd {
  max-width: 62%;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.options-workspace .news-item {
  padding: 0.9rem;
  border-color: var(--options-line);
  border-radius: var(--options-radius);
  background: #fff;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.options-workspace .news-item:hover,
.options-workspace .news-item:focus-visible {
  border-color: rgba(var(--bs-primary-rgb), 0.4);
  background: var(--options-surface-subtle);
  box-shadow: none;
}

.options-workspace .news-item img {
  width: 88px;
  height: 64px;
  flex: 0 0 auto;
  object-fit: cover;
}

.options-workspace .chain-expiry-tabs {
  gap: 0.45rem;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.options-workspace .chain-table {
  border: 1px solid var(--options-line);
  border-radius: var(--options-radius);
}

.options-workspace .chain-table table {
  margin-bottom: 0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.options-workspace .chain-table th {
  color: var(--options-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.045em;
}

.options-workspace .chain-table td,
.options-workspace .chain-table th {
  border-color: var(--options-line);
}

.options-workspace .chain-value {
  min-height: 2.25rem;
  padding: 0.5rem 0.55rem;
}

.options-workspace .chain-value:hover {
  box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb), 0.28);
}

.options-workspace .chain-strike {
  background: var(--options-surface-subtle);
  box-shadow: 1px 0 var(--options-line), -1px 0 var(--options-line);
}

.options-workspace .atm-row .chain-strike,
.options-workspace .atm-row .chain-value {
  background: #fff8d8;
}

.options-workspace #plan .form-label {
  width: 100%;
}

.options-workspace #plan textarea {
  line-height: 1.5;
  resize: vertical;
}

.options-workspace .execution-checks {
  gap: 0.6rem;
}

.options-workspace .execution-checks label {
  margin: 0;
  padding: 0.75rem 0.8rem;
  border-color: var(--options-line);
  background: var(--options-surface-subtle);
  line-height: 1.4;
}

.options-workspace .execution-checks label:hover {
  border-color: var(--options-line-strong);
  background: var(--options-surface-subtle);
}

.options-workspace .empty-state-card .card-body {
  max-width: 760px;
  margin-inline: auto;
}

@media (max-width: 1199.98px) {
  .options-workspace .options-dashboard {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  }

  .options-workspace .workspace-nav {
    position: static;
  }
}

@media (max-width: 991.98px) {
  .options-workspace .options-page-hero {
    align-items: flex-start;
  }

  .options-workspace .page-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .options-workspace .freshness-bar {
    align-items: flex-start;
  }

  .options-workspace .freshness-bar dl {
    width: 100%;
    border-top: 1px solid var(--options-line);
    padding-top: 0.75rem;
  }

  .options-workspace .freshness-bar dl div:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 767.98px) {
  .options-workspace .options-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .options-workspace .dashboard-chart {
    min-height: 280px;
  }

  .options-workspace .overview-builder-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .options-workspace .overview-builder-actions .btn {
    flex: 1 1 auto;
  }

  .options-workspace .freshness-bar dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .options-workspace .freshness-bar dl div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
    padding-inline: 0.65rem;
  }

  .options-workspace .news-item img {
    width: 72px;
    height: 56px;
  }
}

@media (max-width: 575.98px) {
  .options-workspace .options-page-hero {
    padding: 1rem;
  }

  .options-workspace .options-page-hero h1 {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }

  .options-workspace .company-title {
    margin-left: 0;
    font-size: 0.58em;
    line-height: 1.25;
  }

  .options-workspace .page-hero-actions .status-chip {
    flex-basis: 100%;
  }

  .options-workspace .dashboard-panel .card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .options-workspace .dashboard-panel-head > .d-flex,
  .options-workspace .dashboard-panel-head > .btn-group {
    width: 100%;
  }

  .options-workspace .dashboard-panel-head select {
    flex: 1 1 auto;
  }

  .options-workspace .dashboard-heatmap {
    grid-template-columns: 1fr;
  }

  .options-workspace .overview-table-footer,
  .options-workspace .overview-table-nav {
    width: 100%;
  }

  .options-workspace .overview-table-nav {
    justify-content: space-between;
  }

  .options-workspace .overview-builder-dialog-foot .btn {
    flex: 1 1 0;
  }

  .options-workspace .freshness-bar > div:first-child .text-muted {
    flex-basis: 100%;
    padding-left: 1.15rem;
  }

  .options-workspace .freshness-bar dl div {
    padding-inline: 0.45rem;
  }

  .options-workspace .freshness-bar dd {
    font-size: 0.8125rem;
  }

  .options-workspace .workspace-nav {
    margin-inline: -0.25rem;
  }

  .options-workspace .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .options-workspace .quote-panel {
    min-height: 8rem;
  }

  .options-workspace .section-heading {
    align-items: flex-start;
  }

  .options-workspace .ticker-chart-legend .ms-auto {
    width: 100%;
    margin-left: 0 !important;
  }

  .options-workspace .detail-list > div,
  .options-workspace .section-detail-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .options-workspace .detail-list dd,
  .options-workspace .section-detail-list dd {
    max-width: 100%;
    text-align: left;
  }

  .options-workspace .news-item {
    gap: 0.7rem;
  }

  .options-workspace .news-item img {
    width: 64px;
    height: 52px;
  }
}

