@import url("/static/fonts/schibsted-grotesk.css?v=20261105a");

:root {
  --bg: #111111;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --line-strong: #353535;
  --text: #f3f1ed;
  --text-2: #b5b2ad;
  --ash: #8a8782;
  --ember: #d9733f;
  --ember-ink: #1a0f08;
  --ice: #9cc9d6;
  --problem: #e06a5e;
  --field: 217, 115, 63;
  --night: var(--bg);
  --paper: var(--surface);
  --accent: var(--ember);
}

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 100vh;
  background: var(--paper);
}

/* Left panel */
.welcome-side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  padding: 32px clamp(28px, 4vw, 56px);
  overflow: hidden;
  background: var(--night);
  color: #fff;
}
#sideField { position: absolute; inset: 0; width: 100%; height: 100%; }
.welcome-side > :not(canvas) { position: relative; }

.pass {
  width: min(100%, 380px);
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.pass-tag { font-size: 13px; color: rgba(255, 255, 255, .55); }
.pass strong { display: block; margin-top: 6px; font-size: 24px; font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; }
.pass dl { margin-top: 14px; }
.pass dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 14px;
  animation: pass-in .3s ease-out;
}
.pass dt { color: rgba(255, 255, 255, .55); }
.pass dd { text-align: right; overflow-wrap: anywhere; }
@keyframes pass-in { from { opacity: 0; transform: translateY(6px); } }
.welcome-foot { font-size: 14px; color: rgba(255, 255, 255, .55); }

/* Question side */
.welcome-main { display: flex; flex-direction: column; min-height: 100vh; padding: 28px clamp(24px, 6vw, 88px); }
.welcome-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 36px; }
.back { justify-self: start; padding: 6px 0; border: 0; background: none; color: var(--body); font: inherit; font-size: 15px; cursor: pointer; }
.back:hover { color: var(--ink); }
.back[hidden] { display: block; visibility: hidden; }
.count { font-size: 13px; color: var(--faint); }
.welcome-top .lang { justify-self: end; border-color: var(--line); color: var(--body); }
.welcome-top .lang:hover { border-color: var(--ink); color: var(--ink); }
.meter { height: 3px; margin-top: 14px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); transform-origin: left; transition: transform .35s ease-out; }

.ask {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 620px);
  margin-inline: auto;
  padding: 40px 0;
  animation: ask-in .35s ease-out;
}
@keyframes ask-in { from { opacity: 0; transform: translateY(14px); } }
.ask h1 { max-width: none; color: var(--text); font: 600 clamp(32px, 3.6vw, 48px)/1.08 "Schibsted Grotesk", var(--sans); letter-spacing: -.035em; }
.ask .hint { margin-top: 12px; font-size: 18px; color: var(--body); }

.field { margin-top: 32px; }
.field input {
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-bottom: 2px solid var(--line);
  outline: 0;
  background: none;
  color: var(--ink);
  font: 400 26px var(--sans);
  transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: #b6bac1; }
.error { min-height: 22px; margin-top: 8px; font-size: 14px; color: #c0341c; }

.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 32px; }
.choices.single { grid-template-columns: 1fr; }
.choice {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.choice:hover { border-color: var(--ink); transform: translateY(-1px); }
.choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice b { display: block; font-weight: 500; }
.choice small { display: block; margin-top: 2px; font-size: 14px; color: var(--body); }

.ask-actions { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.ask-actions .btn { border: 0; font-family: inherit; cursor: pointer; }
.ask-actions .note { color: var(--faint); }
.key { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; color: var(--faint); }

.review { margin-top: 28px; border-top: 1px solid var(--line); }
.review div { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review dt { color: var(--body); }
.review dd { text-align: right; overflow-wrap: anywhere; }
.done-mark { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 26px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.side-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-link { font-size: 14px; color: rgba(255, 255, 255, .68); }
.home-link:hover { color: #fff; }
.home-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Full-screen dark welcome */
.welcome {
  --line: var(--line-strong);
  --body: var(--text-2);
  --faint: var(--ash);
  --ink: var(--text);
  background: var(--night);
  color: #fff;
}
#sideField { position: fixed; z-index: 0; inset: 0; width: 100vw; height: 100vh; }
.welcome-side { z-index: 1; background: none; }
.welcome-main { position: relative; z-index: 1; background: linear-gradient(90deg, rgba(16, 18, 23, 0), rgba(16, 18, 23, .62) 22%); }

.ask h1 { color: var(--text); }
.word { display: inline-block; opacity: 0; transform: translateY(.45em); animation: word-in .34s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes word-in { to { opacity: 1; transform: none; } }
.ask { animation-duration: .2s; }
.field input { color: #fff; border-bottom-color: rgba(255, 255, 255, .28); }
.field input::placeholder { color: rgba(255, 255, 255, .38); }
.error { color: #ff9478; }
.choice { background: color-mix(in srgb, var(--surface-2) 78%, transparent); color: var(--text); }
.choice:hover { border-color: #fff; }
.ask-actions .btn { background: var(--text); color: var(--bg); }
.ask-actions .btn:hover { background: var(--accent); color: var(--ember-ink); }
.ask-actions .btn-accent { background: var(--accent); color: var(--ember-ink); }
.ask-actions .btn-accent:hover { background: color-mix(in srgb, var(--ember) 88%, white); }
.back:hover { color: #fff; }
.welcome-top .lang { border-color: var(--line); color: var(--body); }
.welcome-top .lang:hover { border-color: #fff; color: #fff; }

@media (max-width: 900px) {
  .welcome { display: block; }
  .welcome-side { position: relative; height: auto; padding: 18px 20px 0; }
  .welcome-main { background: rgba(16, 18, 23, .35); }
  .pass, .welcome-foot { display: none; }
  .welcome-main { min-height: calc(100vh - 62px); padding: 16px 20px 20px; }
  .ask { padding: 28px 0; justify-content: flex-start; }
  .field input { font-size: 22px; }
}

@media (max-width: 520px) {
  .choices { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ask, .pass dl div { animation: none; }
  .word { opacity: 1; transform: none; animation: none; }
  .meter i, .choice { transition: none; }
}
