@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-900.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --paper: #fff7e8;
  --ink: #26251f;
  --orange: #bc3d22;
  --yellow: #ffcf4f;
  --soft: #f6e9d5;
  --line: #ded0b9;
  --heading: "Barlow Condensed", Impact, "Liberation Sans Narrow", sans-serif;
  --body: "DM Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 500 1rem/1.5 var(--body); }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #a13119; outline-offset: 4px; }
.wrap { width: min(1192px, calc(100% - 80px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.nav { height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { display: inline-flex; align-items: center; width: fit-content; gap: 9px; font: 800 1.62rem/.9 var(--heading); letter-spacing: .015em; white-space: nowrap; }
.brand > span:last-child { color: var(--orange); margin-left: -9px; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border: 1.5px solid var(--ink); border-radius: 5px; background: var(--yellow); transform: rotate(-7deg); }
.brand-mark i { display:block; width: 12px; height: 17px; border-inline: 2px solid; transform: skewX(-14deg); position: relative; }
.brand-mark i::after { content: ""; position: absolute; height: 17px; border-left: 1px dashed; inset-inline-start: 3px; }
.nav nav { display: flex; align-items: center; gap: 35px; font-size: .91rem; font-weight: 750; }
.nav nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.button { border: 1.5px solid var(--ink); border-radius: 6px; color: var(--ink); background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); padding: 8px 16px; font-weight: 800; font-size: .93rem; }
.button:hover { background: #ffdb76; }
.button:active { transform: translate(2px,2px); box-shadow: none; }
.share-icon { display: inline-block; position: relative; width: 13px; height: 12px; margin-right: 5px; vertical-align: -1px; border: 1.5px solid; border-top: 0; border-radius: 2px; }
.share-icon::before { content: ""; width: 5px; height: 5px; position: absolute; top: -3px; left: 2px; border-top: 1.5px solid; border-left: 1.5px solid; transform: rotate(45deg); }
.share-icon::after { content: ""; height: 9px; border-left: 1.5px solid; position: absolute; top: -3px; left: 4.5px; }
.nav .share-button { justify-self: end; }
.hero { display: grid; grid-template-columns: 1fr 305px; padding-block: 39px 34px; align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 11px; font-size: .84rem; letter-spacing: .115em; font-weight: 800; margin: 0 0 14px; }
.mini-stripes { width: 29px; height: 11px; background: repeating-linear-gradient(123deg,var(--orange) 0 4px,transparent 4px 8px); }
.hero h1 { font: 900 clamp(5rem, 8.85vw, 8.25rem)/.79 var(--heading); letter-spacing: -.02em; margin: 0; }
.hero h1 em { color: var(--orange); font-style: normal; }
.intro { font-size: 1.15rem; line-height: 1.43; max-width: 460px; margin: 18px 0 0; }
.sign-art { width: 275px; height: 234px; align-self: center; position: relative; justify-self: center; }
.sign { position: absolute; left: 65px; top: 8px; width: 145px; height: 183px; border: 3px solid var(--ink); border-radius: 8px; background: #fffdf6; transform: rotate(-6deg); box-shadow: 5px 5px 0 var(--ink); }
.sign::after { content: ""; position: absolute; inset: 5px; border: 2px solid var(--ink); border-radius: 3px; pointer-events: none; }
.sign-face { position: absolute; inset: 16px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font: 800 1.25rem/1.08 var(--body); letter-spacing: .035em; }
.sign-face span { display: block; margin-top: 7px; font-size: 1.47rem; line-height: 1.04; }
.orbit { position: absolute; top: 50px; left: 9px; width: 262px; height: 105px; border: 1px dashed #a77854; border-radius: 50%; transform: rotate(-23deg); }
.spark { position: absolute; font-size: 1.7rem; color: var(--orange); line-height: 1; }
.spark-one { top: 17px; right: 14px; }
.spark-two { bottom: 48px; left: 8px; }
.sign-label { position: absolute; left: 44px; bottom: 8px; background: var(--ink); color: var(--paper); padding: 4px 13px; transform: rotate(-6deg); font-size: .76rem; letter-spacing: .12em; font-weight: 800; white-space: nowrap; }
.games { display: grid; gap: 72px; }
.scenario { scroll-margin-top: 20px; }
.scenario-heading { margin: 0 0 18px; }
.scenario-heading h2 { font: 800 clamp(2.7rem, 4.5vw, 4rem)/.95 var(--heading); margin: 0; text-wrap: balance; }
.game { background: #fffaf0; border: 2px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--ink); overflow: hidden; scroll-margin-top: 15px; }
.game-top { min-height: 45px; padding: 8px 17px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: space-between; font-size: .8rem; letter-spacing: .12em; font-weight: 800; }
.game-top p { margin: 0; }
.active-light { display: inline-block; vertical-align: 1px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); margin-right: 7px; }
.steps, #progress-bars { display: flex; align-items: center; gap: 8px; }
#progress-bars { gap: 4px; }
#progress-bars i { width: 15px; height: 4px; border-radius: 1px; background: #686255; }
#progress-bars i.current { background: var(--yellow); }
.game-body { display: grid; grid-template-columns: minmax(0, 1.94fr) minmax(0, 1fr); }
.simulation { min-width: 0; background: #32312b; border-right: 2px solid var(--ink); display: flex; flex-direction: column; }
.road { position: relative; flex: 1; min-height: 354px; isolation: isolate; overflow: hidden; background: #514e45; }
canvas, .pins { position: absolute; width: 100%; height: 100%; inset: 0; }
.pins { pointer-events: none; }
.pin { position: absolute; transform: translate(-50%,-50%); width: 29px; height: 29px; border-radius: 50%; border: 2px solid #25231e; background: var(--car); color: #22211c; font: 800 .92rem/1 var(--body); pointer-events: auto; box-shadow: 1px 2px 0 #1b1a16; }
.pin::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.pin:hover, .pin.active { outline: 2px solid white; outline-offset: 2px; }
.road-tag { position: absolute; inset: 12px auto auto 12px; border-radius: 3px; background: #26251fe8; color: #fff7e8; font: 800 .68rem/1 var(--body); letter-spacing: .1em; padding: 6px 8px; pointer-events: none; }
.direction { inset: auto 12px 12px auto; }
.sim-controls { display: flex; align-items: center; gap: 10px; min-height: 51px; padding: 7px 12px; background: #302f29; border-top: 1px solid #1f1e19; }
.sim-controls button { display: inline-flex; gap: 7px; align-items: center; min-height: 34px; border: 1px solid #686356; border-radius: 4px; background: transparent; color: var(--paper); padding: 4px 10px; font-size: .85rem; }
.sim-controls button:hover { background: #49463d; }
.sim-controls button:focus-visible { outline-color: var(--yellow); }
.sim-controls [data-id="fix"] { margin-left: auto; color: var(--yellow); border-color: #af914e; font-weight: 800; }
.play-icon { display: inline-block; width: 9px; height: 11px; border-inline: 3px solid currentColor; }
.play-icon.paused { height: 0; width: 0; border: 6px solid transparent; border-right: 0; border-left: 9px solid currentColor; }
.replay-icon { font-size: 1.2em; line-height: 1; }
.prompt { padding: 22px 24px 19px; }
.case { color: var(--orange); font-size: .75rem; font-weight: 800; letter-spacing: .115em; margin: 0 0 5px; }

.description { margin: 0 0 17px; line-height: 1.43; max-width: 34ch; }
.prompt h3 { font-size: 1rem; margin: 0 0 8px; font-weight: 800; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.choice { text-align: left; display: flex; align-items: center; gap: 7px; color: var(--ink); background: #fffdf6; border: 1px solid #d3c6ae; border-radius: 5px; padding: 5px 7px; min-height: 40px; font-size: .9rem; font-weight: 750; }
.choice:not(:disabled):hover { border-color: var(--ink); background: #ffe5ab; }
.choice:disabled { cursor: default; opacity: 1; }
.choice.answer-correct { outline: 2px solid #357349; outline-offset: -2px; }
.choice.answer-wrong { border: 2px solid #a83d32; background: #fbe2da; }
.choice.shake { animation: choice-shake .36s ease-in-out; }
@keyframes choice-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.choice.all { grid-column: 1 / -1; }
.choice .letter { flex: 0 0 23px; display: grid; place-items: center; height: 23px; width: 23px; background: var(--car, #ebe1cc); border: 1px solid #24231f; border-radius: 4px; font-size: .77rem; }
.response { font-size: .91rem; line-height: 1.43; }
.response:not(:empty) { padding-top: 12px; }
.response strong { display: block; font-weight: 850; }
.response-icon { display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; margin-right: .4em; border-radius: 50%; color: white; font-size: .85em; line-height: 1; vertical-align: .05em; }
.response-icon.correct { background: #357349; }
.response-icon.incorrect { background: #a83d32; }
.final-result { margin-top: 72px; padding: 30px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 40%); align-items: center; gap: 28px; }
.final-result[hidden] { display: none; }
.verdict-image { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border: 2px solid var(--ink); border-radius: 7px; box-shadow: 4px 4px 0 var(--ink); }
@media (max-width: 700px) { .final-result { grid-template-columns: 1fr; gap: 22px; padding: 22px; } .verdict-image { grid-row: 1; } }
.final-result h2 { font: 800 clamp(2.8rem, 5vw, 4.5rem)/.98 var(--heading); margin: 0 0 10px; }
.final-result p:not(.case):not(.share-status) { margin: 6px 0; }
.final-result .share-result { background: var(--paper); }
.share-result { margin-top: 12px; }
.share-status { font-size: .85rem; margin: 6px 0 0; }
.share-status:empty { display: none; }
.share-fallback { display: block; width: 100%; min-height: 90px; margin-top: 6px; font: inherit; }
.next { margin-top: 11px; }
.scene-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); background: var(--soft); }
.scene-tabs button { text-align: left; border: 0; border-right: 1px solid #cdbfa9; padding: 11px 13px; background: transparent; color: var(--ink); font-weight: 750; min-height: 46px; font-size: .86rem; }
.scene-tabs button:last-child { border-right: 0; }
.scene-tabs button:hover { background: #fbe3a8; }
.scene-tabs button[aria-pressed="true"] { background: var(--yellow); }
.scene-tabs button:focus-visible { outline-offset: -4px; }
.rules { padding-block: 66px 54px; }
.rules h2, .share-band h2, dialog h2 { font: 800 clamp(2.5rem, 4.4vw, 4rem)/.98 var(--heading); margin: 0 0 22px; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); border-block: 1px solid var(--line); }
.rule-grid article { padding: 18px 16px; border-inline-start: 1px solid var(--line); }
.rule-grid article:first-child { border-inline-start: 0; padding-inline-start: 0; }
.rule-grid article span { color: var(--orange); font-weight: 800; font-size: 1.6rem; line-height: 1; }
.rule-grid h3 { font: 800 1.65rem/1 var(--heading); margin: 7px 0; }
.rule-grid p, .note { margin: 0; }
.note { margin-top: 12px; font-size: .85rem; color: #625847; }
.share-band { background: var(--yellow); border-block: 2px solid var(--ink); }
.share-inner { padding-block: 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.share-band h2 { margin: 0; }
.share-band .button { background: var(--paper); white-space: nowrap; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.site-footer p { margin: 0; font-size: .87rem; }
dialog { width: min(460px, calc(100% - 28px)); padding: 24px; border: 2px solid var(--ink); border-radius: 9px; background: var(--paper); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
dialog::backdrop { background: #25231ca8; }
dialog h2 { font-size: 2.5rem; margin-bottom: 12px; }
.dialog-close { float: right; background: transparent; border: 0; font-size: 1.6rem; line-height: 1; }
.share-field { display: flex; gap: 7px; }
.share-field input { min-width: 0; flex: 1; padding: 6px 9px; border: 1px solid var(--ink); border-radius: 4px; background: #fffefa; }
#copy-status { margin: 7px 0 0; min-height: 1.5em; }
@media (max-width: 950px) {
  .wrap { width: calc(100% - 50px); }
  .game-body { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  .prompt { padding-inline: 15px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 30px); }
  .nav { height: 60px; grid-template-columns: 1fr auto; }
  .nav nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-block: 28px 23px; }
  .hero h1 { font-size: clamp(4.7rem, 13vw, 6.8rem); }
  .intro { font-size: 1rem; margin-top: 14px; }
  .sign-art { display: none; }
  .game-body { display: block; }
  .simulation { border-right: 0; border-bottom: 2px solid var(--ink); }
  .road { min-height: 267px; }
  .prompt { padding: 17px 15px; }
  .games { gap: 52px; }
  .scenario-heading h2 { font-size: 2.65rem; }
  .scene-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scene-tabs button:nth-child(-n+2) { border-bottom: 1px solid #cdbfa9; }
  .scene-tabs button:nth-child(2) { border-right: 0; }
  .rules { padding-block: 48px 32px; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule-grid article { border-inline-start: 0; padding-inline: 0; }
  .rule-grid article + article { border-top: 1px solid var(--line); }
  .share-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .choice.shake { animation: none; } }
