:root {
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-2: #1c2027;
  --border: #262b33;
  --text: #f2f4f7;
  --muted: #9aa3af;
  --accent: #c4f24a;
  --accent-ink: #0b0d10;
  --danger: #ff8a7a;
  --radius: 14px;
  --gutter: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a {
  color: var(--text);
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

.lang {
  min-width: 48px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.lang:hover {
  color: var(--text);
}

.kicker {
  margin: 32px 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 8.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 17px;
}

.byline {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  display: grid;
  gap: 12px;
}

.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 120ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease);
}

.btn:hover {
  border-color: #3a414c;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  border-color: var(--accent);
  background: #d2f86b;
}

.btn-big {
  align-items: flex-start;
  min-height: 72px;
  padding: 14px 18px;
  text-align: left;
}

.btn-hint {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 400;
  opacity: 0.75;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 28px 0;
}

.stat {
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.steps {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 8px 0 8px 40px;
  color: var(--muted);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 8px;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}

.footer {
  margin-top: 40px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.footer p {
  margin: 0 0 8px;
}

.footer a {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
}

.player {
  position: relative;
  margin: 0 calc(-1 * var(--gutter));
  background: #000;
}

.player video {
  display: block;
  width: 100%;
  height: 42vh;
  height: 42dvh;
  max-height: 420px;
  object-fit: contain;
  background: #000;
}

.player-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
  pointer-events: none;
}

.speed {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
}

.speed-label {
  margin-right: auto;
  color: var(--muted);
  font-size: 14px;
}

.chip {
  min-width: 56px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 16px 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  transition: width 200ms var(--ease), background-color 200ms var(--ease);
}

.dot.done {
  background: #5d6b3a;
}

.dot.current {
  width: 22px;
  background: var(--accent);
}

.panel {
  animation: rise 220ms var(--ease);
}

.question {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-align: center;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.options .btn {
  min-height: 56px;
}

.options .btn-unsure {
  grid-column: 1 / -1;
  min-height: 48px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.options .btn.picked {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin-top: 12px;
}

.link-btn {
  min-height: 48px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--text);
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.input:focus {
  border-color: var(--accent);
  outline: none;
}

.suggestions {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.suggestion {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.suggestion-new {
  border-style: dashed;
  color: var(--accent);
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.footer-slim {
  margin-top: 24px;
  padding: 16px 0 32px;
}

.footer-slim .footer-links {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.question:focus {
  outline: none;
}

.center {
  text-align: center;
}

.saved-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 8px auto 12px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  animation: pop 320ms var(--ease);
}

.credit {
  margin: 0 0 20px;
  color: var(--muted);
}

.credit a {
  color: var(--text);
  font-weight: 600;
}

.count {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 15px;
  text-align: center;
}

.prose {
  padding-bottom: 40px;
}

.prose section {
  margin-bottom: 24px;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul {
  margin: 0;
  padding-left: 20px;
}

.btn-danger {
  border-color: var(--danger);
  background: transparent;
  color: var(--danger);
}

.btn-danger:hover {
  border-color: var(--danger);
}

.page-top {
  margin-top: 24px;
}

.rules {
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
}

.rules li {
  margin-bottom: 4px;
}

.file-name {
  overflow-wrap: anywhere;
}

.checks {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.check .tag {
  margin-left: 0;
}

.bar {
  height: 8px;
  margin: 8px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 200ms var(--ease);
}

.linkbox {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  text-align: left;
}

.linkbox-warning {
  margin: 0;
  font-weight: 600;
}

.linkbox .input {
  font-size: 15px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}

@media (min-width: 480px) {
  .options {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
