/* ==========================================================================
   COMMIT-ed — comic poster theme
   Candy pink sky, black ink linework, yellow signage, hard offset shadows.
   ========================================================================== */

:root {
  --pink: #f9b9d2;
  --pink-2: #f79cc0;
  --pink-3: #ef79a8;
  --pink-pale: #fddceb;
  --ink: #150a12;
  --ink-2: #2b1a24;
  --muted: #6d4d5e;
  --paper: #fffaf7;
  --yellow: #ffc93c;
  --yellow-2: #ffb800;
  --red: #e8202a;
  --red-hot: #ff3b45;
  --blue: #2f4f9e;
  --blue-bright: #4a74d6;
  --ok: #12996f;
  --danger: #d61f3c;
  --radius: 14px;
  --wrap: 1120px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Web strand pattern, inked in black over the pink sky. */
  --web: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23150a12' stroke-width='0.9' stroke-opacity='0.55'%3E%3Cpath d='M60 0v120M0 60h120M0 0l120 120M120 0L0 120'/%3E%3Cpath d='M60 12 108 60 60 108 12 60Z'/%3E%3Cpath d='M60 26 94 60 60 94 26 60Z'/%3E%3Cpath d='M60 40 80 60 60 80 40 60Z'/%3E%3C/g%3E%3C/svg%3E");
  --halftone: radial-gradient(circle at center, rgba(21, 10, 18, 0.16) 1.1px, transparent 1.5px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--pink);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Pink sky with a halftone print texture over it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(800px 500px at 50% 0%, var(--pink-pale), transparent 62%),
    radial-gradient(700px 460px at 90% 100%, var(--pink-2), transparent 60%),
    var(--pink);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--halftone);
  background-size: 7px 7px;
  opacity: 0.5;
  pointer-events: none;
}

a { color: inherit; }

main {
  flex: 1;
  width: min(100% - 40px, var(--wrap));
  margin: 0 auto;
  padding: 40px 0 80px;
  position: relative;
  z-index: 1;
}

::selection { background: var(--yellow); color: var(--ink); }

/* ---------- keyframes ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes draw {
  from { stroke-dashoffset: var(--len, 1000); }
  to { stroke-dashoffset: 0; }
}
@keyframes sense {
  0% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 0 rgba(232, 32, 42, 0.5); }
  70% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 16px rgba(232, 32, 42, 0); }
  100% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 0 rgba(232, 32, 42, 0); }
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes shoot {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes spider-settle {
  from { opacity: 0; transform: translateY(-26px) scale(0.6); }
  to { opacity: 1; transform: none; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(5px) rotate(6deg); }
}
/* Drop from above, overshoot, then pendulum down to rest. */
@keyframes web-hang {
  0%   { opacity: 0; transform: translateY(-150%) rotate(-1deg); }
  18%  { opacity: 1; }
  45%  { transform: translateY(3%) rotate(3.2deg); }
  62%  { transform: translateY(0) rotate(-2.4deg); }
  76%  { transform: rotate(1.5deg); }
  88%  { transform: rotate(-0.8deg); }
  100% { transform: none; }
}
@keyframes sway {
  0%, 100% { transform: rotate(-1.1deg); }
  50% { transform: rotate(1.1deg); }
}

/* Scroll reveal — fx.js flips .in-view on. */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px max(20px, calc((100% - var(--wrap)) / 2));
  background: rgba(249, 185, 210, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--ink);
  transition: padding 0.3s var(--ease-out), box-shadow 0.3s;
}
.site-head.stuck { padding-top: 9px; padding-bottom: 9px; box-shadow: 0 6px 0 rgba(21, 10, 18, 0.12); }
/* Progress line that fills as you scroll. */
.site-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 3px;
  width: var(--scroll, 0%);
  background: var(--red);
}

.brand {
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.03em;
  text-decoration: none;
  font-size: 20px;
  text-transform: uppercase;
  white-space: nowrap;
  flex: 0 0 auto;
  position: relative;
  transition: transform 0.3s var(--ease-snap);
}
.brand span { color: var(--red); }
.brand:hover { transform: translateY(-2px) rotate(-2deg); }
.brand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.brand:hover::after { transform: scaleX(1); }

