:root {
  --red: #ab1e23;
  --bright-red: #c00a0d;
  --line-red: #a71117;
  --text: #222;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #dbe7ec;
  color: var(--text);
}

.app-window {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 720px;
  min-height: 430px;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.topbar {
  position: relative;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 6px rgba(0, 0, 0, .18);
  z-index: 2;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(13px, 1.38vw, 17px);
  line-height: 1;
  font-weight: 400;
  transform: translateY(1px);
}

.brand {
  position: absolute;
  right: 12px;
  top: 12px;
  height: 45px;
  display: flex;
  border: 2px solid #fff;
  background: #fff;
  font-size: 11px;
}

.crest {
  width: 41px;
  height: 41px;
  overflow: hidden;
  background: #fff;
}

.crest img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.peru {
  width: 40px;
  display: grid;
  place-items: center;
  background: #ec1c2e;
  color: #fff;
  font-size: 12px;
}

.ministry {
  width: 123px;
  padding: 3px 7px;
  display: flex;
  align-items: center;
  background: #5b5c5e;
  color: #fff;
  line-height: 11px;
}

.workspace {
  position: absolute;
  inset: 70px 0 23px;
  background: #fff;
}

.prelogin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  padding: 16px;
  border: 5px dashed #000;
  background: #ffff00;
  color: #000;
  transform: translate(-50%, -50%) rotate(-1deg);
  box-shadow: 8px 8px 0 #ff00ff;
  font-family: "Courier New", monospace;
  z-index: 4;
}

.prelogin h2 {
  margin: 0 0 14px;
  font-size: 22px;
  text-align: center;
  text-decoration: underline;
}

.prelogin form { display: grid; gap: 6px; }

.prelogin label { font-weight: 700; }

.prelogin input {
  width: 100%;
  min-height: 32px;
  border: 3px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: inherit;
}

.prelogin button {
  min-height: 38px;
  margin-top: 8px;
  border: 4px outset #aaa;
  border-radius: 0;
  background: #00ff00;
  color: #000;
  cursor: pointer;
  font: 700 16px "Courier New", monospace;
}

.prelogin button:active { border-style: inset; }

.prelogin p {
  min-height: 18px;
  margin: 8px 0 0;
  color: #d00;
  font-weight: 700;
  text-align: center;
}

.prelogin[hidden] { display: none; }

/* Deliberately rough first-screen treatment before the real exam UI unlocks. */
.app-window.prelogin-active {
  background: #ff00ff;
  font-family: "Comic Sans MS", "Courier New", monospace;
}

.app-window.prelogin-active .topbar,
.app-window.prelogin-active .statusbar {
  display: none;
}

.app-window.prelogin-active .workspace {
  inset: 0;
  background: repeating-linear-gradient(45deg, #00ff00 0 12px, #ffff00 12px 24px);
}

.app-window.prelogin-active .prelogin {
  width: min(430px, calc(100% - 28px));
  padding: 26px 18px 20px;
  border: 10px double #ff0000;
  background: #0000ff;
  color: #ffff00;
  transform: translate(-50%, -50%) rotate(3deg);
  box-shadow: 16px 16px 0 #ff0000, -12px -10px 0 #00ffff;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
}

.app-window.prelogin-active .prelogin h2 {
  margin-bottom: 24px;
  color: #00ff00;
  font-size: clamp(24px, 7vw, 42px);
  line-height: .9;
  text-shadow: 4px 4px #ff0000;
  transform: rotate(-4deg);
}

.app-window.prelogin-active .prelogin form { gap: 10px; }

.app-window.prelogin-active .prelogin input {
  min-height: 42px;
  border: 6px ridge #00ff00;
  background: #fff;
  font-family: "Comic Sans MS", cursive;
}

.app-window.prelogin-active .prelogin button {
  min-height: 54px;
  margin-top: 14px;
  border: 8px outset #ffff00;
  background: #ff6600;
  color: #000;
  font-size: 22px;
  font-weight: 900;
  text-decoration: underline;
  transform: rotate(-2deg);
}

.app-window.prelogin-active .prelogin p {
  min-height: 24px;
  color: #fff;
  background: #ff0000;
  font-size: 13px;
}

.exam-status {
  position: absolute;
  top: 19px;
  left: 0;
  right: 0;
  z-index: 3;
  padding-bottom: 17px;
  border-bottom: 1px solid #ddd;
  color: #ed5555;
  text-align: center;
}

.exam-status p {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 400;
}

.exam-status div {
  display: inline-block;
  padding: 10px 17px;
  background: #fff900;
  color: #c72020;
  font-size: 10px;
}

.login-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 299px;
  height: 168px;
  display: flex;
  align-items: center;
  padding: 28px 39px 25px 27px;
  border: 2px solid #a8a8a8;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .38);
  transform: translate(-50%, -50%);
}

