:root,
[data-theme="torcal-light"] {
  color-scheme: light;
  --base-100: #fcfcfc;
  --base-200: #f4f4f4;
  --base-300: #d1d1d1;
  --base-content: #262626;
  --muted: #666b68;
  --primary: oklch(62% .194 149.214);
  --primary-rgb: 45, 166, 83;
  --primary-content: #ffffff;
  --danger: #c3262d;
  --danger-soft: #fff0f1;
  --success-soft: #e9f7ed;
  --warning-soft: #fff8dd;
  --overlay: rgba(12, 14, 13, .52);
  --shadow: 0 18px 56px rgba(19, 24, 21, .12);
  --grid-line: rgba(20, 30, 25, .035);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="torcal-dark"] {
  color-scheme: dark;
  --base-100: #1a1a1a;
  --base-200: #242424;
  --base-300: #2a2a2a;
  --base-content: #efeff1;
  --muted: #9d9da3;
  --primary: oklch(62% .194 149.214);
  --primary-rgb: 45, 166, 83;
  --primary-content: #ffffff;
  --danger: #ff5e66;
  --danger-soft: #321d1f;
  --success-soft: #183122;
  --warning-soft: #332d18;
  --overlay: rgba(0, 0, 0, .72);
  --shadow: 0 24px 72px rgba(0, 0, 0, .42);
  --grid-line: rgba(255, 255, 255, .035);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--base-100);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--base-content);
  background: var(--base-200);
  transition: color .2s cubic-bezier(.4, 0, .2, 1), background-color .2s cubic-bezier(.4, 0, .2, 1);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
.primary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--base-300);
  border-radius: 10px;
  color: var(--base-content);
  background: var(--base-100);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s cubic-bezier(.4, 0, .2, 1),
    background-color .2s cubic-bezier(.4, 0, .2, 1),
    color .2s cubic-bezier(.4, 0, .2, 1),
    transform .2s cubic-bezier(.4, 0, .2, 1);
}

button:hover {
  border-color: color-mix(in srgb, var(--primary) 50%, transparent);
}

button:active,
.primary-button:active {
  transform: scale(.99);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 22%, transparent);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.primary-button {
  border-color: var(--primary);
  color: var(--primary-content);
  background: var(--primary);
}

.primary-button:hover {
  border-color: color-mix(in srgb, var(--primary) 82%, #000);
  background: color-mix(in srgb, var(--primary) 82%, #000);
}

.page-shell {
  width: min(1248px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.topbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px max(32px, calc((100vw - 1248px) / 2));
  border-bottom: 1px solid var(--base-300);
  color: var(--base-content);
  background: var(--base-100);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--base-content);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-logo {
  display: block;
  width: 88px;
  height: 38px;
  object-fit: contain;
}

.brand-logo-white,
.login-logo-white {
  display: none;
}

[data-theme="torcal-dark"] .brand-logo-color,
[data-theme="torcal-dark"] .login-logo-color {
  display: none;
}

[data-theme="torcal-dark"] .brand-logo-white,
[data-theme="torcal-dark"] .login-logo-white {
  display: block;
}

.topbar-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: .9rem;
}

.topbar-links > a {
  color: var(--base-content);
  text-decoration: none;
}

.topbar-links > a:hover {
  color: var(--primary);
}

.inline-form {
  display: inline;
  margin: 0;
}

.link-button {
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  color: var(--base-content);
  background: transparent;
}

.link-button:hover {
  border: 0;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.theme-toggle {
  position: relative;
  width: 38px;
  min-height: 38px;
  padding: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.theme-toggle:hover {
  border: 0;
  color: var(--primary);
  background: var(--base-200);
}

.theme-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-moon {
  display: none;
}

[data-theme="torcal-dark"] .theme-icon-sun {
  display: none;
}

[data-theme="torcal-dark"] .theme-icon-moon {
  display: block;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--base-content);
  font-weight: 700;
}

.user-avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: .78rem;
}

.eyebrow {
  color: var(--primary);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
}

h2,
h3 {
  margin-top: 0;
}

.lead {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.quiet {
  color: var(--muted);
  font-size: .88rem;
}

.auth-card,
.form-card {
  width: min(500px, 100%);
  margin: 5vh auto 0;
  padding: clamp(25px, 5vw, 44px);
  border: 1px solid var(--base-300);
  border-radius: 22px;
  background: var(--base-100);
  box-shadow: var(--shadow);
}

.wide-card {
  width: min(800px, 100%);
}

.stack-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--base-content);
  font-size: .9rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--base-300);
  border-radius: 10px;
  color: var(--base-content);
  background: var(--base-100);
}

