:root {
  color-scheme: light dark;
  --paper: #f5f6fc; --ink: #24205e; --muted: #5e607e; --edge: #ccd0e4;
  --surface: #ffffff; --accent: #b73344; --link: #403ca3; --good: #16704f;
  --code: #eceef8;
  font: 17px/1.65 "Segoe UI", Candara, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #14132b; --ink: #ececfb; --muted: #b0b1cb; --edge: #3a3957; --surface: #1c1b37; --accent: #ff8a85; --link: #b9b2ff; --good: #79d8af; --code: #23223f; }
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--link); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
header.site-header { max-width: 1200px; margin: auto; padding: 1rem 1.5rem; display: flex; align-items: center; gap: 2rem; border-bottom: 1px solid var(--edge); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 700; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.site-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-left: auto; font-size: .9rem; }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; font-weight: 700; }
.lang-switch { display: inline-flex; gap: .25rem; align-items: center; }
.lang-switch button { padding: .3rem .55rem; font-size: .8rem; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 700; }
/* Bilingual pages: French blocks hidden unless the page language is French. */
[data-l="fr"] { display: none; }
html[lang="fr"] [data-l="en"] { display: none; }
html[lang="fr"] [data-l="fr"] { display: revert; }
main.site-main { max-width: 1200px; margin: auto; padding: 2.5rem 1.5rem 4rem; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.1; letter-spacing: -.035em; margin: 0 0 1.2rem; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.08rem; margin: 0 0 .5rem; }
p { max-width: 78ch; margin: .65rem 0; }
.lead { font-size: 1.2rem; line-height: 1.6; max-width: 65ch; }
.muted, small { color: var(--muted); }
.hero { display: grid; grid-template-columns: 1fr 250px; align-items: center; gap: 3rem; padding: 1rem 0 2.5rem; }
.hero img { width: 100%; height: auto; }
.install { display: inline-block; padding: .7rem 1rem; background: var(--code); border-radius: 4px; margin-top: .8rem; }
code, pre, textarea { font: .87rem/1.6 Consolas, "Cascadia Code", monospace; }
code { overflow-wrap: anywhere; }
pre { padding: 1rem; background: var(--code); overflow-x: auto; border-radius: 4px; }
.destinations { border-top: 1px solid var(--edge); }
.destination { display: grid; grid-template-columns: minmax(200px, .65fr) 1fr; gap: 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--edge); }
.destination a { font-size: 1.2rem; font-weight: 650; }
.destination p { margin: 0; }
button, select { color: var(--ink); background: var(--surface); border: 1px solid var(--edge); border-radius: 4px; padding: .55rem .9rem; font: inherit; font-size: .9rem; }
button { cursor: pointer; }
button.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 650; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin: 1.25rem 0; }
.controls label { display: flex; align-items: center; gap: .5rem; }
.note { border-left: 3px solid var(--accent); padding: .3rem 0 .3rem 1rem; margin: 1.5rem 0; }
.status { min-height: 1.7em; color: var(--muted); }
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1rem 0; }
.result { background: var(--surface); border: 1px solid var(--edge); padding: 1.2rem; border-radius: 5px; }
.result pre { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 5rem; }
.result[data-outcome="blocked"] { border-color: var(--good); }
.result[data-outcome="timeout"], .result[data-outcome="returned"], .result[data-outcome="breached"] { border-color: var(--accent); }
.result[data-outcome="setup-error"] { border-color: var(--muted); }
.badge { display: inline-block; font-size: .85rem; font-weight: 700; margin: .3rem 0; }
.ok { color: var(--good); }
.ko { color: var(--accent); }
.verdict { font-weight: 700; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .7rem .5rem; text-align: left; border-bottom: 1px solid var(--edge); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
footer.site-footer { max-width: 1200px; margin: auto; padding: 1.25rem 1.5rem 2rem; border-top: 1px solid var(--edge); font-size: .85rem; color: var(--muted); }
.game-layout { display: grid; grid-template-columns: 1.12fr 1fr; gap: 1.5rem; align-items: start; }
.game-display { overflow: hidden; border-radius: 8px; background: #24205e; }
canvas { display: block; width: 100%; height: auto; touch-action: manipulation; }
.game-readout { display: flex; flex-wrap: wrap; gap: 1rem; padding: .65rem 1rem; color: #e7e5ff; font-size: .88rem; }
textarea { display: block; width: 100%; min-height: 390px; resize: vertical; background: var(--code); color: var(--ink); border: 1px solid var(--edge); border-radius: 4px; padding: 1rem; tab-size: 2; }
.editor-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.editor-title label { font-weight: 650; }
.game-log { max-height: 150px; overflow: auto; white-space: pre-wrap; }
details { margin: 1rem 0; }
summary { cursor: pointer; font-weight: 600; }
@media (max-width: 750px) {
  header.site-header { align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
  .site-nav { margin-left: 0; }
  main.site-main { padding-top: 1.7rem; }
  .hero { grid-template-columns: 1fr 115px; gap: 1rem; }
  .hero h1 { font-size: 2.7rem; }
  .comparison, .game-layout { grid-template-columns: 1fr; }
  .destination { grid-template-columns: 1fr; gap: .35rem; }
  textarea { min-height: 310px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
