/* GP2 Revival: British racing green, gold and black, after Grand Prix 2's menus.
   GP2's menus: a title bar across the top, bevelled panels inside a stippled see-through frame,
   white label lines with the values in yellow, push buttons with a raised bevel, duotone photos behind. */

@font-face { font-family: "Days One"; src: url("../fonts/days-one-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "VT323"; src: url("../fonts/vt323-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;

  /* British racing green */
  --brg-950: #00140b;
  --brg-900: #001c10;
  --brg-850: #002415;
  --brg-800: #002e1a;
  --brg: #004225;
  --brg-600: #0b5634;
  --brg-500: #1d6d47;
  --brg-400: #3d8a63;
  --mint: #c4dcb6;

  /* Gold */
  --gold-100: #fbefc4;
  --gold-200: #f3dc8a;
  --gold-300: #e8c766;
  --gold: #d4af37;
  --gold-500: #b8922a;
  --gold-600: #8c6c1c;
  --gold-700: #5e4812;

  /* Black */
  --black: #050706;
  --ink: #0b130e;

  --text: #eef2ea;
  --text-dim: #b7c9bb;
  --text-faint: #86a190;

  /* GP2's bevels: light from the top left */
  --panel: #054a2d;
  --bevel-hi: #4f9169;
  --bevel-lo: #00150b;
  --frame-tint: rgb(196 220 182 / 0.09);
  --frame-dot: rgb(196 220 182 / 0.11);

  --hud-h: 44px;
  --gutter: 16px;
  --wrap: 1180px;

  --f-display: "Days One", "Arial Black", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-label: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --f-hud: "VT323", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hud-h) + 12px); -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--brg-950);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, ul, figure { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }
a { color: var(--gold-300); text-underline-offset: 0.18em; }
a:hover { color: var(--gold-200); }
strong { font-weight: 600; color: var(--gold-200); }
.gold { color: var(--gold-300); }
/* A bullet list in an edited text (the editor's • List): spans, as the texts are <p>s (lib/content.php) */
.bullets { display: grid; gap: 0.3em; margin-block: 0.35em; }
.bullet { display: block; position: relative; padding-left: 1.6em; }
.bullet::before {
  content: ""; position: absolute; left: 0.15em; top: 0.5em;
  width: 0.62em; height: 0.62em;
  background: linear-gradient(var(--gold-200), var(--gold-500));
  border: 2px solid; border-color: var(--gold-100) var(--gold-700) var(--gold-700) var(--gold-100);
}

