/* Laboratorio de grasas (prefijo hg). Paleta de la serie: ámbar + azul + azul marino. */
.hg { --hg-oil: #d98a0b; --hg-oil-soft: #fff4de; --hg-blue: #1f5fa8; --hg-muted: var(--muted, #4a5d70); --hg-line: var(--line, #cfdae6);
  background: var(--card, #ffffff); color: #0b1f33; border: 1px solid var(--hg-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; }
.hg *, .hg *::before, .hg *::after { box-sizing: border-box; }
.hg-head { display: flex; flex-direction: column; gap: 2px; }
.hg-head strong { font-size: 1.15rem; }
.hg-head span { color: var(--hg-muted); font-size: .92rem; line-height: 1.5; }
.hg button { font: inherit; cursor: pointer; }
.hg-tabs, .hg-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.hg-tab, .hg-pre { font-size: .88rem; font-weight: 600; padding: 7px 12px; min-height: 40px; border-radius: 4px; border: 1px solid var(--hg-line); background: #f3f6f9; color: #0b1f33; }
.hg-tab[aria-pressed="true"] { background: #0b1f33; border-color: #0b1f33; color: #fff; }
.hg-pre[aria-pressed="true"] { background: var(--hg-oil-soft); border-color: var(--hg-oil); }
.hg button:focus-visible, .hg select:focus-visible, .hg input:focus-visible { outline: 3px solid var(--hg-oil); outline-offset: 2px; }
.hg-panel[hidden] { display: none; }
.hg-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hg-svg { display: block; width: 100%; height: auto; max-width: 100%; background: #f8fafc; border: 1px solid #e1e8ef; border-radius: 4px; }
.hg-svg text { font-family: Helvetica, Arial, sans-serif; fill: #0b1f33; font-size: 14px; }
.hg-svg text.s { font-size: 13px; fill: #4a5d70; }
.hg-svg text.b { font-weight: 700; }
.hg-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hg fieldset { border: 1px solid var(--hg-line); border-radius: 6px; margin: 0; padding: 6px 10px 8px; min-width: 0; }
.hg legend { font-size: .85rem; font-weight: 700; padding: 0 6px; }
.hg-row { display: flex; flex-direction: column; gap: 2px; padding: 5px 0; min-width: 0; }
.hg-row label { font-size: .86rem; font-weight: 600; }
.hg-in { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hg-in input[type=range] { flex: 1 1 auto; min-width: 0; height: 30px; accent-color: var(--hg-oil); }
.hg-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; }
.hg select { font: inherit; font-size: .9rem; padding: 7px 8px; border: 1px solid var(--hg-line); border-radius: 4px; background: #fff; color: #0b1f33; max-width: 100%; min-width: 0; width: 100%; }
.hg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hg-card { border: 1px solid var(--hg-line); border-left: 4px solid var(--hg-blue); border-radius: 4px; padding: 8px 10px; background: #fff; min-width: 0; }
.hg-card small { display: block; font-size: .74rem; color: var(--hg-muted); line-height: 1.3; }
.hg-card b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hg-card.ok { border-left-color: #1a7f4b; }
.hg-card.warn { border-left-color: var(--hg-oil); }
.hg-card.bad { border-left-color: #b42318; }
.hg-msg { margin: 0; padding: 10px 12px; border-left: 4px solid var(--hg-oil); background: var(--hg-oil-soft); border-radius: 4px; font-size: .92rem; line-height: 1.55; min-height: 5.6em; }
.hg-msg.bad { border-left-color: #b42318; background: #fdecec; }
.hg-msg.ok { border-left-color: #1a7f4b; background: #e8f6ee; }
.hg-note { font-size: .8rem; color: var(--hg-muted); margin: 0; line-height: 1.5; }
.hg-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; }
.hg-btn[aria-pressed="true"] { background: var(--hg-oil); border-color: var(--hg-oil); color: #0b1f33; }
.hg-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (min-width: 760px) { .hg-body { flex-direction: row; align-items: flex-start; } .hg-col { flex: 1 1 0; } .hg-col.res { flex: 1.1 1 0; } }
@media (prefers-color-scheme: dark) { .hg { color-scheme: light; } }
@media (prefers-reduced-motion: reduce) { .hg * { transition: none !important; animation: none !important; } }
.hg-steps { display: flex; flex-direction: column; gap: 6px; }
.hg-step { font-size: .88rem; font-weight: 600; text-align: left; padding: 8px 12px; min-height: 44px; border-radius: 4px; border: 1px solid var(--hg-line); background: #f3f6f9; color: #0b1f33; }
.hg-step[aria-pressed="true"] { background: #e8f6ee; border-color: #1a7f4b; }
.hg-btn.alt { background: #fff; color: #0b1f33; }
.hg-btn.alt[aria-pressed="true"] { background: var(--hg-oil); }
.hg-svg text.w { fill: #fff; }
.hg-svg text.dk { fill: #0b1f33; }
.hg-svg text.s { font-size: 16px; }
.hg-svg text { font-size: 17px; }
@media (min-width: 760px) { .hg-steps { flex-direction: row; flex-wrap: wrap; } .hg-step { flex: 1 1 150px; } }
.hg-chk { flex-direction: row; align-items: center; gap: 8px; }
.hg-chk input { width: 22px; height: 22px; accent-color: var(--hg-oil); flex: 0 0 auto; }
.hg-chk label { font-size: .86rem; font-weight: 600; }
.hg-pts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hg-pt { font-size: .84rem; font-weight: 600; text-align: left; padding: 6px 8px; min-height: 44px; border-radius: 4px; border: 1px solid var(--hg-line); background: #f3f6f9; color: #0b1f33; display: flex; align-items: center; gap: 6px; min-width: 0; }
.hg-pt .n { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #0b1f33; color: #fff; font-size: .8rem; }
.hg-pt[aria-pressed="true"] { background: #e8f6ee; border-color: #1a7f4b; }
.hg-log { display: flex; flex-direction: column; gap: 4px; }
.hg-logrow { font-size: .84rem; padding: 4px 8px; border-left: 4px solid #1a7f4b; background: #f3f6f9; border-radius: 3px; }
.hg-logrow.bad { border-left-color: #b42318; background: #fdecec; font-weight: 600; }
.hg-matrix { width: 100%; }
.hg-cases { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hg-cases li { font-size: .9rem; padding: 6px 10px; border-left: 4px solid var(--hg-blue); background: #f3f6f9; border-radius: 3px; }
.hg-cases li b { display: inline-block; min-width: 6.5em; }
.hg-opts { display: flex; flex-direction: column; gap: 6px; }
.hg-opt { font-size: .9rem; font-weight: 600; text-align: left; padding: 8px 12px; min-height: 44px; border-radius: 4px; border: 1px solid var(--hg-line); background: #f3f6f9; color: #0b1f33; }
.hg-opt[data-s="ok"] { background: #e8f6ee; border-color: #1a7f4b; }
.hg-opt[data-s="bad"] { background: #fdecec; border-color: #b42318; }
