

.calc-setup h2, .calc-gases h2, .calc-results h2 { margin-top: 0; }

.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 18px;
}
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.92em; }
.field select, .field input {
  font: inherit; font-weight: 400; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text);
}
.field small { font-weight: 400; }
.field-wide { grid-column: 1 / -1; }
.field.is-disabled { opacity: 0.6; }
.field[hidden] { display: none; }

.gas-table { min-width: 860px; }
.gas-table th, .gas-table td { padding: 4px; text-align: center; }
.gas-table th[scope="row"] { text-align: left; font-size: 0.85em; white-space: nowrap; }
.gas-table input {
  width: 100%; min-width: 64px; font: inherit; padding: 6px;
  border: 1px solid var(--border); border-radius: 6px; text-align: right; background: var(--surface); color: var(--text);
}
.gas-table input.in-date { min-width: 130px; text-align: left; }
.gas-table input:focus, .field select:focus, .field input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.gas-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-top: 10px; }
.paste { flex: 1 1 320px; }
.paste textarea {
  width: 100%; font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.9em;
  border: 1px solid var(--border); border-radius: 6px; padding: 6px; margin: 6px 0;
}
.calc-actions { display: flex; gap: 10px; margin-top: 16px; }

.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.calc-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 8px 0 16px;
}
.sum-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  background: var(--surface); display: flex; flex-direction: column; gap: 4px;
}
.sum-l { font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.sum-v { font-size: 1.5em; font-weight: 700; }
.sum-d { font-size: 0.92em; }
.sum-card .reasons { margin: 4px 0 0; padding-left: 18px; font-size: 0.9em; }
.sum-card .small { font-size: 0.85em; margin: 4px 0 0; }
.sev-3 { border-left: 5px solid var(--high); }
.sev-2 { border-left: 5px solid var(--btn); }
.sev-1 { border-left: 5px solid var(--low); }
.sev-na { border-left: 5px solid var(--border); }

.rb { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.85em; font-weight: 600; }
.rb-stable { background: var(--low-bg); color: var(--low); }
.rb-borderline { background: var(--high-bg); color: var(--high); }

.votes { margin: 6px 0 0; padding-left: 18px; }
.agree-differ { border-left: 5px solid var(--btn); }
.agree-agree { border-left: 5px solid var(--low); }

.msg-error { color: var(--high); font-size: 0.9em; }

@media print {
  .calc-setup, .calc-gases, .condition .setup-grid, .condition .params, .condition .params-extra, .condition .calc-actions { display: none; }
}


.params { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 18px; margin-top: 12px; }
.param { display: flex; flex-direction: column; gap: 3px; font-size: 0.92em; }
.param .p-label { font-weight: 600; }
.param input {
  font: inherit; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); max-width: 180px;
}
.param .p-limit { font-size: 0.82em; }
.params-extra { margin-top: 12px; }
.params-extra summary { cursor: pointer; font-weight: 600; }
.cond-cat { margin: 10px 0 0; }
.cond-result { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.cond-result .sum-card { max-width: 420px; }
.cond-good { border-left: 5px solid var(--low); }
.cond-fair { border-left: 5px solid var(--btn); }
.cond-poor { border-left: 5px solid var(--high); }
.small { font-size: 0.85em; }

.field-check > span { display: flex; align-items: center; gap: 8px; }
.field-check input { width: 18px; height: 18px; }


.penta .z-D1-H, .penta .z-D1-P { fill: #e53935; }
.penta .z-D2-H, .penta .z-D2-P { fill: #b71c1c; }
.penta .z-D1-P, .penta .z-D2-P { fill-opacity: 0.55; }
.penta .z-C-T1, .penta .z-C-T2, .penta .z-C-T3 { fill: #6d4c41; }
.penta .z-O-T1 { fill: #fdd835; }
.penta .z-N { fill: #43a047; }
.penta .z-X1, .penta .z-X3 { fill: #90a4ae; }
