:root {
  --ink: #1c2430;
  --ink-soft: #4a5564;
  --mist: #e8eef4;
  --sky-top: #9eb6c9;
  --sky-mid: #c9d7e4;
  --sky-low: #f0ebe3;
  --sun: #d4893a;
  --sun-soft: #f0c48a;
  --rail: #2f3d4d;
  --ok: #2f6b4f;
  --warn: #9a5b1a;
  --bad: #8f2f2f;
  --glass: rgba(255, 255, 255, 0.42);
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Karla", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--sun-soft) 0%, transparent 55%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, var(--sky-low) 100%);
  background-attachment: fixed;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 47px,
    rgba(47, 61, 77, 0.35) 47px,
    rgba(47, 61, 77, 0.35) 48px
  );
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

.shell {
  position: relative;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
  animation: rise 700ms ease-out both;
}

.lede {
  margin: 0.85rem 0 0;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  animation: rise 700ms ease-out 80ms both;
}

.panel {
  margin-top: 2rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(28, 36, 48, 0.14);
  animation: rise 800ms ease-out 140ms both;
}

label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

input[type="password"] {
  width: 100%;
  appearance: none;
  border: none;
  border-bottom: 2px solid rgba(28, 36, 48, 0.28);
  background: transparent;
  padding: 0.7rem 0;
  font: inherit;
  font-size: 1.15rem;
  color: var(--ink);
  outline: none;
  transition: border-color 180ms ease;
}

input[type="password"]:focus {
  border-color: var(--sun);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

button,
.button {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.8rem 1.25rem;
  background: var(--rail);
  color: #f7f4ef;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

button:hover,
.button:hover {
  background: #243140;
  transform: translateY(-1px);
}

button.secondary,
.button.secondary {
  background: transparent;
  color: var(--ink);
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

button.secondary:hover,
.button.secondary:hover {
  background: transparent;
  color: var(--sun);
  transform: none;
}

.error {
  margin-top: 1rem;
  color: var(--bad);
  font-size: 0.95rem;
}

.status-line {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.25;
  margin: 0;
  max-width: 28ch;
}

.meta {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.pill {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
}

.pill.warn {
  color: var(--warn);
}

.pill.bad {
  color: var(--bad);
}

.section-title {
  margin: 2.5rem 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.message {
  padding: 1rem 0;
  border-top: 1px solid rgba(28, 36, 48, 0.1);
}

.message h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 550;
}

.message p {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
}

.message .course {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--rail);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.muted {
  color: var(--ink-soft);
}

.loading {
  color: var(--ink-soft);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