.id-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 40px;
  margin-right: 32px;
  color: #bd1219;
}

.id-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: currentColor;
}

.id-icon .badge-outline,
.id-icon .badge-clip,
.id-icon .badge-lines {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: square;
  stroke-linejoin: round;
}

.id-icon .badge-outline {
  stroke-linecap: round;
}

.id-icon .badge-clip {
  stroke-width: 5;
}

.fields {
  position: relative;
  width: 121px;
  height: 106px;
}

.select-wrap { display: block; position: relative; height: 31px; }

.select-wrap::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 10px;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid #777;
  pointer-events: none;
}

select {
  width: 100%;
  height: 31px;
  padding: 3px 0 0;
  border: 0;
  border-bottom: 1px solid #aaa;
  border-radius: 0;
  outline: none;
  background: transparent;
  appearance: none;
  font: 10px "Segoe UI", Arial, sans-serif;
  color: #222;
}

.document-field {
  position: relative;
  display: block;
  height: 41px;
  padding-top: 10px;
  border-bottom: 2px solid var(--line-red);
  color: #9f2428;
}

.document-field span {
  position: absolute;
  top: 10px;
  left: 0;
  font-size: 8px;
  transition: .15s ease;
}

.document-field input {
  width: 100%;
  height: 26px;
  padding: 8px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: 11px "Segoe UI", Arial, sans-serif;
}

button {
  position: absolute;
  right: 5px;
  top: 84px;
  width: 98px;
  height: 29px;
  border: 0;
  border-radius: 3px;
  background: var(--bright-red);
  color: #fff;
  box-shadow: 0 3px 5px rgba(0, 0, 0, .45);
  font: 600 11px "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

button:hover { background: #ae0004; }
button:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.key-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 9px;
  flex: 0 0 14px;
}

.key-icon::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  width: 4px;
  height: 4px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.key-icon::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 6px;
  width: 8px;
  height: 6px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 67%, 78% 67%, 78% 42%, 55% 42%, 55% 67%, 35% 67%, 35% 34%, 0 34%);
}

.message {
  position: absolute;
  top: 114px;
  left: -15px;
  width: 155px;
  margin: 0;
  color: #a20d13;
  text-align: center;
  font-size: 8px;
}

.statusbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 23px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--red);
  color: #fff;
  font-size: 10px;
}

.status {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
  border-right: 1px solid rgba(255, 255, 255, .22);
  white-space: nowrap;
}

.ip { width: 101px; }
.mac { width: 124px; }
.credits { flex: 1; overflow: hidden; }
.credits > span {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
}
.light { width: 67px; justify-content: flex-start; padding-left: 8px; }
.version { width: 68px; justify-content: center; gap: 5px; }
.dotnet-mark { font-size: 9px; font-weight: 800; letter-spacing: -.4px; }
.filler { width: 80px; }

.ip-icon {
  display: block;
  width: 15px;
  height: 19px;
  margin-right: 1px;
}

.ip-screen,
.ip-letters,
.ip-stand {
  fill: none;
  stroke: #f4e5e5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ip-screen {
  fill: #f4e5e5;
  stroke-width: 2.5;
}
.ip-letters {
  stroke: var(--red);
  stroke-width: 2.2;
}
.ip-stand { stroke-width: 2.8; }

.ip {
  color: #f4e5e5;
}

.network-icon {
  display: block;
  width: 16px;
  height: 16px;
  margin-right: 1px;
}

