/* Deadly Descent: "mountain road sign" theme. Dark asphalt, hazard yellow, rounded sign plates. */
:root {
  --asphalt: #1b1c1f;
  --asphalt-2: #24262a;
  --asphalt-3: #2f3136;
  --line: #45484e;
  --paint: #efede6;
  --muted: #b5b8be;
  --hazard: #ffc400;
  --hazard-deep: #d9a300;
  --ink: #121212;
  --crash: #ff6a3d;
  --link: #ffd54a;
  --radius: 12px;
  --wrap: 1120px;
  --head: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--paint);
  background-color: var(--asphalt);
  background-image: radial-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 5px 5px;
  font: 17px/1.7 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: var(--link); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 20; padding: .5rem .8rem; color: var(--ink); background: var(--hazard); border-radius: 6px; }

h1, h2, h3 { font-family: var(--head); font-stretch: condensed; font-weight: 800; letter-spacing: .01em; line-height: 1.15; }

/* Header with a hazard stripe on top */
.mast { border-top: 8px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--hazard) 0 12px, var(--ink) 12px 24px) 8; background: #141517; }
.mast__in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.mark { display: inline-flex; align-items: center; gap: .55rem; color: var(--paint); text-decoration: none; font-family: var(--head); font-stretch: condensed; font-weight: 800; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .03em; }
.sign { display: block; flex: none; }
.mast__nav { display: flex; gap: 1.2rem; }
.mast__nav a { color: var(--muted); font-weight: 600; text-decoration: none; }
.mast__nav a:hover, .mast__nav a:focus-visible { color: var(--hazard); }