.site-head nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.site-head nav a {
  position: relative;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-bottom: 4px;
  transition: color 0.25s, transform 0.25s var(--ease-snap);
}
.site-head nav a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.site-head nav a:hover { color: var(--red); transform: translateY(-2px); }
.site-head nav a:hover::before { transform: scaleX(1); transform-origin: left; }
.site-head nav a.active::before { transform: scaleX(1); }

.cta {
  position: relative;
  overflow: hidden;
  background: var(--yellow);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 9px 18px;
  white-space: nowrap;
  flex: 0 0 auto;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.25s var(--ease-snap), box-shadow 0.25s, background 0.25s;
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.7), transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease-out);
}
.cta:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); background: var(--yellow-2); }
.cta:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.cta:hover::after { transform: translateX(120%); }

.site-foot {
  position: relative;
  z-index: 1;
  border-top: 3px solid var(--ink);
  background: var(--ink);
  color: var(--pink);
  padding: 22px max(20px, calc((100% - var(--wrap)) / 2));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  font-weight: 600;
}
.site-foot a { text-decoration: none; transition: color 0.25s, letter-spacing 0.25s; }
.site-foot a:hover { color: var(--yellow); letter-spacing: 0.08em; }

/* ---------- skyline ---------- */

.skyline {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 100vw;
  transform: translateX(-50%) translateY(var(--para, 0px));
  z-index: 0;
  pointer-events: none;
  display: block;
}
.skyline svg { width: 100%; height: auto; display: block; }
/* Windows light up in a staggered flicker once the page settles. */
.skyline .win {
  opacity: 0;
  animation: rise 0.5s var(--ease-out) forwards;
  animation-delay: var(--wd, 0s);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 52px 0 clamp(150px, 26vw, 420px);
}
.hero-copy, .hero-card { position: relative; z-index: 2; }

.hero h1 {
  font-size: clamp(34px, 6.8vw, 78px);
  line-height: 0.94;
  margin: 0 0 22px;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  font-weight: 900;
  font-style: italic;
}
.hero h1 .script {
  display: inline-block;
  color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 7px 7px 0 var(--ink);
  animation: rise 0.7s var(--ease-out) both;
}
.hero h1 .outline {
  display: inline-block;
  color: var(--paper);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--red);
}
/* Words stay whole; letters animate in one by one (fx.js splits the text). */
.hero h1 .wd { display: inline-block; white-space: nowrap; }
.hero h1 .ltr {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em) rotate(6deg);
  animation: rise 0.55s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
  transition: transform 0.3s var(--ease-snap);
}
.hero h1 .ltr:hover { transform: translateY(-8px) rotate(-5deg) scale(1.08); }

/* Yellow speed strokes above the title, poster style. */
.speed-lines {
  display: block;
  width: 116px;
  margin: 0 0 4px 6px;
  color: var(--yellow);
  filter: drop-shadow(3px 3px 0 var(--ink));
}
.speed-lines path {
  stroke: currentColor;
  stroke-width: 10;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  animation: draw 0.55s var(--ease-out) forwards;
}
.speed-lines path:nth-child(2) { animation-delay: 0.09s; }
.speed-lines path:nth-child(3) { animation-delay: 0.18s; }

.hero p {
  color: var(--ink-2);
  max-width: 46ch;
  font-size: 17px;
  font-weight: 500;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 36px; }

