/* Direction: Buzzline — Swiss trivia poster. White paper, black grotesque, one electric tangerine. */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f0eb;
  --border: #0c0c0c;
  --border-strong: #0c0c0c;
  --ink: #0c0c0c;
  --muted: #56534d;
  --accent: #ff5a14;
  --accent-hover: #e84b08;
  --accent-ink: #2c2c2c;
  --accent-text: #bd3f05;
  --accent-strong: #983004;
  --accent-soft: #ffe7d9;
  --accent-border: #0c0c0c;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #e3f0e8;
  --success-strong: #137638;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f6eae1;
  --warning-strong: #a64c08;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f7e4e4;
  --danger-strong: #b91c1c;
  --chart-1: #ff5a14;
  --chart-2: #a6921d;
  --chart-3: #219764;
  --chart-4: #1f9bb8;
  --chart-5: #6965f7;
  --chart-6: #e757c3;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --display-weight: 800;
  --display-tracking: -0.035em;
  --eyebrow-tracking: 0.18em;
  --radius-btn: 2px;
  --radius-card: 2px;
  --radius-input: 2px;
  --border-w: 2px;
  --border-strong-w: 2px;
  --card-pad: 1.5rem;
  --btn-weight: 700;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, sans-serif;
}

html[data-theme="dark"] {
  --canvas: #0c0c0c;
  --surface: #242424;
  --surface-2: #181818;
  --border: #2e2e2e;
  --border-strong: #555555;
  --ink: #ffffff;
  --muted: #9e9e9e;
  --accent: #ff5a14;
  --accent-hover: #ff7337;
  --accent-ink: #0c0c0c;
  --accent-text: #ff5a14;
  --accent-strong: #ff5a14;
  --accent-soft: #411d0e;
  --accent-border: #792f10;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #0e2617;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #311c0b;
  --warning-strong: #c57a40;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #321010;
  --danger-strong: #d16969;
  --chart-1: #ff5a14;
  --chart-2: #ceb523;
  --chart-3: #219764;
  --chart-4: #27c1e5;
  --chart-5: #6b68fa;
  --chart-6: #fe79da;
}

/* Buzzline — the poster: hard edges, hard shadows, the ring, the glide. */

.poster {
  border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  background: var(--surface);
}

.poster-sm {
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--surface);
}

.poster-flat {
  border: 2px solid var(--ink);
  background: var(--surface);
}

.rule-thick {
  border-top: 4px solid var(--ink);
}

/* Answer tiles: they press down into their own shadow. */
.answer {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.9rem;
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 1rem 1.1rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--ink);
  transition: transform 90ms ease-out, box-shadow 90ms ease-out, background 120ms ease-out;
}

.answer:hover {
  background: var(--accent-soft);
}

.answer:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.answer:active,
.answer.is-pressed {
  transform: translate(6px, 6px);
  box-shadow: 0 0 0 var(--ink);
}

.answer[disabled] {
  cursor: default;
}

.answer-key {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--ink);
  background: var(--surface-2);
  font-size: 0.95rem;
}

.answer-mine {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translate(6px, 6px);
  box-shadow: 0 0 0 var(--ink);
}

.answer-mine .answer-key {
  background: var(--accent-ink);
  color: var(--ink);
}

.answer-right {
  background: var(--accent-soft);
}

.answer-dim {
  opacity: 0.45;
  box-shadow: 3px 3px 0 var(--ink);
}

/* The ten second ring. */
.ring-track {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 12;
}

.ring-dash {
  fill: none;
  stroke: var(--accent);
  stroke-width: 12;
  stroke-linecap: butt;
  stroke-dasharray: 326.7;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  animation: ring-drain 10s linear forwards;
}

@keyframes ring-drain {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 326.7; }
}

/* Names bounce into the lobby. */
.pop-in {
  animation: pop-in 420ms cubic-bezier(0.2, 1.3, 0.35, 1) both;
}

@keyframes pop-in {
  0% { transform: translateY(14px) scale(0.86); }
  60% { transform: translateY(0) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

/* Scoreboard rows glide into their new rank. */
.row-glide {
  animation: row-glide 460ms cubic-bezier(0.22, 0.85, 0.2, 1) both;
}

@keyframes row-glide {
  from { transform: translateX(-26px) translateY(8px); }
  to { transform: none; }
}

.prompt-in {
  animation: prompt-in 320ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

@keyframes prompt-in {
  from { transform: translateY(12px); }
  to { transform: none; }
}

.stripes {
  background-image: repeating-linear-gradient(
    135deg,
    var(--ink) 0 6px,
    transparent 6px 14px
  );
}

.code-type {
  font-family: var(--font-display);
  letter-spacing: 0.22em;
}

html.reduced-motion .pop-in,
html.reduced-motion .row-glide,
html.reduced-motion .prompt-in,
html.reduced-motion .ring-dash {
  animation: none;
}

html.reduced-motion .answer {
  transition: none;
}
