
:root {
  --ok: #2f7d4f;
  --ok-soft: #e4f1e8;
  --warn: #b7791f;
  --warn-soft: #fbefd8;
  --bad: #b3372c;
  --bad-soft: #f7e0dc;
  --na: #8a949c;
  --na-soft: #eef0f2;
  --paper: #fbfaf7;
  --hair: #e7e3db;
  --ink-2: #5b6670;
}

main { display: block; }
.small { font-size: 0.85em; }
.muted { color: var(--ink-2); }


.hero-band {
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(169, 80, 8, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(169, 80, 8, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--hair);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 32px; align-items: end; padding-top: 44px; padding-bottom: 36px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-grid h1 { max-width: 760px; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.how li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--hair); border-radius: 10px; padding: 12px 14px; font-size: 0.92em; animation: rise 0.5s ease both; }
.how li:nth-child(2) { animation-delay: 0.08s; }
.how li:nth-child(3) { animation-delay: 0.16s; }
.how-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: #fff; font-family: var(--mono); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .how li { animation: none; } }


.utility { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: end; padding: 18px 0 6px; border-bottom: 1px dashed var(--hair); }
.util-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85em; font-weight: 600; }
.util-field select { font: inherit; font-weight: 400; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); min-width: 320px; max-width: 100%; }
.util-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.util-note { grid-column: 1 / -1; font-size: 0.8em; margin: 0; }
.utility .file-info { grid-column: 1 / -1; margin: 0; }
@media (max-width: 700px) { .utility { grid-template-columns: 1fr; } .util-actions { justify-content: flex-start; } .util-field select { min-width: 0; width: 100%; } }
.btn-quiet { border-color: var(--border); font-weight: 600; min-height: 36px; padding: 7px 12px; font-size: 13px; }


