:root {
  --ink: #172033;
  --muted: #5d6780;
  --line: #d8dfeb;
  --paper: #f6f3ea;
  --panel: rgba(255, 255, 255, 0.82);
  --accent: #115e59;
  --accent-soft: #d7efe7;
  --warn: #9a3412;
  --shadow: 0 22px 55px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(17, 94, 89, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(154, 52, 18, 0.14), transparent 24%),
    linear-gradient(180deg, #fbfaf5, var(--paper));
  font-family: Georgia, "Times New Roman", serif;
}

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

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 4rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(216, 223, 235, 0.92);
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.08);
  backdrop-filter: blur(14px);
}

.app-main {
  min-width: 0;
}

.app-brand {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.45rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.app-brand:hover,
.app-brand.is-active {
  background: rgba(17, 94, 89, 0.08);
}

.app-brand-mark {
  display: block;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 8px;
  object-fit: contain;
  flex: 0 0 auto;
}

.app-brand strong,
.app-brand small {
  display: block;
  line-height: 1.2;
}

.app-brand small {
  margin-top: 0.15rem;
  font-size: 0.74rem;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-width: 0;
}

.app-nav-menu {
  position: relative;
}

.app-nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  min-height: 2.3rem;
  padding: 0.38rem 0.62rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-nav-heading::after {
  content: "";
  width: 0.36rem;
  height: 0.36rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  opacity: 0.72;
}

.app-nav-menu:hover .app-nav-heading::after,
.app-nav-menu:focus-within .app-nav-heading::after {
  transform: translateY(0.1rem) rotate(225deg);
}

.app-nav-menu:hover .app-nav-heading,
.app-nav-menu:focus-within .app-nav-heading {
  background: rgba(17, 94, 89, 0.08);
}

.app-nav-menu.is-active .app-nav-heading {
  background: var(--accent-soft);
  color: #0f3f3b;
}

.app-nav-links {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 14.5rem;
  padding: 0.5rem 0.35rem 0.35rem;
  border: 1px solid rgba(216, 223, 235, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.16);
  backdrop-filter: blur(14px);
}

.app-nav-menu:hover .app-nav-links,
.app-nav-menu:focus-within .app-nav-links {
  display: grid;
  gap: 0.12rem;
}

.app-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.05rem;
  padding: 0.38rem 0.48rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
}

.app-nav-link:hover {
  background: rgba(17, 94, 89, 0.07);
}

.app-nav-link.is-active {
  background: var(--accent-soft);
  color: #0f3f3b;
  font-weight: 700;
}

