/* 不是楼变弱了 — one stylesheet, no framework.

   Concrete and steel: a cool grey ground, one steel blue for anything you
   press, and a four-step signal scale that is the whole argument — below 34,
   between 34 and 67, above 67, and at or above new-build. Those four colours
   are the only saturated things on the page.

   Every bar width comes from a generated class at the bottom of this file
   rather than from a style attribute, because the Content-Security-Policy in
   the page refuses inline styles. That is not a workaround: it means a number
   pasted out of a report can never become markup. */

:root {
  --bg: #1a1c1e;
  --panel: #232629;
  --panel2: #2b2f33;
  --line: #383d42;
  --ink: #e9eaec;
  --dim: #a8aeb5;
  --faint: #767d85;
  --steel: #7fa3c4;
  --prone: #c9553f;
  --risk: #d69a3c;
  --ok: #4f9e70;
  --new: #5b8fbd;
  --radius: 11px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 14px calc(30px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.62 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", "Noto Sans SC", "PingFang SC", sans-serif;
  overflow-wrap: anywhere;
}
main { max-width: 800px; margin: 0 auto; }

.topbar {
  max-width: 800px; margin: 0 auto; padding: 22px 0 14px;
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; align-items: start;
}
.mark {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px;
  background: var(--steel); color: #12181e; font-size: 20px;
}
.titles h1 { margin: 0; font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; }
.titles p { margin: 4px 0 0; color: var(--dim); font-size: 14px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 14px 0;
}
.panel h2 { margin: 0 0 9px; font-size: 15px; }
.panel h3 { margin: 20px 0 6px; font-size: 14px; }
.sub { margin: 0 0 10px; color: var(--dim); font-size: 14px; }
.sub:last-child { margin-bottom: 0; }
.tiny { margin: 10px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.55; }
.quiet { background: transparent; }
code {
  font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px;
}
.eq {
  margin: 10px 0; padding: 12px 13px; background: var(--panel2);
  border-left: 3px solid var(--steel); border-radius: 0 8px 8px 0;
  color: var(--ink); font-size: 13.5px; line-height: 1.6;
}

/* ------------------------------------------------------------------ form */

.egs { display: grid; gap: 8px; margin: 12px 0 16px; }
.eg {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--panel2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font: inherit;
}
.eg b { display: block; font-size: 14px; }
.eg span { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.eg.on { border-color: var(--steel); box-shadow: inset 0 0 0 1px var(--steel); }
.eg:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--steel); outline-offset: 2px;
}

