/* Public site: front page, registration, terms. Builds on the app tokens in app.css. */
:root {
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --lav: #f3f1fb;
  --text: #14122b;
  --text-2: #4d4868;
}

body.site { background: #fff; color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.55; }
.site a { color: inherit; }
.site :focus-visible { outline: 3px solid var(--a3); outline-offset: 3px; border-radius: 6px; }
.wrapx { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrapx { padding: 0 16px; } }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; }
.topbar .wrapx { display: flex; align-items: center; gap: 22px; height: 64px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; text-decoration: none; color: #fff !important; }
.wordmark b { color: var(--sun); }
.topnav { display: flex; gap: 20px; font-weight: 600; font-size: .95rem; }
.topnav a, .loginlink { text-decoration: none; opacity: .8; white-space: nowrap; }
.topnav a:hover, .loginlink:hover { opacity: 1; }
.loginlink { font-weight: 600; font-size: .95rem; }
.topbar .spacer { flex: 1; }
.topbar .wrapx > * { flex-shrink: 0; }
.topbar .wrapx > .spacer { flex-shrink: 1; min-width: 0; }
.topbar .btn { padding: .55em 1.1em; font-size: .95rem; text-decoration: none; white-space: nowrap; }
@media (max-width: 420px) { .topbar .btn { padding: .5em .8em; font-size: .85rem; } }
.pinlink { font-size: .85rem; opacity: .75; text-decoration: none; white-space: nowrap; }
.pinlink:hover { opacity: 1; }
.pinlink .code { font-family: var(--mono); background: rgba(255,255,255,.12); border-radius: 6px; padding: .1em .45em; margin-left: .4em; }
.sitelang { display: inline-flex; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; overflow: hidden; }
.sitelang button { border: 0; background: none; color: rgba(255,255,255,.7); font-weight: 700; padding: .3em .65em; font-size: .85rem; }
.sitelang button.on { background: rgba(255,255,255,.18); color: #fff; }
/* The top bar gives way step by step when its items do not fit on one line (fitTopbar in site.js):
   fit-1 shortens the PIN link to its "Enter PIN" chip, fit-2 hides the page links, fit-3 tightens spacing,
   fit-4 hides "Log in" (also in the footer), fit-5 hides the PIN chip (the footer has "Join a quiz"),
   fit-6 shows the language as a code ("HR"). */
.topbar.fit-1 .pinlink > span:first-child { display: none; }
.topbar.fit-1 .pinlink .code { margin-left: 0; }
.topbar.fit-2 .topnav { display: none; }
.topbar.fit-3 .wrapx { gap: 10px; }
.topbar.fit-3 .btn { padding: .5em .8em; font-size: .85rem; }
.topbar.fit-4 .loginlink { display: none; }
.topbar.fit-4 .wordmark { font-size: 1.15rem; }
.topbar.fit-5 .pinlink { display: none; }

/* ---------- hero: the big screen */
.hero { background:
    radial-gradient(900px 500px at 90% -20%, rgba(109,76,245,.42), transparent 60%),
    radial-gradient(700px 420px at -10% 120%, rgba(14,159,159,.3), transparent 60%), var(--ink);
  color: #fff; padding: 64px 0 80px; overflow: hidden; }
.hero .wrapx { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .hero .wrapx { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 40px 0 56px; } }
.hero h1 { font-family: var(--display); font-variation-settings: 'wdth' 78; font-weight: 800; font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: .98; letter-spacing: -0.02em; margin: 0 0 20px; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero .lead { font-size: 1.15rem; color: rgba(255,255,255,.8); max-width: 34ch; margin: 0 0 28px; }
.ctas { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn.big { font-size: 1.1rem; padding: .9em 1.5em; text-decoration: none; display: inline-block; }
.btn.light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); text-decoration: none; }
.fine { font-size: .9rem; color: rgba(255,255,255,.6); margin-top: 14px; }

/* the demo question */
.screen-demo { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.sd-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .8rem; color: rgba(255,255,255,.65); margin-bottom: 12px; }
.sd-q { background: #fff; color: var(--ink); border-radius: 14px; padding: 18px 20px; font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 2.3vw, 1.7rem); line-height: 1.15; text-align: center; }
.sd-mid { display: flex; justify-content: space-between; align-items: center; margin: 14px 4px; min-height: 64px; }
.ring { width: 64px; height: 64px; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: rgba(255,255,255,.12); }
.ring .fg { stroke: var(--sun); stroke-linecap: round; transition: stroke-dashoffset .95s linear, stroke .3s; }
.ring.low .fg { stroke: var(--a0); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.sd-result { font-weight: 700; text-align: right; min-height: 1.5em; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.sd-result.show { opacity: 1; transform: none; }
.sd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .sd-tiles { grid-template-columns: 1fr; } }
.tile2 { position: relative; overflow: hidden; border: 0; border-radius: 12px; background: var(--c); color: #fff; text-align: left; display: flex; align-items: center; gap: 12px;
  padding: 14px; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.25; box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); min-height: 68px;
  transition: opacity .35s, filter .35s, transform .1s; cursor: pointer; }
.tile2:hover { transform: translateY(-2px); }
.tile2:disabled { cursor: default; transform: none; }
.tile2 .letter { position: relative; z-index: 1; }
.tile2 .tx { position: relative; z-index: 1; flex: 1; }
.tile2 .pct { position: relative; z-index: 1; font-family: var(--mono); font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity .4s .3s; }
.tile2 .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255,255,255,.16); transition: width .9s cubic-bezier(.2,.9,.3,1) .15s; }
.revealed .tile2 .pct { opacity: 1; }
.revealed .tile2.wrong { opacity: .35; filter: saturate(.5); }
.revealed .tile2.right { box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 0 0 3px #fff; }
.replay { background: none; border: 0; color: rgba(255,255,255,.6); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; padding: 0; margin-top: 12px; }

/* ---------- sections */
.sec { padding: 88px 0; }
.sec.alt { background: var(--lav); }
@media (max-width: 640px) { .sec { padding: 56px 0; } }
.sec h2 { font-family: var(--display); font-variation-settings: 'wdth' 82; font-weight: 800; font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.02; letter-spacing: -0.015em; margin: 0 0 14px; }
.sec .intro { color: var(--text-2); font-size: 1.1rem; max-width: 56ch; margin: 0 0 44px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; margin-bottom: 52px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 20px; } }
.step2 h3 { font-size: 1.25rem; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.step2 h3::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--sun); font-family: var(--display); font-weight: 800; font-size: 1.05rem; flex: none; }
.step2 p { margin: 0; color: var(--text-2); }

.shots { display: grid; grid-template-columns: 1fr 240px; gap: 28px; align-items: end; }
@media (max-width: 760px) { .shots { grid-template-columns: 1fr 140px; gap: 14px; } }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 20px 60px rgba(20,18,43,.22); }
.shots .phone img { border-radius: 26px; border: 8px solid var(--ink); }
.shots figcaption { font-size: .85rem; color: var(--text-2); margin-top: 10px; }

