:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --soft-border: rgba(205, 225, 213, 0.16);
}
body {
  background-image:
    radial-gradient(ellipse at 85% 18%, #83aa5920, transparent 48%),
    radial-gradient(ellipse at 5% 85%, #367bbb14, transparent 45%);
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: #d0f878;
  color: #182113;
}
.site-header {
  border-bottom: 1px solid #ffffff08;
}
.session {
  color: #dce4da;
}
.session-label {
  color: #8b9994;
}
#progress {
  background: linear-gradient(90deg, #8ac9ef, #d0f878 65%);
  box-shadow: 0 0 15px #d0f87850;
  transition: width 0.55s var(--ease-out);
}
.screen {
  animation: none;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
.screen-heading h1,
.intro-copy h1 {
  color: #f6f8ef;
  text-shadow: 0 3px 30px #0002;
}
.eyebrow {
  color: #d0f878;
  letter-spacing: 2.2px;
}
.panel,
.course-panel,
.result-card,
.hint-card {
  border-color: var(--soft-border);
  border-radius: 20px;
  background: linear-gradient(145deg, #293532, #191f21 75%);
  box-shadow:
    0 18px 48px #00000024,
    inset 0 1px #ffffff08;
}
.product-card,
.department:nth-child(n),
.quiz-option {
  border-radius: 18px;
  border-color: var(--soft-border);
  box-shadow:
    0 12px 30px #0002,
    inset 0 1px #ffffff08;
}
.department:nth-child(even) {
  background: linear-gradient(145deg, #203345, #1a252d);
}
.department.active:nth-child(n),
.quiz-option.active {
  border-color: var(--lime);
  box-shadow:
    0 0 0 1px #d0f87820,
    0 12px 34px #0003;
}
.primary {
  border-radius: 10px;
  box-shadow:
    0 6px 22px #b9df6418,
    inset 0 1px #ffffff40;
  font-weight: 700;
}
.pill {
  border-color: #ffffff20;
  background: #ffffff04;
}
.tabs {
  gap: 10px;
}
.tabs button {
  border-radius: 10px;
}
.tabs button.active {
  box-shadow: inset 0 1px #d0f87830;
}
.choice {
  border-radius: 8px;
}
.choice.active {
  box-shadow: inset 0 0 0 1px #d0f87820;
}
.direction-duty,
.creation-chip {
  border-color: var(--soft-border);
  box-shadow: inset 0 1px #ffffff06;
}
.student-media,
.direction-portrait {
  box-shadow: 0 16px 40px #0003;
}
button,
a.primary {
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.25s ease,
    translate 0.25s var(--ease-out),
    filter 0.2s ease;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
}
@media (hover: hover) and (pointer: fine) {
  .primary:hover:not(:disabled) {
    translate: 0 -2px;
    box-shadow: 0 10px 28px #b9df642b;
  }
  .department:hover:not(:disabled),
  .quiz-option:hover:not(:disabled),
  .product-card:hover {
    border-color: #9bac85;
    translate: 0 -4px;
    box-shadow: 0 20px 38px #0003;
  }
  .choice:hover:not(:disabled),
  .tabs button:hover:not(:disabled) {
    border-color: #b4c79c;
    background: #d0f87812;
  }
  .student-carousel-controls button:hover {
    background: #d0f87815;
    border-color: var(--lime);
  }
  .nav-button:hover:not(:disabled),
  .icon-button:hover {
    translate: 0 -2px;
  }
}
.primary:active:not(:disabled),
.nav-button:active:not(:disabled),
.choice:active:not(:disabled),
.department:active:not(:disabled),
.quiz-option:active:not(:disabled) {
  translate: 0 1px;
}
.screen[data-entering='true'] .screen-heading,
.screen[data-entering='true'] .intro-copy {
  animation: polish-reveal 0.5s var(--ease-out) both;
}
.screen[data-entering='true'] .screen-body,
.screen[data-entering='true'] .speaker-card,
.screen[data-entering='true'] .tablet-message,
.screen[data-entering='true'] .hand-phone-screen {
  animation: polish-reveal 0.6s 0.07s var(--ease-out) both;
}
.screen[data-entering='true']
  :is(.department-grid, .quiz-options, .level-path, .direction-duty-list)
  > * {
  animation: polish-reveal 0.5s var(--ease-out) both;
  animation-delay: 0.1s;
}
.screen[data-entering='true']
  :is(.department-grid, .quiz-options, .level-path, .direction-duty-list)
  > :nth-child(2) {
  animation-delay: 0.16s;
}
.screen[data-entering='true']
  :is(.department-grid, .quiz-options, .level-path, .direction-duty-list)
  > :nth-child(3) {
  animation-delay: 0.22s;
}
.screen[data-entering='true']
  :is(.department-grid, .quiz-options, .level-path, .direction-duty-list)
  > :nth-child(n + 4) {
  animation-delay: 0.28s;
}
.correct,
.assigned,
.confirmation-mark {
  animation: polish-confirm 0.35s var(--ease-out) both;
}
.student-media {
  animation: polish-reveal 0.35s ease both;
}
#next.next-ready:not(:disabled) {
  animation: next-step-pulse 2.4s ease-in-out 3;
}
@keyframes polish-reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes polish-confirm {
  from {
    opacity: 0.3;
    scale: 0.97;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  button,
  a.primary {
    translate: none !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .screen[data-entering='true'] .screen-heading {
    animation: none;
  }
  .screen[data-entering='true'] .screen-heading > * {
    animation: motion-title 0.7s var(--ease-out) backwards;
  }
  .screen[data-entering='true'] .screen-heading h1 {
    animation-delay: 0.07s;
  }
  .screen[data-entering='true'] .screen-heading p {
    animation-delay: 0.15s;
  }
  .screen[data-entering='true'] .intro-copy {
    animation: motion-left 0.85s var(--ease-out) backwards;
  }
  .screen[data-entering='true'] .speaker-card {
    animation: motion-right 1s 0.12s var(--ease-out) backwards;
  }
  .screen[data-entering='true'] .screen-body {
    animation: motion-title 0.8s 0.14s var(--ease-out) backwards;
  }
  .screen-around[data-entering='true'] .screen-body,
  .screen[data-entering='true']
    .screen-body:has(.department-grid, .quiz-options, .direction-duty-list) {
    animation: none;
  }
  .screen[data-entering='true'] .tablet-message {
    animation: motion-title 0.7s 0.12s var(--ease-out) backwards;
  }
  .screen[data-entering='true'] .hand-phone-screen {
    animation: polish-reveal 0.6s 0.07s ease backwards;
  }
  .screen[data-entering='true']
    :is(.department-grid, .quiz-options, .level-path, .direction-duty-list)
    > * {
    animation-name: motion-card;
    animation-duration: 0.8s;
    animation-fill-mode: backwards;
  }
  .floating-product {
    --fly-x: -180px;
    --fly-y: 100px;
    --fly-turn: -24deg;
    --entrance-delay: 0.1s;
  }
  .product-1 {
    --fly-x: -70px;
    --fly-y: -140px;
    --fly-turn: 20deg;
    --entrance-delay: 0.24s;
  }
  .product-2 {
    --fly-x: 80px;
    --fly-y: 140px;
    --fly-turn: -20deg;
    --entrance-delay: 0.38s;
  }
  .product-3 {
    --fly-x: 180px;
    --fly-y: -90px;
    --fly-turn: 26deg;
    --entrance-delay: 0.52s;
  }
  .screen-around[data-entering='true'] .product-sprite {
    animation: motion-product 1.1s var(--entrance-delay) both;
  }
  .screen-around[data-entering='true'] figcaption {
    animation: motion-caption 0.5s calc(var(--entrance-delay) + 0.45s) backwards;
  }
  .student-media {
    animation: motion-card 0.65s var(--ease-out) backwards;
  }
  .correct,
  .assigned,
  .confirmation-mark {
    animation: motion-success 0.55s var(--ease-out) backwards;
  }
  @media (max-width: 720px) {
    .floating-product {
      --fly-x: -65px;
      --fly-y: 65px;
    }
    .product-1 {
      --fly-x: 65px;
      --fly-y: -65px;
    }
    .product-2 {
      --fly-x: -65px;
      --fly-y: 65px;
    }
    .product-3 {
      --fly-x: 65px;
      --fly-y: -65px;
    }
  }
}
@keyframes motion-title {
  from {
    opacity: 0;
    transform: translateY(-32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes motion-left {
  from {
    opacity: 0;
    translate: -90px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes motion-right {
  from {
    opacity: 0;
    translate: 110px 0;
    rotate: 5deg;
    scale: 0.92;
  }
  to {
    opacity: 1;
    translate: 0 0;
    rotate: 0deg;
    scale: 1;
  }
}
@keyframes motion-card {
  from {
    opacity: 0;
    transform: translateY(45px) scale(0.91);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes motion-caption {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes motion-product {
  0% {
    opacity: 0;
    transform: translate(var(--fly-x), var(--fly-y)) rotate(var(--fly-turn)) scale(0.35);
    animation-timing-function: cubic-bezier(0.16, 0.7, 0.3, 1);
  }
  62% {
    opacity: 1;
    transform: translate(0, -12px) rotate(-3deg) scale(1.07);
    animation-timing-function: ease-in-out;
  }
  82% {
    opacity: 1;
    transform: translate(0, 4px) rotate(1deg) scale(0.985);
    animation-timing-function: ease-out;
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}
@keyframes motion-success {
  0% {
    opacity: 0;
    scale: 0.8;
  }
  65% {
    opacity: 1;
    scale: 1.05;
  }
  100% {
    opacity: 1;
    scale: 1;
  }
}

.replay-motion {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #d0f87850;
  border-radius: 20px;
  background: #d0f8780c;
  color: var(--lime);
  font-size: 13px;
  white-space: nowrap;
}
.replay-motion:hover {
  background: #d0f87820;
}
.replay-motion > span {
  font-size: 10px;
}
@media (max-width: 600px) {
  .replay-motion {
    width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
    font-size: 20px;
  }
  .replay-motion > span {
    display: none;
  }
}
.screen-around[data-entering] .product-sprite,
.screen-around[data-entering] figcaption {
  animation: none !important;
}
