/* Shared look of the public pages (support.html, privacy.html), copied to
   the website by apps/site/tools/legal-pages.mjs: Poster, the game's look
   and the website's (docs/ui-themes.md, docs/website.md). Ink and one
   yellow, hot red for stickers and offset shadows, nothing rounded, hard
   shadows instead of glows and glass, Anton capitals for titles and Archivo
   for text. Served from this site only, so these pages load nothing from
   any other service. */
@font-face {
  font-family: "Anton";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/anton-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/archivo-latin-wght-normal.woff2") format("woff2");
}

:root {
  --ink: #0d0d0f;
  --ink-1: #151518;
  --ink-2: #1e1e22;
  --ink-3: #2a2a30;
  --paper: #ffffff;
  --dim: #b8b8c0;
  --faint: #92929b;
  --line: rgba(255, 255, 255, 0.12);
  --line-2: rgba(255, 255, 255, 0.24);
  /* Red for stickers and offset shadows; --hot-fill behind white words
     (4.85:1), as in the game and on the website. */
  --hot: #ff2e4d;
  --hot-fill: #e0143a;
  /* The page's colour: Electric's yellow, as the website. Words on it are
     ink, never white. */
  --brand: #ffd84a;
  --dots: radial-gradient(circle, rgba(0, 0, 0, 0.16) 1.4px, transparent 1.8px)
    0 0 / 9px 9px;
  --display: "Anton", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --gutter-l: max(16px, calc(var(--safe-l) + 12px));
  --gutter-r: max(16px, calc(var(--safe-r) + 12px));
  --bar-h: 60px;
  color-scheme: dark;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--brand);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
strong {
  font-weight: 700;
}
.skip {
  position: absolute;
  left: var(--gutter-l);
  top: -100px;
  z-index: 20;
  padding: 10px 14px 8px;
  background: var(--brand);
  color: var(--ink);
  font: 400 1rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--hot);
}
.skip:focus {
  top: calc(var(--safe-t) + 8px);
}

/* ---------- Top bar: an ink strip with the page's yellow edge ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: var(--safe-t) var(--gutter-r) 0 var(--gutter-l);
  background: var(--ink);
  border-bottom: 3px solid var(--brand);
}
.bar-in {
  max-width: 1120px;
  height: calc(var(--bar-h) - 3px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  font: 400 1.4rem/1 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
  border: 2px solid var(--brand);
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav a {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--dim);
  text-decoration: none;
  font: 400 1.02rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* A slanted block slides under the link pointed at (Poster's tabs). */
.nav a::before {
  content: "";
  position: absolute;
  inset: 8px 2px;
  z-index: -1;
  background: var(--brand);
  transform: skewX(-12deg) scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease-out);
}
.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  color: var(--ink);
}
.nav a:hover::before,
.nav a:focus-visible::before,
.nav a[aria-current="page"]::before {
  transform: skewX(-12deg) scaleX(1);
}
/* Home: back to the website's front page (elementarenausa.com). */
.nav .home {
  color: var(--paper);
}
.nav .home svg {
  flex: none;
}
/* Play: the website's yellow block on a hard red shadow. */
.nav .play {
  margin-left: 8px;
  padding: 0 16px;
  background: var(--brand);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--hot);
  font-size: 1.12rem;
  transition:
    transform 0.14s var(--ease-out),
    box-shadow 0.14s var(--ease-out);
}
.nav .play::before {
  content: none;
}
.nav .play:hover {
  color: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--hot);
}
.nav .play:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--hot);
}
@media (max-width: 520px) {
  .brand span {
    display: none;
  }
  .nav a {
    padding-inline: 9px;
  }
  .nav .play {
    padding-inline: 12px;
  }
}
/* Phones held sideways: the bar scrolls away to leave room to read. */
@media (max-height: 500px) {
  .bar {
    position: static;
  }
}

