:root {
  color-scheme: light;
  --bg: #fff;
  --panel: #fff;
  --text: #202322;
  --muted: #607176;
  --line: #e1e9e9;
  --green: #54a85b;
  --blue: #50a5bd;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 Arial, Helvetica, sans-serif; }
main { max-width: 1180px; padding: 0 32px; margin: auto; }
header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { font-size: 24px; font-weight: 800; letter-spacing: -.7px; color: var(--blue); text-decoration: none; }
.brand::before { content: ''; display: inline-block; width: 13px; height: 22px; margin-right: 10px; border-left: 5px solid var(--green); border-bottom: 5px solid var(--blue); transform: skewY(-25deg); }
.brand span, .source { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .8px; }
.intro { padding: 64px 0 32px; text-align: center; }
.eyebrow, .label { font-size: 11px; letter-spacing: 1px; font-weight: 700; color: var(--muted); }
.intro .eyebrow { color: #3d8243; }
h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -1.7px; line-height: 1.15; margin: 18px 0 22px; }
.accent { color: var(--blue); }
p { color: var(--muted); }
.intro p { font-size: 18px; color: #363f40; }
.toolbar { max-width: 760px; margin: 0 auto 18px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 20px; border: 2px solid var(--green); border-radius: 6px; }
.toolbar strong { display: block; font-size: 20px; margin: 2px 0; }
.toolbar small { color: var(--muted); }
button { border: 0; border-radius: 4px; background: #448c4b; color: #fff; font: 700 14px Arial, sans-serif; padding: 18px 24px; cursor: pointer; white-space: nowrap; text-transform: uppercase; letter-spacing: .5px; transition: background .15s; }
button:hover { background: #36743c; }
button:disabled { background: #d5e1df; color: #465a54; cursor: wait; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.status { font-size: 12px; margin: 0 0 34px; min-height: 20px; text-align: center; }
.error, .negative { color: #b83c48; }
.positive { color: #357c3d; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric, .panel { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 24px; }
.metric { box-shadow: 0 5px 22px #203b4310; }
.metric.primary { background: #f1f8f1; border-top: 3px solid var(--green); }
.metric.median { background: #f1f8fa; border-top: 3px solid var(--blue); }
.primary .label { color: #36763d; }
.median .label { color: #34788b; }
.number { font-size: clamp(26px, 2.8vw, 38px); letter-spacing: -1px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 15px 0 8px; white-space: nowrap; }
.metric small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.panel { margin-top: 24px; padding: 28px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h2 { font-size: 22px; font-weight: 700; line-height: 1.35; margin: 0; }
.pill { background: #f0f7f9; color: #34788b; padding: 6px 12px; border-radius: 4px; font-size: 11px; white-space: nowrap; font-weight: 700; }
.pill span { color: #93a8af; }
.muted, .caption { font-size: 12px; }
.caption { margin-bottom: 0; }
svg { width: 100%; display: block; margin: 22px 0 5px; }
.method { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; background: #f7faf9; }
.method h2 { margin: 10px 0; }
.method p { font-size: 13px; margin-bottom: 0; }
code { font-size: 12px; color: #35753e; overflow-wrap: anywhere; }
summary { cursor: pointer; font-size: 17px; font-weight: 600; }
summary span { float: right; color: var(--muted); font-size: 12px; }
.table-wrap { overflow: auto; max-height: 420px; margin-top: 20px; }
table { border-collapse: collapse; width: 100%; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
td, th { text-align: right; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { background: #f1f6f6; position: sticky; top: 0; color: var(--muted); font-weight: 600; }
tr:hover td { background: #f6faf6; }
td:first-child, th:first-child { text-align: left; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 32px 0 40px; font-size: 11px; letter-spacing: .5px; color: var(--muted); }
footer a { color: #367a40; }
@media (max-width: 1000px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  main { padding: 0 18px; }
  header { min-height: 68px; }
  .brand { font-size: 21px; }
  .brand span { display: none; }
  .source { font-size: 9px; }
  .intro { padding-top: 38px; }
  .intro p { font-size: 16px; }
  .toolbar { flex-direction: column; align-items: stretch; padding: 16px; gap: 14px; }
  .toolbar strong { font-size: 18px; }
  .metrics { grid-template-columns: 1fr; }
  .metric { padding: 20px; }
  .number { font-size: 36px; margin: 8px 0; }
  .panel { padding: 18px; }
  h2 { font-size: 19px; }
  .method { grid-template-columns: 1fr; gap: 10px; }
  footer { flex-direction: column; gap: 10px; }
}

/* Always use the light palette, including when the OS prefers dark mode. */
html { color-scheme: only light; background: #fff; }
.annual-settings { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin: 0 auto 20px; max-width: 760px; color: var(--muted); }
.annual-settings label { font-size: 13px; font-weight: 600; }
.annual-settings input { width: 112px; padding: 9px 12px; border: 1px solid #b8c9cc; border-radius: 4px; color: var(--text); background: #fff; font: inherit; }
.annual-settings input:focus { outline: 2px solid var(--blue); outline-offset: 2px; }
.annual-settings input[aria-invalid="true"] { border-color: #b83c48; }
.annual-settings small { flex-basis: 100%; text-align: center; font-size: 12px; }
#annual-factor { margin-top: 5px; }

.toolbar { max-width: 100%; flex-wrap: wrap; }
.instrument-picker { min-width: 200px; }
.instrument-picker label { display: block; margin-bottom: 5px; }
.instrument-picker select { width: 100%; border: 1px solid #b8c9cc; border-radius: 4px; padding: 11px 30px 11px 12px; color: var(--text); background: #fff; font: inherit; }
.instrument-picker select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.instrument-picker select:disabled { opacity: .65; }
.contract-info { flex: 1; }

/* Currency labels and larger prices must fit metric cards. */
.number { white-space: normal; overflow-wrap: anywhere; }

.site-nav { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.site-nav a { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; padding: 7px 12px; border-radius: 4px; }
.site-nav a:hover { color: #367a40; background: #f1f8f1; }
.site-nav a[aria-current="page"] { background: #eaf5eb; color: #367a40; }
.options-page { max-width: 1400px; }
.options-page .intro { padding-top: 38px; }
.options-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.options-metrics .number { font-size: clamp(26px, 3vw, 36px); }
.options-table-wrap { max-height: 680px; }
.options-table { min-width: 1190px; }
.options-table th, .options-table td { padding: 12px 9px; text-align: right; }
.options-table thead th { position: static; }
.options-table thead { position: sticky; top: 0; z-index: 2; }
.options-table .option-groups th { text-align: center; color: #367a40; background: #edf6ee; }
.options-table .option-groups th:last-child { color: #34788b; background: #eef6fa; }
.options-table .strike { text-align: center; background: #f1f6f6; font-weight: 700; color: #263f44; }
.options-table tbody .strike { position: static; }
.option-code { display: block; font-size: 10px; color: #587d87; text-decoration: none; }
.option-code:hover { text-decoration: underline; }
.options-table .atm-row td, .options-table .atm-row .strike { background: #edf7e8; }
.strike small { display: block; font-size: 9px; letter-spacing: 1px; color: #367a40; }
.options-table .empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.options-table-wrap:focus-visible { outline: 2px solid var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 700px) { .options-metrics { grid-template-columns: 1fr; } .site-nav { gap: 4px; } .site-nav a { font-size: 13px; } .option-board { padding: 16px; } }

.options-table .iv-cell { color: #34788b; font-weight: 600; background: #f6fafb; }
.options-table .max-open-interest { font-weight: 800; }
.iv-explanation { line-height: 1.75; }
.smile-plot { position: relative; height: 380px; width: 100%; margin-top: 8px; }
.smile-plot canvas { cursor: crosshair; }
@media (max-width: 600px) { .smile-panel .panel-head { flex-wrap: wrap; } .smile-plot { height: 320px; } }

.positions-page { max-width: 1300px; }
.positions-page .intro { padding-top: 38px; }
.positions-state { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; margin-top: 18px; font-size: 12px; color: var(--muted); }
.positions-state p { margin: 0; }
.positions-table-wrap { max-height: 65vh; }
.positions-table { min-width: 850px; font-size: 14px; }
.positions-table th { z-index: 1; }
.positions-table td:nth-child(2), .positions-table th:nth-child(2), .positions-table td:nth-child(3), .positions-table th:nth-child(3) { text-align: left; }
.positions-table td:nth-child(2), .positions-table td:last-child { font-weight: 600; }
.positions-table .empty-state { text-align: center; padding: 45px 20px; color: var(--muted); }
.positions-summary td { background: #f1f8f1; border-top: 2px solid #c7dfca; }
.positions-table-wrap:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
