:root {
  --bg: #f4f6fa; --card: #ffffff; --ink: #0f1b2d; --muted: #5b6b80; --line: #dde3ec;
  --accent: #0e8fc6; --accent-ink: #ffffff; --soft: #e6f4fb; --warn: #b42318; --ok: #11795a;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1422; --card: #111d30; --ink: #e8eef7; --muted: #93a3b8; --line: #22324a;
          --accent: #29abe2; --accent-ink: #061322; --soft: #0f2a40; --warn: #f97066; --ok: #47cd89; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); padding: 12px 0; margin-bottom: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 8px 0; }
.muted, small { color: var(--muted); }
small { display: block; font-size: 13px; font-weight: 400; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 600; padding: 0 6px; }
.opt { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.opt input { width: auto; margin-top: 4px; }
button { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 11px 18px; background: var(--accent); color: var(--accent-ink); cursor: pointer; min-height: 44px; }
button:disabled { opacity: .55; cursor: default; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.big { font-size: 18px; padding: 14px 32px; }
.links { list-style: none; margin: 0; padding: 0; }
.links li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.links li:first-child { border-top: 0; }
.links .url { font-weight: 600; word-break: break-all; }
.estado { font-size: 13px; color: var(--muted); }
.estado.hecho { color: var(--ok); }
.guia summary { cursor: pointer; font-weight: 600; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .cols { grid-template-columns: 1fr; } .links li { flex-direction: column; align-items: flex-start; } }
.error { color: var(--warn); font-weight: 600; margin: 0; }
.reloj { font-size: 20px; font-weight: 700; margin: 0; }
.reloj.bajo { color: var(--warn); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; max-width: 90vw; }
pre { white-space: pre-wrap; background: var(--soft); border-radius: 8px; padding: 14px; font-size: 14px; }
.nota { background: var(--soft); border-radius: 8px; padding: 12px 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; border-top: 0; white-space: nowrap; }
tr.dia { cursor: pointer; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.alerta { color: var(--warn); }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--soft); margin-right: 4px; white-space: nowrap; }
.chip.alta { background: var(--warn); color: #fff; }
.detalle { background: var(--bg); }
.detalle h3 { margin: 14px 0 6px; }
.rev { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 8px 0; background: var(--card); }
.rev dl { margin: 6px 0 0; display: grid; grid-template-columns: 170px 1fr; gap: 4px 12px; }
.rev dt { color: var(--muted); } .rev dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
select { font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.scroll { overflow-x: auto; }
@media (max-width: 700px) { .rev dl { grid-template-columns: 1fr; } }
.wrap.ancho { max-width: 1180px; }
.veredicto { margin-top: 10px; flex-wrap: wrap; }
.veredicto input { flex: 1; min-width: 180px; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; }
