@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=DM+Sans:wght@400;500;600;700;800&display=swap');
:root {
  --ink: #151515;
  --paper: #f8f5ed;
  --blue: #3b53ef;
  --orange: #ff7448;
  --lime: #d8f36b;
  --border: 2px solid var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', Arial, sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3,
.brand-copy,
.statgrid strong,
.tag,
.btn,
.ticker,
.section-kicker {
  font-family: 'Archivo Black', Impact, sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
.topline {
  background: var(--ink);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4%;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4%;
  border-bottom: var(--border);
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: 62px;
  height: 62px;
  background: var(--blue);
  color: white;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font: 34px 'Archivo Black';
  transform: rotate(-12deg);
  position: relative;
}
.brand-icon span {
  font-size: 18px;
  color: var(--lime);
  position: absolute;
  right: 4px;
  top: 0;
}
.brand-copy {
  font-size: 21px;
  line-height: 0.95;
  letter-spacing: -1px;
}
.brand-sub {
  display: block;
  font: 800 9px 'DM Sans';
  letter-spacing: 2px;
  margin-top: 6px;
}
.site-header nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.nav {
  background: transparent;
  border: 0;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 800;
}
.nav.active,
.nav:hover {
  background: var(--lime);
  border-radius: 30px;
}
.header-stamp {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #2ab97b;
  border-radius: 50%;
  margin-left: 5px;
}
.page {
  display: none;
}
.page.active {
  display: block;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 610px;
  border-bottom: var(--border);
}
.hero-copy {
  padding: 68px 7% 64px 8%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.tag {
  font-size: 11px;
  background: var(--lime);
  padding: 12px 15px;
  transform: rotate(-2deg);
}
.hero h1 {
  font-size: clamp(70px, 8.4vw, 140px);
  letter-spacing: -8px;
  line-height: 0.89;
  margin: 32px 0 24px;
}
.highlight {
  color: var(--blue);
  font-style: italic;
}
.period {
  color: var(--orange);
}
.hero-copy > p {
  max-width: 480px;
  font-size: 17px;
  line-height: 1.55;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.btn {
  border: var(--border);
  padding: 17px 21px;
  font-size: 12px;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--ink);
}
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--ink);
}
.hero-art {
  background: var(--blue);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 580px;
  border-left: var(--border);
}
.giant-star {
  font-size: clamp(310px, 44vw, 640px);
  line-height: 1;
  color: var(--lime);
  transform: rotate(-15deg);
  filter: drop-shadow(16px 18px 0 #182a9e);
  z-index: 1;
}
.orbit {
  position: absolute;
  border: 2px solid #ffffff55;
  border-radius: 50%;
  width: 80%;
  height: 75%;
  transform: rotate(30deg);
}
.orbit-two {
  transform: rotate(-30deg);
  width: 95%;
  height: 50%;
}
.art-sticker {
  position: absolute;
  right: 7%;
  top: 12%;
  z-index: 2;
  background: var(--orange);
  border: var(--border);
  border-radius: 50%;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: 25px 'Archivo Black';
  transform: rotate(15deg);
  box-shadow: 8px 8px 0 var(--ink);
}
.art-sticker span {
  font-size: 17px;
}
.art-bottom {
  position: absolute;
  bottom: 22px;
  left: 25px;
  color: white;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}
.ticker {
  background: var(--orange);
  border-bottom: var(--border);
  display: flex;
  justify-content: space-around;
  gap: 20px;
  overflow: hidden;
  white-space: nowrap;
  padding: 16px;
  font-size: 15px;
}
.home-lower {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  padding: 58px 5% 75px;
}
.section-kicker {
  font-size: 11px;
  letter-spacing: 1px;
}
.home-lower h2 {
  font-size: clamp(27px, 3vw, 45px);
  margin: 12px 0;
}
.home-lower p {
  color: #555;
}
.statgrid {
  display: flex;
  gap: 12px;
}
.statgrid > div {
  border: var(--border);
  min-width: 140px;
  padding: 24px;
  background: white;
  box-shadow: 5px 5px 0 var(--ink);
}
.statgrid strong {
  display: block;
  font-size: 50px;
  color: var(--blue);
}
.statgrid small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}
.page-banner {
  min-height: 310px;
  padding: 55px 7%;
  position: relative;
  overflow: hidden;
  border-bottom: var(--border);
}
.page-banner.orange {
  background: var(--orange);
}
.page-banner.blue {
  background: var(--blue);
  color: white;
}
.page-banner.lime {
  background: var(--lime);
}
.page-banner h1 {
  font-size: clamp(55px, 7vw, 100px);
  line-height: 0.95;
  letter-spacing: -4px;
  margin: 20px 0;
}
.page-banner h1 i {
  font-style: normal;
  color: var(--paper);
  -webkit-text-stroke: 2px var(--ink);
}
.page-banner.blue h1 i {
  -webkit-text-stroke: 2px white;
  color: transparent;
}
.page-banner p {
  font-weight: 700;
}
.banner-symbol {
  position: absolute;
  right: 9%;
  top: 0;
  font-size: 320px;
  line-height: 1;
  transform: rotate(-17deg);
  opacity: 0.28;
}
.content-shell {
  max-width: 1100px;
  margin: 55px auto 90px;
  padding: 0 20px;
}
.card {
  background: white;
  border: var(--border);
  box-shadow: 9px 9px 0 var(--ink);
  padding: 38px;
  margin-bottom: 35px;
}
.card h2 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -2px;
}
.card-top,
.form-subhead,
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}
.step-pill {
  font-size: 10px;
  font-weight: 800;
  border: 1px solid #aaa;
  padding: 9px 12px;
  border-radius: 25px;
  white-space: nowrap;
}
.lock-card {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 70px;
  padding: 55px 30px;
}
.lock-card p {
  max-width: 380px;
  margin: 0 auto 25px;
  line-height: 1.6;
}
.lock-symbol {
  font-size: 100px;
  color: var(--blue);
  font-weight: 900;
}
.hidden {
  display: none !important;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
label small {
  font-weight: 500;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 15px;
  border: 2px solid #222;
  background: #fbfaf6;
  margin-top: 9px;
  border-radius: 0;
  color: #111;
  outline-offset: 3px;
  font-size: 15px;
  letter-spacing: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--blue);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-subhead {
  border-top: var(--border);
  padding-top: 25px;
  margin-top: 18px;
}
.form-subhead h3 {
  font-size: 22px;
  margin: 0;
}
.form-subhead span {
  font-size: 10px;
  font-weight: 800;
}
.total {
  background: var(--lime);
  border: var(--border);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 25px;
  gap: 20px;
  font-weight: 800;
  font-size: 12px;
}
.total strong {
  font: 30px 'Archivo Black';
}
.toolbar {
  margin-bottom: 25px;
}
.toolbar > div {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.results-card h2 {
  font-size: 27px;
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
  min-width: 650px;
}
th {
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  letter-spacing: 1px;
}
td,
th {
  padding: 15px 12px;
  border-bottom: 1px solid #ddd;
}
tbody tr:nth-child(even) {
  background: #f8f7f1;
}
.badge {
  background: var(--lime);
  padding: 7px 10px;
  font-weight: 800;
  white-space: nowrap;
}
.danger {
  background: #fff0ec;
  color: #ad2d17;
  border: 1px solid #ad2d17;
  padding: 8px 11px;
  font-weight: 800;
  cursor: pointer;
}
.criterion-row {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 14px;
  align-items: end;
}
.criterion-row .danger {
  margin-bottom: 22px;
  height: 50px;
}
.muted {
  color: #666;
  font-size: 13px;
}
#formMessage,
#settingsMessage {
  font-weight: 800;
  color: #1c6c42;
}
footer {
  background: var(--ink);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 4%;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}
@media (max-width: 900px) {
  .header-stamp,
  .top-right {
    display: none;
  }
  .site-header {
    flex-wrap: wrap;
  }
  .site-header nav {
    width: 100%;
    justify-content: space-between;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    border-left: 0;
    border-top: var(--border);
    min-height: 400px;
  }
  .hero h1 {
    font-size: clamp(65px, 14vw, 120px);
  }
  .hero-copy {
    padding: 60px 6%;
  }
  .home-lower {
    flex-direction: column;
    align-items: flex-start;
  }
  .banner-symbol {
    right: -10%;
    font-size: 240px;
  }
  .statgrid {
    width: 100%;
  }
  .statgrid > div {
    flex: 1;
    min-width: 0;
  }
}
@media (max-width: 600px) {
  .topline {
    font-size: 8px;
  }
  .brand-copy {
    font-size: 17px;
  }
  .nav {
    padding: 10px 7px;
    font-size: 10px;
  }
  .hero h1 {
    letter-spacing: -4px;
  }
  .statgrid {
    flex-wrap: wrap;
  }
  .statgrid > div {
    min-width: 95px;
    padding: 15px;
  }
  .statgrid strong {
    font-size: 34px;
  }
  .ticker {
    font-size: 10px;
  }
  .form-grid,
  .criterion-row {
    grid-template-columns: 1fr;
  }
  .criterion-row .danger {
    margin: 0 0 20px;
  }
  .card {
    padding: 23px;
    box-shadow: 5px 5px 0 var(--ink);
  }
  .total strong {
    font-size: 22px;
  }
  .page-banner {
    padding: 45px 6%;
  }
  .page-banner h1 {
    letter-spacing: -2px;
  }
  .banner-symbol {
    opacity: 0.15;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  footer {
    flex-wrap: wrap;
  }
  .hero-art {
    min-height: 330px;
  }
  .giant-star {
    font-size: 360px;
  }
  .art-sticker {
    width: 100px;
    height: 100px;
    font-size: 17px;
  }
}

/* Landing motion: transform/opacity only; no changes to judging or results. */
#home .hero-line {
  display: block;
}
@keyframes campus-enter {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes campus-star {
  0%,
  100% {
    transform: translateY(0) rotate(-15deg);
  }
  50% {
    transform: translateY(-12px) rotate(-10deg);
  }
}
@keyframes campus-sticker {
  0%,
  100% {
    transform: translateY(0) rotate(15deg);
  }
  50% {
    transform: translateY(9px) rotate(11deg);
  }
}
@keyframes campus-orbit {
  0%,
  100% {
    transform: rotate(30deg) scale(1);
  }
  50% {
    transform: rotate(38deg) scale(0.96);
  }
}
@keyframes campus-orbit-two {
  0%,
  100% {
    transform: rotate(-30deg);
  }
  50% {
    transform: rotate(-38deg);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #home.active .hero-line {
    animation: campus-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  #home.active .hero-line:nth-child(2) {
    animation-delay: 80ms;
  }
  #home.active .hero-line:nth-child(3) {
    animation-delay: 160ms;
  }
  #home.active .hero-line:nth-child(4) {
    animation-delay: 240ms;
  }
  #home.active .hero-copy > p {
    animation: campus-enter 0.65s 0.32s both;
  }
  #home.active .hero-copy > .actions {
    animation: campus-enter 0.65s 0.42s both;
  }
  #home .giant-star {
    animation: campus-star 7s ease-in-out infinite;
  }
  #home .art-sticker {
    animation: campus-sticker 6s ease-in-out infinite;
  }
  #home .orbit-one {
    animation: campus-orbit 10s ease-in-out infinite;
  }
  #home .orbit-two {
    animation: campus-orbit-two 12s ease-in-out infinite;
  }
  #home .default-art > * {
    animation-play-state: paused;
  }
  #home.active:not(.motion-paused) .hero-art.motion-in-view .default-art > * {
    animation-play-state: running;
  }
  #home .landing-reveal {
    transition:
      opacity 0.6s ease var(--reveal-delay),
      transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay);
  }
  #home .reveal-pending {
    opacity: 0;
    transform: translateY(24px);
  }
  #home .btn {
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease,
      background-color 0.2s ease;
  }
  #home .btn span {
    transition: transform 0.2s ease;
  }
  #home .btn:active {
    transform: translate(0, 0);
    box-shadow: none;
  }
}
#home .btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #home .btn:hover {
    transform: translate(-3px, -4px);
    box-shadow: 6px 6px 0 var(--blue);
  }
  #home .btn:hover span {
    transform: translate(3px, -2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  #home *,
  #home *::before,
  #home *::after {
    animation: none !important;
    transition: none !important;
  }
  #home .reveal-pending {
    opacity: 1;
    transform: none;
  }
  #home .btn:hover,
  #home .btn:active {
    transform: none;
    box-shadow: none;
  }
}

