/* 2026-12-04 v3.18.0 TRANSFORMER RECORDS & AREA ENGINEER ANALYSIS — every rule under .tx (the five pages: register + record, field entry,
   upload, report, limits & costs) or .tx-* (the forms opened in the dashboard's window). Colours come from the dashboard's own tokens, so light
   and dark both work; a band, class or risk level is always shown in WORDS beside its colour (never colour alone). Phone width: one column,
   16 px gutters, touch targets of at least 44 px. */
.tx {
  --tx-a: #067647; --tx-a-bg: #dcfae6; --tx-b: #3b7c0f; --tx-b-bg: #eefbdc; --tx-c: #93370d; --tx-c-bg: #fef0c7;
  --tx-d: #b93815; --tx-d-bg: #ffe6d5; --tx-e: #b42318; --tx-e-bg: #fee4e2; --tx-n: #475467; --tx-n-bg: #f2f4f7;
  --tx-info: #175cd3; --tx-info-bg: #eff8ff; --tx-soft: #f8fafc; --tx-focus: #2a78d6;
  max-width: 1400px;
}
.tx-ov, .tx-mod { --tx-a: #067647; --tx-a-bg: #dcfae6; --tx-c: #93370d; --tx-c-bg: #fef0c7; --tx-e: #b42318; --tx-e-bg: #fee4e2; --tx-n: #475467; --tx-n-bg: #f2f4f7; --tx-info: #175cd3; --tx-info-bg: #eff8ff; --tx-soft: #f8fafc; --tx-focus: #2a78d6; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .tx, :root:where(:not([data-theme="light"])) .tx-mod {
    --tx-a: #75e0a7; --tx-a-bg: #053321; --tx-b: #b3e66e; --tx-b-bg: #1f3307; --tx-c: #fedf89; --tx-c-bg: #3d2a06; --tx-d: #f9a87a; --tx-d-bg: #3e1c0a;
    --tx-e: #fda29b; --tx-e-bg: #3d0f0b; --tx-n: #cfd4dc; --tx-n-bg: #24272b; --tx-info: #8cc2ff; --tx-info-bg: #102a43; --tx-soft: #1b1d1f; --tx-focus: #8cc2ff;
  }
}
:root[data-theme="dark"] .tx, :root[data-theme="dark"] .tx-mod {
  --tx-a: #75e0a7; --tx-a-bg: #053321; --tx-b: #b3e66e; --tx-b-bg: #1f3307; --tx-c: #fedf89; --tx-c-bg: #3d2a06; --tx-d: #f9a87a; --tx-d-bg: #3e1c0a;
  --tx-e: #fda29b; --tx-e-bg: #3d0f0b; --tx-n: #cfd4dc; --tx-n-bg: #24272b; --tx-info: #8cc2ff; --tx-info-bg: #102a43; --tx-soft: #1b1d1f; --tx-focus: #8cc2ff;
}