.admin-stats { display: flex; gap: 40px; margin: 0; flex-wrap: wrap; }
.admin-stats dt {
  font-size: 36px;
  font-weight: 900;
  font-style: italic;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.admin-stats dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

/* ---------- the card hangs itself on the wall by a web ---------- */

.hang { position: relative; }

.hang-line {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  width: 3px;
  height: 320px;
  margin-left: -1.5px;
  background: linear-gradient(180deg, rgba(21, 10, 18, 0) 0%, rgba(21, 10, 18, 0.5) 22%, var(--ink) 100%);
  transform-origin: top center;
  animation: shoot 0.42s var(--ease-out) both;
  pointer-events: none;
  z-index: 3;
}
.hang-line .spider {
  position: absolute;
  bottom: -8px;
  left: 50%;
  margin-left: -14px;
  width: 28px;
  height: 28px;
  color: var(--ink);
  animation: spider-settle 0.5s var(--ease-out) 0.42s both, bob 4.5s ease-in-out 1.6s infinite;
  transition: color 0.3s;
}
.hang:hover .spider { color: var(--red); }

.hang-anchor {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 90px;
  margin-left: -45px;
  color: var(--ink);
  animation: rise 0.5s var(--ease-out) 0.5s both;
  pointer-events: none;
  z-index: 2;
}
.hang-anchor .anchor { width: 100%; height: auto; display: block; }

/* Card drops on the strand, overshoots, swings to rest, then sways. */
.hang .term {
  transform-origin: top center;
  animation: web-hang 1.75s cubic-bezier(0.3, 1.2, 0.4, 1) 0.3s both,
    sway 7s ease-in-out 2.4s infinite;
}

/* Corner web in the hero, stroke-drawn on load. Its strands radiate from the
   SVG's own top-left corner, so pinning that corner to the viewport edge —
   whatever the content column is doing — makes the web start at the screen
   edge on every width. */
.corner-web {
  position: absolute;
  top: -96px;
  left: 50%;
  transform: translateX(-50vw);
  width: clamp(190px, 24vw, 320px);
  height: auto;
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}
.corner-web path, .corner-web line {
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.6;
  stroke-dasharray: var(--len, 900);
  stroke-dashoffset: var(--len, 900);
  animation: draw 2.4s var(--ease-out) forwards;
}

/* Terminal card — suit blue, so the black web and spider read against it. */
.term {
  position: relative;
  background: linear-gradient(180deg, #22337d, #16234f);
  border: 3px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 10px 10px 0 var(--ink);
  transition: box-shadow 0.4s;
}
.term::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.11) 1px, transparent 1.4px);
  background-size: 6px 6px;
  opacity: 0.4;
  pointer-events: none;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.16);
  background: #2c3f92;
}
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #5468bd; transition: transform 0.3s var(--ease-snap); }
.term-bar i:first-child { background: var(--red); }
.term-bar i:nth-child(2) { background: var(--yellow); }
.term-bar i:nth-child(3) { background: #2ee0ae; }
.term:hover .term-bar i { transform: scale(1.25); }
.term-bar span { margin-left: 10px; color: #bcc9f2; font-size: 12px; }
.term pre {
  margin: 0;
  padding: 22px;
  font: 13px/1.85 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #eef2ff;
  overflow-x: auto;
}
.term .k { color: #ff87b5; }
.term .f { color: #6fe0ff; }
.term .s { color: var(--yellow); }
.term-foot {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 2px solid rgba(255, 255, 255, 0.16);
  font: 12px ui-monospace, monospace;
  color: #bcc9f2;
}
.term-foot .pass { color: #4bf0c0; animation: flicker 3s ease-in-out infinite; }

/* ---------- comic panel cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 7px 7px 0 var(--ink);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, background 0.35s;
}
/* Web mesh fading in from the top-right corner on hover. */
.card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 190px;
  height: 190px;
  background-image: var(--web);
  background-size: 190px 190px;
  opacity: 0;
  transform: rotate(-12deg) scale(0.7);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
  pointer-events: none;
  z-index: -1;
}
.card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 6px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.card:hover {
  transform: translate(-3px, -6px);
  background: var(--pink-pale);
  box-shadow: 12px 14px 0 var(--ink);
}
.card:hover::before { opacity: 0.45; transform: rotate(0deg) scale(1); }
.card:hover::after { transform: scaleX(1); }
.card h2 {
  margin: 15px 0 9px;
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  transition: transform 0.35s var(--ease-out);
}
.card:hover h2 { transform: translateX(5px); }
.card p { color: var(--muted); font-size: 15px; margin: 0 0 18px; font-weight: 500; }
.card > a {
  color: var(--red);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  display: inline-flex;
  gap: 7px;
  transition: gap 0.3s var(--ease-out), color 0.3s;
}
.card > a:hover { gap: 14px; color: var(--blue); }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--yellow);
  border: 2.5px solid var(--ink);
  border-radius: 4px;
  padding: 4px 11px;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.35s var(--ease-snap), background 0.35s, color 0.35s;
}
.card:hover .tag { transform: rotate(2deg) scale(1.06); background: var(--red); color: var(--paper); }

/* ---------- page heads ---------- */

.page-head { margin-bottom: 34px; position: relative; }
.page-head h1 {
  font-size: clamp(32px, 4.6vw, 54px);
  margin: 10px 0 14px;
  letter-spacing: -0.035em;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  color: var(--paper);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--red);
}
.page-head p { color: var(--ink-2); max-width: 60ch; margin: 0; font-weight: 500; }
.eyebrow {
  display: inline-block;
  color: var(--ink);
  background: var(--yellow);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 900;
  margin: 0;
  padding: 4px 12px;
  transform: rotate(-1.5deg);
  animation: sense 3s ease-out infinite;
}
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.narrow { max-width: 820px; }

/* ---------- forms ---------- */

.panel {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 19px;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink);
  transition: box-shadow 0.35s, transform 0.35s var(--ease-out);
}
.panel::before {
  content: "";
  position: absolute;
  bottom: -70px;
  left: -70px;
  width: 200px;
  height: 200px;
  background-image: var(--web);
  background-size: 200px 200px;
  opacity: 0.12;
  pointer-events: none;
  transition: opacity 0.5s, transform 0.6s var(--ease-out);
}
.panel:hover { box-shadow: 12px 12px 0 var(--ink); transform: translate(-2px, -2px); }
.panel:hover::before { opacity: 0.26; transform: rotate(10deg); }
.panel label { display: grid; gap: 8px; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; }
.opt { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }

