:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1d232b; --muted: #5d6875; --border: #dde2e8;
  --accent: #1f5fbf; --warn-bg: #fff6e0; --warn-border: #e8c46a;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171b; --surface: #1c2026; --text: #e6e9ed; --muted: #9aa4b0; --border: #2e343c;
          --accent: #6ea0ec; --warn-bg: #3a3120; --warn-border: #8a7032; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.topbar { display: flex; align-items: baseline; gap: .75rem; padding: .75rem 1.25rem;
          background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 600; }
.version, .muted { color: var(--muted); }
.container { max-width: 1200px; margin: 1.5rem auto; padding: 0 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem 1.5rem; }
.card h1 { margin-top: 0; font-size: 1.35rem; }
.alert { margin-top: 1rem; padding: .75rem 1rem; border-radius: 6px;
         background: var(--warn-bg); border: 1px solid var(--warn-border); }
code { font-size: .9em; }
.brand { text-decoration: none; color: var(--text); }
.netbar { max-width: 1200px; margin: 1rem auto 0; padding: .6rem 1rem; font-size: .88rem;
          border: 1px solid var(--border); border-radius: 8px; background: var(--surface); display: grid; gap: .2rem; }
.card { margin-bottom: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
button { padding: .45rem .9rem; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent);
         color: #fff; cursor: pointer; font: inherit; }
button.secondary { background: transparent; color: var(--accent); }
select, input { padding: .35rem .45rem; border: 1px solid var(--border); border-radius: 5px; font: inherit;
                background: var(--surface); color: var(--text); }
.alert.error { background: #fde8e8; border-color: #e0a0a0; color: #6b1a1a; }
.tag { display: inline-block; padding: .05rem .45rem; border-radius: 4px; font-size: .8rem; font-weight: 600;
       background: #e7eaee; color: #333; }
.tag.ok, .p25-OPEN, .s-VALID, .chk-PASS { background: #dff3e4; color: #1f6b35; }
.tag.bad, .p25-BLOCKED, .s-INVALID, .s-DISPOSABLE, .chk-FAIL { background: #fbe1e1; color: #8a1f1f; }
.tag.warn, .p25-PARTIAL, .s-RISKY, .s-CATCH_ALL, .s-SUSPICIOUS, .s-POSSIBLE_TYPO, .chk-WARN { background: #fff1d6; color: #7a5200; }
.s-LIKELY_VALID { background: #e6f2e9; color: #2e6b40; }
.s-UNVERIFIABLE, .s-UNKNOWN, .p25-UNKNOWN, .chk-ERROR { background: #e8ecf6; color: #34457a; }
.grid { border-collapse: collapse; width: 100%; font-size: .86rem; }
.grid th, .grid td { border-bottom: 1px solid var(--border); padding: .3rem .45rem; text-align: left; vertical-align: top; }
.grid.kv th { width: 220px; color: var(--muted); font-weight: 500; }
.grid .hl { background: #fff6cc; color: #222; }
.results .reason { max-width: 360px; color: var(--muted); }
.scroll { overflow-x: auto; }
.bar { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; margin: .75rem 0; }
.bar > div { height: 100%; background: var(--accent); transition: width .4s; }
.stats { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.stats > div, .stats > a { min-width: 92px; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 6px;
       text-decoration: none; color: var(--text); background: var(--surface); }
.stats span { display: block; font-size: 1.2rem; font-weight: 600; }
.stats small { color: var(--muted); font-size: .72rem; }
.marks .tag { margin: 0 .15rem .15rem 0; font-weight: 500; }
.detgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .75rem; }
.detgrid > div { border: 1px solid var(--border); border-radius: 6px; padding: .6rem .75rem; }
.detgrid h3 { margin: 0 0 .35rem; font-size: .95rem; }
.conf { display: inline-block; min-width: 3.2em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .5rem; margin-top: .75rem; }
.card-stat { display: block; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 8px;
             text-decoration: none; color: var(--text); background: var(--surface); border-top-width: 4px; }
.card-stat small { display: block; font-size: .68rem; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
.card-stat span { display: block; font-size: 1.5rem; font-weight: 700; margin-top: .15rem; }
.card-stat.active { outline: 2px solid var(--accent); }
.g-validos { border-top-color: #2f9e57; } .g-probables { border-top-color: #7cc491; }
.g-no_verificables { border-top-color: #7a8cc2; } .g-riesgosos { border-top-color: #e0a100; }
.g-invalidos { border-top-color: #d64545; } .g-duplicados { border-top-color: #9aa3ad; }
.g-temporales { border-top-color: #5b8def; } .g-posibles_errores { border-top-color: #e07b00; }
.quick { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 .75rem; }
.quick a { padding: .25rem .7rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none;
           color: var(--text); font-size: .85rem; }
.quick a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
details.filters { margin-bottom: .75rem; } details > summary { cursor: pointer; color: var(--accent); }
h2.inline { display: inline; font-size: 1.1rem; }
.help { cursor: help; border-bottom: 1px dotted var(--muted); }
.results .reason { max-width: 420px; color: var(--text); }
.verif { font-size: .82rem; } .v-ok { color: #1f6b35; } .v-bad { color: #8a1f1f; } .v-warn { color: #7a5200; }
.v-neutral { color: #34457a; } .v-ok2 { color: #2e6b40; } .v-muted { color: var(--muted); }
.s-SUSPICIOUS, .s-CATCH_ALL, .s-POSSIBLE_TYPO, .s-ROLE_ACCOUNT, .s-RISKY { background: #fff1d6; color: #7a5200; }
.s-DUPLICATE { background: #eceff2; color: #4b5560; }
.result-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.result-head div small { display: block; color: var(--muted); font-size: .75rem; }
.result-head div b { font-size: 1.15rem; }
.checks { border-collapse: collapse; } .checks td { padding: .25rem .6rem .25rem 0; vertical-align: top; }
.checks td:first-child { color: var(--muted); width: 190px; } .icon { width: 1.3em; display: inline-block; }
.t-ok { color: #1f6b35; } .t-ok2 { color: #2e6b40; } .t-bad { color: #8a1f1f; } .t-warn { color: #7a5200; }
.t-neutral { color: #34457a; } .t-muted { color: var(--text); }
.interp { background: var(--surface); border-left: 4px solid var(--accent); padding: .6rem .9rem; margin: 0; }
pre.raw { white-space: pre-wrap; word-break: break-word; background: #f4f5f7; color: #222; padding: .6rem;
          border-radius: 6px; font-size: .82rem; }