:focus-visible { outline: 2px dashed var(--gold-300); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

kbd {
  font: inherit;
  font-family: var(--f-hud);
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  padding: 8px 14px; background: var(--gold); color: var(--ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* ---------- The HUD strip (gp2r3d's top bar) ---------- */

.hud {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  height: var(--hud-h);
  padding-inline: var(--gutter);
  background: rgb(3 8 5 / 0.88);
  border-bottom: 1px solid var(--gold-700);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--f-hud);
  font-size: 1.45rem;
  line-height: 1;
  text-transform: uppercase;
}
.hud-brand { color: var(--gold-300); text-decoration: none; white-space: nowrap; letter-spacing: 0.02em; }
.hud-brand:hover { color: var(--gold-200); }
.hud-brand-sub { color: var(--gold-500); }
.hud-nav { display: flex; gap: 4px; margin-left: auto; }
.hud-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 9px;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.hud-nav a kbd { color: var(--gold-300); }
.hud-nav a:hover { background: rgb(212 175 55 / 0.14); color: var(--text); }
.hud-nav a[aria-current="true"] { background: var(--gold); color: var(--ink); }
.hud-nav a[aria-current="true"] kbd { color: var(--ink); }
.hud-menu {
  display: none;
  align-items: center; gap: 8px;
  margin-left: auto;
  padding: 5px 10px;
  border: 0; background: none; color: var(--text);
  font: inherit; text-transform: inherit; cursor: pointer;
}
.hud-menu kbd { color: var(--gold-300); }
.hud-menu:hover { background: rgb(212 175 55 / 0.14); }
.hud-fps { color: var(--text); white-space: nowrap; }
.hud-fps b { display: inline-block; min-width: 2.2ch; text-align: right; font-weight: 400; color: var(--gold-200); }

.js .hud-menu { display: inline-flex; }
@media (max-width: 960px) {
  .js .hud-nav { display: none; }
  .no-js .hud { height: auto; flex-wrap: wrap; padding-block: 6px; }
}
@media (min-width: 961px) { .js .hud-menu { margin-left: 0; } }
/* Eight links with the name in full need about 1300 pixels: below that the name is short, and below about 1080 the
   frame counter goes */
@media (min-width: 961px) and (max-width: 1299px) {
  .hud { gap: 14px; }
  .hud-brand-sub { display: none; }
  .hud-nav { gap: 2px; }
  .hud-nav a { padding-inline: 7px; }
}
@media (min-width: 961px) and (max-width: 1079px) { .hud { gap: 8px; } .hud-fps { display: none; } }
@media (max-width: 480px) { .hud-brand-sub { display: none; } .hud { gap: 12px; font-size: 1.3rem; } }

/* ---------- Frames, panels and buttons (GP2's dialogs) ---------- */

.frame {
  display: block;
  padding: 12px;
  background-color: var(--frame-tint);
  background-image: conic-gradient(var(--frame-dot) 25%, transparent 0 50%, var(--frame-dot) 0 75%, transparent 0);
  background-size: 4px 4px;
  border: 2px solid;
  border-color: rgb(255 255 255 / 0.22) rgb(0 0 0 / 0.5) rgb(0 0 0 / 0.5) rgb(255 255 255 / 0.22);
}

.panel {
  position: relative;
  background: var(--panel);
  border: 3px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  box-shadow: inset 1px 1px 0 rgb(255 255 255 / 0.07), inset -1px -1px 0 rgb(0 0 0 / 0.25), 0 6px 18px rgb(0 0 0 / 0.35);
  padding: clamp(18px, 3vw, 32px);
}

.panel-title {
  margin-bottom: 0.7em;
  font: 400 1.2rem/1.2 var(--f-display);
  color: var(--gold-300);
  text-shadow: 1px 1px 0 #000;
}

.frame-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 9.5rem; min-height: 46px;
  padding: 0.45em 1.5em;
  font: 600 1.15rem/1 var(--f-label);
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  color: var(--text);
  background: linear-gradient(var(--brg-600), var(--brg));
  border: 3px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  text-shadow: 1px 1px 0 rgb(0 0 0 / 0.6);
  cursor: pointer;
  user-select: none;
}
.btn:hover { color: #fff; background: linear-gradient(var(--brg-500), var(--brg-600)); }
.btn:active { border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo); transform: translate(1px, 1px); }
.btn-gold {
  color: var(--ink);
  background: linear-gradient(var(--gold-200), var(--gold) 55%, var(--gold-500));
  border-color: var(--gold-100) var(--gold-700) var(--gold-700) var(--gold-100);
  text-shadow: 0 1px 0 rgb(255 240 190 / 0.5);
}
.btn-gold:hover { color: #000; background: linear-gradient(var(--gold-100), var(--gold-300) 55%, var(--gold)); }
.btn-gold:active { border-color: var(--gold-700) var(--gold-100) var(--gold-100) var(--gold-700); }
.btn-disabled, .btn-disabled:hover {
  color: var(--text-faint); background: var(--brg-800); cursor: default;
  border-color: var(--brg-600) var(--bevel-lo) var(--bevel-lo) var(--brg-600);
  transform: none;
}

/* The dialog text: label lines in white, values in gold, the 1px shadow and wide word spacing of GP2's font */
.dialog { text-align: center; word-spacing: 0.18em; text-shadow: 1px 1px 0 rgb(0 0 0 / 0.75); }
.dialog > * + * { margin-top: 0.15em; }
.dl-label { color: var(--text); font-size: 1.1rem; font-weight: 500; }
.dl-label:not(:first-child) { margin-top: 1.1em; }
.dl-caps { font-family: var(--f-label); font-size: 1.05rem; letter-spacing: 0.22em; word-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.dl-gold { color: var(--gold-300); font-size: 1.3rem; font-weight: 500; line-height: 1.3; }
.dl-big { font-size: clamp(1.45rem, 1rem + 1.8vw, 2.1rem); font-weight: 600; }
.dl-text { color: var(--text); font-size: 1.1rem; }
.dl-gap { margin-top: 1.2em !important; }


/* ---------- Duotone backgrounds (GP2's green menu photos), or full colour ---------- */

.duo-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--brg-900); }
.duo-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 62% 50%;
  transition: opacity 0.6s ease;
}
.duo-bg .duo-classic { image-rendering: pixelated; }
[data-look="classic"] .duo-revival, [data-look="revival"] .duo-classic { opacity: 0; }
.duo-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, transparent 35%, rgb(0 12 6 / 0.55) 100%),
    linear-gradient(to bottom, rgb(0 0 0 / 0.2), transparent 25%, transparent 65%, rgb(0 12 6 / 0.85));
}
.duo-dim::after { background: rgb(0 14 7 / 0.55); }

/* ---------- Hero ---------- */

.hero {
  position: relative; isolation: isolate;
  display: grid; grid-template-rows: auto 1fr auto;
  min-height: calc(100svh - var(--hud-h));
}