input, select {
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  transition: box-shadow 0.25s, transform 0.25s var(--ease-out), background 0.25s;
}
input::placeholder { color: #b39aa8; font-weight: 500; }
input:hover, select:hover { box-shadow: 3px 3px 0 var(--ink); }
input:focus, select:focus {
  outline: none;
  background: #fffdf4;
  box-shadow: 4px 4px 0 var(--red);
  transform: translate(-1px, -1px);
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 12px 24px;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.25s var(--ease-snap), box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.55), transparent 75%);
  transform: translateX(-130%);
  transition: transform 0.65s var(--ease-out);
}
.btn:hover::after { transform: translateX(130%); }
.btn:hover { transform: translate(-2px, -3px); box-shadow: 8px 9px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

.btn.primary { background: var(--red); color: var(--paper); }
.btn.primary:hover { background: var(--red-hot); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--yellow); }
.btn.danger { background: var(--paper); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: var(--paper); }

/* Thwip: a web line shoots from the corner to whatever you click. */
.thwip {
  position: absolute;
  width: 3px;
  background: linear-gradient(180deg, var(--ink), rgba(21, 10, 18, 0));
  pointer-events: none;
  z-index: 999;
  transform-origin: top center;
  border-radius: 3px;
}

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; margin: 0; font-weight: 500; }

.flash {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 15px 18px;
  margin: 0 0 22px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 5px 5px 0 var(--ink);
  animation: rise 0.5s var(--ease-out) both;
}
.flash.ok { background: #c9f7e5; color: #0c5c45; }
.flash.error { background: #ffd9df; color: #8e0f22; }

.empty {
  position: relative;
  overflow: hidden;
  border: 3px dashed var(--ink);
  border-radius: var(--radius);
  padding: 48px 34px;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  font-weight: 600;
  transition: background 0.4s, color 0.4s;
}
.empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--web);
  background-size: 200px 200px;
  background-position: center;
  opacity: 0.14;
  transition: opacity 0.5s;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at center, #000 20%, transparent 72%);
  mask-image: radial-gradient(circle at center, #000 20%, transparent 72%);
}
.empty:hover { background: var(--pink-pale); color: var(--ink); }
.empty:hover::before { opacity: 0.28; }

/* ---------- badge page ---------- */

.badge-layout { display: grid; grid-template-columns: 360px 1fr; gap: 30px; align-items: start; }
.badge-preview {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px;
  perspective: 1200px;
  box-shadow: 8px 8px 0 var(--ink);
  transition: box-shadow 0.4s;
}
.badge-preview:hover { box-shadow: 12px 12px 0 var(--ink); }
#badge-canvas {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  border: 2.5px solid var(--ink);
  transition: transform 0.25s var(--ease-out);
}

.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
/* Two-tone chip: suit colour on the left, webbing colour on the right. */
.sw {
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s, transform 0.3s var(--ease-snap);
}
.sw::before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sw) 0 50%, var(--sw2) 50% 100%);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.35s var(--ease-snap), box-shadow 0.35s;
}
.sw:hover { color: var(--ink); transform: translateY(-2px); }
.sw:hover::before { transform: rotate(14deg) scale(1.08); box-shadow: 5px 5px 0 var(--ink); }
.sw.selected { color: var(--ink); }
.sw.selected::before { box-shadow: 0 0 0 3px var(--yellow), 4px 4px 0 var(--ink); }

