@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/static/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/static/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/static/fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "League Gothic"; font-weight: 400; font-display: swap; src: url(/static/fonts/league-gothic-latin-400-normal.woff2) format("woff2"); }

:root {
  --red: #d43527; --red-dark: #a8281d; --maroon: #4e0f0c;
  --text: #1c1c1c; --muted: #666; --slate: #3f4d66;
  --bg: #f8f8f8; --card: #fff; --border: #e2e2e2;
  --ok: #1e7f4f; --radius: 6px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; }

.hero { background: var(--maroon) url(/static/img/header.jpg) center / cover no-repeat; height: clamp(120px, 23vw, 300px); }
.hero-small { height: 90px; }

main { max-width: 560px; margin: -40px auto 40px; padding: 0 16px; position: relative; }
main.wide { max-width: 1100px; margin-top: 24px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 4px 18px rgba(0,0,0,.08); padding: 28px; margin-bottom: 20px; }

h1, h2 { font-family: "League Gothic", "Arial Narrow", sans-serif; font-weight: 400; letter-spacing: .5px; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-size: 2.4rem; color: var(--maroon); }
h2 { font-size: 1.7rem; color: var(--slate); }
p.lead { color: var(--muted); margin-top: 0; }

label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .95rem; }
input, textarea { width: 100%; padding: 11px 12px; font: inherit; border: 1px solid #ccc; border-radius: var(--radius); background: #fff; }
input:focus, textarea:focus { outline: 2px solid var(--red); border-color: var(--red); }
input.code { text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
textarea { min-height: 140px; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }

button, .btn { display: inline-block; background: var(--red); color: #fff; border: 0; border-radius: var(--radius); padding: 11px 20px; font: 600 1rem "Inter", sans-serif; cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { background: var(--red-dark); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { background: var(--slate); }
button.ghost { background: transparent; color: var(--red); border: 1px solid var(--red); padding: 6px 12px; font-size: .85rem; }
button.ghost:hover { background: var(--red); color: #fff; }
.full { width: 100%; margin-top: 22px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.msg { padding: 12px 14px; border-radius: var(--radius); margin-top: 16px; display: none; }
.msg.error { display: block; background: #fdecea; color: #8a1c12; border-left: 4px solid var(--red); }
.msg.info { display: block; background: #eef3fb; color: var(--slate); border-left: 4px solid var(--slate); }

.cred { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-top: 6px; }
.cred code { flex: 1; font-size: 1rem; word-break: break-all; }
.cred button { padding: 6px 12px; font-size: .85rem; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--slate); font-weight: 600; }
tr.click { cursor: pointer; }
tr.click:hover { background: #fbf1f0; }
.bar { height: 8px; background: #eee; border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--red); }
.badge { font-family: ui-monospace, monospace; font-weight: 600; background: var(--maroon); color: #fff; padding: 2px 8px; border-radius: 4px; }
.hidden { display: none !important; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px; }

/* ===== Participant page: split layout (form left, illustration right) ===== */
.split-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px;
  background: linear-gradient(135deg, #2a0806 0%, var(--maroon) 45%, #7a1d16 100%); overflow-x: hidden; }
.bg-shapes span { position: fixed; border-radius: 22px; background: rgba(212,53,39,.18); pointer-events: none;
  animation: drift 14s ease-in-out infinite; }
.bg-shapes span:nth-child(1) { width: 180px; height: 180px; left: -40px; top: 12%; transform: rotate(18deg); }
.bg-shapes span:nth-child(2) { width: 90px; height: 90px; left: 8%; bottom: 10%; animation-delay: -4s; }
.bg-shapes span:nth-child(3) { width: 240px; height: 240px; right: -70px; top: -60px; border-radius: 50%; background: rgba(255,255,255,.05); animation-delay: -7s; }
.bg-shapes span:nth-child(4) { width: 120px; height: 120px; right: 6%; bottom: 6%; animation-delay: -10s; }
@keyframes drift { 0%,100% { translate: 0 0; } 50% { translate: 0 -18px; } }

.split { position: relative; display: grid; grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  width: 100%; max-width: 1080px; min-height: 600px; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: rise .6s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.split-form { padding: 36px 40px 32px; display: flex; flex-direction: column; justify-content: center; }
.brand { display: flex; align-items: center; gap: 10px; font-size: .8rem; letter-spacing: 2px; color: var(--muted); margin-bottom: 28px; }
.brand img { width: 30px; height: 30px; }
.brand b { color: var(--red); letter-spacing: 1px; }

.split-art { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 36px 28px 20px; background: radial-gradient(circle at 70% 20%, #fff 0%, #fbeceb 55%, #f6d9d6 100%); }
.art-title { margin-bottom: 14px; font-family: "League Gothic", "Arial Narrow", sans-serif; font-size: 3.2rem; line-height: 1;
  text-transform: uppercase; color: var(--maroon); letter-spacing: 1px; }
.art-title span { color: var(--red); }
.art-sub { margin: 6px 0 10px; color: var(--slate); font-size: .95rem; text-align: center; }
.split-art img { width: 100%; max-width: 560px; height: auto; }

/* Narrow screens: illustration on top (smaller), form below */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; min-height: 0; }
  .split-art { order: -1; padding: 16px 16px 4px; }
  .split-art img { max-width: 190px; }
  .art-title { font-size: 1.9rem; }
  .art-sub { font-size: .85rem; margin-bottom: 4px; }
  .split-form { padding: 24px 22px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-shapes span, .split { animation: none; }
}
input.code::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }
