/* The site's theme (docs/.vitepress/theme/porsche.css), dark variant: graphite and brushed silver, with the
   deep red and gold of the mark (docs/public/favicon.svg). */
:root {
  color-scheme: dark;
  --silver: #c9ccd1;
  --silver-hi: #eef0f2;
  --red: #a3121e;
  --red-light: #d23a44;
  --gold: #d4af37;
  --gold-light: #e6c766;
  --bg: #0f1012;
  --bg-alt: #0a0b0c;
  --bg-soft: #1a1c1f;
  --panel: rgba(30, 32, 36, 0.92);
  --divider: #2c2f34;
  --text: #e6e8eb;
  --text-2: #a6abb3;
  --ok: #8fc79a;
  --warn: #e6c766;
  --bad: #e5646b;
  --metal: linear-gradient(180deg, #f4f5f7 0%, #c9ccd1 48%, #9aa0a8 52%, #d8dbdf 100%);
  --rim: linear-gradient(90deg, var(--red), var(--red-light) 40%, var(--gold) 75%, rgba(212, 175, 55, 0));
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); font: 15px/1.6 var(--font); }
html { background: var(--bg); }
body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 50% -12%, rgba(201, 204, 209, 0.12), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(163, 18, 30, 0.14), transparent 60%),
    var(--bg);
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: .88em; background: rgba(255, 255, 255, 0.07); padding: .1em .35em; border-radius: 4px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 1.5rem 0 .5rem; width: fit-content; letter-spacing: .01em;
  background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 1rem; margin: 0 0 .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--silver); }
.small { font-size: .85rem; color: var(--text-2); }

.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 24px; height: 60px; background: rgba(12, 13, 15, 0.92); backdrop-filter: blur(8px); }
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--rim); opacity: .85; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 600; font-size: 15px;
  letter-spacing: .06em; }
.bar nav { display: flex; gap: 1.2rem; font-size: .9rem; }
.bar nav a { color: var(--text-2); }
.bar nav a[aria-current] { color: var(--gold); }

main { max-width: 1100px; margin: 0 auto; padding: 8px 24px 32px; }
.lead { color: var(--text-2); max-width: 60rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 1.2rem 0; }
/* Graphite panels with a red edge. */
.card { background: linear-gradient(160deg, rgba(58, 61, 66, 0.55), rgba(15, 16, 18, 0.96));
  border: 1px solid rgba(201, 204, 209, 0.14); border-left: 3px solid var(--red); border-radius: 6px; padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.3); }
.card ul { padding-left: 1.2rem; margin: 0; }
.card li { margin: .35rem 0; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0; }

/* Buttons: graphite, the primary one in the mark's red. */
button { font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; border-radius: 4px; padding: .45rem 1.15rem;
  border: 1px solid rgba(201, 204, 209, 0.3); background: #24272b; color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
button:hover { background: #2f3338; border-color: var(--silver); }
button.primary { background: var(--red); border-color: var(--red-light); color: #fff; }
button.primary:hover { background: #b81826; }
button.link { background: none; border: none; box-shadow: none; padding: .45rem .2rem; color: var(--gold); font-weight: 500; }
button.link:hover { text-decoration: underline; background: none; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.checks { list-style: none; padding: 0 !important; margin: .8rem 0 0 !important; }
.checks li { padding-left: 1.4rem; position: relative; }
.checks li::before { position: absolute; left: 0; font-weight: 700; }
.checks li.ok::before { content: "+"; color: var(--ok); }
.checks li.bad { color: var(--bad); }
.checks li.bad::before { content: "x"; }
progress { width: 100%; height: 10px; accent-color: var(--red); margin-top: .8rem; }

.message { max-width: 60rem; padding: .6rem 1rem; border-radius: 6px; border-left: 4px solid var(--silver); background: var(--panel); }
.message.warn { border-color: var(--warn); }
.message.error { border-color: var(--bad); }

/* The game: 4:3 in the window (the original's modes are all 4:3); the full screen in fullscreen, where the
   game draws at the display's size. */
#game { margin: 1rem 0; }
.stage { position: relative; background: #000; border-radius: 4px; overflow: hidden; margin: 0 auto;
  width: min(100%, calc((100vh - 150px) * 4 / 3)); aspect-ratio: 4 / 3;
  box-shadow: 0 0 0 1px #2c2f34, 0 18px 40px rgba(0, 0, 0, 0.5); }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.stage:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; margin-top: .8rem; }
.toolbar button { padding: .35rem .9rem; font-size: .85rem; }

#controls { margin-top: 2rem; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .45rem .7rem; border-bottom: 1px solid var(--divider); }
th { color: var(--text-2); font-weight: 600; }
tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }

.foot .powered { margin: 0 0 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.foot .powered img { display: block; }
.foot { max-width: 1100px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--divider); color: var(--text-2); font-size: .8rem; text-align: center; }

[hidden] { display: none !important; }
@media (max-width: 640px) { .bar nav a:not([aria-current]):not(:last-child) { display: none; } }