/* Uploaded home artwork occupies the existing right-hand panel. */
.default-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
#home .has-images .default-art {
  display: none;
}
.home-gallery {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--blue);
}
#home .home-gallery {
  animation: none;
}
.home-gallery > img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  padding: 24px 24px 86px;
}
.gallery-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px;
  background: var(--paper);
  border: var(--border);
  white-space: nowrap;
  font-weight: 800;
}
.gallery-controls button {
  background: var(--ink);
  color: white;
  border: 0;
  width: 42px;
  height: 42px;
  font-size: 22px;
}
.gallery-controls button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.gallery-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}
.image-settings > p {
  line-height: 1.6;
  max-width: 700px;
}
.image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin: 25px 0;
}
.image-preview {
  border: var(--border);
  padding: 12px;
  min-width: 0;
}
.image-preview img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: var(--paper);
}
.image-preview p {
  font-size: 13px;
  overflow-wrap: anywhere;
  margin: 12px 0;
}
#imageHelp {
  font-size: 13px;
  margin-top: -10px;
}
#imageMessage {
  font-weight: 700;
  overflow-wrap: anywhere;
}
#uploadImages:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Transparent Home gallery and discreet navigation. */
#home .hero-art,
#home .home-gallery {
  background: transparent;
}
#home .home-gallery > img {
  padding: 20px 20px 58px;
}
#home .gallery-controls {
  bottom: 12px;
  gap: 10px;
  padding: 4px 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 24px;
  font-size: 11px;
  font-weight: 600;
  color: #666;
}
#home .gallery-controls button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: transparent;
  color: #555;
  border: 0;
  border-radius: 50%;
  font-size: 17px;
}
#home .gallery-controls button:hover {
  background: #0000000a;
  color: #111;
}
#home .gallery-controls button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
#home .hero-art:not(.has-images) .art-bottom {
  color: var(--ink);
}
#home .hero-art:not(.has-images) .orbit {
  border-color: #15151522;
}
@media (max-width: 600px) {
  #home .home-gallery > img {
    padding: 12px 12px 54px;
  }
}

