/* Critter Challenge — design tokens & components */

:root {
  --paper: #fbfaf7;
  --ink: #1a1a1a;
  --critter-red: #e0263a;
  --cloud: #f1efea;
  --warm-grey: #6b6864;
  --blush: #fbe9ea;
  --soft-red: #c7212f;

  --rule: #dcd8d0;

  --font-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 4px;
  --radius-sm: 3px;
  --max-width: 720px;
  --max-width-wide: 1080px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --header-height: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--critter-red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  margin-top: 0;
}

/* Display headings echo the condensed capitals of the logo wordmark. */
h1,
h2 {
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

p {
  margin: 0 0 var(--space-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-sm);
  z-index: 1000;
  padding: var(--space-xs) var(--space-sm);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: var(--space-sm);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.88;
}

.logo-mark {
  display: inline-block;
  line-height: 0;
}

.site-logo img {
  height: 48px;
  width: auto;
  display: block;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-xs);
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 1px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.site-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.35rem 0.25rem;
  text-decoration: none;
  text-underline-offset: 0.45em;
  text-decoration-thickness: 2px;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--rule);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--critter-red);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: var(--space-sm) var(--space-md) var(--space-md);
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: var(--space-sm);
  }
}

/* Main layout */
main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--wide {
  max-width: var(--max-width-wide);
}

.page-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}

.page-header--wide {
  max-width: var(--max-width-wide);
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--warm-grey);
  font-size: 1.125rem;
  max-width: 52ch;
  margin: 0;
}

.section {
  padding: var(--space-xl) 0;
}

.hero + .section,
.section + .section {
  border-top: 1px solid var(--rule);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-lg);
}

.section__head h2 {
  margin: 0;
}

/* Hero */
.hero {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-xl);
  }
}

.hero__logo {
  width: min(360px, 70vw);
  height: auto;
  display: block;
  margin: 0 auto;
}

.hero__tagline {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 0.95;
  max-width: 14ch;
  margin: 0 0 var(--space-md);
}

.hero__sub {
  font-size: 1.125rem;
  max-width: 46ch;
  margin: 0 0 var(--space-lg);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-lg);
}

.text-link {
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--critter-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.text-link:hover {
  color: var(--critter-red);
}

/* Key facts (dates, theme) */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem var(--space-md);
  margin: 0;
  padding: var(--space-sm) 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--warm-grey);
  padding-top: 0.1rem;
}

.facts dd {
  margin: 0;
  font-weight: 500;
}

.prose .facts {
  margin-bottom: var(--space-lg);
}

/* Theme */
.theme-block {
  display: grid;
  gap: var(--space-sm) var(--space-lg);
  align-items: baseline;
}

@media (min-width: 640px) {
  .theme-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}

.theme-block__word {
  font-size: clamp(3.5rem, 12vw, 7rem);
  line-height: 0.85;
  color: var(--critter-red);
  margin: 0;
  overflow-wrap: anywhere;
}

.theme-block__label {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--warm-grey);
  margin-bottom: 0.5rem;
}

.theme-block p {
  font-size: 1.125rem;
  max-width: 52ch;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-lg) var(--space-md);
  counter-reset: step;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  counter-increment: step;
  padding-top: var(--space-sm);
  border-top: 2px solid var(--ink);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--critter-red);
  margin-bottom: 0.25rem;
}

.step p {
  color: var(--warm-grey);
  margin: 0;
}

.section__foot {
  margin: var(--space-lg) 0 0;
  color: var(--warm-grey);
}

/* Podium (home) */
.podium {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .podium {
    grid-template-columns: repeat(3, 1fr);
  }

  .podium__item img {
    aspect-ratio: 4 / 5;
  }
}

.podium__item {
  margin: 0;
}

.podium__item a {
  color: inherit;
  text-decoration: none;
}

.podium__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--cloud);
}

.podium__item a:hover img {
  opacity: 0.9;
}

.podium__item figcaption {
  padding-top: 0.75rem;
}

.podium__place {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9375rem;
  color: var(--critter-red);
}

.podium__title {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
}

.podium__artist {
  display: block;
  color: var(--warm-grey);
  font-size: 0.9375rem;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--critter-red);
  color: #fff;
  border-color: var(--critter-red);
}