/* GP2's title bar: across the top, the ends cut at an angle */
.titlebar {
  --cut: clamp(18px, 4vw, 52px);
  margin-inline: clamp(0px, 3vw, 48px);
  padding: 10px calc(var(--cut) + 12px) 12px;
  background: linear-gradient(180deg, var(--gold-100) 0%, var(--gold-300) 16%, var(--gold) 55%, var(--gold-600) 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, var(--cut) 100%);
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.25);
  text-align: center;
}
.wordmark {
  font: 400 clamp(1.9rem, 1rem + 3.6vw, 3.4rem)/1.05 var(--f-display);
  letter-spacing: 0.03em;
  color: var(--brg-950);
  text-shadow: 0 1px 0 rgb(255 245 205 / 0.65), 0 -1px 0 rgb(80 60 10 / 0.35);
}

.hero-center { display: grid; place-items: center; padding: clamp(24px, 6vh, 72px) var(--gutter); }
.hero-frame { width: min(100%, 760px); }
.hero-frame .panel { padding-block: clamp(22px, 4vw, 40px); }
/* Four buttons (Download free, Buy full version, Patreon, YouTube): in one row, two by two on a phone */
.hero-frame .frame-buttons .btn { min-width: 0; padding-inline: 1em; text-align: center; }
@media (max-width: 560px) {
  .hero-frame .frame-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .hero-frame .frame-buttons .btn { padding-inline: 0.4em; font-size: 0.95rem; letter-spacing: 0.06em; }
}

/* Dev blog, with a "New!" sticker over its corner: a gold starburst, tilted, that gives a little nudge now and then
   (still when the visitor asks for less motion). Emptying its text in the editor leaves it out. Not on the page since
   2026-10-27 (the hero's Buy full version took its place); kept for a sticker on another button. */
.btn-blog { position: relative; padding-inline: 1.1em 2.1em; }
.btn-new {
  position: absolute; top: -27px; right: -27px; z-index: 1;
  display: grid; place-items: center;
  width: 60px; height: 60px; padding: 0 0 2px;
  font: 400 0.8rem/1 var(--f-display); letter-spacing: 0.02em; word-spacing: 0; text-transform: uppercase;
  color: var(--brg-950); text-shadow: 0 1px 0 rgb(255 245 205 / 0.65);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fbefc4'/%3E%3Cstop offset='.3' stop-color='%23e8c766'/%3E%3Cstop offset='.68' stop-color='%23d4af37'/%3E%3Cstop offset='1' stop-color='%23b8922a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points='50 2 58.6 12.5 70.8 6.8 74 19.9 87.5 20.1 84.7 33.3 96.8 39.3 88.5 50 96.8 60.7 84.7 66.7 87.5 79.9 74 80.1 70.8 93.2 58.6 87.5 50 98 41.4 87.5 29.2 93.2 26 80.1 12.5 79.9 15.3 66.7 3.2 60.7 11.5 50 3.2 39.3 15.3 33.3 12.5 20.1 26 19.9 29.2 6.8 41.4 12.5' fill='url(%23g)' stroke='%235e4812' stroke-width='3.5' stroke-linejoin='round'/%3E%3Ccircle cx='50' cy='50' r='33' fill='none' stroke='%23fbefc4' stroke-opacity='.55' stroke-width='1.5'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(1px 2px 2px rgb(0 0 0 / 0.6));
  transform: rotate(14deg);
  animation: btn-new 4.5s ease-in-out 1.5s infinite;
}
@keyframes btn-new {
  0%, 84%, 100% { transform: rotate(14deg) scale(1); }
  89% { transform: rotate(2deg) scale(1.14); }
  94% { transform: rotate(20deg) scale(1.05); }
}
@media (max-width: 560px) {
  .hero-frame .frame-buttons .btn-blog { padding-inline: 0.3em 1.6em; }
  .btn-new { top: -18px; right: -15px; width: 50px; height: 50px; font-size: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) { .btn-new { animation: none; } }

.hero-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding: 12px var(--gutter) 16px;
}

.keys {
  display: flex; flex-wrap: wrap; gap: 4px 28px;
  font: 400 1.35rem/1.1 var(--f-hud);
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 1px 1px 0 #000;
}
.keys b { font-weight: 400; color: var(--gold-300); margin-right: 0.35em; }
.no-js .keys { display: none; }