.app-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.app-user-menu {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.app-sign-out {
  min-height: 2rem;
  padding: 0.32rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.76rem;
}

.app-sign-out:hover {
  background: #f7f9fc;
}

.auth-header {
  justify-content: center;
}

.auth-shell {
  display: grid;
  place-items: start center;
  min-height: calc(100vh - 4rem);
  padding: 5rem 1rem 3rem;
}

.auth-panel {
  width: min(100%, 28rem);
  padding: 2rem;
  border: 1px solid rgba(216, 223, 235, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  margin-top: 0.35rem;
  font-size: 2.8rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.6rem;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  height: 2.7rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}

button {
  font: inherit;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem auto 0;
  max-width: 1200px;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
}

.flash-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.flash-message {
  min-width: 0;
}

.flash-error-state {
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  border: 3px solid #b91c1c;
  border-left-width: 0.75rem;
  border-radius: 10px;
  background: #fee2e2;
  color: #7f1d1d;
  box-shadow: 0 16px 38px rgba(127, 29, 29, 0.3);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
}

.flash-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.flash-error-state .flash-action {
  color: #7f1d1d;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.flash-error-state .flash-action:hover {
  color: #450a0a;
}

.flash-action {
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.flash-action:hover {
  color: var(--accent);
}

.dashboard-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 1rem 0.5rem 2rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 1rem;
}

.eyebrow,
.summary-label,
.panel-header span,
small {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

h1, h2, h3 {
  margin: 0;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  line-height: 1.05;
}

.hero-copy {
  max-width: 48rem;
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.ledger-filters {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
}

.ledger-filters label {
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.settings-form {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}

.settings-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.settings-form input[type="text"],
.settings-form input[type="password"],
.settings-form input[type="url"],
.settings-form select {
  width: 100%;
  height: 2.7rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.settings-callout {
  display: grid;
  gap: 0.55rem;
  max-width: 52rem;
  margin-bottom: 1.35rem;
  padding: 0.85rem 0 0.85rem 1rem;
  border-left: 3px solid var(--accent);
}

.settings-callout p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.settings-code {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.settings-code-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.settings-code-row .settings-code {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.settings-copy-button {
  flex: 0 0 auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

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

.button-secondary {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-secondary:hover {
  background: #f7f9fc;
}

a {
  color: var(--accent);
}

.detail-hero {
  align-items: start;
}

.status-stack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.spread-subtabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.spread-subtab {
  position: relative;
  padding: 0.65rem 1rem;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.spread-subtab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}

.spread-subtab:hover,
.spread-subtab[aria-current="page"] {
  color: var(--accent);
}

.spread-subtab[aria-current="page"]::after {
  background: var(--accent);
}

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

.summary-card,
.panel,
.recommendation-card {
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.summary-card {
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
}

.summary-card strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.4rem;
}

.attribution-requirement {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.8rem;
  margin: 0.75rem 0 1rem;
}

.attribution-requirement > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.85rem 1rem;
}

.attribution-requirement strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1.2;
}

.assignment-summary {
  margin: 0.75rem 0 1rem;
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.assignment-summary table {
  width: auto;
  min-width: 0;
}

.assignment-summary th,
.assignment-summary td {
  padding: 0.45rem 0.65rem;
  white-space: nowrap;
}

.assignment-summary th:nth-child(n + 2),
.assignment-summary td:nth-child(n + 2) {
  width: 4.5rem;
}

.assignment-summary td:nth-child(n + 2) {
  text-align: right;
}

.panel {
  border-radius: 18px;
  padding: 0.65rem 0.55rem;
  margin-bottom: 0.85rem;
  overflow: visible;
}

.panel-header {
  margin-bottom: 0.55rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  padding-top: 0;
  padding-bottom: 0.8rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.5rem 0.45rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}


.ticker-performance-shell .ticker-performance-filter-panel {
  position: sticky;
  top: 4.1rem;
  z-index: 20;
}

.ticker-performance-column-guide {
  display: grid;
  grid-template-columns: 11fr 7fr 7fr 8fr 8fr 8fr 7fr 6fr 8fr 8fr 8fr 5fr 9fr;
  gap: 0;
  min-width: 68rem;
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  overflow-x: hidden;
}

.ticker-performance-table {
  table-layout: fixed;
  min-width: 68rem;
}

.ticker-performance-column-guide span {
  padding: 0.2rem 0.45rem;
}

.ticker-performance-col-symbol { width: 11%; }
.ticker-performance-col-open { width: 7%; }
.ticker-performance-col-closed { width: 7%; }
.ticker-performance-col-premium { width: 8%; }
.ticker-performance-col-real-app { width: 8%; }
.ticker-performance-col-unreal-app { width: 8%; }
.ticker-performance-col-div { width: 7%; }
.ticker-performance-col-fees { width: 6%; }
.ticker-performance-col-pl { width: 8%; }
.ticker-performance-col-total-return { width: 8%; }
.ticker-performance-col-weekly { width: 8%; }
.ticker-performance-col-days { width: 5%; }
.ticker-performance-col-avg-cost { width: 9%; }

.ticker-performance-column-guide span:not(:first-child) {
  text-align: right;
}

.ticker-performance-closed-only-row > td {
  background: #e2e8f0;
}

.ticker-performance-total-row > th,
.ticker-performance-total-row > td {
  background: #f8fafc;
  border-top: 2px solid var(--line);
  font-weight: 700;
}

.weekly-income-table {
  min-width: 52rem;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.weekly-income-table th,
.weekly-income-table td {
  padding: 0.4rem 0.3rem;
  white-space: nowrap;
}

.weekly-income-table .roll-badge {
  min-width: 3.75rem;
  padding: 0.15rem 0.3rem;
}

.weekly-income-table .weekly-income-group-end {
  border-right: 2px solid var(--line);
}

.weekly-income-table thead tr:first-child th {
  border-bottom-color: transparent;
}

.weekly-income-week {
  text-align: left;
}

.weekly-income-week small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-weight: 400;
}

.weekly-income-date-note {
  margin-top: 0;
  color: var(--muted);
}

.weekly-income-total-row > th,
.weekly-income-total-row > td {
  background: #f8fafc;
  border-top: 2px solid var(--line);
  font-weight: 700;
}

.ticker-classifications-table {
  width: auto;
  min-width: min(100%, 24rem);
}

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

.monitor-shell {
  max-width: 100%;
}

.prompt-workspace-shell {
  max-width: 1480px;
}

.prompt-workspace-hero {
  margin-bottom: 0.9rem;
}

.prompt-workspace-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.prompt-workspace-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: end;
  padding: 0.7rem 0.75rem;
}

.prompt-workspace-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.monitor-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}


.account-monitor-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.account-monitor-title-row h2 {
  margin: 0;
}

.monitor-table th,
.monitor-table td {
  padding: 0.42rem 0.4rem;
  white-space: nowrap;
}

.monitor-table .table-subtext {
  margin-top: 0.08rem;
  font-size: 0.74rem;
}

.monitor-table .pill,
.monitor-table .strike-badge,
.monitor-table .exp-badge,
.monitor-table .roll-badge,
.monitor-table .pricing-status {
  padding: 0.16rem 0.42rem;
}

.monitor-table .inline-select,
.monitor-table .management-number-input {
  height: 1.75rem;
  border-radius: 6px;
}

.open-options-table .target-weeks-input {
  width: 2.75rem;
  max-width: 2.75rem;
}

.open-options-table thead tr:nth-child(2) th:nth-child(17),
.open-options-table tbody td:nth-child(17) {
  width: 2.9rem;
  white-space: nowrap;
}

.open-options-table .target-strike-input {
  width: 4.5rem;
}


.open-options-table .row-refresh-control {
  gap: 0.25rem;
}

.refresh-column-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: #475569;
}

.refresh-column-icon {
  width: 1rem;
  height: 1rem;
}

.monitor-table .button-compact {
  min-height: 1.75rem;
  padding: 0.22rem 0.55rem;
}

.account-prospect-add {
  align-self: end;
}

.account-prospect-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.account-prospect-form .management-text-input {
  width: 6.5rem;
}

.monitor-table tbody tr.candidate-prospect td {
  background: #eaf4ff;
}

.monitor-table tbody tr.candidate-prospect:hover td {
  background: #d9ecff;
}



.compact-review-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 0.5rem 2rem;
}

.compact-review-shell .compact-review-page-panel {
  border-radius: 18px;
  padding: 0.75rem;
}

.compact-review-shell .compact-review-page-panel > .panel-header {
  margin-bottom: 0.65rem;
}

.compact-review-shell .stack {
  display: grid;
  gap: 0.65rem;
}

.compact-review-shell .compact-review-panel {
  border-radius: 14px;
  padding: 0.6rem 0.65rem;
  margin-bottom: 0;
}

.compact-review-shell .compact-review-panel .panel-header {
  align-items: center;
  margin-bottom: 0.35rem;
}

.compact-review-shell .compact-review-panel h2 {
  font-size: 1.15rem;
}

.compact-review-shell .attribution-requirement {
  gap: 0.45rem;
  margin: 0.35rem 0 0.45rem;
}

.compact-review-shell .attribution-requirement > div {
  padding: 0.45rem 0.6rem;
}

.compact-review-shell .attribution-requirement strong {
  margin-top: 0.08rem;
  font-size: 1.05rem;
}

.strategy-attribution-choices {
  display: grid;
  gap: 0.5rem;
}

.strategy-attribution-choice {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
}

.strategy-attribution-choice:has(input:checked) {
  background: #eaf4ff;
  border-color: var(--accent);
}

.strategy-attribution-choice input {
  margin-top: 0.15rem;
}

.strategy-attribution-choice span {
  display: grid;
  gap: 0.15rem;
}

.strategy-attribution-choice small {
  color: var(--muted);
}

.compact-review-shell .compact-table-wrap {
  padding-top: 0;
  padding-bottom: 0.45rem;
}

.compact-review-shell .compact-detail-table th,
.compact-review-shell .compact-detail-table td,
.compact-review-shell .compact-review-table th,
.compact-review-shell .compact-review-table td {
  padding: 0.34rem 0.45rem;
  white-space: nowrap;
}

.compact-review-shell .compact-review-table input[type="checkbox"] {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--accent);
}

.compact-review-shell .inline-actions {
  margin-top: 0.35rem;
}

.compact-monitor-shell.dashboard-shell {
  padding-top: 1rem;
}

.compact-monitor-shell .detail-hero {
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.compact-monitor-shell .hero-copy {
  margin: 0.35rem 0 0;
  font-size: 1rem;
}

.compact-monitor-shell .summary-grid {
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.compact-monitor-shell .summary-card {
  border-radius: 14px;
  padding: 0.65rem 0.8rem;
}

.compact-monitor-shell .summary-card strong {
  margin-top: 0.15rem;
  font-size: 1.35rem;
}

.compact-monitor-shell .market-health {
  margin: -0.1rem 0 0.85rem;
  padding: 0.55rem 0.75rem;
}

.compact-monitor-shell .compact-filter-panel,
.compact-monitor-shell .account-monitor-section {
  border-radius: 18px;
  padding: 0.6rem 0.55rem;
  margin-bottom: 0.85rem;
}

.compact-monitor-shell .compact-filter-panel .panel-header,
.compact-monitor-shell .account-monitor-section .panel-header {
  margin-bottom: 0.35rem;
}

.compact-monitor-shell .compact-monitor-table-wrap {
  padding-top: 0;
  padding-bottom: 1rem;
}

.compact-monitor-shell .monitor-table th,
.compact-monitor-shell .monitor-table td {
  padding: 0.34rem 0.35rem;
}

.compact-monitor-shell .monitor-table thead tr:first-child th {
  padding-top: 0.3rem;
  padding-bottom: 0.25rem;
}

.management-text-input {
  width: min(32rem, 100%);
  min-height: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.22rem 0.5rem;
  font: inherit;
}

.stock-price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 4.5rem;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  text-align: right;
}

.stock-price-badge-itm {
  background: #dcfce7;
  color: #166534;
}

.stock-price-badge-otm {
  background: #fee2e2;
  color: #991b1b;
}

.itm-urgent-badge {
  display: inline;
  margin-right: 0.12rem;
  padding: 0;
  border: 0;
  color: #92400e;
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1;
  vertical-align: super;
}


.ticker-category-section {
  margin-top: 1.25rem;
}

.compact-panel-header {
  margin-bottom: 0.5rem;
}

.compact-panel-header h3 {
  margin: 0;
  font-size: 1rem;
}

.inline-date-input,
.inline-select-input,
.inline-symbol-input {
  max-width: 9.5rem;
  min-height: 2rem;
  padding: 0.25rem 0.35rem;
  font: inherit;
}

.inline-symbol-input {
  max-width: 6rem;
  text-transform: uppercase;
}

.ticker-event-symbol {
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.prompt-workspace-section {
  border-radius: 18px;
}

.prompt-workspace-header {
  align-items: center;
  margin-bottom: 0.55rem;
}

.prompt-workspace-header h2 {
  font-size: 1.45rem;
}

.prompt-workspace-table-wrap {
  padding-top: 0;
  padding-bottom: 0.75rem;
}

.prompt-workspace-table th,
.prompt-workspace-table td {
  padding: 0.45rem 0.45rem;
}

.prompt-workspace-table .pill {
  padding: 0.25rem 0.55rem;
}

.prompt-setting-select {
  min-width: 6.6rem;
  height: 1.75rem;
  border-radius: 6px;
}

.monitor-table thead tr:first-child th {
  padding-top: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.monitor-table thead tr:nth-child(2) th {
  padding-top: 0.35rem;
}

.monitor-table thead tr:first-child th + th {
  border-left: 2px solid rgba(17, 94, 89, 0.14);
}

.open-options-table thead tr:nth-child(2) th:nth-child(2),
.open-options-table thead tr:nth-child(2) th:nth-child(9),
.open-options-table thead tr:nth-child(2) th:nth-child(11),
.open-options-table thead tr:nth-child(2) th:nth-child(14),
.open-options-table thead tr:nth-child(2) th:nth-child(20),
.open-options-table tbody td:nth-child(2),
.open-options-table tbody td:nth-child(9),
.open-options-table tbody td:nth-child(11),
.open-options-table tbody td:nth-child(14),
.open-options-table tbody td:nth-child(20) {
  border-left: 2px solid rgba(17, 94, 89, 0.14);
}

.uncovered-lots-table thead tr:nth-child(2) th:nth-child(2),
.uncovered-lots-table thead tr:nth-child(2) th:nth-child(9),
.uncovered-lots-table thead tr:nth-child(2) th:nth-child(12),
.uncovered-lots-table thead tr:nth-child(2) th:nth-child(14),
.uncovered-lots-table thead tr:nth-child(2) th:nth-child(18),
.uncovered-lots-table tbody td:nth-child(2),
.uncovered-lots-table tbody td:nth-child(9),
.uncovered-lots-table tbody td:nth-child(12),
.uncovered-lots-table tbody td:nth-child(14),
.uncovered-lots-table tbody td:nth-child(18) {
  border-left: 2px solid rgba(17, 94, 89, 0.14);
}

td.numeric-cell,
th.numeric-cell {
  text-align: right;
}

.dashboard-accounts-table .dashboard-account-meta-cell {
  text-align: right;
}

.prompt-workspace-table thead tr:nth-child(2) th:nth-child(3),
.prompt-workspace-table thead tr:nth-child(2) th:nth-child(10),
.prompt-workspace-table thead tr:nth-child(2) th:nth-child(14),
.prompt-workspace-table tbody td:nth-child(3),
.prompt-workspace-table tbody td:nth-child(10),
.prompt-workspace-table tbody td:nth-child(14) {
  border-left: 2px solid rgba(17, 94, 89, 0.14);
}

.monitor-table th:first-child,
.monitor-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 8px 0 16px rgba(23, 32, 51, 0.08);
  overflow: visible;
}

.monitor-table th:first-child {
  z-index: 2;
}

.watch-row {
  background: rgba(255, 237, 213, 0.48);
}

.watch-row td:first-child {
  background: rgba(255, 247, 237, 0.98);
}

.candidate-needs-target {
  background: rgba(239, 246, 255, 0.62);
}

.candidate-needs-target td:first-child {
  background: rgba(247, 251, 255, 0.98);
}

.button-compact {
  padding: 0.35rem 0.7rem;
  min-height: 2rem;
}

.inline-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.grouping-hidden-form {
  display: none;
}

.grouping-header-band {
  width: 2.25rem;
  min-width: 2.25rem;
  padding: 0;
}

.grouping-header-cell {
  width: 2.25rem;
  min-width: 2.25rem;
  padding: 0.25rem;
  text-align: center;
}

.grouping-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.grouping-action-button {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-color: #cbd5e1;
  color: #475569;
}

.grouping-action-button:hover {
  border-color: #94a3b8;
  color: var(--ink);
  background: #f8fafc;
}

.grouping-action-icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.inline-select-form {
  margin: 0;
}

.inline-select {
  min-width: 7.5rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.inline-select.refresh-policy-select {
  min-width: 4.5rem;
}

.monitor-table .prospect-type-select {
  appearance: none;
  -webkit-appearance: none;
  width: 1.45rem;
  min-width: 1.45rem;
  max-width: 1.45rem;
  height: 1.65rem;
  padding: 0;
  text-align: center;
  text-align-last: center;
  background-image: none;
}


.monitor-table .prospect-quantity-input {
  width: 2.2rem;
  min-width: 2.2rem;
  max-width: 2.2rem;
  height: 1.65rem;
  padding-left: 0.18rem;
  padding-right: 0.08rem;
}

.row-refresh-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.row-refresh-spinner {
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid rgba(17, 24, 39, 0.18);
  border-top-color: #0f766e;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
}

.monitor-table tbody tr.row-refreshing .row-refresh-spinner {
  opacity: 1;
  animation: row-refresh-spin 0.75s linear infinite;
}

@keyframes row-refresh-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.row-update-cell {
  animation: row-update-flash 1.8s ease-out;
}

.cell-update-flash {
  display: inline-block;
  border-radius: 6px;
  animation: row-update-flash 1.8s ease-out;
}

@keyframes row-update-flash {
  0% {
    background: #fde68a;
    box-shadow: inset 0 0 0 999px rgba(253, 230, 138, 0.85);
  }

  35% {
    background: #fef3c7;
    box-shadow: inset 0 0 0 999px rgba(253, 230, 138, 0.45);
  }

  100% {
    background: transparent;
    box-shadow: inset 0 0 0 999px rgba(253, 230, 138, 0);
  }
}

.account-import-form {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.account-import-name,
.account-import-lookback,
.account-sort-order {
  width: min(100%, 18rem);
  height: 2rem;
  padding: 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.account-import-start-date {
  width: 7rem;
}

.account-sort-order {
  width: 5rem;
}

.import-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  margin-right: 0.5rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.import-status-imported {
  background: #dcfce7;
  color: #166534;
}

.import-status-new {
  background: #eef2f7;
  color: var(--muted);
}

.exp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}

.exp-badge-urgent {
  background: #fee2e2;
  color: #991b1b;
}

.exp-badge-soon {
  background: #fef3c7;
  color: #92400e;
}

.exp-badge-safe {
  background: #dcfce7;
  color: #166534;
}

.strike-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.strike-badge-recovery {
  background: #ede9fe;
  color: #6d28d9;
}

.roll-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}

.roll-badge-3 {
  background: #14532d;
  color: #ecfdf5;
}

.roll-badge-2 {
  background: #166534;
  color: #ecfdf5;
}

.roll-badge-1 {
  background: #dcfce7;
  color: #166534;
}

.roll-badge-warn {
  background: #f4c430;
  color: #3f2f00;
}

.roll-badge-low {
  background: #fee2e2;
  color: #b91c1c;
}

.roll-badge-negative {
  background: #991b1b;
  color: #fef2f2;
}

.roll-target-cell {
  position: relative;
}

.roll-target-cell:hover,
.roll-target-cell:focus-within {
  z-index: 30;
}

.premium-cell {
  position: relative;
}

.premium-cell:hover,
.premium-cell:focus-within,
.premium-cell.premium-popover-open {
  z-index: 30;
}

.premium-value {
  display: inline-block;
}

.premium-popover {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 40;
  display: none;
  min-width: 26rem;
  max-width: min(32rem, calc(100vw - 1rem));
  max-height: min(24rem, calc(100vh - 1rem));
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.16);
}

.premium-popover-floating {
  position: fixed;
  z-index: 200;
  display: block;
}

.premium-cell:hover .premium-popover,
.premium-cell:focus-within .premium-popover,
.premium-cell.premium-popover-open .premium-popover {
  display: block;
}

.premium-popover-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.premium-popover-list {
  display: grid;
  gap: 0.3rem;
}

.premium-popover-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) 4.5rem 4.5rem 4.5rem;
  gap: 0.75rem;
  align-items: baseline;
}

.premium-popover-row > span:not(:first-child) {
  border-left: 1px solid rgba(17, 94, 89, 0.16);
  padding-left: 0.75rem;
}

.premium-row-label {
  color: var(--ink);
}

.premium-positive {
  color: #166534;
}

.premium-negative {
  color: #b91c1c;
}

.roll-target-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pricing-age-cell {
  min-width: 3.25rem;
  text-align: right;
  white-space: nowrap;
}

.pricing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.pricing-status-fresh {
  background: #dcfce7;
  color: #166534;
}

.pricing-status-recent {
  background: #ffedd5;
  color: #9a3412;
}

.pricing-status-stale {
  background: #fee2e2;
  color: #991b1b;
}

.pricing-status-empty,
.pricing-status-off {
  background: #f1f5f9;
  color: var(--muted);
}

.market-health {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.25rem 0 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.market-health-title {
  color: var(--ink);
  font-size: 0.95rem;
}

.market-health-copy {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: right;
}

.market-health-fresh {
  border-left-color: #16a34a;
}

.market-health-recent {
  border-left-color: #f97316;
}

.market-health-stale {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.market-health-error {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.market-health-scheduler-stale {
  border-left-color: #f97316;
  background: #fff7ed;
}

.market-health-closed {
  border-left-color: #64748b;
  background: #f8fafc;
}

.market-health-empty,
.market-health-off {
  border-left-color: #94a3b8;
  background: #f8fafc;
}

.market-health-account {
  margin: 0.35rem 0 0.75rem;
  box-shadow: none;
}

.market-health-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  min-height: 1.65rem;
  padding: 0.18rem 0.5rem;
  border-left-width: 3px;
  border-radius: 999px;
  box-shadow: none;
  white-space: nowrap;
}

.market-health-compact .market-health-title {
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.compact-monitor-shell .market-health.market-health-compact {
  margin: 0;
  padding: 0.18rem 0.5rem;
}

.roll-target-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  display: none;
  min-width: 16rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.16);
}

.monitor-table tbody tr:nth-last-child(-n + 3) .roll-target-popover {
  top: auto;
  bottom: 100%;
}

.monitor-table tbody tr:first-child .roll-target-popover {
  top: 100%;
  bottom: auto;
}

.roll-target-cell:hover .roll-target-popover,
.roll-target-cell:focus-within .roll-target-popover {
  display: block;
}

.roll-target-popover-head {
  margin-bottom: 0.5rem;
}

.roll-target-form {
  display: grid;
  grid-template-columns: 4.25rem 5.5rem auto;
  gap: 0.55rem;
  align-items: end;
}

.roll-target-form label {
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.roll-target-input {
  width: 100%;
  max-width: 5.5rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.option-candidate-strike-input {
  width: 5rem;
  max-width: 5rem;
}

.option-candidate-expiration-input {
  width: 8.1rem;
  min-width: 8.1rem;
  max-width: 8.1rem;
}


.option-candidate-expiration-input option {
  background: white;
  color: var(--ink);
}

.option-candidate-expiration-input-stale {
  border-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

.option-candidate-expiration-input-future {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.earnings-crossing-expiration {
  color: #991b1b;
  font-weight: 700;
}

.option-candidate-expiration-input.earnings-crossing-expiration {
  border-color: #7f1d1d;
  background: #7f1d1d;
  color: #fff7ed;
}

.option-candidate-expiration-input.earnings-crossing-expiration option {
  background: white;
  color: var(--ink);
}


.strike-target-input-recovery {
  border-color: #c4b5fd;
  background: #ede9fe;
  color: #6d28d9;
}

.roll-target-form .button {
  width: auto;
  white-space: nowrap;
}

.management-number-input {
  width: 100%;
  max-width: 5.5rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.target-weeks-input {
  width: 4.25rem;
}

.management-number-input.roll-target-input-forecast {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #92400e;
}

.target-strike-input {
  width: 5.5rem;
}

.prompt-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.prompt-status-fresh {
  background: #dcfce7;
  color: #166534;
}

.prompt-status-recent {
  background: #ffedd5;
  color: #9a3412;
}

.prompt-status-stale {
  background: #e5e7eb;
  color: #4b5563;
}

.recommendation-row td {
  background: #f8fafc;
  color: var(--muted);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.recommendation-row strong {
  color: var(--text);
  margin-right: 0.5rem;
}

.recommendation-row p {
  margin: 0.35rem 0 0;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.icon-button[data-copied="true"] {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.icon-button[hidden] {
  display: none;
}

.prospect-delete-button {
  width: 1.75rem;
  height: 1.75rem;
  color: #b91c1c;
  background: #fff1f2;
  border-color: #fecaca;
}

.prospect-delete-button:hover {
  color: #991b1b;
  background: #ffe4e6;
  border-color: #fca5a5;
}

.prospect-delete-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
}

.prompt-textarea-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.prompt-output {
  width: 100%;
  min-height: 28rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.table-subtext {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

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

.prompt-action-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.prompt-inline-form {
  margin: 0;
}

.prompt-inline-status {
  color: var(--muted);
  font-size: 0.8rem;
}

.debug-output {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

.recommendation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.recommendation-card {
  border-radius: 22px;
  padding: 1rem;
}

.recommendation-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pill,
.confidence {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
}

.pill {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill-neutral {
  background: #eef2f7;
  color: var(--muted);
}

.confidence-high {
  background: #fee2e2;
  color: #991b1b;
}

.confidence-medium {
  background: #ffedd5;
  color: var(--warn);
}

.confidence-low {
  background: #e0f2fe;
  color: #075985;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

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

@media (max-width: 800px) {
  .app-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.55rem;
  }

  .app-brand {
    display: inline-flex;
    min-width: auto;
  }

  .app-nav {
    flex: 1 1 100%;
    gap: 0.2rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .app-nav-menu {
    position: static;
  }

  .app-nav-links {
    position: fixed;
    top: 6.25rem;
    left: 0.55rem;
    right: 0.55rem;
    min-width: 0;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions form {
    flex: 1;
  }

  .button {
    width: 100%;
  }
}

.account-label-with-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.account-transaction-notice-badge,
.account-transaction-notice-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.account-transaction-notice-badge {
  background: #d7efe7;
  color: #0f3f3b;
}

.account-transaction-notice-badge:hover {
  background: #b8dfd2;
}

.account-transaction-notice-warning {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: var(--warn);
}

.account-transaction-notice-warning:hover {
  background: #ffedd5;
}

.account-transaction-notice-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(780px, calc(100vw - 2rem));
  max-height: min(760px, calc(100vh - 2rem));
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  box-shadow: 0 26px 70px rgba(23, 32, 51, 0.24);
  transform: translate(-50%, -50%);
  z-index: 80;
}

.account-transaction-notice-panel {
  display: grid;
  gap: 1rem;
  max-height: inherit;
  padding: 1rem;
  overflow: auto;
}

.account-transaction-notice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.account-transaction-notice-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.account-transaction-notice-header span,
.account-transaction-notice-summary {
  color: var(--muted);
}

.account-transaction-notice-close {
  width: 1.8rem;
  height: 1.8rem;
}

.account-transaction-notice-summary,
.account-transaction-notice-error {
  margin: 0;
}

.account-transaction-notice-error {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 0.75rem;
  background: #fff7ed;
  color: var(--warn);
}

.account-transaction-notice-table-wrap {
  max-height: 22rem;
}

.account-transaction-notice-table td,
.account-transaction-notice-table th {
  white-space: nowrap;
}

.account-transaction-notice-table td:nth-child(4) {
  min-width: 16rem;
  white-space: normal;
}

.account-transaction-notice-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.page-shell {
  display: grid;
  gap: 1rem;
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
}

.content-section {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #ffffff;
}

.alert-target-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.25rem;
  min-height: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.alert-target-button:hover,
.alert-target-button.has-alerts {
  border-color: #94c9bd;
  background: #edf8f5;
}

.alert-target-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(1120px, calc(100vw - 2rem));
  max-height: min(760px, calc(100vh - 2rem));
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  box-shadow: 0 26px 70px rgba(23, 32, 51, 0.24);
  transform: translate(-50%, -50%);
  z-index: 90;
}

.alert-target-panel {
  display: grid;
  gap: 1rem;
  max-height: inherit;
  padding: 1rem;
  overflow: auto;
}

.alert-target-header,
.alert-target-actions,
.notification-actions,
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.alert-target-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.alert-target-header h3,
.section-heading-row h2 {
  margin: 0;
}

.alert-target-header span,
.muted-text {
  color: var(--muted);
}

.alert-target-list,
.stack-list {
  display: grid;
  gap: 0.5rem;
}

.alert-target-row,
.alert-target-form,
.stack-list-row {
  display: grid;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  background: #ffffff;
}

.alert-target-row {
  grid-template-columns: minmax(7rem, 1fr) minmax(8rem, 1fr) minmax(5rem, 0.8fr) minmax(6rem, 0.8fr) minmax(8rem, 1fr) auto;
  align-items: center;
}

.alert-target-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  background: #f8fafc;
}

.alert-target-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.alert-target-form input,
.alert-target-form select,
.alert-target-row input,
.alert-target-row select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font: inherit;
}

.compact-button {
  min-height: 1.75rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  text-decoration: none;
}

.alert-target-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.alert-target-actions form {
  margin: 0;
}

.notification-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.form-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #991b1b;
}

@media (max-width: 800px) {
  .alert-target-row,
  .alert-target-form {
    grid-template-columns: 1fr;
  }

  .alert-target-actions {
    flex-wrap: wrap;
    white-space: normal;
  }
}

.long-term-settings-form {
  margin-top: 1rem;
}

.positive-value {
  color: #047857;
}

.negative-value {
  color: #b91c1c;
}

.long-term-holdings-table tr.needs-refresh td {
  background: #fff7ed;
}

.long-term-account-holdings {
  display: grid;
  gap: 1.5rem;
}

.long-term-account-holding-section {
  display: grid;
  gap: 0.75rem;
}


.assignment-action-notice {
  display: block;
  margin-top: 0.3rem;
  color: var(--warn);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
}

.scanner-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.scanner-source-list .pill {
  text-decoration: none;
  white-space: nowrap;
}

.scanner-source-metadata {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.25rem;
}

.scanner-universe-table td:nth-child(2) {
  min-width: 16rem;
}

.scanner-symbol-picker {
  display: grid;
  gap: 1rem;
}

.scanner-symbol-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.scanner-symbol-option {
  align-items: center;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent));
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
}

.scanner-metric-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.scanner-metric-grid > div {
  background: color-mix(in srgb, var(--panel) 94%, var(--accent));
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
}

.scanner-metric-grid span,
.scanner-metric-grid small {
  color: var(--muted);
}

.scanner-metric-grid strong {
  font-size: 1.15rem;
}

.scanner-warning,
.scanner-error {
  color: var(--warning-text, #8a4b08);
}

.scanner-error {
  font-size: 0.9rem;
}

.scanner-faq {
  max-width: 72rem;
}

.scanner-faq-index {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.scanner-faq-section {
  scroll-margin-top: 5.5rem;
}

.scanner-faq-section > p,
.scanner-faq-section > ol {
  line-height: 1.6;
  max-width: 64rem;
}

.scanner-faq-definitions {
  display: grid;
  gap: 0;
  margin-bottom: 0;
}

.scanner-faq-definitions > div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.4rem 1.25rem;
  grid-template-columns: minmax(10rem, 0.3fr) minmax(0, 1fr);
  padding: 0.9rem 0;
}

.scanner-faq-definitions dt {
  font-weight: 700;
}

.scanner-faq-definitions dd {
  line-height: 1.5;
  margin: 0;
}

.scanner-faq-note {
  background: var(--accent-soft);
  border-radius: 0.65rem;
  padding: 0.8rem 1rem;
}

@media (max-width: 700px) {
  .scanner-faq-definitions > div {
    grid-template-columns: 1fr;
  }
}

.scanner-dashboard-filters {
  margin-bottom: 1rem;
}

.scanner-dashboard-filter-toggle {
  align-items: center;
  grid-auto-flow: column;
  justify-content: start;
  padding-bottom: 0.55rem;
}

.scanner-dashboard-table {
  min-width: 92rem;
}

.scanner-dashboard-table th,
.scanner-dashboard-table td {
  vertical-align: middle;
}

.scanner-dashboard-table thead tr:first-child th[rowspan] {
  border-bottom: 1px solid var(--line);
}

.scanner-dashboard-row--failed td {
  background: color-mix(in srgb, var(--panel) 88%, #fee2e2);
}

.scanner-dashboard-row--failed td:first-child {
  background: color-mix(in srgb, white 90%, #fee2e2);
}

.scanner-dashboard-symbol small,
.scanner-dashboard-contract small,
.scanner-dashboard-signals > small {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.scanner-dashboard-contract {
  min-width: 12rem;
}

.scanner-dashboard-earnings-warning {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 999px;
  color: var(--warning-text, #8a4b08);
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.35rem;
  padding: 0.15rem 0.45rem;
}

.scanner-dashboard-signals {
  min-width: 18rem;
  white-space: normal !important;
}

.scanner-dashboard-signals ul {
  color: var(--warning-text, #8a4b08);
  display: grid;
  font-size: 0.76rem;
  gap: 0.15rem;
  line-height: 1.3;
  margin: 0.3rem 0 0;
  padding-left: 1rem;
}

.scanner-dashboard-clear {
  color: #047857;
  display: block;
  font-size: 0.76rem;
  margin-top: 0.3rem;
}

.scanner-score--green {
  background: #dcfce7;
}

.scanner-score--yellow {
  background: #fef3c7;
}

.scanner-score--red {
  background: #fee2e2;
}

.scanner-score strong {
  font-size: 1rem;
}

.scanner-score--combined strong {
  color: var(--accent);
  font-size: 1.1rem;
}

.paper-money-import-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.paper-money-import-form label {
  display: grid;
  gap: 0.35rem;
}

.strategy-table td > small {
  color: var(--muted);
  display: block;
  margin-top: 0.2rem;
}

.strategy-contracts details {
  min-width: 14rem;
}

.strategy-contracts summary {
  cursor: pointer;
  font-weight: 700;
}

.strategy-contract-line {
  display: block;
}

.strategy-attention-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.3rem;
}

.strategy-attention-list .pill {
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
}

.strategy-attention--profit {
  background: #dcfce7;
  color: #166534;
}

.strategy-attention--info {
  background: #e0f2fe;
  color: #075985;
}

.strategy-attention--warning {
  background: #fef3c7;
  color: #92400e;
}

.strategy-attention--danger {
  background: #fee2e2;
  color: #991b1b;
}

.strategy-attention--opportunity {
  background: #15803d;
  color: #fff;
}

.strategy-leg-table {
  margin-top: 0.6rem;
  min-width: 60rem;
}

.strategy-leg-table th,
.strategy-leg-table td {
  font-size: 0.75rem;
  padding: 0.4rem;
}

.strategy-decision-value {
  white-space: nowrap;
}

.strategy-inline-context {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.strategy-capture--low {
  background: #ecfdf5;
}

.strategy-capture--medium {
  background: #bbf7d0;
}

.strategy-capture--high {
  background: #86efac;
}

.strategy-loss--low {
  background: #fef2f2;
}

.strategy-loss--medium {
  background: #fecaca;
}

.strategy-loss--high {
  background: #fca5a5;
}

.stacked-table-heading {
  display: block;
}

.strategy-quote {
  white-space: nowrap;
}

.strategy-quote--live,
.strategy-quote--final {
  background: #dcfce7;
  color: #047857;
}

.strategy-quote--statement,
.strategy-quote--indicative,
.strategy-quote--wide {
  background: #fef3c7;
  color: #92400e;
}

.strategy-quote--stale,
.strategy-quote--missing {
  background: #fee2e2;
  color: #991b1b;
}

.pmcc-table {
  min-width: 74rem;
}

.pmcc-table > tbody > tr > td:nth-child(2) {
  min-width: 13rem;
}

.pmcc-campaign-row td {
  background: var(--panel);
  border-top: 2px solid var(--border);
  padding: 0.75rem;
}

.pmcc-campaign-row--winning td {
  background: #ecfdf5;
}

.pmcc-campaign-row--losing td {
  background: #fef2f2;
}

.pmcc-campaign-summary {
  align-items: center;
  display: grid;
  gap: 0.75rem 1.25rem;
  grid-template-columns: minmax(9rem, 1.2fr) repeat(4, minmax(8rem, 1fr)) auto;
}

.pmcc-campaign-identity,
.pmcc-campaign-metric,
.pmcc-campaign-quote {
  display: grid;
  gap: 0.15rem;
}

.pmcc-campaign-identity > strong {
  font-size: 1.15rem;
}

.pmcc-campaign-metric > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pmcc-campaign-summary small,
.pmcc-history small {
  color: var(--muted);
}

.pmcc-leg-row td {
  vertical-align: top;
}

.pmcc-table tr.pmcc-leg-row.pmcc-attention--warning > td {
  background: #fef3c7;
}

.pmcc-table tr.pmcc-leg-row.pmcc-attention--danger > td {
  background: #fee2e2;
}

.pmcc-table tr.pmcc-leg-row.pmcc-attention--opportunity > td {
  background: #ecfdf5;
}

.pmcc-short-recommendation {
  margin-top: 0.45rem;
}

.pmcc-short-recommendation--opportunity {
  align-items: flex-start;
  background: #dcfce7;
  border: 1px solid #22c55e;
  border-radius: 0.45rem;
  display: inline-flex;
  padding: 0.35rem;
}

.pmcc-short-recommendation--opportunity .pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
}

.pmcc-short-recommendation--missing {
  align-items: flex-start;
  background: #fefce8;
  border: 1px solid #ca8a04;
  border-radius: 0.45rem;
  display: inline-flex;
  padding: 0.35rem;
}

.pmcc-short-recommendation--missing .strategy-attention--warning {
  background: #a16207;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
}

.pmcc-leg-row--long td:first-child {
  border-left: 3px solid #2563eb;
}

.pmcc-leg-row--short td:first-child {
  border-left: 3px solid #7c3aed;
}

.pmcc-history {
  margin-top: 0.55rem;
}

.pmcc-history summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

.pmcc-history-table-wrap {
  margin: 0.6rem 0 0.35rem;
  overflow-x: auto;
}

.pmcc-history-table {
  min-width: 52rem;
  width: 100%;
}

.pmcc-history-table th,
.pmcc-history-table td {
  background: transparent;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  padding: 0.4rem;
}

@media (max-width: 900px) {
  .pmcc-campaign-summary {
    grid-template-columns: repeat(2, minmax(9rem, 1fr));
  }
}

.spread-management {
  margin-top: 0.4rem;
  max-width: 22rem;
}

.spread-management > strong,
.spread-management > small {
  display: block;
}

.spread-management summary {
  cursor: pointer;
  margin-top: 0.3rem;
}

.spread-management-metrics {
  display: grid;
  gap: 0.25rem;
  min-width: 18rem;
  font-size: 0.75rem;
}

.spread-management-metrics div {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.spread-management-metrics dt {
  color: var(--muted);
}

.spread-management-metrics dd {
  margin: 0;
  text-align: right;
}

.iron-condor-management {
  border-left: 3px solid var(--accent);
  margin-top: 0.45rem;
  padding: 0.35rem 0 0.35rem 0.65rem;
}

.iron-condor-management > summary {
  cursor: pointer;
  font-weight: 700;
}

.iron-condor-management > small {
  display: block;
}

.iron-condor-management .spread-management-metrics {
  margin: 0.35rem 0;
}

.iron-condor-warning {
  color: var(--danger, #b42318);
}

.health-summary-card { text-decoration: none; border-left: 4px solid currentColor; }
.health-state--attention { background: #fee2e2; color: #991b1b; }
.health-state--watch { background: #fef3c7; color: #92400e; }
.health-state--opportunity { background: #dbeafe; color: #1e40af; }
.health-state--healthy { background: #dcfce7; color: #166534; }
.health-text--attention { color: #991b1b; }
.health-text--watch { color: #92400e; }
.health-text--opportunity { color: #1e40af; }
.health-text--healthy { color: #166534; }
.health-dot { display: inline-block; flex-shrink: 0; width: 0.8rem; height: 0.8rem; border-radius: 50%; }
.health-dot--attention { background: #dc2626; }
.health-dot--watch { background: #eab308; }
.health-dot--opportunity { background: #2563eb; }
.health-dot--healthy { background: #16a34a; }
.health-filters input { width: 7rem; }
.health-filters input[type="submit"] { width: auto; }
.health-column-headings, .health-ticker-summary { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(10rem, 2fr) 4rem 6rem; align-items: center; gap: 0.75rem; }
.health-column-headings { color: var(--muted); text-transform: uppercase; font-size: 0.75rem; padding: 0 0.25rem 0.75rem; }
.health-column-headings span:nth-child(n+3) { text-align: right; }
.health-status-section { margin-top: 1.25rem; }
.health-status-heading { display: flex; gap: 0.5rem; align-items: center; font-size: 0.9rem; text-transform: uppercase; }
.health-status-description { color: var(--muted); font-size: 0.85rem; margin: 0.4rem 0 0.75rem; }
.health-ticker { border-bottom: 1px solid var(--line); }
.health-ticker-summary { padding: 0.8rem 0.25rem; cursor: pointer; list-style: none; }
.health-ticker-summary::-webkit-details-marker { display: none; }
.health-ticker-summary:hover, .health-ticker[open] > summary { background: #f8fafc; }
.health-ticker-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.health-position-cell { display: inline-flex; align-items: center; gap: 0.5rem; }
.health-contract-preview { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; color: var(--muted); font-size: 0.78rem; }
.health-ticker-summary > .numeric-cell { text-align: right; font-variant-numeric: tabular-nums; }
.health-ticker-detail { padding: 0.25rem 0.75rem 1rem; }
.health-position-context { color: var(--muted); font-size: 0.85rem; }
.health-contract { padding: 0.8rem 0; border-top: 1px solid var(--line); }
.health-contract-header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.health-contract-header > div > span { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.2rem; }
.health-reason { font-size: 0.85rem; line-height: 1.45; }
.health-contract-metrics { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0.5rem 0; }
.health-contract-metrics dt { color: var(--muted); font-size: 0.75rem; }
.health-contract-metrics dd { margin: 0.2rem 0 0; font-size: 0.85rem; }
.health-analyze-link { margin-top: 0.75rem; }
.dashboard-data-reviews > summary { cursor: pointer; font-weight: 600; }
.dashboard-data-reviews .summary-grid { margin-top: 1rem; }

@media (max-width: 760px) {
  .health-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-filters label { flex: 1 1 8rem; }
  .health-filters input, .health-filters select { width: 100%; min-width: 0; }
  .health-column-headings, .health-ticker-summary { grid-template-columns: minmax(4.5rem, 1fr) minmax(5rem, 1.5fr) 2.5rem 4.5rem; gap: 0.4rem; font-size: 0.8rem; }
  .health-contract-header { flex-wrap: wrap; gap: 0.5rem; }
  .health-account-section { padding: 0.8rem; }
}

.health-state--unassessed { background: #e5e7eb; color: #4b5563; }
.health-text--unassessed { color: #4b5563; }
.health-dot--unassessed { background: #6b7280; }

/* Compact monitoring rows; detailed calculations live on Analyze. */
.spread-overview-headings, .spread-overview-row {
  display: grid;
  grid-template-columns: minmax(9rem, 1.3fr) 6.5rem minmax(8rem, 1fr) 6rem minmax(10rem, 1.4fr) repeat(2, minmax(5.5rem, 0.8fr)) repeat(2, minmax(6.5rem, 0.9fr)) 5rem;
  align-items: start;
  gap: 0.6rem 0.65rem;
}
.spread-overview-headings { color: var(--muted); font-size: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.spread-overview-headings > span:nth-child(n+6) { text-align: right; }
.spread-overview-row { font-size: 0.95rem; line-height: 1.4; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.spread-overview-row:last-child { border-bottom: 0; }
.spread-overview-identity > span, .spread-structure > span, .spread-overview-guidance > span { display: block; }
.spread-overview-identity > span, .spread-structure, .spread-overview-guidance > span { color: var(--muted); font-size: 0.8rem; margin-top: 0.3rem; }
.spread-overview-guidance .pill { white-space: normal; font-size: 0.8rem; font-weight: 400; }
.spread-overview-value { text-align: right; font-variant-numeric: tabular-nums; }
.spread-overview-quote { grid-column: 1 / -1; margin: 0; font-size: 0.72rem; color: var(--muted); }
.spread-analysis-totals { gap: 1rem 2rem; }
.spread-analysis-totals dd { font-size: 1.25rem; font-weight: 700; }
.spread-wing-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.spread-analysis-wing { scroll-margin-top: 1rem; }
.spread-analysis-wing .spread-management > small { display: block; margin: 0.4rem 0; }
@media (max-width: 1280px) {
  .spread-overview-headings { display: none; }
  .spread-overview-row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .spread-overview-identity { grid-column: 1 / 7; grid-row: 1; }
  .spread-overview-guidance { grid-column: 7 / -1; grid-row: 1; }
  .spread-overview-context { grid-column: span 4; }
  .spread-overview-value { grid-column: span 3; text-align: left; }
  .spread-overview-context::before, .spread-overview-value::before { content: attr(data-label); display: block; color: var(--muted); font-size: 0.75rem; margin-bottom: 0.25rem; }
  .spread-analyze-link { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 600px) {
  .spread-overview-identity, .spread-overview-guidance { grid-column: 1 / -1; grid-row: auto; }
  .spread-overview-value { grid-column: span 6; font-size: 0.95rem; }
}
.spread-overview-guidance .pill-warning { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.spread-expiration { display: flex; flex-direction: column; gap: 0.3rem; margin: 0; }
.spread-expiration > strong { font-size: 1.25rem; line-height: 1.2; color: var(--ink); }
.spread-expiration > strong > span { font-size: 0.8rem; }
.spread-expiration time { font-size: 0.8rem; font-weight: 400; }
.spread-structure > .spread-strike-comparison { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.75rem; margin-top: 0.4rem; }
.spread-strike-comparison > strong, .spread-strike-comparison > span { color: var(--ink); font-size: 0.95rem; }
.spread-strike-distance { flex-basis: 100%; font-size: 0.75rem; }
.spread-strike-status { display: block; padding: 0.4rem 0.5rem; margin-bottom: 0.5rem; border-radius: 8px; border: 1px solid; font-size: 0.8rem; font-weight: 400; letter-spacing: normal; }
.spread-strike-status--outside { background: #ecfdf5; color: #065f46; border-color: #6ee7b7; }
.spread-strike-status--breached, .spread-strike-status--at_strike { background: #fef2f2; color: #991b1b; border-color: #f87171; }
.spread-strike-status--watch { background: #fffbeb; color: #92400e; border-color: #fbbf24; }
.spread-strike-status--unknown { background: #f3f4f6; color: #4b5563; border-color: #d1d5db; }
.spread-overview-value > small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 0.3rem; }

.spread-overview-price > strong, .spread-overview-value > strong, .spread-overview-strikes .spread-strike-comparison > strong { font-size: 0.95rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.spread-overview-strikes .spread-structure { margin-top: 0; }
.spread-overview-strikes .spread-strike-comparison { margin-top: 0; }

.spread-overview-identity > span:empty { margin: 0; }

.spread-overview-pnl[data-pnl-state="profit"] > strong { color: #047857; }
.spread-overview-pnl[data-pnl-state="loss"] > strong { color: #b91c1c; }
.spread-overview-pnl[data-pnl-state="flat"] > strong { color: var(--ink); }
.spread-capture-track { position: relative; height: 0.5rem; margin-top: 0.5rem; border-radius: 4px; background: #e2e8f0; }
.spread-capture-fill { display: block; height: 100%; border-radius: inherit; background: #64748b; }
.spread-capture-track--checkpoint .spread-capture-fill { background: #047857; }
.spread-capture-checkpoint { position: absolute; top: -0.2rem; bottom: -0.2rem; width: 2px; background: #334155; }
.spread-overview-capture:has(.spread-capture-track--loss) > .spread-capture-percentage { color: #b91c1c; }
.spread-overview-capture:has(.spread-capture-track--checkpoint) > .spread-capture-percentage { color: #047857; }

/* Use the same action-column width in headers and rows to keep all tracks aligned. */
.spread-overview-pnl-heading, .spread-overview-capture-heading,
.spread-overview-pnl, .spread-overview-capture {
  min-width: 0;
  align-self: stretch;
  padding-inline: 0.5rem;
  border-inline-start: 1px solid var(--line);
  background: #f8fafc;
}
.spread-overview-pnl-heading, .spread-overview-capture-heading { font-weight: 700; }
.spread-overview-capture-heading, .spread-overview-capture { border-inline-end: 1px solid var(--line); }
.spread-overview-capture > small { overflow-wrap: anywhere; }

.candidate-management-actions { display: inline-flex; align-items: center; gap: 0.4rem; }
.candidate-exit-button img { width: 1.5rem; height: 1.5rem; object-fit: contain; mix-blend-mode: multiply; }
.candidate-exit-dialog { width: min(1040px, calc(100vw - 2rem)); box-sizing: border-box; overflow: auto; overscroll-behavior: contain; }
.candidate-exit-dialog > .alert-target-panel { max-height: none; overflow: visible; }
html:has(.candidate-exit-dialog[open]) { overflow: hidden; }
.candidate-exit-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 1.5rem; align-items: start; padding: 0.75rem 0; }
.candidate-exit-hero > div { display: grid; gap: 0.4rem; }
.candidate-exit-price { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; font-variant-numeric: tabular-nums; }
#exit-break-even { color: var(--ink); }
#exit-sell-price { color: #17665e; }
.candidate-apr-stepper { display: flex; align-items: center; gap: 0.4rem; }
.candidate-apr-stepper input { width: 5rem; min-width: 0; padding: 0.5rem; font: inherit; }
.candidate-exit-assumptions { margin: 0; }
.candidate-exit-pnl-comparison { grid-template-columns: minmax(0, 1fr); }
.candidate-exit-profit { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.45rem 0.65rem; margin: 0; border: 1px solid #79b39c; border-radius: 6px; background: #dff1e8; font-weight: 600; }
.candidate-exit-profit-loss { background: #fbe6e6; border-color: #cf8888; }
.candidate-exit-profit span { font-size: 0.85rem; }
.candidate-exit-profit strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.candidate-exit-totals { display: grid; gap: 0.5rem; margin: 0.5rem 0; }
.candidate-exit-totals > div { display: flex; justify-content: space-between; gap: 1rem; }
.candidate-exit-totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.candidate-exit-net { border-top: 1px solid var(--line); padding-top: 0.6rem; font-weight: 700; }
.candidate-exit-lots { padding-left: 1.2rem; }
.candidate-exit-lots li { margin: 0.4rem 0; }
.candidate-exit-history td { font-size: 0.85rem; }
@media (max-width: 850px) {
  .candidate-exit-hero { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .candidate-exit-hero > div:first-child { grid-column: 1 / -1; }
  .candidate-exit-pnl-comparison { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .candidate-exit-hero { grid-template-columns: 1fr; }
  .candidate-exit-pnl-comparison { grid-template-columns: 1fr; }
  .candidate-exit-totals > div { align-items: baseline; }
}
.candidate-exit-dialog::backdrop { background: rgba(23, 32, 51, 0.25); }
.candidate-exit-slider-panel { grid-column: 1 / -1; }
.candidate-exit-slider-track { padding-inline: 0.5rem; }
.candidate-exit-slider-track input { display: block; width: 100%; margin: 0.5rem 0 0; accent-color: #17665e; cursor: pointer; }
.candidate-exit-slider-track input:disabled { cursor: default; }
.candidate-exit-slider-markers { position: relative; height: 0.5rem; margin-inline: 0.5rem; }
.candidate-exit-slider-marker { position: absolute; top: 0; width: 3px; height: 0.5rem; transform: translateX(-50%); background: currentColor; }
.candidate-exit-slider-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.candidate-exit-slider-references { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.candidate-exit-slider-references > div { display: grid; gap: 0.2rem; border-top: 3px solid currentColor; padding-top: 0.4rem; }
.candidate-exit-slider-references strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.candidate-exit-slider-references small { color: var(--muted); }
.candidate-exit-reference-stock { color: #526277; }
.candidate-exit-reference-break-even { color: #17665e; }
.candidate-exit-reference-cost { color: #7951a1; }
.candidate-exit-slider-panel > p { margin: 0; }

.lot-roll-history-table th,
.lot-roll-history-table td { white-space: nowrap; vertical-align: middle; }
.lot-roll-history-table .lot-history-roll-link { margin-inline-start: 0.75rem; }

.candidate-exit-history-note { display: block; color: var(--muted); font-size: 0.75rem; }

.capital-summary-table th { vertical-align: bottom; }
.capital-summary-table thead th, .capital-dialog thead th { text-align: center; }
.capital-summary-table tr > :not(:last-child), .capital-dialog table tr > :not(:last-child) { border-right: 1px solid var(--line); }
.capital-summary-table tr > .capital-group-end { border-right: 3px solid var(--muted); }
.capital-summary-table tbody th { vertical-align: middle; font-weight: 500; }
.capital-summary-table .numeric-cell { white-space: nowrap; }
.capital-summary-table .capital-total { font-weight: 700; }
.capital-dialog { box-sizing: border-box; overflow: auto; overscroll-behavior: contain; }
.capital-dialog > .alert-target-panel { max-height: none; overflow: visible; }
html:has(.capital-dialog[open]) { overflow: hidden; }
.capital-dialog::backdrop { background: rgba(23, 32, 51, 0.25); }
.capital-dialog h2, .capital-dialog h3 { margin: 0; }
.capital-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; border-bottom: 1px solid var(--line); }
.capital-tabs a { padding: 0.75rem 0.25rem; text-decoration: none; border-bottom: 3px solid transparent; }
.capital-tabs a[aria-current="page"] { border-color: currentColor; font-weight: 700; }
.capital-tab-panel { display: grid; gap: 1rem; padding-top: 1rem; }
.capital-tab-panel p { margin: 0; }
.capital-account-update { border-top: 1px solid var(--line); padding-top: 1rem; }

.capital-summary-table .capital-gain, .capital-dialog .capital-gain { background-color: #e7f4ec; color: #176047; }
.capital-summary-table .capital-loss, .capital-dialog .capital-loss { background-color: #fbe6e6; color: #922a2a; }

/* Company analysis: concise assessments first, auditable evidence on demand. */
.company-research { max-width: 1280px; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; display: grid; gap: 22px; color: #202334; }
.company-research h1, .company-research h2, .company-research h3, .company-research p { margin: 0; }
.research-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 8px; }
.research-heading h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -1.3px; line-height: 1.2; margin: 7px 0; }
.research-heading p:not(.eyebrow) { font-size: 14px; color: var(--muted); }
.research-heading .eyebrow { font-size: 10px; color: #82733d; letter-spacing: 1.4px; }
.research-beta { color: #445b9a; background: #edf1fb; border-radius: 4px; padding: 3px 6px; margin-left: 8px; letter-spacing: .3px; }
.research-scope { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; border: 1px solid var(--line); background: #fff; padding: 12px 16px; border-radius: 9px; font-size: 12px; color: var(--muted); }
.research-scope strong { color: var(--ink); }
.research-scope a { margin-left: 12px; color: var(--accent); }
.research-search-icon { font-size: 24px; line-height: 1; }
.research-company, .research-assessment, .research-metric-card { background: #fff; border: 1px solid #e2e6e7; border-radius: 10px; box-shadow: 0 2px 6px rgba(25, 35, 45, .025); }
.research-company { padding: 24px; border-left: 3px solid #d3b95f; }
.research-company-top { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.research-identity { display: flex; gap: 16px; align-items: center; }
.research-monogram { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: #122d38; color: #fff; font-weight: 750; letter-spacing: -2px; }
.research-identity h2 { font-size: 22px; letter-spacing: -.6px; }
.research-identity p { font-size: 11px; color: var(--muted); margin: 5px 0 8px; }
.research-pill { display: inline-block; font-size: 10px; font-weight: 650; color: #526057; background: #edf3ef; border: 1px solid #dce7df; padding: 3px 8px; border-radius: 20px; }
.research-price { text-align: right; display: grid; gap: 5px; }
.research-price strong { font-size: clamp(20px, 2.5vw, 30px); letter-spacing: -1px; }
.research-price span { font-size: 11px; color: var(--muted); }
.research-company-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 22px 0 16px; border-top: 1px solid #edf0ef; padding-top: 20px; }
.research-company-facts dt { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.research-company-facts dd { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.research-company-facts small { font-size: 10px; color: var(--muted); }
.company-research .research-context { color: #687481; font-size: 11px; line-height: 1.6; }
.research-assessments { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.research-assessment { padding: 22px; border-left: 3px solid #b6c9ba; }
.research-assessment-hold { border-left-color: #acadb7; }
.research-assessment-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.research-assessment-heading h2 { font-size: 16px; letter-spacing: -.3px; margin-bottom: 7px; }
.research-assessment-symbol { flex-shrink: 0; width: 46px; height: 46px; display: grid; place-items: center; background: #eaf0eb; color: #486553; border-radius: 10px; font-size: 22px; font-weight: 650; }
.research-assessment-hold .research-assessment-symbol { background: #242638; color: #fff; font-size: 13px; }
.research-checklist { margin: 0; display: grid; gap: 13px; }
.research-checklist > div { display: grid; grid-template-columns: 105px 1fr; gap: 12px; font-size: 12px; line-height: 1.5; }
.research-checklist dt { font-weight: 700; }
.research-checklist dd { margin: 0; color: #687481; }
.company-research .research-card-footnote { font-size: 10px; color: #687481; margin-top: 18px; border-top: 1px solid #edf0ef; padding-top: 12px; }
.research-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin: 2px 0 14px; }
.research-section-heading h2 { font-size: 17px; letter-spacing: -.3px; }
.research-section-heading span { color: var(--muted); font-size: 10px; }
.research-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; }
.research-metric-card { padding: 18px; border-left: 3px solid #b0c9ba; min-width: 0; display: flex; flex-direction: column; }
.research-metric-card-missing { border-left-color: #d2c7aa; }
.research-metric-label { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 10px; }
.research-metric-label h3 { color: #596471; font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
.research-metric-label > span { font-size: 8px; color: #7b828c; white-space: nowrap; }
.research-metric-value { font-size: 27px; letter-spacing: -1px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.research-metric-card-missing .research-metric-value { font-size: 21px; color: #737783; letter-spacing: -.5px; }
.research-metric-card p { color: #73808a; font-size: 10px; line-height: 1.5; margin: 8px 0 14px; }
.research-metric-status { font-size: 9px; font-weight: 650; color: #506559; padding: 4px 7px; border: 1px solid #e0e9e3; border-radius: 5px; background: #f2f7f3; margin-top: auto; }
.research-metric-card-missing .research-metric-status { color: #7c7151; background: #faf8f1; border-color: #ece6d3; }
.research-evidence { border-top: 1px solid var(--line); padding: 18px 0; min-width: 0; }
.research-evidence > summary { cursor: pointer; font-size: 14px; font-weight: 650; padding: 6px 0; }
.research-evidence > summary span { font-size: 11px; font-weight: 400; color: var(--muted); display: block; margin: 7px 0 0 18px; }
.research-evidence[open] > .panel { margin-top: 20px; }
.research-evidence .panel { min-width: 0; }
.research-evidence code, .research-evidence pre { overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 900px) { .research-assessments { grid-template-columns: 1fr; } .research-company-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .research-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .company-research { gap: 16px; } .research-heading { flex-direction: column; align-items: start; } .research-company, .research-assessment { padding: 18px; } .research-company-top { flex-direction: column; } .research-price { text-align: left; } .research-metric-grid { grid-template-columns: 1fr; } .research-scope { flex-wrap: wrap; } .research-scope a { margin-left: 0; } .research-checklist > div { grid-template-columns: 85px 1fr; } .research-section-heading { flex-direction: column; gap: 5px; } }

/* Stock Analysis: primary facts first, detailed research on demand. */
.company-research { gap: 20px; }
.research-refresh-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.research-refresh-actions .button { font-size: 12px; padding: 10px 14px; }
.research-pinned-view { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border: 1px solid #e5dcc3; background: #fbf8ef; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #6f613f; }
.research-pinned-view a { color: #526b60; }
.research-inline-detail > summary { cursor: pointer; color: #52665e; }
.research-inline-detail > p { margin-top: 8px; font-size: 11px; line-height: 1.6; }
.research-overview .research-company-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.research-price .research-price-change { font-size: 12px; font-weight: 600; }
.research-price-change[data-direction="up"] { color: #17665e; }
.research-price-change[data-direction="down"] { color: #a23b3b; }
.research-year-range { display: flex; align-items: center; gap: 12px; margin: 20px 0 8px; font-size: 11px; color: #687481; font-variant-numeric: tabular-nums; }
.research-range-track { position: relative; flex: 1; height: 4px; background: #e9ece7; border-radius: 4px; }
.research-range-marker { position: absolute; width: 9px; height: 9px; top: -2.5px; border-radius: 50%; background: #283b3f; border: 2px solid white; box-shadow: 0 0 0 1px #bac3bd; transform: translateX(-50%); }
.research-disclosure { min-width: 0; background: #fff; border: 1px solid #e2e6e7; border-radius: 10px; }
.research-disclosure > summary { cursor: pointer; padding: 15px 20px; font-size: 13px; font-weight: 650; color: #34444c; }
.research-disclosure > summary span { margin-left: 10px; font-size: 11px; font-weight: 400; color: #687481; }
.research-disclosure[open] { padding-bottom: 16px; }
.research-disclosure[open] > summary { border-bottom: 1px solid #edf0ef; margin-bottom: 16px; }
.research-disclosure > .research-company { margin: 0 16px 16px; box-shadow: none; }
.research-disclosure > .ledger-filters { margin: 16px; }
.research-disclosure pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.research-additional-metrics { margin: 16px 0; }
.research-additional-metrics > .research-metric-grid { margin: 0 16px 12px; }
.research-additional-metrics > .research-context { margin: 12px 16px; }
.research-data-controls > .research-data-warning { margin: 12px 16px; }
.company-research .research-data-warning { border-left: 3px solid #c79237; background: #fff9e9; padding: 10px 12px; color: #795b26; font-size: 12px; }
.research-metric-grid { gap: 12px; }
.research-metric-card { padding: 16px; }
.research-kicker { color: #82733d; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 5px !important; }
.research-chart-ranges { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 12px; }
.research-chart-ranges a { font-size: 12px; text-decoration: none; color: #596773; padding: 7px 12px; border-radius: 6px; border: 1px solid transparent; }
.research-chart-ranges a[aria-current="page"] { background: #edf4ef; color: #155d51; border-color: #cfdfd3; font-weight: 700; }
.research-chart-ranges a:hover { background: #f1f4f2; }
.research-chart-ranges a:focus-visible, .research-disclosure > summary:focus-visible, .research-chart-data > summary:focus-visible { outline: 2px solid #17665e; outline-offset: 3px; }
.research-line-chart { display: block; width: 100%; height: auto; max-height: 310px; overflow: visible; }
.research-chart-axis { font-size: 11px; fill: #687481; font-family: inherit; }
.research-chart-grid { stroke: #e8ecea; stroke-width: 1; }
.research-chart-zero { stroke: #b7c4be; stroke-width: 1; stroke-dasharray: 4 4; }
.research-chart-line { fill: none; stroke: #247c70; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.research-chart-point { fill: #247c70; }
.research-chart-empty { padding: 40px 20px; color: #687481; font-size: 13px; text-align: center; background: #f8faf8; border: 1px dashed #d7e0d9; border-radius: 8px; }
.research-chart-data { margin-top: 14px; }
.research-chart-data > summary { cursor: pointer; font-size: 12px; color: #52665e; }
.research-chart-data .table-wrap { margin-top: 12px; max-height: 280px; overflow: auto; }
.research-history-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; }
.research-history-card { min-width: 0; background: white; border: 1px solid #e2e6e7; border-radius: 10px; padding: 18px 12px 14px; }
.research-history-card h3 { font-size: 13px; margin: 0 8px 12px; }
.research-history-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 8px 0; padding-top: 12px; border-top: 1px solid #edf0ef; }
.research-history-values dt { font-size: 10px; color: #687481; }
.research-history-values dd { margin: 4px 0 0; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.research-statements-intro { margin-bottom: 14px !important; }
.research-statements-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; margin-bottom: 12px; }
.research-statement { min-width: 0; background: #fff; border: 1px solid #e2e6e7; border-radius: 10px; overflow: hidden; }
.research-statement > summary { padding: 16px; cursor: pointer; font-size: 15px; font-weight: 700; }
.research-statement > summary > span { display: block; margin: 5px 0 0 16px; color: #687481; font-size: 10px; font-weight: 400; }
.research-statement-period { margin: 0 16px 12px; padding-top: 12px; border-top: 1px solid #edf0ef; color: #687481; font-size: 11px; }
.research-statement-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.research-statement-table th, .research-statement-table td { padding: 10px 14px; border-bottom: 1px solid #edf0ef; vertical-align: top; }
.research-statement-table th { width: 66%; text-align: left; font-weight: 400; }
.research-statement-table td { width: 34%; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.research-statement-total { background: #f5f8f5; }
.research-statement-total > td, .research-statement-total > th { font-weight: 700; }
.research-statement-group th { padding-top: 16px; color: #687481; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; }
.research-statement-explanation summary { cursor: pointer; line-height: 1.5; }
.research-statement-explanation p { margin-top: 9px; font-size: 11px; line-height: 1.6; font-weight: 400; color: #687481; overflow-wrap: anywhere; }
.research-statement-exact { color: #34444c !important; font-variant-numeric: tabular-nums; }
.research-statement-source { padding-top: 8px; border-top: 1px dotted #d9e2dc; }
.research-statement-check { margin: 12px 14px; padding: 10px; background: #f3f6f4; border: 1px solid #dfe7e1; border-radius: 6px; font-size: 11px; color: #52665e; }
.research-statement-check summary { cursor: pointer; font-weight: 600; }
.research-statement-check p { margin-top: 8px; line-height: 1.6; }
.research-statement-check[data-check-status="needs_review"] { color: #795b26; background: #fff9e9; border-color: #eadfc3; }
.research-statement-note { margin: 12px 14px 16px !important; }
.research-statement > summary:focus-visible, .research-statement-explanation summary:focus-visible, .research-statement-check summary:focus-visible { outline: 2px solid #17665e; outline-offset: -2px; }
.research-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .research-overview .research-company-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-history-grid { grid-template-columns: 1fr; }
  .research-statements-grid { grid-template-columns: 1fr; }
  .research-history-card .research-line-chart { max-height: 260px; }
}
@media (max-width: 560px) {
  .research-overview .research-company-facts { gap: 16px; }
  .research-refresh-actions { width: 100%; }
  .research-disclosure > summary { padding: 14px; }
  .research-disclosure > summary span { display: block; margin: 5px 0 0 16px; }
  .research-disclosure > .research-company { margin-inline: 8px; }
  .research-additional-metrics > .research-metric-grid { margin-inline: 8px; }
  .research-year-range { gap: 8px; }
  .research-price-chart .research-chart-axis { font-size: 22px; }
}

.lizard-link-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.lizard-link-form label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.lizard-link-form select { max-width: 100%; }
.lizard-link-form .button { justify-self: start; }
.lizard-summary nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lizard-component-link { font-size: 0.72rem; }

.lizard-evaluation-dialog { width: min(1200px, calc(100vw - 2rem)); max-height: calc(100dvh - 1rem); }
.lizard-evaluation-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 0.85rem; margin: 0.35rem 0; align-items: start; }
.lizard-evaluation-form label { display: grid; gap: 0.3rem; font-size: 0.85rem; }
.lizard-evaluation-form input, .lizard-evaluation-form select { width: 100%; min-width: 0; box-sizing: border-box; padding: 0.45rem; }
.lizard-payoff-table td:first-child { white-space: normal; min-width: 13rem; }
.lizard-evaluation-dialog .strategy-table th { text-align: center; }
.lizard-evaluation-dialog .strategy-table td { text-align: right; }
.lizard-evaluation-dialog > .alert-target-panel { gap: 0.6rem; padding: 0.8rem; }
.lizard-evaluation-dialog section > p { margin: 0.4rem 0; }
.lizard-evaluation-fields { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: minmax(6rem, 9rem) minmax(0, 1fr); gap: 0.65rem; align-items: end; }
.lizard-evaluation-contracts { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: end; }
.lizard-evaluation-contracts label { width: 7rem; max-width: 100%; }
.lizard-evaluation-contracts label:first-child { width: 13rem; }
.lizard-basic-summary { font-size: 0.85rem; }
.lizard-basic-summary p { margin: 0.35rem 0; }
.lizard-overview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr); gap: 0.85rem; align-items: start; margin: 0.75rem 0; }
.lizard-overview > .table-wrap { min-width: 0; padding-bottom: 0; }
.lizard-leg-table { font-size: 0.85rem; }
.lizard-leg-table th, .lizard-leg-table td { padding: 0.4rem; }
.lizard-evaluation-dialog .strategy-table th:not(:last-child), .lizard-evaluation-dialog .strategy-table td:not(:last-child) { border-right: 1px solid var(--line); }
.lizard-decision-grid { display: grid; gap: 0.4rem; }
.lizard-decision { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.4rem; align-items: center; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; }
.lizard-decision-pass { color: #176047; background: #f5faf7; }
.lizard-decision-fail { color: #922a2a; background: #fdf6f6; }
.lizard-check { font-size: 0.9rem; font-weight: 700; }
.lizard-decision-value { font-size: 1.15rem; line-height: 1.2; }
.lizard-decision-caption { grid-column: 1 / -1; font-size: 0.7rem; }
.lizard-key-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin: 0.45rem 0 0.65rem; }
.lizard-key-totals > div { padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: #f4f7fb; }
.lizard-key-totals dt { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.lizard-key-totals dd { margin: 0.15rem 0 0; font-weight: 800; font-size: 1.65rem; overflow-wrap: anywhere; }
.lizard-key-totals > div:first-child dd { color: #176047; }
.lizard-key-totals .lizard-loss-total dd { color: #922a2a; }
@media (max-width: 700px) {
  .lizard-evaluation-fields { grid-template-columns: minmax(0, 1fr) auto; }
  .lizard-strategy-action { grid-column: 1 / -1; grid-row: 2; }
  .lizard-evaluation-form { grid-template-columns: 1fr; }
  .lizard-evaluation-form > .lizard-summary-boxes { grid-column: 1; grid-row: 3; min-width: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lizard-overview { grid-template-columns: 1fr; }

  .lizard-key-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lizard-key-totals > div { padding: 0.65rem 0.5rem; }
  .lizard-key-totals dd { font-size: 1.25rem; }
}
.lizard-strategy-action { display: flex; gap: 0.4rem; align-items: end; min-width: 0; }
.lizard-strategy-action label { flex: 0 1 22rem; min-width: 0; }
.lizard-evaluation-form .lizard-evaluate-button { width: auto; flex-shrink: 0; padding: 0.28rem 0.55rem; font-size: 0.72rem; line-height: 1.3; min-height: 0; margin-bottom: 0.15rem; }
.lizard-stock-quote { align-self: stretch; align-content: center; display: grid; gap: 0.1rem; min-width: 10rem; padding: 0.45rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: #f4f7fb; text-align: right; }
.lizard-stock-quote-label { color: var(--muted); font-size: 0.72rem; }
.lizard-stock-quote-price { font-size: 1.8rem; line-height: 1.15; font-weight: 800; }
.lizard-stock-change { font-size: 0.8rem; color: var(--muted); }
.lizard-stock-change-up { color: #176047; }
.lizard-stock-change-down { color: #922a2a; }
.lizard-break-even-values { display: flex; align-items: baseline; gap: 0.4rem; }
.lizard-break-even-values > span:first-child { min-width: 0; }
.lizard-downside-cushion { flex-shrink: 0; font-size: 0.8rem; white-space: nowrap; color: #176047; }
.lizard-cushion-negative { color: #922a2a; }
.lizard-stock-symbol { font-size: 1.15rem; font-weight: 800; color: var(--ink); letter-spacing: 0.03em; }
.lizard-payoff-table td.lizard-payoff-gain { background: #e7f4ec; color: #176047; }
.lizard-payoff-table td.lizard-payoff-loss { background: #fbe6e6; color: #922a2a; }
.lizard-evaluation-dialog .lizard-payoff-table tr > :nth-child(3),
.lizard-evaluation-dialog .lizard-payoff-table tr > :nth-child(6) { border-left: 2px solid var(--muted); }
.lizard-evaluation-dialog .lizard-payoff-table tr > :nth-child(4),
.lizard-evaluation-dialog .lizard-payoff-table tr > :nth-child(7) { border-right: 2px solid var(--muted); }
.lizard-price-range { overflow-x: auto; margin: 0.35rem 0 0.5rem; }
.lizard-price-range svg { display: block; width: 100%; min-width: 760px; height: auto; font-family: inherit; }
.lizard-range-loss { fill: #f3c4c4; }
.lizard-range-neutral { fill: #e2e6ed; }
.lizard-range-profit { fill: #dceee2; }
.lizard-range-target { fill: #b5ddc3; }
.lizard-range-maximum { fill: #79bc95; }
.lizard-range-band-label { fill: #263c32; font-size: 11px; }
.lizard-range-tail { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.lizard-range-leader { fill: none; stroke: #a3adbb; stroke-width: 1; }
.lizard-range-tick { stroke: #556274; stroke-width: 1; }
.lizard-range-marker-label { fill: var(--muted); font-size: 11px; }
.lizard-range-marker-price { fill: var(--ink); font-size: 13px; font-weight: 700; }
.lizard-range-current line, .lizard-range-current circle { stroke: #2563eb; stroke-width: 2; fill: #2563eb; }
.lizard-range-current text { fill: #1d4ed8; font-size: 12px; font-weight: 750; }
.lizard-summary-boxes { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; display: flex; gap: 0.5rem; }
.lizard-contract-summary { display: grid; align-content: center; gap: 0.2rem; max-width: 12rem; padding: 0.45rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: #f4f7fb; font-size: 0.8rem; }
.lizard-contract-summary > strong { font-size: 0.9rem; }
.lizard-summary-dte { font-size: 1.1rem; }
.lizard-summary-boxes > .lizard-stock-quote { min-width: 0; }

/* Executed Lizard monitoring: whole trade first, component details second. */
.lizard-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.lizard-current-context { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.lizard-current-context small { color: var(--muted); }
.lizard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.lizard-metrics dt { color: var(--muted); font-size: .78rem; }
.lizard-metrics dd { margin: .35rem 0 0; font-size: 1.25rem; font-weight: 700; }
.lizard-primary-metric { border-left: 3px solid var(--accent, #466c56); padding-left: .75rem; }
.lizard-review-note, .lizard-basis-explanation { background: #f3f6f9; padding: .75rem 1rem; border-radius: 8px; font-size: .85rem; }
.lizard-link-panel summary { cursor: pointer; font-weight: 650; }
.lizard-monitor-payoff { display: block; width: 100%; max-height: 260px; }
.lizard-payoff-zero { stroke: #9aa7b3; stroke-width: 1; stroke-dasharray: 4 4; }
.lizard-payoff-line { fill: none; stroke: #287252; stroke-width: 3; stroke-linejoin: round; }
.lizard-payoff-label { fill: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .lizard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lizard-summary .panel-header { align-items: flex-start; flex-direction: column; gap: .75rem; }
}

.trade-investigation .investigation-warning { background: #fff5df; color: #725419; padding: 12px 16px; border-radius: 8px; }
.investigation-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.investigation-form label { display: grid; gap: 6px; font-size: 13px; }
.investigation-chart svg { width: 100%; min-width: 760px; display: block; }
.investigation-chart text { font: 11px system-ui, sans-serif; fill: #435361; }
.investigation-grid { stroke: #e4e9ed; }
.investigation-zone rect { fill: #40a876; fill-opacity: .14; stroke: #39855f; stroke-width: .7; }
.investigation-zone-supply rect { fill: #cd6b68; stroke: #b44c49; }
.investigation-zone .investigation-paz { fill-opacity: .04; stroke-dasharray: 4 3; }
.investigation-up { fill: #39855f; stroke: #39855f; }
.investigation-down { fill: #b44c49; stroke: #b44c49; }
.investigation-close { stroke: #586677; stroke-dasharray: 2 3; }
.investigation-strike { stroke: #3f6eb2; stroke-dasharray: 7 4; }
@media (max-width: 850px) { .investigation-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 550px) { .investigation-form { grid-template-columns: 1fr; } }

/* Evaluator: controls | zone ranges | trade details and quote. */
.lizard-evaluation-form { grid-template-columns: minmax(0, 1fr) max-content max-content; }
.lizard-evaluation-controls { grid-column: 1; grid-row: 1; display: grid; gap: 0.5rem; min-width: 0; }
.lizard-evaluation-fields { grid-template-columns: minmax(5rem, 6rem) minmax(0, 1fr); }
.lizard-technical-zones { grid-column: 2; grid-row: 1; align-self: start; min-width: 0; max-width: 12rem; padding: 0.4rem; border: 1px solid var(--line); border-radius: 6px; }
.lizard-technical-zones h4 { margin: 0 0 0.3rem; font-size: 0.8rem; }
.lizard-zone-provisional { color: #815c15; font-size: 0.65rem; font-weight: 500; }
.lizard-zone-note { margin: 0.3rem 0; color: var(--muted); font-size: 0.7rem; line-height: 1.4; }
.lizard-zone-table { font-size: 0.75rem; width: 100%; border-collapse: collapse; }
.lizard-zone-table th, .lizard-zone-table td { padding: 0.2rem; white-space: nowrap; }
.lizard-zone-table td { font-variant-numeric: tabular-nums; }
.lizard-zone-table th { text-align: left; }
.lizard-zone-evidence { margin-top: 0.35rem; font-size: 0.7rem; }
.lizard-zone-evidence pre { max-height: 200px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.lizard-range-zone { color: #25704a; }
.lizard-range-zone-supply { color: #a03939; }
.lizard-zone-boundary { fill: none; stroke: currentColor; stroke-width: 2; }
.lizard-zone-boundary-leader { fill: none; stroke: currentColor; stroke-width: 0.7; opacity: 0.65; }
.lizard-zone-boundary-label { fill: currentColor; font-size: 11px; font-weight: 650; }
.lizard-range-zone:focus { outline: 2px solid #2563eb; }
.lizard-range-current text { paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.lizard-evaluation-form > .lizard-summary-boxes { grid-column: 3; grid-row: 1; align-self: start; }
.lizard-contract-summary { max-width: 9rem; }
@media (max-width: 700px) {
  .lizard-evaluation-form { grid-template-columns: minmax(0, 1fr) max-content; }
  .lizard-evaluation-fields { grid-template-columns: minmax(0, 1fr); }
  .lizard-evaluation-form > .lizard-summary-boxes { grid-column: 1 / -1; grid-row: 2; min-width: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.lizard-decision-unavailable { color: var(--muted); background: #f4f7fb; }
.lizard-demand-check .lizard-decision-value { font-size: 1rem; }

.lizard-earnings-context { margin: .5rem 0; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 6px; font-size: .8rem; }
.lizard-earnings-warning { background: #fff5df; border-color: #d8b66b; color: #725419; }
.lizard-earnings-evidence { margin-top: .2rem; font-size: .7rem; color: var(--muted); }

.lizard-leg-quote-issue { display: block; color: #9b3c32; font-size: .7rem; }

/* Ticker evaluation: independent assessments and the next condition stay visible. */
.research-navigation { display: flex; flex-wrap: wrap; gap: 8px; }
.research-navigation a { padding: 9px 12px; border: 1px solid #dce2e3; border-radius: 6px; background: #fff; color: #34525d; font-size: 12px; text-decoration: none; }
.research-navigation a:hover, .research-navigation a:focus-visible { background: #edf3f1; text-decoration: underline; }
.company-research [id] { scroll-margin-top: 24px; }
.research-decision[data-tone="concern"] { border-left-color: #ae4545; }
.research-engine-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.research-engine { padding: 15px; border: 1px solid #e2e6e7; border-top: 3px solid #b6a978; border-radius: 6px; min-width: 0; }
.research-engine[data-tone="concern"] { border-top-color: #ae4545; }
.research-engine[data-tone="observed"] { border-top-color: #648873; }
.research-engine h3 { font-size: 11px; color: #687481; margin-bottom: 9px; }
.research-engine strong { display: block; font-size: 13px; line-height: 1.5; }
.research-engine p, .research-findings p { font-size: 12px; line-height: 1.6; color: #687481; margin-top: 7px; }
.research-findings { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid #edf0ef; padding-top: 18px; }
.research-findings h3, .research-next-condition h3 { font-size: 13px; }
.research-findings ul { padding-left: 18px; margin: 12px 0; }
.research-findings li { font-size: 12px; line-height: 1.6; margin-bottom: 12px; }
.research-findings li p { margin-top: 3px; }
.research-next-condition { background: #f4f6f5; border-radius: 6px; padding: 16px; margin: 18px 0 12px; }
.research-next-condition p { font-size: 13px; line-height: 1.6; margin-top: 7px; }
@media (max-width: 900px) { .research-engine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .research-engine-grid, .research-findings { grid-template-columns: 1fr; } }

/* Sourced business mix and separate annual/quarterly statement history. */
.research-business-description { font-size: 14px; line-height: 1.75; max-width: 90ch; margin-bottom: 10px !important; }
.research-business h3 { font-size: 14px; margin: 22px 0 8px; }
.research-revenue-mix { display: grid; gap: 18px; margin: 20px 0; }
.research-revenue-segment > div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.research-revenue-segment meter { display: block; width: 100%; height: 14px; margin: 5px 0; accent-color: #867537; }
.research-business-reconciliation { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.research-business-source { margin-top: 16px; font-size: 12px; line-height: 1.7; }
.research-business-source summary, .research-history-value summary { cursor: pointer; }
.research-statement-history { min-width: 0; }
.research-history-table { margin: 16px 0; }
.research-history-table .table-wrap { margin: 0 16px; }
.research-history-table caption { text-align: left; font-size: 11px; color: #687481; padding: 0 0 12px; }
.research-history-table th small { display: block; font-size: 10px; font-weight: normal; min-width: 110px; margin-top: 5px; }
.research-history-value { min-width: 90px; max-width: 250px; font-size: 12px; }
.research-history-value p { margin-top: 7px; white-space: normal; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 560px) { .research-business-reconciliation { grid-template-columns: 1fr; } .research-revenue-segment > div { flex-wrap: wrap; gap: 5px; } }

/* Reported valuation context and explicit hypothetical scenario assumptions. */
.research-valuation h3 { font-size: 14px; margin: 22px 0 10px; }
.research-valuation-explanations p { font-size: 12px; line-height: 1.7; margin-bottom: 8px; color: #596772; }
.research-valuation-comparisons, .research-scenario-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.research-valuation-comparisons article, .research-scenario-results article { border: 1px solid #e2e6e7; border-radius: 7px; padding: 16px; min-width: 0; }
.research-valuation-comparisons h4 { margin: 0 0 8px; font-size: 12px; }
.research-valuation-comparisons p, .research-scenario-results p { font-size: 12px; line-height: 1.6; margin-top: 7px; }
.research-valuation-history, .research-valuation-inputs, .research-scenario-math { font-size: 12px; line-height: 1.7; margin: 16px 0; }
.research-valuation summary, .research-scenario-math summary { cursor: pointer; }
.research-valuation-history caption { text-align: left; font-size: 11px; padding: 10px 0; color: #687481; }
.research-valuation-inputs p { margin-top: 8px; }
.research-scenarios > p { font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.research-scenario-controls { display: flex; flex-wrap: wrap; gap: 16px; margin: 18px 0; }
.research-scenario-form label { display: grid; gap: 6px; font-size: 12px; margin-bottom: 12px; }
.research-scenario-form input, .research-scenario-form select { width: 100%; min-width: 0; padding: 8px; border: 1px solid #cbd3d6; border-radius: 5px; background: white; }
.research-scenario-form fieldset { min-width: 0; padding: 16px; border: 1px solid #e2e6e7; border-radius: 7px; }
.research-scenario-form legend { font-weight: 650; font-size: 13px; padding: 0 5px; }
.research-scenario-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 12px; margin-bottom: 20px; }
.research-scenario-actions input { width: auto; }
.research-scenario-results h3 { font-size: 13px; margin-bottom: 10px; }
.research-scenario-price { display: block; font-size: 28px; }
.research-scenario-results dl { font-size: 12px; line-height: 1.6; }
.research-scenario-results dl div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.research-scenario-results dd { margin: 0; font-weight: 600; }
@media (max-width: 700px) { .research-valuation-comparisons, .research-scenario-grid { grid-template-columns: 1fr; } }

/* Earnings and insider context retain event dates and coverage limits. */
.research-earnings .research-line-chart { max-width: 520px; display: block; }
.research-earnings-history caption, .research-insider-transactions caption { text-align: left; font-size: 11px; color: #687481; padding: 12px 0; }
.research-insiders > p { font-size: 13px; line-height: 1.7; margin: 14px 0; }
.research-insiders > form { margin: 16px 0; }
.research-insider-transactions td { min-width: 125px; font-size: 12px; line-height: 1.6; }
.research-insider-transactions details summary, .research-institutional-coverage summary { cursor: pointer; }
.research-institutional-coverage { margin-top: 18px; font-size: 12px; line-height: 1.7; }
.research-institutional-coverage p { margin-top: 10px; }
