/* Just series web kit: series.css
   One file, byte-identical on every Just site. Do not fork it per app.
   Each page sets its accent on <html style="--accent:...;--accent-dark:...">:
   --accent is used on the light theme, --accent-dark on the dark theme and on the felt header.
   No web fonts, no external requests: the icon is the site's own /app-icon.png. */

:root {
  color-scheme: light dark;
  --bg: #faf6ec;
  --surface: #f3ead5;
  --line: #e0d3b3;
  --text: #2a2118;
  --muted: #63533f;
  --felt: #123b2d;
  --on-felt: #f6efe0;
  --on-felt-muted: #c9d6cc;
  --gold: #e0a526;
  --a: var(--accent, #1c6a45);
  --on-a: #ffffff;
  --a-bright: var(--accent-dark, #e0a526);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c211a;
    --surface: #123028;
    --line: #244a3d;
    --text: #ece4d2;
    --muted: #b5a88f;
    --felt: #0f3326;
    --a: var(--accent-dark, #e0a526);
    --on-a: #16110a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.65 var(--font);
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 1rem; }

.skip {
  position: absolute; left: -9999px; top: .5rem; z-index: 2;
  background: var(--bg); color: var(--text); padding: .5rem .8rem; border-radius: .4rem;
}
.skip:focus { left: .5rem; }

/* Header: the same felt band on every site; icon and accent tell the games apart. */
.site-header {
  background: var(--felt);
  color: var(--on-felt);
  border-bottom: 4px solid var(--a-bright);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem;
}
.brand { display: flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.app-icon {
  flex: none; width: 3rem; height: 3rem; border-radius: .8rem;
  background: #103a2c url("/app-icon.png") center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(224, 165, 38, .5), 0 2px 6px rgba(0, 0, 0, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.series {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-felt-muted);
}
.app-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; }
.app-name em { color: var(--gold); font-weight: 600; }
.site-nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.site-nav a {
  color: var(--on-felt); text-decoration: none; font-size: .92rem; line-height: 1.3;
  padding: .45rem .8rem; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(246, 239, 224, .22);
}
.site-nav a:hover { background: rgba(246, 239, 224, .08); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--a-bright); }
.site-header :focus-visible { outline-color: var(--a-bright); }

/* Content */
main.wrap { flex: 1 0 auto; padding-top: 2rem; padding-bottom: 3rem; }
h1 {
  font-family: var(--serif); font-size: clamp(1.75rem, 1.35rem + 2vw, 2.4rem);
  line-height: 1.15; margin: 0 0 .4rem; text-wrap: balance;
}
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 1.5rem; }
.lead { font-size: 1.1rem; }
h2 {
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.25;
  margin: 2.25rem 0 .6rem; scroll-margin-top: 1rem;
}
h2 .num { color: var(--a); margin-right: .4em; font-variant-numeric: tabular-nums; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.35rem; }
li { margin: .35rem 0; }
li::marker { color: var(--a); }
strong { font-weight: 650; }
a { color: var(--a); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--a); outline-offset: 2px; border-radius: 4px; }

.summary {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--a);
  border-radius: .75rem; padding: 1rem 1.25rem .15rem; margin: 0 0 1.5rem;
}
.summary h2 { margin-top: 0; font-size: 1.1rem; }
.toc { border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin-bottom: .5rem; }
.toc h2 { font-size: 1rem; font-family: var(--font); margin: 0 0 .4rem; color: var(--muted); }
.toc ol { columns: 2 13rem; column-gap: 2rem; padding-left: 1.6rem; font-size: .95rem; }
.toc li { margin: .15rem 0; break-inside: avoid; }
.note {
  background: var(--surface); border: 1px solid var(--line); border-radius: .6rem;
  padding: .75rem 1rem; font-size: .95rem;
}
.steps { list-style: none; counter-reset: step; padding: 0; }
.steps li {
  counter-increment: step; position: relative; padding-left: 2.6rem; margin: .7rem 0; min-height: 1.9rem;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -.05rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--a); color: var(--on-a); font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.button {
  display: inline-block; background: var(--a); color: var(--on-a);
  padding: .75rem 1.2rem; border-radius: .7rem; font-weight: 650;
  text-decoration: none; overflow-wrap: anywhere; line-height: 1.3;
}
.button:hover { filter: brightness(1.08); }

/* Landing hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.hero .app-icon { width: 6rem; height: 6rem; border-radius: 1.4rem; }
.hero-text { flex: 1 1 16rem; }
.tagline {
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 1.5rem 0 2.5rem; }
.site-footer p { margin: 0 0 .5rem; }
.footer-nav a { margin-right: 1rem; display: inline-block; }

@media print {
  .site-nav, .skip, .toc, .footer-nav { display: none; }
  .site-header { background: none; color: #000; border-bottom: 2px solid #000; }
  .series { color: #333; }
  a { color: inherit; }
}
