/* ================= Tokens ================= */
:root {
  --blue: #2f5bff; --blue-2: #1d3fd6; --red: #e5484d; --red-2: #ff6b5a;
  --bg: #e8e9ee; --card: #f7f7f8; --card-b: rgba(0,0,0,.05); --solid: #f7f7f8;
  --ink: #141414; --ink2: #5d6069; --mute: #9fa2ab; --line: rgba(0,0,0,.08);
  --field: #ececef; --bar: #252525; --fija: #252525; --off: #c9cad0;
  --glass: rgba(255,255,255,.72); --glass-b: rgba(255,255,255,.9); --dock-ink: #141414;
  --fold: rgba(255,255,255,.85); --fold-back: rgba(255,255,255,.55);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(20,30,60,.06);
  --r: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #05070f; --card: rgba(255,255,255,.055); --card-b: rgba(255,255,255,.09); --solid: #11131c;
    --ink: #f4f5f8; --ink2: rgba(244,245,248,.66); --mute: rgba(244,245,248,.4); --line: rgba(255,255,255,.08);
    --field: rgba(255,255,255,.08); --bar: rgba(244,245,248,.82); --fija: #f4f5f8; --off: rgba(255,255,255,.22);
    --glass: rgba(22,26,42,.62); --glass-b: rgba(255,255,255,.1); --dock-ink: #f4f5f8;
    --fold: rgba(255,255,255,.07); --fold-back: rgba(255,255,255,.035);
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #05070f; --card: rgba(255,255,255,.055); --card-b: rgba(255,255,255,.09); --solid: #11131c;
  --ink: #f4f5f8; --ink2: rgba(244,245,248,.66); --mute: rgba(244,245,248,.4); --line: rgba(255,255,255,.08);
  --field: rgba(255,255,255,.08); --bar: rgba(244,245,248,.82); --fija: #f4f5f8; --off: rgba(255,255,255,.22);
  --glass: rgba(22,26,42,.62); --glass-b: rgba(255,255,255,.1); --dock-ink: #f4f5f8;
  --fold: rgba(255,255,255,.07); --fold-back: rgba(255,255,255,.035);
  --shadow: none; color-scheme: dark;
}

/* ================= Base ================= */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11"; min-height: 100vh; overflow-x: hidden;
  padding: env(safe-area-inset-top) 0 calc(120px + env(safe-area-inset-bottom));
  transition: background-color .4s;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--mute); }
