:root {
  --navy: #0d2f68;
  --blue: #08b6d0;
  --border: #d6dde8;
  --page: #f3f5f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: 220px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .58) 25%, transparent 25%) 0 0 / 360px 360px,
    linear-gradient(315deg, rgba(166, 224, 187, .34) 25%, transparent 25%) 0 0 / 460px 460px,
    #dff5e5;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

.background-shapes {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.background-shape {
  position: absolute;
  display: block;
  opacity: .28;
  background: #9bd8ad;
  animation: shape-drift 16s ease-in-out infinite alternate;
}

.shape-one {
  top: 14%;
  left: -5%;
  width: 260px;
  height: 190px;
  clip-path: polygon(0 25%, 72% 0, 100% 68%, 38% 100%);
}

.shape-two {
  top: 42%;
  right: -4%;
  width: 310px;
  height: 240px;
  background: #b9e8c5;
  clip-path: polygon(28% 0, 100% 20%, 76% 100%, 0 72%);
  animation-delay: -5s;
}

.shape-three {
  bottom: 4%;
  left: 14%;
  width: 220px;
  height: 160px;
  background: #83c99b;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation-delay: -9s;
}

.shape-four {
  top: 8%;
  right: 18%;
  width: 150px;
  height: 120px;
  background: #c6efd0;
  clip-path: polygon(0 0, 100% 18%, 78% 100%, 18% 72%);
  animation-delay: -12s;
}

@keyframes shape-drift {
  from {
    transform: translate3d(-12px, 8px, 0) rotate(-3deg);
  }
  to {
    transform: translate3d(18px, -16px, 0) rotate(5deg);
  }
}

.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 12px 20px 14px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(210, 250, 220, .34) 0 24%, transparent 24% 58%, rgba(147, 214, 165, .14) 58% 76%, transparent 76%),
    rgba(235, 255, 241, .46);
  background-size: 520px 260px, auto;
  backdrop-filter: blur(20px) saturate(115%);
  -webkit-backdrop-filter: blur(20px) saturate(115%);
  border-top: 3px solid rgba(35, 64, 74, .9);
  border-bottom: 1px solid rgba(91, 176, 117, .34);
  box-shadow: 0 8px 24px rgba(54, 123, 76, .12), inset 0 1px 0 rgba(255, 255, 255, .65);
}

.brand-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 34px);
}

.brand-inline .logo {
  width: min(170px, 100%);
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

main {
  position: relative;
  z-index: 1;
  padding-top: 12px;
}

.logo {
  width: 145px;
  max-width: 100%;
  height: auto;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 34px);
}

.page-header p {
  margin: 0 0 14px;
  font-size: 15px;
}

.instruction-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  width: min(100%, 980px);
  margin: 0 auto;
}

.level-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.instruction-button {
  display: inline-flex;
  align-items: center;
  height: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 4px;
  padding: 3px 12px;
  color: #fff;
  background: var(--navy);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}

.instruction-button:hover {
  background: var(--blue);
  color: #06253d;
}

.instruction-button:first-child {
  background: #2f9e62;
  color: #fff;
}

.instruction-button:first-child:hover {
  background: #b7e4c7;
  color: #1f5d39;
}

.instruction-button:first-child.active:not(:hover) {
  background: #2f9e62;
  color: #fff;
}

.instruction-actions .done-assessment-button {
  margin-left: 2px;
}

.instruction-actions .completion-panel {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  width: fit-content;
  flex-basis: 100%;
}

.completion-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 12px auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.completion-panel label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #34434d;
  font-size: 13px;
  font-weight: 700;
}

.completion-panel select,
.done-assessment-button {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #9aa6ad;
  border-radius: 4px;
  font: inherit;
}

.completion-panel select {
  width: 110px;
  min-width: 0;
  background: #fff;
  color: #1f5d39;
  font-size: 13px;
  font-weight: 600;
}

.location-seat-stack {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
}

.location-seat-stack label {
  display: block;
  margin: 0;
  line-height: 0;
}

.done-assessment-button {
  height: 28px;
  min-width: 0;
  background: #68747b;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.done-assessment-button:hover {
  background: #4e5a61;
}

.assistance-button {
  min-width: 0;
  height: 28px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #9aa6ad;
  border-radius: 4px;
  background: #d7dde1;
  color: #34434d;
  font: inherit;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.assistance-button:hover {
  background: #c1cbd1;
}

.notification-wait-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 20;
  width: min(calc(100% - 32px), 420px);
  transform: translate(-50%, -50%) scale(.96);
  padding: 16px 20px;
  border: 1px solid #9aa6ad;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 43, 52, .2);
  color: #26343c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  transition: opacity .2s ease, transform .2s ease;
  opacity: 0;
  pointer-events: none;
}

