/* Herramientas de obra — Hermanos Requejo
   Identidad: los colores de los conductores (marrón, negro, gris, azul, verde-amarillo) marcan los grupos.
   Tipografía: Archivo (estrecha para títulos y etiquetas), IBM Plex Mono para cifras. */
:root {
  --bg: #ECEFEF; --panel: #FFFFFF; --sunk: #F5F7F7; --ink: #14191C; --muted: #5A6670; --line: #D3DADD;
  --accent: #1C5D99; --accent-ink: #FFFFFF; --accent-soft: #E3EDF7;
  --good: #2E7D3A; --warn: #A86A12; --bad: #B83324;
  --side: #13181B; --side-ink: #B9C3C9; --side-hi: #FFFFFF; --side-line: #252D32;
  --c-sol: #E5A40F; --c-exc: #8DB8D8; --c-bat: #6E9A3A; --c-pos: #3F8C5B; --c-neg: #C77560;
  --g-elec: #8A5A2E; --g-fv: #E5A40F; --g-clima: #2E7DC0; --g-ve: #7FA829; --g-ref: #8E979D; --g-own: #4A555C;
  --f-ui: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-num: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 6px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0E1215; --panel: #161B1F; --sunk: #1B2227; --ink: #E5EAED; --muted: #93A0A8; --line: #29323A;
    --accent: #5AA2E0; --accent-ink: #0C1116; --accent-soft: #19293A; --good: #5DBB6E; --warn: #E0A43B; --bad: #EE6C5A;
    --c-exc: #5F8FB3; --c-pos: #4FA46C; --c-neg: #C46C57; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.5 var(--f-ui); }
a { color: var(--accent); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- armazón ---------- */
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: max(18px, env(safe-area-inset-top)) 14px 24px max(14px, env(safe-area-inset-left)); }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--side-hi); padding: 4px 6px 18px; border-bottom: 1px solid var(--side-line); margin-bottom: 10px; }
.brand b { display: block; font-stretch: 80%; font-weight: 700; font-size: 19px; letter-spacing: .01em; line-height: 1.1; }
.brand small { color: var(--side-ink); font-size: 12.5px; }
.mark { display: inline-flex; gap: 3px; transform: skewX(-12deg); }
.mark i { width: 6px; height: 30px; border-radius: 2px; background: var(--g-elec); }
.mark i:nth-child(2) { background: #2B2F33; box-shadow: inset 0 0 0 1px #4A5258; }
.mark i:nth-child(3) { background: #9AA3A8; }
.ng { padding: 2px 0; }
.ngt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--side-ink); text-decoration: none; font-weight: 600; font-size: 15.5px; position: relative; }
.ngt .ico { width: 20px; height: 20px; flex: none; stroke: var(--gc); }
.ngt:hover { background: #1C2327; color: var(--side-hi); }
.ng.open > .ngt, .ngt.on { background: #212A30; color: var(--side-hi); box-shadow: inset 3px 0 0 var(--gc); }
.nsub { display: flex; flex-direction: column; padding: 4px 0 8px 30px; border-left: 1px solid var(--side-line); margin-left: 19px; }
.nsub a { padding: 6px 10px; border-radius: 5px; color: var(--side-ink); text-decoration: none; font-size: 14.5px; }
.nsub a:hover { color: var(--side-hi); background: #1C2327; }
.nsub a.on { color: var(--side-hi); background: #262F35; }
.nfoot { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--side-line); }
.nfoot .ngt { font-weight: 500; font-size: 14.5px; }
.g-elec { --gc: var(--g-elec); } .g-fv { --gc: var(--g-fv); } .g-clima { --gc: var(--g-clima); } .g-ve { --gc: var(--g-ve); } .g-ref { --gc: var(--g-ref); } .g-own { --gc: #8E979D; }
.g-elec { --gc: #C08A55; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.main { min-width: 0; }
.top { display: none; }
.scrim { display: none; }
.menu { background: none; border: 0; padding: 10px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.menu span { width: 22px; height: 2.5px; background: var(--side-hi); border-radius: 2px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 30; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s ease; }
  .nav-open .side { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; }
  .top { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 10; background: var(--side); color: var(--side-hi);
    padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); min-height: 52px; }
  .top b { font-stretch: 85%; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- páginas ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-right)) 120px max(16px, env(safe-area-inset-left)); }
@media (min-width: 901px) { .page { padding-left: 36px; padding-right: 36px; } }
.ph { margin-bottom: 22px; max-width: 78ch; }
.eyebrow { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { font-stretch: 78%; font-weight: 700; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.05; margin: 0 0 8px; letter-spacing: -.005em; text-wrap: balance; }
.lead { margin: 0; color: var(--muted); font-size: 16px; }
.itc { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.itc span { font-family: var(--f-num); font-size: 12px; font-weight: 500; padding: 2px 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); }

/* inicio */
.hg { margin-top: 28px; }
.hg h2 { font-stretch: 80%; font-size: 21px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.hg h2::before { content: ""; width: 22px; height: 6px; border-radius: 3px; background: var(--gc, var(--g-own)); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--gc); box-shadow: inset 0 -3px 0 var(--gc); }
.card b { font-size: 17px; font-stretch: 88%; }
.card span { color: var(--muted); font-size: 14px; }
.card em { font-style: normal; font-family: var(--f-num); font-size: 11.5px; color: var(--muted); margin-top: auto; padding-top: 6px; }

/* ---------- herramienta ---------- */
.tb { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
.tb.ref { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1100px) { .tb { grid-template-columns: minmax(0, 1fr); } }
.results { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 1100px) { .results { position: static; } }
.inputs { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
fieldset { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 12px 14px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; min-width: 0; }
legend { font-stretch: 80%; font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; padding: 0 6px; margin-left: -6px; }
.fnote { grid-column: 1 / -1; margin: -2px 0 0; color: var(--muted); font-size: 13.5px; }
.inputs.wide fieldset { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > span { font-size: 13.5px; font-weight: 600; }
.field small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.inp { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 5px; background: var(--sunk); overflow: hidden; }
.inp:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.inp input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 9px 10px; font: 500 16px var(--f-num); color: var(--ink); }
.inp input:focus { outline: none; }
.inp em { font-style: normal; font-size: 13px; color: var(--muted); padding: 0 10px; display: flex; align-items: center; border-left: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
input.bad { color: var(--bad); }
select, textarea, .search input { font: inherit; font-size: 15px; color: var(--ink); background: var(--sunk); border: 1px solid var(--line); border-radius: 5px; padding: 9px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg label { flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg b { display: block; text-align: center; font-weight: 600; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--sunk); cursor: pointer; white-space: nowrap; }
.seg input:checked + b { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.seg input:focus-visible + b { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.field.chk { flex-direction: row; align-items: flex-start; gap: 8px; grid-column: 1 / -1; }
.field.chk input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.field.chk > span { font-weight: 500; }

/* resultados */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.kpi span { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.kpi b { font: 600 22px/1.2 var(--f-num); margin: 2px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.kpi.accent { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.kpi.good b { color: var(--good); } .kpi.warn { box-shadow: inset 0 3px 0 var(--warn); } .kpi.bad { box-shadow: inset 0 3px 0 var(--bad); } .kpi.bad b { color: var(--bad); }
.note { margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); font-size: 14.5px; }
.note.warn { border-left: 4px solid var(--warn); } .note.ko { border-left: 4px solid var(--bad); }
.row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-size: 14.5px; }
.row span { flex: 1 1 260px; }
.badge { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; white-space: nowrap; }
.badge.ok { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.badge.ko { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.tw { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
table.num td:not(:first-child) { font-family: var(--f-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.sel td { background: var(--accent-soft); font-weight: 600; }
.how { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-size: 14px; }
.how summary { cursor: pointer; font-weight: 600; }
.how p { margin: 8px 0 0; }
.how .tw { margin-top: 8px; }
.chart { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 10px 8px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--ink); stroke-width: 1.2; }
.chart .mark { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .ax { fill: var(--muted); font: 11px var(--f-num); }
.chart .axb { fill: var(--accent); font: 600 11.5px var(--f-ui); }
.chart figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); padding: 4px 4px 0; }
.chart figcaption i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.chart figcaption i.ln { height: 3px; vertical-align: 3px; }
.chart figcaption .u { margin-left: auto; font-family: var(--f-num); }

/* barra de acciones */
.actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 18px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
.savest { margin-right: auto; font-size: 13px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 15px var(--f-ui); padding: 9px 16px; border-radius: 5px; border: 1.5px solid var(--ink); background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: var(--line); background: transparent; }
.btn.sm { font-size: 13.5px; padding: 6px 11px; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn:hover { border-color: var(--accent); }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--panel); padding: 10px 16px; border-radius: 6px; font-size: 14.5px; transition: .2s; z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.ko { background: var(--bad); color: #fff; }

/* ubicación y estancias */
.geo { display: flex; flex-direction: column; gap: 8px; }
.geo-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.geo-bar input { flex: 1 1 200px; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--sunk); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 13px var(--f-ui); padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--sunk); color: var(--ink); cursor: pointer; }
.map { height: 260px; border-radius: 5px; border: 1px solid var(--line); background: var(--sunk); z-index: 0; }
.geo-ll { margin: 0; font: 12.5px var(--f-num); color: var(--muted); }
.pvst { color: var(--accent); }
.rooms { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.room { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, .7fr)) repeat(2, minmax(0, 1.2fr)) minmax(0, .7fr) auto; gap: 6px; align-items: end; padding: 8px; background: var(--sunk); border-radius: 5px; }
.room label { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.room input, .room select { font: 14px var(--f-ui); padding: 6px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--ink); min-width: 0; width: 100%; }
.room .rname { font-weight: 600; }
@media (max-width: 640px) { .room { grid-template-columns: repeat(3, minmax(0, 1fr)); } .room .rname { grid-column: 1 / -1; } }

/* estudios */
.search { display: flex; flex-direction: column; gap: 4px; max-width: 420px; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; }
.slist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.slist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.slist li b { display: block; }
.slist li span { font-size: 13px; color: var(--muted); }
.sbtn { display: flex; gap: 6px; flex-wrap: wrap; }
.logo-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.logo-prev { max-height: 48px; max-width: 160px; background: #fff; padding: 4px; border: 1px solid var(--line); border-radius: 4px; }
.muted { color: var(--muted); font-size: 13.5px; }

/* ---------- informe ---------- */
.rep-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; max-width: 210mm; margin: 24px auto 14px; padding: 0 16px; }
.sheet { --ink: #14191C; --muted: #59646C; --line: #D5DBDE; --panel: #FFFFFF; --sunk: #F4F6F7; --accent: #1C5D99; --accent-soft: #E3EDF7; --good: #2E7D3A;
  --c-exc: #8DB8D8; --c-pos: #3F8C5B; --c-neg: #C77560; color: var(--ink); background: #fff; max-width: 210mm; margin: 0 auto 40px; padding: 16mm 15mm; box-shadow: 0 1px 4px rgba(0,0,0,.18); font-size: 13.5px; color-scheme: light; }
.sh-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.sh-brand { display: flex; gap: 12px; align-items: center; }
.sh-brand img { max-height: 54px; max-width: 170px; }
.sh-brand b { display: block; font-stretch: 80%; font-size: 21px; }
.sh-brand span { display: block; font-size: 12px; color: var(--muted); }
.sh-mark { display: flex; gap: 3px; transform: skewX(-12deg); }
.sh-mark i { width: 7px; height: 40px; border-radius: 2px; background: #8A5A2E; } .sh-mark i:nth-child(2) { background: #2B2F33; } .sh-mark i:nth-child(3) { background: #9AA3A8; }
.sh-meta { margin: 0; display: grid; grid-auto-flow: column; gap: 16px; align-self: end; }
.sh-meta dt, .sh-client dt { font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sh-meta dd, .sh-client dd { margin: 0; font-weight: 600; }
.sh-title { font-size: 27px; margin: 18px 0 12px; }
.sh-client { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; padding: 10px 12px; background: var(--sunk); border-radius: 4px; margin: 0 0 14px; }
.sh-kpis { margin-bottom: 6px; }
.sheet .kpi { padding: 8px 10px; } .sheet .kpi b { font-size: 19px; }
.sh-sec { margin-top: 18px; break-inside: avoid; }
.sh-sec h2 { font-stretch: 80%; font-size: 17px; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.sh-sec > * + * { margin-top: 8px; }
.sh-sec p { margin: 0; }
.sheet .tw, .sheet .chart, .sheet .note, .sheet .row, .sheet .how { border-color: var(--line); background: #fff; }
.sheet table { font-size: 12.5px; }
.sh-foot { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.sh-foot p { margin: 0 0 3px; }
.is-report .page { padding: 0; }
@media (max-width: 700px) { .sheet { padding: 18px 14px; box-shadow: none; } .sh-client { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .side, .top, .scrim, .no-print, .actions, #toast { display: none !important; }
  .shell { display: block; }
  .sheet { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .sheet details > summary { list-style: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- v2: secciones, selector visual, resultados ---------- */
.secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sec-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: inset 0 4px 0 var(--gc); }
.sec-tile:hover { border-color: var(--gc); }
.sec-tile b { font-stretch: 80%; font-size: 22px; }
.sec-tile span { color: var(--muted); font-size: 14.5px; }
.sec-tile em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: auto; }
.sico .ico, .cico .ico { width: 30px; height: 30px; stroke: var(--gc); stroke-width: 1.6; }
.cards { --gc: var(--accent); }
.card .cico .ico { width: 24px; height: 24px; }
.ph .eyebrow a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--gc, var(--line)); }
.pick { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); color: var(--ink); font: inherit; cursor: pointer; }
.pick:hover { border-color: var(--accent); }
.pick .art { width: 120px; height: auto; background: var(--panel); border-radius: 4px; }
.pick-t { display: flex; flex-direction: column; font-size: 15px; font-weight: 600; min-width: 0; }
.pick-t b { font-family: var(--f-num); color: var(--accent); }
.pick-t small, .pick-card small { font-weight: 400; color: var(--muted); font-size: 13px; line-height: 1.35; }
.pick em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent); }
@media (max-width: 520px) { .pick { grid-template-columns: 84px minmax(0, 1fr); } .pick .art { width: 84px; } .pick em { display: none; } }
.sheet-back { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .sheet-back { align-items: center; } }
.sheet-pick { background: var(--bg); width: min(980px, 100%); max-height: 88vh; overflow-y: auto; border-radius: 12px 12px 0 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .sheet-pick { border-radius: 12px; } }
.sheet-pick header { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 0 10px; background: var(--bg); z-index: 1; }
.sheet-pick header b { font-stretch: 80%; font-size: 21px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pick-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.pick-card:hover, .pick-card.on { border-color: var(--accent); }
.pick-card.on { box-shadow: inset 0 0 0 1px var(--accent); }
.pick-card .art { width: 100%; height: auto; background: var(--sunk); border-radius: 5px; }
.pick-card ul { margin: 2px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.pick-grid.static .pick-card { cursor: default; }
.art { --w: #D9C9B5; }
.art .a-wall { fill: #E3D3BF; } .art .a-joint { stroke: #B89F82; stroke-width: .8; }
.art .a-ins { fill: #F3E28A; } .art .a-wave { fill: none; stroke: #C9AE2E; stroke-width: 1.2; }
.art .a-board { fill: #CCD1D4; stroke: #8E979D; stroke-width: .8; }
.art .a-soil { fill: #B79A74; } .art .a-grain { fill: #8E7353; } .art .a-air { fill: #DDEAF3; } .art .a-ground { stroke: #5B4A35; stroke-width: 1.5; }
.art .a-pipe { fill: #F7F7F5; stroke: #6F7A80; stroke-width: 2; }
.art .a-chase { fill: #CDBBA4; }
.art .a-ins-c { fill: #3B82C4; stroke: #1F4E7A; stroke-width: .8; } .art .a-cu { fill: #D58A3C; }
.art .a-sheath { fill: #2F3438; stroke: #1A1D20; stroke-width: 1; }
.art .a-clip { fill: none; stroke: #6F7A80; stroke-width: 3; stroke-linecap: round; }
.art .a-tray, .art .a-hole { stroke: #6F7A80; stroke-width: 4; stroke-linecap: square; } .art .a-hole { stroke: var(--panel); stroke-width: 2; }
.art .a-dim { stroke: #1C5D99; stroke-width: 1.2; stroke-dasharray: 3 2; }
.art .a-txt { font: 600 9.5px var(--f-ui); fill: #3E474D; }
.result-hero { background: var(--ink); color: var(--panel); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.result-hero span { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.result-hero b { font: 600 clamp(26px, 4vw, 34px)/1.15 var(--f-num); overflow-wrap: anywhere; }
.result-hero small { font-size: 14px; opacity: .85; overflow-wrap: anywhere; }
.sheet .result-hero { background: #14191C; color: #fff; }
table.checks td:last-child { text-align: right; } table.checks tr.bad td { background: color-mix(in srgb, var(--bad) 8%, transparent); }
.rh { font-stretch: 82%; font-size: 17px; margin: 6px 0 -4px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.tabs a.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.tabs small { font-family: var(--f-num); opacity: .7; margin-left: 4px; }
.eq-list { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.eq { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.eq b { display: block; } .eq span { font-size: 13px; color: var(--muted); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; flex-direction: row; }
.map.tall { height: min(62vh, 480px); }
.map-wrap { position: relative; }
.map-tools { position: absolute; z-index: 500; left: 10px; bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.map-tools .btn { box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.map-hint { position: absolute; z-index: 500; left: 10px; right: 10px; top: 10px; margin: 0; padding: 8px 10px; background: rgba(20,25,28,.88); color: #fff; border-radius: 6px; font-size: 14px; }
.leaflet-tooltip.fald-tip { background: rgba(20,25,28,.8); color: #fff; border: 0; box-shadow: none; font: 600 12px var(--f-ui); }
.leaflet-tooltip.fald-tip::before { display: none; }
.fald-list { display: flex; flex-direction: column; gap: 6px; }
.fald { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(5, minmax(0, 1fr)) auto; gap: 6px; align-items: end; padding: 8px; background: var(--sunk); border-radius: 5px; border-left: 4px solid var(--fc); }
.fald label { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.fald input, .fald select { font: 14px var(--f-ui); padding: 6px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--ink); min-width: 0; width: 100%; }
.fald output { font: 600 14px var(--f-num); color: var(--ink); padding: 6px 0; }
@media (max-width: 760px) { .fald { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fald .rname { grid-column: 1 / -1; } }
.room { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .6fr)) repeat(2, minmax(0, 1fr)) minmax(0, .6fr) minmax(0, 2fr) minmax(0, .6fr) auto; }
@media (max-width: 1100px) { .room { grid-template-columns: repeat(4, minmax(0, 1fr)); } .room .rname, .room .req { grid-column: 1 / -1; } }
.tb.wide-in { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
@media (max-width: 1100px) { .tb.wide-in { grid-template-columns: minmax(0, 1fr); } }