/* Supplied Ten Techies wordmark replaces the Scoreboard header lockup. */
.brand-logo {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}
.header-logo {
  display: block;
  width: 250px;
  height: 110px;
  object-fit: cover;
  object-position: center 47%;
}
.brand-logo:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}
@media (max-width: 600px) {
  .header-logo {
    width: 200px;
    height: 88px;
  }
}

/* Compact original-style lockup with a blended Ten Techies accent. */
.brand-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.compact-logo {
  display: block;
  width: 68px;
  height: 58px;
  overflow: hidden;
  flex-shrink: 0;
  mix-blend-mode: multiply;
}
.compact-logo img {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: cover;
  transform: translateY(-5px);
  filter: grayscale(1) brightness(3);
}
.brand-compact .brand-copy {
  font-size: 21px;
  line-height: 0.95;
  letter-spacing: -1px;
}
.brand-compact .brand-sub {
  font-size: 9px;
  letter-spacing: 2px;
  margin-top: 6px;
}
.brand-compact:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}
@media (max-width: 600px) {
  .brand-compact .brand-copy {
    font-size: 17px;
  }
  .compact-logo {
    width: 58px;
    height: 50px;
  }
  .compact-logo img {
    width: 58px;
    height: 58px;
    transform: translateY(-4px);
  }
}