.look-switch {
  display: inline-flex; align-items: center;
  font: 400 1.3rem/1 var(--f-hud); text-transform: uppercase;
  background: rgb(0 0 0 / 0.55);
  border: 2px solid; border-color: rgb(255 255 255 / 0.2) rgb(0 0 0 / 0.6) rgb(0 0 0 / 0.6) rgb(255 255 255 / 0.2);
}
.look-label { padding: 0 10px; color: var(--text-dim); }
.look-switch button {
  padding: 8px 12px; min-height: 40px;
  font: inherit; text-transform: inherit;
  color: var(--text); background: transparent; border: 0; cursor: pointer;
}
.look-switch button:hover { background: rgb(212 175 55 / 0.15); }
.look-switch button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.no-js .look-switch { display: none; }

/* Black and gold chequers between parts of the page */
.chequer {
  height: 12px;
  background: conic-gradient(var(--gold-500) 25%, var(--black) 0 50%, var(--gold-500) 0 75%, var(--black) 0) 0 0 / 12px 12px;
}

/* ---------- Intro: the statement and the announcement ---------- */

.intro {
  padding-block: clamp(56px, 8vw, 104px);
  background: radial-gradient(ellipse 80% 120% at 0% 0%, var(--brg-850), var(--black) 70%);
}
.intro-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .intro-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }

/* Sized to its column, so each line ("Better than Goodwood!" is the longest) stays on one line */
.statement-box { container-type: inline-size; }
.statement { display: grid; gap: 0.1em; font: 400 2rem/1.12 var(--f-display); font-size: clamp(1.5rem, 6.9cqi, 3rem); letter-spacing: 0.01em; }
.statement span { white-space: nowrap; }
@media (max-width: 520px) { .statement { font-size: clamp(1.2rem, 7.1cqi, 2.4rem); } }

/* The video under the statement: its picture with YouTube's play mark, then the player in its place */
.video { display: grid; gap: 12px; margin-top: clamp(18px, 3vw, 28px); }
.video .frame { padding: 10px; }
.video-open, .video-player {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  background: #000;
  border: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
}
.video-open img { width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center;
  width: clamp(64px, 14cqi, 92px); height: clamp(64px, 14cqi, 92px);
  color: var(--gold); filter: drop-shadow(0 3px 8px rgb(0 0 0 / 0.6));
  transition: color 0.15s, transform 0.15s;
}
.video-play .youtube-logo { width: 100%; height: 100%; }
.video-open:hover .video-play, .video-open:focus-visible .video-play { color: var(--gold-200); transform: translate(-50%, -50%) scale(1.06); }
.video-open:hover { border-color: var(--gold-300) var(--gold-700) var(--gold-700) var(--gold-300); }
.video-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { font-size: 0.98rem; color: var(--text-faint); }
.video-note { display: block; margin-top: 2px; font-size: 0.9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.announce p + p { margin-top: 0.9em; }
.announce p { color: var(--text); }

/* ---------- Sections ---------- */

.section { padding-block: clamp(64px, 9vw, 120px); }
.section-green {
  background-color: var(--brg-900);
  background-image: radial-gradient(ellipse 90% 70% at 100% 0%, rgb(0 66 37 / 0.55), transparent 70%);
}
.section-black { background: radial-gradient(ellipse 80% 80% at 0% 100%, rgb(0 66 37 / 0.28), transparent 70%), var(--black); }

.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head h2 { font: 400 clamp(1.7rem, 1.1rem + 2.2vw, 2.6rem)/1.1 var(--f-display); color: var(--text); }
.sec-rule {
  flex: 1; min-width: 32px; height: 8px; align-self: center;
  background: conic-gradient(var(--gold-600) 25%, transparent 0 50%, var(--gold-600) 0 75%, transparent 0) 0 0 / 8px 8px;
  opacity: 0.85;
}
.sec-key {
  flex: none;
  display: inline-grid; place-items: center;
  width: 2.6rem; height: 2.6rem;
  font: 400 1.7rem/1 var(--f-hud);
  color: var(--ink);
  background: linear-gradient(var(--gold-200), var(--gold) 60%, var(--gold-500));
  border: 3px solid; border-color: var(--gold-100) var(--gold-700) var(--gold-700) var(--gold-100);
  text-shadow: none;
}

.prose { display: grid; gap: 1.05em; max-width: 62ch; }
.prose p { color: var(--text-dim); }
.lead { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.42rem); line-height: 1.5; color: var(--text) !important; font-weight: 500; }

.split { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .split-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .split-even { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
  .split-top { align-items: start; }
}

.facts { display: grid; gap: 14px; margin-top: 0.6em; }
.fact { padding: 14px 16px 16px; background: rgb(0 0 0 / 0.28); border-left: 4px solid var(--gold); }
.fact p { color: var(--text); }
.fact-tag, .tool-tag, .card-group {
  margin-bottom: 0.35em;
  font: 600 0.92rem/1.2 var(--f-label);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-300);
}
.fact em { color: var(--gold-200); font-style: italic; }

