:root {
  --navy: #16213e;
  --navy2: #24366b;
  --amber: #f0a500;
  --bg: #f2f4f8;
  --card: #fff;
  --ink: #1c2433;
  --mut: #5d6b82;
  --line: #dfe4ee;
  --ok: #1b8a5a;
  --mid: #bd8200;
  --bad: #c63d31;
  --shadow: 0 6px 22px rgba(22, 33, 62, 0.08);
}
* {
  box-sizing: border-box;
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.55 "Segoe UI",
    system-ui,
    sans-serif;
}
h1,
h2,
h3 {
  font-family: Georgia, Cambria, serif;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}
.wip {
  height: 6px;
  background: linear-gradient(
    90deg,
    #d62828 0 14.2%,
    #f77f00 0 28.5%,
    #fcbf49 0 42.8%,
    #fff 0 57.1%,
    #3a9d5d 0 71.4%,
    #2a6fdb 0 85.7%,
    #7b3fa0 0
  );
}
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: radial-gradient(circle at 20% 15%, var(--navy2), var(--navy) 60%);
  color: #fff;
  transition: opacity 0.6s;
}
.screen.off {
  opacity: 0;
  pointer-events: none;
}
#welcome {
  z-index: 5;
}
#welcome h1 {
  font-size: clamp(2.3rem, 6vw, 4.3rem);
  max-width: 14ch;
}
#welcome p {
  max-width: 54ch;
  color: #c8d2ea;
  margin: 18px 0 34px;
}
.big {
  background: var(--amber);
  color: #1b1300;
  border: 0;
  border-radius: 14px;
  padding: 18px 46px;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(240, 165, 0, 0.35);
  transition: transform 0.15s;
}
.big:hover {
  transform: translateY(-3px);
}
.small {
  font-size: 0.82rem;
  color: #9fb0d4;
  margin-top: 26px;
  max-width: 58ch;
}
#loader {
  z-index: 9;
  opacity: 0;
  pointer-events: none;
}
#loader.on {
  opacity: 1;
  pointer-events: auto;
}
.spin {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--amber);
  animation: spin 1s linear infinite;
  margin-bottom: 26px;
  position: relative;
}
.spin:after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    transform: scale(0.4);
    opacity: 0.5;
  }
}
#loader h2 {
  font-size: 1.5rem;
  max-width: 24ch;
}
#msg {
  color: var(--amber);
  height: 1.6em;
  margin: 12px 0 22px;
  font-weight: 600;
}
.pb {
  width: min(420px, 80vw);
  height: 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  overflow: hidden;
}
.pb i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f77f00, var(--amber));
}
#pct {
  margin-top: 8px;
  color: #9fb0d4;
  font-size: 0.9rem;
}
#app {
  display: none;
}
#app.on {
  display: block;
  animation: fade 0.7s;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.bar0 {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.bar0 div {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.bar0 b {
  font-family: Georgia, serif;
  font-size: 1.2rem;
}
.btn {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 600;
  color: var(--navy);
  transition: 0.15s;
}
.btn:hover {
  border-color: var(--navy2);
}
.btn.act {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.bar0 .btn {
  background: var(--amber);
  border-color: var(--amber);
  color: #1b1300;
}
.wrap0 {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 60px;
}
.hero {
  padding: 34px 0 8px;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}
.hero p {
  color: var(--mut);
  max-width: 70ch;
  margin-top: 8px;
}
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0 6px;
}
.tab {
  flex: 1 1 220px;
  text-align: left;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  transition: 0.15s;
}
.tab b {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.15rem;
}
.tab span {
  color: var(--mut);
  font-size: 0.88rem;
}
.tab.act {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.tab.act span {
  color: #b9c6e6;
}
.note {
  background: #fff8e6;
  border: 1px solid #f1d58a;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: #5a4a1b;
}
h2.s {
  font-size: 1.4rem;
  margin: 26px 0 12px;
}
.crit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.crit div {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--amber);
}
.crit b {
  font:
    700 1.8rem Georgia,
    serif;
  color: var(--navy2);
}
.crit span {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}
.crit p {
  font-size: 0.8rem;
  color: var(--mut);
  margin-top: 4px;
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}
.tools input {
  flex: 1 1 240px;
  background: var(--card);
  border: 1.5px solid var(--line);
  padding: 10px 14px;
  border-radius: 10px;
  font: inherit;
}
.seg {
  display: flex;
}
.seg .btn {
  border-radius: 0;
}
.seg .btn:first-child {
  border-radius: 10px 0 0 10px;
}
.seg .btn:last-child {
  border-radius: 0 10px 10px 0;
  border-left: 0;
}
.wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}
th {
  background: #eaeef6;
  text-align: left;
  padding: 12px 10px;
  font-size: 0.8rem;
  vertical-align: bottom;
  color: var(--navy);
}
td {
  padding: 12px 10px;
  border-top: 1px solid var(--line);
}
tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}
tbody tr:hover {
  background: #f6f8fc;
}
tr.f2 td:first-child {
  box-shadow: inset 6px 0 0 var(--bad);
}
tr.f1 td:first-child {
  box-shadow: inset 6px 0 0 var(--amber);
}
td.n {
  font-weight: 700;
}
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 8px;
  margin: 3px 4px 0 0;
  vertical-align: middle;
}
.t2 {
  background: #fde4e1;
  color: #9b2a20;
}
.t1 {
  background: #fff0c7;
  color: #7a5600;
}
.t3 {
  background: #e4e9f7;
  color: var(--navy2);
}
.t4 {
  background: #eceff3;
  color: #5d6b82;
}
.fin {
  font:
    700 1.2rem Georgia,
    serif;
}
.hi {
  color: var(--ok);
}
.md {
  color: var(--mid);
}
.lo {
  color: var(--bad);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--line);
  transition: transform 0.15s;
}
.card:hover {
  transform: translateY(-3px);
}
.card.f2 {
  border-top-color: var(--bad);
}
.card.f1 {
  border-top-color: var(--amber);
}
.card .top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.card h3 {
  font-size: 1.1rem;
}
.pt {
  color: var(--mut);
  font-size: 0.88rem;
}
.sc {
  --c: var(--ok);
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #e6eaf3 0);
  display: grid;
  place-items: center;
  position: relative;
}
.sc:after {
  content: "";
  position: absolute;
  inset: 7px;
  background: #fff;
  border-radius: 50%;
}
.sc b {
  position: relative;
  z-index: 1;
  font:
    700 1.1rem Georgia,
    serif;
}
.sc.md {
  --c: var(--amber);
}
.sc.lo {
  --c: var(--bad);
}
.row {
  margin-top: 8px;
  font-size: 0.8rem;
}
.row span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.bar {
  height: 7px;
  background: #e6eaf3;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 3px;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--ok);
}
.bar i.md {
  background: var(--amber);
}
.bar i.lo {
  background: var(--bad);
}
.empty {
  padding: 30px;
  text-align: center;
  color: var(--mut);
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 22, 44, 0.6);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 14px;
  overflow: auto;
  z-index: 20;
}
.modal.on {
  display: flex;
  animation: fade 0.25s;
}
.box {
  background: #fff;
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.box h2 {
  font-size: 1.6rem;
  margin-bottom: 4px;
  padding-right: 30px;
}
.x {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: 0;
  font-size: 1.8rem;
  color: var(--mut);
}
.box h3 {
  margin: 18px 0 6px;
  font-size: 1.05rem;
  color: var(--navy2);
}
.box p,
.box li {
  font-size: 0.93rem;
}
.box ul {
  padding-left: 20px;
}
.big2 {
  font:
    700 3rem Georgia,
    serif;
  line-height: 1;
}
.warn {
  background: #fde4e1;
  border: 1px solid #f1b3ac;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 0.9rem;
}
.box table {
  min-width: 0;
  font-size: 0.86rem;
}
.box td,
.box th {
  padding: 7px 8px;
}
a {
  color: var(--navy2);
}
.mut {
  color: var(--mut);
  font-weight: 400;
  font-size: 0.72rem;
  font-family: "Segoe UI", sans-serif;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- Fotos de candidatos ---- */
.av {
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #dfe4ee;
  color: var(--navy2);
  font:
    700 0.95rem "Segoe UI",
    sans-serif;
  overflow: hidden;
}
.av img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.av.lg {
  width: 88px;
  height: 88px;
  font-size: 1.6rem;
}
.nm {
  display: flex;
  gap: 10px;
  align-items: center;
}
.card .top {
  align-items: flex-start;
}
.card .who {
  flex: 1;
  min-width: 0;
}
.box .nm h2 {
  margin-bottom: 2px;
}
.box .nm p {
  margin: 0;
}