/* Score-page wheel: only runs while this page is visible. */
@keyframes score-wheel-spin {
  from {
    transform: rotate(-17deg);
  }
  to {
    transform: rotate(343deg);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #judge.active .banner-symbol {
    display: inline-block;
    transform-origin: center;
    animation: score-wheel-spin 14s linear infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  #judge .banner-symbol {
    animation: none;
  }
}

/* Decorative number-to-score machine on the judging page. */
#judge .score-machine {
  position: absolute;
  right: 3%;
  top: 28px;
  width: min(36%, 360px);
  height: 280px;
  pointer-events: none;
}
.score-machine canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width: 800px) {
  #judge .score-machine {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    max-width: 360px;
    height: 240px;
    margin: 12px auto -20px;
  }
}

/* Larger, proportional vendor animation without stretching the canvas. */
#judge .page-banner {
  min-height: clamp(400px, 36vw, 540px);
}
#judge .score-machine {
  right: 3%;
  top: 50%;
  transform: translateY(-50%);
  width: min(43%, 580px);
  height: auto;
  aspect-ratio: 9/7;
}
#judge .score-machine canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 9/7;
}
@media (min-width: 1101px) {
  #judge .page-banner > div:first-child {
    max-width: 52%;
  }
}
@media (max-width: 1100px) {
  #judge .score-machine {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: min(100%, 580px);
    height: auto;
    aspect-ratio: 9/7;
    margin: 20px auto 0;
  }
  #judge .page-banner {
    min-height: 0;
  }
}

/* Rankings star rotates only while the page is open. */
@keyframes rankings-star-spin {
  from {
    transform: rotate(-17deg);
  }
  to {
    transform: rotate(343deg);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #results.active .banner-symbol {
    display: inline-block;
    transform-origin: center;
    animation: rankings-star-spin 18s linear infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  #results .banner-symbol {
    animation: none;
  }
}

/* Keep navigation centered independently of the logo's width. */
.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}
.site-header > .brand {
  grid-column: 1;
  justify-self: start;
}
.site-header > nav {
  grid-column: 2;
  justify-self: center;
  justify-content: center;
  width: auto;
}
@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-header > .brand {
    grid-column: 1;
    grid-row: 1;
  }
  .site-header > nav {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    justify-content: center;
    width: 100%;
  }
}

.topline {
  justify-content: center;
  text-align: center;
}

/* Simulated campus SSO: tab-scoped demo session, independent of entry access. */
[hidden] {
  display: none !important;
}
.demo-sso {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--paper);
}
.sso-card {
  width: 100%;
  max-width: 520px;
  padding: 40px;
  background: #fff;
  border: var(--border);
  box-shadow: 10px 10px 0 var(--blue);
}
.sso-card h1 {
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -2px;
  margin: 24px 0 18px;
}
.sso-demo-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  background: var(--lime);
  padding: 12px;
  margin: 24px 0;
}
#demoSsoForm .btn {
  width: 100%;
  gap: 12px;
}
.sso-sample {
  background: none;
  border: 0;
  text-decoration: underline;
  padding: 16px 0;
  color: var(--blue);
  font-weight: 700;
}
.sso-note {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
  margin: 10px 0 0;
}
#demoSsoMessage {
  font-size: 13px;
  font-weight: 700;
}
.demo-user {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  font-size: 11px;
}
#demoUserName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px;
}
#demoSignOut {
  background: transparent;
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
#demoSignOut:focus-visible,
.sso-sample:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .site-header > nav {
    grid-column: 1/-1;
  }
  .demo-user {
    grid-column: 2;
    grid-row: 1;
  }
  #demoUserName {
    display: none;
  }
}
@media (max-width: 600px) {
  .sso-card {
    padding: 26px;
  }
  .brand-compact {
    gap: 6px;
  }
  .brand-compact .brand-copy {
    font-size: 15px;
  }
  .brand-compact .brand-sub {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .compact-logo {
    width: 48px;
  }
  .compact-logo img {
    width: 48px;
    height: 58px;
  }
}

/* Text navigation replaces the small gallery arrows. */
#home .gallery-controls button {
  width: auto;
  min-width: 34px;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 800;
}

/* Compact footer producer mark and judge-form return control. */
footer {
  align-items: center;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}
