:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #203b43;
  background: #f4f6f2;
  font-synthesis: none;
  line-height: 1.55;
  --teal: #14655f;
  --muted: #52666c;
  --line: #d6dfda;
  --orange: #bc5a31;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at top left, #e2eee6, transparent 55%), #f4f6f2; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, input, select, textarea { border-radius: 9px; }
button { min-height: 44px; padding: 10px 15px; color: #203b43; background: #fff; border: 1px solid #a4b5b0; font-weight: 650; }
button:hover:not(:disabled) { background: #edf4ef; border-color: var(--teal); }
button:disabled { cursor: default; color: #64716d; background: #e8eeea; border-color: #c9d3cd; }
:focus-visible { outline: 3px solid #9a421c; outline-offset: 4px; }
input, select, textarea { color: #203b43; background: #fff; border: 1px solid #93aaa1; min-height: 44px; padding: 10px 12px; }
input, textarea { width: 100%; min-width: 0; }
input::placeholder { color: #65766f; opacity: 1; }
input[aria-invalid="true"] { border: 2px solid #a3352d; }
textarea { resize: vertical; line-height: 1.6; }
a { color: #8f2923; text-underline-offset: 3px; }
h1, h2, h3, p, figure { margin-top: 0; }
h1 { font-size: clamp(2rem, 4.3vw, 3.4rem); line-height: 1.14; letter-spacing: -.04em; max-width: 920px; margin-bottom: 18px; }
h2 { font-size: 1.25rem; line-height: 1.35; margin-bottom: 20px; letter-spacing: -.02em; }
h3 { font-size: 1rem; margin-bottom: 8px; }
.page { width: min(1180px, 100%); margin: 0 auto; padding: 26px 28px 35px; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 44px; }
.identity { display: flex; align-items: center; gap: 12px; font-size: .73rem; font-weight: 750; letter-spacing: .08em; }
.identity-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: var(--teal); color: white; font-size: 1.6rem; }
.language { display: flex; gap: 10px; align-items: center; font-size: .85rem; }
.language select { max-width: 160px; }
.intro { margin-bottom: 30px; }
.lead { color: #354f55; font-size: 1.1rem; margin-bottom: 10px; max-width: 760px; }
.independent { color: var(--muted); font-size: .88rem; margin-bottom: 0; max-width: 850px; }
.workspace { display: grid; grid-template-columns: 1.1fr 1fr; align-items: start; gap: 22px; }
.workspace > *, .output-column { min-width: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 20px #1d403008; padding: 25px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: .85rem; font-weight: 700; }
.field-hint { color: var(--muted); font-size: .75rem; }
.field-error { font-size: .8rem; color: #942e27; font-weight: 600; }
.period-field { margin-bottom: 18px; }
.integer-hint { font-size: .79rem; color: var(--muted); margin-bottom: 22px; }
.scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.scenario { margin: 0; padding: 13px 13px 17px; min-width: 0; border: 1px solid #cbdcd4; border-top: 3px solid var(--teal); border-radius: 10px; background: #f8fbf9; }
.scenario.proposal { border-top-color: var(--orange); background: #fffaf6; }
.scenario legend { font-size: .88rem; font-weight: 750; padding: 0 5px; }
.scenario-fields { display: grid; gap: 17px; }
.scenario input { font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
button.primary { color: #fff; background: var(--teal); border-color: var(--teal); }
button.primary:hover { background: #104d49; color: #fff; }
.copy-button { width: 100%; margin-top: 12px; }
.notice { font-size: .86rem; color: #244e43; margin: 12px 0 0; overflow-wrap: anywhere; }
.notice:empty { display: none; }
.example-note { margin: 17px 0 0; border-left: 3px solid #b17a29; padding: 8px 12px; background: #fff5df; color: #65471d; font-size: .83rem; }
.error-box { color: #842c26; background: #fff2ef; border: 1px solid #ddaaa0; border-radius: 9px; padding: 13px; margin-top: 18px; font-size: .83rem; }
.error-box p { font-weight: 700; margin-bottom: 8px; }
.error-box ul { margin: 0; padding-left: 20px; }
.error-box li + li { margin-top: 5px; }
.empty { text-align: center; padding: 60px 5px 75px; color: var(--muted); }
.empty h2 { color: #203b43; }
.empty p { max-width: 330px; margin: 0 auto; font-size: .92rem; }
.empty-mark { margin: 0 auto 20px; height: 65px; width: 65px; background: #eaf2eb; color: var(--teal); border-radius: 20px; font-size: 2.8rem; line-height: 60px; }
.period-result { font-size: .86rem; overflow-wrap: anywhere; margin-bottom: 10px; }
.unit { font-size: .9rem; font-weight: 650; margin-bottom: 20px; }
.chart { margin: 0 0 20px; }
.chart figcaption { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 13px; }
.bar-row { margin-bottom: 15px; }
.bar-label { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: .86rem; margin-bottom: 6px; }
.bar-label strong { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bar-track { height: 15px; border-radius: 4px; background: #edf2ee; overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.proposal .bar-track span { background: #c5673c; }
.small { font-size: .76rem; color: var(--muted); margin: 0; }
.difference { margin: 22px 0; padding: 15px; border-radius: 10px; background: #edf4ef; display: grid; gap: 15px; }
.difference dt { font-size: .78rem; color: #425f54; }
.difference dd { margin: 4px 0 0; font-size: 1.18rem; font-weight: 750; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .78rem; }
caption { text-align: left; color: var(--muted); font-size: .77rem; line-height: 1.5; margin-bottom: 10px; }
th, td { padding: 9px 6px; border-bottom: 1px solid #e1e8e2; text-align: right; vertical-align: top; font-variant-numeric: tabular-nums; }
th:first-child { text-align: left; padding-left: 0; }
thead th { color: var(--muted); font-weight: 650; }
tbody th { font-weight: 550; width: 48%; }
.equations { display: grid; gap: 10px; margin-top: 16px; font-size: .79rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.equations p { margin: 0; padding: 10px 12px; background: #f7f8f4; border-radius: 7px; }
.review { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; font-size: .83rem; }
.review p { color: var(--muted); margin-bottom: 12px; }
.review ul { padding-left: 19px; margin-bottom: 0; }
.review li + li { margin-top: 9px; }
.manual { margin-top: 16px; border: 1px solid #c4b28e; border-radius: 12px; padding: 18px; background: #fff9ec; }
.manual label { display: block; font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.manual textarea { font-size: .8rem; }
.manual button { margin-top: 10px; }
.notes { margin-top: 25px; padding: 24px 26px; border: 1px solid #ccd9cf; border-radius: 16px; background: #eaf0e8; }
.notes h2 { font-size: 1.05rem; margin-bottom: 14px; }
.notes p { font-size: .84rem; margin-bottom: 9px; color: #3d584c; }
.notes p:last-child { margin-bottom: 0; }
.notes .formula { font-weight: 750; color: #203b43; }
footer { display: flex; justify-content: space-between; align-items: start; gap: 24px; padding: 24px 2px 0; font-size: .75rem; color: var(--muted); }
footer p { margin-bottom: 0; }
footer p:first-child { max-width: 650px; }
.brand { font-weight: 650; white-space: normal; flex-shrink: 0; }
.loading, noscript { display: block; margin: 35px; }
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 1fr; }
  .empty { padding: 35px 5px; }
  .scenario-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { flex-direction: column; gap: 12px; }
}
@media (max-width: 640px) {
  .page { padding: 18px 15px 28px; }
  .masthead { align-items: start; margin-bottom: 30px; gap: 12px; }
  .identity { font-size: .63rem; letter-spacing: .03em; gap: 8px; max-width: 180px; }
  .identity-mark { flex-shrink: 0; }
  .language { flex-direction: column; align-items: start; gap: 3px; }
  .language select { max-width: 135px; padding: 8px; }
  h1 { letter-spacing: -.025em; }
  .card { padding: 20px 17px; border-radius: 14px; }
  .scenarios { grid-template-columns: 1fr; }
  .scenario-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .field label { min-height: 2.65em; }
  .period-field label { min-height: auto; }
  .actions > button { flex: 1 1 auto; }
  .actions .primary { flex-basis: 100%; }
  .notes { padding: 20px 18px; }
  .difference dd { font-size: 1.1rem; }
}
@media (max-width: 360px) {
  .scenario-fields { grid-template-columns: 1fr; }
  .field label { min-height: auto; }
  .identity { max-width: 135px; }
}
@media print {
  body { background: white; }
  .page { width: 100%; padding: 0; }
  .workspace { display: block; }
  .card { box-shadow: none; margin-bottom: 20px; }
  .actions, .copy-button, .language, .manual, .notice { display: none; }
}
