:root {
  color-scheme: light;
  --ink: #1d2424;
  --muted: #66706e;
  --lime: #cdf66b;
  --border: #dce0da;
  --numbers: "Inter", "Segoe UI", Arial, sans-serif;
  font-family: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f5f6f3;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #748f42; outline-offset: 4px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); }
.nav, .brand, .help-link, h2, .reset, .contract-type, .change, footer span { display: flex; align-items: center; }
.nav { height: 68px; justify-content: space-between; }
a { color: inherit; text-decoration: none; }
.brand { gap: 10px; font: 730 23px/1 var(--numbers); letter-spacing: -1.2px; }
.brand-mark { width: 33px; height: 33px; display: grid; place-items: center; background: var(--lime); border-radius: 9px; }
.brand svg { width: 28px; height: 28px; }
.help-link { font-size: 13px; font-weight: 550; gap: 8px; min-height: 44px; color: #505956; }
.help-link .icon { width: 16px; }
.help-link:hover, .reset:hover { color: #344e16; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 44px 0 27px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 3.2vw, 43px); letter-spacing: -.045em; line-height: 1.3; font-weight: 730; }
.intro p { margin-top: 9px; font-size: 15px; color: var(--muted); line-height: 1.65; }
.contract-type { align-self: end; margin-bottom: 4px; flex: none; border: 1px solid var(--border); border-radius: 20px; gap: 8px; padding: 7px 12px; background: #fff; font-size: 11px; font-weight: 600; color: #566052; }
.contract-type i, .dot { display: inline-block; width: 7px; height: 7px; background: #96bd4a; border-radius: 50%; flex: none; }
.workspace { display: grid; grid-template-columns: minmax(0,.93fr) minmax(0,1.07fr); gap: 20px; align-items: stretch; }
.panel { border: 1px solid var(--border); border-radius: 17px; background: white; }
.parameters, .results { padding: 25px 27px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
h2 { gap: 10px; font-size: 19px; line-height: 1.4; letter-spacing: -.025em; }
.icon-box { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #f1f3ed; }
.reset { border: 0; background: transparent; color: var(--muted); gap: 5px; padding: 7px 2px 7px 8px; font-size: 12px; }
.reset svg { width: 14px; height: 14px; }
.fields { margin: 23px 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px 12px; }
.field.wide { grid-column: 1 / -1; }
.field label { display: flex; align-items: baseline; gap: 9px; font-size: 14px; font-weight: 650; margin-bottom: 8px; }
.field label span { font-size: 12px; font-weight: 400; color: var(--muted); }
.input-box { display: flex; align-items: center; gap: 8px; border: 1px solid #d7dcd5; border-radius: 8px; background: #fbfcfa; padding-right: 14px; transition: border-color .15s, box-shadow .15s; }
.input-box:focus-within { border-color: #73983e; box-shadow: 0 0 0 3px #c7ec802e; background: #fff; }
.input-box:has([aria-invalid="true"]) { border-color: #c15141; }
.input-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; padding: 11px 0 11px 14px; font: 550 20px/1.35 var(--numbers); letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.input-box > span { font: 600 11px/1 var(--numbers); color: #707875; letter-spacing: .35px; }
.input-box input::placeholder { font-size: 14px; font-weight: 400; color: var(--muted); }
.error { font-size: 12px; color: #a3392f; margin-top: 5px; }
.error:empty { display: none; }
.calculate { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 46px; border: 1px solid #bce45d; border-radius: 8px; background: var(--lime); font-size: 15px; font-weight: 700; color: #202c13; transition: background .15s; }
.calculate:hover { background: #bfee57; }
.calculate:active { transform: translateY(1px); }
.calculate .icon { width: 17px; }
.calculate .arrow { position: absolute; right: 16px; width: 19px; }
.results { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; color: #f8faf8; border-color: #212a29; background: #202827; }
.results::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 100% 0%, #414d324c, transparent 54%); }
.results .icon-box { color: var(--lime); background: #344033; }
.position-value { padding: 5px 9px; font-size: 11px; border-radius: 6px; border: 1px solid #566050; color: #c9d1c1; text-align: right; }
.position-value b { margin-left: 4px; color: var(--lime); font: 650 12px/1.3 var(--numbers); overflow-wrap: anywhere; }
.outcomes { display: grid; flex: 1; grid-template-rows: repeat(2, 1fr); gap: 12px; margin: 21px 0 15px; }
.outcome { --accent: #b7e999; position: relative; isolation: isolate; padding: 17px 20px; display: flex; flex-direction: column; justify-content: center; background: #2b3532; border: 1px solid #424d46; border-radius: 11px; overflow: hidden; }
.outcome.short { --accent: #f1a79e; background: #323232; border-color: #4b4746; }
.outcome h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--accent); }
.outcome h3 .icon { width: 18px; height: 18px; stroke-width: 2; }
.outcome small { font: 600 9px/1.2 var(--numbers); letter-spacing: 1.2px; border-left: 1px solid #6c746e; margin-left: 3px; padding-left: 10px; color: #bac5bc; }
.short small { color: #cdbfbf; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin: 6px 0 8px; }
.price output { font: 600 clamp(33px,3.25vw,47px)/1.15 var(--numbers); letter-spacing: -.045em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.price > span { font: 550 11px/1 var(--numbers); color: #b6bdb8; letter-spacing: .4px; }
.change { gap: 7px; color: #bec5c1; font-size: 11px; }
.change span { color: var(--accent); font: 600 11px/1.3 var(--numbers); font-variant-numeric: tabular-nums; }
.pnl { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 12px; border-top: 1px solid #ffffff25; margin-top: 14px; padding-top: 10px; color: #cbd2cd; font-size: 12px; }
.pnl output { font: 600 16px/1.4 var(--numbers); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pnl output[data-sign="positive"] { color: #b7e999; }
.pnl output[data-sign="negative"] { color: #f1a79e; }
.plot { position: absolute; z-index: -1; right: 8px; top: 50%; width: 23%; height: 68px; transform: translateY(-50%); color: var(--accent); opacity: .84; background-image: linear-gradient(to right,#a6b4a811 1px,transparent 1px),linear-gradient(to bottom,#a6b4a811 1px,transparent 1px); background-size: 17px 17px; mask-image: linear-gradient(to right,transparent,#000 12%); }
.plot svg { width: 100%; height: 100%; }
.plot .area { fill: currentColor; opacity: .07; }
.plot .line { fill: none; stroke: currentColor; stroke-width: 1.8; }
.plot circle { fill: currentColor; }
.result-note { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.7; color: #bdc5bf; }
.result-note .icon { width: 14px; height: 17px; }
.guide { margin-top: 20px; padding: 22px 27px; scroll-margin-top: 15px; }
.guide h2 { font-size: 16px; gap: 9px; }
.guide h2 .icon { width: 18px; }
.guide > p { color: var(--muted); font-size: 13px; margin-top: 10px; line-height: 1.7; }
.formula-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 15px 0 11px; }
.formula-grid > div { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: 7px; background: #f5f6f2; font-size: 13px; color: #465048; }
.formula-grid b { white-space: nowrap; }
.dot.bear { background: #df948b; }
.guide .assumptions { font-size: 12px; }
footer { display: flex; justify-content: space-between; align-items: center; padding-block: 23px 30px; color: #6e7770; }
footer span { gap: 6px; font-size: 11px; }
.footer-brand { font: 650 14px/1 var(--numbers); letter-spacing: -.5px; }
.footer-brand svg { width: 20px; height: 20px; }
footer .icon { width: 13px; height: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html:is([data-calc-state="pending"], [data-calc-state="invalid"]) :is(.plot,.price > span),
html[data-calc-state="unreachable"] .long :is(.price > span,.plot,.change) { display: none; }
html[data-calc-state="unreachable"] .long .price output { font-size: 1.6rem; }
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 48px); }
  .parameters, .results, .guide { padding: 21px; }
  .workspace { gap: 14px; }
  .outcome { padding: 16px; }
  .plot { width: 18%; opacity: .55; }
}
@media (max-width: 760px) {
  .wrap { width: min(580px, calc(100% - 32px)); }
  .nav { height: 58px; }
  .intro { padding-block: 27px 20px; }
  .intro p { font-size: 13px; }
  .workspace, .formula-grid { grid-template-columns: minmax(0, 1fr); }
  .contract-type { display: none; }
  .fields { gap: 16px; margin: 19px 0; }
  .outcome { min-height: 118px; }
  .plot { width: 24%; opacity: .8; }
  .guide { margin-top: 14px; }
  .formula-grid { gap: 7px; }
  .price output { font-size: clamp(30px, 7.5vw, 40px); }
}
@media (max-width: 370px) {
  .parameters, .results, .guide { padding: 16px; }
  .plot { width: 15%; }
  .formula-grid > div { padding: 10px; gap: 6px; font-size: 12px; }
}
