:root {
  --paper: #0d0a10;
  --surface: #19141e;
  --raised: #221b2b;
  --line: #3e3248;
  --line-strong: #77627f;
  --tint: #3c2235;
  --ink-cyan: #7dd7e3;
  --ink-magenta: #bc568a;
  --cut-label: polygon(2.3% 10%, 100% 0, 97.7% 89%, 0 100%);
}

.site-header {
  background: #09060b;
  border-bottom-color: #57425e;
  box-shadow: 0 1px 0 #78d8e82b;
}
.header-inner nav a[aria-current] { text-shadow: -1px 1px #62364f; }

.comic-action {
  border-radius: 0;
  box-shadow: -2px 2px 0 #101016, -4px 4px 0 #58a5b7, 3px -2px 0 #ab527c;
}
.demo-cta {
  --demo-cue-cycle: 2.1s;
  position: relative;
  isolation: isolate;
  min-height: 46px;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  background: #ffce72;
  color: #19101d;
  font-size: clamp(1.2rem, 1.72vw, 1.55rem);
  letter-spacing: .025em;
  white-space: nowrap;
}
.directory-heading .demo-cta {
  min-height: 52px;
  padding-inline: 6px 15px;
  font-size: clamp(1.26rem, 2.1vw, 1.62rem);
}
.demo-cta:is(:hover, :focus-visible) { background: #ffe7a8; }
.demo-cta:active { background: #ffc45e; }
.demo-cta-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  background: #19101d;
  color: #fff0d6;
  clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
}
.demo-cta-icon svg {
  display: block;
  width: 1.19em;
  height: 1.19em;
}
@media (prefers-reduced-motion: no-preference) {
  .demo-cta { transition: background-color 160ms ease; }
  .demo-cta[data-cue]::after {
    position: absolute;
    z-index: -1;
    inset: -2px;
    border: 2px solid var(--ink-cyan);
    pointer-events: none;
    content: "";
    animation: demo-cta-outline var(--demo-cue-cycle) ease-in-out infinite;
  }
  .demo-cta[data-cue] .demo-cta-icon svg {
    animation: demo-cta-controller var(--demo-cue-cycle) ease-in-out infinite;
  }
}
@keyframes demo-cta-outline {
  0%, 100% { opacity: .44; transform: scale(1); }
  50% { opacity: .95; transform: scale(1.026, 1.10); }
}
@keyframes demo-cta-controller {
  0%, 100% { transform: translateY(1px) rotate(5deg); color: #fff0d6; }
  50% { transform: translateY(-2px) rotate(-9deg) scale(1.08); color: #bcefff; }
}
.comic-section-title {
  padding: 3px 24px 7px 17px;
  filter: drop-shadow(-2px 2px 0 #487b91) drop-shadow(3px -1px 0 #9e4275);
}
.comic-section-title::before { clip-path: var(--cut-label); }
.leaderboard-heading { align-items: center; }
.leaderboard-heading .comic-section-title { color: #110d16; }
.leaderboard-heading .comic-section-title::before { background: var(--ink); }
.leaderboard-heading p { margin-top: 13px; }

.table-scroll, .chart-card { border-radius: 2px; }
.leaderboard-table tbody tr:first-child { background: #301f2f; }
.rank-track { border-radius: 1px; }
.rank-fill {
  background: repeating-linear-gradient(118deg, #ffab74 0 8px, #ff8547 8px 14px);
  border-radius: 1px;
}

.game-directory {
  background: linear-gradient(133deg, #1d1527 0, #100d15 39%, #17111c 100%);
  border-block-color: #514057;
}
.game-directory::before, .brief-content::before { background: none; }
.game-index { gap: 19px 17px; }
.game-panel:nth-child(3n + 1) { --panel-shape: polygon(0 0, 100% 2.5%, 96% 100%, 2% 97.5%); }
.game-panel:nth-child(3n + 2) { --panel-color: #c294dc; --panel-shape: polygon(2% 3%, 97% 0, 100% 98%, 0 100%); }
.game-panel:nth-child(3n) { --panel-color: var(--ink-cyan); --panel-shape: polygon(0 1.6%, 97.5% 0, 100% 96%, 2.5% 100%); }
.game-card {
  padding: 3px;
  filter: drop-shadow(-2px 1px 0 #407e8b) drop-shadow(2px -1px 0 #a74371);
}
.panel-media::before {
  background: linear-gradient(146deg, #23133816, #09050d16 48%, #100915ac 100%);
}
.panel-media::after {
  inset: 0;
  background:
    linear-gradient(161deg, transparent 0 13%, #f6e9cb91 13.25% 13.75%, transparent 14.05% 24%, #95f2f071 24.25% 24.6%, transparent 25%),
    linear-gradient(23deg, transparent 0 10%, #f6e9cb71 10.25% 10.9%, transparent 11.2% 15%, #ff9c6061 15.5% 16%, transparent 16.3%);
  mask-image: linear-gradient(90deg, #000, transparent 32% 70%, #000);
}
.panel-caption {
  color: var(--ink);
  border-top-color: #eadac7;
  background: #1a1220;
}
.game-panel:nth-child(3n + 2) .panel-caption { background: #251629; }
.game-panel:nth-child(3n) .panel-caption { background: #132127; }

.workflow {
  background: linear-gradient(115deg, #1a1420, #121018 70%);
  box-shadow: 4px 4px 0 #39263a;
}
.workflow-heading h2 { text-shadow: -2px 1px 0 #305963, 2px 2px 0 #744060; }
.workflow-steps li {
  --step-ink: #ffa268;
  border-radius: 0;
  border-top: 3px solid var(--step-ink);
  background: #1b1521;
  box-shadow: 2px 3px 0 #442940;
}
.workflow-steps li:nth-child(2) { --step-ink: #cba0e1; }
.workflow-steps li:nth-child(3) { --step-ink: var(--ink-cyan); }
.step-number {
  min-width: 37px;
  padding: 5px 8px;
  border: 0;
  color: #190e11;
  background: var(--step-ink);
  font: italic 800 1.4rem/1.1 var(--display);
  clip-path: var(--cut-label);
}

.browse-heading h1, .experiment-heading h1 {
  text-shadow: -2px 1px 0 #3b788a, 3px 3px 0 #823d69;
}
.brief-art, .result-visual {
  box-shadow: -2px 3px 0 #5199aa, 3px -2px 0 #b44a7f;
}
.brief-content { background: linear-gradient(140deg, #251a2e, #19141e); }
.brief-content h2, .score-badge { clip-path: var(--cut-label); }
.score-rules { border-radius: 1px; }
.score-formula {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: start;
  align-items: center;
  gap: .5em;
}
.score-formula-term {
  padding: 4px 8px;
  border: 1px solid #805047;
  background: #2d1e27;
  color: #ffe0c1;
  line-height: 1.25;
}
.score-formula-result {
  border-color: #3f6c76;
  background: #19262e;
  color: #b7e8ed;
}
.score-formula-arrow { color: var(--accent); font-size: 1.16em; line-height: 1; }

.home-page .site-footer { background: #0b090e; }
.home-page .footer-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(4px, 1.5vw, 24px);
  min-height: 64px;
  padding-block: 6px;
}
.home-page .footer-inner .brand { width: clamp(82px, 9vw, 112px); }
.footer-institutions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.12fr);
  justify-self: center;
  width: min(100%, 760px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-institutions li + li { border-left: 1px solid var(--line); }
.footer-institution {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  height: 100%;
  padding: 5px clamp(3px, 1vw, 12px);
  outline-offset: -2px;
}
.footer-institution:is(:hover, :focus-visible) { background: #1a1420; }
.footer-institution img {
  width: auto;
  height: auto;
  max-width: min(100%, 156px);
  max-height: 34px;
  object-fit: contain;
}
.footer-gvc img { filter: invert(1) hue-rotate(180deg); }
.footer-nju img { max-height: 39px; }
.footer-leaderboard { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; }
.footer-leaderboard-arrow { font-size: 1.15em; }

@media (max-width: 580px) {
  .home-page .footer-inner { min-height: 56px; }
  .home-page .footer-inner .brand { width: 27px; aspect-ratio: 1; }
  .footer-institutions { grid-template-columns: minmax(0, 1fr) minmax(0, .87fr) minmax(0, 1fr) minmax(0, 1.16fr); }
  .footer-leaderboard { width: 29px; }
  .footer-leaderboard-label { display: none; }
  .footer-institution img { max-height: 27px; }
  .footer-nju img { max-height: 30px; }
}

@media (max-width: 620px) {
  .rank-scoring summary { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; padding: 8px; }
  .rank-scoring .score-badge { grid-area: 1 / 1; justify-self: start; }
  .rank-scoring .score-toggle { grid-area: 1 / 2; }
  .score-formula { grid-column: 1 / -1; }
}

@media (max-width: 490px) {
  .leaderboard-heading .comic-section-title { padding-inline: 10px 14px; font-size: clamp(1.95rem, 10vw, 2.7rem); }
  .game-index { gap: 13px 12px; }
}