.notification-wait-popup.visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.notification-wait-close {
  position: absolute;
  top: 4px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #26343c;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.wifi-help-card {
  position: fixed;
  right: clamp(12px, 2vw, 28px);
  bottom: 24px;
  z-index: 15;
  width: min(270px, calc(100vw - 24px));
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(40, 132, 75, .24);
  border-radius: 18px;
  background: linear-gradient(145deg, #f3fff5, #fff 72%);
  box-shadow: 0 12px 34px rgba(38, 104, 59, .2), 0 2px 8px rgba(31, 75, 46, .08);
  color: #1b3826;
  animation: wifi-card-in .35s ease-out both;
}

.wifi-help-card[hidden] {
  display: none;
}

.wifi-help-card::before,
.wifi-help-card::after {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(60, 165, 93, .16);
  border-radius: 50%;
  background: rgba(135, 222, 158, .17);
  content: "";
  pointer-events: none;
}

.wifi-help-card::before {
  top: -28px;
  right: 22px;
  width: 74px;
  height: 74px;
  animation: wifi-bubble 5s ease-in-out infinite;
}

.wifi-help-card::after {
  top: 42px;
  right: -18px;
  width: 38px;
  height: 38px;
  background: rgba(135, 222, 158, .12);
  animation: wifi-bubble 6s ease-in-out infinite reverse;
}

.wifi-help-content {
  position: relative;
  z-index: 1;
}

.wifi-help-close {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .78);
  color: #42624c;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.wifi-help-close:hover {
  background: #dff5e5;
}

.wifi-help-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 30px 12px 0;
  color: #176c39;
  font-size: 15px;
  font-weight: 700;
}

.wifi-help-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: #d9f5e1;
  color: #218a4a;
}

.wifi-help-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.wifi-help-message {
  margin: 0 0 13px;
  font-size: 13px;
  line-height: 1.45;
}

.wifi-help-message strong {
  color: #176c39;
}

.wifi-detail {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(49, 126, 70, .14);
  font-size: 12px;
}

.wifi-detail-label {
  color: #64766a;
}

.wifi-detail-value {
  color: #183c25;
  font-size: 13px;
  font-weight: 700;
}

.wifi-help-launcher {
  position: fixed;
  right: clamp(12px, 2vw, 28px);
  bottom: 24px;
  z-index: 15;
  display: none;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #238c4b;
  box-shadow: 0 6px 20px rgba(38, 104, 59, .28);
  color: #fff;
  cursor: pointer;
}

.wifi-help-launcher.visible {
  display: grid;
}

.wifi-help-launcher svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@keyframes wifi-card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wifi-bubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  .wifi-help-card,
  .wifi-help-card::before,
  .wifi-help-card::after {
    animation: none;
  }
}

.instruction-button,
.done-assessment-button,
.assistance-button,
.completion-panel select {
  width: clamp(110px, 18vw, 180px);
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  justify-content: center;
  text-align: center;
}

.completion-panel select {
  text-align: center;
}

.document-viewer {
  display: grid;
  gap: 18px;
  justify-items: center;
  width: min(calc(100% - 24px), 900px);
  margin: 18px auto 0;
  padding: 0 12px;
}

.document-frame {
  display: block;
  width: 100%;
  height: min(1100px, calc(100vh - 260px));
  min-height: 720px;
  border: 0;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .12);
}

.document-status {
  margin: 26px auto;
  color: #536174;
  text-align: center;
  font-size: 14px;
}

.pdf-fallback {
  margin: 12px auto;
  max-width: 900px;
  padding: 0 16px;
  text-align: center;
  font-size: 13px;
}

.pdf-fallback a {
  color: var(--navy);
  font-weight: 700;
}

@media (max-width: 600px) {
  body {
    padding-top: 220px;
  }

  .completion-panel {
    flex-wrap: wrap;
    max-width: calc(100% - 20px);
  }

  .instruction-actions {
    gap: 4px;
    padding: 0 6px;
  }

  .level-actions {
    gap: 3px;
  }

  .instruction-actions .completion-panel {
    flex-basis: 100%;
  }

  .instruction-button {
    height: 24px;
    min-height: 24px;
    padding: 3px 3px;
    font-size: 8px;
  }

  .instruction-actions .done-assessment-button {
    height: 30px;
    min-height: 30px;
    padding: 5px 3px;
    font-size: 10px;
  }

  .assistance-button {
    height: 24px;
    min-height: 24px;
    padding: 5px 3px;
    font-size: 8px;
  }

  .completion-panel {
    gap: 3px;
    padding: 0;
    flex-wrap: nowrap;
  }

  .completion-panel select {
    width: 68px;
    padding: 6px 3px;
    font-size: 8px;
  }

  .instruction-button,
  .done-assessment-button,
  .assistance-button,
  .completion-panel select {
    width: 110px;
    height: 30px;
    min-height: 30px;
    font-size: 10px;
  }

  .document-viewer {
    padding: 0 8px;
  }

  main {
    padding-top: 14px;
  }
}