/* Compact buttons for the inline correction controls. */
.btn.small {
  padding: 7px 14px;
  font-size: 12px;
  border-width: 2.5px;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn.small:hover { box-shadow: 5px 6px 0 var(--ink); }
.btn.small:active { box-shadow: 1px 1px 0 var(--ink); }

/* ---------- label chips and the score a PR is worth ---------- */

.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: var(--pink-pale);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 10px;
}
.chip.none { background: transparent; border-style: dashed; color: var(--muted); }

.score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 2px dashed rgba(21, 10, 18, 0.18);
  border-bottom: 2px dashed rgba(21, 10, 18, 0.18);
  padding: 12px 0;
}
.worth {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  padding: 2px 12px;
  box-shadow: 3px 3px 0 var(--ink);
}
.worth.has-tier { background: var(--yellow); }
.worth.no-tier { background: var(--pink-pale); color: var(--muted); }
.score-note { color: var(--muted); font-size: 13px; font-weight: 600; }

.score-callout {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 18px 20px;
  margin: 0 0 22px;
  display: grid;
  gap: 10px;
}
.score-callout p { margin: 0; font-weight: 600; }

/* The refresh button sits just under the card it belongs to. */
.refresh { margin: -8px 0 18px; }
.btn.small.ghost { background: var(--paper); }

/* ---------- tables ---------- */