/* Screenshots */
.shot { display: grid; gap: 12px; }
.shot-open { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: inherit; color: inherit; }
.shot-open .frame { padding: 10px; transition: border-color 0.2s; }
.shot-open img { border: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo); }
.shot-open:hover .frame { border-color: var(--gold-300) var(--gold-700) var(--gold-700) var(--gold-300); }
.shot figcaption { font-size: 0.98rem; color: var(--text-faint); }
.cap-tag { font: 400 1.25rem/1 var(--f-hud); text-transform: uppercase; color: var(--gold-300); margin-right: 0.4em; }

/* Engine */
.engine-intro { display: grid; gap: 18px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
@media (min-width: 960px) { .engine-intro { grid-template-columns: minmax(0, 1.6fr) auto; } }
.engine-intro .lead { max-width: 52ch; }
.yes-gp4 {
  font: 400 clamp(2.4rem, 1.3rem + 4.5vw, 4.6rem)/1 var(--f-display);
  color: var(--text);
  white-space: nowrap;
}
.yes-gp4 .gp4 {
  color: transparent;
  background: linear-gradient(180deg, var(--gold-100), var(--gold-300) 35%, var(--gold) 60%, var(--gold-600));
  -webkit-background-clip: text; background-clip: text;
}

.specs {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  margin-bottom: clamp(40px, 6vw, 72px);
}
.spec {
  display: grid; align-content: start; gap: 6px;
  padding: 16px 16px 18px;
  background: linear-gradient(var(--brg-800), var(--brg-900));
  border: 3px solid; border-color: var(--brg-600) var(--bevel-lo) var(--bevel-lo) var(--brg-600);
}
.spec-big { font: 400 1.5rem/1.1 var(--f-display); color: var(--gold-300); text-shadow: 1px 1px 0 #000; }
.spec-small { font-size: 0.97rem; line-height: 1.4; color: var(--text-dim); }

/* Editions */
.editions { display: grid; gap: 20px; }
.ed-col { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 960px) {
  .editions { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .ed-col > :last-child { flex: 1; }
}
.card { display: flex; }
.card .panel { flex: 1; display: flex; flex-direction: column; padding: 0 0 22px; }
.card-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--brg-500), var(--brg-600));
  border-bottom: 2px solid var(--bevel-lo);
}
.card-bar h3 { font: 400 1.25rem/1.15 var(--f-display); color: var(--text); text-shadow: 1px 1px 0 #000; }
.card-bar h3 small { display: block; margin-bottom: 4px; font: 600 0.8rem/1 var(--f-label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--mint); }
.card-price { font: 400 1.6rem/1 var(--f-display); color: var(--gold-300); text-shadow: 1px 1px 0 #000; white-space: nowrap; }
.card-sub { padding: 14px 18px 0; font: 500 1.05rem/1.3 var(--f-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.card-group { padding: 16px 18px 0; margin-bottom: 0; }
.card .ticks { padding: 12px 18px 0; }
.card-action { margin-top: auto; padding: 20px 18px 0; }

.card-full { border-color: var(--gold-300) var(--gold-700) var(--gold-700) var(--gold-300); background-color: rgb(212 175 55 / 0.10); }
.card-full .card-bar {
  background: linear-gradient(180deg, var(--gold-100) 0%, var(--gold-300) 18%, var(--gold) 60%, var(--gold-600) 100%);
  border-bottom-color: var(--gold-700);
}
.card-full .card-bar h3, .card-full .card-price { color: var(--brg-950); text-shadow: 0 1px 0 rgb(255 245 205 / 0.6); }
.card-full .card-bar h3 small { color: var(--brg); }
.card-full .card-bar { flex-wrap: wrap; }
.card-buy { min-width: 0; min-height: 42px; padding: 0.4em 1.2em; font-size: 1.05rem; white-space: nowrap; }

.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--text); line-height: 1.45; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.3em;
  width: 14px; height: 14px;
  background: linear-gradient(var(--gold-200), var(--gold-500));
  border: 2px solid; border-color: var(--gold-100) var(--gold-700) var(--gold-700) var(--gold-100);
}

.pipeline .panel { height: 100%; }
.pipeline .panel-title { margin-bottom: 1em; }
.community .panel { height: 100%; }
.community .panel-title { margin-bottom: 0.9em; }
.community .panel > p { color: var(--text); line-height: 1.5; }
.community .panel > * + * { margin-top: 0.9em; }
.later { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.later li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  color: var(--text-dim);
  background: var(--brg-800);
  border: 3px solid; border-color: var(--brg-600) var(--bevel-lo) var(--bevel-lo) var(--brg-600);
  font: 500 1.05rem/1.25 var(--f-label); letter-spacing: 0.04em;
}
.later li::after { content: "Later"; font: 400 1.15rem/1 var(--f-hud); text-transform: uppercase; color: var(--gold-500); }

/* Mods */
.tools { display: grid; gap: 12px; }
.tool {
  display: grid; gap: 2px;
  padding: 16px 18px;
  background: linear-gradient(90deg, var(--brg-800), var(--brg-900));
  border: 3px solid; border-color: var(--brg-600) var(--bevel-lo) var(--bevel-lo) var(--brg-600);
}
.tool-tag { margin-bottom: 0; }
.tool-name { font: 400 1.3rem/1.25 var(--f-display); color: var(--text); }
.tool-gold { border-color: var(--gold-300) var(--gold-700) var(--gold-700) var(--gold-300); background: linear-gradient(90deg, rgb(212 175 55 / 0.16), var(--brg-900)); }

/* Contact: a GP2 panel with sunken fields */
.contact-frame { width: 100%; }
.contact-form { display: grid; gap: 16px; text-align: left; }
.contact-field { display: grid; gap: 6px; }
.contact-field label { font: 600 0.95rem/1.2 var(--f-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-300); }
.input {
  width: 100%;
  padding: 10px 12px;
  font: 500 1.05rem/1.45 var(--f-body);
  color: var(--text);
  background: var(--brg-950);
  border: 3px solid;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
}
.input:focus { outline: 2px solid var(--gold-300); outline-offset: 1px; }
.input[aria-invalid="true"] { outline: 2px solid #ff6b5a; outline-offset: 1px; }
textarea.input { min-height: 9em; resize: vertical; }
.contact-trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.contact-note { font-size: 0.92rem; line-height: 1.5; color: var(--text-faint); }
.contact-status { color: var(--gold-200); font-weight: 500; }
.contact-status:empty { display: none; }
.contact-status.is-error { color: #ff8f80; }
.contact-done { padding: 12px 14px; font-weight: 500; background: rgb(0 0 0 / 0.25); border-left: 4px solid var(--gold); color: var(--text); }
.contact-failed { border-left-color: #ff6b5a; }
.contact-done[hidden] { display: none; }

/* The legal bit (GP2's credits dialog, with its OK) on a photo; the free demo's box-out (key 6) is in Editions */
.boxouts {
  position: relative; isolation: isolate;
  display: grid; justify-content: center;
  grid-template-columns: minmax(0, 640px);
  padding: clamp(64px, 10vw, 128px) var(--gutter);
}
.boxout { display: flex; flex-direction: column; scroll-margin-top: calc(var(--hud-h) + 24px); }
.boxout > .panel { flex: 1; display: flex; flex-direction: column; justify-content: center; }   /* its text in the middle of a taller box */
.boxout .dl-caps { font-size: 1.1rem; color: var(--gold-200); margin-bottom: 0.9em; }
/* The demo's box stands out: GP2's gold frame, as the full versions' card has */
.demo-frame { border-color: var(--gold-300) var(--gold-700) var(--gold-700) var(--gold-300); background-color: rgb(212 175 55 / 0.10); }
.demo-go { min-width: 14rem; }
.btn-ok { min-width: 11rem; }

/* Footer */
.footer { background: var(--black); padding: 44px 0 20px; }
.footer-grid { display: grid; gap: 24px 48px; align-items: start; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: auto 1fr; } .fine { grid-column: 1 / -1; } }
.footer-mark { font: 400 1.6rem/1.1 var(--f-display); color: var(--gold-300); }
.footer-sub { margin-top: 4px; color: var(--text-faint); font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-start; }
@media (min-width: 900px) { .footer-nav { justify-content: flex-end; padding-top: 6px; } }
.footer-nav a { color: var(--text-dim); text-decoration: none; }
.footer-nav a:hover { color: var(--gold-300); }
.fine { padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.08); color: var(--text-faint); font-size: 0.92rem; max-width: none; }
.fine p + p { margin-top: 0.4em; }
.footer-follow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 14px; }
.footer-follow a, .link-btn {
  display: inline-flex; align-items: center; gap: 0.45em;
  padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 1rem/1.3 var(--f-label); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  color: var(--gold-300);
}
.footer-follow a:hover, .link-btn:hover { color: var(--gold-200); text-decoration: underline; }
.footer-keys { justify-content: center; margin-top: 28px; font-size: 1.2rem; color: var(--text-faint); }

/* ---------- The dev blog (/blog/: cms-app/blog.html, lib/blog.php) ---------- */

.blog-head { position: relative; isolation: isolate; padding-bottom: clamp(28px, 5vw, 56px); }
.blog-head .titlebar a { color: inherit; text-decoration: none; }
.blog-head .titlebar a:hover { color: var(--brg-600); }
.blog-intro { width: min(100% - 2 * var(--gutter), 720px); margin: clamp(24px, 5vw, 52px) auto 0; }
.blog-intro .panel { padding-block: clamp(20px, 3.5vw, 34px); }
@media (max-width: 560px) {
  .blog-intro .frame-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .blog-intro .frame-buttons .btn { min-width: 0; padding-inline: 0.5em; }
}
.feed-logo { flex: none; width: 1em; height: 1em; fill: currentColor; }

.blog-main {
  padding-block: clamp(36px, 6vw, 80px);
  background-color: var(--brg-900);
  background-image: radial-gradient(ellipse 90% 70% at 100% 0%, rgb(0 66 37 / 0.55), transparent 70%);
}
.blog-wrap { width: min(100% - 2 * var(--gutter), 880px); margin-inline: auto; display: grid; gap: clamp(24px, 4vw, 40px); }
.blog-list { display: grid; gap: clamp(28px, 4vw, 44px); }

/* An entry: GP2's panel, a green bar on top with the date on a gold tab cut like the title bar */
.blog-entry { scroll-margin-top: calc(var(--hud-h) + 16px); }
.blog-entry .panel { padding: 0; }
.blog-entry-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  min-height: 42px; padding-right: 14px;
  background: linear-gradient(180deg, var(--brg-500), var(--brg-600));
  border-bottom: 2px solid var(--bevel-lo);
}
.blog-date {
  align-self: stretch; display: flex; align-items: center;
  padding: 6px 34px 6px 16px;
  font: 400 1.45rem/1 var(--f-hud); text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--brg-950); text-shadow: 0 1px 0 rgb(255 245 205 / 0.6);
  background: linear-gradient(180deg, var(--gold-100), var(--gold-300) 18%, var(--gold) 60%, var(--gold-600));
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
}
.blog-permalink { font: 400 1.25rem/1 var(--f-hud); text-transform: uppercase; color: var(--gold-200); text-decoration: none; }
.blog-permalink::before { content: "# "; color: var(--gold-500); }
.blog-permalink:hover { color: #fff; }
.blog-entry-body { display: grid; gap: 1.1em; padding: clamp(18px, 3vw, 32px); }
.blog-entry-title {
  font: 400 clamp(1.4rem, 1.05rem + 1.4vw, 2.05rem)/1.18 var(--f-display);
  color: var(--text); text-shadow: 1px 1px 0 #000; overflow-wrap: anywhere;
}
.blog-entry-title a { color: inherit; text-decoration: none; }
.blog-entry-title a:hover { color: var(--gold-200); }
.blog-text { display: grid; gap: 0.95em; max-width: 68ch; color: var(--text); overflow-wrap: anywhere; }
.blog-text:empty { display: none; }
.blog-text ul, .blog-text ol { display: grid; gap: 0.5em; margin: 0; padding: 0; list-style: none; }
.blog-text li { position: relative; padding-left: 28px; }
.blog-text ul > li::before {
  content: ""; position: absolute; left: 3px; top: 0.42em;
  width: 11px; height: 11px;
  background: linear-gradient(var(--gold-200), var(--gold-500));
  border: 2px solid; border-color: var(--gold-100) var(--gold-700) var(--gold-700) var(--gold-100);
}
.blog-text ol { counter-reset: blog-item; }
.blog-text ol > li { counter-increment: blog-item; }
.blog-text ol > li::before { content: counter(blog-item); position: absolute; left: 2px; top: 0.05em; font: 400 1.35rem/1.2 var(--f-hud); color: var(--gold-300); }
.blog-shot .shot-open .frame { padding: 8px; }
.blog-shot figcaption { color: var(--text-dim); }
/* A YouTube video (the featured one, or an address on a line of its own in the text): the home page's video */
.blog-video { margin-top: 0; container-type: inline-size; }
.blog-video .frame { padding: 8px; }
.blog-video figcaption { color: var(--text-dim); }

.blog-crumbs { font: 400 1.3rem/1.2 var(--f-hud); text-transform: uppercase; color: var(--text-faint); }
.blog-crumbs a { color: var(--gold-300); text-decoration: none; }
.blog-crumbs a:hover { color: var(--gold-200); text-decoration: underline; }

/* An entry's page: the older and newer entries, then back to the list */
.blog-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.blog-pager-link {
  display: grid; align-content: start; gap: 6px;
  padding: 12px 16px 14px;
  color: var(--text); text-decoration: none;
  background: linear-gradient(var(--brg-800), var(--brg-900));
  border: 3px solid; border-color: var(--brg-600) var(--bevel-lo) var(--bevel-lo) var(--brg-600);
}
.blog-pager-link:hover { color: #fff; border-color: var(--gold-300) var(--gold-700) var(--gold-700) var(--gold-300); }
.blog-newer { grid-column: 2; text-align: right; }
.blog-pager-dir { font: 400 1.25rem/1 var(--f-hud); text-transform: uppercase; color: var(--gold-300); }
.blog-older .blog-pager-dir::before { content: "\2039  "; }
.blog-newer .blog-pager-dir::after { content: "  \203A"; }
.blog-pager-title { font: 600 1.05rem/1.3 var(--f-body); overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .blog-pager { grid-template-columns: minmax(0, 1fr); }
  .blog-newer { grid-column: auto; }
  .blog-pager > span:empty { display: none; }
}
.blog-back { display: flex; justify-content: center; }
.blog-empty { text-align: center; }

/* ---------- Dialogs: the retro menu (Esc), the newsletter (N) and the screenshot viewer ---------- */

dialog {
  padding: 0; border: 0; background: transparent; color: var(--text);
  max-width: calc(100vw - 2 * var(--gutter)); max-height: calc(100svh - 32px);
}
dialog::backdrop { background: rgb(0 10 5 / 0.72); backdrop-filter: blur(3px); }
dialog .frame { background-color: rgb(196 220 182 / 0.16); }

.menu { width: 440px; }
.menu-title {
  margin: -6px 0 16px; text-align: center;
  font: 400 1.6rem/1 var(--f-display); color: var(--gold-300); text-shadow: 1px 1px 0 #000;
}
.menu-list { display: grid; gap: 2px; }
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 7px 12px;
  font: 400 1.65rem/1 var(--f-hud); text-transform: uppercase; text-decoration: none; text-align: left;
  color: var(--text); background: none; border: 0; cursor: pointer;
}
.menu-list kbd { width: 1.4em; color: var(--gold-300); }
.menu-list a:hover, .menu-list button:hover, .menu-list a:focus, .menu-list button:focus {
  outline: none; background: var(--gold); color: var(--ink);
}
.menu-list a:hover kbd, .menu-list button:hover kbd, .menu-list a:focus kbd, .menu-list button:focus kbd { color: var(--ink); }

/* Patreon's and YouTube's marks, in the colour of the text beside them */
.patreon-logo, .youtube-logo { flex: none; width: 1em; height: 1em; fill: currentColor; }
.youtube-logo { width: 1.15em; height: 1.15em; }
.btn-icon { gap: 0.55em; }
.menu-list kbd .patreon-logo { display: inline-block; width: 0.75em; height: 0.75em; }

/* The newsletter: GP2's dialog with a sunken field, its buttons below (Subscribe, Patreon, Close) */
.newsletter { width: min(620px, 100vw - 2 * var(--gutter)); }
.newsletter .panel { max-height: calc(100svh - 150px); overflow: auto; }
.newsletter-form { display: grid; gap: 8px; margin-top: 1.3em !important; text-align: left; }
.newsletter-form .dl-label { margin-top: 0; }
.newsletter-note { font-size: 0.92rem; line-height: 1.5; color: var(--text-faint); text-shadow: none; word-spacing: normal; }
.newsletter-or { margin-top: 1.3em !important; }
.no-js [data-newsletter-open] { display: none; }

.viewer { width: min(1400px, 100vw - 2 * var(--gutter)); }
.viewer-panel { padding: 10px; }
.viewer-panel img { width: 100%; max-height: calc(100svh - 190px); object-fit: contain; }
.viewer-cap { padding: 10px 6px 2px; text-align: center; color: var(--text-dim); }
.viewer-panel { position: relative; }
/* While the sharp picture loads (only when that takes over a quarter of a second, main.js): a gold ring at the top */
.viewer-loading {
  position: absolute; left: 50%; top: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  font: 400 1.2rem/1 var(--f-hud); text-transform: uppercase; color: var(--gold-200);
  background: rgb(0 0 0 / 0.72);
  border: 2px solid; border-color: var(--gold-600) var(--gold-700) var(--gold-700) var(--gold-600);
  visibility: hidden;
}
.viewer.is-loading .viewer-loading { visibility: visible; }
.viewer-spinner {
  width: 14px; height: 14px;
  border: 3px solid rgb(232 199 102 / 0.25); border-top-color: var(--gold-300); border-radius: 50%;
  animation: viewer-spin 0.8s linear infinite;
}
@keyframes viewer-spin { to { transform: rotate(360deg); } }

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

/* Touch screens have no keys to hint at */
@media (hover: none) and (pointer: coarse) {
  .keys { display: none; }
  .hud-menu kbd { display: none; }
  .menu-list kbd { visibility: hidden; width: 0.4em; }
}

/* a name kept on one line (the GP2 release's, Grand-Prix-II_DOS_EN_v10b, would break at its hyphens) */
.nowrap { white-space: nowrap; }
