/* Curvy Mechanics: one stylesheet, no web fonts, light and dark. */

:root {
  color-scheme: light dark;
  --bg: #f8f5ee;
  --surface: #ffffff;
  --ink: #1a2036;
  --muted: #565d73;
  --line: #e2ddd0;
  --link: #1f47a8;
  --link-hover: #0f2c75;
  --accent: #f2b928;
  --accent-ink: #1a2036;
  --chip: #efe9da;
  --todo-bg: #fff1b8;
  --todo-ink: #5a3d00;
  --radius: 14px;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1424;
    --surface: #171e33;
    --ink: #ebe7dc;
    --muted: #a6adc2;
    --line: #2a3350;
    --link: #f4c85a;
    --link-hover: #ffe08f;
    --accent: #f4c85a;
    --accent-ink: #0f1424;
    --chip: #222b45;
    --todo-bg: #4a3a05;
    --todo-ink: #ffe9a3;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

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

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 20px; padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: 0.01em;
}
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }
.site-nav { display: flex; gap: 18px; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Main */
main { padding: 28px 0 48px; }
h1, h2, h3 { line-height: 1.25; font-weight: 750; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.3rem); margin: 0.2em 0 0.4em; }
h2 { font-size: 1.3rem; margin: 2em 0 0.5em; }
h3 { font-size: 1.05rem; margin: 1.6em 0 0.3em; }
p, ul, ol, table { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: 0.3em; }
.lede { font-size: 1.15rem; color: var(--muted); margin-bottom: 1.4em; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 0;
}
.meta { color: var(--muted); font-size: 0.93rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: var(--chip); padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }

/* Boxes */
.summary {
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: var(--radius); padding: 16px 20px; margin: 1.2em 0 1.6em;
}
.summary h2 { margin-top: 0.2em; font-size: 1.1rem; }
.summary ul { margin-bottom: 0.2em; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin: 0 0 14px;
}
.card h3 { margin-top: 0; font-size: 1.2rem; }
.card p:last-child { margin-bottom: 0; }
.card-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.95rem; }

.game-head { display: flex; align-items: center; gap: 16px; margin-top: 0.4em; }
.game-head h1 { margin: 0; }

.store-soon {
  display: inline-flex; align-items: center; gap: 10px; margin: 0.4em 0 1.2em;
  border: 1px dashed var(--muted); border-radius: 999px; padding: 8px 16px; color: var(--muted); font-weight: 600;
}
.store-soon b { color: var(--ink); }

.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.4em; }
.facts li { margin: 0; background: var(--chip); border-radius: 999px; padding: 4px 12px; font-size: 0.92rem; }

.draft-banner {
  background: var(--todo-bg); color: var(--todo-ink); border-radius: var(--radius);
  padding: 10px 16px; margin: 0 0 1.2em; font-size: 0.95rem;
}

/* Owner TODOs: visible on purpose; deploy.sh refuses to publish while any remain. */
.todo {
  display: block; background: var(--todo-bg); color: var(--todo-ink); border-radius: 8px;
  padding: 6px 10px; margin: 0.4em 0 1em; font-size: 0.9rem; font-weight: 600;
}

/* Tables become stacked rows on a phone. */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font-weight: 700; }
thead th { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 560px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td, table.stack th { display: block; width: 100%; }
  table.stack tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.stack th, table.stack td { border: 0; padding: 2px 0; }
}

.contact {
  font-size: 1.05rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin: 0.6em 0 1.4em;
}
.contact a { font-weight: 700; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { padding-top: 20px; padding-bottom: 32px; }
.site-footer p { margin: 0 0 0.5em; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 0.6em; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* The mark: a moon, a ball and a curved string. */
.mark .moon { fill: var(--accent); }
.mark .ball { fill: var(--ink); }
.mark .string { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }

/* Permission names: break only after the dots. */
code.perm { display: inline-block; margin-top: 2px; overflow-wrap: normal; word-break: normal; }
@media (min-width: 561px) { table.stack tbody th { width: 46%; } }