select {
  min-height: 44px;
}

input::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

input:focus,
select:focus {
  border-color: var(--primary);
  outline: 3px solid color-mix(in srgb, var(--primary) 16%, transparent);
}

.password-control {
  display: grid;
  gap: 7px;
}

.password-control > label {
  display: block;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 54px;
}

.password-visibility {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 42px;
  min-height: 38px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
}

.password-visibility:hover {
  border: 0;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.password-visibility:focus-visible {
  color: var(--primary);
  outline: 3px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

.password-visibility svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-visibility .eye-slash {
  opacity: 0;
}

.password-visibility.is-visible .eye-slash {
  opacity: 1;
}

.login-page {
  overflow-x: hidden;
}

.login-page .page-shell {
  width: 100%;
  padding: 0;
}

.login-split {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(460px, 1fr) minmax(460px, 1fr);
  background: var(--base-100);
}

.login-panel {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(28px, 4.5vh, 54px) clamp(42px, 7vw, 96px);
  background-color: var(--base-100);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.login-content {
  width: min(520px, 100%);
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.login-logo {
  width: min(220px, 55%);
  height: 96px;
  object-fit: contain;
}

.login-content h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -.04em;
}

.login-lead {
  margin: 16px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 1.05rem;
  font-weight: 650;
}

.login-form {
  margin-top: 42px;
}

.login-form input {
  min-height: 48px;
  background: color-mix(in srgb, var(--base-100) 94%, transparent);
}

.login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
}

.login-footer {
  margin-top: 30px;
  text-align: center;
  font-size: .78rem;
  font-weight: 650;
}

.login-footer p {
  margin: 7px 0;
  color: var(--muted);
}

.login-footer .temporary-platform {
  color: var(--danger);
  font-size: .86rem;
  font-weight: 900;
  letter-spacing: .01em;
}

.login-visual {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: flex-end;
  justify-content: center;
  padding: 48px;
  overflow: hidden;
  background-image: linear-gradient(to top, rgba(0, 0, 0, .38), transparent 44%),
    url('/static/login-background.jpg');
  background-position: center;
  background-size: cover;
}

.login-visual p {
  position: relative;
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-style: italic;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .65);
}

.alert {
  margin: 18px 0;
  padding: 13px 15px;
  border: 1px solid var(--base-300);
  border-radius: 12px;
  line-height: 1.45;
}

.alert.error {
  border-color: color-mix(in srgb, var(--danger) 38%, transparent);
  color: var(--danger);
  background: var(--danger-soft);
}

.alert.success {
  color: var(--primary);
  background: var(--success-soft);
}

.alert.warning {
  color: color-mix(in srgb, #d4a800 74%, var(--base-content));
  background: var(--warning-soft);
}

.courses-panel,
.admin-section {
  padding: 24px;
  border: 1px solid var(--base-300);
  border-radius: 14px;
  background: var(--base-100);
}

.courses-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.courses-heading h1 {
  margin: 0;
  font-size: 1.36rem;
  letter-spacing: -.025em;
}

.availability {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 9px;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.availability strong {
  font-size: .82rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.course-card {
  width: 100%;
  min-height: 74px;
  justify-content: flex-start;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--base-300);
  border-radius: 12px;
  color: var(--base-content);
  background: var(--base-100);
  text-align: left;
  transition: .2s cubic-bezier(.4, 0, .2, 1);
}

.course-card:hover {
  border-color: color-mix(in srgb, var(--primary) 50%, transparent);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 2%, var(--base-100));
}

.course-card:focus-visible {
  border-color: var(--primary);
  outline: 4px solid color-mix(in srgb, var(--primary) 10%, transparent);
}

.course-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 9px;
  color: color-mix(in srgb, var(--base-content) 40%, transparent);
  background: var(--base-200);
  transition: .2s cubic-bezier(.4, 0, .2, 1);
}

.course-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-card:hover .course-icon {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.course-card > span:last-child {
  font-size: .9rem;
  font-weight: 750;
}

.course-dialog {
  width: min(880px, calc(100% - 32px));
  max-height: min(820px, calc(100svh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--base-300);
  border-radius: 18px;
  color: var(--base-content);
  background: var(--base-100);
  box-shadow: var(--shadow);
}

.course-dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(3px);
}

.course-dialog-card {
  position: relative;
  max-height: min(820px, calc(100svh - 32px));
  padding: 30px;
  overflow-y: auto;
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: var(--base-200);
  font-size: 1.45rem;
  line-height: 1;
}

.dialog-close:hover {
  border: 0;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--base-200));
}

