:root {
  --unsa-red: #861826;
  --unsa-red-dark: #63101a;
  --paper: #fff8f4;
  --ink: #22191a;
  --muted: #6f5c5e;
  --ok: #237a3b;
  --warn: #9a1727;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f8eee8;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

.page-shell {
  min-height: 100vh;
}

[hidden] {
  display: none !important;
}

body.result-mode .stage,
body.result-mode .channel-section,
body.result-mode .content-panel {
  display: none;
}

.stage {
  position: relative;
  width: min(100vw, 1536px);
  margin: 0 auto;
  background: #f8eee8;
}

.stage picture {
  display: block;
}

.stage-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.hot-nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nav-link {
  position: absolute;
  color: transparent;
  text-decoration: none;
  pointer-events: auto;
  border-radius: 999px;
}

.nav-link:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

.nav-start {
  left: 50.8%;
  top: 3.8%;
  width: 5.4%;
  height: 5.5%;
}

.nav-about {
  left: 57.1%;
  top: 3.8%;
  width: 18.3%;
  height: 5.5%;
}

.nav-info {
  left: 73.7%;
  top: 3.8%;
  width: 11.4%;
  height: 5.5%;
}

.dni-form {
  position: absolute;
  left: 46.0%;
  top: 48.05%;
  width: 34.7%;
  display: grid;
  gap: clamp(10px, 1.15vw, 18px);
}

.dni-form input {
  width: 100%;
  height: clamp(42px, 4.1vw, 64px);
  padding: 0 clamp(16px, 5.2vw, 96px);
  border: 1px solid rgba(134, 24, 38, 0.22);
  border-radius: clamp(10px, 1vw, 16px);
  color: #34292a;
  background: rgba(255, 250, 247, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  font-size: clamp(15px, 1.35vw, 22px);
  line-height: 1;
  outline: none;
}

.dni-form input::placeholder {
  color: #968789;
}

.dni-form input:focus {
  border-color: rgba(134, 24, 38, 0.72);
  box-shadow: 0 0 0 4px rgba(134, 24, 38, 0.14);
}

.dni-form button {
  width: 100%;
  height: clamp(42px, 4.45vw, 68px);
  border: 0;
  border-radius: clamp(9px, 0.8vw, 14px);
  color: #fff;
  background: linear-gradient(180deg, #a62031 0%, var(--unsa-red) 46%, var(--unsa-red-dark) 100%);
  box-shadow: 0 8px 14px rgba(77, 15, 22, 0.32);
  cursor: pointer;
  font-size: clamp(17px, 1.55vw, 27px);
  font-weight: 700;
}

.dni-form button:hover {
  filter: brightness(1.05);
}

.dni-form button:active {
  transform: translateY(1px);
}

.result-screen {
  position: relative;
  width: min(100vw, 2048px);
  margin: 0 auto;
  background: #f8eee8;
}

.result-screen picture {
  display: block;
}

.result-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.result-top-back {
  position: absolute;
  right: 6.8%;
  top: 3.2%;
  width: 12.6%;
  height: 4.7%;
  border: 0;
  border-radius: 999px;
  color: transparent;
  background: transparent;
  cursor: pointer;
}

.result-kicker {
  position: absolute;
  left: 10.25%;
  top: 20.55%;
  width: 22.4%;
  height: 2.8%;
  margin: 0;
  padding: 0 1.2%;
  border-radius: 999px;
  background: #e7f6e9;
  color: var(--ok);
  font-size: clamp(14px, 1.2vw, 25px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.result-screen.is-missing .result-kicker {
  color: var(--warn);
  background: #fff6f7;
  box-shadow: 0 0 0 10px #fff6f7;
}

.channel-section {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: 26px auto;
  border-radius: 18px;
  overflow: hidden;
  background: #fff8f4;
  box-shadow: 0 16px 38px rgba(86, 20, 28, 0.14);
}

.channel-image {
  display: block;
  width: 100%;
  height: auto;
}

.channel-link {
  position: absolute;
  left: 47.7%;
  top: 76.4%;
  width: 42.2%;
  height: 13.5%;
  border-radius: 18px;
  text-decoration: none;
}

.channel-link:focus-visible {
  outline: 4px solid #25d366;
  outline-offset: 4px;
}

.result-name {
  position: absolute;
  left: 10.3%;
  top: 25.0%;
  width: 56%;
  margin: 0;
  color: var(--unsa-red);
  font-size: clamp(26px, 2.9vw, 58px);
  font-weight: 800;
  line-height: 1.05;
}

.result-data {
  position: absolute;
  left: 10.3%;
  top: 36.1%;
  width: 79.3%;
  height: 27.5%;
  margin: 0;
  font-size: clamp(15px, 1.35vw, 27px);
}

.result-item {
  position: absolute;
  display: grid;
  align-content: center;
  padding-left: 8.0%;
}

.result-item dt {
  display: none;
}

.result-item dd {
  margin: 0;
  min-width: 0;
  color: #171113;
  overflow-wrap: anywhere;
  font-size: 1.04em;
  font-weight: 900;
  line-height: 1.12;
}

.field-dni {
  left: 0;
  top: 0;
  width: 32.2%;
  height: 27.8%;
}

.field-cargo {
  left: 33.4%;
  top: 0;
  width: 32.2%;
  height: 27.8%;
}

.field-tipo {
  left: 66.6%;
  top: 0;
  width: 33.0%;
  height: 27.8%;
}

.field-mesa {
  left: 0;
  top: 34.0%;
  width: 32.2%;
  height: 27.8%;
}

.field-facultad {
  left: 33.4%;
  top: 34.0%;
  width: 32.2%;
  height: 27.8%;
}

.field-escuela {
  left: 66.6%;
  top: 34.0%;
  width: 33.0%;
  height: 27.8%;
}

.field-pagina-pdf {
  left: 0;
  top: 68.4%;
  width: 99.7%;
  height: 27.8%;
}

.back-button {
  position: absolute;
  left: 37.6%;
  top: 79.0%;
  width: 24.8%;
  height: 5.6%;
  border: 0;
  border-radius: 16px;
  color: transparent;
  background: transparent;
  cursor: pointer;
}

.content-panel {
  width: min(980px, calc(100% - 32px));
  margin: 22px auto;
  padding: 22px 26px;
  border: 1px solid rgba(134, 24, 38, 0.16);
  border-radius: 8px;
  background: var(--paper);
}

.content-panel h2 {
  margin: 0 0 8px;
  color: var(--unsa-red);
}

.content-panel p {
  margin: 0;
  color: #3f3334;
  line-height: 1.55;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .stage {
    width: min(100vw, 863px);
    min-height: auto;
    overflow: hidden;
  }

  .stage-image {
    width: 100%;
    height: auto;
    max-width: none;
    transform: none;
  }

  .dni-form {
    left: 14.7%;
    top: 49.0%;
    width: 70.6%;
    gap: clamp(12px, 2.1vw, 18px);
  }

  .dni-form input {
    height: clamp(48px, 10.2vw, 88px);
    padding: 0 clamp(18px, 13vw, 112px);
    border-radius: clamp(10px, 2.1vw, 18px);
    font-size: clamp(15px, 3.1vw, 27px);
  }

  .dni-form button {
    height: clamp(50px, 10vw, 86px);
    border-radius: clamp(10px, 2.1vw, 18px);
    font-size: clamp(18px, 3.7vw, 32px);
  }

  .result-screen {
    width: min(100vw, 955px);
    min-height: auto;
    padding: 0;
    border-radius: 0;
  }

  .result-top-back {
    right: 3.0%;
    top: 1.1%;
    width: 20%;
    height: 4.8%;
  }

  .result-kicker {
    left: 7.0%;
    top: 13.5%;
    width: 50%;
    height: 2.8%;
    padding: 0 2.0%;
    font-size: clamp(14px, 3.1vw, 30px);
  }

  .result-name {
    left: 7.0%;
    top: 17.6%;
    width: 70%;
    font-size: clamp(20px, 3.85vw, 36px);
    line-height: 1.02;
  }

  .result-data {
    left: 6.1%;
    top: 25.8%;
    width: 87.6%;
    height: 41.7%;
    font-size: clamp(12px, 2.65vw, 26px);
  }

  .result-item {
    padding-left: 15.5%;
  }

  .result-item dd {
    transform: translateY(1.15em);
  }

  .field-facultad dd,
  .field-escuela dd {
    font-size: 0.82em;
    white-space: nowrap;
    transform: translateY(2.05em);
  }

  .field-pagina-pdf dd {
    transform: translateY(2.05em);
  }

  .field-dni {
    left: 0;
    top: 0;
    width: 48.6%;
    height: 13.8%;
  }

  .field-cargo {
    left: 51.0%;
    top: 0;
    width: 48.6%;
    height: 13.8%;
  }

  .field-tipo {
    left: 0;
    top: 16.0%;
    width: 48.6%;
    height: 13.8%;
  }

  .field-mesa {
    left: 51.0%;
    top: 16.0%;
    width: 48.6%;
    height: 13.8%;
  }

  .field-facultad {
    left: 0;
    top: 32.2%;
    width: 48.6%;
    height: 13.8%;
  }

  .field-escuela {
    left: 51.0%;
    top: 32.2%;
    width: 48.6%;
    height: 13.8%;
  }

  .field-pagina-pdf {
    left: 0;
    top: 48.8%;
    width: 99.4%;
    height: 13.8%;
  }

  .result-kicker {
    font-size: 13px;
  }

  .back-button {
    left: 13.6%;
    top: 70.0%;
    width: 72.0%;
    height: 4.5%;
    border-radius: 14px;
  }

  .hot-nav {
    display: none;
  }

  .channel-section {
    width: calc(100% - 18px);
    margin: 18px auto;
    border-radius: 16px;
  }

  .channel-link {
    left: 47.7%;
    top: 76.4%;
    width: 42.2%;
    height: 13.5%;
    border-radius: 14px;
  }
}