.bg { position: absolute; inset: 0 0 auto; height: 560px; pointer-events: none; overflow: hidden; z-index: 0; }
.bg-glow {
  position: absolute; inset: -40% -30% 0;
  background:
    radial-gradient(60% 55% at 50% 30%, #3b66ff 0%, rgba(47,91,255,.75) 35%, rgba(29,63,214,.25) 62%, transparent 78%);
}
:root[data-theme="light"] .bg-glow, :root:not([data-theme]) .bg-glow {
  background: radial-gradient(70% 60% at 50% 25%, #3a64ff 0%, #2f5bff 40%, rgba(47,91,255,.35) 68%, transparent 85%);
}
.bg::after { content: ""; position: absolute; inset: auto 0 0; height: 220px; background: linear-gradient(transparent, var(--bg)); }

/* ================= Top bar + hero ================= */
.topbar {
  position: relative; z-index: 2; max-width: 980px; margin: 0 auto; padding: 14px 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.round {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.round.sm { width: 38px; height: 38px; font-size: 22px; line-height: 1; color: var(--ink); background: var(--field); border-color: var(--line); }
.round img { border-radius: 6px; }
.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }
.conn {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; font-size: 13px; font-weight: 500;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.45); flex: none; }
.conn.on .dot { background: #5dff9a; box-shadow: 0 0 0 4px rgba(93,255,154,.18); }
.conn.bad .dot { background: var(--red-2); }

.hero { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 34px 20px 26px; color: #fff; }
.hero-k { font-size: 13px; font-weight: 500; letter-spacing: .02em; opacity: .75; }
.hero-n {
  margin: 4px 0 0; font-weight: 600; letter-spacing: -.055em; line-height: .92;
  font-size: clamp(84px, 25vw, 168px); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 35%, rgba(255,255,255,.38) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-n .deg { font-size: .32em; letter-spacing: -.02em; margin-left: .12em; vertical-align: .95em; }
.hero-s { margin: 12px 0 0; font-size: clamp(18px, 4.6vw, 24px); font-weight: 500; letter-spacing: -.01em; color: rgba(255,255,255,.82); max-width: 560px; }

/* Modo claro: texto negro sobre el degradado (más suave para que el negro se lea) */
:root[data-theme="light"] .bg-glow {
  background: radial-gradient(70% 60% at 50% 25%, #7d9bff 0%, #9fb5ff 38%, rgba(159,181,255,.45) 66%, transparent 85%);
}
:root[data-theme="light"] .hero { color: var(--ink); }
:root[data-theme="light"] .hero-n { background-image: linear-gradient(180deg, #141414 35%, rgba(20,20,20,.45) 100%); }
:root[data-theme="light"] .hero-s { color: rgba(20,20,20,.78); }
:root[data-theme="light"] .round:not(.sm),
:root[data-theme="light"] .conn { background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.8); color: var(--ink); }
:root[data-theme="light"] .dot { background: rgba(20,20,20,.35); }
:root[data-theme="light"] .conn.on .dot { background: #12b886; box-shadow: 0 0 0 4px rgba(18,184,134,.2); }

/* ================= Layout ================= */
main { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 0 16px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; gap: 16px; } .span2 { grid-column: span 2; } }

.card {
  background: var(--card); border: 1px solid var(--card-b); border-radius: var(--r); padding: 18px;
  box-shadow: var(--shadow); min-width: 0; position: relative; overflow: hidden;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.card-h { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; margin-bottom: 16px; }
.card-h.sub { margin: 18px 0 10px; font-size: 13px; color: var(--ink2); }
.card-h small { font-size: 12px; font-weight: 400; }
.ic { width: 22px; height: 22px; border-radius: 6px; background: var(--blue); display: grid; place-items: center; flex: none; }
.ic svg { width: 14px; height: 14px; fill: #fff; stroke: #fff; stroke-width: 0; }
.c-conn .ic svg, .tab svg { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.c-conn .ic svg { stroke-width: 1.8; }
.ic.inv { background: #fff; } .ic.inv svg { fill: var(--blue); }

/* números */
.kpi { font-size: 66px; font-weight: 500; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi.md { font-size: 46px; letter-spacing: -.045em; }
.kpi.sm { font-size: 24px; letter-spacing: -.02em; font-weight: 600; }
.unit { font-size: 11px; font-weight: 700; letter-spacing: .04em; margin-top: 6px; }
.lbl { font-size: 14px; margin-top: 22px; line-height: 1.1; }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-height: 120px; }
.badge-col { display: grid; justify-items: end; gap: 4px; }
.tiny { font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; font-style: normal; background: var(--blue); color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.badge.down, .badge.sm { background: var(--field); color: var(--ink); }
.badge.sm { font-size: 11px; padding: 2px 8px; }
.badge .arr { font-style: normal; display: inline-block; }
.split { display: grid; grid-template-columns: 1fr 1fr; margin: 6px -18px -18px; border-top: 1px solid var(--line); }
.split > div { padding: 16px 18px 18px; }
.split > div + div { border-left: 1px solid var(--line); }

/* burbujas */
.bubbles { width: 100%; height: auto; display: block; margin: -6px 0 6px; overflow: visible; }
.b-auto, .d-auto { fill: var(--blue); background: var(--blue); }
.b-fija, .d-fija { fill: var(--fija); background: var(--fija); }
.b-off, .d-off { fill: var(--off); background: var(--off); }
.mlist { list-style: none; margin: 0 -18px -18px; padding: 0; }
.mlist li { display: grid; grid-template-columns: 14px 64px 1fr auto; gap: 12px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); }
.mlist i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.mlist b { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mlist span { color: var(--mute); font-size: 17px; }

/* historial (barras) */
.seg-sel { margin-left: auto; border: 0; border-radius: 999px; background: var(--field); padding: 6px 12px; font-size: 12px; font-weight: 600; }
.hist-kpis { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 17px; margin-bottom: 18px; }
.hist-kpis b { font-weight: 500; font-variant-numeric: tabular-nums; margin-right: 2px; }
.hist-kpis .muted + b { margin-left: -2px; }
.hist-kpis .badge + .muted { margin-left: 18px; }
.bars-wrap { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 6px; height: 210px; }
.yaxis { position: relative; font-size: 10px; color: var(--mute); font-variant-numeric: tabular-nums; }
.yaxis span { position: absolute; left: 0; transform: translateY(50%); }
.bars { position: relative; display: flex; align-items: flex-end; gap: clamp(3px, 1vw, 8px); height: 100%; }
.bar { flex: 1; min-width: 0; height: 0; border-radius: 999px; background: var(--bar); }
.bar.last { background: var(--blue); }
.sp-line { position: absolute; left: 0; right: 0; bottom: 0; border-top: 1.5px dashed var(--blue); opacity: 0; pointer-events: none; }
.sp-line span { position: absolute; right: 0; top: -22px; font-size: 10px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 999px; padding: 2px 7px; }
.xaxis { position: relative; height: 16px; margin: 8px 0 0 42px; font-size: 10px; font-weight: 600; color: var(--ink2); }
.xaxis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.xaxis span:first-child { transform: none; }
.xaxis span:last-child { transform: translateX(-100%); }

/* seguridad */
.card.blue { background: var(--blue); border-color: transparent; color: #fff; box-shadow: 0 20px 50px -20px rgba(47,91,255,.6); }
.card-h.light { color: #fff; }
.safe-n { font-size: 46px; font-weight: 500; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.safe-n .of { opacity: .55; }
.safe-s { margin: 6px 0 22px; font-size: 14px; opacity: .8; }
.checks { list-style: none; margin: 0 -18px -18px; padding: 0; }
.checks li { display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: center; padding: 13px 18px; border-top: 1px solid rgba(255,255,255,.16); font-size: 15px; font-weight: 500; }
.checks em { font-style: normal; font-size: 12px; opacity: .7; font-weight: 600; }
.cbox { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.35); display: grid; place-items: center; transition: background .3s; }
.cbox svg { width: 18px; height: 18px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; }
.checks li.ok .cbox { background: #fff; }
.checks li.bad .cbox { background: #ff6b6b; }
.checks li.bad .ct { color: #ffd9d9; }

/* minis */
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 760px) { .minis { gap: 16px; } }
.card.mini { min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; }
.mini-l { font-size: 14px; line-height: 1.1; }

/* onboarding */
.onboard { display: grid; gap: 18px; }
.display { margin: 0; font-size: clamp(26px, 6vw, 34px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.onb-txt p { margin: 10px 0 0; font-size: 15px; }
.onb-form { display: grid; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.field { border: 1px solid var(--line); background: var(--field); border-radius: 999px; padding: 12px 16px; min-width: 0; flex: 1; outline: none; }
.field:focus { border-color: var(--blue); }
.field.xs { padding: 6px 10px; width: 70px; flex: none; font-size: 13px; }
select.field.xs { width: auto; }

/* botones */
.btn { border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.blue { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -10px rgba(47,91,255,.8); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.ghost { background: var(--field); color: var(--ink); }
.btn.link { background: none; color: var(--ink2); padding-left: 10px; padding-right: 10px; }
.btn.link.danger { color: var(--red); }
.btn.wide { width: 100%; margin-top: 14px; }
.btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }

/* control */
.cook-n { font-size: 96px; font-weight: 500; letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; margin: 4px 0 18px; }
.cook-n.sm { font-size: 64px; }
.cook-n .unit { display: inline-block; font-size: 18px; letter-spacing: 0; margin-left: 6px; vertical-align: top; margin-top: 10px; }
.slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 999px; outline: none; margin: 0;
  background: linear-gradient(90deg, var(--blue) var(--p, 50%), var(--field) var(--p, 50%));
}
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.25), 0 0 0 6px rgba(47,91,255,.18); }
.slider::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.25), 0 0 0 6px rgba(47,91,255,.18); }
.scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); margin-top: 8px; font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; color: var(--mute); margin: 12px 0 0; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--field); padding: 5px; border-radius: 999px; }
.segmented button { border: 0; background: transparent; border-radius: 999px; padding: 11px; font-weight: 600; }
.segmented button.on { background: var(--blue); color: #fff; }
.segmented button:disabled { opacity: .4; cursor: not-allowed; }
.conn-rows { display: grid; margin: 0 -18px -18px; }
.conn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.conn-row > div:first-child { display: grid; gap: 2px; min-width: 180px; }
.conn-row .muted { font-size: 13px; }
.conn-row form { flex: 1; max-width: 380px; }

/* sesiones (carpetas) */
.folders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
@media (min-width: 760px) { .folders { grid-template-columns: repeat(4, 1fr); } }
.folder { position: relative; height: 118px; border: 0; background: none; padding: 0; text-align: left; color: var(--ink); }
.folder::before { content: ""; position: absolute; left: 0; top: 0; width: 46%; height: 22px; border-radius: 12px 12px 0 0; background: var(--fold-back); border: 1px solid var(--card-b); border-bottom: 0; }
.folder::after { content: ""; position: absolute; inset: 10px 0 auto; height: 40px; border-radius: 0 12px 0 0; background: var(--fold-back); }
.folder .front {
  position: absolute; inset: 22px 0 0; border-radius: 14px; background: var(--fold); border: 1px solid var(--card-b);
  padding: 12px 12px 10px; display: flex; flex-direction: column; justify-content: space-between; z-index: 1;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transform: skewX(-3deg); transform-origin: bottom;
}
.folder .front > * { transform: skewX(3deg); }
.folder b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.folder small { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.folder.live .front { background: var(--blue); color: #fff; border-color: transparent; }
.folder.live small { color: rgba(255,255,255,.8); }
.folder:hover .front { border-color: var(--blue); }

/* tabla y registro */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--ink2); }
.filters label { display: inline-flex; align-items: center; gap: 6px; }
.tbl { max-height: 300px; overflow: auto; border-radius: 16px; background: var(--field); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { position: sticky; top: 0; background: var(--solid); font-weight: 600; font-size: 12px; color: var(--ink2); }
.tbl td:last-child, .tbl th:last-child { text-align: left; }
.log { height: 220px; overflow: auto; font: 12px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; background: var(--field); border-radius: 16px; padding: 10px 14px; }
.log .tx { color: var(--blue); } .log .err { color: var(--red); } .log .evt { font-weight: 700; }

/* ================= Dock ================= */
.dock {
  position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; gap: 10px; pointer-events: none;
}
.tabs {
  pointer-events: auto; position: relative; display: flex; padding: 6px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-b);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.45);
}
.tab-ind { position: absolute; top: 6px; bottom: 6px; left: 6px; width: 0; border-radius: 999px; background: var(--blue); z-index: 0; }
.tab { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--dock-ink); padding: 11px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: color .25s; }
.tab svg { width: 18px; height: 18px; stroke: currentColor; }
.tab.on { color: #fff; }
.fab {
  pointer-events: auto; position: relative; height: 52px; width: 0; padding: 0; margin-left: -10px; overflow: hidden; flex: none;
  display: flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap;
  background: linear-gradient(135deg, var(--red-2), var(--red)); box-shadow: 0 14px 34px -10px rgba(229,72,77,.8);
  visibility: hidden; opacity: 0;
}
.fab svg { flex: none; }

/* ================= Alarma ================= */
.alarm {
  position: fixed; z-index: 30; left: 50%; top: calc(12px + env(safe-area-inset-top)); width: min(560px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 20px;
  background: var(--red); color: #fff; font-weight: 600; font-size: 14px; box-shadow: 0 20px 40px -12px rgba(229,72,77,.7);
  transform: translate(-50%, -160%); visibility: hidden;
}
.alarm-ic { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--red); display: grid; place-items: center; font-weight: 800; flex: none; }
.alarm span:nth-child(2) { flex: 1; }
.alarm button { border: 0; background: rgba(255,255,255,.2); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; line-height: 1; }
body.alarmed .bg-glow { filter: hue-rotate(140deg) saturate(1.4); transition: filter .6s; }

/* ================= Hoja de sesión ================= */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); visibility: hidden; opacity: 0; }
.sheet {
  position: fixed; z-index: 41; left: 50%; bottom: 0; width: min(680px, 100vw); max-height: 90vh; overflow: auto;
  background: var(--solid); color: var(--ink); border-radius: 28px 28px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 105%); visibility: hidden; display: grid; gap: 16px;
}
.grab { width: 44px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto 4px; }
.sh-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sh-head h2 { margin: 2px 0 0; font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.sh-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sh-kpis div { background: var(--field); border-radius: 16px; padding: 10px 12px; }
.sh-kpis b { display: block; font-size: 22px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sh-kpis span { font-size: 11px; color: var(--ink2); }
.sh-cv { width: 100%; height: 220px; display: block; }

.usb-only { display: none; }
.has-serial .usb-only { display: flex; }
.has-serial .btn.usb-only { display: inline-block; }

@media (max-width: 420px) {
  .tab span { display: none; } .tab { padding: 11px 14px; }
  .kpi { font-size: 56px; } .cook-n { font-size: 80px; }
  .sh-kpis { grid-template-columns: repeat(2, 1fr); }
}