.dialog-heading {
  padding-right: 48px;
  border-bottom: 1px solid var(--base-300);
}

.dialog-heading h2 {
  margin: 10px 0 6px;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.dialog-heading p {
  margin: 0 0 24px;
  color: var(--muted);
}

.mode-pill {
  display: inline-flex;
  padding: 5px 11px;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.theme-selector {
  padding-top: 24px;
}

.section-title-row h3 {
  margin: 7px 0 18px;
  font-size: 1.18rem;
}

.theme-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.theme-choice {
  display: grid;
  min-width: 0;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--base-300);
  border-radius: 12px;
  color: var(--base-content);
  background: var(--base-100);
  text-decoration: none;
  transition: .2s cubic-bezier(.4, 0, .2, 1);
}

.theme-choice:hover {
  border-color: color-mix(in srgb, var(--primary) 50%, transparent);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 2%, var(--base-100));
}

.theme-choice:active {
  transform: scale(.99);
}

.theme-choice-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  font-size: .7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.theme-choice-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.theme-choice-copy strong {
  line-height: 1.25;
}

.theme-choice-copy > span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.theme-choice:hover .theme-choice-copy > span {
  color: color-mix(in srgb, var(--primary) 75%, var(--muted));
}

.theme-choice > svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--base-300);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--base-300);
  border-radius: 12px;
  color: var(--muted);
  background: var(--base-200);
}

.empty-state h2 {
  margin-bottom: 8px;
  color: var(--base-content);
  font-size: 1.1rem;
}

.empty-state p {
  margin-bottom: 0;
}

.page-heading {
  margin-bottom: 32px;
}

.page-heading p {
  color: var(--muted);
}

.admin-section {
  margin: 22px 0;
}

.activity-section {
  display: grid;
  gap: 20px;
}

.activity-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.activity-heading h2,
.activity-heading p,
.activity-detail-heading h3 {
  margin-bottom: 0;
}

.activity-heading h2 {
  margin-top: 4px;
}

.period-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--base-300);
  border-radius: 12px;
  background: var(--base-200);
}

.period-switch a {
  padding: 9px 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.period-switch a:hover,
.period-switch a.is-active {
  color: var(--primary-content);
  background: var(--primary);
}

.activity-overview {
  border: 1px solid var(--base-300);
  border-radius: 12px;
}

.activity-overview table {
  min-width: 850px;
}

.activity-overview tbody tr:last-child td {
  border-bottom: 0;
}

.activity-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.activity-user-filter {
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(220px, 360px) auto;
  align-items: end;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--base-300);
  border-radius: 12px;
  background: var(--base-200);
}

.activity-user-filter label {
  align-self: center;
}

.activity-status {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 850;
  white-space: nowrap;
}

.activity-status.active {
  color: var(--primary);
  background: var(--success-soft);
}

.activity-status.closed {
  color: var(--muted);
  background: var(--base-200);
}

.activity-status.expired {
  color: color-mix(in srgb, #d4a800 74%, var(--base-content));
  background: var(--warning-soft);
}

.activity-detail {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}

.activity-detail-heading {
  align-items: end;
}

.activity-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 16px;
}

.activity-detail-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--base-300);
  border-radius: 12px;
  background: var(--base-200);
}

.activity-detail-card h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.activity-detail-card:first-child table {
  min-width: 520px;
}

.activity-detail-card:last-child td:last-child {
  overflow-wrap: anywhere;
}