.btn--primary:hover {
  background: var(--soft-red);
  border-color: var(--soft-red);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--secondary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Cards */
.card {
  background: var(--cloud);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.card--form {
  max-width: 32rem;
}

/* Form pages: the form shares the page header's column. */
.page-header + .section {
  padding-top: 0;
}

.page-header + .section > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.page-header + .section .card--form {
  padding: var(--space-md);
}

/* Callout */
.callout {
  background: var(--cloud);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

.callout__title {
  display: block;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.callout p:last-child {
  margin-bottom: 0;
}

#submission-closed.callout {
  max-width: calc(var(--max-width) - 2 * var(--space-md));
  padding: var(--space-md);
}

/* Short aside within running text, e.g. how judging uses the theme. */
.note {
  padding-left: var(--space-sm);
  border-left: 2px solid var(--critter-red);
}

/* Prose */
.prose {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-lg);
}

.prose section {
  margin-bottom: var(--space-lg);
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 var(--space-sm);
}

.prose li {
  margin-bottom: 0.35rem;
}

/* Forms */
.form-field {
  margin-bottom: var(--space-md);
}

.form-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.form-field .hint {
  font-size: 0.875rem;
  color: var(--warm-grey);
  margin-top: 0.25rem;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="datetime-local"],
.form-field input[type="file"],
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--critter-red);
  outline-offset: 2px;
  border-color: var(--critter-red);
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field--checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-xs);
}

.form-field--checkbox input {
  margin-top: 0.35rem;
  width: auto;
}

.form-field--checkbox label {
  flex: 1 1 0;
  margin-bottom: 0;
  font-weight: 400;
}

.form-field--checkbox .form-error {
  flex-basis: 100%;
  padding-left: 1.5rem;
}

.form-error {
  color: var(--critter-red);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-field.is-invalid .form-error {
  display: block;
}

.form-field.is-invalid input,
.form-field.is-invalid select,
.form-field.is-invalid textarea {
  border-color: var(--critter-red);
}

.file-preview {
  font-size: 0.875rem;
  color: var(--warm-grey);
  margin-top: 0.35rem;
}

.form-success {
  display: none;
  padding-top: var(--space-md);
  padding-bottom: var(--space-xl);
}

.form-success.is-visible {
  display: block;
}

.form-success h2 {
  color: var(--critter-red);
}

.form-wrap.is-hidden {
  display: none;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-error--submit {
  margin-bottom: var(--space-sm);
  text-align: center;
}

/* FAQ accordion */
.faq-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-lg);
}

.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-item:first-child {
  border-top: 2px solid var(--ink);
}

.faq-more {
  margin-top: var(--space-lg);
  color: var(--warm-grey);
}

.faq-item__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  background: none;
  border: none;
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.faq-item__trigger:hover {
  color: var(--critter-red);
}

.faq-item__icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  position: relative;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  background: var(--critter-red);
  border-radius: 1px;
}

.faq-item__icon::before {
  width: 100%;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.faq-item__icon::after {
  width: 2px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.2s;
}

.faq-item__trigger[aria-expanded="true"] .faq-item__icon::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq-item__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.faq-item__panel-inner {
  padding-bottom: var(--space-md);
  color: var(--warm-grey);
}

.faq-item__panel-inner p:last-child {
  margin-bottom: 0;
}

/* Winners gallery */
.winners-toolbar {
  max-width: var(--max-width-wide);
  margin: 0 auto var(--space-lg);
  padding: 0 var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
}

.winners-search {
  display: block;
  flex: 0 1 20rem;
}

.winners-search__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.winners-search__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.winners-search__input:focus {
  outline: 2px solid var(--critter-red);
  outline-offset: 2px;
}

.winners-search__input::-webkit-search-cancel-button {
  cursor: pointer;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-md);
}

.filter-btn {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.35rem 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--warm-grey);
  cursor: pointer;
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--critter-red);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--critter-red);
  outline-offset: 2px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg) var(--space-md);
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-xl);
}

.winner-card {
  position: relative;
}

