:root {
  color-scheme: light dark;
  --background: #fff;
  --text: #333;
  --link: #00e;
  --code: #f8f8f8;
  --border: silver;
  --orange: #f7a41d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Impact, "Arial Narrow", "Helvetica Neue", sans-serif;
  font-weight: 900;
}
main {
  width: 44%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 35px;
}
a { color: var(--link); }
a:hover, a:focus-visible { background: #fff2a8; color: #000; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.logo {
  position: fixed;
  left: 12px;
  top: 0;
  color: var(--orange);
  width: min(23vw, 300px);
}
.logo img { display: block; width: 100%; height: auto; }
.logo:hover { background: transparent; color: var(--orange); }
h1 {
  font-size: clamp(64px, 7.2vw, 104px);
  line-height: 1.04;
  font-weight: 900;
  margin: 0 0 40px;
  padding-top: 5px;
}
h2 { font-size: 25px; line-height: 1.2; margin: 0 0 18px; }
.manifesto {
  padding-left: 25px;
  font-size: 19px;
  line-height: 1.4;
  margin: 0 0 20px;
}
.manifesto code { font-size: .87em; }
.battlecry { font-size: 21px; line-height: 1.2; margin: 22px 0 15px; }
button { font: inherit; cursor: pointer; }
#celebrate {
  display: block;
  background: #fcdba5;
  color: #333;
  border: 2px solid var(--orange);
  padding: 8px 12px;
  font-size: 22px;
  text-align: left;
  max-width: 100%;
}
#celebrate:hover { background: var(--orange); }
#victory-result { font: 12px/1.4 monospace; min-height: 2.8em; margin: 10px 0 20px; }
.meme { display: block; margin: 0 0 20px; }
.meme img { display: block; width: 100%; height: auto; }
.meme:hover { background: none; }
code { font-family: monospace; font-weight: 400; background: var(--code); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; background: var(--code); border: 1px dotted var(--border); font-size: 15px; line-height: 1.5; margin: 25px 0 40px; }
.final-cry { font-size: clamp(35px, 4.4vw, 64px); line-height: 1.12; margin: 0 0 30px; overflow-wrap: anywhere; }
.links { font-size: 18px; line-height: 1.8; }
footer { margin-top: 30px; font: 12px/1.7 system-ui, sans-serif; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; }
.skip { position: fixed; top: -100px; left: 10px; padding: 10px; background: var(--background); z-index: 20; }
.skip:focus { top: 10px; }
dialog { border: 1px solid var(--border); padding: 16px; background: var(--background); color: var(--text); width: min(850px, 94vw); max-height: 94dvh; font-family: system-ui, sans-serif; font-weight: 400; }
dialog::backdrop { background: #000d; }
dialog[open] { display: flex; flex-direction: column; }
#meme-full { object-fit: contain; max-width: 100%; min-height: 0; max-height: 70dvh; display: block; margin: 10px auto; }
.dialog-toolbar, .dialog-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.dialog-toolbar button, .dialog-bottom button { border: 1px solid var(--border); padding: 6px 12px; background: var(--code); color: var(--text); white-space: nowrap; }
.dialog-bottom p { font-size: 11px; text-align: center; }
.dialog-open { overflow: hidden; }
@media (prefers-color-scheme: dark) {
  :root { --background: #121212; --text: #ccc; --link: #88f; --code: #222; --border: #444; }
}
@media (max-width: 800px) {
  main { width: 65%; margin-left: 29%; padding-right: 15px; }
  .logo { width: 25vw; left: 0; }
  h1 { font-size: clamp(46px, 9vw, 72px); margin-bottom: 28px; }
  h2 { font-size: 22px; }
  .manifesto { font-size: 17px; }
  .battlecry { font-size: 19px; }
}
@media (max-width: 500px) {
  main { width: auto; margin: 0 16px; padding: 0 0 25px; }
  .logo { position: absolute; width: 65px; left: auto; right: 7px; top: 12px; }
  h1 { font-size: clamp(54px, 15vw, 75px); padding-top: 16px; margin-bottom: 27px; }
  h2 { font-size: 22px; }
  .manifesto { font-size: 17px; padding-left: 22px; }
  .battlecry { font-size: 18px; }
  #celebrate { font-size: 20px; }
  .final-cry { font-size: 39px; }
  .links { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
