:root {
  color-scheme: light;
  --ink: #172d2a;
  --muted: #53645f;
  --green: #176a57;
  --subtle: #eaf4ee;
  --bg: #f5f6f2;
  --paper: #fff;
  --line: #dce5de;
  --deep: #123a33;
  --max: 1280px;
  --font-body: "Satoshi", system-ui, sans-serif;
  --font-display: var(--font-body);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 15px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 15px/1.5 var(--font-body); font-variant-numeric: tabular-nums lining-nums; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: #0c4b3b; }
button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #277a64; outline-offset: 3px; }
.wrap { width: min(var(--max), calc(100% - 96px)); margin-inline: auto; }
.definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip { position: fixed; z-index: 5; inset: 8px auto auto 8px; padding: 8px 12px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }

.bar { border-bottom: 1px solid var(--line); background: var(--paper); }
.bar-inner { min-height: 65px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 20px; }
.wordmark { display: flex; align-items: center; gap: 9px; justify-self: start; color: var(--ink); font-weight: 900; font-size: 17px; letter-spacing: -.025em; text-decoration: none; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; height: 33px; width: 33px; border-radius: 8px; background: var(--deep); color: #c5eed7; }
.brand-icon .icon { width: 21px; height: 21px; }
nav { display: flex; gap: 6px; align-items: center; }
nav a { text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 6px; white-space: nowrap; }
nav a.active, nav a:hover { color: var(--green); background: var(--subtle); }
.edition { justify-self: end; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.edition span, .eyebrow > span { width: 7px; height: 7px; border-radius: 50%; background: #409575; display: inline-block; flex: 0 0 auto; }

.intro { padding: 31px 0 25px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 12px; font-weight: 900; letter-spacing: .12em; line-height: 1.3; }
h1 { margin-top: 8px; font: 900 clamp(1.76rem, 1.38rem + 1.05vw, 2.25rem)/1.14 var(--font-display); letter-spacing: -.045em; }
.intro-copy { margin-top: 8px; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(284px, 309px) minmax(0, 1fr); align-items: start; gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: var(--paper); min-width: 0; }
h2 { font-size: 20px; line-height: 1.25; font-weight: 900; letter-spacing: -.022em; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.settings-head { padding: 15px 17px 15px 20px; border-bottom: 1px solid var(--line); }
.head-label { display: flex; align-items: center; gap: 10px; }
.head-label .icon { color: var(--green); }
.settings-head h2 { font-size: 18px; }
.plain { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--muted); }
.plain:hover { background: var(--subtle); color: var(--green); }
.plain .icon { width: 17px; height: 17px; }
.controls { padding: 16px 19px 0; }
.rate-section h3, .label-row label { font-size: 13px; font-weight: 800; }
.rate-section h3 { display: flex; gap: 4px; justify-content: space-between; align-items: baseline; }
.rate-section h3 span { color: var(--muted); font-size: 12px; font-weight: 500; }
.rate-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.rate-buttons button { min-height: 39px; padding: 5px 0; border: 1px solid var(--line); border-radius: 7px; background: #f7f9f6; font-size: 13px; font-weight: 900; color: var(--ink); white-space: nowrap; }
.rate-buttons button:hover { border-color: #81b4a1; background: var(--subtle); }
.rate-buttons button[aria-pressed="true"] { color: white; background: #196b58; border-color: #196b58; }
.fields { display: grid; gap: 13px; margin-top: 17px; }
.field { min-width: 0; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 4px; min-height: 29px; }
.number-box { display: flex; flex: 0 0 auto; align-items: baseline; justify-content: flex-end; padding: 3px 7px; min-width: 65px; gap: 4px; border: 1px solid var(--line); border-radius: 6px; background: #f7faf7; color: var(--green); }
.number-box:focus-within { outline: 2px solid #277a64; outline-offset: 2px; }
.number-box input { padding: 0; width: var(--number-width, 3ch); appearance: textfield; border: 0; color: inherit; background: transparent; min-height: 20px; text-align: right; font-weight: 900; font-size: 13px; outline: 0; }
.number-box input:focus-visible { outline: 0; }
.number-box input::-webkit-inner-spin-button, .number-box input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.number-box span { font-size: 11px; font-weight: 700; white-space: nowrap; }
.range { --progress: 0%; width: 100%; height: 23px; display: block; margin: 2px 0 0; appearance: none; background: transparent; border-radius: 5px; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 5px; border-radius: 12px; background: linear-gradient(to right, #258169 0 var(--progress), #e1ebe4 var(--progress) 100%); }
.range::-moz-range-track { height: 5px; border-radius: 12px; background: linear-gradient(to right, #258169 0 var(--progress), #e1ebe4 var(--progress) 100%); }
.range::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -5.5px; border: 2px solid #21745e; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px #153e322c; }
.range::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid #21745e; border-radius: 50%; background: var(--paper); }
.range:disabled { opacity: .64; cursor: not-allowed; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.35; }
.quick-action { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 7px; min-height: 26px; border: 1px solid var(--line); border-radius: 5px; background: #f7f9f6; color: var(--green); font-size: 12px; font-weight: 800; }
.quick-action .icon { width: 13px; height: 13px; }
.quick-action:hover { border-color: #81b4a1; background: var(--subtle); }
.quick-action[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: white; }
.quick-action:disabled { cursor: not-allowed; background: #edf2ed; border-color: var(--line); color: var(--muted); }
.advanced { margin-top: 14px; border-top: 1px solid var(--line); }
summary { user-select: none; cursor: pointer; }
.advanced summary { display: flex; justify-content: space-between; align-items: center; min-height: 53px; color: var(--green); list-style: none; font-size: 13px; font-weight: 900; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary .icon { transition: transform .15s; width: 16px; height: 16px; }
.advanced[open] summary .icon { transform: rotate(180deg); }
.advanced .fields { margin: 0 0 16px; }

.results { min-width: 0; display: grid; gap: 13px; }
.result-banner { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 19px 22px 21px; min-height: 132px; border-radius: 13px; background: var(--deep); color: white; overflow: hidden; }
.result-banner::after { position: absolute; inset: 0 0 0 45%; z-index: -1; content: ""; background-image: linear-gradient(#a9e9c31d 1px, transparent 1px), linear-gradient(90deg,#a9e9c31d 1px, transparent 1px); background-size: 23px 23px; mask-image: linear-gradient(100deg,transparent 2%,#000 90%); pointer-events: none; }
.result-main h2 { color: #d6e8df; font-size: 14px; font-weight: 800; letter-spacing: 0; }
.gain-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 13px; margin-top: 3px; }
.gain-row > strong { font-size: clamp(30px, 4vw, 50px); line-height: 1.06; letter-spacing: -.052em; font-weight: 900; white-space: nowrap; }
.verdict { min-height: 27px; display: inline-flex; align-items: center; gap: 4px; border-radius: 5px; padding: 3px 7px; color: #c5f6d9; background: #2a594b; font-size: 11px; font-weight: 900; white-space: nowrap; }
.verdict[data-tone="negative"] { color: #ffdfd1; background: #69433b; }
.verdict[data-tone="neutral"] { color: #f2eac9; background: #4e5241; }
.verdict .icon { width: 15px; height: 15px; }
.result-main p { margin-top: 7px; color: #c6dbd0; font-size: 12px; }
.real-value { display: flex; flex-direction: column; justify-content: center; align-self: stretch; border-left: 1px solid #73958a75; padding-left: 21px; }
.real-value > span { color: #d6e8df; font-size: 13px; font-weight: 700; }
.real-value strong { display: block; color: #b8efcf; font-size: 26px; line-height: 1.15; margin: 4px 0; letter-spacing: -.025em; white-space: nowrap; font-weight: 900; }
.real-value strong small { color: #d3e7de; font-size: 14px; font-weight: 700; margin-left: 3px; }
.real-value p { color: #c6dbd0; font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric { padding: 11px 14px 12px; }
.metric dt { color: var(--muted); display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; }
.metric .icon { width: 16px; height: 16px; color: var(--green); }
.metric-value { margin-top: 4px; font-size: clamp(20px, 2.2vw, 28px); font-weight: 900; line-height: 1.16; letter-spacing: -.035em; }
.metric-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.38; }

.sensitivity { padding: 17px 19px 13px; }
.chart-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.chart-kicker { font-size: 11px; gap: 7px; }
.chart-kicker .icon { width: 15px; height: 15px; }
.chart-head h2 { margin-top: 5px; }
.chart-head p:not(.eyebrow) { color: var(--muted); font-size: 13px; margin-top: 3px; }
.chart-badge { flex: 0 0 auto; margin-top: 3px; padding: 4px 9px; border-radius: 5px; color: var(--green); background: var(--subtle); font-size: 12px; font-weight: 900; }
.chart-shell { position: relative; margin-top: 9px; height: 231px; }
#chart { display: block; width: 100%; height: 100%; overflow: visible; cursor: crosshair; touch-action: pan-y; }
.chart-shell[data-empty="true"] #chart { cursor: default; }
#chart text { font-family: var(--font-body); font-size: 11px; fill: var(--muted); font-weight: 700; }
#chart .axis-unit { font-size: 11px; fill: var(--muted); font-weight: 800; }
.axis-caption { text-align: center; padding-left: 40px; font-size: 11px; color: var(--muted); font-weight: 700; }
.chart-tip { position: absolute; z-index: 2; min-width: 141px; pointer-events: none; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); padding: 8px 10px; box-shadow: 0 5px 16px #1b342322; font-size: 12px; }
.chart-tip b { display: block; border-bottom: 1px solid var(--line); padding-bottom: 3px; margin-bottom: 3px; }
.chart-tip div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.chart-tip strong { color: var(--ink); }
.chart-foot { display: flex; justify-content: space-between; align-items: center; gap: 4px 10px; flex-wrap: wrap; margin-top: 9px; border-top: 1px solid #e6ede7; padding-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 3px; }
.legend button { display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 5px; font-size: 11px; font-weight: 800; padding: 3px 5px; min-height: 25px; white-space: nowrap; }
.legend button:hover, .legend button[aria-pressed="true"] { color: var(--ink); background: #f2f6f2; border-color: var(--line); }
.legend svg { width: 15px; height: 10px; overflow: visible; }
#chart-hint { color: var(--muted); font-size: 11px; }
.touch-hint, .empty-hint, #chart-hint[data-empty="true"] .pointer-hint, #chart-hint[data-empty="true"] .touch-hint { display: none; }
#chart-hint[data-empty="true"] .empty-hint { display: inline; }
@media (pointer: coarse) {
  .pointer-hint { display: none; }
  .touch-hint { display: inline; }
}

.scenarios, .market, .method { margin-top: 20px; padding: 22px; }
.lower-head h2 { margin-top: 6px; }
.lower-head p:not(.eyebrow) { margin-top: 5px; color: var(--muted); font-size: 14px; }
.table-wrap { margin-top: 16px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
th, td { text-align: right; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); background: #f3f7f3; vertical-align: bottom; }
th:first-child, td:first-child { text-align: left; }
th:first-child { border-radius: 6px 0 0 0; }
th:last-child { border-radius: 0 6px 0 0; }
tbody tr.is-current { background: #edf6ef; }
tbody th { background: transparent; color: var(--ink); border-radius: 0; font-weight: 900; font-size: inherit; vertical-align: middle; white-space: nowrap; }
tbody .baseline:not(.is-current) { background: #f8faf7; }
tbody .baseline th { white-space: normal; }
.baseline th small { display: block; white-space: nowrap; color: var(--muted); font-size: 11px; font-weight: 700; }
tbody td:last-child { font-weight: 900; }
.is-plus { color: #15634f; }
.is-minus { color: #993b2c; }
.insight { margin-top: 14px; padding: 10px 12px; border-radius: 6px; display: flex; align-items: flex-start; gap: 8px; background: #f2f6f2; color: var(--muted); font-size: 13px; }
.insight .icon { width: 17px; height: 17px; color: var(--green); margin-top: 1px; }
.insight strong { color: var(--ink); }

.market-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.market-key { align-self: center; display: flex; gap: 8px; align-items: center; color: var(--green); background: var(--subtle); border-radius: 6px; font-size: 12px; font-weight: 900; padding: 5px 10px; white-space: nowrap; }
.market-key i { height: 13px; border-left: 2px dashed #176a57; }
.market-grid { margin-top: 18px; }
.market-scale, .market-row { display: grid; grid-template-columns: 32% minmax(0, 1fr); align-items: center; gap: 15px; }
.market-scale { font-size: 11px; font-weight: 800; color: var(--muted); }
.scale-values { margin-right: 109px; display: flex; justify-content: space-between; }
.market-row { padding: 10px 0; border-top: 1px solid var(--line); }
.market-row h3 { font-size: 14px; font-weight: 900; }
.market-row p { font-size: 12px; color: var(--muted); }
.market-row a .icon { width: 12px; height: 12px; }
.market-visual { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 13px; }
.market-visual strong { text-align: right; font-size: 13px; white-space: nowrap; }
.track { position: relative; height: 7px; border-radius: 5px; background: #eaf0eb; }
.track::after { content: ""; position: absolute; height: 21px; top: -7px; left: var(--marker); border-left: 2px dashed #176a57; z-index: 1; }
.track i { display: block; position: absolute; left: var(--lo); width: var(--span); background: var(--range); height: 7px; border-radius: 5px; }
.track b { position: absolute; width: 11px; height: 11px; top: -2px; left: calc(var(--mid) - 5.5px); border-radius: 50%; border: 2px solid white; background: #493467; }
.market-note, .method-notes { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 13px; }
.market-note p + p, .method-notes p + p { margin-top: 5px; }
.method-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 15px 0; }
.method-rows > div { background: #f2f6f2; border-radius: 7px; padding: 12px; }
.method-rows h3 { font-size: 14px; font-weight: 900; }
.method-rows p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.footer { padding: 20px 0 23px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.footer span:first-child { color: var(--ink); font-weight: 900; }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 56px); }
  .workspace { grid-template-columns: minmax(265px, 286px) minmax(0, 1fr); gap: 14px; }
  .result-banner { gap: 12px; padding-inline: 16px; }
  .real-value { padding-left: 13px; }
  .metric { padding-inline: 10px; }
}
@media (max-width: 820px) {
  .wrap { width: calc(100% - 38px); }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .settings-head { padding-block: 9px; }
  .controls { padding-top: 12px; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-scale, .market-row { grid-template-columns: 42% minmax(0,1fr); }
  .market-grid .scale-values span:nth-child(even):not(:last-child) { display: none; }
  .market-grid .scale-values span:nth-child(odd):not(:first-child) { display: none; }
}
@media (max-width: 530px) {
  .wrap { width: calc(100% - 28px); }
  .bar-inner { grid-template-columns: 1fr auto; gap: 5px 10px; padding-block: 8px; }
  .edition { grid-column: 2; grid-row: 1; }
  .brand-icon { width: 26px; height: 26px; }
  .brand-icon .icon { width: 17px; height: 17px; }
  .wordmark { font-size: 15px; }
  nav { grid-column: 1 / -1; margin-left: -6px; }
  nav a { padding: 5px 7px; font-size: 12px; }
  .intro { padding: 23px 0 16px; }
  .intro-copy { font-size: 14px; }
  .controls { padding-inline: 12px; }
  .settings-head { padding-inline: 12px; }
  .label-row { display: block; }
  .number-box { width: max-content; margin-top: 3px; }
  .fields { gap: 11px 15px; }
  .result-banner { grid-template-columns: minmax(0, 1fr); padding: 13px 13px 12px; gap: 10px; }
  .real-value { border-left: 0; border-top: 1px solid #73958a75; padding: 7px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 7px; }
  .real-value strong { grid-column: 2; grid-row: 1 / 3; font-size: 22px; margin: 0; }
  .real-value p { grid-column: 1; }
  .metrics { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 7px; padding: 8px 11px; }
  .metric-value { grid-row: 1 / 3; grid-column: 2; margin-top: 0; }
  .metric-meta { margin-top: 0; padding-left: 23px; }
  .sensitivity, .scenarios, .market, .method { padding: 13px 10px; }
  .chart-head { flex-wrap: wrap; gap: 4px; }
  .chart-head h2 { font-size: 18px; }
  .chart-shell { height: 198px; }
  .chart-foot { gap: 3px 8px; }
  .scenarios, .market, .method { margin-top: 13px; }
  th, td { padding: 7px 4px; }
  th { font-size: 11px; line-height: 1.3; }
  td, tbody th { font-size: 12px; }
  .market-head { display: block; }
  .market-key { width: max-content; margin-top: 8px; }
  .market-scale, .market-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .market-scale { margin-bottom: 3px; }
  .market-scale > span { display: none; }
  .market-note { font-size: 12px; }
  .method-rows { grid-template-columns: 1fr; gap: 6px; }
  .footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