/* ---------- Hero: the website's yellow, halftone, ink words ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 52px var(--gutter-r) 46px var(--gutter-l);
  background: var(--brand);
  color: var(--ink);
  border-bottom: 4px solid var(--ink);
}
/* The halftone fades out before the words, so nothing speckles behind
   them. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--dots);
  -webkit-mask-image: linear-gradient(to left, #000 15%, transparent 60%);
  mask-image: linear-gradient(to left, #000 15%, transparent 60%);
  pointer-events: none;
}
.hero-in {
  max-width: 1120px;
  margin: 0 auto;
}
/* The sticker over the title: ink with the page's yellow, a red shadow. */
.eyebrow {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 10px 5px;
  background: var(--ink);
  color: var(--brand);
  font: 400 0.95rem/1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 var(--hot);
}
.hero h1 {
  margin: 0;
  font: 400 clamp(2.8rem, 9vw, 5rem) / 0.95 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
/* The key word on a slanted ink block, as the website's headline. */
.hero h1 em {
  display: inline-block;
  padding: 0.03em 0.14em 0;
  margin-left: -0.02em;
  font-style: normal;
  background: var(--ink);
  color: var(--brand);
  transform: skewX(-8deg);
}
.lead {
  max-width: 600px;
  margin: 18px 0 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(13, 13, 15, 0.88);
}
.lead a {
  color: var(--ink);
  font-weight: 700;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.pills li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px 6px;
  background: var(--ink);
  color: var(--paper);
  font: 700 0.85rem/1.2 var(--body);
  letter-spacing: 0.02em;
}
.pills svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  margin-top: 26px;
}
/* Buttons: blocks that press in, as the website's. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  font: 400 1.15rem/1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    transform 0.14s var(--ease-out),
    box-shadow 0.14s var(--ease-out),
    background-color 0.14s var(--ease-out);
}
.btn svg {
  width: 19px;
  height: 19px;
  flex: none;
}
.btn-gold {
  background: var(--brand);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--hot);
}
.btn-gold:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--hot);
}
.btn-gold:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--hot);
}
.btn-ghost {
  background: transparent;
  color: var(--paper);
  box-shadow: inset 0 0 0 2px currentColor;
}
.btn-ghost:hover {
  background: var(--paper);
  color: var(--ink);
}
/* On the yellow: Play's ink block, and an ink outline. */
.hero .btn-gold {
  background: var(--ink);
  color: var(--brand);
}
.hero .btn-ghost {
  color: var(--ink);
}
.hero .btn-ghost:hover {
  background: var(--ink);
  color: var(--brand);
  box-shadow: inset 0 0 0 2px var(--ink);
}
@media (max-height: 500px) {
  .hero {
    padding-top: 28px;
    padding-bottom: 28px;
  }
  .hero h1 {
    font-size: clamp(2.3rem, 6vw, 3.4rem);
  }
  .lead {
    margin-top: 10px;
  }
  .pills,
  .actions {
    margin-top: 16px;
  }
}

/* ---------- Page body: contents beside the text on wide screens ---------- */
.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px var(--gutter-r) 0 var(--gutter-l);
  display: grid;
  gap: 28px;
}
@media (min-width: 980px) {
  .layout {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 48px;
    padding-top: 44px;
  }
}
.toc {
  min-width: 0;
}
.toc-title {
  margin: 0 0 12px;
  font: 400 0.95rem/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc ol a {
  color: var(--dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.toc ol a:hover {
  color: var(--paper);
}
/* Narrow: one row of square chips that scrolls sideways. */
@media (max-width: 979px) {
  .toc ol {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l));
    padding: 2px var(--gutter-r) 6px var(--gutter-l);
    scroll-padding-inline: var(--gutter-l);
  }
  .toc ol::-webkit-scrollbar {
    display: none;
  }
  .toc li {
    flex: none;
  }
  .toc ol a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    background: var(--ink-2);
    box-shadow: inset 0 0 0 1px var(--line-2);
    white-space: nowrap;
  }
  .toc ol a:hover {
    box-shadow: inset 0 0 0 2px var(--brand);
  }
}
@media (min-width: 980px) {
  .toc nav {
    position: sticky;
    top: calc(var(--bar-h) + var(--safe-t) + 24px);
  }
  .toc ol {
    border-left: 2px solid var(--line-2);
    counter-reset: toc;
  }
  .toc li {
    counter-increment: toc;
  }
  .toc ol a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 0 6px 16px;
    margin-left: -2px;
    border-left: 4px solid transparent;
    line-height: 1.35;
  }
  .toc ol a::before {
    content: counter(toc, decimal-leading-zero);
    font: 400 0.95rem/1.45 var(--display);
    color: var(--faint);
    min-width: 20px;
  }
  .toc ol a:hover {
    border-left-color: var(--brand);
  }
  .toc ol a:hover::before {
    color: var(--brand);
  }
  .toc-cta {
    margin-top: 24px;
    padding: 16px;
    background: var(--ink-2);
    border-left: 4px solid var(--hot);
    font-size: 0.92rem;
    color: var(--dim);
  }
  .toc-cta strong {
    display: block;
    margin-bottom: 4px;
    color: var(--paper);
    font: 400 1.2rem/1.1 var(--display);
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }
}
@media (max-width: 979px) {
  .toc-cta,
  .toc-wide {
    display: none;
  }
}