.winner-card__image {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: var(--cloud);
  cursor: zoom-in;
  line-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.winner-card__image:focus-visible {
  outline: 2px solid var(--critter-red);
  outline-offset: 2px;
}

.winner-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.winner-card__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-top: 0.5rem;
}

.winner-card__thumb {
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
  opacity: 0.55;
}

.winner-card__thumb.is-active,
.winner-card__thumb:hover {
  opacity: 1;
}

.winner-card__thumb:focus-visible {
  outline: 2px solid var(--critter-red);
  outline-offset: 1px;
}

.winner-card__thumb img {
  width: 48px;
  height: 36px;
  object-fit: cover;
  display: block;
}

.winner-card__nation {
  font-size: 1em;
}

.winner-card.is-hidden {
  display: none;
}

.winner-card__meta {
  font-size: 0.8125rem;
  color: var(--warm-grey);
  margin-top: 0.25rem;
}

.winners-status {
  text-align: center;
  color: var(--warm-grey);
  max-width: var(--max-width);
  margin: 0 auto var(--space-md);
  padding: 0 var(--space-md);
}

.winner-card__body {
  padding-top: 0.75rem;
}

.winner-card__placement {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--critter-red);
  margin-bottom: 0.15rem;
}

.winner-card__title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: none;
  letter-spacing: 0;
  margin: 0 0 0.25rem;
}

.winner-card__artist {
  font-size: 0.9375rem;
  color: var(--warm-grey);
  margin: 0;
}

.winner-card__social {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
}

.winner-card__social a {
  color: var(--critter-red);
  font-weight: 500;
  text-decoration: none;
}

.winner-card__social a:hover {
  text-decoration: underline;
}

.winner-card__category {
  font-size: 0.8125rem;
  color: var(--warm-grey);
  margin-top: 0.5rem;
}

.winner-card--1st::before,
.winner-card--2nd::before,
.winner-card--3rd::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 72px;
  background: center / contain no-repeat;
  z-index: 2;
  pointer-events: none;
}

.winner-card--1st::before {
  background-image: url("../assets/gold.png");
}

.winner-card--2nd::before {
  background-image: url("../assets/silver.png");
}

.winner-card--3rd::before {
  background-image: url("../assets/bronze.png");
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: auto;
}

.site-footer__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  font-size: 0.9375rem;
  color: var(--warm-grey);
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.site-footer a {
  color: var(--warm-grey);
}

.site-footer a:hover {
  color: var(--ink);
}

/* Photo lightbox (winners gallery) */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(26, 26, 26, 0.92);
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox__figure {
  margin: 0;
  max-width: min(100%, 1200px);
  text-align: center;
}

.photo-lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.photo-lightbox__caption {
  margin-top: var(--space-sm);
  color: var(--paper);
  font-size: 0.9375rem;
}

.photo-lightbox__counter {
  margin: var(--space-xs) 0 0;
  color: rgba(251, 250, 247, 0.75);
  font-size: 0.8125rem;
}

.photo-lightbox__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.photo-lightbox__close:hover {
  background: var(--blush);
}

.photo-lightbox__prev,
.photo-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.photo-lightbox__prev {
  left: var(--space-sm);
}

.photo-lightbox__next {
  right: var(--space-sm);
}

.photo-lightbox__prev:hover,
.photo-lightbox__next:hover {
  background: var(--blush);
}

.photo-lightbox__prev[hidden],
.photo-lightbox__next[hidden] {
  display: none;
}

/* 404 */
.page-404 {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
  min-height: 50vh;
}

.page-404 p {
  color: var(--warm-grey);
  margin-bottom: var(--space-lg);
}

.page-404__critter {
  width: 96px;
  margin-bottom: var(--space-md);
}

/* Edition switcher */
.year-switcher {
  display: flex;
  align-items: center;
  margin-right: auto;
  margin-left: var(--space-sm);
}

.year-switcher__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--warm-grey);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.year-switcher__select {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
}

.archive-note {
  padding-top: var(--space-md);
  padding-bottom: 0;
  font-size: 0.9375rem;
  color: var(--warm-grey);
  text-align: center;
}

.admin-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.admin-toggle--inline {
  margin: var(--space-sm) 0;
}

