/* sim.tigc.nl — the teams' website. Built like Kelly's house slides: the sign-in is the Title layout
   (text left on paper, picture right), every step opens on a Chapter page (navy, big light-blue
   number), the story sits on paper under a short navy rule, the team's turn is the orange Discussion
   slide with its faint question mark, and the end is the navy Closing page. Laptop first; it folds to
   one column on small screens. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--s-paper); color: var(--s-ink); font-family: var(--s-font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 700; }
p { text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--s-light); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--s-muted); }
.kicker { margin: 0 0 10px; font-size: 15px; color: var(--s-muted); }
.trule--wide { width: 56px; }
.trule--light { background: var(--s-light); }
.story { font-size: 19px; line-height: 1.55; margin: 18px 0 0; max-width: 64ch; }
.q { font-size: 19px; font-weight: 700; margin: 18px 0 10px; }

.btn {
  -webkit-appearance: none; appearance: none; border: 0; border-radius: 3px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  font-size: 17px; font-weight: 700; text-decoration: none;
}
.btn--navy { background: var(--s-navy); color: #fff; }
.btn--navy:hover { background: var(--s-navy-2); }
.btn--navy:disabled { opacity: .6; cursor: default; }
.btn--ghost { background: transparent; color: var(--s-navy); border: 1.5px solid var(--s-rule); }
.btn--wide { width: 100%; }

/* ── sign-in: the Title layout ─────────────────────────────────────────── */
.title-slide { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.title-slide__text { padding: clamp(32px, 7vh, 80px) clamp(24px, 6vw, 88px); display: flex; flex-direction: column; justify-content: center; }
.title-slide__h { font-size: clamp(38px, 4.6vw, 58px); line-height: .98; letter-spacing: -.01em; margin-bottom: 22px; }
.title-slide__sub { font-size: 20px; color: var(--s-muted); margin: 0 0 36px; max-width: 34ch; }
.title-slide__art { background: var(--s-navy); position: relative; overflow: hidden; }
.valley { position: absolute; inset: 0; width: 100%; height: 100%; }
.valley__topo path { fill: none; stroke: var(--s-light); stroke-width: 1; opacity: .28; animation: drift 14s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.7s); }
@keyframes drift { to { transform: translateY(10px); } }
.valley__river { fill: none; stroke: var(--s-light); stroke-width: 5; stroke-linecap: round; opacity: .9; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: river 3.2s var(--s-ease) .3s forwards; }
@keyframes river { to { stroke-dashoffset: 0; } }
.signin { display: flex; flex-direction: column; gap: 16px; max-width: 420px; }
.signin__err { margin: 0; padding: 10px 12px; background: var(--s-red-soft); color: var(--s-red); border-radius: 3px; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 15px; color: var(--s-muted); }
.field em { font-style: normal; color: var(--s-muted); opacity: .8; }
.field select, .field input {
  -webkit-appearance: none; appearance: none; width: 100%; height: 50px; padding: 0 14px; background: #fff;
  border: 1.5px solid var(--s-rule); border-radius: 3px; font-size: 17px;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--s-ink) 50%), linear-gradient(135deg, var(--s-ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select:focus, .field input:focus { border-color: var(--s-navy); outline: none; box-shadow: 0 0 0 3px var(--s-hl); }

/* ── closing pages ─────────────────────────────────────────────────────── */
.p-closing { background: var(--s-navy); color: #fff; }
.closing { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.closing h1 { font-size: clamp(34px, 5vw, 52px); }
.closing p { font-size: 20px; max-width: 46ch; color: var(--s-light); }

/* ── the app: bar, rail ────────────────────────────────────────────────── */
.p-app { padding-bottom: 44px; }
.bar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  min-height: 60px; padding: env(safe-area-inset-top) clamp(16px, 3vw, 32px) 0; background: var(--s-navy); color: #fff;
}
.bar__team { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bar__team b { display: block; font-size: 17px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__team span { display: block; font-size: 13.5px; color: var(--s-light); }
.bar__dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .2); }
.bar__world { font-size: 17px; color: var(--s-light); white-space: nowrap; }
.bar__right { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.bar__stat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.bar__stat span { font-size: 12px; color: var(--s-light); }
.bar__stat b { font-size: 19px; font-variant-numeric: tabular-nums; }
.bar__me { -webkit-appearance: none; appearance: none; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; border-radius: 3px; height: 34px; padding: 0 12px; cursor: pointer; font-size: 14.5px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__me:hover { background: rgba(255, 255, 255, .1); }

.rail { display: flex; gap: 6px; align-items: center; padding: 12px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--s-rule); overflow-x: auto; }
.rail__step {
  -webkit-appearance: none; appearance: none; flex: none; width: 34px; height: 34px; border-radius: 3px; border: 1.5px solid var(--s-rule);
  background: transparent; color: var(--s-muted); font-weight: 700; font-size: 15px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.rail__step[disabled] { cursor: default; }
.rail__step.is-answered { background: var(--s-navy); border-color: var(--s-navy); color: #fff; }
.rail__step.is-missed { border-color: var(--s-red); color: var(--s-red); border-style: dashed; }
.rail__step.is-open { background: var(--s-orange); border-color: var(--s-orange); color: var(--s-ink); }
.rail__step:not([disabled]):hover { filter: brightness(1.12); }

.stage { max-width: 1320px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px) 64px; }

/* ── a step: the development (paper) + the team's turn (orange) ───────── */
.step { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); gap: clamp(24px, 3.5vw, 56px); align-items: start; }
.dev h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -.005em; margin-bottom: 22px; }
.dev__clip { box-shadow: 0 1px 0 var(--s-rule); }

.ask {
  position: sticky; top: 76px; background: var(--s-orange); color: var(--s-ink); padding: 26px clamp(20px, 2.4vw, 32px) 28px;
  border-radius: 2px; overflow: hidden; isolation: isolate;
}
.ask::before { content: "?"; position: absolute; z-index: -1; right: -24px; top: -110px; font-size: 460px; line-height: 1; font-weight: 700; color: var(--s-ink); opacity: .07; pointer-events: none; }
.ask__clock { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid rgba(29, 35, 48, .2); }
.ask__label { font-size: 15px; }
.ask__clock b { grid-row: span 2; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ask__bar { height: 4px; background: rgba(29, 35, 48, .15); align-self: center; }
.ask__bar i { display: block; height: 100%; background: var(--s-ink); transform-origin: left; transition: transform 250ms linear; }
.ask__note { grid-column: 1 / -1; font-size: 14px; min-height: 0; }
.ask__note:empty { display: none; }
.ask__clock.is-close b { animation: urgent 1s ease-in-out infinite; }
@keyframes urgent { 50% { opacity: .45; } }
.ask__clock.is-late { background: var(--s-red); color: #fff; margin: -26px calc(-1 * clamp(20px, 2.4vw, 32px)) 18px; padding: 18px clamp(20px, 2.4vw, 32px) 16px; border: 0; }
.ask__clock.is-late .ask__bar { background: rgba(255, 255, 255, .25); }
.ask__clock.is-late .ask__bar i { background: #fff; }
.ask__q { font-size: 23px; line-height: 1.2; margin-bottom: 16px; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  -webkit-appearance: none; appearance: none; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; text-align: left;
  width: 100%; padding: 14px 16px; background: #fff; border: 2px solid transparent; border-radius: 3px; cursor: pointer; font-size: 17px; line-height: 1.4;
  transition: border-color 150ms, transform 150ms var(--s-ease);
}
.opt:hover { border-color: rgba(35, 58, 139, .35); }
.opt:active { transform: scale(.99); }
.opt__k { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--s-rule); font-weight: 700; font-size: 15px; color: var(--s-muted); }
.opt.is-picked { border-color: var(--s-navy); box-shadow: 0 0 0 1px var(--s-navy); }
.opt.is-picked .opt__k { background: var(--s-navy); border-color: var(--s-navy); color: #fff; }

.why, .write { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.why > span, .write > span:first-child { font-size: 15px; font-weight: 700; }
.why em { font-weight: 400; font-style: normal; }
.why textarea, .write textarea { width: 100%; border: 0; border-radius: 3px; padding: 12px 14px; font-size: 17px; line-height: 1.45; background: #fff; resize: vertical; }
.write textarea { min-height: 220px; }
.why textarea:focus, .write textarea:focus { outline: 3px solid var(--s-navy); outline-offset: 0; }
.write__foot { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.write__foot em { font-style: normal; }
.write__foot b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.write__foot b.is-over { color: var(--s-red); }
.ask__typing { font-size: 14px; min-height: 20px; margin: 10px 0 4px; opacity: 0; transition: opacity 300ms; }
.ask__typing.is-on { opacity: 1; }
.ask__err { margin: 0 0 10px; padding: 9px 12px; background: var(--s-ink); color: #fff; border-radius: 3px; font-size: 15px; }

/* ── the chapter page between steps (the one orchestrated moment) ─────── */
.chapter {
  position: fixed; inset: 0; z-index: 50; background: var(--s-navy); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; padding: 0 clamp(24px, 7vw, 120px);
  clip-path: inset(100% 0 0 0);
}
.chapter.is-in { animation: ch-in 700ms var(--s-ease) forwards; }
.chapter.is-out { animation: ch-out 650ms var(--s-ease-in) forwards; }
@keyframes ch-in { to { clip-path: inset(0 0 0 0); } }
@keyframes ch-out { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 100% 0); } }
.chapter__num { font-size: clamp(120px, 17vw, 230px); line-height: .8; font-weight: 700; color: var(--s-light); font-variant-numeric: tabular-nums; }
.chapter__rule { height: 1px; background: rgba(255, 255, 255, .3); margin: 28px 0 32px; transform-origin: left; }
.chapter.is-in .chapter__num { animation: ch-num 900ms var(--s-ease) both 150ms; }
.chapter.is-in .chapter__rule { animation: ch-rule 900ms var(--s-ease) both 300ms; }
.chapter.is-in .chapter__title { animation: ch-up 800ms var(--s-ease) both 450ms; }
.chapter.is-in .chapter__when { animation: ch-up 800ms var(--s-ease) both 600ms; }
@keyframes ch-num { from { opacity: 0; transform: translateY(40px); } }
@keyframes ch-rule { from { transform: scaleX(0); } }
@keyframes ch-up { from { opacity: 0; transform: translateY(18px); } }
.chapter__title { font-size: clamp(40px, 5.6vw, 76px); line-height: 1; font-weight: 700; }
.chapter__when { margin-top: 18px; font-size: clamp(18px, 2vw, 26px); color: var(--s-light); }

/* ── after answering ───────────────────────────────────────────────────── */
.after { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); gap: clamp(24px, 3.5vw, 56px); align-items: start; }
.after h1 { font-size: clamp(34px, 3.6vw, 48px); line-height: 1; }
.after.is-missed h1 { color: var(--s-red); }
.after__next { background: var(--s-navy); color: #fff; padding: 28px 30px 32px; border-radius: 2px; position: sticky; top: 76px; }
.after__lbl { margin: 0; font-size: 16px; color: var(--s-light); }
.after__count { display: block; font-size: clamp(64px, 7vw, 96px); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 6px 0 14px; }
.after__what { margin: 0; font-size: 19px; font-weight: 700; }
.after__note { margin: 14px 0 0; color: var(--s-light); font-size: 16px; }
.answer { margin-top: 6px; }
.answer blockquote { margin: 0 0 12px; padding: 12px 16px; background: var(--s-hl); font-size: 18px; line-height: 1.5; white-space: pre-wrap; border-radius: 2px; }
.answer__why { margin: 0 0 10px; font-size: 17px; }
.answer__meta { margin: 0; font-size: 15px; color: var(--s-muted); }
.answer.is-missed { padding: 12px 16px; background: var(--s-red-soft); color: var(--s-red); border-radius: 2px; }

.stamp {
  position: fixed; left: 50%; top: 42%; z-index: 60; transform: translate(-50%, -50%) rotate(-6deg); pointer-events: none;
  border: 4px solid var(--s-teal); color: var(--s-teal); background: rgba(247, 245, 240, .94); padding: 10px 26px 12px; border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; animation: stamp 1.6s var(--s-ease) both;
}
.stamp span { font-size: 44px; font-weight: 700; line-height: 1; }
.stamp em { font-style: normal; font-size: 15px; font-weight: 700; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-6deg) scale(1.6); } 18% { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

/* ── lobby: the role briefing ──────────────────────────────────────────── */
.lobby { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.lobby h1 { font-size: clamp(38px, 4.4vw, 56px); line-height: 1; }
.lobby__team { font-size: 20px; color: var(--s-muted); margin: 8px 0 0; }
.lobby__who { font-size: 20px; font-weight: 700; margin: 22px 0 0; max-width: 56ch; }
.lobby__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 28px; }
.lobby h3 { font-size: 16px; margin: 0 0 8px; color: var(--s-navy); }
.lobby ul { margin: 0; padding-left: 20px; }
.lobby li { margin: 4px 0; }
.lobby__panel { background: var(--s-navy); color: #fff; padding: 28px 30px; border-radius: 2px; }
.lobby__panel h3 { color: var(--s-light); margin-top: 22px; }
.lobby__premise { margin: 0 0 22px; font-size: 17px; line-height: 1.55; }
.lobby__wait { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: rgba(255, 255, 255, .08); border-radius: 3px; font-weight: 700; }
.lobby__pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--s-orange); flex: none; animation: urgent 1.6s ease-in-out infinite; }
.lobby__people { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px; }
.lobby__people li { margin: 0; padding: 3px 10px; border-radius: 3px; background: rgba(255, 255, 255, .1); font-size: 15px; }
.lobby__people li.is-me { background: var(--s-light); color: var(--s-ink); }
.lobby__how { margin: 22px 0 0; font-size: 15px; color: var(--s-light); }

/* ── the end: the Closing page ─────────────────────────────────────────── */
.end__in { background: var(--s-navy); color: #fff; text-align: center; padding: clamp(40px, 8vh, 88px) 24px; border-radius: 2px; }
.end__in h1 { font-size: clamp(34px, 4.6vw, 56px); }
.end__sub { font-size: 20px; color: var(--s-light); margin: 14px auto 0; max-width: 52ch; }
.end__sub b { color: #fff; }
.end__list { list-style: none; padding: 0; margin: 36px auto 0; max-width: 860px; }
.end__list li { display: grid; grid-template-columns: 60px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--s-rule); }
.end__n { font-size: 30px; font-weight: 700; color: var(--s-light); line-height: 1; font-variant-numeric: tabular-nums; }
.end__list p { margin: 4px 0 0; }

/* ── overlays ──────────────────────────────────────────────────────────── */
.paused { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(35, 58, 139, .9); color: #fff; text-align: center; padding: 24px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.paused h2 { font-size: 48px; }
.paused p { font-size: 19px; color: var(--s-light); }
.netbar { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 45; background: var(--s-ink); color: #fff; padding: 6px 14px; border-radius: 3px; font-size: 14px; }
.ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; height: 40px; display: flex; align-items: center; background: var(--s-navy-3); color: #fff; font-size: 15px; padding-bottom: env(safe-area-inset-bottom); }
.ticker__lbl { flex: none; align-self: stretch; display: flex; align-items: center; padding: 0 14px; background: var(--s-orange); color: var(--s-ink); font-weight: 700; }
.ticker__track { flex: 1; overflow: hidden; }
.ticker__run { display: inline-flex; gap: 48px; padding-left: 24px; white-space: nowrap; animation: ticker 60s linear infinite; }
.ticker__item { display: inline-flex; align-items: center; gap: 8px; }
.ticker__item i { width: 8px; height: 8px; border-radius: 50%; }
.ticker__item b { color: var(--s-light); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.sheet { border: 0; padding: 0; border-radius: 4px; max-width: min(520px, calc(100vw - 32px)); width: 100%; color: var(--s-ink); background: var(--s-paper); }
.sheet--wide { max-width: min(760px, calc(100vw - 32px)); }
.sheet::backdrop { background: rgba(20, 34, 83, .55); }
.sheet__in { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.sheet h2 { font-size: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { -webkit-appearance: none; appearance: none; border: 1.5px solid var(--s-rule); background: #fff; border-radius: 3px; padding: 8px 14px; cursor: pointer; font-size: 16px; }
.chip.is-on, .chip:hover { border-color: var(--s-navy); }

.skipbtn {
  position: fixed; right: 16px; bottom: 56px; z-index: 30; -webkit-appearance: none; appearance: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 14px; border-radius: 3px;
  background: var(--s-ink); color: #fff; border: 2px dashed var(--s-orange); font-size: 15px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.skipbtn small { font-size: 12px; font-weight: 400; color: var(--s-orange); }
.skipbtn:disabled { opacity: .5; }

/* ── smaller screens ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .step, .after, .lobby { grid-template-columns: minmax(0, 1fr); }
  .ask, .after__next { position: relative; top: auto; }
  .title-slide { grid-template-columns: minmax(0, 1fr); }
  .title-slide__art { order: -1; height: 26vh; }
  .bar { grid-template-columns: 1fr auto; }
  .bar__world { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .story { font-size: 17.5px; }
  .bar__me { display: none; }
  .bar__right { gap: 14px; }
  .lobby__cols { grid-template-columns: minmax(0, 1fr); }
  .ask__clock b { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .chapter.is-in, .chapter.is-out, .chapter * { animation-duration: 1ms !important; animation-delay: 0ms !important; }
  .valley__topo path, .valley__river, .ticker__run, .lobby__pulse, .ask__clock.is-close b { animation: none !important; }
  .valley__river { stroke-dashoffset: 0; }
  .stamp { animation-duration: 2.2s; }
}