/* Hero */
.hero { padding: 1.1rem 0 .8rem; background: linear-gradient(180deg, #26282d, transparent); }
.hero__tag { display: inline-block; margin: 0 0 .5rem; padding: .1rem .6rem; color: var(--ink); background: var(--hazard); border-radius: 4px; font-family: var(--head); font-stretch: condensed; font-weight: 800; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 3.8rem); text-transform: uppercase; }
.hero__sub { max-width: 46ch; margin: .5rem 0 0; color: var(--muted); font-size: 1.08rem; }
.hero--slim { padding-bottom: .4rem; }
.hero--slim h1 { font-size: clamp(2rem, 6vw, 3rem); }

/* Primary button: a yellow sign plate */
.go { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 46px; padding: .75rem 1.4rem; color: var(--ink); background: var(--hazard); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 0 0 3px var(--hazard), 0 10px 24px rgba(0, 0, 0, .45); font: inherit; font-family: var(--head); font-stretch: condensed; font-weight: 800; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.go:hover { background: #ffd23f; }
.go:focus-visible, .pill:focus-visible, .faq summary:focus-visible { outline: 3px solid var(--paint); outline-offset: 3px; }
.go__sign { width: .9em; height: .9em; background: var(--ink); border-radius: 2px; transform: rotate(45deg); }
.go--small { min-height: 42px; padding: .5rem 1.1rem; font-size: 1rem; box-shadow: none; }

/* Player: cover, loader and game share one 16:9 screen */
.rig { max-width: 960px; margin-top: .6rem; }
.screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0d0e10; border: 3px solid var(--hazard); border-radius: var(--radius); box-shadow: 0 0 0 5px var(--ink), 0 24px 48px rgba(0, 0, 0, .55); }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.screen__cover { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.screen__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .55)); pointer-events: none; }
.screen__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen__art { position: absolute; inset: 0; background: linear-gradient(165deg, #4a5868 0 30%, transparent 30%), linear-gradient(195deg, #39434f 0 42%, transparent 42%), linear-gradient(180deg, #2b2f35, #121315); }
.go[data-gf-play] { position: relative; z-index: 1; font-size: clamp(1.05rem, 2.8vw, 1.5rem); }
.screen__loading { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 1rem; text-align: center; background: radial-gradient(circle at 50% 40%, #2c2f35, #0d0e10 70%); }
.screen[data-gf-state] .screen__cover { display: none; }
.screen[data-gf-state="loading"] .screen__loading { display: flex; }
.screen__msg { margin: .8rem 0 0; font-family: var(--head); font-stretch: condensed; font-weight: 800; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .04em; }
.screen__hint { margin: 0; color: var(--muted); font-size: .92rem; }

/* Loader: the road keeps rolling toward you */
.road { position: relative; width: 140px; height: 96px; overflow: hidden; background: #3a3d43; clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); }
.road::before { content: ""; position: absolute; left: 50%; top: -32px; bottom: 0; width: 6px; margin-left: -3px; background: repeating-linear-gradient(180deg, var(--hazard) 0 16px, transparent 16px 32px); animation: roll .55s linear infinite; }
@keyframes roll { to { transform: translateY(32px); } }

/* Like / share / fullscreen */
.dash { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1.1rem 0 .6rem; }
.pill { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .45rem 1rem; color: var(--paint); background: var(--asphalt-3); border: 2px solid var(--line); border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.pill:hover { border-color: var(--hazard); }
.pill svg { width: 19px; height: 19px; fill: currentColor; }
.pill[data-gf-liked], .pill[aria-pressed="true"] { color: var(--ink); background: var(--hazard); border-color: var(--hazard); }
.pill__n:empty { display: none; }
.pill--wide { margin-left: auto; }
.dash__msg { color: var(--hazard); font-weight: 600; font-size: .92rem; }

.byline { margin: .4rem 0 0; color: var(--muted); font-size: .95rem; }
.byline b { color: var(--paint); }
.byline__dot { display: inline-block; width: .6em; height: .6em; margin: 0 .55em .08em .1em; background: var(--hazard); border-radius: 2px; transform: rotate(45deg); }

/* Guide + road card */
.split { margin-top: 2.4rem; }
.guide h2 { margin: 2.4rem 0 .7rem; font-size: 1.9rem; text-transform: uppercase; }
.guide h2:first-child { margin-top: 0; }
.guide h2::before { content: ""; display: inline-block; width: .55em; height: .55em; margin: 0 .55em .12em .1em; background: var(--hazard); border-radius: 2px; transform: rotate(45deg); }
.guide h3 { margin: 1.6rem 0 .4rem; color: var(--hazard); font-size: 1.3rem; text-transform: uppercase; }
.guide p, .guide li { max-width: 68ch; }
.guide ol, .guide ul { padding-left: 1.4rem; }
.guide li { margin: .35rem 0; }
.guide li::marker { color: var(--hazard); font-weight: 800; }
.guide strong { color: #fff; }

.card { margin-top: 2rem; overflow: hidden; background: var(--asphalt-2); border: 1px solid var(--line); border-radius: var(--radius); }
.card__title { margin: 0; padding: .7rem 1rem .6rem; color: var(--ink); background: var(--hazard); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em; }
.card__list { margin: 0; padding: .4rem 1rem 1rem; }
.card__row { padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.card__row:last-child { border-bottom: 0; }
.card dt { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.card dd { margin: .1rem 0 0; }

@media (min-width: 1000px) {
  .split { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 2.6rem; align-items: start; }
  .card { position: sticky; top: 1.2rem; margin-top: .3rem; }
}

/* FAQ: folding questions, numbered like roadside marker posts */
.faq { margin-top: 3rem; }
.faq h2 { margin: 0 0 1rem; font-size: 1.9rem; text-transform: uppercase; }
.faq__item { margin: .7rem 0; background: var(--asphalt-2); border: 1px solid var(--line); border-left: 6px solid var(--hazard); border-radius: 10px; }
.faq summary { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; list-style: none; cursor: pointer; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--hazard); font-size: 1.4rem; line-height: 1; }
.faq__item[open] summary::after { content: "\2013"; }
.faq__post { flex: none; min-width: 2.1em; padding: .1rem .3rem; color: var(--ink); background: var(--paint); border-radius: 4px 4px 1px 1px; border-bottom: 4px solid #2d7d46; font-family: var(--head); font-stretch: condensed; font-weight: 800; text-align: center; }
.faq__a { padding: 0 1rem .9rem 1rem; }
.faq__a p { margin: 0; color: var(--muted); }

/* Comments: loaded by script, never part of the page text */
.talk { margin: 3rem auto 3.4rem; }
.talk h2 { margin: 0 0 1rem; font-size: 1.9rem; text-transform: uppercase; }
.talk__n:empty { display: none; }
.talk__list { display: grid; gap: .8rem; margin-top: 1rem; }
.talk__list[data-gf-empty]::before { content: "No runs reported yet. Which track wrecked you first? Share your best distance or a line that works."; color: var(--muted); }
.talk__list[data-gf-off]::before { content: "Comments are closed."; color: var(--muted); }
.msg { padding: .8rem 1rem; background: var(--asphalt-2); border: 1px solid var(--line); border-radius: 10px; }
.msg[data-gf-owner] { border-color: var(--hazard); }
.msg__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; margin: 0; font-size: .9rem; }
.msg__who { font-weight: 700; }
.msg__badge { display: none; padding: 0 .4rem; color: var(--ink); background: var(--hazard); border-radius: 4px; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.msg[data-gf-owner] > .msg__meta > .msg__badge { display: inline-block; }
.msg__when { color: var(--muted); }
.msg__body { margin: .3rem 0; }
.msg__to { color: var(--hazard); font-weight: 700; }
.msg__to:empty { display: none; }
.msg__reply { padding: 0; color: var(--link); background: none; border: 0; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.msg__thread { display: grid; gap: .6rem; margin: .6rem 0 0 .8rem; padding-left: .8rem; border-left: 3px dashed var(--line); }
.msg__thread:empty { display: none; }
.post { display: grid; gap: .6rem; padding: 1rem; background: var(--asphalt-2); border: 1px solid var(--line); border-radius: 10px; }
.post textarea, .post input { width: 100%; padding: .65rem .8rem; color: var(--paint); background: #141517; border: 2px solid var(--line); border-radius: 8px; font: inherit; }
.post textarea:focus, .post input:focus { border-color: var(--hazard); outline: none; }
.post__row { display: flex; flex-wrap: wrap; gap: .6rem; }
.post__row input { flex: 1 1 200px; width: auto; }
.post [data-gf-reply-cancel] { display: none; }
.post[data-gf-replying] [data-gf-reply-cancel] { display: inline-flex; }
.post__to, .post__msg { margin: 0; color: var(--hazard); font-weight: 600; }
.post__to:empty, .post__msg:empty { display: none; }

/* Plain pages */
.sheet { max-width: 820px; margin-top: 1rem; margin-bottom: 3rem; }
.sheet h2 { margin: 2rem 0 .5rem; font-size: 1.5rem; text-transform: uppercase; }
.sheet h2::before { content: ""; display: inline-block; width: .5em; height: .5em; margin: 0 .5em .1em 0; background: var(--hazard); border-radius: 2px; transform: rotate(45deg); }
.sheet li { margin: .3rem 0; }
.sheet__back { margin-top: 2.4rem; font-weight: 700; }

/* Footer */
.base { padding: 2rem 0 1.4rem; background: #121315; border-top: 8px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--hazard) 0 12px, var(--ink) 12px 24px) 8; }
.base__in { display: grid; gap: 1.2rem; }
.base__mark { display: flex; align-items: center; gap: .5rem; margin: 0; font-family: var(--head); font-stretch: condensed; font-weight: 800; font-size: 1.2rem; text-transform: uppercase; }
.base__note { max-width: 60ch; margin: .6rem 0 0; color: var(--muted); font-size: .9rem; }
.base__nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-content: start; }
.base__nav a { color: var(--paint); }
.base__copy { margin-top: 1.4rem; color: var(--muted); font-size: .85rem; }
@media (min-width: 760px) {
  .base__in { grid-template-columns: 1fr auto; }
}

/* Phones: the player spans the full screen width */
@media (max-width: 640px) {
  .rig.wrap { padding: 0; }
  .screen { border-left: 0; border-right: 0; border-radius: 0; box-shadow: 0 0 0 0 transparent, 0 16px 32px rgba(0, 0, 0, .5); }
  .dash, .byline { margin-left: 16px; margin-right: 16px; }
  .pill--wide { margin-left: 0; }
  .mast__nav { gap: .9rem; font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