.config { padding: 26px 0 8px; }
.section-head h2 { margin: 0 0 4px; font-size: 1.25rem; }
.section-head p { margin: 0 0 14px; font-size: 0.92em; max-width: 880px; }
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 1.3fr) minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 0; border: 1px solid var(--hair); border-radius: 12px; background: var(--surface); overflow: hidden; }
@media (max-width: 1100px) { .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .chain { grid-template-columns: 1fr; } }
.link { position: relative; padding: 12px 16px 14px; border-right: 1px solid var(--hair); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.link:last-child { border-right: 0; }
.link:not(:last-child)::after {
  content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; background: var(--surface);
  border-top: 1px solid var(--hair); border-right: 1px solid var(--hair); transform: translateY(-50%) rotate(45deg); z-index: 1;
}
@media (max-width: 1100px) { .link::after { display: none; } .link { border-bottom: 1px solid var(--hair); } }
.link-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.link select, .link input { font: inherit; font-size: 0.95em; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); width: 100%; min-width: 0; }
.link small { font-size: 0.76em; color: var(--ink-2); line-height: 1.35; }
.link-result { background: #2a3035; color: #fff; }
.link-result .link-k { color: #c9d0d5; }
.cat-code { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--btn); line-height: 1; }
.cat-label { font-size: 0.82em; line-height: 1.35; color: #e8ecef; }
.cat-wait { font-size: 0.85em; color: #c9d0d5; }
.details-row { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 12px; align-items: flex-end; }
.detail { display: flex; flex-direction: column; gap: 3px; font-size: 0.85em; font-weight: 600; max-width: 340px; }
.detail select { font: inherit; font-weight: 400; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.detail small { font-weight: 400; color: var(--ink-2); font-size: 0.9em; }
.flag { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85em; cursor: pointer; max-width: 460px; }
.flag input { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.link select:focus, .link input:focus, .detail select:focus, .lab-table input:focus, .util-field select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }


.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; padding: 22px 0 8px; }
@media (max-width: 1080px) { .workspace { grid-template-columns: 1fr; } }
.lab { background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; padding: 18px 18px 8px; min-width: 0; }
.lab-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.lab-head h2 { margin: 0 0 4px; font-size: 1.25rem; }
.lab-head p { margin: 0 0 10px; max-width: 640px; }
.lab-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--warn-soft); color: #6b4410; font-weight: 600; font-size: 0.9em; }

.lab-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.lab-table th, .lab-table td { padding: 8px 6px; vertical-align: top; text-align: left; }
.lab-table thead th { font-size: 0.78em; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid var(--text); vertical-align: bottom; }
.lab-table tbody tr.prm td, .lab-table tbody tr.prm th { border-bottom: 1px solid var(--hair); }
.lab-table tr.fam th { padding: 16px 6px 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); border-bottom: 1px solid var(--hair); }
.lab-table tr[hidden] { display: none; }
.pname { min-width: 180px; max-width: 250px; }
.pname-top { display: flex; gap: 6px; align-items: flex-start; }
.pname strong { font-size: 0.9em; line-height: 1.3; }
.pname .unit { display: block; font-weight: 400; font-size: 0.8em; color: var(--ink-2); }
.info-btn {
  flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  font: 700 11px/1 var(--mono); cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.info-btn[aria-expanded="true"] { background: var(--text); color: #fff; border-color: var(--text); }
tr.info-row td { background: var(--paper); border-bottom: 1px solid var(--hair); font-size: 0.85em; padding: 10px 12px 12px; }
.info-row p { margin: 0 0 6px; max-width: 860px; }
.info-row .kv2 { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 6px 0 0; }
.info-row dt { color: var(--ink-2); }
.info-row dd { margin: 0; }
.s-col { width: 1%; }
.sh { display: flex; flex-direction: column; gap: 4px; min-width: 124px; }
.sh-title { color: var(--text); font-size: 1.05em; }
.sh-title.latest::after { content: " ●"; color: var(--btn); }
.sh label { display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.sh input { text-align: left; }
.sh .btn-link { min-height: 0; padding: 0; font-size: 0.95em; justify-content: flex-start; }
.lab-table input {
  width: 100%; min-width: 84px; max-width: 132px; font: 500 0.95em var(--mono); padding: 6px 8px; text-align: right;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text);
}
.lab-table .sh input { font-family: var(--font); font-weight: 400; }
.lab-table input.in-bad { border-color: var(--bad); background: var(--bad-soft); }
.cond { min-width: 190px; max-width: 240px; }
.lab-table td.s-col, .lab-table th.s-col { border-left: 1px dotted var(--hair); }
.trend { min-width: 130px; max-width: 170px; font-size: 0.8em; color: var(--ink-2); }

.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.85em; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--na); }
.dot.l0 { background: var(--ok); }
.dot.l1 { background: var(--warn); }
.dot.l2 { background: var(--bad); }
.st.l0 { color: var(--ok); }
.st.l1 { color: var(--warn); }
.st.l2 { color: var(--bad); }
.st.lx { color: var(--na); font-weight: 600; }
.strip { display: block; width: 100%; max-width: 220px; height: 10px; margin: 5px 0 3px; }
.strip .s-good { fill: #8cc5a0; }
.strip .s-fair { fill: #f0cd86; }
.strip .s-poor { fill: #e6a59c; }
.strip .mk { fill: var(--text); }
.cond .why { font-size: 0.78em; color: var(--ink-2); line-height: 1.35; }
.cond .why.near { color: var(--warn); font-weight: 600; }
.cond .worse { font-size: 0.76em; color: var(--bad); font-weight: 600; }
.in-err { color: var(--bad); font-size: 0.8em; font-weight: 600; }
.spark { display: block; width: 110px; height: 28px; }
.spark .ln { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
.spark .pt { fill: var(--ink-2); }
.spark .pt.last { fill: var(--text); }
.fc { display: block; font-weight: 700; }
.fc.l1 { color: var(--warn); }
.fc.l2 { color: var(--bad); }


.livesum { position: sticky; top: 14px; background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; padding: 16px 18px; box-shadow: 0 8px 28px rgba(35, 40, 44, 0.07); }
@media (max-width: 1080px) { .livesum { position: static; } }
.summary-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; font-weight: 600; }
.verdict { display: flex; align-items: center; gap: 10px; }
.verdict .ring { width: 38px; height: 38px; border-radius: 50%; border: 5px solid var(--na-soft); flex: none; position: relative; }
.verdict .ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--na); }
.verdict.l0 .ring { border-color: var(--ok-soft); } .verdict.l0 .ring::after { background: var(--ok); }
.verdict.l1 .ring { border-color: var(--warn-soft); } .verdict.l1 .ring::after { background: var(--warn); }
.verdict.l2 .ring { border-color: var(--bad-soft); } .verdict.l2 .ring::after { background: var(--bad); }
.verdict-word { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.verdict-sub { font-size: 0.78em; color: var(--ink-2); font-family: var(--mono); margin-top: 3px; }
.livesum .meaning { font-size: 0.9em; margin: 10px 0 12px; }
.fams { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--hair); }
.fams li { display: grid; grid-template-columns: 12px 1fr; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 0.85em; align-items: start; }
.fams .dot { margin-top: 5px; }
.fams .f-name { font-weight: 600; }
.fams .f-detail { grid-column: 2; color: var(--ink-2); font-size: 0.92em; }
.steps-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps-mini li { font-size: 0.85em; display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: baseline; }
.when { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--na-soft); color: var(--text); text-align: center; white-space: nowrap; }
.when.now { background: var(--text); color: #fff; }
.when.by { background: var(--warn-soft); color: #6b4410; }
.livesum .to-dossier { display: inline-block; margin-top: 12px; font-size: 0.85em; font-weight: 600; }
.livesum .empty { font-size: 0.9em; color: var(--ink-2); }


.dossier { padding: 30px 0 10px; }
.dossier-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--text); padding-bottom: 12px; margin-bottom: 8px; }
.dossier-head h2 { margin: 0; font-size: 1.6rem; }
.dossier-head .eyebrow { margin-bottom: 8px; }
.q { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 20px; padding: 22px 0; border-bottom: 1px solid var(--hair); }
@media (max-width: 700px) { .q { grid-template-columns: 1fr; } }
.q-n { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; color: var(--btn); line-height: 1; }
.q h3 { font-size: 1.15rem; margin: 0 0 4px; }
.q .q-lead { margin: 0 0 12px; color: var(--ink-2); font-size: 0.92em; max-width: 880px; }
.q p { max-width: 900px; }
.drivers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.drivers li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 8px; font-size: 0.9em; }
.drivers .dot { margin-top: 6px; }
.drivers .d-src { display: block; font-size: 0.85em; color: var(--ink-2); margin-top: 2px; }
.std-action { font-size: 0.88em; padding: 10px 12px; background: var(--paper); border-left: 3px solid var(--text); margin: 12px 0 0; }
.mechs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.mechs li { padding: 12px 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--hair); font-size: 0.9em; }
.mechs li strong { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--hair); display: flex; flex-direction: column; gap: 14px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink-2); }
.timeline li.now::before { background: var(--text); border-color: var(--text); }
.timeline li.by::before { border-color: var(--warn); background: var(--warn-soft); }
.timeline .t-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.timeline .t-title { font-weight: 700; }
.timeline .t-body { font-size: 0.9em; color: var(--muted); margin: 4px 0 0; max-width: 880px; }
.advice { font-size: 0.88em; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: #5d3b0c; margin: 12px 0 0; max-width: 900px; }
.water-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 800px) { .water-grid { grid-template-columns: 1fr; } }
.wscale { width: 100%; height: auto; display: block; font-family: var(--font); }
.wscale .wlabel { font-size: 11px; font-weight: 700; fill: var(--text); }
.wscale .tick { font-size: 9.5px; fill: var(--ink-2); }
.wscale .wz-dry { fill: #cfe6d7; } .wscale .wz-moderate { fill: #f6e2b5; } .wscale .wz-wet { fill: #efc0b6; } .wscale .wz-veryWet { fill: #e19a8d; }
.wscale .wz-base { fill: var(--na-soft); } .wscale .wz-target { fill: #cfe6d7; }
.wscale .wrange { fill: var(--ink-2); }
.wscale .wmark { fill: var(--text); }
.wscale .target-t { font-size: 9px; }
.w-verdict { font-weight: 700; font-size: 1.02em; margin: 0 0 8px; }
.w-verdict.v-dryPaper { color: var(--bad); } .w-verdict.v-watch { color: var(--warn); } .w-verdict.v-oilOnly { color: var(--ok); }
.facts { list-style: none; margin: 0; padding: 0; font-size: 0.9em; }
.facts li { padding: 5px 0; border-bottom: 1px dotted var(--hair); }
.facts .warn-li { color: var(--warn); }
.trajs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.traj-card { border: 1px solid var(--hair); border-radius: 10px; padding: 12px 12px 6px; background: var(--surface); }
.traj-card h4 { margin: 0; font-size: 0.9em; display: flex; justify-content: space-between; gap: 8px; }
.traj-card .t-rate { font-family: var(--mono); font-size: 0.78em; color: var(--ink-2); font-weight: 500; }
.traj-card .t-fc { font-size: 0.8em; margin: 2px 0 0; }
.traj { width: 100%; height: auto; display: block; font-family: var(--font); }
.traj .z-good { fill: #eaf4ed; } .traj .z-fair { fill: #fcf1dc; } .traj .z-poor { fill: #f9e5e1; }
.traj .edge { stroke: #c9c3b8; stroke-width: 1; stroke-dasharray: 3 3; }
.traj .tick { font-size: 9.5px; fill: var(--ink-2); }
.traj .axis, .traj .tickmark { stroke: var(--ink-2); stroke-width: 1; }
.traj .now { stroke: var(--text); stroke-width: 1; stroke-dasharray: 1 3; }
.traj .meas { fill: none; stroke: var(--text); stroke-width: 1.8; }
.traj .proj { fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-dasharray: 5 4; }
.traj .pt { fill: var(--surface); stroke: var(--text); stroke-width: 1.6; }
.traj .pt.last { fill: var(--text); }
.traj .cross { fill: var(--bad); stroke: #fff; stroke-width: 1.5; }
.traj .cross-label { font-size: 10px; font-weight: 700; fill: var(--bad); }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8em; color: var(--ink-2); margin: 10px 0 0; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 16px; height: 10px; border-radius: 2px; }
.lg.z-good { background: #eaf4ed; border: 1px solid #b9dbc4; } .lg.z-fair { background: #fcf1dc; border: 1px solid #efd39c; } .lg.z-poor { background: #f9e5e1; border: 1px solid #e8b4ab; }
.lg.l-meas { height: 2px; background: var(--text); } .lg.l-proj { height: 0; border-top: 2px dashed var(--brand); }
.cmp { width: 100%; border-collapse: collapse; font-size: 0.9em; max-width: 900px; }
.cmp th, .cmp td { text-align: left; padding: 8px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.cmp th { color: var(--ink-2); font-weight: 600; font-size: 0.85em; }
.cmp tr.current td { background: var(--paper); font-weight: 600; }
.cmp .na-list { display: block; font-weight: 400; font-size: 0.85em; color: var(--ink-2); }
.notes-list { margin: 0; padding-left: 18px; font-size: 0.88em; color: var(--muted); max-width: 900px; }
.notes-list li { margin-bottom: 6px; }
.sources { margin: 10px 0 0; padding-left: 18px; font-size: 0.8em; color: var(--ink-2); columns: 2 320px; }
.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.related span { font-size: 0.85em; border: 1px solid var(--hair); border-radius: 999px; padding: 4px 12px; background: var(--paper); }
.dossier-empty { padding: 26px 0; color: var(--ink-2); }

.print-only { display: none; }
.method { margin-top: 28px; }

@media print {
  .hero-band, .utility, .config, .method, .livesum, .info-btn { display: none !important; }
  .workspace { display: block; padding: 0; }
  .lab { border: 0; padding: 0; }
  .print-only { display: flex !important; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 12px; }
  .print-brand .brand-logo { height: 22px; }
  .lab-table { min-width: 0; font-size: 8.5pt; }
  .lab-table input { border: 0; background: none; padding: 0; min-width: 0; }
  .q, .traj-card, .drivers li, tr { break-inside: avoid; }
  .strip rect, .dot, .traj rect, .wscale rect, .when { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .disclaimer { break-before: page; }
}


.inputs { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.icard { background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; padding: 16px 18px; }
.icard h2 { font-size: 1.1rem; margin: 0 0 10px; }
.igrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 16px; margin: 6px 0; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: 0.88em; min-width: 0; }
.f-wide { grid-column: 1 / -1; }
.f-lab { display: flex; gap: 6px; align-items: flex-start; font-weight: 600; }
.f select, .f input { font: inherit; font-size: 0.98em; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); width: 100%; min-width: 0; }
.f input { font-family: var(--mono); }
.f input.in-bad { border-color: var(--bad); background: var(--bad-soft); }
.f input:focus, .f select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.f .info-text { font-size: 0.92em; color: var(--ink-2); background: var(--paper); border-left: 3px solid var(--btn); padding: 6px 8px; border-radius: 4px; }
.f .info-text[hidden] { display: none; }
.f[hidden] { display: none; }
.hint { font-size: 0.8em; color: var(--ink-2); margin: 4px 0 8px; max-width: 760px; }
.small-btn { min-height: 0; padding: 2px 0; font-size: 0.85em; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 8px 0; }
.mcard { border: 1px solid var(--hair); border-radius: 10px; padding: 10px 12px; background: var(--paper); display: flex; flex-direction: column; gap: 8px; }
.mcard-pref { border-color: var(--btn-border); background: #fff8ec; }
.in-errors li.error { color: var(--bad); }
.adv summary { cursor: pointer; font-weight: 600; font-size: 0.9em; margin: 8px 0; }

.kpis { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.kpi { border-top: 1px solid var(--hair); padding-top: 8px; }
.kpi:first-child { border-top: 0; padding-top: 0; }
.kpi-l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.kpi-v { font-size: 1.45rem; font-weight: 800; line-height: 1.15; display: flex; align-items: center; gap: 8px; }
.kpi-d { font-size: 0.82em; color: var(--ink-2); }
.pill-s { display: inline-block; font-size: 0.72em; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pill-s.l0 { background: var(--ok-soft); color: var(--ok); }
.pill-s.l1 { background: var(--warn-soft); color: var(--warn); }
.pill-s.l2 { background: var(--bad-soft); color: var(--bad); }

.methods-t { width: 100%; border-collapse: collapse; font-size: 0.9em; max-width: 900px; }
.methods-t th, .methods-t td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.methods-t th { color: var(--ink-2); font-weight: 600; font-size: 0.85em; }
.methods-t tr.used td { background: var(--paper); font-weight: 600; }
.wscale .wp-dry { fill: #cfe6d7; } .wscale .wp-normal { fill: #e3efd6; } .wscale .wp-wet { fill: #f6e2b5; } .wscale .wp-gap { fill: #efd3c6; } .wscale .wp-veryWet { fill: #e19a8d; }
.wscale .wtarget { fill: none; stroke: var(--ok); stroke-width: 2; stroke-dasharray: 3 2; }

.lchart-wrap { max-width: 900px; }
.lchart { width: 100%; height: auto; display: block; font-family: var(--font); }
.lchart .risk { fill: #f9e5e1; }
.lchart .grid { stroke: var(--hair); stroke-width: 1; }
.lchart .axis, .lchart .tickmark { stroke: var(--ink-2); stroke-width: 1; }
.lchart .tick { font-size: 10px; fill: var(--ink-2); }
.lchart .axis-label { font-size: 11px; fill: var(--muted); font-weight: 600; }
.lchart .hl-label { font-size: 10px; font-weight: 600; }
.lchart .bub { stroke: var(--bad); stroke-width: 1.2; }
.lchart .bub-t { fill: var(--bad); }
.lchart .bub-cons { stroke: var(--bad); stroke-width: 2; stroke-dasharray: 6 4; }
.lchart .bub-cons-t { fill: var(--bad); }
.lchart .lim-hs { stroke: var(--text); stroke-width: 1.2; stroke-dasharray: 4 3; }
.lchart .lim-hs-t { fill: var(--text); }
.lchart .lim-to { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.lchart .lim-to-t { fill: var(--ink-2); }
.lchart .lim-i { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 5 4; }
.lchart .lim-i-t { fill: var(--ink-2); }
.lchart .c-hs { fill: none; stroke: var(--brand); stroke-width: 2.6; }
.lchart .c-to { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 3; }
.lchart .kmax { stroke: var(--text); stroke-width: 1; }
.lchart .kmax-pt { fill: var(--text); stroke: #fff; stroke-width: 1.5; }
.lchart .kmax-t { font-size: 10.5px; font-weight: 700; fill: var(--text); }
.lchart .probe { stroke: var(--btn-border); stroke-width: 1.5; }
.lchart .probe-pt { fill: var(--btn); stroke: var(--text); stroke-width: 1.5; }
.slider-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0 4px; max-width: 900px; }
.slider-row label { font-weight: 600; font-size: 0.9em; }
.slider-row input[type="range"] { flex: 1 1 260px; accent-color: var(--btn); }
.slider-out { font-family: var(--mono); font-weight: 700; min-width: 60px; }
.probe-text { font-size: 0.92em; margin: 4px 0; }
.probe-text.bad { color: var(--bad); font-weight: 700; }
.probe-text.ok { color: var(--ok); font-weight: 700; }
.lg.l-hs { height: 3px; background: var(--brand); } .lg.l-to { height: 0; border-top: 2px dashed var(--ink-2); }
.lg.l-bub { height: 0; border-top: 2px dashed var(--bad); } .lg.l-risk { background: #f9e5e1; border: 1px solid #e8b4ab; }
.lg.l-lim { height: 0; border-top: 2px dashed var(--text); }
.limits-t { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 0.9em; margin-top: 10px; }
.limits-t td { padding: 6px 8px; border-bottom: 1px solid var(--hair); }
.limits-t tr.gov td { font-weight: 700; background: var(--paper); }
.limits-t td:last-child { font-family: var(--mono); text-align: right; white-space: nowrap; }
.dur-t { border-collapse: collapse; font-size: 0.88em; margin-top: 6px; }
.dur-t td, .dur-t th { padding: 5px 10px 5px 0; border-bottom: 1px dotted var(--hair); text-align: left; }
.dur-t th { color: var(--ink-2); font-weight: 600; }
@media print { .inputs, .slider-row { display: none !important; } }
.lchart .hl-label, .lchart .kmax-t { paint-order: stroke; stroke: #fff; stroke-width: 3.5px; stroke-linejoin: round; }


.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; background: var(--paper); margin: 4px 0 2px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 0.88em; font-weight: 600; color: var(--ink-2); }
.seg input:checked + span { background: var(--text); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
#pQuick[hidden], #pMonths[hidden], #pNasa[hidden] { display: none; }
.months-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 620px) { .months-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mcell { display: flex; flex-direction: column; gap: 2px; font-size: 0.8em; color: var(--ink-2); font-weight: 600; }
.mcell input { font: 500 0.98em var(--mono); padding: 6px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); width: 100%; min-width: 0; }
.mcell input.in-bad { border-color: var(--bad); background: var(--bad-soft); }
.mcell input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.nasa-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 6px 0; padding: 12px 14px; border: 1px dashed var(--btn-border); border-radius: 10px; background: #fff8ec; }
.nasa-status { margin: 0; font-size: 0.88em; }
.nasa-status.ok { color: var(--text); }
.nasa-status.err { color: var(--bad); font-weight: 600; }
.nasa-status.busy { color: var(--ink-2); font-style: italic; }
.pos-grid { margin-top: 10px; }
.group-t { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand); margin: 14px 0 2px; font-weight: 600; }
.adv > summary { font-size: 1rem; font-weight: 700; margin: 0; }
.adv[open] > summary { margin-bottom: 6px; }
.consent-box { max-width: 560px; }
.consent-box ul { padding-left: 18px; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.gate[hidden] { display: none; }

.sum-cols { display: flex; justify-content: flex-end; gap: 18px; margin: -4px 0 6px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); }
.sum-cols .fut, .kpi-v .fut { color: var(--brand); }
.kpi-v { flex-wrap: wrap; }
.kpi-v .arrow { color: var(--ink-2); font-weight: 400; font-size: 0.8em; }
.livesum .small { font-size: 0.82em; margin: 6px 0 0; }

.future-tag { font-size: 0.85em; color: var(--brand); font-weight: 600; margin: 10px 0 0; }
.verdict-line { font-weight: 700; margin: 0 0 10px; max-width: 900px; }
.verdict-line.ok { color: var(--ok); }
.verdict-line.warn { color: var(--warn); }
.big-line { font-size: 1.02em; font-weight: 600; max-width: 900px; }
.dtable { border-collapse: collapse; font-size: 0.9em; margin: 8px 0 12px; min-width: 520px; }
.dtable th, .dtable td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.dtable thead th { color: var(--ink-2); font-weight: 600; font-size: 0.85em; border-bottom: 2px solid var(--text); }
.dtable tbody th { font-weight: 600; }
.dtable td { font-family: var(--mono); }
.dtable .fut { color: var(--brand); }
.dtable td.exc { color: var(--bad); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.limits-t thead th { text-align: left; color: var(--ink-2); font-weight: 600; font-size: 0.85em; padding: 6px 8px; border-bottom: 2px solid var(--text); }
.limits-t td:not(:first-child) { font-family: var(--mono); text-align: right; white-space: nowrap; }
.limits-t thead th:not(:first-child) { text-align: right; }
.hmap .tick { font-size: 11px; }
.hmap .hm-max { font-size: 11px; font-family: var(--mono); fill: var(--text); font-weight: 600; }
.chart-box { max-width: 900px; margin: 10px 0 0; }
.cchart, .bchart, .wchart, .hmap, .hm-legend { width: 100%; height: auto; display: block; font-family: var(--font); }
.cchart .grid, .bchart .grid, .wchart .grid { stroke: var(--hair); stroke-width: 1; }
.cchart .tick, .bchart .tick, .wchart .tick, .hmap .tick, .hm-legend .tick { font-size: 10px; fill: var(--ink-2); }
.cchart .axis-label, .bchart .axis-label, .wchart .axis-label { font-size: 11px; fill: var(--muted); font-weight: 600; }
.cchart .ref { stroke: var(--bad); stroke-width: 1.2; stroke-dasharray: 5 4; }
.cchart .ref2 { stroke: var(--ink-2); }
.cchart .ref-t { font-size: 10px; fill: var(--ink-2); }
.cchart .c-now { fill: none; stroke: var(--text); stroke-width: 2.2; }
.cchart .c-fut { fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-dasharray: 6 4; }
.cchart .p-now { fill: var(--text); }
.cchart .p-fut { fill: var(--surface); stroke: var(--brand); stroke-width: 1.6; }
.bchart .b-now { fill: var(--text); }
.bchart .b-fut { fill: var(--btn); }
.hm-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; max-width: 1100px; }
.hm-pair .chart-box { margin: 0; }
.hmap .hm-title { font-size: 12px; font-weight: 700; fill: var(--text); }
.hm-legend-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.hm-legend { max-width: 420px; }
.hm-legend .tickmark { stroke: var(--ink-2); stroke-width: 1; }
.wchart .day { stroke: var(--hair); stroke-width: 1.2; }
.wchart .lim { stroke: var(--bad); stroke-width: 1.4; stroke-dasharray: 6 4; }
.wchart .bub { stroke: #7a1f5c; stroke-width: 1.6; stroke-dasharray: 2 3; }
.wchart .w-hs { fill: none; stroke: var(--text); stroke-width: 2.4; }
.wchart .w-hsf { fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-dasharray: 6 4; }
.wchart .w-to { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
.wchart .w-amb { fill: none; stroke: #9bb4c4; stroke-width: 1.4; }
.lg.l-now, .lg.w-hs { height: 3px; background: var(--text); }
.lg.l-fut, .lg.w-hsf { height: 0; border-top: 2px dashed var(--brand); }
.lg.b-now { background: var(--text); }
.lg.b-fut { background: var(--btn); }
.lg.w-to { height: 2px; background: var(--ink-2); }
.lg.w-amb { height: 2px; background: #9bb4c4; }
.lg.w-lim { height: 0; border-top: 2px dashed var(--bad); }
.lg.w-bub { height: 0; border-top: 2px dotted #7a1f5c; }
.footer .credit { display: block; width: 100%; font-size: 0.85em; }
@media print {
  .hmap rect, .hm-legend rect, .bchart rect { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .chart-box, .hm-pair, .dtable { break-inside: avoid; }
}


.site-box { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--hair); }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 28px rgba(35, 40, 44, 0.14); max-height: 300px; overflow-y: auto; }
.combo-list[hidden] { display: none; }
.combo-list li { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 0.95em; }
.combo-list li span { color: var(--ink-2); font-size: 0.9em; }
.combo-list li[aria-selected="true"] { background: #fff1d9; }
.combo-list li.combo-note { cursor: default; color: var(--ink-2); font-style: italic; }
.site-now { margin: 4px 0 6px; font-size: 0.9em; }
.site-now.ok { font-weight: 600; }
.site-now.err { color: var(--bad); font-weight: 600; }
.site-now .btn-link { font-weight: 400; margin-left: 6px; }
.nasa-panel .btn[hidden], .site-now .btn[hidden] { display: none; }
#climateBox[hidden] { display: none; }