/* ---------- page frame ---------- */
.tx-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; justify-content: space-between; margin: 2px 0 14px; }
.tx-head h2 { font-size: 21px; line-height: 1.2; letter-spacing: -.2px; }
.tx-head .sub { margin-top: 3px; max-width: 760px; }
.tx-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tx .btn, .tx-mod .btn { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.tx .btn.small { min-height: 30px; }
.tx .btn:focus-visible, .tx-mod .btn:focus-visible, .tx a:focus-visible { outline: 2px solid var(--tx-focus); outline-offset: 2px; }
.tx .btn[disabled], .tx-mod .btn[disabled] { opacity: .5; cursor: not-allowed; }
.tx .card { border-radius: 14px; }
.tx .card > h3, .tx-h3 { font-size: 15.5px; margin: 0 0 4px; }
.tx-note { color: var(--ink-2); font-size: 12.5px; margin: 8px 0 0; }
.tx-how { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.tx-how summary { cursor: pointer; font-weight: 600; color: var(--tx-info); }
.tx-how ul { margin: 6px 0 0; padding-left: 18px; }
.tx-how li { margin: 3px 0; }
.tx-empty { border: 1.5px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--ink-2); background: var(--tx-soft); }
.tx-empty b { color: var(--ink); display: block; margin-bottom: 4px; }
.tx-load { padding: 40px 10px; text-align: center; color: var(--muted); }
.tx-err { border: 1px solid var(--tx-e); background: var(--tx-e-bg); color: var(--tx-e); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.tx-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.tx-two > .card { margin: 0; }
.tx-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tx-stack > * + * { margin-top: 16px; }
.tx-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tx-sp { flex: 1; }
.tx-muted { color: var(--muted); }
.tx-mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.tx-hl { background: var(--tx-info-bg); color: var(--tx-info); border-radius: 6px; padding: 0 4px; }

/* ---------- chips: band (A–E), class, risk, status — colour plus words ---------- */
.tx-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 2px 10px 2px 3px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; line-height: 1.5; vertical-align: middle; }
.tx-chip > i { font-style: normal; display: inline-grid; place-items: center; min-width: 21px; height: 21px; border-radius: 99px; font-size: 12px; font-weight: 800; color: #fff; padding: 0 5px; }
.tx-chip.plain { padding: 2px 10px; }
.tx-chip.A { background: var(--tx-a-bg); color: var(--tx-a); } .tx-chip.A > i { background: #079455; }
.tx-chip.B { background: var(--tx-b-bg); color: var(--tx-b); } .tx-chip.B > i { background: #4ca30d; }
.tx-chip.C { background: var(--tx-c-bg); color: var(--tx-c); } .tx-chip.C > i { background: #dc6803; }
.tx-chip.D { background: var(--tx-d-bg); color: var(--tx-d); } .tx-chip.D > i { background: #e04f16; }
.tx-chip.E { background: var(--tx-e-bg); color: var(--tx-e); } .tx-chip.E > i { background: #d92d20; }
.tx-chip.N { background: var(--tx-n-bg); color: var(--tx-n); border: 1px dashed var(--axis); } .tx-chip.N > i { background: #98a2b3; }
.tx-chip.info { background: var(--tx-info-bg); color: var(--tx-info); }
.tx-chip.big { font-size: 15px; padding: 4px 14px 4px 4px; } .tx-chip.big > i { min-width: 30px; height: 30px; font-size: 16px; }
.tx-flag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: var(--tx-n-bg); color: var(--tx-n); margin: 1px 2px 1px 0; white-space: nowrap; }
.tx-flag.bad { background: var(--tx-e-bg); color: var(--tx-e); } .tx-flag.warn { background: var(--tx-c-bg); color: var(--tx-c); } .tx-flag.ok { background: var(--tx-a-bg); color: var(--tx-a); }
.tx-flag.info { background: var(--tx-info-bg); color: var(--tx-info); }
.tx-banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 11px 14px; margin: 0 0 14px; background: var(--tx-c-bg); color: var(--tx-c); border: 1px solid color-mix(in srgb, var(--tx-c) 30%, transparent); font-size: 13.5px; }
.tx-banner b { color: inherit; }
.tx-banner.info { background: var(--tx-info-bg); color: var(--tx-info); border-color: color-mix(in srgb, var(--tx-info) 25%, transparent); }
.tx-banner.ok { background: var(--tx-a-bg); color: var(--tx-a); border-color: color-mix(in srgb, var(--tx-a) 25%, transparent); }
.tx-banner.bad { background: var(--tx-e-bg, #fee4e2); color: var(--tx-e, #b42318); border-color: color-mix(in srgb, var(--tx-e, #b42318) 25%, transparent); }
.tx-banner .btn { margin-left: auto; flex: none; }
.tx-meter { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-meter > span { display: inline-block; width: 46px; height: 7px; border-radius: 9px; background: var(--grid); overflow: hidden; }
.tx-meter > span > b { display: block; height: 100%; background: var(--accent, #14a38b); border-radius: 9px; }
.tx-meter.lo > span > b { background: #f79009; } .tx-meter.vlo > span > b { background: #d92d20; }

/* ---------- search + filters ---------- */
.tx-search { position: relative; flex: 1 1 320px; max-width: 560px; }
.tx-search input { width: 100%; min-height: 46px; padding: 10px 14px 10px 40px; font-size: 15.5px; border-radius: 12px; border: 1.5px solid var(--axis); }
.tx-search input:focus { border-color: var(--tx-focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tx-focus) 22%, transparent); }
.tx-search::before { content: ''; position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; margin-top: -9px; border: 2px solid var(--muted); border-radius: 50%; }
.tx-search::after { content: ''; position: absolute; left: 27px; top: 50%; width: 7px; height: 2px; margin-top: 5px; background: var(--muted); transform: rotate(45deg); border-radius: 2px; }
.tx-filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin: 10px 0 12px; }
.tx-filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.tx-filters select, .tx-filters input { min-height: 38px; min-width: 130px; }
.tx-count { color: var(--ink-2); font-size: 13px; margin: 0 0 8px; }
.tx-seg2 { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tx-seg2 button { font: inherit; font-weight: 600; border: 0; background: var(--card); color: var(--ink-2); padding: 8px 14px; min-height: 38px; cursor: pointer; border-right: 1px solid var(--line); }
.tx-seg2 button:last-child { border-right: 0; }
.tx-seg2 button.on { background: var(--navy); color: #fff; }

/* ---------- register list (a table on a PC, cards on a phone) ---------- */
.tx-list table { font-size: 13.5px; }
.tx-list tbody tr { cursor: pointer; }
.tx-list tbody tr:hover td { background: var(--tx-soft); }
.tx-list td { vertical-align: middle; }
.tx-list .tx-code { font-weight: 700; font-size: 14px; }
.tx-list th button { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.tx-list th button[aria-sort="ascending"]::after { content: ' ▲'; font-size: 10px; } .tx-list th button[aria-sort="descending"]::after { content: ' ▼'; font-size: 10px; }
.tx-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; color: var(--ink-2); flex-wrap: wrap; }
.tx-map { height: 440px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: var(--tx-soft); }
.tx-map.small { height: 230px; }
.tx-pin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); display: block; }
.tx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin: 8px 0 0; align-items: center; }
.tx-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 1.5px solid #fff; box-shadow: 0 0 0 1px var(--axis); }

/* ---------- the record page ---------- */
.tx-back { margin-bottom: 10px; }
.tx-rhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; align-items: start; }
.tx-rhead h2 { font-size: 24px; letter-spacing: -.3px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tx-rhead .tx-place { font-size: 15px; color: var(--ink-2); margin-top: 2px; }
.tx-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13.5px; }
.tx-facts span { color: var(--ink-2); } .tx-facts b { color: var(--ink); font-weight: 600; }
.tx-hi { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tx-hi .tx-why { font-size: 13px; }
.tx-quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.tx-qb { font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 8px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font-weight: 650; font-size: 14px; text-align: center; line-height: 1.2; transition: border-color .12s, transform .08s, box-shadow .12s; }
.tx-qb:hover { border-color: var(--accent, #14a38b); box-shadow: 0 2px 10px rgba(16,24,40,.08); }
.tx-qb:active { transform: scale(.98); }
.tx-qb svg { width: 26px; height: 26px; fill: none; stroke: var(--accent, #14a38b); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tx-qb small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.tx-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); margin: 4px 0 14px; }
@media (min-width: 768px) { .tx-tabs { flex-wrap: wrap; overflow-x: visible; } }
@media (max-width: 767px) { .tx-tabs { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 28px; } }
.tx-tabs button.empty { color: var(--muted); font-weight: 500; }
.tx-tabs button { font: inherit; flex: none; border: 0; background: none; padding: 10px 13px; min-height: 44px; color: var(--ink-2); font-weight: 600; cursor: pointer; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tx-tabs button.on { color: var(--ink); border-bottom-color: var(--accent, #14a38b); }
.tx-tabs button .n { font-size: 11px; font-weight: 700; background: var(--tx-n-bg); color: var(--tx-n); padding: 0 6px; border-radius: 99px; margin-left: 4px; }
.tx-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 18px; }
.tx-kv > div { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.tx-kv dt, .tx-kv .k { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.tx-kv dd, .tx-kv .v { margin: 1px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.tx-kv .v.none { color: var(--muted); font-style: italic; }
.tx-sec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 8px; }
.tx-sec h3 { font-size: 15.5px; margin: 0; }
.tx-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tx-photos a, .tx-photos .ph { display: block; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--tx-soft); position: relative; }
.tx-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tx-photos .ph button { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.tx-factor { display: grid; grid-template-columns: 150px minmax(0, 1fr) 60px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tx-factor .bar { height: 10px; border-radius: 9px; background: var(--grid); overflow: hidden; }
.tx-factor .bar b { display: block; height: 100%; border-radius: 9px; }
.tx-factor .ev { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); margin-top: -2px; }
.tx-factor .na { color: var(--muted); font-style: italic; }
.tx-actions-mini { margin: 0; padding: 0; list-style: none; }
.tx-actions-mini li { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* ---------- timeline ---------- */
.tx-tlbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.tx-tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tx-tl::before { content: ''; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tx-ev { position: relative; padding: 0 0 14px 36px; }
.tx-ev::before { content: ''; position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--accent, #14a38b); }
.tx-ev.s-AUTO::before { border-color: #7a5af8; } .tx-ev.s-UPLOAD::before { border-color: #2a78d6; } .tx-ev.s-FIELD::before { border-color: #f79009; } .tx-ev.s-MIGRATION::before { border-color: #98a2b3; }
.tx-ev .box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); }
.tx-ev .top1 { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tx-ev .t { font-weight: 700; } .tx-ev .when { color: var(--ink-2); font-size: 12.5px; }
.tx-ev .sum { margin-top: 3px; font-size: 13.5px; }
.tx-ev .meta { margin-top: 5px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.tx-ev .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.tx-ev.off .box { background: var(--tx-soft); }
.tx-ev.off .t, .tx-ev.off .sum { text-decoration: line-through; color: var(--muted); }
.tx-ev .why { font-size: 12.5px; color: var(--tx-c); margin-top: 4px; }
.tx-ev details { margin-top: 6px; font-size: 12.5px; }
.tx-ev details summary { cursor: pointer; color: var(--tx-info); font-weight: 600; }
.tx-ev details .tx-kv { margin-top: 6px; }

/* ---------- forms (in the window, on the field page) ---------- */
.tx-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.tx-form.one { grid-template-columns: minmax(0, 1fr); }
.tx-fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tx-fld.wide { grid-column: 1 / -1; }
.tx-fld > label, .tx-fld > .l { font-size: 13px; font-weight: 650; color: var(--ink); }
.tx-fld > label .req, .tx-fld > .l .req { color: var(--crit); }
.tx-fld .hint { font-size: 12px; color: var(--muted); }
.tx-fld .bad { font-size: 12.5px; color: var(--crit); font-weight: 600; }
.tx-fld input, .tx-fld select, .tx-fld textarea { width: 100%; min-height: 44px; font-size: 15px; border-radius: 10px; border: 1.5px solid var(--axis); padding: 9px 11px; background: var(--card); color: var(--ink); font-family: inherit; }
.tx-fld textarea { min-height: 76px; resize: vertical; }
.tx-fld input:focus, .tx-fld select:focus, .tx-fld textarea:focus { border-color: var(--tx-focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tx-focus) 22%, transparent); }
.tx-fld.err input, .tx-fld.err select, .tx-fld.err textarea { border-color: var(--crit); }
.tx-unitbox { display: flex; align-items: stretch; }
.tx-unitbox input { border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1; min-width: 0; }
.tx-unitbox .u { display: grid; place-items: center; padding: 0 11px; border: 1.5px solid var(--axis); border-left: 0; border-radius: 0 10px 10px 0; background: var(--tx-soft); color: var(--ink-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tx-segs { display: flex; flex-wrap: wrap; gap: 6px; }
.tx-segs label { position: relative; }
.tx-segs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tx-segs span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 64px; padding: 6px 14px; border: 1.5px solid var(--axis); border-radius: 10px; font-weight: 600; cursor: pointer; background: var(--card); color: var(--ink); font-size: 14px; user-select: none; }
.tx-segs input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.tx-segs input:focus-visible + span { outline: 2px solid var(--tx-focus); outline-offset: 2px; }
.tx-segs.multi input:checked + span::before { content: '✓ '; }
.tx-segs.ok3 input[value="OK"]:checked + span { background: #079455; border-color: #079455; }
.tx-segs.ok3 input[value="NA"]:checked + span { background: #667085; border-color: #667085; }
.tx-segs.ok3 input:not([value="OK"]):not([value="NA"]):checked + span { background: #d92d20; border-color: #d92d20; }
.tx-mat { display: grid; grid-template-columns: minmax(0, 1fr) 110px 44px; gap: 6px; align-items: center; }
.tx-mat + .tx-mat { margin-top: 6px; }
.tx-formbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.tx-formbar .tx-status { margin-right: auto; color: var(--ink-2); font-size: 13px; }
.tx-btnbig { min-height: 50px !important; font-size: 16px !important; padding: 10px 22px !important; border-radius: 12px !important; }
.tx-gps { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.tx-gps .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.tx-gps .dot.ok { background: #12b76a; } .tx-gps .dot.warn { background: #f79009; }
.tx-check { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tx-ci { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tx-ci:last-child { border-bottom: 0; }
.tx-ci.defect { background: color-mix(in srgb, var(--tx-e-bg) 70%, transparent); }
.tx-ci .nm { font-weight: 600; font-size: 14px; }
.tx-ci .more { grid-column: 1 / -1; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; }
.tx-ci .more select, .tx-ci .more input { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--axis); padding: 8px 10px; font-size: 14.5px; }
.tx-ci .tx-segs span { min-width: 58px; min-height: 44px; padding: 4px 10px; font-size: 13.5px; }
.tx-ci .tx-segs { gap: 8px; }
.tx-field .btn { min-height: 44px; }
.tx-allok { margin: 0 0 10px; }
.tx-mod .modal-head h2 { font-size: 19px; }
.tx-mod .tx-sub2 { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

/* ---------- field page (phone first) ---------- */
.tx-field { max-width: 760px; }
.tx-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.tx-pick .tx-search { flex: 1 1 260px; max-width: none; }
.tx-pick .btn { min-height: 46px; }
.tx-hits { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tx-hit { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; font: inherit; padding: 12px 14px; min-height: 56px; background: var(--card); color: var(--ink); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.tx-hit:last-child { border-bottom: 0; }
.tx-hit:hover, .tx-hit:focus-visible { background: var(--tx-soft); }
.tx-hit b { font-size: 15px; } .tx-hit .sub { font-size: 12.5px; }
.tx-hit .d { margin-left: auto; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.tx-cur { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 1.5px solid var(--accent, #14a38b); background: var(--hero-bg, #e8f5f2); border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.tx-cur b { font-size: 18px; } .tx-cur .sub { color: var(--ink-2); }
.tx-big6 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tx-big6 .tx-qb { min-height: 104px; font-size: 15px; }
.tx-big6 .tx-qb svg { width: 32px; height: 32px; }
.tx-queue { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; background: var(--tx-c-bg); color: var(--tx-c); font-weight: 600; font-size: 14px; }
.tx-queue.ok { background: var(--tx-a-bg); color: var(--tx-a); }
.tx-queue .btn { margin-left: auto; }
.tx-drafts { margin-top: 14px; }
.tx-drafts li { margin: 4px 0; }
.tx-done { text-align: center; padding: 26px 10px; }
.tx-done .big { font-size: 46px; line-height: 1; color: #12b76a; }

/* ---------- upload wizard ---------- */
.tx-steps { display: flex; gap: 0; list-style: none; margin: 0 0 16px; padding: 0; counter-reset: s; overflow-x: auto; }
.tx-steps li { flex: 1 0 120px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: center; position: relative; padding: 0 4px; }
.tx-steps li::before { counter-increment: s; content: counter(s); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--tx-n-bg); color: var(--tx-n); font-weight: 800; z-index: 1; border: 2px solid var(--card); }
.tx-steps li::after { content: ''; position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--line); }
.tx-steps li:last-child::after { display: none; }
.tx-steps li.on { color: var(--ink); } .tx-steps li.on::before { background: var(--navy); color: #fff; }
.tx-steps li.done { color: var(--ink-2); } .tx-steps li.done::before { content: '✓'; background: #079455; color: #fff; }
.tx-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tx-kind { font: inherit; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); color: var(--ink); cursor: pointer; min-height: 72px; }
.tx-kind:hover { border-color: var(--axis); }
.tx-kind.on { border-color: var(--accent, #14a38b); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #14a38b) 30%, transparent); }
.tx-kind b { display: block; font-size: 14.5px; } .tx-kind span { font-size: 12.5px; color: var(--ink-2); }
/* (judge 3) the file input is visually hidden but focusable: the drop zone shows its focus */
.tx-vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.tx-dropw { position: relative; }
.tx-dropw:focus-within .tx-drop { outline: 3px solid var(--accent, #14a38b); outline-offset: 2px; }
.tx-stepph { display: none; }
.tx-stepph .bar { display: block; height: 4px; border-radius: 4px; background: var(--line); margin-top: 6px; overflow: hidden; }
.tx-stepph .bar i { display: block; height: 100%; background: var(--navy); }
.tx-drop { border: 2px dashed var(--axis); border-radius: 14px; padding: 30px 16px; text-align: center; background: var(--tx-soft); cursor: pointer; transition: border-color .12s, background .12s; }
.tx-drop.over { border-color: var(--accent, #14a38b); background: var(--hero-bg, #e8f5f2); }
.tx-drop b { font-size: 16px; display: block; margin-bottom: 4px; }
.tx-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.tx-sum button { font: inherit; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.tx-sum button.on { border-color: var(--navy); box-shadow: 0 0 0 2px color-mix(in srgb, var(--navy) 25%, transparent); }
.tx-sum button b { display: block; font-size: 22px; line-height: 1.15; }
.tx-sum button span { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.tx-sum .ADD b { color: #079455; } .tx-sum .CHANGE b { color: #175cd3; } .tx-sum .ERROR b, .tx-sum .OUT_OF_SCOPE b { color: #d92d20; } .tx-sum .AMBIGUOUS b { color: #dc6803; } .tx-sum .SAME b { color: var(--muted); }
.tx-chg { font-size: 12.5px; } .tx-chg s { color: var(--muted); } .tx-chg b { color: var(--ink); font-weight: 600; }
.tx-cols { font-size: 12.5px; } .tx-cols td { padding: 5px 7px; }

/* ---------- report ---------- */
.tx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tx-tile { font: inherit; text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card); color: var(--ink); min-width: 0; }
button.tx-tile { cursor: pointer; } button.tx-tile:hover { border-color: var(--axis); box-shadow: 0 2px 8px rgba(16,24,40,.07); }
.tx-tile .l { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.tx-tile .v { font-size: 27px; font-weight: 750; line-height: 1.15; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.tx-tile .v small { font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.tx-tile .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tx-tile.bad .v { color: var(--tx-e); } .tx-tile.warn .v { color: var(--tx-c); } .tx-tile.good .v { color: var(--tx-a); }
.tx-tile.hero { background: var(--hero-bg, #e8f5f2); border-color: transparent; }
.tx-repfil { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; }
.tx-repfil label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.tx-repfil select, .tx-repfil input { min-height: 38px; }
.tx-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; position: sticky; top: 52px; z-index: 5; background: var(--page); padding: 6px 0; }
.tx-nav a { font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); }
.tx-nav a:hover { color: var(--ink); border-color: var(--axis); }
.tx-matrix { display: grid; grid-template-columns: 34px repeat(5, minmax(0, 1fr)); gap: 4px; max-width: 620px; }
.tx-matrix .ax { font-size: 11.5px; color: var(--ink-2); font-weight: 600; display: grid; place-items: center; text-align: center; line-height: 1.15; }
.tx-matrix .cell { font: inherit; border: 0; border-radius: 9px; min-height: 64px; padding: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: default; color: #101828; }
.tx-matrix .cell b { font-size: 21px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tx-matrix .cell span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; opacity: .85; }
.tx-matrix .cell.has { cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.tx-matrix .cell.has:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.tx-matrix .cell.zero b { opacity: .45; }
.tx-matrix .L { background: #d1fadf; } .tx-matrix .M { background: #fef0c7; } .tx-matrix .H { background: #fddcab; } .tx-matrix .V { background: #fecdca; }
.tx-matrix .ylab { writing-mode: vertical-rl; transform: rotate(180deg); }
.tx-acts { list-style: none; margin: 0; padding: 0; }
.tx-act { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); align-items: start; }
.tx-act .no { width: 32px; height: 32px; border-radius: 50%; background: var(--tx-n-bg); color: var(--tx-n); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.tx-act .what { font-weight: 700; font-size: 14.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tx-act .rs { margin: 4px 0 0; padding-left: 16px; font-size: 13px; color: var(--ink-2); }
.tx-act .ev { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tx-act .right { text-align: right; font-size: 13px; white-space: nowrap; }
.tx-act .right b { font-size: 14px; display: block; }
.tx-act .right .sub { display: block; }
.tx-bars { display: flex; flex-direction: column; gap: 6px; }
.tx-bar { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.tx-bar .track { height: 16px; background: var(--grid); border-radius: 5px; overflow: hidden; display: flex; }
.tx-bar .track b { display: block; height: 100%; }
.tx-bar .n { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 34px; text-align: right; }
.tx-bar button.n { font: inherit; font-weight: 600; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.tx-stackleg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.tx-stackleg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.tx-svg { width: 100%; height: auto; display: block; overflow: visible; }
.tx-svg text { fill: var(--ink-2); font-size: 11px; font-family: inherit; }
.tx-svg .gl { stroke: var(--grid); stroke-width: 1; }
.tx-svg .ax { stroke: var(--axis); stroke-width: 1; }
.tx .table-wrap table td.n, .tx .table-wrap table th.n { text-align: right; }
.tx a.tx-open, .tx button.tx-open { font: inherit; color: var(--tx-info); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; text-decoration: none; }
.tx a.tx-open:hover, .tx button.tx-open:hover { text-decoration: underline; }
.tx button.tx-n { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
.tx button.tx-n:hover { color: var(--tx-info); text-decoration: underline; }
.tx-nodata { display: flex; gap: 10px; align-items: flex-start; border: 1.5px dashed var(--axis); border-radius: 12px; padding: 12px 14px; color: var(--ink-2); background: var(--tx-soft); font-size: 13.5px; }
.tx-nodata b { color: var(--ink); }

/* ---------- settings ---------- */
.tx-setgrp { margin-bottom: 16px; }
.tx-setrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 8px 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.tx-setrow:last-child { border-bottom: 0; }
.tx-setrow .lb { font-weight: 650; font-size: 14px; } .tx-setrow .lb small { display: block; font-weight: 400; color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
.tx-setrow .val { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.tx-setrow .val.none { color: var(--muted); font-style: italic; font-weight: 500; }
.tx-setrow .std { font-size: 12.5px; color: var(--ink-2); }
.tx-setrow .std b { color: var(--ink); font-weight: 600; }
.tx-setrow .ctl { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tx-setsrc { font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }

/* ---------- labels (preview on the page) ---------- */
.tx-lblgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tx-lbl { border: 1px dashed var(--axis); border-radius: 10px; padding: 10px; text-align: center; background: #fff; color: #101828; }
.tx-lbl svg { width: 120px; height: 120px; }
.tx-lbl b { display: block; font-size: 15px; } .tx-lbl span { display: block; font-size: 11.5px; color: #475467; }

/* ---------- PC widths ---------- */
@media (max-width: 1200px) {
  .tx-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tx-setrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tx-setrow .ctl { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .tx-two, .tx-grid3 { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- phone width: one column, big targets, the table becomes cards ---------- */
@media (max-width: 700px) {
  .tx { max-width: none; }
  .tx-head h2 { font-size: 19px; }
  .tx-rhead { grid-template-columns: minmax(0, 1fr); }
  .tx-hi { text-align: left; align-items: flex-start; }
  .tx-rhead h2 { font-size: 21px; }
  .tx-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tx-big6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tx-form { grid-template-columns: minmax(0, 1fr); }
  .tx-search { flex-basis: 100%; max-width: none; }
  .tx-filters label { flex: 1 1 140px; } .tx-filters select, .tx-filters input { min-width: 0; width: 100%; min-height: 44px; }
  .tx-list table, .tx-list tbody, .tx-list tr, .tx-list td { display: block; width: 100%; }
  .tx-list thead { display: none; }
  .tx-list tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--card); }
  .tx-list td { border: 0; padding: 2px 0; }
  .tx-list td[data-l]::before { content: attr(data-l) ': '; color: var(--ink-2); font-size: 12px; font-weight: 600; }
  .tx-list td.tx-hide-ph { display: none; }
  .tx-list td.n { text-align: left; }
  .tx-map { height: 320px; }
  .tx-factor { grid-template-columns: 110px minmax(0, 1fr) 44px; }
  .tx-ci { grid-template-columns: minmax(0, 1fr); }
  .tx-ci .more { grid-template-columns: minmax(0, 1fr); }
  .tx-act { grid-template-columns: 34px minmax(0, 1fr); }
  .tx-act .right { grid-column: 2; text-align: left; white-space: normal; }
  .tx-act .right b { display: inline; margin-right: 6px; }
  .tx-matrix { grid-template-columns: 24px repeat(5, minmax(0, 1fr)); gap: 3px; }
  .tx-matrix .cell { min-height: 54px; padding: 3px; } .tx-matrix .cell b { font-size: 17px; } .tx-matrix .cell span { font-size: 9px; }
  .tx-bar { grid-template-columns: minmax(70px, 110px) minmax(0, 1fr) auto; }
  .tx-setrow { grid-template-columns: minmax(0, 1fr); }
  .tx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tx-tile .v { font-size: 22px; }
  .tx-nav { position: static; }
  .tx-mat { grid-template-columns: minmax(0, 1fr) 84px 44px; }
  .tx-formbar .btn { flex: 1 1 auto; }
  .tx-formbar .tx-status { flex-basis: 100%; }
  .tx-steps li { flex-basis: 76px; font-size: 11px; }
  .tx-steps li::before { width: 28px; height: 28px; }
  .tx-steps li::after { top: 13px; }
}
@media (max-width: 600px) {
  .tx-steps { display: none; }
  .tx-stepph { display: block; margin: 0 0 14px; font-size: 14px; }
  .tx-filters.folded > * { display: none; }
}
.tx-filt-tog { display: none; }
@media (max-width: 600px) { .tx-filt-tog { display: inline-flex; } }
.tx-act.covered { opacity: .62; }
.tx-act.covered .right b { text-decoration: line-through; }
.tx-urg { display: inline-block; background: #b42318; color: #fff; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; margin-right: 6px; }
.tx-opts { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.tx-cap { font-size: 13px; color: var(--crit, #b42318); font-weight: 600; margin: 6px 0; }
.tx-liveload { margin: 6px 0 10px; font-weight: 600; font-size: 14px; }
@media print {
  .tx-nav, .tx-tools, .tx-repfil, .tx-quick, .tx-back { display: none !important; }
  .tx .card { break-inside: avoid; }
}
/* icons inside the buttons (the dashboard's own .btn has no icon size) */
.tx .btn svg, .tx-mod .btn svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tx .tx-tools .btn, .tx .tx-row .btn { white-space: nowrap; }
.tx-banner { flex-wrap: wrap; }
.tx-banner > span:nth-child(2) { flex: 1 1 260px; }
.tx-factor .n { white-space: nowrap; text-align: right; }
.tx-setgrp summary::-webkit-details-marker { display: none; }
@media (max-width: 700px) {
  .tx-factor { grid-template-columns: 104px minmax(0, 1fr) 58px; }
  .tx-banner .btn { margin-left: 0; }
  /* tables that become cards on a phone (the upload preview, the earlier uploads) */
  .tx-cards table, .tx-cards tbody, .tx-cards tr, .tx-cards td { display: block; width: 100%; }
  .tx-cards thead { display: none; }
  .tx-cards tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; background: var(--card); }
  .tx-cards td { border: 0; padding: 2px 0; text-align: left !important; white-space: normal !important; }
  .tx-cards td[data-l]::before { content: attr(data-l) ': '; color: var(--ink-2); font-size: 12px; font-weight: 600; }
}
