/* Shared by every page of the site, in both languages. */
:root{
  color-scheme:dark;
  --accent:#8B5CF6;
  --accent-soft:#a78bfa;
  --bg:#0c0b12;
  --bg-raised:#131120;
  --line:#241f38;
  --text:#e8e6f2;
  --dim:#9a94b4;
  --glow-a:rgba(139,92,246,.28);
  --glow-b:rgba(139,92,246,.10);
  --radius:14px;
  --wrap:1080px;
}

/* The light half, written twice on purpose: once for whoever asked their
   system for a light desktop and has never touched the switch, once for
   whoever has. The switch wins, and nothing here needs JavaScript to run. */
@media (prefers-color-scheme:light){
  :root:not([data-theme]){
    color-scheme:light;
    --accent:#7c3aed;
    --accent-soft:#6d28d9;
    --bg:#f6f4fb;
    --bg-raised:#fff;
    --line:#e2ddf0;
    --text:#1b1626;
    --dim:#5c5675;
    --glow-a:rgba(139,92,246,.20);
    --glow-b:rgba(139,92,246,.09);
  }
}
:root[data-theme="light"]{
  color-scheme:light;
  --accent:#7c3aed;
  --accent-soft:#6d28d9;
  --bg:#f6f4fb;
  --bg-raised:#fff;
  --line:#e2ddf0;
  --text:#1b1626;
  --dim:#5c5675;
  --glow-a:rgba(139,92,246,.20);
  --glow-b:rgba(139,92,246,.09);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  background:var(--bg);color:var(--text);
  font:400 16px/1.65 "Segoe UI",system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing:antialiased;overflow-x:hidden;
}
a{color:var(--accent-soft);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 24px}

/* --------------------------------------------------------------- top bar */
/* The same bar on every page, so no page is only to be found in the footer.
   On a wide screen it stays at the top while you scroll; on a narrow one it
   scrolls away and leaves the top to the contents of the page. */
.topbar{position:sticky;top:0;z-index:60;background:var(--bg);border-bottom:1px solid var(--line)}
.topbar .bar{display:flex;align-items:center;gap:18px;min-height:60px}
.topbar .brand{display:flex;align-items:center;gap:9px;flex:none;font-weight:700;font-size:1.02rem;color:var(--text)}
.topbar .brand:hover{text-decoration:none;color:var(--accent-soft)}
.topbar .brand img{width:26px;height:26px}
.topbar .links{display:flex;gap:2px;margin-left:auto;overflow-x:auto;scrollbar-width:none}
.topbar .links::-webkit-scrollbar{display:none}
.topbar .links a{flex:none;padding:6px 11px;border-radius:8px;color:var(--dim);font-size:.9rem;white-space:nowrap}
.topbar .links a:hover{color:var(--text);background:var(--bg-raised);text-decoration:none}
.topbar .links a[aria-current]{color:var(--text);border-radius:0;box-shadow:inset 0 -2px 0 var(--accent)}
.topbar .links a[aria-current]:hover{background:none}
.topbar .tools{display:flex;gap:8px;flex:none}
.topbar .lang,.topbar .theme-toggle{position:static;height:36px;min-width:36px}
.topbar .theme-toggle{width:36px}
@media (max-width:860px){
  .topbar{position:static}
  .topbar .bar{flex-wrap:wrap;gap:0 12px;padding-top:10px}
  .topbar .tools{margin-left:auto}
  /* All of them in sight, on two rows if need be, rather than some scrolled off. */
  .topbar .links{order:3;flex-basis:100%;flex-wrap:wrap;overflow:visible;margin:6px -11px 4px}
}