.grid2 { display: grid; gap: 11px; }
@media (min-width: 600px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.field label { display: block; color: var(--dim); font-size: 12.5px; margin-bottom: 4px; }
.field input, .field select {
  width: 100%; min-width: 0; background: var(--panel2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit;
  font-size: 15px;
}
.withunit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
.withunit input { border-radius: 8px 0 0 8px; border-right: 0; }
.withunit i {
  display: grid; place-items: center; padding: 0 10px; font-style: normal;
  background: var(--line); color: var(--dim); font-size: 12.5px; border-radius: 0 8px 8px 0;
}
/* A leading unit rather than a trailing one, for "R 1.30". */
.withunit:has(i.pre) { grid-template-columns: auto minmax(0, 1fr); }
.withunit i.pre { border-radius: 8px 0 0 8px; order: -1; }
.withunit:has(i.pre) input { border-radius: 0 8px 8px 0; border-right: 1px solid var(--line); border-left: 0; }

/* The preset and the number it fills in, side by side: choosing a level sets
   the factor, and typing a factor detaches from the level. Both are real
   inputs because the page says they are. */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 7px; }
.lbl { display: block; margin: 6px 0 7px; color: var(--dim); font-size: 13.5px; line-height: 1.55; }
textarea {
  width: 100%; min-width: 0; resize: vertical;
  background: var(--panel2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px; padding: 10px;
  font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --------------------------------------------------------------- verdict */

.verdict {
  border: 1px solid var(--line); border-left: 4px solid var(--steel);
  border-radius: var(--radius); background: var(--panel2); padding: 14px 15px; margin: 16px 0 12px;
}
.verdict > b { display: block; font-size: 20px; line-height: 1.3; }
.verdict .say { margin: 7px 0 0; color: var(--dim); font-size: 13.5px; }
.verdict.ok { border-left-color: var(--ok); }
.verdict.warn { border-left-color: var(--risk); }
.verdict.bad { border-left-color: var(--prone); }
.verdict.na { border-left-color: var(--faint); }

.findings { margin-top: 14px; }
.finding { border-top: 1px solid var(--line); padding: 13px 0; }
.finding:first-child { border-top: 0; }
.finding:last-child { padding-bottom: 0; }
.finding > b { display: block; font-size: 14.5px; }
.finding > p { margin: 5px 0 0; color: var(--dim); font-size: 13.5px; }
.finding.ok > b { color: var(--ok); }
.finding.warn > b { color: var(--risk); }
.finding.bad > b { color: var(--prone); }

/* ----------------------------------------------------------- scale bar */

svg.scale { display: block; width: 100%; height: auto; margin: 4px 0 10px; }
.zone { opacity: 0.32; }
.zone.prone { fill: var(--prone); }
.zone.risk { fill: var(--risk); }
.zone.ok { fill: var(--ok); }
.zone.new { fill: var(--new); }
.tick { stroke: var(--faint); stroke-width: 1; }
.ticklab { fill: var(--faint); font-size: 10px; font-family: inherit; }
.marker.prone { fill: var(--prone); }
.marker.risk { fill: var(--risk); }
.marker.ok { fill: var(--ok); }
.marker.new { fill: var(--new); }
.nowlab { font-size: 12px; font-weight: 700; font-family: inherit; }
.nowlab.prone { fill: var(--prone); }
.nowlab.risk { fill: var(--risk); }
.nowlab.ok { fill: var(--ok); }
.nowlab.new { fill: var(--new); }
.moved { stroke: var(--faint); stroke-width: 1.4; stroke-dasharray: 3 3; }
.wasdot { fill: var(--faint); }
.waslab { fill: var(--faint); font-size: 10px; font-family: inherit; }

/* ------------------------------------------------------------- the parts */

.parts { display: grid; gap: 9px; margin-top: 4px; }
.part {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 11px;
  align-items: baseline;
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; background: var(--panel2);
}
.part .n {
  grid-row: 1 / span 2; align-self: center;
  font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--steel);
}
.part b { font-size: 14px; }
.part .d { color: var(--dim); font-size: 12.5px; }

/* --------------------------------------------------------- element bars */

.bars { display: grid; gap: 9px; margin: 6px 0 4px; }
.barrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; }
.bn { grid-column: 1 / span 2; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.bn b { font-size: 13.5px; font-weight: 600; }
.bn .tag {
  font-size: 11px; color: var(--prone); border: 1px solid var(--prone);
  border-radius: 4px; padding: 0 5px; white-space: nowrap;
}
.track {
  position: relative; height: 14px; background: var(--panel2);
  border-radius: 4px; overflow: hidden; min-width: 0;
}
.fill { height: 100%; border-radius: 4px 0 0 4px; }
.fill.prone { background: var(--prone); }
.fill.risk { background: var(--risk); }
.fill.ok { background: var(--ok); }
.fill.new { background: var(--new); }
/* .thr, not .mark: the header's brand square is .mark, and this rule sits
   later in the file, so naming both the same made the brand
   position: absolute; width: 1px — which collapsed the header grid and
   rendered the title one character per line. A class name is a global, and
   this file is long enough to forget that in. */
.thr { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink); opacity: 0.45; }
.bv {
  font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 650;
  min-width: 44px; text-align: right;
}
.barrow.governs .bn b { color: var(--ink); }
.barrow:not(.governs) .bn b { color: var(--dim); }

/* ------------------------------------------------------------ staircase */

.stairs { display: grid; gap: 8px; }
.stair {
  display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 3px 12px; align-items: baseline;
  border: 1px solid var(--line); border-left: 3px solid var(--faint);
  border-radius: 0 9px 9px 0; padding: 10px 12px; background: var(--panel2);
}
.stair b {
  grid-row: 1 / span 2; align-self: center;
  font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.stair span { color: var(--dim); font-size: 12.5px; }
.stair .then { color: var(--faint); }
.stair.now { border-left-color: var(--faint); }
.stair.now b { color: var(--dim); }
.stair.prone { border-left-color: var(--prone); }
.stair.prone b { color: var(--prone); }
.stair.risk { border-left-color: var(--risk); }
.stair.risk b { color: var(--risk); }
.stair.ok { border-left-color: var(--ok); }
.stair.ok b { color: var(--ok); }
.stair.new { border-left-color: var(--new); }
.stair.new b { color: var(--new); }

/* ---------------------------------------------------------------- lists */

.bad { border-color: var(--prone); }
.badlist { margin: 0; padding-left: 18px; color: var(--dim); font-size: 13px; }
.badlist li { margin: 6px 0; }
.badlist b { color: var(--ink); }

.foot {
  max-width: 800px; margin: 22px auto 0; padding-top: 14px;
  border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px;
}

/* ------------------------------------------------- generated width classes

   Percentages 0–100, as classes, because a Content-Security-Policy with no
   unsafe-inline drops a style attribute silently — and a bar chart whose bars
   are all zero pixels wide looks like a design decision rather than a bug.
   Generated, so the file is long here and nowhere else. */
.fill.w0 { width: 0%; }
.fill.w1 { width: 1%; }
.fill.w2 { width: 2%; }
.fill.w3 { width: 3%; }
.fill.w4 { width: 4%; }
.fill.w5 { width: 5%; }
.fill.w6 { width: 6%; }
.fill.w7 { width: 7%; }
.fill.w8 { width: 8%; }
.fill.w9 { width: 9%; }
.fill.w10 { width: 10%; }
.fill.w11 { width: 11%; }
.fill.w12 { width: 12%; }
.fill.w13 { width: 13%; }
.fill.w14 { width: 14%; }
.fill.w15 { width: 15%; }
.fill.w16 { width: 16%; }
.fill.w17 { width: 17%; }
.fill.w18 { width: 18%; }
.fill.w19 { width: 19%; }
.fill.w20 { width: 20%; }
.fill.w21 { width: 21%; }
.fill.w22 { width: 22%; }
.fill.w23 { width: 23%; }
.fill.w24 { width: 24%; }
.fill.w25 { width: 25%; }
.fill.w26 { width: 26%; }
.fill.w27 { width: 27%; }
.fill.w28 { width: 28%; }
.fill.w29 { width: 29%; }
.fill.w30 { width: 30%; }
.fill.w31 { width: 31%; }
.fill.w32 { width: 32%; }
.fill.w33 { width: 33%; }
.fill.w34 { width: 34%; }
.fill.w35 { width: 35%; }
.fill.w36 { width: 36%; }
.fill.w37 { width: 37%; }
.fill.w38 { width: 38%; }
.fill.w39 { width: 39%; }
.fill.w40 { width: 40%; }
.fill.w41 { width: 41%; }
.fill.w42 { width: 42%; }
.fill.w43 { width: 43%; }
.fill.w44 { width: 44%; }
.fill.w45 { width: 45%; }
.fill.w46 { width: 46%; }
.fill.w47 { width: 47%; }
.fill.w48 { width: 48%; }
.fill.w49 { width: 49%; }
.fill.w50 { width: 50%; }
.fill.w51 { width: 51%; }
.fill.w52 { width: 52%; }
.fill.w53 { width: 53%; }
.fill.w54 { width: 54%; }
.fill.w55 { width: 55%; }
.fill.w56 { width: 56%; }
.fill.w57 { width: 57%; }
.fill.w58 { width: 58%; }
.fill.w59 { width: 59%; }
.fill.w60 { width: 60%; }
.fill.w61 { width: 61%; }
.fill.w62 { width: 62%; }
.fill.w63 { width: 63%; }
.fill.w64 { width: 64%; }
.fill.w65 { width: 65%; }
.fill.w66 { width: 66%; }
.fill.w67 { width: 67%; }
.fill.w68 { width: 68%; }
.fill.w69 { width: 69%; }
.fill.w70 { width: 70%; }
.fill.w71 { width: 71%; }
.fill.w72 { width: 72%; }
.fill.w73 { width: 73%; }
.fill.w74 { width: 74%; }
.fill.w75 { width: 75%; }
.fill.w76 { width: 76%; }
.fill.w77 { width: 77%; }
.fill.w78 { width: 78%; }
.fill.w79 { width: 79%; }
.fill.w80 { width: 80%; }
.fill.w81 { width: 81%; }
.fill.w82 { width: 82%; }
.fill.w83 { width: 83%; }
.fill.w84 { width: 84%; }
.fill.w85 { width: 85%; }
.fill.w86 { width: 86%; }
.fill.w87 { width: 87%; }
.fill.w88 { width: 88%; }
.fill.w89 { width: 89%; }
.fill.w90 { width: 90%; }
.fill.w91 { width: 91%; }
.fill.w92 { width: 92%; }
.fill.w93 { width: 93%; }
.fill.w94 { width: 94%; }
.fill.w95 { width: 95%; }
.fill.w96 { width: 96%; }
.fill.w97 { width: 97%; }
.fill.w98 { width: 98%; }
.fill.w99 { width: 99%; }
.fill.w100 { width: 100%; }

/* Threshold marks inside a track, at the same resolution. */
.thr.m0 { left: 0%; }
.thr.m1 { left: 1%; }
.thr.m2 { left: 2%; }
.thr.m3 { left: 3%; }
.thr.m4 { left: 4%; }
.thr.m5 { left: 5%; }
.thr.m6 { left: 6%; }
.thr.m7 { left: 7%; }
.thr.m8 { left: 8%; }
.thr.m9 { left: 9%; }
.thr.m10 { left: 10%; }
.thr.m11 { left: 11%; }
.thr.m12 { left: 12%; }
.thr.m13 { left: 13%; }
.thr.m14 { left: 14%; }
.thr.m15 { left: 15%; }
.thr.m16 { left: 16%; }
.thr.m17 { left: 17%; }
.thr.m18 { left: 18%; }
.thr.m19 { left: 19%; }
.thr.m20 { left: 20%; }
.thr.m21 { left: 21%; }
.thr.m22 { left: 22%; }
.thr.m23 { left: 23%; }
.thr.m24 { left: 24%; }
.thr.m25 { left: 25%; }
.thr.m26 { left: 26%; }
.thr.m27 { left: 27%; }
.thr.m28 { left: 28%; }
.thr.m29 { left: 29%; }
.thr.m30 { left: 30%; }
.thr.m31 { left: 31%; }
.thr.m32 { left: 32%; }
.thr.m33 { left: 33%; }
.thr.m34 { left: 34%; }
.thr.m35 { left: 35%; }
.thr.m36 { left: 36%; }
.thr.m37 { left: 37%; }
.thr.m38 { left: 38%; }
.thr.m39 { left: 39%; }
.thr.m40 { left: 40%; }
.thr.m41 { left: 41%; }
.thr.m42 { left: 42%; }
.thr.m43 { left: 43%; }
.thr.m44 { left: 44%; }
.thr.m45 { left: 45%; }
.thr.m46 { left: 46%; }
.thr.m47 { left: 47%; }
.thr.m48 { left: 48%; }
.thr.m49 { left: 49%; }
.thr.m50 { left: 50%; }
.thr.m51 { left: 51%; }
.thr.m52 { left: 52%; }
.thr.m53 { left: 53%; }
.thr.m54 { left: 54%; }
.thr.m55 { left: 55%; }
.thr.m56 { left: 56%; }
.thr.m57 { left: 57%; }
.thr.m58 { left: 58%; }
.thr.m59 { left: 59%; }
.thr.m60 { left: 60%; }
.thr.m61 { left: 61%; }
.thr.m62 { left: 62%; }
.thr.m63 { left: 63%; }
.thr.m64 { left: 64%; }
.thr.m65 { left: 65%; }
.thr.m66 { left: 66%; }
.thr.m67 { left: 67%; }
.thr.m68 { left: 68%; }
.thr.m69 { left: 69%; }
.thr.m70 { left: 70%; }
.thr.m71 { left: 71%; }
.thr.m72 { left: 72%; }
.thr.m73 { left: 73%; }
.thr.m74 { left: 74%; }
.thr.m75 { left: 75%; }
.thr.m76 { left: 76%; }
.thr.m77 { left: 77%; }
.thr.m78 { left: 78%; }
.thr.m79 { left: 79%; }
.thr.m80 { left: 80%; }
.thr.m81 { left: 81%; }
.thr.m82 { left: 82%; }
.thr.m83 { left: 83%; }
.thr.m84 { left: 84%; }
.thr.m85 { left: 85%; }
.thr.m86 { left: 86%; }
.thr.m87 { left: 87%; }
.thr.m88 { left: 88%; }
.thr.m89 { left: 89%; }
.thr.m90 { left: 90%; }
.thr.m91 { left: 91%; }
.thr.m92 { left: 92%; }
.thr.m93 { left: 93%; }
.thr.m94 { left: 94%; }
.thr.m95 { left: 95%; }
.thr.m96 { left: 96%; }
.thr.m97 { left: 97%; }
.thr.m98 { left: 98%; }
.thr.m99 { left: 99%; }
.thr.m100 { left: 100%; }
