@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Nunito+Sans:wght@400;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --wall: #c9c0ae;
  --board: #123f3a;
  --board-deep: #0c302d;
  --board-soft: #1b4c47;
  --wood: #79553a;
  --wood-dark: #4d3223;
  --chalk: #fffdf2;
  --chalk-dim: rgb(255 253 242 / 70%);
  --chalk-faint: rgb(255 253 242 / 16%);
  --blue: #8bd8ff;
  --yellow: #ffe082;
  --success: #bfe9c5;
  --error: #ffc4ba;
  --font-display: "Caveat", "Segoe Print", cursive;
  --font-ui: "Nunito Sans", "Segoe UI", sans-serif;
  --font-data: ui-monospace, "Cascadia Mono", monospace;
  --focus: 3px solid var(--yellow);
  --speed: 180ms;
}

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

html {
  min-width: 20rem;
  background: var(--wall);
}

.admin-body {
  min-width: 20rem;
  margin: 0;
  color: var(--chalk);
  background: var(--wall);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
}

button,
a,
input[type="text"],
input[type="password"],
input[type="search"] {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

a,
button {
  transition:
    color var(--speed) ease,
    background-color var(--speed) ease,
    border-color var(--speed) ease,
    opacity var(--speed) ease,
    transform var(--speed) ease;
}

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input[type="text"]:focus-visible,
input[type="password"]:focus-visible,
input[type="search"]:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  color: var(--board-deep);
  background: var(--yellow);
  font-weight: 800;
  transform: translateY(-150%);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.admin-canvas {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--wall);
}

.admin-board {
  position: relative;
  width: min(78rem, 100%);
  min-height: calc(100vh - clamp(1.5rem, 6vw, 5rem));
  min-height: calc(100dvh - clamp(1.5rem, 6vw, 5rem));
  margin-inline: auto;
  overflow: hidden;
  padding: clamp(1rem, 3.5vw, 3rem);
  border: clamp(0.65rem, 1.4vw, 1.1rem) solid var(--wood);
  outline: 2px solid var(--wood-dark);
  background:
    radial-gradient(ellipse at 10% 5%, rgb(255 255 255 / 5%), transparent 23%),
    radial-gradient(ellipse at 88% 58%, rgb(255 255 255 / 3.5%), transparent 29%),
    repeating-linear-gradient(178deg, transparent 0 24px, rgb(255 255 255 / 1.8%) 25px 26px),
    var(--board);
  box-shadow:
    0 18px 45px rgb(60 40 23 / 28%),
    inset 0 0 55px rgb(0 0 0 / 25%);
}

.admin-board::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
}

.admin-board > * {
  position: relative;
  z-index: 1;
}

.admin-board:focus {
  outline: 2px solid var(--wood-dark);
}

.admin-topbar,
.login-topbar {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(255 253 242 / 22%);
}

.admin-brand {
  display: inline-flex;
  min-width: 0;
  min-height: 52px;
  gap: 0.75rem;
  align-items: center;
  color: var(--chalk);
  text-decoration: none;
}

a.admin-brand:hover .admin-brand__copy strong {
  color: var(--yellow);
}

.admin-brand__mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border: 1px dashed rgb(255 224 130 / 70%);
  border-radius: 50%;
  place-items: center;
  color: var(--yellow);
  transform: rotate(-2deg);
}