.board {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink);
}
.board th {
  text-align: left;
  color: var(--paper);
  background: var(--ink);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 900;
  padding: 12px 14px;
}
.board td { padding: 14px; border-bottom: 2px solid rgba(21, 10, 18, 0.12); vertical-align: middle; }
.board tbody tr:last-child td { border-bottom: 0; }
.board tbody tr { transition: background 0.3s, transform 0.3s var(--ease-out); }
.board tbody tr:hover { background: var(--pink-pale); }
.board:not(.reviewed) tbody tr:hover { transform: translateX(6px); }
.board .rank {
  font-weight: 900;
  font-style: italic;
  font-size: 20px;
  color: var(--muted);
  width: 60px;
  transition: transform 0.35s var(--ease-snap), color 0.3s;
}
.board tbody tr:hover .rank { transform: scale(1.3); color: var(--red); }
.board .top-1 .rank { color: var(--yellow-2); }
.board .top-2 .rank { color: #8e93a8; }
.board .top-3 .rank { color: #c07a3c; }
.board .top-1 { background: #fff3cf; }
.board .pts {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  transition: color 0.3s, transform 0.3s var(--ease-snap);
}
.board tbody tr:hover .pts { color: var(--red); transform: scale(1.12); }
.board .user a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.3s;
}
.board .user a:hover { color: var(--red); }
.board .who { display: flex; align-items: center; gap: 13px; }
.board .who img {
  border-radius: 50%;
  background: var(--pink-pale);
  border: 2.5px solid var(--ink);
  transition: transform 0.4s var(--ease-snap);
}
.board tbody tr:hover .who img { transform: scale(1.15) rotate(-6deg); }
.board .who span { display: grid; }
.board .who strong { font-weight: 800; }
.board .who a { color: var(--muted); font-size: 13px; text-decoration: none; transition: color 0.3s; }
.board .who a:hover { color: var(--red); }
.board .pr a { color: var(--blue); text-decoration: none; font-size: 13px; font-weight: 600; }
.board .pr a:hover { color: var(--red); }
.board .note { color: var(--muted); font-size: 13px; }

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px 11px;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.3s var(--ease-snap);
}
.board tbody tr:hover .pill { transform: scale(1.08); }
.pill.approved { background: #c9f7e5; color: #0c5c45; }
.pill.rejected { background: #ffd9df; color: #8e0f22; }

/* Delete sits under the adjust controls, deliberately a separate action. */
.board .adjust .delete-form { margin-top: 8px; }

/* Correcting a score after the fact, inline in the reviewed table. */
.board .adjust form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.board .adjust input { font-size: 14px; padding: 8px 10px; }
.board .adjust .note-in { flex: 1; min-width: 120px; width: auto; }
.board .labels { max-width: 190px; }
.board tbody tr:hover { transform: none; }
.board tbody tr:hover .rank { transform: scale(1.3); }

/* ---------- admin ---------- */

.admin-stats {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px 28px;
  margin-bottom: 34px;
  box-shadow: 8px 8px 0 var(--ink);
}
.admin-stats > div { transition: transform 0.35s var(--ease-snap); }
.admin-stats > div:hover { transform: translateY(-4px); }
.admin-stats > div:hover dt { color: var(--red); }
.admin-stats dt { transition: color 0.3s; }

.sec {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 900;
  color: var(--ink);
  margin: 40px 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sec::after { content: ""; flex: 1; height: 3px; background: var(--ink); opacity: 0.25; }

.review {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 15px;
  margin-bottom: 18px;
  box-shadow: 7px 7px 0 var(--ink);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, background 0.35s;
}
.review::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 170px;
  height: 170px;
  background-image: var(--web);
  background-size: 170px 170px;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.review:hover { transform: translate(-3px, -4px); box-shadow: 11px 12px 0 var(--ink); background: var(--pink-pale); }
.review:hover::before { opacity: 0.3; }
.review-who { display: flex; align-items: center; gap: 13px; }
.review-who img { border-radius: 50%; border: 2.5px solid var(--ink); transition: transform 0.4s var(--ease-snap); }
.review:hover .review-who img { transform: scale(1.1) rotate(-6deg); }
.review-who div { display: grid; }
.review-who strong { font-weight: 900; }
.review-who span { color: var(--muted); font-size: 13px; font-weight: 500; }
.pr-link {
  color: var(--blue);
  font: 13px ui-monospace, monospace;
  font-weight: 600;
  word-break: break-all;
  text-decoration: none;
  transition: color 0.3s, letter-spacing 0.3s;
}
.pr-link:hover { color: var(--red); letter-spacing: 0.02em; }
.review-controls { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.review-controls label { display: grid; gap: 7px; font-size: 12px; }
.pts-in { width: 118px; }
.note-in { flex: 1; min-width: 200px; }

@media (max-width: 1240px) {
  .site-head { gap: 16px; }
  .site-head nav { gap: 15px; }
  .site-head nav a { font-size: 13px; }
}

@media (max-width: 860px) {
  .hero, .badge-layout { grid-template-columns: 1fr; }

  /* A wide table becomes scrollable rather than running off the page. The
     page clips horizontal overflow, so without this the far columns are
     unreachable, not merely off-screen. */
  .board {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .board td, .board th { padding: 10px 12px; }
  /* Repository names and URLs have no spaces to break at, so let them wrap
     anywhere rather than forcing the whole table to scroll. */
  .board td { overflow-wrap: anywhere; }
  .board .pr a, .board .pr-link { word-break: break-all; }
  /* …except the action link, which reads badly split across two lines. */
  .board .comic-link { white-space: nowrap; }

  /* The header row gets crowded once the logos are in the flow. */
  .site-head { gap: 10px; row-gap: 8px; }
  .site-head nav { gap: 16px; }
  .hero { padding-bottom: clamp(150px, 42vw, 260px); }
  /* Zoom the city in so the towers still read at phone widths. */
  .skyline { width: 170vw; }
  .site-head { flex-wrap: wrap; gap: 12px; }
  .site-head nav { order: 3; width: 100%; margin-left: 0; }
  .board .pr, .board .note, .board .labels { display: none; }
  .corner-web { top: -84px; opacity: 0.55; }
  .hang-line { height: 150px; }
  /* The poster shadow has to shrink with the type, or lines collide. */
  .hero h1 { line-height: 1.06; }
  .hero h1 .script, .hero h1 .outline, .page-head h1 { -webkit-text-stroke-width: 2px; }
  .hero h1 .script { text-shadow: 4px 4px 0 var(--ink); }
  .hero h1 .outline { text-shadow: 3px 3px 0 var(--red); }
  .page-head h1 { text-shadow: 4px 4px 0 var(--red); }
}

@media (max-width: 520px) {
  /* Give the header explicit rows rather than letting four items wrap however
     they land: logos and wordmark together, then the button, then the nav. */
  .site-head { row-gap: 10px; }
  .logo-right { order: 1; margin-left: auto; }
  .site-head .cta { order: 2; }
  .site-head nav { order: 3; }

  .site-head nav { gap: 12px; }
  .site-head nav a { font-size: 11px; }
  .brand { font-size: 15px; }
  .cta { font-size: 11px; padding: 7px 12px; border-width: 2.5px; }
  .logo-left { height: 26px; }
  .logo-right { height: 22px; }
  /* Long prose tables read better slightly tighter. */
  .board { font-size: 13px; }
  .board td, .board th { padding: 9px 10px; }
}

/* ---------- projects page ---------- */

.projects-section {
  margin-top: 24px;
}

.empty-projects {
  text-align: center;
  padding: 48px 24px;
}

.empty-projects h2 {
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 7px 7px 0 var(--ink);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, background 0.35s;
}

.project-card::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 170px;
  height: 170px;
  background-image: var(--web);
  background-size: 170px 170px;
  opacity: 0;
  transform: rotate(-12deg) scale(0.7);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
  pointer-events: none;
  z-index: -1;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

.project-card:hover {
  transform: translate(-3px, -5px);
  background: var(--pink-pale);
  box-shadow: 12px 12px 0 var(--ink);
}

.project-card:hover::before {
  opacity: 0.35;
  transform: rotate(0deg) scale(1);
}

.project-card:hover::after {
  transform: scaleX(1);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.repo-name-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.repo-name-group h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  line-height: 1.25;
  word-break: break-word;
}

.repo-name-group h2 a {
  text-decoration: none;
  color: var(--ink);
  transition: color 0.25s;
}

.repo-name-group h2 a:hover {
  color: var(--blue-bright);
}

.star-badge {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 9px;
  box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}

.project-desc {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.tech-stack-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tech-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-chip {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1.8px solid var(--ink);
  border-radius: 6px;
  padding: 2px 8px;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.2s, background 0.2s;
}

.project-card:hover .tech-chip {
  background: #fff;
  transform: translateY(-1px);
}

.project-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 12px;
  border-top: 2px dashed rgba(21, 10, 18, 0.18);
}

.project-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
}

.project-stats strong {
  font-weight: 900;
  color: var(--ink);
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn.small {
  padding: 6px 14px;
  font-size: 12px;
  border-width: 2px;
  box-shadow: 3px 3px 0 var(--ink);
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Anyone who asks for less motion gets a still page. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero h1 .ltr, .skyline .win { opacity: 1; transform: none; }
}


/* ---------- GitHub Account Verification ---------- */
.github-id-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.github-id-wrap input {
  padding-right: 42px;
}

.github-id-wrap.is-valid input {
  border-color: #059669;
  background: #ecfdf5;
  box-shadow: 3px 3px 0 #059669;
}

.github-id-wrap.is-valid input:focus {
  background: #d1fae5;
  box-shadow: 4px 4px 0 #059669;
}

.github-id-wrap.is-invalid input {
  border-color: var(--red);
  background: #fef2f2;
  box-shadow: 3px 3px 0 var(--red);
}

.github-id-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  margin-top: 4px;
  transition: all 0.25s var(--ease-snap);
}

.github-id-status.valid {
  color: #047857;
}

.github-id-status.invalid {
  color: var(--red);
}

.badge-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: #fff;
  box-shadow: 2px 2px 0 currentColor;
}

.github-id-status.valid .badge-check-icon {
  background: #10b981;
  color: #fff;
  border-color: #047857;
  box-shadow: 2px 2px 0 #047857;
}

.github-id-status.invalid .badge-check-icon {
  background: var(--red);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.badge-check-text {
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 11px;
}

/* Shared Navigation Logo Properties */
/* ---------- navbar logos ---------- */

/**
 * These sit in the flex row rather than absolutely positioned. Absolute
 * placement ignored the brand and the CTA, so at every width the logos sat on
 * top of them; in the flow they push the row instead of covering it.
 */
.nav-logo {
  flex: 0 0 auto;
  width: auto;
  object-fit: contain;
  display: block;
}

/**
 * Each logo declares its own aspect ratio so the browser reserves the right
 * width before the file arrives. Without this the images measure zero until
 * they load, the wordmark starts hard against the left edge, and everything
 * jumps sideways when they appear.
 */
.logo-left {
  height: clamp(26px, 4vw, 46px);
  aspect-ratio: 280 / 141;
}
.logo-right {
  height: clamp(22px, 3.2vw, 38px);
  aspect-ratio: 280 / 114;
}