/* ---------------------------------------------------------------- header */
header{
  position:relative;text-align:center;
  padding:72px 0 72px;
  background:
    radial-gradient(900px 460px at 50% -160px,var(--glow-a),transparent 70%),
    radial-gradient(600px 300px at 80% 10%,var(--glow-b),transparent 70%);
}
header img.logo{width:104px;height:104px;image-rendering:auto}
h1{font-size:clamp(2.6rem,7vw,4.2rem);font-weight:700;letter-spacing:-.03em;margin:18px 0 10px}
.tag{font-size:clamp(1.05rem,2.4vw,1.3rem);color:var(--dim);max-width:620px;margin:0 auto}
.cta{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-top:34px}
.btn{
  display:inline-block;padding:13px 26px;border-radius:11px;font-weight:600;font-size:.98rem;
  border:1px solid transparent;transition:transform .16s ease,background .16s ease,border-color .16s ease;
}
.btn:hover{text-decoration:none;transform:translateY(-2px)}
.btn-main{background:var(--accent);color:#fff}
.btn-main:hover{background:#7c4ff0}
.btn-ghost{border-color:var(--line);color:var(--text);background:var(--bg-raised)}
.btn-ghost:hover{border-color:var(--accent)}

/* the winget command, dressed as a field: selectable by hand, and copyable
   by a button that only appears once the script can back it */
.cmd{
  display:flex;align-items:center;gap:6px;padding:0 6px 0 20px;border-radius:11px;
  min-height:calc(28px + .98rem * 1.65); /* a .btn's height, on a row of its own too */
  border:1px solid var(--line);background:var(--bg-raised);color:var(--text);
  font:500 .92rem/1 ui-monospace,"Cascadia Mono",Consolas,monospace;
  transition:border-color .16s ease;
}
.cmd:hover{border-color:var(--accent)}
.cmd code{font:inherit;white-space:nowrap;user-select:all}
.cmd code::before{content:">";color:var(--accent-soft);margin-right:.7em;user-select:none}
.soon{
  margin-left:10px;padding:4px 9px;border:1px solid var(--accent);border-radius:999px;
  font:600 .68rem/1 "Segoe UI",system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase;
  color:var(--accent-soft);white-space:nowrap;user-select:none;
}
.soon.ver{text-transform:none;letter-spacing:.02em}
@media (max-width:420px){
  .cmd{padding-left:14px;font-size:.84rem}
  .soon{margin-left:6px;padding:4px 7px;letter-spacing:.03em}
}
.copy{
  width:40px;height:40px;flex:none;display:flex;align-items:center;justify-content:center;
  border:0;border-radius:8px;background:transparent;color:var(--dim);cursor:pointer;
  transition:background .16s ease,color .16s ease;
}
.copy[hidden]{display:none}
.copy:hover{background:var(--line);color:var(--text)}
.copy:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.copy svg{
  width:18px;height:18px;fill:none;stroke:currentColor;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
.sub{margin-top:14px;font-size:.86rem;color:var(--dim)}

/* ---------------------------------------------------------------- switch */
/* In the top bar, beside the language. Hidden until the script has run: a
   button that cannot do anything is worse than no button. */
.theme-toggle{
  position:fixed;top:18px;right:18px;z-index:50;
  width:42px;height:42px;display:flex;align-items:center;justify-content:center;
  border-radius:50%;cursor:pointer;color:var(--text);
  border:1px solid var(--line);background:var(--bg-raised);
  transition:border-color .18s ease,transform .18s ease;
}
.theme-toggle[hidden]{display:none}
.theme-toggle:hover{border-color:var(--accent);transform:translateY(-2px)}
.theme-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.theme-toggle svg{
  width:19px;height:19px;fill:none;stroke:currentColor;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
@media (max-width:520px){.theme-toggle{top:12px;right:12px;width:38px;height:38px}}

/* ------------------------------------------------------------- sections */
section{padding:76px 0}
h2{font-size:clamp(1.6rem,3.6vw,2.1rem);font-weight:650;letter-spacing:-.02em;margin-bottom:12px}
h2 .num{color:var(--accent);font-weight:600;margin-right:.5em;font-variant-numeric:tabular-nums}
.lead{color:var(--dim);max-width:660px;margin-bottom:34px}
figure{margin:34px 0}
figure img{
  width:100%;height:auto;display:block;border-radius:var(--radius);
  border:1px solid var(--line);background:#000;
}
figcaption{margin-top:12px;font-size:.87rem;color:var(--dim);line-height:1.55}

/* two pictures side by side, cut to one shape so their captions line up */
.pair{display:grid;gap:22px;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));margin:34px 0}
.pair figure{margin:0}
.pair img{aspect-ratio:5/4;object-fit:cover}

/* the break between what every source gets and what an analogue one gets */
.group{padding:96px 0 0;text-align:center}
.group h2{font-size:clamp(1.9rem,4.4vw,2.6rem)}
.group .lead{margin:0 auto}

/* close-ups of the interface: shown at their own size, never blown up, and
   allowed the full width of a phone so the labels stay readable */
figure.ui img{max-width:436px;margin-left:auto;margin-right:auto;background:var(--bg-raised)}
figure.ui figcaption{max-width:560px;margin-left:auto;margin-right:auto}
@media (max-width:520px){
  figure.ui{margin-left:-24px;margin-right:-24px}
  figure.ui img{border-radius:0;border-left:0;border-right:0}
  figure.ui figcaption{padding:0 24px}
}

/* the one number worth shouting about */
.metric{
  display:flex;gap:40px;flex-wrap:wrap;justify-content:center;
  padding:34px;border:1px solid var(--line);border-radius:var(--radius);
  background:linear-gradient(180deg,var(--bg-raised),transparent);
}
.metric div{text-align:center;min-width:150px}
.metric b{display:block;font-size:2.2rem;font-weight:700;color:var(--accent-soft);letter-spacing:-.02em}
.metric span{font-size:.85rem;color:var(--dim)}

.grid{display:grid;gap:18px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.card{
  padding:24px;border:1px solid var(--line);border-radius:var(--radius);
  background:var(--bg-raised);transition:border-color .18s ease,transform .18s ease;
}
.card:hover{border-color:var(--accent);transform:translateY(-3px)}
.card h3{font-size:1.02rem;font-weight:640;margin-bottom:8px}
.card p{font-size:.9rem;color:var(--dim);line-height:1.6}

table{width:100%;border-collapse:collapse;font-size:.9rem;margin-top:8px}
th,td{text-align:left;padding:11px 12px;border-bottom:1px solid var(--line)}
th{color:var(--dim);font-weight:600;font-size:.82rem;text-transform:uppercase;letter-spacing:.04em}
td strong{color:var(--accent-soft)}

.note{
  border-left:3px solid var(--accent);padding:14px 18px;margin-top:26px;
  background:var(--bg-raised);border-radius:0 10px 10px 0;font-size:.92rem;color:var(--dim);
}

footer{padding:56px 0 72px;border-top:1px solid var(--line);color:var(--dim);font-size:.88rem}
footer .row{display:flex;gap:26px;flex-wrap:wrap;justify-content:space-between;align-items:center}
footer .made{margin-top:18px}

/* --------------------------------------------------------- scroll reveal */
.reveal{opacity:0;transform:translateY(26px);transition:opacity .7s cubic-bezier(.2,.7,.3,1),transform .7s cubic-bezier(.2,.7,.3,1)}
.reveal.on{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .btn:hover,.card:hover,.theme-toggle:hover{transform:none}
}

/* -------------------------------------------------------------- language */
/* Beside the theme switch and built like it, a link rather than a button:
   it goes to the page in the other language and works without script. */
.lang{
  position:fixed;top:18px;right:70px;z-index:50;
  height:42px;min-width:42px;padding:0 12px;display:flex;align-items:center;justify-content:center;
  border-radius:21px;color:var(--text);font-weight:600;font-size:.8rem;letter-spacing:.06em;
  border:1px solid var(--line);background:var(--bg-raised);
  transition:border-color .18s ease,transform .18s ease;
}
.lang:hover{text-decoration:none;border-color:var(--accent);transform:translateY(-2px)}
.lang:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media (max-width:520px){.lang{top:12px;right:58px;height:38px;min-width:38px;padding:0 10px}}

/* ---------------------------------------------------------------- manual */
.page-head{
  text-align:center;padding:48px 0 36px;
  background:radial-gradient(800px 380px at 50% -160px,var(--glow-a),transparent 70%);
}
.page-head h1{font-size:clamp(2.1rem,5vw,3rem);margin:0 0 6px}
.page-head .tag a{color:var(--accent-soft)}
.doc{display:grid;gap:52px;grid-template-columns:210px minmax(0,1fr);align-items:start;padding-top:20px;padding-bottom:40px}
/* The sections of this page only; the other pages are in the top bar. */
.toc{position:sticky;top:84px;font-size:.88rem}
.toc b{display:block;color:var(--dim);font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;margin-bottom:8px}
.toc a{display:block;padding:5px 0 5px 12px;color:var(--dim);border-left:2px solid var(--line)}
.toc a:hover{color:var(--text);border-left-color:var(--accent);text-decoration:none}
/* the section you are reading, marked by the script as you scroll */
.toc a.on{color:var(--text);border-left-color:var(--accent)}
.toc{max-height:calc(100vh - 108px);overflow-y:auto;scrollbar-width:thin}
/* A heading among the links, for the part of the home page on analogue consoles. */
.toc .secs b{margin:16px 0 6px}
/* The home page has the same contents beside its sections. They keep their own
   spacing, which already leaves room above each heading. */
.landing{display:grid;gap:52px;grid-template-columns:180px minmax(0,1fr);align-items:start}
.landing main .wrap{max-width:none;padding:0}
.landing section{scroll-margin-top:24px}
.landing .toc{margin-top:76px}
.doc .cta{justify-content:flex-start;margin-top:18px}
#releases{margin-top:30px}
.rel{margin-top:26px}
.rel h3{margin-top:0}
.rel h3 .when{color:var(--dim);font-weight:400;font-size:.85rem;margin-left:10px}
.rel h4{font-size:.92rem;margin:16px 0 4px;color:var(--accent-soft)}
.rel p{margin-top:10px}
.rel table{display:block;overflow-x:auto}
.kind{font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--dim);margin-right:7px}
.doc section{padding:0 0 52px;scroll-margin-top:84px}
.doc h2{font-size:clamp(1.4rem,3vw,1.75rem);margin-bottom:14px}
.doc h3{font-size:1.02rem;font-weight:640;margin:26px 0 8px}
.doc p{max-width:720px}
.doc p + p{margin-top:12px}
.doc ul,.doc ol{margin:10px 0 0 22px;max-width:700px}
.doc li{margin:5px 0}
.doc li::marker{color:var(--accent-soft)}
.doc table{margin:14px 0 4px}
.doc td:first-child{white-space:nowrap}
.doc .note{margin-top:18px}
.doc figure{margin:22px 0}
.doc figure.ui img{max-width:528px;margin-left:0}
.doc figure.win img{max-width:720px}
.doc figure.ui figcaption{margin-left:0}
kbd{
  font:600 .8rem/1 ui-monospace,"Cascadia Mono",Consolas,monospace;
  padding:3px 7px;border:1px solid var(--line);border-bottom-width:2px;border-radius:6px;
  background:var(--bg-raised);color:var(--text);white-space:nowrap;
}
/* On a narrow screen the contents become a bar along the top that stays while
   you scroll, sideways if it does not fit. The top bar has scrolled away by
   then, so this one has the full width. */
@media (max-width:860px){
  .doc{grid-template-columns:minmax(0,1fr);gap:28px}
  .toc{
    top:0;z-index:40;margin:0 -24px;padding:0 14px;min-height:54px;
    display:flex;align-items:center;overflow-x:auto;white-space:nowrap;scrollbar-width:none;
    background:var(--bg);border-bottom:1px solid var(--line);
  }
  .toc{max-height:none;overflow-y:hidden}
  .toc::-webkit-scrollbar{display:none}
  .toc b{display:none}
  .toc .secs{display:contents}
  .toc .secs a{font-size:inherit}
  .toc a{flex:none;margin:0;padding:8px 10px;border-left:0;border-bottom:2px solid transparent}
  .toc a.on{border-bottom-color:var(--accent)}
  .doc section{scroll-margin-top:70px}
  .landing{grid-template-columns:minmax(0,1fr);gap:0}
  .landing .toc{margin-top:0}
}
@media (max-width:520px){.doc td:first-child{white-space:normal}}
@media (prefers-reduced-motion:reduce){.lang:hover{transform:none}}
