/* Fontes servidas pelo próprio site (só o conjunto latino) */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); }

/* Paleta Linho Ártico: branco, gelo, azul claro, azul céu e marinho.
   Verde e vermelho só para estado (dentro/fora da faixa, energia, pressão de alta). */
:root {
  --brand: #1b3a6b;
  --brand-deep: #1b3a6b;
  --accent: #5aa7ff;
  --bg: #eaf3ff;
  --plate: #ffffff;
  --plate-2: #f4f9ff;
  --soft: #cfe6ff;
  --ink: #1b3a6b;
  --muted: #4f6b94;
  --line: #cfe6ff;
  --high: #d93025;
  --low: #5aa7ff;
  --ok: #1e8f52;
  --ok-bg: #e2f5ea;
  --bad: #d93025;
  --bad-bg: #fdecea;
  --caution: #d93025;
  --caution-bg: #cfe6ff;
  --caution-ink: #1b3a6b;
  --mark: #cfe6ff;
  --ice: #5aa7ff;
  --copper: #1b3a6b;
  --mid: #2f6fc0;
  --pale: #8cc1ff;
  --frame: #cfe6ff;
  --on-brand: #ffffff;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-c: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #5aa7ff; --brand-deep: #1b3a6b; --accent: #5aa7ff; --bg: #0e1f3b; --plate: #15294b; --plate-2: #1b3a6b; --soft: #24497f;
    --ink: #eaf3ff; --muted: #a9c6ea; --line: #24497f; --high: #ff6b61; --low: #5aa7ff; --ok: #4cd08a; --ok-bg: #123a2a;
    --bad: #ff7a6b; --bad-bg: #3d1d22; --caution: #ff6b61; --caution-bg: #1b3a6b; --caution-ink: #eaf3ff;
    --mark: #2d5a9a; --ice: #5aa7ff; --copper: #cfe6ff; --mid: #3f86e0; --pale: #a9d2ff; --frame: #08142a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #5aa7ff; --brand-deep: #1b3a6b; --accent: #5aa7ff; --bg: #0e1f3b; --plate: #15294b; --plate-2: #1b3a6b; --soft: #24497f;
  --ink: #eaf3ff; --muted: #a9c6ea; --line: #24497f; --high: #ff6b61; --low: #5aa7ff; --ok: #4cd08a; --ok-bg: #123a2a;
  --bad: #ff7a6b; --bad-bg: #3d1d22; --caution: #ff6b61; --caution-bg: #1b3a6b; --caution-ink: #eaf3ff;
  --mark: #2d5a9a; --ice: #5aa7ff; --copper: #cfe6ff; --mid: #3f86e0; --pale: #a9d2ff; --frame: #08142a; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--frame);
  color: var(--ink);
  font: 14.5px/1.45 var(--font);
  -webkit-tap-highlight-color: transparent;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--brand-deep); }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Moldura de celular só em tela larga (prévia no PC) */
