/* Laboratorio de diagnóstico hidráulico (prefijo hd). Paleta de la serie: ámbar + azul + azul marino. */
.hd { --hd-oil: #d98a0b; --hd-oil-soft: #fff4de; --hd-blue: #1f5fa8; --hd-muted: var(--muted, #4a5d70); --hd-line: var(--line, #cfdae6);
  background: var(--card, #ffffff); color: #0b1f33; border: 1px solid var(--hd-line); border-radius: 8px; padding: 18px; margin: 26px 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; font-size: 16px; line-height: 1.45; }
.hd *, .hd *::before, .hd *::after { box-sizing: border-box; }
.hd-head { display: flex; flex-direction: column; gap: 2px; }
.hd-head strong { font-size: 1.15rem; }
.hd-head span { color: var(--hd-muted); font-size: .92rem; line-height: 1.5; }
.hd button { font: inherit; cursor: pointer; }
.hd-tabs, .hd-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-tab, .hd-pre { font-size: .88rem; font-weight: 600; padding: 7px 12px; min-height: 40px; border-radius: 4px; border: 1px solid var(--hd-line); background: #f3f6f9; color: #0b1f33; }
.hd-tab[aria-pressed="true"] { background: #0b1f33; border-color: #0b1f33; color: #fff; }
.hd-pre[aria-pressed="true"] { background: var(--hd-oil-soft); border-color: var(--hd-oil); }
.hd button:focus-visible, .hd select:focus-visible, .hd input:focus-visible { outline: 3px solid var(--hd-oil); outline-offset: 2px; }
.hd-panel[hidden] { display: none; }
.hd-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hd-svg { display: block; width: 100%; height: auto; max-width: 100%; background: #f8fafc; border: 1px solid #e1e8ef; border-radius: 4px; }
.hd-svg text { font-family: Helvetica, Arial, sans-serif; fill: #0b1f33; font-size: 16px; }
.hd-svg text.s { font-size: 15px; fill: #4a5d70; }
.hd-svg text.b { font-weight: 700; }
.hd-svg text.mk { font-size: 14px; font-weight: 700; fill: #1f5fa8; }
.hd-svg .hd-mk circle { transition: fill .2s; }
.hd-svg .hd-mk.on circle { fill: #1f5fa8; }
.hd-svg .hd-mk.on text { fill: #fff; }
.hd-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hd fieldset { border: 1px solid var(--hd-line); border-radius: 6px; margin: 0; padding: 6px 10px 8px; min-width: 0; }
.hd legend { font-size: .85rem; font-weight: 700; padding: 0 6px; }
.hd-row { display: flex; flex-direction: column; gap: 2px; padding: 5px 0; min-width: 0; }
.hd-row label { font-size: .86rem; font-weight: 600; }
.hd-in { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hd-in input[type=range] { flex: 1 1 auto; min-width: 0; height: 30px; accent-color: var(--hd-oil); }
.hd-in output { flex: 0 0 auto; min-width: 5.5em; text-align: right; font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; font-weight: 600; }
.hd select { font: inherit; font-size: .9rem; padding: 7px 8px; border: 1px solid var(--hd-line); border-radius: 4px; background: #fff; color: #0b1f33; max-width: 100%; min-width: 0; width: 100%; }
.hd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hd-card { border: 1px solid var(--hd-line); border-left: 4px solid var(--hd-blue); border-radius: 4px; padding: 8px 10px; background: #fff; min-width: 0; }
.hd-card small { display: block; font-size: .74rem; color: var(--hd-muted); line-height: 1.3; }
.hd-card b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hd-card i { display: block; font-style: normal; font-size: .72rem; color: var(--hd-muted); }
.hd-card.ok { border-left-color: #1a7f4b; }
.hd-card.warn { border-left-color: var(--hd-oil); }
.hd-card.bad { border-left-color: #b42318; }
.hd-msg { margin: 0; padding: 10px 12px; border-left: 4px solid var(--hd-oil); background: var(--hd-oil-soft); border-radius: 4px; font-size: .92rem; line-height: 1.55; min-height: 4.6em; }
.hd-msg.bad { border-left-color: #b42318; background: #fdecec; }
.hd-msg.ok { border-left-color: #1a7f4b; background: #e8f6ee; }
.hd-note { font-size: .8rem; color: var(--hd-muted); margin: 0; line-height: 1.5; }
.hd-lab { margin: 4px 0 0; font-size: .86rem; }
.hd-btn { font-size: .86rem; font-weight: 600; padding: 7px 12px; min-height: 40px; border-radius: 4px; border: 1px solid #0b1f33; background: #0b1f33; color: #fff; align-self: flex-start; }
.hd-btn[aria-pressed="true"] { background: var(--hd-oil); border-color: var(--hd-oil); color: #0b1f33; }
.hd-btn.alt { background: #fff; color: #0b1f33; margin-top: 6px; }
.hd-btn.alt[aria-pressed="true"] { background: var(--hd-oil); }
.hd-btn:disabled { opacity: .5; cursor: default; }
.hd-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hd-bar { display: flex; height: 22px; border: 1px solid var(--hd-line); border-radius: 4px; overflow: hidden; background: #eef2f6; }
.hd-bar div { height: 100%; transition: width .3s; }
.hd-leg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 3px; font-size: .8rem; }
.hd-leg li { display: flex; align-items: center; gap: 6px; }
.hd-leg li span { flex: 0 0 12px; height: 12px; border-radius: 2px; }
.hd-leg em { font-style: normal; }
.hd-leg b { margin-left: auto; font-variant-numeric: tabular-nums; }
.hd-case { display: flex; flex-direction: column; gap: 8px; }
.hd-tests { display: grid; grid-template-columns: 1fr; gap: 6px; }
.hd-test { text-align: left; font-size: .86rem; font-weight: 600; padding: 8px 10px; min-height: 44px; border-radius: 4px; border: 1px solid var(--hd-line); background: #f3f6f9; color: #0b1f33; }
.hd-test .k { display: inline-block; min-width: 1.5em; text-align: center; font-weight: 700; color: #fff; background: var(--hd-blue); border-radius: 3px; margin-right: 4px; }
.hd-test.used { background: #eaf2fb; border-color: var(--hd-blue); }
.hd-test[aria-pressed="true"] { background: var(--hd-oil-soft); border-color: var(--hd-oil); }
.hd-tbl { overflow-x: auto; max-width: 100%; }
.hd-tbl table { border-collapse: collapse; width: 100%; font-size: .84rem; min-width: 320px; }
.hd-tbl th, .hd-tbl td { border: 1px solid var(--hd-line); padding: 5px 8px; text-align: left; vertical-align: top; }
.hd-tbl th { background: #eef2f6; }
.hd-diag { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 760px) {
  .hd-body { flex-direction: row; align-items: flex-start; } .hd-col { flex: 1 1 0; } .hd-col.res { flex: 1.1 1 0; }
  .hd-tests { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hd-leg { grid-template-columns: 1fr 1fr; }
  .hd-diag { flex-direction: row; align-items: flex-end; } .hd-diag .hd-row { flex: 1 1 auto; }
}
@media (prefers-color-scheme: dark) { .hd { color-scheme: light; } }
@media (prefers-reduced-motion: reduce) { .hd * { transition: none !important; animation: none !important; } }
