:root {
  color-scheme: light;
  --ink: #142c33; --muted: #4d646c; --accent: #126653;
  --line: #d7e2e0; --paper: #fff; --ground: #f3f7f5;
  font-family: system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink); background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #319e86; outline-offset: 3px; }
.frame { max-width: 1360px; margin: auto; padding-inline: clamp(16px, 4vw, 54px); }
.top { background: #0e302e; color: #fff; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 720; letter-spacing: .025em; }
.mark { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #86c5b3; border-radius: 8px; font-family: Georgia, serif; font-size: 22px; color: #b8ead8; }
.topnote { color: #b5d2ca; font-size: .82rem; }
.intro { padding-block: clamp(28px, 5vw, 57px) 34px; }
.eyebrow { color: var(--accent); margin: 0 0 6px; letter-spacing: .13em; font-weight: 750; font-size: .72rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.15rem, 5.3vw, 4rem); line-height: 1.13; margin-bottom: 14px; letter-spacing: -.035em; }
.intro > p:last-child { color: var(--muted); margin: 0; max-width: 650px; line-height: 1.65; }
.layout { display: grid; grid-template-columns: minmax(270px, 315px) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel, .metric, .chart { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.controls { padding: 20px; }
h2 { margin-bottom: 0; font-size: 1.37rem; }
.heading { margin-bottom: 19px; }
.label, .field > span { display: block; font-size: .84rem; font-weight: 650; margin-bottom: 5px; }
select, input { width: 100%; min-width: 0; border: 1px solid #b9ccc7; background: #fcfefd; color: var(--ink); border-radius: 7px; padding: 8px; }
input { font-variant-numeric: tabular-nums; }
.field small { display: block; color: var(--muted); margin-top: 3px; font-size: .72rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.hint { color: var(--muted); margin: 7px 0 13px; font-size: .77rem; line-height: 1.5; }
details { margin-top: 16px; border-block: 1px solid var(--line); padding-block: 11px; }
summary { color: var(--accent); font-size: .85rem; font-weight: 680; }
.advanced { margin-top: 12px; }
.formula { margin-top: 15px; }
button { border-radius: 8px; font-weight: 700; padding: 9px 13px; }
.run { display: flex; justify-content: space-between; width: 100%; color: white; background: var(--accent); border: 1px solid var(--accent); margin-top: 15px; }
.run:hover:enabled { background: #0c4c3e; }
.secondary { background: #fff; border: 1px solid #aec6bf; color: var(--accent); }
#cancel { margin-top: 8px; width: 100%; }
button:disabled { opacity: .52; cursor: default; }
.result-heading, .profiles-heading { display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.status { color: var(--muted); margin: 10px 0 14px; min-height: 1.3em; font-size: .88rem; }
.status.error, .diagnostics.warning { color: #803b15; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.metric { padding: 11px; min-height: 74px; }
.metric span { display: block; color: var(--muted); font-size: .75rem; }
.metric strong { display: block; font-size: clamp(1rem, 2vw, 1.5rem); margin-top: 5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.diagnostics { color: var(--muted); font-size: .8rem; margin-top: 12px; line-height: 1.6; }
.profiles-heading { margin: 20px 0 9px; }
.profiles-heading h3 { margin: 0; font-size: 1rem; }
.profiles-heading span { font-size: .76rem; color: var(--muted); }
.profiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.chart { margin: 0; padding: 9px; min-width: 0; }
.chart figcaption { font-size: .84rem; font-weight: 700; }
.chart output { display: block; min-height: 1.15em; color: var(--muted); font-size: .71rem; margin-top: 2px; }
.chart svg { display: block; width: 100%; aspect-ratio: 260 / 188; }
svg text { font-size: 10px; fill: #465e64; }
footer { margin-top: 29px; border-top: 1px solid var(--line); padding: 14px 0 24px; color: var(--muted); font-size: .83rem; line-height: 1.6; }
footer p { margin-bottom: 5px; }
a { color: var(--accent); }
@media (max-width: 1050px) { .profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 750px) { .layout { grid-template-columns: 1fr; } }
@media (max-width: 430px) { .topnote { display: none; } .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chart { padding: 6px; } }


.header-options { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.language { color: #fff; border: 1px solid #86c5b3; background: transparent; padding: 6px 10px; font-size: .84rem; }
.language:hover { background: #254942; }
.mark { flex-shrink: 0; }
