:root {
  font-family: Inter, "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  color: #192c31;
  background: #f3f7f5;
  --muted: #4e6669;
  --line: #dce8e4;
  --accent: #12665b;
  --soft: #eef7f3;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { max-width: 1200px; margin: auto; padding-inline: 28px; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.header-content { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; }
a { color: var(--accent); text-underline-offset: 3px; }
.header-content a { font-size: .92rem; font-weight: 650; }
.intro { padding: 44px 0 24px; }
h1 { font-size: clamp(1.78rem, 4vw, 2.6rem); letter-spacing: -.045em; margin: 0 0 9px; }
h2 { margin: 0 0 16px; font-size: 1.14rem; letter-spacing: -.02em; }
p { color: var(--muted); line-height: 1.65; }
.intro p { margin: 0; }
.layout { display: grid; grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.card { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 7px #183f3410; }
label { display: block; font-size: .88rem; font-weight: 650; margin: 15px 0 7px; }
input, select, button { font: inherit; }
input, select { width: 100%; min-height: 41px; border: 1px solid #c6d8d3; border-radius: 7px; padding: 7px 9px; color: inherit; background: #fff; }
input[type=file] { font-size: .84rem; display: block; overflow: hidden; }
input::file-selector-button { border: 0; border-radius: 5px; padding: 5px 9px; margin-right: 8px; background: var(--soft); color: var(--accent); font: inherit; cursor: pointer; }
small, .privacy, .note { color: var(--muted); display: block; font-size: .82rem; margin: 7px 0 0; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 21px; }
button, .download { font-weight: 670; border-radius: 7px; min-height: 39px; padding: 8px 12px; cursor: pointer; font-size: .86rem; }
.primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.secondary, .download { color: var(--accent); background: #fff; border: 1px solid #b9d2ca; }
button:hover:not(:disabled), .download:hover { filter: brightness(.93); }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid #279a85; outline-offset: 3px; }
.result-panel { min-height: 380px; }
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.result-head h2 { margin: 0; }
#downloads { display: flex; flex-wrap: wrap; gap: 6px; }
.download { text-decoration: none; display: inline-flex; align-items: center; }
#status { font-size: .88rem; white-space: pre-line; overflow-wrap: anywhere; max-height: 12rem; overflow: auto; }
#status[data-error] { color: #97352e; }
.empty { min-height: 232px; padding: 20px; border: 1px dashed #c6d8d3; border-radius: 10px; display: grid; justify-items: center; align-content: center; gap: 7px; text-align: center; background: #f8fbfa; }
.empty span { color: var(--muted); font-size: .85rem; }
.chart-icon { display: flex; align-items: end; gap: 4px; height: 40px; padding: 0 4px 4px; border-bottom: 1px solid #91c9b4; }
.chart-icon i { width: 8px; border-radius: 3px 3px 0 0; height: 38%; background: #8bc8b3; }
.chart-icon i:nth-child(2) { height: 68%; }
.chart-icon i:nth-child(3) { height: 55%; }
.chart-icon i:nth-child(4) { height: 91%; background: #298579; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.metrics div { border-radius: 8px; background: var(--soft); padding: 11px; display: grid; gap: 4px; }
.metrics span { font-size: .78rem; color: var(--muted); }
.metrics strong { align-self: center; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.metrics select { min-height: 30px; padding-block: 2px; }
.table-wrap { overflow: auto; max-height: 420px; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
thead th { position: sticky; top: 0; background: #eef5f2; }
tbody tr:hover { background: #f7fbf9; }
.limitation { margin: 20px 0 32px; padding: 12px 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }
details { margin-top: 12px; font-size: .9rem; }
pre { padding: 12px; background: var(--soft); overflow: auto; max-height: 320px; }
.io-card { margin-bottom: 16px; }
.io-card th, .io-card td { text-align: left; vertical-align: top; line-height: 1.6; }
code { overflow-wrap: anywhere; color: #175749; }
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .shell { padding-inline: 16px; }
  .card { padding: 16px; }
  .intro { padding-top: 28px; }
  th, td { padding: 8px 6px; }
}