.network-case { fill: #f4e5e5; }
.network-mark { fill: var(--red); }

.led-icon {
  display: block;
  width: 14px;
  height: 14px;
  overflow: visible;
}

.led-rays,
.led-base,
.led-pins {
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: square;
}

.led-body { fill: #fff; }
.led-base { stroke-width: 2; }
.led-pins { stroke-width: 2.2; }

@media (max-height: 520px) {
  .login-card { transform: translate(-50%, -50%) scale(.88); }
}

.menu-button {
  display: none;
  position: absolute;
  left: 20px;
  top: 19px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: 27px;
  line-height: 1;
  z-index: 4;
}

.menu-button:hover { background: transparent; }

.app-window.exam-running .menu-button { display: block; }
.app-window.exam-running #pageTitle { font-size: clamp(14px, 1.45vw, 20px); }
.app-window.exam-running .login-card { display: none; }

.exam-summary {
  position: absolute;
  top: 49px;
  left: 50%;
  width: 234px;
  transform: translateX(-50%);
  color: #222;
  text-align: center;
}

.summary-section-title {
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
  color: #ed5555;
  font-size: 17px;
  font-weight: 400;
}

.avatar-box {
  width: 110px;
  height: 122px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 22px auto 19px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
}

.avatar-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.summary-dni {
  color: #333;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.1;
}

.summary-name {
  margin-top: 4px;
  color: #9a8080;
  font-size: 12px;
  text-transform: uppercase;
}

.summary-exam-title {
  margin-top: 44px;
  margin-bottom: 11px;
}

.summary-row {
  display: flex;
  justify-content: center;
  gap: 13px;
  margin: 0 0 10px;
  font-size: 12px;
}

.summary-row strong { font-weight: 600; }
.summary-row.centered { gap: 9px; margin-bottom: 10px; font-size: 11px; }
.summary-subtitle {
  margin: 20px 0 18px;
  color: #444;
  font-size: 19px;
  text-align: left;
}

.summary-divider {
  margin: 21px 0 52px;
  border: 0;
  border-top: 1px solid #ddd;
}

.start-exam-button {
  position: static;
  display: inline-flex;
  width: auto;
  min-width: 191px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 3px;
  background: #c90808;
  box-shadow: 0 3px 6px rgba(0,0,0,.42);
  font-size: 12px;
  white-space: nowrap;
}

.start-exam-button:hover { background: #af0000; }
.start-exam-button:disabled { opacity: .65; cursor: wait; }
.start-exam-message { margin: 12px 0 0; color: #a20d13; font-size: 12px; }
.start-exam-button .key-icon { transform: scale(.85); }
.exam-start-icon {
  display: block;
  width: 18px;
  height: 20px;
  flex: 0 0 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.start-exam-button .key-icon { display: none; }
.exam-screen {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
  background: #fff;
}

.exam-screen[hidden] { display: none; }
.app-window.exam-active .exam-screen { display: flex; }
.app-window.exam-active .exam-summary { display: none; }
.app-window.exam-active .menu-button { display: block; }
.app-window.exam-active #pageTitle { font-size: clamp(14px, 1.42vw, 20px); }

.exam-sidebar {
  width: 307px;
  flex: 0 0 307px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #ddd;
  background: #fff;
}

.exam-sidebar-title {
  margin: 24px 0 14px;
  color: #ed5555;
  font-size: 19px;
  text-align: center;
}

.candidate-photo {
  width: 110px;
  height: 122px;
  margin: 0 auto 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.candidate-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.candidate-name {
  min-height: 35px;
  padding: 0 8px 13px;
  border-bottom: 1px solid #ddd;
  color: #666;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
}

.topics-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px 0;
}

.topic-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
  color: #555;
  font-size: 14px;
  white-space: nowrap;
}

.topic-group-header span:first-child {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-group-header button {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #aaa;
  font-size: 18px;
}

.topic-group-list.collapsed { display: none; }

.question-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 37px;
  padding: 5px 10px;
  border-bottom: 1px solid #f1f1f1;
  color: #000;
  font-size: 11px;
  cursor: pointer;
}

.question-nav-item:hover,
.question-nav-item.active { background: #fff4f4; }
.question-nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.question-nav-badge {
  display: flex;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffb6b6;
  border-radius: 50%;
  color: #000;
  font-size: 11px;
}

.question-nav-badge.answered { border-color: #ed7777; color: #000; }

.answer-summary {
  padding: 0 13px 10px;
  color: #7a3f3f;
  font-size: 11px;
}

.answer-progress {
  height: 12px;
  margin-bottom: 8px;
  background: #eee;
}

.answer-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: #f03535;
}

.answer-summary > div:last-child { display: flex; justify-content: space-between; }
.answer-summary strong { color: #222; font-weight: 400; }

.exam-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 7px 34px 0 13px;
  overflow: hidden;
}

.exam-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
  color: #ef5555;
  font-size: 12px;
}

.exam-toolbar strong { margin-left: 6px; color: #e83c3c; font-size: 16px; }
.exam-toolbar span:last-child { color: #777; font-size: 11px; }

.exam-progress {
  height: 13px;
  margin: 8px 0 20px;
  background: #f5a4a4;
}

.exam-progress span { display: block; height: 100%; width: 0; background: #f43131; }

.question-card {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 21px 18px 24px;
  border: 1px solid #ddd;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,.24);
}

.question-topic {
  padding-bottom: 16px;
  border-bottom: 1px solid #ddd;
  color: #111;
  font-size: 12px;
  font-weight: 700;
}

.question-text {
  margin-top: 20px;
  color: #111;
  font-size: 12px;
  font-weight: 700;
}

.question-image {
  display: block;
  max-width: min(190px, 100%);
  max-height: 190px;
  height: auto;
  margin: 24px auto;
  object-fit: contain;
}

.question-image[hidden] { display: none; }
.question-options { display: flex; flex-direction: column; gap: 22px; margin-top: 29px; }
.question-image:not([hidden]) + .question-options { margin-top: 0; }

.question-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #111;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}

.question-option input {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #f00000;
}

.question-option img { display: block; max-width: 130px; margin: 5px 0; }

.question-navigation {
  display: flex;
  align-items: center;
  gap: 25px;
  min-height: 90px;
  color: #111;
  font-size: 13px;
}

.question-nav-button {
  position: static;
  width: 41px;
  height: 41px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #df2424;
  box-shadow: 0 2px 5px rgba(0,0,0,.35);
  color: #fff;
  font-size: 30px;
  font-weight: 300;
  line-height: 35px;
}

.keyboard-help {
  position: static;
  width: auto;
  height: 35px;
  margin-left: auto;
  padding: 0 20px;
  border: 0;
  border-radius: 3px;
  background: #c90000;
  box-shadow: 0 3px 5px rgba(0,0,0,.38);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.exam-zoom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  height: 37px;
  color: #777;
  font-size: 11px;
}

.exam-zoom button {
  position: static;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #aaa;
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
  color: #777;
  font-size: 16px;
  line-height: 16px;
}

.exam-zoom input { width: 100px; accent-color: #e44; }

@media (max-width: 900px) {
  .exam-sidebar { width: 245px; flex-basis: 245px; }
  .exam-main { padding-right: 14px; }
  .keyboard-help { padding: 0 10px; font-size: 10px; }
}
.exam-main { position: relative; }

.finish-exam {
  position: static;
  top: auto;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  display: inline-flex;
  width: 181px;
  height: 35px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  background: #c5c5c5;
  box-shadow: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  transform: translateX(-50%);
  cursor: not-allowed;
}

.finish-exam:not(:disabled) {
  background: #c90000;
  box-shadow: 0 3px 6px rgba(0,0,0,.4);
  cursor: pointer;
}

.finish-icon {
  width: 15px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.question-nav-button:disabled {
  background: #ee9b9b;
  box-shadow: none;
  cursor: default;
}
.finish-screen {
  position: absolute;
  inset: 0;
  overflow: auto;
  background: #fff;
}

.finish-screen[hidden] { display: none; }
.app-window.finish-active .finish-screen { display: block; }
.app-window.finish-active .exam-screen,
.app-window.finish-active .exam-summary,
.app-window.finish-active .login-card { display: none; }
.app-window.finish-active .menu-button { display: block; }
.app-window.finish-active #pageTitle { font-size: clamp(14px, 1.42vw, 20px); }

.finish-panel {
  position: absolute;
  inset: 20px 10px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

.finish-section-title {
  margin: 18px 5px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
  color: #ed5555;
  font-size: 18px;
  font-weight: 400;
}

.finish-avatar {
  width: 112px;
  height: 122px;
  margin: 23px auto 22px;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
}

.finish-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.finish-name {
  color: #555;
  font-size: 19px;
  text-transform: uppercase;
}

.finish-divider {
  height: 1px;
  margin: 42px 5px 0;
  background: #ddd;
}

.finish-exam-label { margin-top: 32px; }
.finish-row {
  display: inline-flex;
  gap: 14px;
  margin: 13px 4px 0;
  color: #111;
  font-size: 12px;
}
.finish-row strong { font-weight: 600; }

.delivery-message {
  margin: 24px 0 16px;
  color: #555;
  font-size: 19px;
}

.finish-lower-divider { margin-top: 0; }

.new-exam-button {
  position: static;
  display: inline-flex;
  width: 251px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 28px;
  padding: 0 15px;
  border: 0;
  border-radius: 3px;
  background: #c90000;
  box-shadow: 0 3px 6px rgba(0,0,0,.4);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.new-exam-button:hover { background: #ae0000; }
.new-exam-icon { font-size: 18px; line-height: 1; }
@media (max-width: 720px) {
  html, body { min-width: 0; overflow: hidden; }

  .app-window {
    min-width: 0;
    min-height: 0;
    height: 100vh;
    overflow: hidden;
  }

  .topbar { height: 64px; }
  .topbar h1 {
    max-width: calc(100% - 120px);
    overflow: hidden;
    font-size: 12px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand {
    top: 8px;
    right: 4px;
    height: 38px;
    transform: scale(.76);
    transform-origin: right top;
  }

  .workspace { inset: 64px 0 30px; overflow: auto; }

  .login-card {
    width: min(299px, calc(100% - 24px));
    height: 160px;
    padding: 24px 20px;
  }

  .id-icon { margin-right: 19px; transform: scale(.9); transform-origin: left center; }
  .fields { width: min(121px, calc(100% - 67px)); }
  .fields button { right: 0; }

  .exam-summary {
    top: 28px;
    width: min(234px, calc(100% - 30px));
  }

  .exam-screen { flex-direction: column; overflow: auto; }
  .exam-sidebar {
    width: 100%;
    flex: 0 0 auto;
    max-height: 235px;
    border-right: 0;
    border-bottom: 1px solid #ddd;
  }

  .exam-sidebar-title { margin: 10px 0 6px; font-size: 15px; }
  .candidate-photo { width: 66px; height: 73px; margin-bottom: 5px; }
  .candidate-name { min-height: 25px; padding-bottom: 7px; font-size: 12px; }
  .topics-nav { max-height: 105px; padding-top: 4px; }
  .topic-group-header { height: 31px; padding: 0 10px; font-size: 11px; }
  .question-nav-item { min-height: 27px; padding: 3px 8px; font-size: 10px; }
  .question-nav-badge { width: 17px; height: 17px; flex-basis: 17px; font-size: 9px; }
  .answer-summary { padding: 6px 10px 7px; font-size: 10px; }
  .answer-progress { height: 7px; margin-bottom: 4px; }

  .exam-main {
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100vh - 329px);
    padding: 5px 8px 0;
  }

  .exam-toolbar { font-size: 10px; }
  .exam-toolbar strong { font-size: 12px; }
  .exam-toolbar span:last-child { font-size: 9px; }
  .exam-progress { height: 8px; margin: 5px 0 10px; }
  .question-card { padding: 14px 12px; }
  .question-topic, .question-text { font-size: 11px; }
  .question-options { gap: 14px; }
  .question-option { font-size: 11px; }
  .question-image { max-width: min(130px, 100%); max-height: 130px; margin: 20px auto; }
  .question-navigation { min-height: 60px; gap: 12px; }
  .question-nav-button { width: 34px; height: 34px; font-size: 24px; line-height: 30px; }
  .keyboard-help { max-width: 210px; height: 30px; overflow: hidden; padding: 0 7px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .finish-exam { bottom: 31px; width: 170px; height: 31px; font-size: 10px; }
  .exam-zoom { height: 28px; font-size: 10px; }
  .exam-zoom input { width: 65px; }

  .finish-panel { inset: 10px 5px 5px; }
  .finish-section-title { margin-top: 12px; font-size: 15px; }
  .finish-avatar { width: 82px; height: 91px; margin: 14px auto; }
  .finish-name { font-size: 13px; }
  .finish-divider { margin-top: 24px; }
  .finish-exam-label { margin-top: 18px; }
  .delivery-message { margin: 18px 10px 12px; font-size: 13px; }
  .new-exam-button { width: 215px; height: 31px; margin-top: 18px; font-size: 10px; }

  .statusbar {
    height: 30px;
    font-size: 8px;
  }
  .status.ip { width: 92px; }
  .status.mac { width: 119px; }
  .status.credits { display: none; }
  .status.light { width: 40px; margin-left: auto; }
  .status.version { width: 68px; }
  .status.filler { display: none; }
}

@media (max-width: 420px) {
  .topbar h1 { max-width: calc(100% - 100px); font-size: 10px; }
  .brand { transform: scale(.62); }
  .login-card { transform: translate(-50%, -50%) scale(.9); }
  .exam-sidebar { max-height: 205px; }
  .exam-main { height: calc(100vh - 299px); }
  .keyboard-help { max-width: 145px; }
  .status.ip { width: 82px; }
  .status.mac { width: 105px; }
}
.finish-exam.is-hidden { display: none; }

.workspace {
  overflow: auto;
  scrollbar-gutter: stable;
}

.exam-screen {
  overflow: auto;
  scrollbar-gutter: stable;
}

.exam-main {
  overflow: auto;
  scrollbar-gutter: stable;
}

.finish-exam {
  left: 0;
  right: 0;
  top: auto;
  margin-left: auto;
  margin-right: auto;
  transform: none;
  transition: none;
}

.finish-exam:active,
.finish-exam:hover {
  transform: none;
}

.finish-exam.is-hidden { display: none; }
.workspace,
.exam-screen,
.finish-screen {
  scroll-padding-bottom: 88px;
}

.exam-screen {
  padding-bottom: 88px;
}

.exam-main {
  padding-bottom: 88px;
}

.finish-screen {
  padding-bottom: 88px;
}
.workspace,
.exam-screen,
.finish-screen {
  scroll-padding-bottom: 220px;
  padding-bottom: 220px;
}

.exam-main { padding-bottom: 220px; }
.exam-summary {
  padding-bottom: 50px;
}

.finish-screen {
  padding-bottom: 50px;
}
.exam-screen {
  height: 100%;
  min-height: 100%;
  padding-bottom: 0;
  box-sizing: border-box;
}

.exam-main {
  height: 100%;
  min-height: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}

.question-card {
  min-height: 0;
  flex: 0 0 auto;
}
.app-window.exam-active .workspace {
  padding-bottom: 0 !important;
  overflow: hidden;
}

.app-window.exam-active .exam-screen {
  height: 100%;
  min-height: 0;
  padding-bottom: 0 !important;
  overflow: hidden;
}

.app-window.exam-active .exam-main {
  height: auto;
  min-height: 0;
  padding-bottom: 16px;
  overflow: auto;
  flex: 1 1 auto;
}

.exam-main > * { flex-shrink: 0; }

.app-window.exam-active .question-card {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

@media (max-width: 720px) {
  .app-window.exam-active .workspace {
    overflow: auto;
  }

  .app-window.exam-active .exam-screen {
    overflow: auto;
  }
}

.summary-subtitle {
  text-align: center;
}

.exam-toolbar {
  position: relative;
  justify-content: flex-end;
}

.exam-toolbar > span:first-child {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.exam-toolbar > span:last-child {
  margin-left: auto;
}

@media (max-width: 720px) {
  .exam-toolbar {
    justify-content: space-between;
  }

  .exam-toolbar > span:first-child {
    position: static;
    transform: none;
  }

  .exam-toolbar > span:last-child {
    margin-left: 0;
  }
}

.question-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.question-nav-button {
  padding-bottom: 2px;
}
