:root {
  --bg: #050608;
  --ink: #edf3fb;
  --muted: #9aa6b6;
  --line: rgba(246, 192, 0, 0.45);
  --card: #0c0e12;
  --yellow: #f6c000;
  --yellow-ink: #14120a;
  --bad: #ffb4b4;
  --ok: #d7f7c8;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "IBM Plex Sans", Inter, sans-serif;
  min-height: 100vh;
}
h1, h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0;
}
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 0.95; }
h2 { font-size: 28px; }
a { color: inherit; }
p { line-height: 1.5; }
.top, main, footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 600; }
.mark {
  width: 28px; height: 28px; display: grid; place-items: center;
  background: var(--yellow); color: var(--yellow-ink); font-weight: 700;
}
nav { display: flex; gap: 18px; align-items: center; }
.kicker {
  font-family: "JetBrains Mono", monospace;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  margin: 0 0 8px;
}
.lead { color: var(--muted); max-width: 62ch; }
.btn, button.btn {
  background: var(--yellow);
  color: var(--yellow-ink);
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font: 600 15px/1 "IBM Plex Sans", sans-serif;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
button.text { background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; padding: 0; }
.hero { display: grid; gap: 28px; padding: 18px 0 10px; }
.banner, .panel, .card, .composer, .result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.banner {
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
  padding: 18px;
}
.banner p, .card p { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.card { padding: 18px; min-width: 0; }
.card.mini { text-decoration: none; display: block; }
.note, .narrow { margin: 10px 0 28px; }
.register, .hero.tight { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: start; margin: 20px 0 40px; }
details.fold {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
details.fold summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::before { content: "▸ "; color: var(--yellow); }
details.fold[open] summary::before { content: "▾ "; }
details.fold .panel { margin-top: 14px; padding: 0; border: 0; background: transparent; }
.panel, .composer { padding: 18px; display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input, textarea {
  width: 100%;
  background: #07080b;
  color: var(--ink);
  border: 1px solid #2a3140;
  border-radius: 10px;
  padding: 12px;
  font: 16px/1.4 "IBM Plex Sans", sans-serif;
}
textarea { resize: vertical; }
.composer { grid-template-columns: 1.4fr 0.6fr; }
.side { display: grid; gap: 10px; align-content: end; }
.grow textarea { min-height: 180px; }
.result { padding: 18px; margin: 18px 0; }
.result img, .card img { width: 100%; border-radius: 12px; display: block; margin-top: 10px; }
.card-link { color: inherit; text-decoration: none; display: block; }
.ref-picked {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #07080b;
}
.ref-picked img { width: 100%; margin: 0; border-radius: 10px; }
.ref-picked p { margin: 0 0 8px; }
a.shot { position: relative; display: block; margin-top: 10px; }
a.shot img { margin-top: 0; }
.shot-hint {
  position: absolute; left: 12px; bottom: 12px;
  background: var(--yellow); color: var(--yellow-ink);
  border-radius: 999px; padding: 6px 10px;
  font-size: 12px; font-weight: 600;
}
.copy { white-space: pre-wrap; }
.flashes { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.flash { border-radius: 10px; padding: 10px 12px; }
.flash.ok { background: #14210f; color: var(--ok); }
.flash.bad { background: #2a1214; color: var(--bad); }
.status-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.queued, .pill.running { color: var(--yellow); border-color: rgba(246, 192, 0, 0.7); }
.pill.done { color: var(--ok); border-color: #2f6a28; background: #14210f; }
.pill.failed { color: var(--bad); border-color: #6b2a2a; background: #2a1214; }
.pill.queued .dot, .pill.running .dot { animation: pulse 1.1s ease-in-out infinite; }
.steps { display: flex; gap: 10px; list-style: none; padding: 0; margin: 10px 0 0; }
.steps li {
  flex: 1; color: var(--muted);
  border-top: 3px solid #2a3140; padding-top: 8px;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.steps li.on { color: var(--yellow); animation: step-glow 1.2s ease-in-out infinite; }
.steps li.done { color: var(--ok); border-top-color: #7dce6a; }
.steps li.bad { color: var(--bad); border-top-color: #ff8d8d; }
.progress { display: grid; gap: 8px; margin-top: 12px; }
.progress-track {
  height: 8px; background: #2a3142; border-radius: 99px; overflow: hidden;
}
.progress.slim .progress-track { height: 5px; }
.progress-bar {
  height: 100%; width: 42%; border-radius: 99px;
  background: var(--yellow);
  animation: sweep 1.4s ease-in-out infinite;
}
.progress.queued .progress-bar { animation-duration: 2.2s; opacity: 0.85; }
.progress.running .progress-bar { animation-duration: 0.9s; }
.progress.done .progress-bar, .progress.failed .progress-bar {
  width: 100%; animation: none; transform: none; opacity: 1;
}
.progress.done .progress-bar { background: #7dce6a; }
.progress.failed .progress-bar { background: #ff8d8d; }
.progress-note { margin: 0; color: var(--muted); font-size: 14px; }
.progress.done .progress-note { color: var(--ok); }
.progress.failed .progress-note { color: var(--bad); }
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.75); }
  50% { opacity: 1; transform: scale(1); }
}
@keyframes sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
@keyframes step-glow {
  0%, 100% { border-top-color: rgba(246, 192, 0, 0.35); }
  50% { border-top-color: #f6c000; }
}
.row { display: flex; justify-content: space-between; align-items: baseline; }
.pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 40px; }
.page {
  min-width: 36px; text-align: center; text-decoration: none;
  border: 1px solid #2a3140; border-radius: 8px; padding: 8px;
}
.page.on { background: var(--yellow); color: var(--yellow-ink); border-color: var(--yellow); }
.muted { color: var(--muted); font-size: 13px; }
.grid.history { grid-template-columns: repeat(2, 1fr); }
footer {
  display: flex; justify-content: space-between; gap: 12px;
  color: var(--muted); padding: 28px 0 40px; font-size: 14px;
}
@media (max-width: 860px) {
  .grid, .register, .hero.tight, .composer, .grid.history, .ref-picked { grid-template-columns: 1fr; }
  .banner, .top, footer { flex-direction: column; align-items: flex-start; }
}