.footer-brand img {
  display: block;
  width: 112px;
  height: 48px;
  object-fit: cover;
  object-position: center 47%;
  filter: grayscale(1) brightness(3) invert(1);
  mix-blend-mode: screen;
}
.footer-brand span {
  font-size: 8px;
  letter-spacing: 1px;
}
.judge-back {
  margin-bottom: 28px;
  padding: 12px 16px;
  font-size: 10px;
}
.judge-back:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.judge-back-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}
.judge-back-row .judge-back {
  margin: 0;
}

/* Equal judge-form actions, with Back on the right. */
.judge-form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.judge-form-actions > .btn {
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 16px 12px;
  font-size: 12px;
  justify-content: center;
  text-align: center;
}
@media (max-width: 420px) {
  .judge-form-actions {
    gap: 10px;
  }
  .judge-form-actions > .btn {
    font-size: 10px;
    padding: 14px 8px;
  }
}

/* Keep score fields numeric while hiding browser stepper controls. */
#judgeForm input[type='number']::-webkit-inner-spin-button,
#judgeForm input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#judgeForm input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Defined criterion headings within the judge scorecard. */
#scoreFields {
  gap: 20px;
}
#scoreFields .criterion-score {
  margin: 0;
  padding: 20px;
  border: 2px solid #deded8;
  border-top: 4px solid var(--blue);
  background: #faf9f5;
  min-width: 0;
}
.criterion-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  margin-bottom: 12px;
}
.criterion-title {
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.criterion-weight-badge {
  flex-shrink: 0;
  background: var(--lime);
  border-radius: 20px;
  padding: 7px 9px;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
#scoreFields .score-input {
  margin-top: 0;
  background: #fff;
  font-size: 22px;
  font-weight: 700;
  min-height: 58px;
}
@media (max-width: 600px) {
  #scoreFields .criterion-score {
    padding: 16px;
  }
  .criterion-title {
    font-size: 18px;
  }
}

.judge-feedback-label {
  margin-top: 26px;
  margin-bottom: 10px;
  font-size: 12px;
}
#judgeFeedback {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
  background: #fff;
}
.feedback-help {
  font-size: 12px;
  color: #666;
  margin-bottom: 24px;
}
.judge-feedback-cell {
  min-width: 220px;
  max-width: 360px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.entry-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.report-download {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  color: var(--blue);
  background: #edf0ff;
  cursor: pointer;
}
.report-download:hover {
  background: var(--blue);
  color: #fff;
}
.report-download:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.report-download:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Open layout between the Home hero columns. */
#home .hero-art {
  border-left: 0;
  border-right: 0;
}

/* Campus rally strip: a bold continuous ribbon with a quiet motion control. */
#home .rally-banner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  min-height: 96px;
  position: relative;
}
#home .rally-window {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
#home .rally-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
#home .rally-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 48px;
  padding: 26px 24px;
}
#home .rally-phrase {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(18px, 2.1vw, 32px);
  letter-spacing: -0.7px;
  line-height: 1.25;
  white-space: nowrap;
}
#home .rally-phrase em {
  font-style: normal;
  color: var(--lime);
}
#home .rally-phrase:nth-child(2) em {
  color: #aeb9ff;
}
#home .rally-phrase:nth-child(3) em {
  color: #ff946e;
}
#home .rally-phrase b {
  display: inline-block;
  font-size: 36px;
  color: var(--lime);
  margin-right: 10px;
  font-weight: 400;
}
#home .rally-phrase:nth-child(2) b {
  color: #aeb9ff;
}
#home .rally-phrase:nth-child(3) b {
  color: #ff946e;
}
#home .rally-pause {
  flex-shrink: 0;
  margin: 0 20px 0 10px;
  width: 36px;
  height: 36px;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  background: transparent;
  color: white;
  font: 700 13px Arial;
  display: grid;
  place-items: center;
  padding: 0;
}
#home .rally-pause:hover {
  background: #ffffff20;
  border-color: white;
}
#home .rally-pause:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}
@keyframes rally-scroll {
  to {
    transform: translateX(-50%);
  }
}
@keyframes rally-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #home .rally-track {
    animation: rally-scroll 38s linear infinite;
    animation-play-state: paused;
  }
  #home .rally-phrase b {
    animation: rally-spin 18s linear infinite;
    animation-play-state: paused;
  }
  #home.active:not(.motion-paused) .rally-banner:not(.is-paused) .rally-track,
  #home.active:not(.motion-paused) .rally-banner:not(.is-paused) .rally-phrase b {
    animation-play-state: running;
  }
  #home .rally-banner:hover .rally-track,
  #home .rally-banner:hover .rally-phrase b {
    animation-play-state: paused !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #home .rally-track {
    width: 100%;
  }
  #home .rally-group {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px 32px;
  }
  #home .rally-group[aria-hidden],
  #home .rally-pause {
    display: none;
  }
  #home .rally-phrase {
    font-size: 18px;
  }
}
@media (max-width: 600px) {
  #home .rally-banner {
    min-height: 78px;
  }
  #home .rally-group {
    padding: 22px 16px;
    gap: 32px;
  }
  #home .rally-phrase {
    gap: 8px;
  }
  #home .rally-phrase b {
    font-size: 27px;
    margin-right: 4px;
  }
  #home .rally-pause {
    margin-right: 12px;
  }
}

/* Refined banner icon set and judge welcome. */
#home .rally-phrase .rally-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 14px;
  margin-right: 8px;
  animation: none !important;
  transform: none;
  background: #ffffff08;
}
#home .rally-icon svg {
  width: 25px;
  height: 25px;
}
@media (max-width: 600px) {
  #home .rally-phrase .rally-icon {
    width: 35px;
    height: 35px;
    border-radius: 11px;
    margin-right: 4px;
  }
  #home .rally-icon svg {
    width: 21px;
    height: 21px;
  }
}

/* Balanced Score banner typography. */
#judge .page-banner h1.score-heading {
  font-size: clamp(56px, 6.6vw, 96px);
  line-height: 0.96;
  letter-spacing: -3px;
  margin: 24px 0;
}
#judge .score-heading > span {
  display: block;
}
#judge .score-heading i {
  display: inline-block;
}
#judge .page-banner p.score-tagline {
  max-width: 460px;
  font-size: clamp(19px, 1.8vw, 25px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  padding-left: 16px;
  border-left: 4px solid var(--ink);
}
@media (max-width: 600px) {
  #judge .page-banner h1.score-heading {
    font-size: clamp(54px, 12vw, 78px);
    letter-spacing: -2px;
  }
  #judge .page-banner p.score-tagline {
    font-size: 19px;
    max-width: 360px;
  }
}

/* Colored depth for the Ready to Judge action. */
#unlockBtn {
  box-shadow: 6px 6px 0 var(--blue);
}
#unlockBtn:hover {
  box-shadow: 9px 9px 0 var(--blue);
}
#unlockBtn:active {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--blue);
}
@media (prefers-reduced-motion: reduce) {
  #unlockBtn:hover,
  #unlockBtn:active {
    transform: none;
    box-shadow: 6px 6px 0 var(--blue);
  }
}

/* Home guide replaces the numerical snapshot cards. */
#home .home-lower {
  align-items: center;
}
#home .home-lower > div:first-child {
  flex: 1;
  min-width: 0;
}
#home .home-how {
  flex: 0 1 470px;
  width: 100%;
  padding: 28px 30px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid #15151515;
}
.home-how h3 {
  font-size: 12px;
  letter-spacing: 1.8px;
  margin: 0 0 22px;
  color: var(--blue);
}
.home-how ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}
.home-how li {
  display: flex;
  align-items: center;
  gap: 16px;
}
.home-how .how-number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--lime);
  color: var(--ink);
  font:
    15px 'Archivo Black',
    Arial,
    sans-serif;
}
.home-how li:nth-child(2) .how-number {
  background: #e8ebff;
  color: #293dcc;
}
.home-how li:nth-child(3) .how-number {
  background: #ffe4d9;
  color: #9b3918;
}
.home-how h4 {
  font:
    12px 'Archivo Black',
    Arial,
    sans-serif;
  letter-spacing: 0.2px;
  margin: 0 0 6px;
}
#home .home-how p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  color: #555;
}
@media (max-width: 900px) {
  #home .home-how {
    flex: auto;
    max-width: 600px;
  }
}
@media (max-width: 600px) {
  #home .home-how {
    padding: 24px 20px;
  }
  .home-how li {
    gap: 12px;
  }
}

/* Center the star independently of its rotation and font baseline. */
#results .rankings-art {
  position: absolute;
  inset: 0 4% 0 auto;
  width: 40%;
  display: grid;
  place-items: center;
  pointer-events: none;
}
#results .rankings-art .banner-symbol {
  position: static;
  display: block;
  width: min(100%, 280px);
  height: auto;
  aspect-ratio: 1;
  line-height: 0;
  font-size: 0;
  opacity: 0.28;
  transform-origin: center;
}
#results .rankings-art svg {
  display: block;
  width: 100%;
  height: 100%;
}
@media (max-width: 600px) {
  #results .rankings-art {
    right: 0;
    width: 36%;
  }
  #results .rankings-art .banner-symbol {
    opacity: 0.15;
  }
}