.content {
  min-width: 0;
}
section {
  scroll-margin-top: calc(var(--bar-h) + var(--safe-t) + 16px);
}
@media (max-height: 500px) {
  section {
    scroll-margin-top: 12px;
  }
}
.content > section + section {
  margin-top: 48px;
}
.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}
/* A section's icon: ink on a yellow square, a hard red shadow. */
.sec-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--brand);
  box-shadow: 3px 3px 0 var(--hot);
}
.sec-icon svg {
  width: 21px;
  height: 21px;
}
h2 {
  margin: 0;
  font: 400 clamp(1.9rem, 4.2vw, 2.5rem) / 1 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
h3 {
  margin: 28px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}
.content p {
  margin: 0 0 14px;
}
.content p:last-child {
  margin-bottom: 0;
}
.dim {
  color: var(--dim);
}

/* Lists with square yellow markers. */
.list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
.list li {
  position: relative;
  padding-left: 22px;
}
.list li + li {
  margin-top: 10px;
}
.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.58em;
  width: 8px;
  height: 8px;
  background: var(--brand);
}

/* Cards: ink slabs, no rounding. */
.card {
  padding: 22px;
  background: var(--ink-2);
}
@media (max-width: 520px) {
  .card {
    padding: 18px 16px;
  }
}
.card > h3:first-child {
  margin-top: 0;
}
.sub + .sub {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 2px solid var(--line);
}
.sub > h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sub > h3::before {
  content: "";
  flex: none;
  width: 5px;
  height: 1.05em;
  background: var(--brand);
  transform: skewX(-12deg);
}
.callout {
  margin: 16px 0 0;
  padding: 14px 16px;
  background: var(--ink-3);
  border-left: 4px solid var(--brand);
}

/* Short promises at the top of the privacy policy. */
.promises {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
@media (min-width: 560px) {
  .promises {
    grid-template-columns: 1fr 1fr;
  }
}
.promise {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--ink-2);
  border-top: 4px solid var(--brand);
}
.promise .sec-icon {
  width: 38px;
  height: 38px;
}
.promise p {
  margin: 0;
  font-size: 0.98rem;
}

/* Support: topic tiles that lift on a hard shadow, and questions that open.
   Four tiles: one column on a phone held upright, else two by two (never
   three and one left alone). */
.tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 44px;
  padding: 0;
  list-style: none;
}
@media (min-width: 560px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  min-height: 72px;
  padding: 16px;
  color: var(--paper);
  text-decoration: none;
  background: var(--ink-2);
  transition:
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}
.tile:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--brand);
}
.tile b {
  display: block;
  font: 400 1.3rem/1.05 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.tile small {
  color: var(--dim);
  font-size: 0.88rem;
}
.faq {
  display: grid;
  gap: 10px;
}
details {
  background: var(--ink-2);
  border-left: 4px solid transparent;
  transition: border-color 0.15s ease;
}
details[open] {
  border-left-color: var(--brand);
}
summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px 14px 18px;
  font-weight: 700;
  line-height: 1.35;
}
summary::-webkit-details-marker {
  display: none;
}
/* A plus on a yellow square. */
summary::after {
  content: "";
  flex: none;
  margin-left: auto;
  width: 28px;
  height: 28px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat,
    var(--brand);
}
/* Open: the same square with a minus. */
details[open] > summary::after {
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
    var(--brand);
}
summary:hover {
  background: var(--ink-3);
}
details[open] > summary:hover {
  background: none;
}
.answer {
  padding: 0 18px 18px;
  color: var(--dim);
}
.answer strong {
  color: var(--paper);
}
/* The way to reach us: an ink slab on a hard red shadow. */
.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  padding: 26px;
  background: var(--ink-2);
  border-top: 4px solid var(--brand);
  box-shadow: 8px 8px 0 var(--hot);
}
.contact-card > div {
  flex: 1 1 280px;
}
.contact-card p {
  margin: 0;
}
.contact-card .actions {
  flex: 0 1 auto;
  margin-top: 0;
}

/* ---------- Footer ---------- */
.foot {
  max-width: 1120px;
  margin: 72px auto 0;
  padding: 24px var(--gutter-r) max(28px, calc(var(--safe-b) + 16px))
    var(--gutter-l);
  border-top: 2px solid var(--line-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  color: var(--faint);
  font-size: 0.92rem;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-left: auto;
}
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--dim);
  text-decoration: none;
  font: 400 1rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.foot a:hover {
  color: var(--brand);
}

/* ---------- Back to top (to-top.js) ---------- */
/* The website's yellow square in the bottom corner, clear of the safe
   areas; it fades in once the reader is well down the page. 48 px: an
   easy thumb. */
.to-top {
  position: fixed;
  right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px));
  bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: var(--brand);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--hot);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0s linear 0.2s;
}
/* Room under the footer's last line: at the very bottom of the page the
   button sits below the footer's links, never on them. */
.foot {
  padding-bottom: calc(48px + 28px + env(safe-area-inset-bottom, 0px));
}
.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.to-top:hover {
  background: var(--paper);
}
.to-top:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}
.to-top svg {
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  .to-top,
  .to-top.is-shown {
    transform: none;
    transition: none;
  }
}