.admin-brand__mark svg {
  width: 2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.admin-brand__copy {
  display: grid;
  line-height: 1.1;
}

.admin-brand__copy small {
  color: var(--blue);
  font: 700 0.72rem/1 var(--font-ui);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.admin-brand__copy strong {
  margin-top: 0.25rem;
  font: 700 clamp(1.25rem, 2.5vw, 1.6rem)/1 var(--font-display);
  transition: color var(--speed) ease;
}

.admin-utilities {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.admin-utilities form,
.admin-utilities input[type="hidden"] {
  margin: 0;
}

.admin-utilities a,
.admin-utilities button,
.login-topbar > a {
  display: inline-flex;
  min-height: 44px;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 999px;
  color: var(--chalk-dim);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.admin-utilities a:hover,
.login-topbar > a:hover {
  color: var(--blue);
  background: rgb(139 216 255 / 8%);
}

.admin-utilities button:hover {
  color: var(--error);
  background: rgb(255 196 186 / 8%);
}

.admin-utilities svg {
  width: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.admin-primary-nav {
  position: relative;
  display: flex;
  gap: 0.5rem;
  padding: 1rem 0 1.25rem;
}

.admin-primary-nav::after {
  position: absolute;
  right: 0;
  bottom: 0.55rem;
  left: 0;
  border-bottom: 2px dashed rgb(255 253 242 / 22%);
  content: "";
}

.admin-primary-nav a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 44px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--blue);
  background: var(--board);
  font-weight: 800;
  text-decoration: none;
}

.admin-primary-nav a:hover {
  border-color: rgb(139 216 255 / 40%);
  background: var(--board-soft);
}

.admin-primary-nav a[aria-current="page"] {
  border-color: var(--yellow);
  color: var(--board-deep);
  background: var(--yellow);
  box-shadow: 0 0 0 4px var(--board);
}

.admin-primary-nav svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.admin-content {
  padding-top: clamp(1.4rem, 4vw, 3.3rem);
}

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.75fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.page-kicker,
.section-label {
  margin: 0;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.page-intro h1 {
  margin: 0.15rem 0 0;
  font: 700 clamp(4rem, 10vw, 7.4rem)/0.72 var(--font-display);
  letter-spacing: -0.035em;
}

.page-intro > p,
.archive-hero__copy > p:first-child {
  max-width: 34rem;
  margin: 0;
  color: var(--chalk-dim);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.65;
}

.admin-notice {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid currentColor;
  border-left-width: 4px;
  border-radius: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-notice--success {
  color: var(--success);
  background: rgb(191 233 197 / 7%);
}

.admin-notice--error {
  color: var(--error);
  background: rgb(255 196 186 / 7%);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
  gap: 1rem;
}

.dashboard-side {
  display: grid;
  gap: 1rem;
}

.dashboard-card {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgb(255 253 242 / 22%);
  border-radius: 0.65rem;
  background: rgb(255 255 255 / 2.5%);
}

.dashboard-card--primary {
  display: flex;
  min-height: 24rem;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-color: rgb(255 224 130 / 38%);
  background:
    radial-gradient(circle at 92% 5%, rgb(255 224 130 / 9%), transparent 30%),
    rgb(255 255 255 / 2.5%);
}

.dashboard-card__icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: clamp(4rem, 8vw, 6rem);
  color: rgb(255 224 130 / 38%);
  transform: rotate(4deg);
}

.dashboard-card__icon svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1;
}

.dashboard-card h2 {
  max-width: 14ch;
  margin: 0.2rem 0 0.7rem;
  font: 700 clamp(2.4rem, 5vw, 4rem)/0.9 var(--font-display);
}

.dashboard-card > p:not(.section-label) {
  max-width: 38rem;
  margin: 0;
  color: var(--chalk-dim);
}

.dashboard-card form {
  margin-top: 1.5rem;
}

.admin-button {
  display: inline-flex;
  min-height: 48px;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 800;
}

.admin-button--primary {
  border-color: var(--yellow);
  color: var(--board-deep);
  background: var(--yellow);
}

.admin-button--primary:hover {
  background: #ffea99;
  transform: translateY(-1px);
}

.admin-button:active {
  transform: translateY(1px);
}

.admin-button svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.schedule-card {
  min-height: 17rem;
}

.schedule-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}

.schedule-list li {
  display: grid;
  gap: 0.3rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgb(255 253 242 / 26%);
}

.schedule-list span {
  color: var(--yellow);
  font: 700 0.72rem/1 var(--font-data);
}

.schedule-list strong {
  font-size: 0.8rem;
}

.history-shortcut {
  display: flex;
  min-height: 7rem;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--chalk);
  text-decoration: none;
}

.history-shortcut:hover {
  border-color: var(--blue);
  background: rgb(139 216 255 / 7%);
  transform: translateY(-1px);
}

.history-shortcut > span {
  display: grid;
  gap: 0.2rem;
}

.history-shortcut small {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-shortcut strong {
  font: 700 1.65rem/1 var(--font-display);
}

.history-shortcut > svg {
  width: 2rem;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--yellow);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.admin-board--login {
  width: min(68rem, 100%);
}

.login-topbar > a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.login-layout {
  display: grid;
  min-height: clamp(31rem, 68vh, 42rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.75fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem) clamp(0rem, 2vw, 1.5rem);
}

.login-welcome {
  position: relative;
}

.login-lock {
  position: absolute;
  top: -1rem;
  right: 2rem;
  width: clamp(3.8rem, 7vw, 5.2rem);
  color: var(--yellow);
  transform: rotate(3deg);
}

.login-lock svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.login-welcome h1 {
  margin: 0.15rem 0 1.2rem;
  font: 700 clamp(4rem, 9vw, 6.8rem)/0.72 var(--font-display);
  letter-spacing: -0.04em;
}

.login-welcome > p:last-child {
  max-width: 34rem;
  margin: 0;
  color: var(--chalk-dim);
  font-size: 1.05rem;
}

.login-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgb(255 253 242 / 25%);
  border-radius: 0.65rem;
  background: rgb(0 0 0 / 9%);
  box-shadow: inset 0 0 24px rgb(0 0 0 / 10%);
}

.login-panel__heading {
  margin-bottom: 1.3rem;
}

.login-panel h2 {
  margin: 0.1rem 0 0;
  font: 700 2.3rem/1 var(--font-display);
}

.login-form {
  display: grid;
  gap: 1rem;
}

.login-form > input[type="hidden"] {
  display: none;
}

.login-field {
  display: grid;
  gap: 0.4rem;
}

.login-field > span:first-child {
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 800;
}

.login-field > input[type="text"],
.password-field > input[type="password"],
.password-field > input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgb(255 253 242 / 42%);
  border-radius: 0.35rem;
  color: var(--chalk);
  background: rgb(0 0 0 / 14%);
  outline: 0;
  font-size: 1rem;
  font-weight: 700;
}

