:root {
  color-scheme: light;
  --qub-burgundy: #6f1734;
  --qub-burgundy-dark: #4d0f24;
  --ink: #242124;
  --muted: #5f5860;
  --surface: #ffffff;
  --canvas: #f5f3f2;
  --line: #d7d1d3;
  --focus: #005fcc;
  --success: #146c43;
  --success-bg: #eaf7f0;
  --warning: #8a4b08;
  --warning-bg: #fff4df;
  --info: #174f78;
  --info-bg: #eaf4fb;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 100%;
  line-height: 1.55;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
}

a {
  color: var(--qub-burgundy);
}

a:hover {
  color: var(--qub-burgundy-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--focus);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell,
.activity-shell {
  width: min(100% - 2rem, 62rem);
  margin: 0 auto;
}

.site-shell {
  padding: 2rem 0 3rem;
}

.activity-shell {
  padding: 1rem 0 2rem;
}

.activity-header,
.site-header {
  border-top: 0.45rem solid var(--qub-burgundy);
  background: var(--surface);
  padding: clamp(1.1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--qub-burgundy);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--qub-burgundy-dark);
  font-size: clamp(1.55rem, 5vw, 2.25rem);
  line-height: 1.18;
}

h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  line-height: 1.25;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

.lede {
  max-width: 48rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.practice-note,
.notice {
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  border-left: 0.3rem solid var(--info);
  background: var(--info-bg);
}

.progress-region {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin: 1rem 0;
}

.progress-region p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

progress {
  width: min(20rem, 100%);
  height: 0.75rem;
  accent-color: var(--qub-burgundy);
}

.activity-panel,
.completion-panel,
.site-panel {
  margin-top: 1rem;
  padding: clamp(1rem, 3vw, 1.6rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
}

.instructions {
  margin: 0 0 1rem;
  color: var(--muted);
}

fieldset {
  min-width: 0;
  margin: 1rem 0;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.scenario-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--qub-burgundy);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.choice-list {
  display: grid;
  gap: 0.55rem;
}

.choice {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  cursor: pointer;
}

.choice:hover {
  border-color: var(--qub-burgundy);
}

.choice input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.15rem 0 0;
  accent-color: var(--qub-burgundy);
}

.choice:has(input:checked) {
  border-color: var(--qub-burgundy);
  box-shadow: inset 0 0 0 1px var(--qub-burgundy);
}

.choice:has(input:disabled) {
  cursor: default;
}

.item-block {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.item-block:first-of-type {
  border-top: 0;
}

.item-block p {
  margin: 0 0 0.7rem;
}

.classification-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
}

.classification-options .choice {
  flex: 1 1 11rem;
}

.order-list {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8.5rem, 12rem);
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.order-item:first-child {
  border-top: 0;
}

select {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.45rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #81777a;
  border-radius: 0.25rem;
  font: inherit;
}

.feedback {
  margin: 0.8rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 0.3rem solid;
}

.feedback strong {
  display: block;
  margin-bottom: 0.2rem;
}

.feedback.correct {
  border-color: var(--success);
  background: var(--success-bg);
}

.feedback.incorrect {
  border-color: var(--warning);
  background: var(--warning-bg);
}

.feedback.info {
  border-color: var(--info);
  background: var(--info-bg);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

button,
.button-link {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 2px solid var(--qub-burgundy);
  border-radius: 0.25rem;
  background: var(--qub-burgundy);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  background: var(--qub-burgundy-dark);
  color: #ffffff;
}

button.secondary,
.button-link.secondary {
  background: var(--surface);
  color: var(--qub-burgundy);
}

button.secondary:hover,
.button-link.secondary:hover {
  background: #f4e9ed;
  color: var(--qub-burgundy-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.score-line {
  margin: 0.7rem 0;
  font-weight: 700;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.site-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0.3rem solid var(--qub-burgundy);
}

.site-card p {
  flex: 1;
  color: var(--muted);
}

.site-card a {
  align-self: flex-start;
  font-weight: 700;
}

.site-footer {
  width: min(100% - 2rem, 62rem);
  margin: 0 auto;
  padding: 0.9rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

.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;
}

[hidden] {
  display: none !important;
}

@media (max-width: 36rem) {
  .site-shell,
  .activity-shell,
  .site-footer {
    width: min(100% - 1rem, 62rem);
  }

  .order-item {
    grid-template-columns: 1fr;
  }

  .actions button,
  .actions .button-link {
    width: 100%;
  }
}

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

@media print {
  button,
  .actions,
  .skip-link {
    display: none !important;
  }

  body,
  html {
    background: #ffffff;
  }
}