.admin-container {
  max-width: 42rem;
}

.admin-lead {
  color: var(--warm-grey);
  margin-bottom: var(--space-lg);
}

.admin-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--rule);
}

.admin-section h2 {
  margin: 0 0 var(--space-md);
  font-size: 1.25rem;
}

.admin-event.card {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--cloud);
  border-radius: var(--radius);
}

.admin-event__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.admin-event__head h3 {
  margin: 0;
  font-size: 1.125rem;
}

.admin-event__meta {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  color: var(--warm-grey);
}

.admin-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--critter-red);
  vertical-align: middle;
  margin-left: 0.35rem;
}

.admin-badge--warn {
  color: var(--warm-grey);
}

.admin-art-preview {
  max-height: 5rem;
  width: auto;
  margin-right: var(--space-sm);
  margin-top: var(--space-xs);
  border-radius: 4px;
}

.admin-art-preview--small {
  max-height: 2.5rem;
}

.admin-event-form--edit {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.btn--small {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
}

.admin-back {
  margin-top: var(--space-xl);
}

.form-field .required {
  color: var(--critter-red);
}

.form-field .optional {
  font-weight: 400;
  color: var(--warm-grey);
  font-size: 0.875rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Judging (blind review) */
.judging-container {
  max-width: var(--max-width-wide);
}

.judging-lead {
  color: var(--warm-grey);
  margin-bottom: var(--space-lg);
}

.judging-meta,
.judging-progress {
  font-size: 0.9375rem;
  color: var(--warm-grey);
  margin: 0 0 var(--space-sm);
}

.judging-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
}

.judging-filter {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--paper);
  cursor: pointer;
}

.judging-filter.is-active {
  border-color: var(--critter-red);
  background: var(--blush);
  color: var(--soft-red);
  font-weight: 500;
}

.judging-entry.card {
  padding: var(--space-md);
  background: var(--cloud);
  border-radius: var(--radius);
}

.judging-entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.judging-entry__number {
  margin: 0;
  font-size: 1.5rem;
}

.judging-entry__current {
  margin: 0;
  font-size: 0.875rem;
  color: var(--warm-grey);
}

.judging-gallery {
  width: 100%;
  margin-bottom: var(--space-md);
}

.judging-gallery__main {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: var(--paper);
  cursor: zoom-in;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.judging-gallery__main:focus-visible {
  outline: 2px solid var(--critter-red);
  outline-offset: 2px;
}

.judging-gallery__main img {
  display: block;
  width: 100%;
  max-height: min(70vh, 720px);
  margin: 0 auto;
  object-fit: contain;
  background: var(--paper);
}

.judging-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-sm);
}

.judging-gallery__thumb {
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.75;
}

.judging-gallery__thumb.is-active,
.judging-gallery__thumb:hover {
  opacity: 1;
  border-color: var(--critter-red);
}

.judging-gallery__thumb img {
  display: block;
  width: 72px;
  height: 54px;
  object-fit: cover;
}

.judging-position-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
}

.judging-position-btn {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--rule);
  background: var(--paper);
  cursor: pointer;
}

.judging-position-btn:hover {
  border-color: var(--critter-red);
}

.judging-position-btn.is-selected {
  border-color: var(--critter-red);
  background: var(--blush);
  color: var(--soft-red);
}

.judging-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.judging-empty {
  color: var(--warm-grey);
  text-align: center;
  padding: var(--space-xl);
}

.admin-judges {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-judges h4 {
  margin: 0 0 var(--space-sm);
  font-size: 1rem;
}

.admin-judge-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-sm);
  font-size: 0.875rem;
}

.admin-judge-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.35rem 0;
}

.admin-judge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.admin-judge-list li.is-inactive {
  opacity: 0.55;
}

.admin-token-reveal {
  margin: var(--space-sm) 0;
  padding: var(--space-sm);
  background: var(--blush);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  word-break: break-all;
}

.admin-token-reveal code {
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  .year-switcher {
    order: 3;
    width: 100%;
    margin: 0;
    padding: 0 var(--space-md) var(--space-sm);
  }

  .site-header__inner {
    flex-wrap: wrap;
  }
}
