/* Help pages of Symmetry Explorer, Symmetry Mechanical and Symmetry Domer: one stylesheet for the three. */
:root {
  --bg: #fafaf8; --panel: #ffffff; --ink: #1d2330; --muted: #5d6677; --line: #dcdfe6;
  --accent: #2b5fc7; --accent-ink: #ffffff; --accent-soft: #e7eefc; --red: #c8261c; --cyan: #0f8fa3; --code: #f0f1f4;
  --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 8px 24px rgba(20, 30, 45, .07);
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181f; --panel: #1c2029; --ink: #e6e9f0; --muted: #98a1b3; --line: #2e3442;
    --accent: #7fa6ff; --accent-ink: #0b1118; --accent-soft: #232c45; --red: #ff6b5e; --cyan: #5fd0e3; --code: #252a35;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #15181f; --panel: #1c2029; --ink: #e6e9f0; --muted: #98a1b3; --line: #2e3442;
  --accent: #7fa6ff; --accent-ink: #0b1118; --accent-soft: #232c45; --red: #ff6b5e; --cyan: #5fd0e3; --code: #252a35;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, "Segoe UI", sans-serif; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* ---------- top bar: the three programs ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topwrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; min-height: 52px; display: flex; align-items: center; gap: 18px; }
.topwrap .brand { font-weight: 700; letter-spacing: .01em; }
.progs { display: flex; gap: 4px; }
.progs a { color: var(--muted); text-decoration: none; padding: 5px 12px; border-radius: 8px; font-size: .95rem; }
.progs a:hover { background: var(--accent-soft); color: var(--ink); }
.progs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.topright { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.topright a { text-decoration: none; color: var(--muted); }
.topright a:hover { color: var(--accent); }
.themebtn { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: .88rem; }
.themebtn:hover { background: var(--accent-soft); }

/* ---------- page ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 40px; }
nav.toc { position: sticky; top: 52px; align-self: start; padding: 28px 0; font-size: 14px; max-height: calc(100vh - 52px); overflow: auto; }
nav.toc strong { display: block; margin-bottom: 8px; font-size: 15px; }
nav.toc a { display: block; padding: 3px 0 3px 10px; color: var(--muted); text-decoration: none; border-left: 2px solid var(--line); }
nav.toc a:hover { color: var(--accent); border-left-color: var(--accent); }
nav.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
main { padding: 28px 0 80px; min-width: 0; }
h1 { font-size: 2.2rem; line-height: 1.15; margin: 0 0 6px; }
h2 { font-size: 1.4rem; margin: 2.4em 0 .5em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.05rem; margin: 1.6em 0 .3em; }
p, ul, ol { margin: .6em 0; }
li { margin: .25em 0; }
.lead { color: var(--muted); font-size: 1.12rem; }
code, kbd { background: var(--code); border-radius: 4px; padding: 1px 6px; font-size: .9em; }
kbd { border: 1px solid var(--line); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 1em 0; }
.note { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 4px; margin: 1em 0; }
table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; background: var(--panel); }
th, td { text-align: left; padding: 7px 10px; border: 1px solid var(--line); vertical-align: top; }
th { background: var(--accent-soft); }
.tablewrap { overflow-x: auto; }
.r { color: var(--red); font-weight: 600; } .c { color: var(--cyan); font-weight: 600; }

/* ---------- screenshots ---------- */
figure.shot { margin: 1.4em 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
figure.shot a { display: block; line-height: 0; }
figure.shot img { display: block; width: 100%; }
figure.shot figcaption { padding: 10px 14px; font-size: .9rem; color: var(--muted); line-height: 1.45; border-top: 1px solid var(--line); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 1.4em 0; }
.shots figure.shot { margin: 0; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 1.4em 0; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.feature h3 { margin: 0 0 .25em; font-size: 1rem; }
.feature p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.feature .tag { display: inline-block; margin-bottom: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

/* the last section of a page is at least one screen tall, so that its link in the contents list can scroll it to the top */
section.last { min-height: calc(100vh - 130px); }

/* ---------- licence texts (licenses.html) ---------- */
pre.lic { background: var(--code); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: .82rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- gamepad diagram ---------- */
.padkey { margin: .4em 0 0; color: var(--muted); font-size: .9rem; }

@media (max-width: 860px) {
  .wrap { grid-template-columns: 1fr; gap: 0; }
  nav.toc { position: static; max-height: none; padding-bottom: 0; }
  .topwrap { gap: 8px; }
  .topwrap .brand { display: none; }
}
@media print { .topbar, nav.toc, .themebtn { display: none; } .wrap { display: block; } body { background: #fff; } }