/* Prize drawing lives independently of judging data. */
.prize-banner {
  background: var(--lime);
}
.prize-banner h1 i {
  color: var(--blue);
  -webkit-text-stroke: 0;
}
.prize-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  max-width: 1200px;
}
.prize-entry {
  margin: 0;
  padding: 28px;
  min-width: 0;
}
.prize-entry h2 {
  font-size: 26px;
  letter-spacing: -1px;
}
.prize-entry textarea {
  resize: vertical;
  line-height: 1.6;
}
.prize-count {
  font-weight: 800;
  color: var(--blue);
}
.prize-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0;
  font-size: 13px;
  line-height: 1.5;
}
.prize-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}
.prize-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.prize-tools .btn {
  padding: 13px 15px;
  font-size: 10px;
  flex: 1;
  justify-content: center;
}
.prize-right {
  min-width: 0;
}
.prize-stage {
  background: var(--blue);
  color: white;
  border-radius: 24px;
  padding: 40px 28px;
  text-align: center;
  min-height: 335px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.prize-stage h2 {
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: -1.5px;
  line-height: 1.12;
  margin: 28px 0;
  overflow-wrap: anywhere;
  width: 100%;
}
.prize-stage .btn {
  background: var(--lime);
  color: var(--ink);
  justify-content: center;
  min-width: 200px;
}
.prize-stage p {
  font-size: 13px;
  line-height: 1.5;
  min-height: 40px;
  margin: 20px 0 0;
}
.prize-history {
  padding: 28px 4px;
}
.prize-history h3 {
  font-size: 15px;
}
.prize-history ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.prize-history li {
  display: flex;
  gap: 16px;
  align-items: center;
  background: white;
  border: 1px solid #ddd;
  padding: 14px;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.prize-history li span {
  color: var(--blue);
  font-weight: 800;
}
#drawing button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
@keyframes prize-reveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .winner-revealed {
    animation: prize-reveal 0.5s ease both;
  }
}
@media (max-width: 800px) {
  .prize-layout {
    grid-template-columns: 1fr;
  }
  .prize-stage {
    min-height: 300px;
  }
}

/* Audience winner presentation. */
.winner-show {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 32px;
  border: 0;
  background: #101126;
  color: white;
  overflow: hidden;
}
.winner-show::backdrop {
  background: #101126;
}
.winner-show[open] {
  display: grid;
  place-items: center;
}
.winner-spotlight {
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg,
    transparent,
    #3b53ef40,
    transparent,
    #d8f36b18,
    transparent
  );
  pointer-events: none;
}
.winner-show-content {
  position: relative;
  text-align: center;
  z-index: 2;
  width: min(100%, 1100px);
}
.winner-show-content > p:first-child {
  font-size: clamp(12px, 2vw, 20px);
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--lime);
}
#audienceWinner {
  font:
    clamp(48px, 10vw, 140px)/1.05 'Archivo Black',
    Arial,
    sans-serif;
  letter-spacing: -0.04em;
  margin: 32px 0;
  overflow-wrap: anywhere;
  text-shadow: 0 8px 50px #3b53ef80;
}
#audienceCaption {
  font-size: clamp(16px, 2vw, 24px);
  color: #c6c8e1;
  line-height: 1.5;
}
.winner-show .btn {
  color: white;
  border-color: #ffffff55;
  margin-top: 30px;
  justify-content: center;
}
.winner-close {
  position: absolute;
  right: 24px;
  top: 24px;
  z-index: 4;
  color: white;
  background: #ffffff10;
  border: 1px solid #ffffff55;
  border-radius: 24px;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 800;
}
.winner-credit {
  position: absolute;
  bottom: 28px;
  left: 20px;
  right: 20px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 2px;
  color: #a0a3bc;
}
.winner-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}
.winner-confetti i {
  position: absolute;
  top: -30px;
  left: var(--x);
  width: 9px;
  height: 17px;
  background: var(--color);
  border-radius: 2px;
  opacity: 0;
}
@keyframes winner-rays {
  to {
    transform: rotate(360deg);
  }
}
@keyframes winner-pop {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes winner-confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(-20px) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift), 110vh) rotate(var(--spin));
  }
}
@media (prefers-reduced-motion: no-preference) {
  .winner-show[open] .winner-spotlight {
    animation: winner-rays 32s linear infinite;
  }
  .winner-show.is-winner #audienceWinner {
    animation: winner-pop 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .winner-show.is-winner .winner-confetti i {
    animation: winner-confetti-fall var(--duration) var(--delay) ease-out both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .winner-spotlight,
  .winner-confetti {
    display: none;
  }
}
@media (max-width: 600px) {
  .winner-show {
    padding: 70px 22px;
  }
  .winner-show-content > p:first-child {
    letter-spacing: 2px;
  }
  .winner-credit {
    font-size: 8px;
    letter-spacing: 1px;
  }
}

/* Four-leaf clover on the prize banner. */
.prize-banner {
  position: relative;
  padding-right: 42%;
}
.prize-clover {
  position: absolute;
  right: 7%;
  top: 50%;
  transform: translateY(-50%) rotate(-12deg);
  width: clamp(140px, 23vw, 270px);
  pointer-events: none;
}
.prize-clover svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(8px 10px 0 #185a3718);
}
@media (max-width: 600px) {
  .prize-banner {
    padding-right: 6%;
  }
  .prize-banner h1,
  .prize-banner p,
  .prize-banner > .section-kicker {
    position: relative;
    z-index: 1;
  }
  .prize-clover {
    right: -30px;
    width: 180px;
    opacity: 0.14;
  }
}

/* Setup banner rulebook illustration. */
#settings .setup-rulebook {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%) rotate(9deg);
  width: clamp(150px, 20vw, 230px);
  pointer-events: none;
}
.setup-rulebook svg {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 600px) {
  #settings .setup-rulebook {
    right: -25px;
    width: 160px;
    opacity: 0.15;
  }
  #settings .page-banner > div:first-child {
    position: relative;
    z-index: 1;
  }
}

