/* usetwine.ink — terminal layout. Dark by default; light is the optional theme. */
:root {
  --bg: #ffffff; --bg-2: #eef5fc; --panel: #ffffff; --panel-2: #eef5fc; --line: #d3e0ee; --line-strong: #b7cde3;
  --ink: #0b1424; --ink-2: #0f2340; --muted: #4e5c6e;
  --accent: #7cc4ff; --accent-ink: #07111f; --accent-text: #1f5fa8; --accent-soft: #eef5fc;
  --call: #15803d; --call-soft: #e3f6ea; --put: #dc2626; --put-soft: #fde7e7;
  --display: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px); --radius: 4px;
}
.theme-dark {
  --bg: #07111f; --bg-2: #0b1a30; --panel: #0f2340; --panel-2: #14305a; --line: #1c3a63; --line-strong: #2d5590;
  --ink: #eef5fc; --ink-2: #b7cde3; --muted: #8fb3d6;
  --accent: #7cc4ff; --accent-ink: #07111f; --accent-text: #7cc4ff; --accent-soft: #14305a;
  --call: #4ade80; --call-soft: #0f2f2a; --put: #f87171; --put-soft: #3a1f2a;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: light; scroll-behavior: smooth; scroll-padding-top: 76px; }
html.theme-dark { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--display); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.dialog-open { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { max-width: 100%; display: block; }
code, kbd, samp { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.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; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; font-family: var(--mono); }
.skip-link:focus { left: 8px; }
[hidden] { display: none !important; }

.eyebrow, .mono, .ticket-paper, .step-number, .chain-footer, .quote-status, .status-line, .example-kicker, .learn-range-label, .terms-strip dt, .tape, .account-strip span, .order-details dt, .payoff-results span, .learn-results span, .quantity-label, .chain-headings span, .chain-headings strong, .position-tabs, .mode-badge, .source-controls > span, .chain-toolbar label, .rule-index, .footer-links, .wallet-detail span, .review-line span, .price-source-label, #price-source-label, #position-expiry, .ticket-note, .portfolio-bottom, .hero-stats dt, .learn-outcome, .example-basis, .step-visual, .stock-chip small, .full-chain button span, .full-chain td.strike-cell span {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
}
.eyebrow { color: var(--accent-text); margin: 0 0 14px; }
.num, .account-strip strong, .order-details dd, .payoff-results strong, .learn-results strong, .stock-chip strong, .full-chain strong, #stock-price, #settlement-label, #learn-price-display, .hero-stats dd, .quantity input, #total-premium, .review-line strong, .wallet-detail strong, .wallet-detail code, .step-visual strong, .positions-table td, .tape em, .tape b { font-family: var(--mono); font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); border-radius: var(--radius); font-family: var(--mono); font-size: 13px; letter-spacing: .02em; text-transform: uppercase; transition: background .15s, color .15s, border-color .15s; }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover:not(:disabled) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn:disabled { background: var(--panel-2); color: var(--muted); border-color: var(--line); }
.wide-button { width: 100%; margin-top: 24px; }

/* ---------- tape ---------- */
.tape { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2); height: 32px; display: flex; align-items: center; }
.tape-track { display: flex; gap: 0; white-space: nowrap; animation: tape 60s linear infinite; width: max-content; }
.tape:hover .tape-track { animation-play-state: paused; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tape-item { display: inline-flex; gap: 10px; align-items: center; padding: 0 22px; border-right: 1px solid var(--line); color: var(--muted); }
.tape-item b { color: var(--ink); font-weight: 700; }
.tape-item em { font-style: normal; color: var(--accent-text); }
.tape-name { display: none; }
@media (min-width: 900px) { .tape-name { display: inline; } }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; height: 60px; padding: 0 var(--gutter); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; letter-spacing: -0.04em; }
.wordmark .mark { width: auto; height: 22px; display: block; }
.wordmark .mark-dark, .footer-art .mark-dark { display: none; }
.theme-dark .wordmark .mark-dark, .theme-dark .footer-art .mark-dark { display: block; }
.theme-dark .wordmark .mark-light, .theme-dark .footer-art .mark-light { display: none; }
.wordmark-text span { color: var(--muted); font-weight: 700; }
#main-nav { display: flex; gap: 4px; justify-self: center; }
#main-nav a { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; border-radius: var(--radius); }
#main-nav a:hover { color: var(--ink); }
#main-nav a[aria-current] { color: var(--ink); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.nav-lens { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.onchain-link { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; }
.onchain-link:hover { color: var(--ink); }
.icon-link { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.icon-link:hover { border-color: var(--ink); }
.wallet-trigger { min-height: 38px; padding: 0 14px; white-space: nowrap; border: 1px solid var(--ink); border-radius: var(--radius); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; background: var(--ink); color: var(--bg); margin-left: 6px; }
.wallet-trigger:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.theme-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.theme-btn:hover { border-color: var(--ink); }
.theme-moon { display: none; }
.theme-dark .theme-sun { display: none; }
.theme-dark .theme-moon { display: block; }
.menu-toggle { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-toggle span { width: 16px; height: 1.5px; background: var(--ink); display: block; }
@media (max-width: 1100px) { .onchain-link { display: none; } .icon-link { display: grid; } }
@media (max-width: 760px) {
  .header { grid-template-columns: auto 1fr auto auto; gap: 10px; }
  #main-nav { display: none; position: absolute; left: 0; right: 0; top: 60px; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  #main-nav.is-open { display: flex; }
  .menu-toggle { display: flex; }
  .wallet-trigger { padding: 0 10px; font-size: 11px; }
}

/* ---------- sections ---------- */
main > section, footer { padding: 72px var(--gutter); border-bottom: 1px solid var(--line); }
.section-heading { margin-bottom: 36px; }
.section-heading h2, .desk-heading h2, .positions-heading h2, .learn-chapter h2 { font-size: clamp(30px, 4vw, 48px); }
.desk-heading, .positions-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px var(--gutter); align-items: center; padding-top: 80px; padding-bottom: 56px; background: radial-gradient(60% 50% at 80% 30%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); }
.hero h1 { font-size: clamp(56px, 9vw, 132px); letter-spacing: -0.05em; line-height: .9; margin-bottom: 26px; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.lede { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2); max-width: 520px; line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 16px; }
.status-line { display: block; color: var(--muted); }
.hero-panel { margin: 0; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 16px; color: var(--muted); }
.hero-panel figcaption { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 2px; display: inline-block; margin-left: 10px; }
.sw.call { background: var(--call); } .sw.put { background: var(--put); }
.hero-panel svg { width: 100%; height: auto; display: block; }
.hero-panel .axis { stroke: var(--line-strong); stroke-width: 1; }
.hero-panel .axis.dashed { stroke-dasharray: 3 6; }
.hero-panel .line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.hero-panel .line.call { stroke: var(--call); }
.hero-panel .line.put { stroke: var(--put); opacity: .7; }
.hero-panel .dot { fill: var(--accent); stroke: var(--panel); stroke-width: 3; }
.hero-panel .tick { font-family: var(--mono); font-size: 11px; fill: var(--muted); letter-spacing: .04em; }
.hero-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 16px 0 0; }
.hero-stats div { background: var(--panel); padding: 18px 20px; }
.hero-stats dt { color: var(--muted); margin-bottom: 8px; }
.hero-stats dd { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.hero-stats dd small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
@media (max-width: 960px) { .hero { grid-template-columns: 1fr; } .hero-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- trading desk ---------- */
.mode-badge { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; border: 1px solid var(--line); padding: 8px 12px; border-radius: var(--radius); background: var(--panel); }
.mode-badge span { color: var(--ink); }
.mode-badge small { color: var(--muted); font-size: 11px; }
.account-strip { display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 20px; }
.account-strip > * { background: var(--panel); padding: 14px 18px; margin: 0; }
.account-strip span { display: block; color: var(--muted); margin-bottom: 6px; }
.account-strip strong { font-size: 20px; font-weight: 700; }
.account-strip p { display: flex; align-items: center; justify-content: flex-end; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.desk-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stock-picker { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel); }
.stock-chip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; color: var(--ink); position: relative; }
.stock-chip:last-child { border-bottom: 0; }
.stock-chip img { width: 30px; height: 30px; border-radius: 50%; }
.stock-chip span { display: flex; flex-direction: column; gap: 2px; }
.stock-chip strong { font-size: 13px; font-weight: 700; }
.stock-chip small { color: var(--muted); text-transform: none; letter-spacing: 0; }
.stock-chip:hover { background: var(--panel-2); }
.stock-chip.selected { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.chain-panel, .desk-ticket, .positions-section .positions-body, .payoff-explainer, .step, .rule, .hero-panel { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); }
.chain-panel { padding: 18px; }
.underlier-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.underlier-title { display: flex; align-items: center; gap: 12px; }
.underlier-title img { width: 40px; height: 40px; border-radius: 50%; }
.underlier-title h3 { font-size: 22px; }
.underlier-title span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.underlier-price { text-align: right; }
.underlier-price strong { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.underlier-price span { color: var(--muted); }
.quote-status { margin: 14px 0; padding: 8px 10px; border: 1px dashed var(--line-strong); color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 12px; }
.quote-status.unavailable { border-style: solid; border-color: color-mix(in srgb, var(--put) 40%, transparent); background: var(--put-soft); color: var(--put); }
.sample-scenario { margin: 12px 0; display: flex; gap: 12px; align-items: center; }
.sample-scenario div { display: flex; gap: 6px; }
.chain-toolbar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 10px 0 18px; }
.chain-toolbar label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); flex: 1 1 220px; }
select, input[type="number"], input[type="text"] { font-family: var(--mono); font-size: 13px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 9px 10px; min-height: 40px; width: 100%; }
select:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.source-controls { display: flex; flex-direction: column; gap: 6px; }
.source-controls > span { color: var(--muted); }
.source-toggle { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 2px; background: var(--panel-2); }
.source-toggle button { padding: 7px 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); border-radius: 2px; }
.source-toggle button.selected, .source-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.refresh-price { width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 16px; }
.refresh-price:disabled { opacity: .4; }
.chain-headings { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 0 4px 10px; border-bottom: 1px solid var(--line); }
.chain-headings > div { display: flex; flex-direction: column; gap: 2px; }
.chain-headings > div:nth-child(2) { text-align: center; }
.chain-headings > div:last-child { text-align: right; }
.chain-headings strong { font-size: 12px; }
.chain-headings > div:first-child strong { color: var(--call); }
.chain-headings > div:last-child strong { color: var(--put); }
.chain-headings span { color: var(--muted); font-size: 10.5px; }
.full-chain { width: 100%; border-collapse: collapse; margin-top: 4px; }
.full-chain td { border-bottom: 1px solid var(--line); padding: 0; height: 52px; }
.full-chain td.strike-cell { width: 26%; text-align: center; vertical-align: middle; }
.full-chain td.strike-cell strong { font-size: 15px; font-weight: 700; display: block; }
.full-chain td.strike-cell span { display: block; color: var(--accent-text); font-size: 9.5px; margin-top: 2px; }
.full-chain button { width: 100%; height: 52px; display: flex; flex-direction: column; justify-content: center; padding: 0 12px; text-align: left; gap: 2px; }
.full-chain td:last-child button { text-align: right; align-items: flex-end; }
.full-chain button strong { font-size: 14px; font-weight: 700; }
.full-chain button span { color: var(--muted); font-size: 10px; text-transform: none; letter-spacing: 0; }
.full-chain td:first-child button:hover:not(:disabled) { background: var(--call-soft); }
.full-chain td:last-child button:hover:not(:disabled) { background: var(--put-soft); }
.full-chain button.chosen, .full-chain button[aria-pressed="true"] { background: var(--accent); }
.full-chain button.chosen strong, .full-chain button.chosen span, .full-chain button[aria-pressed="true"] strong, .full-chain button[aria-pressed="true"] span { color: var(--accent-ink); }
.full-chain button:disabled strong { color: var(--muted); }
.full-chain tr.active-row td.strike-cell { background: var(--panel-2); }
.chain-footer { display: flex; justify-content: space-between; color: var(--muted); padding: 12px 4px 0; font-size: 10.5px; }
.model-details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.model-details summary { cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--ink); }
.model-details p { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ticket */
.desk-ticket { padding: 18px; position: sticky; top: 76px; }
.ticket-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ticket-topline .eyebrow { margin: 0; }
.ticket-paper { border: 1px solid var(--line-strong); padding: 3px 8px; border-radius: 2px; color: var(--muted); }
.ticket-direction, .learn-direction, .position-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 2px; background: var(--panel-2); gap: 2px; }
.ticket-direction button, .learn-direction button, .position-tabs button { padding: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-radius: 2px; }
.ticket-direction button.selected[data-direction="call"], .learn-direction button[aria-pressed="true"][data-learn-side="call"] { background: var(--call); color: #06251a; }
.ticket-direction button.selected[data-direction="put"], .learn-direction button[aria-pressed="true"][data-learn-side="put"] { background: var(--put); color: #fff; }
.desk-ticket h3 { font-size: 24px; margin-top: 18px; }
#position-expiry { color: var(--muted); margin: 6px 0 16px; text-transform: none; letter-spacing: 0; }
.quantity-label { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 6px; }
.quantity { display: grid; grid-template-columns: 44px 1fr 44px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); }
.quantity button { font-size: 18px; color: var(--ink); }
.quantity button:hover:not(:disabled) { background: var(--line); }
.quantity button:disabled { color: var(--muted); }
.quantity input { border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-size: 20px; font-weight: 700; background: transparent; min-height: 46px; }
.quantity input:focus { box-shadow: none; }
.order-details { margin: 16px 0 0; display: grid; gap: 0; }
.order-details > div, .review-line, .wallet-detail { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.order-details dt, .review-line span, .wallet-detail span { color: var(--muted); }
.order-details dd, .review-line strong, .wallet-detail strong, .wallet-detail code { margin: 0; font-weight: 700; word-break: break-all; text-align: right; }
.payoff-area { margin-top: 18px; padding-top: 14px; }
.payoff-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.payoff-title h4 { font-size: 15px; }
.payoff-title span { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.payoff-area > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.payoff-area > label strong { color: var(--ink); }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 6px 0 10px; }
#payoff-chart, .learn-chart { width: 100%; height: auto; display: block; }
#zero-line, #learn-zero, .learn-chart .axis, #learn-cursor { stroke: var(--line-strong); }
#payoff-line, #learn-line { stroke: var(--accent); }
#payoff-point, #learn-point { fill: var(--accent); stroke: var(--panel); }
.learn-chart text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.payoff-results, .learn-results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.payoff-results div, .learn-results div { display: flex; flex-direction: column; gap: 4px; }
.payoff-results div:last-child, .learn-results div:last-child { text-align: right; }
.payoff-results span, .learn-results span { color: var(--muted); }
.payoff-results strong, .learn-results strong { font-size: 18px; font-weight: 700; }
.positive { color: var(--call) !important; }
.negative { color: var(--put) !important; }
.order-button { width: 100%; justify-content: space-between; margin-top: 18px; min-height: 50px; }
.ticket-note { color: var(--muted); margin-top: 10px; text-transform: none; letter-spacing: 0; line-height: 1.5; }
@media (max-width: 1180px) { .desk-grid { grid-template-columns: minmax(0, 1fr) 320px; } .stock-picker { grid-column: 1 / -1; flex-direction: row; overflow-x: auto; } .stock-chip { border-bottom: 0; border-right: 1px solid var(--line); flex: 0 0 auto; min-width: 150px; } .stock-chip.selected { box-shadow: inset 0 -3px 0 var(--accent); } }
@media (max-width: 860px) { .desk-grid { grid-template-columns: 1fr; } .desk-ticket { position: static; } .account-strip { grid-template-columns: 1fr 1fr; } .account-strip p { grid-column: 1 / -1; justify-content: flex-start; } }

/* ---------- positions ---------- */
#position-content { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); min-height: 140px; }
.positions-empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.positions-empty h3 { font-size: 20px; color: var(--ink); margin-bottom: 8px; }
.positions-empty a, .portfolio-bottom a { color: var(--accent-text); }
.positions-table-wrap { overflow-x: auto; }
.positions-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.positions-table th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.positions-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.positions-table a { color: var(--accent-text); }
.position-close { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 10px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.portfolio-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); margin-top: 12px; }
.position-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.position-tabs button span { opacity: .7; margin-left: 6px; }
.position-tabs { grid-template-columns: auto auto; }

/* ---------- steps ---------- */
.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { border: 0; border-radius: 0; padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 10px; min-height: 320px; }
.step-number { color: var(--accent-text); font-size: 12px; }
.step h3 { font-size: 20px; }
.step p { color: var(--muted); font-size: 13.5px; line-height: 1.55; flex: 1; text-transform: none; }
.step-visual { border: 1px solid var(--line); background: var(--panel-2); padding: 14px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.step-visual code { color: var(--ink); font-size: 13px; line-height: 1.8; }
.direction-step { flex-direction: row; gap: 8px; }
.direction-step > div { flex: 1; display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: var(--radius); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.call-preview { background: var(--call-soft); color: var(--call); }
.put-preview { background: var(--put-soft); color: var(--put); }
.strike-step > div { padding: 8px 10px; display: flex; justify-content: space-between; color: var(--ink); font-family: var(--mono); font-size: 14px; border-radius: 2px; }
.strike-step .active-strike { background: var(--accent); color: var(--accent-ink); }
.review-step strong { font-size: 38px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -0.03em; }
.review-step strong span { font-size: 18px; color: var(--muted); }
@media (max-width: 960px) { .steps-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } .step { min-height: 0; } }

/* ---------- learn ---------- */
.learn-chapter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.chapter-copy p { color: var(--ink-2); max-width: 460px; margin-top: 18px; line-height: 1.6; }
.chapter-copy .chapter-secondary { color: var(--muted); }
.example-basis { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.example-basis span { color: var(--accent-text); display: block; margin-bottom: 6px; }
.example-basis p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-transform: none; letter-spacing: 0; }
.payoff-explainer { padding: 20px; }
.example-top { display: flex; justify-content: space-between; margin-bottom: 14px; }
.example-kicker { color: var(--muted); display: block; margin-bottom: 4px; }
#learn-price-display { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.learn-range-label { display: flex; justify-content: space-between; color: var(--muted); margin-top: 8px; }
.learn-outcome { margin-top: 14px; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 12px; line-height: 1.6; padding-top: 12px; border-top: 1px solid var(--line); }
.terms-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 56px 0 0; }
.terms-strip div { background: var(--panel); padding: 18px 20px; }
.terms-strip dt { color: var(--accent-text); margin-bottom: 8px; }
.terms-strip dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
@media (max-width: 960px) { .learn-chapter { grid-template-columns: 1fr; } .terms-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .terms-strip { grid-template-columns: 1fr; } }

/* ---------- rules ---------- */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rule { padding: 24px; }
.rule-index { color: var(--accent-text); display: block; margin-bottom: 40px; font-size: 13px; }
.rule h3 { font-size: 24px; margin-bottom: 12px; }
.rule p { color: var(--muted); line-height: 1.6; font-size: 14px; }
@media (max-width: 860px) { .rules { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
footer { border-bottom: 0; padding-bottom: 32px; }
.footer-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer-top p { color: var(--muted); margin-top: 10px; font-size: 13px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-art { margin: 48px 0 32px; display: flex; justify-content: center; }
.footer-art img { width: min(420px, 60vw); height: auto; opacity: .12; }
.footer-bottom p { color: var(--muted); font-size: 12px; line-height: 1.6; max-width: 980px; }

/* ---------- dialogs & toast ---------- */
dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 30px 80px -30px #000; }
dialog::backdrop { background: color-mix(in srgb, #000 70%, transparent); backdrop-filter: blur(3px); }
.action-dialog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.action-dialog-top .eyebrow { margin: 0; }
.close-dialog { width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 18px; line-height: 1; }
dialog h2 { font-size: 28px; margin-bottom: 14px; }
dialog p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin-top: 10px; }
dialog .btn { width: 100%; margin-top: 12px; }
dialog .back-button { margin-top: 8px; }
#settle-input-wrap { margin-top: 12px; display: grid; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.action-error:empty, #wallet-error:empty { display: none; }
.action-error, #wallet-error { border: 1px solid color-mix(in srgb, var(--put) 40%, transparent); background: var(--put-soft); color: var(--put) !important; padding: 10px 12px; border-radius: var(--radius); font-family: var(--mono); font-size: 12px; }
#wallet-options { display: grid; gap: 8px; margin-top: 16px; }
#wallet-options button { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 14px; text-align: left; font-family: var(--mono); font-size: 13px; background: var(--panel-2); }
#wallet-options button:hover { border-color: var(--accent); }
#wallet-explorer { display: inline-block; margin-top: 12px; color: var(--accent-text); font-family: var(--mono); font-size: 12px; }
.wallet-notice { border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--radius); font-family: var(--mono); font-size: 12.5px; max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 40px -20px #000; }

@media (prefers-reduced-motion: reduce) { .tape-track { animation: none; } html { scroll-behavior: auto; } }

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--d, 0ms), transform .6s cubic-bezier(.2,.8,.2,1) var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes flashUp { 0% { color: var(--call); } 100% { color: inherit; } }
@keyframes flashDown { 0% { color: var(--put); } 100% { color: inherit; } }
@keyframes flashRow { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.flash-up { animation: flashUp .9s ease-out; }
.flash-down { animation: flashDown .9s ease-out; }
strong.flash, em.flash, #learn-price-display.flash { animation: flashUp .9s ease-out; }
tr.flash > td { animation: flashRow .9s ease-out; }
.pressed { transform: scale(.94) !important; transition: transform .08s; }
.hero h1 { animation: heroIn .8s cubic-bezier(.2,.8,.2,1) both; }
.hero .lede, .hero .hero-actions, .hero .status-line { animation: heroIn .8s cubic-bezier(.2,.8,.2,1) .12s both; }
.hero-panel .line { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.6s ease-out .3s forwards; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } .hero h1, .hero .lede, .hero .hero-actions, .hero .status-line { animation: none; } .hero-panel .line { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; } .flash-up, .flash-down, strong.flash, tr.flash > td { animation: none; } }