.activity-empty {
  padding-block: 24px;
  color: var(--muted);
  text-align: center;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--base-300);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions form {
  margin: 0;
}

.create-user {
  margin-top: 22px;
}

.create-user summary {
  cursor: pointer;
  font-weight: 800;
}

.inline-grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.credential-list {
  display: grid;
  gap: 14px;
  margin: 26px 0;
}

.credential-row {
  display: grid;
  grid-template-columns: 130px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--base-300);
  border-radius: 14px;
}

.credential-row div {
  display: grid;
}

.credential-row span {
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 980px) {
  .login-split {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 24px;
  }

  .topbar-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 14px;
  }

  .page-shell {
    width: min(100% - 32px, 1248px);
  }

  .theme-choice-grid {
    grid-template-columns: 1fr;
  }

  .activity-heading {
    flex-direction: column;
  }

  .activity-detail-grid {
    grid-template-columns: 1fr;
  }

  .activity-overview {
    overflow: visible;
    border: 0;
  }

  .activity-overview table {
    min-width: 0;
  }

  .activity-overview thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .activity-overview tbody {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
  }

  .activity-overview tbody tr {
    display: grid;
    align-content: start;
    padding: 10px 14px;
    border: 1px solid var(--base-300);
    border-radius: 12px;
    background: var(--base-100);
  }

  .activity-overview tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: .88rem;
  }

  .activity-overview tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .activity-overview tbody td:first-child {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 2px;
  }

  .activity-overview tbody td:first-child::before {
    content: none;
  }

  .activity-overview tbody .activity-empty {
    display: block;
    grid-column: 1 / -1;
  }

  .activity-overview tbody .activity-empty::before {
    content: none;
  }

  .activity-user-filter {
    grid-template-columns: 1fr auto;
  }

  .activity-user-filter label {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1248px);
    padding-top: 18px;
  }

  .brand-logo {
    width: 76px;
  }

  .topbar {
    padding-inline: 16px;
  }

  .topbar-links {
    font-size: .82rem;
  }

  .user-chip {
    order: -1;
    width: 100%;
  }

  .courses-panel,
  .admin-section {
    padding: 18px;
  }

  .courses-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .period-switch,
  .period-switch a,
  .activity-user-filter button {
    width: 100%;
  }

  .activity-user-filter {
    grid-template-columns: 1fr;
  }

  .activity-user-filter label {
    grid-column: auto;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .course-dialog {
    width: calc(100% - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 14px;
  }

  .course-dialog-card {
    max-height: calc(100svh - 16px);
    padding: 22px 18px;
  }

  .dialog-close {
    top: 12px;
    right: 12px;
  }

  .theme-choice {
    grid-template-columns: 1fr auto;
  }

  .theme-choice-code {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .login-panel {
    align-items: start;
    padding: 34px 22px;
  }

  .login-logo {
    height: 78px;
  }

  .login-content h1 {
    font-size: 2.25rem;
  }

  .login-form {
    margin-top: 32px;
  }

  .inline-grid-form,
  .credential-row {
    grid-template-columns: 1fr;
  }
}

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

.review-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-left: 5px solid var(--accent, #237a4b);
}

.review-summary h2 {
  margin: 4px 0 8px;
}

.review-summary-actions {
  min-width: 150px;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface, #fff) 82%, #dff2e7);
}

.review-summary-actions strong {
  color: var(--accent, #237a4b);
  font-size: 2rem;
  line-height: 1;
}

.review-summary-actions .primary-button {
  margin-top: 9px;
}

.review-table {
  overflow-x: auto;
}

.review-table table {
  min-width: 920px;
}

.review-table .review-question {
  min-width: 320px;
  line-height: 1.45;
}

.review-note {
  display: inline-block;
  max-width: 280px;
  margin-top: 5px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .review-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .review-summary-actions {
    width: 100%;
  }
}
.activity-chart { list-style: none; padding: 0; display: grid; gap: .65rem; }
.activity-chart li { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(8rem, 3fr) auto; gap: .75rem; align-items: center; }
.activity-chart progress { width: 100%; height: 1rem; accent-color: #148146; }
@media (max-width: 520px) { .activity-chart li { grid-template-columns: minmax(5rem, 1fr) minmax(5rem, 2fr) auto; gap: .4rem; } }
