/* Shared interaction states for a restrained, professional feel. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

a,
button,
.button,
.lesson-row,
.choice span,
input,
textarea,
select {
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.site-header nav > a,
.site-header nav .link-button {
  border-bottom: 2px solid transparent;
  border-radius: var(--radius);
  padding: 9px 12px;
}

.site-header nav > a:hover,
.site-header nav > a:focus-visible,
.site-header nav .link-button:hover,
.site-header nav .link-button:focus-visible {
  background-color: #e9edec;
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.button:hover,
.button:focus-visible {
  box-shadow: 0 5px 14px rgb(0 0 0 / 12%);
  transform: translateY(-1px);
}

.button:active {
  box-shadow: none;
  transform: translateY(0);
}

button.is-loading,
.button.is-loading {
  cursor: wait;
  opacity: 0.78;
  pointer-events: none;
  transform: none;
}

button.is-loading::after,
.button.is-loading::after {
  animation: button-loader-spin 700ms linear infinite;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
  height: 0.9em;
  margin-left: 9px;
  width: 0.9em;
}

@keyframes button-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.back:hover,
.row-actions a:hover,
footer a:hover {
  color: var(--accent);
}

.assessment-card .locked {
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: var(--radius);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 14px 18px;
}

.dashboard-head .progress-ring {
  background: conic-gradient(
    var(--accent) calc(var(--progress) * 1%),
    #dce6e2 0
  );
  border: 0;
  position: relative;
}

.dashboard-head .progress-ring::before {
  background: var(--paper);
  border-radius: 50%;
  content: "";
  inset: 8px;
  position: absolute;
}

.dashboard-head .progress-ring strong,
.dashboard-head .progress-ring span {
  position: relative;
  z-index: 1;
}

.exam-page .question-prompt {
  align-items: flex-start;
  display: flex;
  font-size: 1.12rem;
  gap: 15px;
  line-height: 1.45;
  margin: 0 0 22px;
  padding: 0 4px;
}

.exam-page .question-prompt > span {
  color: var(--accent);
  flex: 0 0 auto;
  font: 500 0.7rem/1.8 "IBM Plex Mono";
}

.video-completion {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 0;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 20px 24px;
}

.video-completion > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-completion strong {
  font-size: 0.95rem;
}

.video-completion span {
  color: var(--muted);
  font-size: 0.82rem;
}

.video-completion.is-ready {
  border-color: #90bdb7;
  background: #f2f8f6;
}

.verification-notice {
  align-items: flex-start;
  background: #eef7f5;
  border: 1px solid #90bdb7;
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
}

.verification-notice > span {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 0.7rem;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.verification-notice strong {
  color: var(--accent2);
  display: block;
  font-size: 0.85rem;
  margin-bottom: 3px;
}

.verification-notice p {
  font-size: 0.76rem;
  line-height: 1.45;
  margin: 0;
}

.verification-notice:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.button:disabled,
.button[aria-disabled="true"] {
  background: #c8cecc;
  border-color: #c8cecc;
  box-shadow: none;
  color: #68716e;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 680px) {
  .video-completion {
    align-items: stretch;
    flex-direction: column;
  }

  .video-completion .button {
    width: 100%;
  }
}

.link-button:focus-visible,
.danger-link:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  button.is-loading::after,
  .button.is-loading::after {
    animation-duration: 1.5s;
  }
}
