/* simplebrain.app: one reading column under a slim header. The colors and the heading face are the game's own
   (src/styles/tokens.css: page, ink-deep, accent orange; Fredoka 600). Nothing loads from another site. */
@font-face {
  font-family: 'Mewdoku Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/fredoka-600-latin.woff2') format('woff2');
}

:root {
  --page: #f7f2ef;
  --card: #ffffff;
  --ink: #2f2a35;
  --ink-soft: #6e5a5c;
  --rule: #e6dcd6;
  --accent: #e57010;
  --link: #a84b08;
  --accent-soft: #fde9d6;
  --mark-bg: #fff4d6;
  --mark-ink: #7a4f00;
  --mark-edge: #dd9a12;
  --focus: #b9520a;
  --font-display: 'Mewdoku Display', 'Fredoka', ui-rounded, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --measure: 44rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #211c26;
    --card: #2a2430;
    --ink: #f3ece8;
    --ink-soft: #c9b8b6;
    --rule: #3e3546;
    --accent: #f08a3c;
    --link: #ffa766;
    --accent-soft: #3a2a22;
    --mark-bg: #3d3110;
    --mark-ink: #ffd45c;
    --mark-edge: #8a6a12;
    --focus: #ffa766;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #211c26;
  --card: #2a2430;
  --ink: #f3ece8;
  --ink-soft: #c9b8b6;
  --rule: #3e3546;
  --accent: #f08a3c;
  --link: #ffa766;
  --accent-soft: #3a2a22;
  --mark-bg: #3d3110;
  --mark-ink: #ffd45c;
  --mark-edge: #8a6a12;
  --focus: #ffa766;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--font-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--measure); margin: 0 auto; }

/* Header and footer */
.site-head { padding-block: 20px 8px; }
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 1.25rem/1 var(--font-display);
  color: var(--ink);
  text-decoration: none;
}
.brand svg { width: 32px; height: 32px; flex: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.9375rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; padding-block: 4px; }
.site-nav a:hover { color: var(--link); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

.site-foot {
  margin-top: 64px;
  padding-block: 24px 40px;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { color: var(--ink-soft); }

/* Text */
main { padding-block: 16px 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: 2.25rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
p, ul, ol, dl { margin: 0; }
main > * + *, article > * + *, section > * + * { margin-top: 1rem; }
section { margin-top: 3rem; scroll-margin-top: 16px; }
/* The privacy page holds two documents: the Privacy Policy, then the Terms */
article { scroll-margin-top: 16px; }
article + article { margin-top: 4.5rem; padding-top: 3rem; border-top: 2px solid var(--rule); }
section > h3 { margin-top: 1.75rem; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 0.4em; }
li::marker { color: var(--accent); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
strong { font-weight: 650; }
.meta { color: var(--ink-soft); font-size: 0.9375rem; }
.lede { font-size: 1.1875rem; }
.small { font-size: 0.9375rem; color: var(--ink-soft); }

/* Placeholders the owner and the lawyer settle before the page goes live */
mark.tc {
  background: var(--mark-bg);
  color: var(--mark-ink);
  border-bottom: 2px dashed var(--mark-edge);
  border-radius: 3px;
  padding: 0 0.2em;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.draft {
  background: var(--mark-bg);
  color: var(--mark-ink);
  border: 1px dashed var(--mark-edge);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9375rem;
}

/* The player code, drawn like the one in the game's Settings */
code, .code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* The one card on the policy page */
.summary {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 20px 22px 22px;
  margin-top: 2rem;
}
.summary h2 { font-size: 1.25rem; }

/* Contents */
.toc { margin-top: 2rem; }
.toc h2 { font-size: 1rem; color: var(--ink-soft); }
.toc ol { columns: 2 15rem; column-gap: 32px; margin-top: 0.5rem; }
.toc li { break-inside: avoid; }
.toc li + li { margin-top: 0.25em; }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
thead th {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 600;
  border-bottom-width: 2px;
}
td:last-child { padding-right: 0; }
.keep td:last-child { white-space: nowrap; }

/* Numbered steps (the deletion page): the order is the point */
ol.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px; }
ol.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem 1fr; gap: 12px; align-items: start; margin: 0; }
ol.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--link);
  font: 600 1.125rem/1 var(--font-display);
}
ol.steps li > span { padding-top: 0.3rem; min-width: 0; }

/* The home page */
.game {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px 20px;
  align-items: start;
  margin-top: 2rem;
}
.game svg { width: 72px; height: 72px; }
.game > div { min-width: 0; }
.game > div > * + * { margin-top: 0.6rem; }
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

@media (max-width: 480px) {
  h1 { font-size: 1.875rem; }
  .game { grid-template-columns: 56px 1fr; }
  .game svg { width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-nav, .site-foot { display: none; }
  a { color: inherit; }
  section { break-inside: avoid-page; }
}