.phone { position: relative; max-width: 440px; min-height: 100dvh; margin: 0 auto; background: var(--bg); display: flex; flex-direction: column; }
@media (min-width: 620px) {
  body { padding-block: 24px; }
  .phone { min-height: 0; height: min(900px, calc(100dvh - 48px)); border-radius: 34px; overflow: hidden; box-shadow: 0 0 0 10px #0d131b, 0 30px 60px rgba(0, 0, 0, .35); }
  main { overflow-y: auto; }
}

/* ---------- Topo: marinho com ilustração em traço ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background:
    radial-gradient(120% 90% at 100% 30%, #2a5594 0%, rgba(42, 85, 148, 0) 60%),
    linear-gradient(160deg, #1f4379 0%, #1b3a6b 55%, #142d55 100%);
  color: var(--on-brand);
  padding-block: 10px 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  border-radius: 0 0 26px 26px;
  box-shadow: 0 10px 28px -14px rgba(27, 58, 107, .6);
  overflow: hidden;
}
.top > * { position: relative; z-index: 1; }
.bar { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 12px; }
/* logo original, placa branca rente à arte */
.brand { display: flex; background: #ffffff; padding: 2px 4px; border-radius: 4px; box-shadow: 0 2px 8px -4px rgba(5, 20, 45, .55); }
.brand img { height: 22px; width: auto; display: block; }
.top.home { padding-block: 10px 14px; }
.top.home .bar { margin-bottom: 8px; min-height: 40px; }
.top.home .brand img { height: 24px; }
.top.home .theme-btn { width: 38px; height: 38px; border-radius: 10px; }
.top.home .theme-btn svg { width: 19px; height: 19px; }
.hero-art { position: absolute; right: 0; top: 30px; width: 44%; max-width: 180px; height: auto; z-index: 0 !important; pointer-events: none;
  fill: none; stroke: #cfe6ff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.top:not(.home) .hero-art { top: -40px; width: 46%; opacity: .25; }
/* título empresarial: uma linha, branco, com linha de apoio */
.hero-txt { margin: 0 0 14px; max-width: 70%; }
.hero-txt b { display: block; font: 700 22px/1.1 var(--font); letter-spacing: -.015em; color: #ffffff; white-space: nowrap; }
.hero-txt span { display: block; margin-top: 3px; white-space: nowrap; font: 500 12.5px/1.3 var(--font); color: #cfe6ff; }
.bar-title { flex: 1; min-width: 0; margin: 0; font: 600 18.5px/1.1 var(--font-c); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { width: 44px; height: 44px; margin-left: -8px; border: 0; background: none; color: var(--on-brand); display: grid; place-items: center; cursor: pointer; border-radius: 10px; }
.back:active { background: rgba(255, 255, 255, .15); }

.search { display: flex; align-items: center; gap: 8px; background: var(--plate); color: var(--muted); border-radius: 16px; padding-left: 14px; min-height: 44px; box-shadow: 0 8px 20px -10px rgba(10, 30, 60, .45); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; height: 42px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search:focus-within { box-shadow: 0 0 0 3px var(--accent); }
.mic { width: 44px; height: 44px; margin-right: 4px; flex: none; border: 0; border-radius: 12px; background: none; color: var(--brand); display: grid; place-items: center; cursor: pointer; }
.mic svg { width: 22px; height: 22px; }
.mic:active { background: var(--plate-2); }
.mic.on { background: #d93025; color: #ffffff; animation: ouvindo 1.2s ease-in-out infinite; }
@keyframes ouvindo { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 48, 37, .45); } 50% { box-shadow: 0 0 0 7px rgba(217, 48, 37, 0); } }
@media (prefers-reduced-motion: reduce) { .mic.on { animation: none; } }
.clear { width: 48px; height: 48px; border: 0; background: none; font-size: 21.5px; cursor: pointer; color: var(--muted); }

main { flex: 1; padding-block: 18px 104px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); outline: 0; display: flex; flex-direction: column; gap: 22px; }
main > * { margin: 0; }

/* ---------- Navegação ---------- */
.tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; z-index: 6;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--plate); border-top: 1px solid var(--line);
  padding-top: 6px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  padding-left: max(6px, env(safe-area-inset-left, 0px));
  padding-right: max(6px, env(safe-area-inset-right, 0px));
}
@media (min-width: 620px) { .tabs { position: absolute; } }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 7px 0 5px; border-radius: 12px; min-height: 56px; justify-content: center; }
.tabs a.on { color: var(--brand); }
.tabs a.on svg { background: var(--soft) !important; }
.tabs a.on svg { background: color-mix(in srgb, var(--brand) 14%, transparent); border-radius: 999px; padding: 3px 14px; width: 54px; height: 30px; }
.tabs svg { padding: 3px 14px; width: 54px; height: 30px; }

/* ---------- Tipografia base ---------- */
.h1 { font: 700 25px/1.05 var(--font-c); text-wrap: balance; margin: 0; }
.h2 { font: 700 17.5px/1.15 var(--font-c); margin: 0 0 10px; text-wrap: balance; }
.sub { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.group-t { font: 600 12.5px/1.2 var(--font); color: var(--muted); margin: 0 0 8px 2px; }
.src { font-size: 11.5px; color: var(--muted); text-align: center; }
section { display: flex; flex-direction: column; }

/* ---------- Blocos ---------- */
.panel { background: var(--plate); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; min-height: 48px; border-bottom: 1px solid var(--line); cursor: pointer; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.row:last-child { border-bottom: 0; }
.row:active { background: var(--plate-2); }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.row .t small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.chev { width: 20px; height: 20px; color: var(--muted); }
.count { font: 600 12.5px/1 var(--font); color: var(--muted); white-space: nowrap; }
.ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c, var(--brand)) 13%, transparent); color: var(--c, var(--brand)); }

/* Ações principais da tela inicial */
.actions { display: grid; gap: 12px; }
.action { display: flex; align-items: center; gap: 14px; padding: 11px 12px 11px 14px; background: var(--plate); border: 1px solid var(--line); border-radius: 16px; min-height: 68px;
  box-shadow: 0 1px 2px rgba(27, 58, 107, .06), 0 6px 18px -12px rgba(27, 58, 107, .35); }
.action:active { background: var(--plate-2); }
.action .ico { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 0 4px 10px -4px rgba(10, 30, 60, .45); }
.action .ico svg { width: 23px; height: 23px; stroke-width: 1.9; }
.action b { display: block; font: 700 18.5px/1.1 var(--font-c); letter-spacing: .005em; }
.action small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.action .t { flex: 1; }
.action.primary { background: linear-gradient(135deg, #21477f 0%, #1b3a6b 60%, #163260 100%); border-color: #1b3a6b; color: var(--on-brand); }
.action.primary small, .action.primary .chev { color: #cfe6ff; }
/* círculos de ícone, todos da paleta Linho Ártico */
.action .ico.ice { background: #cfe6ff; color: #1b3a6b; }
.action .ico.sky { background: #5aa7ff; color: #ffffff; }
.action .ico.navy { background: #1b3a6b; color: #ffffff; box-shadow: inset 0 0 0 2px #5aa7ff, 0 4px 10px -4px rgba(10, 30, 60, .45); }

/* Chips / segmentado */
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); background: var(--plate); border-radius: 10px; font: 700 14.5px/1 var(--font-c); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--brand-deep); border-color: var(--accent); color: #fff; }
.seg.small button { font: 600 12.5px/1 var(--font); min-height: 40px; }

/* ---------- Defeito (detalhe) ---------- */
.progress { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 12.5px; }
.progress .track { flex: 1; height: 8px; background: var(--plate-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.progress .track i { display: block; height: 100%; background: var(--ok); transition: width .2s; }
.linkbtn { border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 8px 4px; font-size: 12.5px; }
.causes { display: grid; gap: 10px; }
.cause { background: var(--plate); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; }
.cause.done { background: var(--plate-2); }
.cause.done .c-t, .cause.done .c-a { color: var(--muted); }
.cause.done .c-t { text-decoration: line-through; }
.tick { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--plate); display: grid; place-items: center; cursor: pointer; color: var(--muted); font: 700 15.5px/1 var(--font-c); }
.cause.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.c-t { font-weight: 700; font-size: 14.5px; line-height: 1.3; align-self: center; }
.c-a { font-size: 13.5px; }
.c-a::before { content: "Fazer: "; font-weight: 700; color: var(--ok); }
.c-go { grid-column: 2; justify-self: start; margin-top: 6px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 700; font-size: 12.5px; }

/* ---------- Medir ---------- */
.controls { display: grid; gap: 8px; }
.summary { border-radius: 14px; padding: 14px 16px; font-weight: 600; display: grid; gap: 8px; }
.summary.idle { background: var(--plate); border: 1px dashed var(--line); color: var(--muted); font-weight: 500; }
.summary.ok { background: var(--ok-bg); color: var(--ok); }
.summary.bad { background: var(--bad-bg); color: var(--bad); }
.summary a { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--plate); color: var(--ink); border-radius: 10px; padding: 12px 14px; font-weight: 600; min-height: 48px; }
.gauge { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); min-height: 68px; }
.gauge:last-child { border-bottom: 0; }
.gauge .t { flex: 1; min-width: 0; }
.gauge .t b { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; line-height: 1.2; }
.gauge .t small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.gauge .t small strong { font: 700 14.5px/1 var(--font-c); color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.read { position: relative; width: 112px; flex: none; }
.read input { width: 100%; height: 46px; border: 2px solid var(--line); border-radius: 12px; background: var(--plate-2); padding: 0 34px 0 10px; font: 700 20px/1 var(--font-c); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.read input::placeholder { color: var(--line); }
.read input:focus { outline: 0; border-color: var(--brand); background: var(--plate); }
.read::after { content: attr(data-u); position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--muted); pointer-events: none; }
.gauge.ok .read input { border-color: var(--ok); background: var(--ok-bg); }
.gauge.bad .read input { border-color: var(--bad); background: var(--bad-bg); }
.state { font-size: 11.5px; font-weight: 700; margin-top: 4px; display: block; }
.gauge.ok .state { color: var(--ok); }
.gauge.bad .state { color: var(--bad); }
.calc-out { font: 700 21.5px/1 var(--font-c); font-variant-numeric: tabular-nums; width: 112px; text-align: right; flex: none; color: var(--muted); }
.gauge.ok .calc-out { color: var(--ok); }
.gauge.bad .calc-out { color: var(--bad); }
.clearall { align-self: center; }

/* ---------- Procedimento ---------- */
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--plate); border: 1px solid var(--line); color: var(--muted); }
.safety { background: var(--caution-bg); border: 1px solid var(--line); border-radius: 14px; color: var(--caution-ink); }
.safety summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; cursor: pointer; min-height: 56px; }
.safety summary::-webkit-details-marker { display: none; }
.safety summary .chev { margin-left: auto; color: inherit; transition: transform .2s; }
.safety[open] summary .chev { transform: rotate(90deg); }
.safety .body { padding: 0 16px 16px; display: grid; gap: 10px; font-size: 13px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills span { background: var(--plate); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; }
.stickyprog { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-block: 8px; margin-block: -8px; }
.steps { display: grid; gap: 10px; }
.step { background: var(--plate); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: 44px 1fr; gap: 6px 12px; }
.step.done { background: var(--plate-2); }
.step.done .s-t, .step.done .s-d { color: var(--muted); }
.step .tick { grid-row: span 2; color: var(--muted); }
.step.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.s-t { font: 700 17.5px/1.1 var(--font-c); align-self: center; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.s-d { font-size: 13.5px; }
.energy { font: 700 11px/1 var(--font); background: var(--caution); color: #fff; padding: 4px 7px; border-radius: 5px; letter-spacing: .02em; }
.ifs { grid-column: 2; display: grid; gap: 6px; }
.ifs div { padding: 9px 11px; border-radius: 10px; font-size: 12.5px; background: var(--ok-bg); }
.ifs div.bad { background: var(--bad-bg); }
.photo { grid-column: 2; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: none; cursor: zoom-in; }
.photo img { display: block; width: 100%; height: 140px; object-fit: cover; }
.finish { background: var(--ok-bg); color: var(--ok); border-radius: 14px; padding: 16px; font-weight: 700; text-align: center; }

/* ---------- Leitura (manual) ---------- */
.prose { font-size: 14.5px; line-height: 1.55; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 4px; }
figure { margin: 4px 0 18px; }
figure button { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; width: 100%; cursor: zoom-in; display: block; }
figure img { width: 100%; display: block; }
figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.defs { display: grid; gap: 8px; }
.defs div { background: var(--plate); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.defs b { display: block; font: 700 15.5px/1.2 var(--font-c); margin-bottom: 2px; }
.ref { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.ref:last-child { border-bottom: 0; }
.ref b { font: 700 15.5px/1.1 var(--font-c); font-variant-numeric: tabular-nums; text-align: right; }
.ref .up { color: var(--ok); }
.ref .down { color: var(--bad); }
.formula { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.formula:last-child { border-bottom: 0; }
.formula code { font: 700 16.5px/1.2 var(--font-c); display: block; }
.formula small { color: var(--muted); font-size: 12.5px; }

/* ---------- Busca ---------- */
.hit { display: block; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.hit:last-child { border-bottom: 0; }
.hit b { display: block; font-size: 14.5px; font-weight: 600; }
.hit p { margin: 3px 0 0; font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.empty { text-align: center; padding: 30px 8px; color: var(--muted); }
.empty b { color: var(--ink); }
.sugg { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.sugg button, .chiprow button { border: 1px solid var(--line); background: var(--plate); border-radius: 999px; padding: 0 14px; min-height: 40px; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.chiprow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-top: 10px; }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow button { flex: none; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: var(--on-brand); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(5, 10, 18, .95); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 78vh; background: #fff; border-radius: 8px; }
.lightbox p { color: #dde6f2; font-size: 12.5px; text-align: center; margin: 0; }
.lightbox button { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); right: max(12px, env(safe-area-inset-right, 0px)); width: 48px; height: 48px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .15); color: #fff; font-size: 23px; cursor: pointer; }
.group-t { display: flex; align-items: center; gap: 8px; }
.group-t .dot { width: 9px; height: 9px; }
/* Cabeçalho dos grupos de defeitos: marcador com halo + nome forte + contagem */
.grp-t { display: flex; align-items: flex-start; gap: 10px; margin: 14px 2px 10px; font: 700 17.5px/1.1 var(--font-c); letter-spacing: .01em; color: var(--ink); }
.grp-t .dot { margin-top: 3px; width: 12px; height: 12px; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 24%, transparent); }
.grp-t .n { flex: 1; min-width: 0; }
.grp-t small { flex: none; margin-top: 5px; font: 600 11.5px/1 var(--font); color: var(--muted); }

.see-all { margin-left: auto; color: var(--brand); font-weight: 700; font-size: 12.5px; }

/* Botão claro/escuro no cabeçalho */
.theme-btn { margin-left: auto; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(207, 230, 255, .22); background: rgba(10, 26, 52, .45); color: #ffffff; }
.theme-btn:active { background: rgba(10, 26, 52, .7); }
.theme-btn svg { width: 22px; height: 22px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}
:root[data-theme="dark"] .action.primary { border-color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .action.primary { border-color: var(--accent); } }
