/* Atomic Assembly page. Self-contained: no web fonts, no external requests. */
:root {
  --bg: #16110c;
  --surface: #211912;
  --surface-2: #2a2016;
  --line: #4a3822;
  --text: #f0e8d6;
  --muted: #bdae8f;
  --gold: #f2c14e;
  --gold-ink: #231704;
  --link: #f6d27a;
  --red: #d2505a;
  --green: #45b883;
  --yellow: #e5aa2b;
  --blue: #6c8cec;
  --display: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.7 var(--body);
}
a { color: var(--link); }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* top bar */
.topbar { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font-family: var(--ui); font-size: 0.95rem; border-bottom: 1px solid var(--line); }
.topbar a { text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding: 48px 0 56px; }
h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.02;
  margin: 0 0 18px;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.lede { font-size: 1.25rem; line-height: 1.55; margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px; border-radius: 10px;
  font: 700 1rem var(--ui); text-decoration: none;
  background: var(--gold); color: var(--gold-ink); border: 2px solid var(--gold);
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: #ffd978; color: var(--gold-ink); }
.btn.quiet { background: transparent; color: var(--link); border-color: var(--line); }
.btn.quiet:hover { background: var(--surface); color: #fff; }

/* quick facts as deck-colored tiles (red/green/yellow are the game's three decks) */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tile { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); padding: 12px 14px 14px; font-family: var(--ui); }
.tile b { display: block; font: 700 1.5rem/1.15 var(--display); color: var(--text); }
.tile span { font-size: 0.85rem; color: var(--muted); }
.t-red { --c: var(--red); } .t-green { --c: var(--green); } .t-yellow { --c: var(--yellow); } .t-blue { --c: var(--blue); }

.hero-shot img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); }
.hero-shot figcaption, .shots figcaption { font: 0.9rem/1.5 var(--ui); color: var(--muted); margin-top: 10px; }
.hero-shot { margin: 0; }

/* sections */
section { padding: 52px 0; border-top: 1px solid var(--line); }
h2 { font: 700 clamp(1.7rem, 4vw, 2.2rem)/1.15 var(--display); margin: 0 0 18px; color: var(--gold); }
h3 { font: 700 1.25rem/1.3 var(--display); margin: 32px 0 10px; }
p { margin: 0 0 1em; }
.prose { max-width: 40em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

ul.plain, ol.steps { padding-left: 1.3em; margin: 0 0 1em; }
ul.plain li, ol.steps li { margin-bottom: 0.55em; }

/* deck key */
.decks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 8px; }
.deck { border: 1px solid var(--line); border-left: 6px solid var(--c); background: var(--surface); padding: 14px 16px; font-family: var(--ui); font-size: 0.95rem; }
.deck b { display: block; font: 700 1.1rem var(--display); margin-bottom: 4px; }
.deck small { color: var(--muted); }

/* proof tokens */
.tokens { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; padding: 0; list-style: none; }
.token { font: 700 0.85rem var(--ui); padding: 4px 12px; border-radius: 999px; border: 1px solid var(--c); color: var(--c); background: rgba(255, 255, 255, 0.03); }
.k-h2o { --c: var(--green); } .k-nh3 { --c: var(--yellow); } .k-pow { --c: var(--blue); }

/* tables */
.scroll { overflow-x: auto; margin: 14px 0 20px; }
table { border-collapse: collapse; width: 100%; font-family: var(--ui); font-size: 0.95rem; min-width: 460px; }
caption { text-align: left; font: 700 1.05rem var(--display); padding-bottom: 8px; color: var(--text); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: var(--surface); }
td.n { white-space: nowrap; font-variant-numeric: tabular-nums; }
code { font: 0.92em ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
.formula { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--gold); padding: 14px 18px; font-family: var(--ui); margin: 18px 0; }

/* screenshots */
.shots { columns: 3 290px; column-gap: 22px; }
.shots figure { break-inside: avoid; margin: 0 0 24px; }
.shots img { border-radius: 10px; border: 1px solid var(--line); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rules-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; }
.rules-shots figure { margin: 0; }
.rules-shots img { border-radius: 10px; border: 1px solid var(--line); }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font: 700 1.05rem var(--ui); }
details p { margin: 10px 0 0; max-width: 40em; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font: 0.95rem/1.6 var(--ui); color: var(--muted); }
footer a { margin-right: 18px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .hero-shot { max-width: 460px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .two, .decks { grid-template-columns: 1fr; }
  .rules-shots { grid-template-columns: 1fr; max-width: 460px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