.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 40px; }
@media (max-width: 860px) { .feats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feats { grid-template-columns: 1fr; } }
.feat h3 { font-size: 1.1rem; margin: 0 0 4px; display: flex; align-items: flex-start; gap: 10px; }
.feat h3 i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; margin-top: .4em; }
.feat p { margin: 0; color: var(--text-2); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1080px; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan h3 .size { font-family: var(--mono); font-size: .9rem; font-weight: 600; background: var(--sun); color: var(--ink); border-radius: 6px; padding: .1em .45em; vertical-align: middle; }
.plan { background: #fff; border: 1px solid #e4e0f3; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.plan.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan h3 { margin: 0; font-size: 1.3rem; }
.plan .price { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; }
.plan .price small { display: inline-block; font-size: 1rem; font-weight: 600; opacity: .7; }
.plan ul { margin: 6px 0 14px; padding-left: 1.1em; }
.plan li { margin: 4px 0; }
.plan .btn { align-self: flex-start; text-decoration: none; margin-top: auto; }
.soon { display: inline-block; font-family: var(--mono); font-size: .8rem; background: var(--sun); color: var(--ink); border-radius: 6px; padding: .15em .55em; font-weight: 600; }

.band { background: var(--sun); color: var(--ink); padding: 72px 0; }
.band .wrapx { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.band h2 { font-family: var(--display); font-variation-settings: 'wdth' 80; font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.02; margin: 0; max-width: 20ch; }
.band .btn { background: var(--ink); color: #fff; text-decoration: none; }

.foot { background: var(--ink); color: rgba(255,255,255,.7); padding: 32px 0; font-size: .9rem; }
.foot .wrapx { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }

/* ---------- forms (register) */
.formpage { min-height: calc(100vh - 64px); background: var(--lav); padding: 56px 0; }
.formcard { max-width: 460px; margin: 0 auto; background: #fff; border-radius: 20px; padding: 32px; box-shadow: 0 20px 60px rgba(20,18,43,.1); }
.formcard h1 { font-family: var(--display); font-variation-settings: 'wdth' 82; font-weight: 800; font-size: 2.2rem; line-height: 1.05; margin: 0 0 8px; }
.formcard > p { color: var(--text-2); margin: 0 0 22px; }
.formcard label.fl { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
.formcard .field { border-color: #dcd7ee; }
.formcard .field:focus { border-color: var(--a3); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.formcard .btn { width: 100%; font-size: 1.05rem; }
.formerr { color: var(--bad); font-weight: 600; min-height: 1.4em; margin: 10px 0 0; }
.formcard .alt { text-align: center; margin-top: 18px; color: var(--text-2); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- legal */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal h1 { font-family: var(--display); font-weight: 800; font-size: 2.4rem; margin: 0 0 6px; }
.legal h2 { margin-top: 40px; }
.legal p, .legal li { color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  .ring .fg, .tile2, .tile2 .fill, .tile2 .pct, .sd-result { transition: none; }
}

/* Links inherit colour on the site; yellow buttons always get dark text, the dark band button white text. */
.site a.btn:not(.light):not(.ghost) { color: var(--ink); }
.site .band a.btn.big { color: #fff; }

/* ---------- demo video */
.demo-video { margin: 0; }
.dv-frame { position: relative; border-radius: 18px; overflow: hidden; background: var(--ink); box-shadow: 0 24px 70px rgba(20,18,43,.28); }
.dv-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.dv-play { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: flex; align-items: center; gap: 14px;
  border: 0; border-radius: 99px; padding: 14px 26px 14px 14px; background: var(--sun); color: var(--ink); font: inherit; font-weight: 800;
  font-size: 1.15rem; box-shadow: 0 10px 40px rgba(0,0,0,.35); cursor: pointer; transition: transform .15s; }
.dv-play:hover { transform: scale(1.04); }
.dv-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--sun); display: grid; place-items: center; font-size: 1.1rem; padding-left: 3px; }
.dv-frame.playing .dv-play { display: none; }
.demo-video figcaption { font-size: .85rem; color: var(--text-2); margin-top: 10px; }
@media (max-width: 560px) { .dv-play { font-size: .95rem; padding: 10px 18px 10px 10px; } .dv-icon { width: 36px; height: 36px; } }
.demo-video video::cue { font-size: 0.78em; background: rgba(20, 18, 43, 0.82); }

/* ---------- language picker */
html.i18n-wait body { visibility: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.langpick select { appearance: none; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; font: inherit; font-weight: 700; font-size: .85rem;
  padding: .45em 2em .45em .8em; cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff'/%3E%3C/svg%3E") no-repeat right 10px center; }
.langpick select option { color: var(--ink); background: #fff; }

/* ---------- slideshow */
.slideshow { outline: none; margin-top: 8px; }
.ss-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--ink); box-shadow: 0 24px 70px rgba(20,18,43,.28); }
.ss-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.ss-stage img.on { opacity: 1; }
.ss-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: rgba(20,18,43,.72); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s; }
.ss-prev { left: 14px; } .ss-next { right: 14px; }
.ss-stage:hover .ss-nav, .ss-nav:focus-visible { opacity: 1; }
@media (hover: none) { .ss-nav { opacity: .85; width: 38px; height: 38px; font-size: 22px; } }
.ss-caption { display: flex; align-items: flex-start; gap: 16px; margin: 18px 0 14px; }
.ss-caption > div { flex: 1; min-height: 5.2em; }
.ss-count { font-family: var(--mono); font-size: .8rem; color: var(--text-2); }
.ss-title { margin: 2px 0 4px; font-size: 1.4rem; }
.ss-text { margin: 0; color: var(--text-2); max-width: 62ch; }
.ss-pause { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #dcd7ee; background: #fff; color: var(--ink); cursor: pointer; font-size: .8rem; }
.ss-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.ss-tab { position: relative; overflow: hidden; display: flex; gap: 8px; align-items: flex-start; text-align: left; border: 0; border-radius: 12px;
  background: var(--lav); color: var(--text-2); padding: 10px 12px 14px; font: inherit; font-size: .85rem; font-weight: 600; line-height: 1.25; cursor: pointer; }
.ss-tab b { font-family: var(--display); font-weight: 800; color: var(--ink); }
.ss-tab.on { background: var(--ink); color: #fff; }
.ss-tab.on b { color: var(--sun); }
.ss-tab i { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--sun); transform: scaleX(0); transform-origin: left; }
.ss-tab.on i { animation: ssprog var(--dur, 6000ms) linear forwards; }
.slideshow.paused .ss-tab.on i { animation: none; transform: scaleX(1); }
@keyframes ssprog { to { transform: scaleX(1); } }
@media (max-width: 760px) {
  .ss-tab { justify-content: center; padding: 10px 0 14px; }
  .ss-tab span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ss-stage img { transition: none; } }

/* Currency switch above the price cards */
.cursw { display: inline-flex; gap: 2px; padding: 4px; margin: -24px 0 28px; background: #fff; border: 1px solid #e4e0f3; border-radius: 999px; }
.cursw button { border: 0; background: none; color: var(--text-2); font: 600 .85rem/1 var(--mono); letter-spacing: .04em; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.cursw button:hover { color: var(--text); }
.cursw button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cursw button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* Phones: the language list and the start button share the top bar, also in long languages (de, el, pl). */
@media (max-width: 480px) {
  .topbar .wrapx { gap: 8px; }
  .wordmark { font-size: 1.25rem; }
  .langpick select { padding-left: .6em; padding-right: 1.6em; background-position: right 7px center; }
}

/* ---------- front page: seasonal link under the hero buttons */
.seasonal { margin: 18px 0 0; }
.seasonal a { display: inline-block; color: #fff; text-decoration: none; font-weight: 700; padding: .45em .9em; border-radius: 999px;
  background: rgba(255,207,63,.14); box-shadow: inset 0 0 0 1px rgba(255,207,63,.45); }
.seasonal a:hover { background: rgba(255,207,63,.24); }

/* ---------- ready-made quiz pages (/no/julequiz …) */
.xcard { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.xcard .xtiles { margin-top: 14px; }
.xtiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xa { display: flex; align-items: center; gap: 10px; background: var(--c); color: #fff; border-radius: 12px; padding: 10px 12px; font-weight: 700; min-height: 52px;
  transition: opacity .25s, box-shadow .25s; }
.xa .letter { flex: none; }
.xcard .xa { min-height: 64px; font-size: 1.05rem; }
.xsteps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 36px; }
.xsteps li { border-top: 4px solid var(--c); padding-top: 14px; }
.xsteps h3 { margin: 0 0 6px; font-size: 1.15rem; }
.xsteps p { margin: 0; color: var(--text-2); }
.xqhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.xqhead .intro { margin: 0; }
.xlist { margin: 0; padding: 0 0 0 1.6em; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; }
.xlist > li { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.xlist > li::marker { color: var(--text-2); }
.xq { margin: 0 0 10px; line-height: 1.25; }
.xlist .xa { font-family: inherit; font-size: .95rem; font-weight: 700; min-height: 44px; padding: 8px 10px; }
.xlist .xa .letter { width: 26px; height: 26px; font-size: .8rem; }
body.key-on .xlist .xa:not(.ok) { opacity: .28; }
body.key-on .xlist .xa.ok { box-shadow: 0 0 0 3px var(--ink); }
body.key-on .xlist .xa.ok .tx::after { content: ' ✓'; }
.xmore { margin: 40px 0 0; }
.xfaq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 36px; margin-top: 28px; }
.xfaq h3 { margin: 0 0 6px; font-size: 1.1rem; }
.xfaq p { margin: 0; color: var(--text-2); }
@media (max-width: 860px) { .xsteps, .xfaq { grid-template-columns: 1fr; } .xlist { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .xcard .xa { min-height: 52px; } .xlist { padding-left: 1.3em; } .xlist .xa { font-size: .88rem; gap: 7px; padding: 7px 8px; } }
@media print {
  .topbar, .hero, .band, .foot, .xkey, .xmore, .xsteps, .xfaq { display: none !important; }
  .xlist .xa { color: #000; background: none; box-shadow: inset 0 0 0 1px #999; }
}