.criteria-guide-link {
  display: inline-flex;
  align-items: center;
  margin: 0 0 24px;
  padding: 12px 16px;
  background: #edf0ff;
  color: #293dcc;
  border: 1px solid #b7c0ff;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.criteria-guide-link:hover {
  background: #dfe5ff;
}
.criteria-guide-link:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.criteria-reference-setup h2 {
  font-size: 28px;
}
.criteria-reference-setup p {
  line-height: 1.6;
}
#referenceCurrent {
  margin-top: 24px;
}
#referenceCurrent .danger {
  margin: 12px;
}
#referenceName {
  overflow-wrap: anywhere;
  font-weight: 800;
}

#settings .page-banner {
  background: #dedaff;
}

/* Gentle clover twinkles; static accents when motion is reduced. */
.clover-sparkle {
  fill: #fffdf0;
  stroke: #c1a543;
  stroke-width: 0.7;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0.7;
}
@keyframes clover-twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #drawing .clover-sparkle {
    animation: clover-twinkle 3.4s ease-in-out infinite;
    animation-play-state: paused;
  }
  #drawing.active .clover-sparkle {
    animation-play-state: running;
  }
  #drawing .sparkle-two {
    animation-delay: -1.1s;
  }
  #drawing .sparkle-three {
    animation-delay: -2.2s;
  }
}

.topline {
  padding-left: 16px;
  padding-right: 16px;
  justify-content: flex-end;
  text-align: right;
}

/* Rulebook opens, then a pen writes the criteria in a calm repeating sequence. */
#settings .animated-rulebook {
  width: clamp(180px, 25vw, 310px);
  right: 5%;
  transform: translateY(-50%) rotate(-4deg);
}
.rulebook-cover {
  transform-box: view-box;
  transform-origin: 150px 130px;
  opacity: 0;
}
.rulebook-pen {
  opacity: 0;
}
.rule-writing {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
@keyframes rulebook-open {
  0%,
  10% {
    transform: scaleX(1);
    opacity: 1;
  }
  25% {
    transform: scaleX(-1);
    opacity: 1;
  }
  30%,
  90% {
    transform: scaleX(-1);
    opacity: 0;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}
@keyframes rulebook-left {
  0%,
  10%,
  100% {
    opacity: 0;
  }
  25%,
  90% {
    opacity: 1;
  }
}
@keyframes rule-write-one {
  0%,
  30%,
  100% {
    stroke-dashoffset: 1;
  }
  39%,
  95% {
    stroke-dashoffset: 0;
  }
}
@keyframes rule-write-two {
  0%,
  42%,
  100% {
    stroke-dashoffset: 1;
  }
  51%,
  95% {
    stroke-dashoffset: 0;
  }
}
@keyframes rule-write-three {
  0%,
  54%,
  100% {
    stroke-dashoffset: 1;
  }
  63%,
  95% {
    stroke-dashoffset: 0;
  }
}
@keyframes rule-write-four {
  0%,
  66%,
  100% {
    stroke-dashoffset: 1;
  }
  76%,
  95% {
    stroke-dashoffset: 0;
  }
}
@keyframes rulebook-write-pen {
  0%,
  28% {
    opacity: 0;
    transform: translate(0, 0);
  }
  30% {
    opacity: 1;
    transform: translate(0, 0);
  }
  39% {
    opacity: 1;
    transform: translate(75px, 0);
  }
  42% {
    transform: translate(0, 24px);
  }
  51% {
    transform: translate(67px, 24px);
  }
  54% {
    transform: translate(0, 48px);
  }
  63% {
    transform: translate(75px, 48px);
  }
  66% {
    transform: translate(7px, 81px);
  }
  76% {
    opacity: 1;
    transform: translate(74px, 81px);
  }
  80%,
  100% {
    opacity: 0;
    transform: translate(85px, 70px);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #settings .rulebook-cover {
    animation: rulebook-open 11s ease-in-out infinite;
  }
  #settings .rulebook-pages {
    animation: rulebook-left 11s ease-in-out infinite;
  }
  #settings .writing-one {
    animation: rule-write-one 11s linear infinite;
  }
  #settings .writing-two {
    animation: rule-write-two 11s linear infinite;
  }
  #settings .writing-three {
    animation: rule-write-three 11s linear infinite;
  }
  #settings .writing-four {
    animation: rule-write-four 11s linear infinite;
  }
  #settings .rulebook-pen {
    animation: rulebook-write-pen 11s linear infinite;
  }
  #settings .animated-rulebook svg * {
    animation-play-state: paused;
  }
  #settings.active .animated-rulebook svg * {
    animation-play-state: running;
  }
}
@media (max-width: 600px) {
  #settings .animated-rulebook {
    right: -35px;
    width: 200px;
    opacity: 0.15;
  }
}

.contestant-certificate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.certificate-download {
  margin-left: 8px;
}
.certificate-download:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