.login-field > input[type="text"]:focus,
.password-field > input[type="password"]:focus,
.password-field > input[type="text"]:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgb(255 224 130 / 18%);
}

.password-field {
  position: relative;
  display: block;
}

.password-field > input[type="password"],
.password-field > input[type="text"] {
  padding-right: 3.5rem;
}

.password-toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0.3rem;
  place-items: center;
  color: var(--blue);
  background: transparent;
}

.password-toggle:hover {
  color: var(--yellow);
  background: rgb(255 255 255 / 5%);
}

.password-toggle svg {
  width: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.password-toggle__slash {
  opacity: 0;
}

.password-toggle[aria-pressed="true"] .password-toggle__slash {
  opacity: 1;
}

.remember-control {
  display: grid;
  min-height: 44px;
  grid-template-columns: 20px 1fr;
  gap: 0.7rem;
  align-items: center;
  cursor: pointer;
}

.remember-control input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--yellow);
  appearance: auto;
}

.remember-control > span {
  display: grid;
  line-height: 1.25;
}

.remember-control strong {
  font-size: 0.86rem;
}

.remember-control small {
  color: var(--chalk-dim);
  font-size: 0.75rem;
}

.login-submit {
  width: 100%;
  margin-top: 0.2rem;
}

@media (max-width: 52rem) {
  .page-intro,
  .dashboard-grid,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .page-intro {
    gap: 1.5rem;
  }

  .dashboard-card--primary {
    min-height: 20rem;
  }

  .login-layout {
    min-height: auto;
    gap: 2.5rem;
  }

  .login-topbar {
    display: none;
  }

  .login-welcome {
    padding-right: 4rem;
  }
}

@media (max-width: 38rem) {
  .admin-canvas {
    padding: 0.55rem;
  }

  .admin-board {
    padding: 0.85rem;
    border-width: 0.55rem;
  }

  .admin-topbar,
  .login-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-utilities {
    justify-content: space-between;
  }

  .admin-utilities a,
  .admin-utilities form,
  .admin-utilities button {
    flex: 1;
  }

  .admin-primary-nav a {
    min-width: 0;
    flex: 1;
    justify-content: center;
    padding-inline: 0.55rem;
  }

  .page-intro h1,
  .login-welcome h1 {
    font-size: clamp(3.5rem, 18vw, 5rem);
  }

  .schedule-list {
    grid-template-columns: 1fr;
  }

  .schedule-list li {
    grid-template-columns: 3rem 1fr;
    align-items: center;
  }

  .login-layout {
    padding-block: 1rem 2rem;
  }

  .login-welcome {
    padding-right: 0;
  }

  .login-lock {
    top: -0.5rem;
    right: 0;
    width: 3.5rem;
  }
}

@media (max-width: 25rem) {
  .admin-brand__copy small {
    font-size: 0.64rem;
  }

  .admin-brand__copy strong {
    font-size: 1.1rem;
  }

  .admin-utilities span {
    font-size: 0.78rem;
  }

  .admin-primary-nav a {
    font-size: 0.82rem;
  }
}

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