/* The site's own pages outside the game (privacy, terms, refunds, cookies,
   accessibility, credits, support). One look for all of them. */
:root {
  --bg: #0b0b10;
  --panel: #15151d;
  --text: #ececf1;
  --muted: #a4a4b3;
  --accent: #ffb547;
  --rule: rgba(255, 255, 255, 0.1);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: max(24px, env(safe-area-inset-top)) 16px max(48px, env(safe-area-inset-bottom));
}
main {
  max-width: 760px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 28px clamp(18px, 5vw, 44px) 36px;
}
h1 { font-size: 1.8rem; line-height: 1.2; margin: 0 0 4px; letter-spacing: 0.02em; }
h2 { font-size: 1.1rem; margin: 32px 0 8px; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }
h3 { font-size: 1rem; margin: 20px 0 4px; }
p, li { color: var(--text); }
.muted { color: var(--muted); font-size: 0.92rem; }
ul, ol { padding-left: 1.2em; }
li { margin: 4px 0; }
a { color: var(--accent); }
/* Keyboard focus is always visible. */
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 8px 0; }
th, td { text-align: left; vertical-align: top; padding: 8px 6px; border-top: 1px solid var(--rule); }
th { color: var(--muted); font-weight: 600; }
nav { max-width: 760px; margin: 0 auto 14px; font-size: 0.9rem; line-height: 1.9; }
nav a { text-decoration: none; }
nav a[aria-current="page"] { color: var(--text); }
.contact {
  background: rgba(255, 181, 71, 0.08);
  border: 1px solid rgba(255, 181, 71, 0.35);
  border-radius: 14px;
  padding: 14px 18px;
}
.contact a { font-size: 1.15rem; font-weight: 700; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font: 0.85rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
}
/* The game's pages (how to play, the landing pages, rhymes; README 3.78). */
.lede { font-size: 1.1rem; color: var(--muted); margin: 6px 0 18px; }
.play {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.play:hover { filter: brightness(1.08); }
footer { max-width: 760px; margin: 16px auto 0; font-size: 0.85rem; color: var(--muted); line-height: 1.9; }
footer a { text-decoration: none; }
/* The wide logo over /instructions. It's on black, so `screen` drops the black. */
.site-logo { display: block; width: min(560px, 100%); height: auto; margin: 0 auto 10px; mix-blend-mode: screen; }
.toc { columns: 2 220px; padding-left: 1.2em; }
.toc li { break-inside: avoid; }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 6px;
  border: 1px solid var(--muted);
  border-radius: 6px;
  font: 0.85rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
}
/* Collapsible sections: an arrow before the heading, right when closed,
   down when open. */
.accordion { border-top: 1px solid var(--rule); }
.accordion:last-of-type { border-bottom: 1px solid var(--rule); }
.accordion summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before {
  content: '';
  flex: none;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--accent);
  transition: transform 0.15s ease-out;
}
.accordion[open] summary::before { transform: rotate(90deg); }
.accordion summary h3 { margin: 0; }
.accordion summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
/* Screenshots in /instructions (public/guide/). */
figure { margin: 14px 0 18px; }
figure img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); }
figcaption { margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
figure.narrow img { width: min(320px, 100%); }
/* Phone screenshots, side by side. */
.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.phones figure { margin: 0; }
/* guide.js: each section's screenshots as thumbnails, and the viewer. */
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.thumb {
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: none;
  overflow: hidden;
  cursor: zoom-in;
  height: 90px;
}
.thumb { position: relative; }
.thumb img { display: block; height: 100%; width: auto; }
/* The figure number, in the thumbnail's corner. */
.thumb-num {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--accent);
  color: #111;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}
.fig-refs { color: var(--muted); font-size: 0.9em; white-space: nowrap; }
.thumb:hover, .thumb:focus-visible { border-color: var(--accent); outline: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.94);
}
.lightbox-open { display: flex; }
.lightbox-figure { margin: 0; max-width: min(1100px, 100%); display: flex; flex-direction: column; align-items: center; }
.lightbox-figure img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; border-radius: 10px; }
.lightbox-figure figcaption { margin-top: 10px; color: var(--text); text-align: center; }
.lightbox button {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lightbox-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; }
@media (max-width: 520px) {
  .lightbox-prev, .lightbox-next { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); }
  .lightbox-prev { left: calc(50% - 54px); }
  .lightbox-next { right: calc(50% - 54px); }
}
.yes, .no { text-align: center; font-weight: 800; }
.yes { color: var(--accent); }
.no { color: var(--muted); }
.rhyme-words { columns: 3 160px; padding-left: 0; list-style: none; }
.rhyme-words li { margin: 2px 0; break-inside: avoid; }
.rhyme-index { columns: 4 120px; padding-left: 0; list-style: none; }
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: 16px; top: 12px; background: var(--panel); padding: 6px 10px; border-radius: 8px; }
@media (max-width: 520px) {
  /* Stacked on a phone, except a comparison (.compare), whose columns are the point. */
  table:not(.compare), table:not(.compare) thead, table:not(.compare) tbody, table:not(.compare) tr,
  table:not(.compare) th, table:not(.compare) td { display: block; }
  table:not(.compare) thead { display: none; }
  table:not(.compare) td { border-top: 0; padding: 2px 0; }
  table:not(.compare) tr { border-top: 1px solid var(--rule); padding: 8px 0; }
  table:not(.compare) td:first-child { font-weight: 700; }
  .compare th, .compare td { padding: 6px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
