/* Covered call with calls bought before reports: what the shared backtest and covered-call styles do not cover.
 * Line colours are checked for colour-blind separation and 3:1 contrast on the card in both themes:
 * the rule's line is the site primary, the original covered call an orange stepped per theme, and the
 * shares alone the dashed grey reference the covered-call page already uses. */
.cce-page { --cce-plain: #eb6834; }
.dark .cce-page { --cce-plain: #d95926; }

.cce-page .ls-heading p { max-width: 980px; }
.cce-controls .cce-weeks-field { flex-basis: 230px; }
.cce-controls .cce-across-field { flex-basis: 215px; }
.cce-controls .cce-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.cce-controls .cce-actions .btn[aria-current="true"] { box-shadow: inset 0 0 0 1px var(--tw-primary, #1b84ff); }
.cce-best { border-left-color: var(--tw-primary, #1b84ff); }
.cce-best small { margin-top: 4px; }

@media (min-width: 1200px) {
  .cce-page .cce-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The comparison tables: the covered-call page borrows this class without loading its stylesheet. */
.cce-page .ss-comparison-table { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.cce-page .ss-comparison-table th,
.cce-page .ss-comparison-table td { padding: 10px 9px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ls-line); }
.cce-page .ss-comparison-table thead th { background: var(--ls-soft); font-weight: 500; color: var(--tw-gray-600, #64748b); font-size: 11px; line-height: 1.45; }
.cce-page .ss-comparison-table tbody th { font-weight: 500; }
.cce-page .ss-comparison-table small { display: block; font-weight: 400; }
.cce-page .ds-attribution { min-width: 0; }
.cce-page .ds-attribution td { text-align: right; }
.cce-page .ds-attribution .cce-group th { padding-top: 16px; font-weight: 600; color: var(--tw-gray-800, #252f4a); border-bottom-width: 2px; }
.cce-page .cce-windows { min-width: 860px; }
.cce-page .cce-windows td { white-space: nowrap; }
.cce-page .cce-windows tfoot th,
.cce-page .cce-windows tfoot td { font-weight: 600; border-top: 2px solid var(--ls-line); border-bottom: 0; }
.cce-page .cce-weeks-table { min-width: 820px; }
.cce-page .cce-weeks-table th a { font-weight: 600; }
.cce-page .cce-weeks-table tr.cc-rsi-current > * { background: var(--tw-primary-light, rgba(27, 132, 255, .08)); }
.cce-page .cce-stability { min-width: 560px; }

/* The chart: three lines on one axis, report ticks on the time axis, a crosshair readout. */
.cce-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 4px; font-size: 12px; color: var(--tw-gray-700, #4b5675); }
.cce-legend span { display: inline-flex; align-items: center; }
.cce-key { display: inline-block; width: 1.25rem; height: 2px; margin-right: .4rem; border-radius: 1px; }
.cce-key--rule { background: var(--tw-primary, #1b84ff); }
.cce-key--plain { background: var(--cce-plain); }
.cce-key--bench { background: repeating-linear-gradient(90deg, var(--tw-gray-600, #78829d) 0 5px, transparent 5px 8px); }
.cce-key--report { width: 2px; height: .7rem; background: var(--tw-gray-500, #99a1b7); margin-right: .45rem; }
.cce-chart { position: relative; }
.cce-curve:focus { outline: none; }
.cce-curve:focus-visible { outline: 2px solid var(--tw-primary, #1b84ff); outline-offset: 4px; border-radius: 4px; }
.ls-curve .cce-line--rule { stroke: var(--tw-primary, #1b84ff); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ls-curve .cce-line--plain { stroke: var(--cce-plain); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ls-curve .cce-line--bench { stroke: var(--tw-gray-600, #78829d); stroke-width: 1.5; stroke-dasharray: 5 4; }
/* The zero line stays a solid hairline here: dashed grey already means "shares alone". */
.ls-curve.cce-curve .ls-zero { stroke: var(--tw-gray-400, #c4cada); stroke-dasharray: none; stroke-width: 1; }
.ls-curve .cce-report-tick { stroke: var(--tw-gray-500, #99a1b7); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ls-curve .cce-cross { stroke: var(--tw-gray-500, #99a1b7); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cce-tip { position: absolute; top: 6px; z-index: 2; min-width: 190px; padding: 9px 11px; font-size: 12px; line-height: 1.5;
  background: var(--tw-card-background-color, #fff); border: 1px solid var(--tw-gray-200, #f1f1f4); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .12); pointer-events: none; font-variant-numeric: tabular-nums; }
.dark .cce-tip { box-shadow: 0 10px 28px rgba(0, 0, 0, .55); }
.cce-tip-day { color: var(--tw-gray-600, #64748b); margin-bottom: 4px; }
.cce-tip-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.cce-tip-row strong { font-weight: 600; color: var(--tw-gray-900, #071437); min-width: 92px; }
.cce-tip-row span { color: var(--tw-gray-600, #64748b); }
.cce-tip-report { margin-top: 4px; color: var(--tw-gray-600, #64748b); }

/* Every decision: a bought call's row carries a primary rule on its left edge. */
.cce-days .cce-row--buy > th { box-shadow: inset 3px 0 0 var(--tw-primary, #1b84ff); }
.cce-days .badge { font-weight: 500; }

/* Money never breaks at its thin thousands space. */
.cce-page .ls-positive, .cce-page .ls-negative, .cce-num { white-space: nowrap; }

/* A phone shrinks the 1100-unit chart to about a third: larger axis text keeps the guides readable. */
@media (max-width: 540px) {
  .ls-curve.cce-curve text { font-size: 24px; }
  .cce-legend { gap: 4px 14px; }
}
