:root {
  --bg: #ffffff;
  --surface: #f8f9fb;
  --border: #e4e7ec;
  --text: #1f2430;
  --text-muted: #667085;
  --accent: #2554c7;
  --accent-soft: #eef2fd;
  --stripe: #fafbfc;
  --code-bg: #f3f4f8;
  --code-text: #38414f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161c;
    --surface: #1b1e26;
    --border: #2a2e38;
    --text: #e7e9ee;
    --text-muted: #9aa1b0;
    --accent: #7fa2ff;
    --accent-soft: #1e2a4a;
    --stripe: #181b22;
    --code-bg: #1c2029;
    --code-text: #c7cddb;
  }
}
:root[data-theme="dark"] {
  --bg: #14161c;
  --surface: #1b1e26;
  --border: #2a2e38;
  --text: #e7e9ee;
  --text-muted: #9aa1b0;
  --accent: #7fa2ff;
  --accent-soft: #1e2a4a;
  --stripe: #181b22;
  --code-bg: #1c2029;
  --code-text: #c7cddb;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  padding: 2.5rem 2rem 4rem;
}
.wrap { max-width: 980px; margin: 0 auto; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
h1 {
  font-size: 1.7rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 68ch;
  line-height: 1.55;
  margin: 0 0 1.75rem;
}
h2 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 2.4rem 0 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
h3 {
  font-size: 0.88rem;
  font-weight: 650;
  margin: 1.3rem 0 0.5rem;
  color: var(--text);
}
p { line-height: 1.6; font-size: 0.92rem; }
ul, ol { line-height: 1.65; font-size: 0.92rem; padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }
code {
  font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.85em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  margin: 0.8rem 0 1.2rem;
}
pre code { background: none; padding: 0; color: inherit; }

.callout {
  border-radius: 10px;
  background: var(--accent-soft);
  padding: 1rem 1.2rem;
  margin: 0 0 1.6rem;
  font-size: 0.88rem;
  line-height: 1.55;
}
.callout strong { color: var(--accent); }
.callout.warn { background: #fdf1e7; }
.callout.warn strong { color: #c2410c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .callout.warn { background: #3a2a16; }
}
:root[data-theme="dark"] .callout.warn { background: #3a2a16; }

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.8rem;
}
.pill {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  white-space: nowrap;
}
.pill.done { color: #1a8f4c; border-color: #1a8f4c40; }
.pill.next { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.pill.open { color: #c2410c; border-color: #c2410c40; }
.pill.block { color: #b42318; border-color: #b4231840; }

.phase {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 1rem 1.2rem;
  margin-bottom: 0.9rem;
}
.phase-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.phase-name { font-weight: 650; font-size: 0.92rem; }
.phase p { margin: 0 0 0.5rem; }
.phase p:last-child { margin-bottom: 0; }

.table-shell {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  background: var(--surface);
  margin: 0.8rem 0 1.4rem;
}
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 560px; }
thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
tbody td { padding: 0.55rem 0.9rem; vertical-align: top; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr.stripe { background: var(--stripe); }

.filelist { list-style: none; padding: 0; margin: 0.6rem 0 1.4rem; }
.filelist li {
  font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.8rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.filelist li:last-child { border-bottom: none; }
.filelist li strong { color: var(--text); font-weight: 600; font-family: inherit; }

.note { color: var(--text-muted); font-size: 0.82rem; line-height: 1.55; margin: 0.3rem 0 0; }
/* A table wider than the screen scrolls within itself rather than off the edge of the page.
   Without this, on a phone, either the page drags sideways taking the headings with it, or the
   overflowing columns cannot be reached at all. Verified both, at 375px. No desktop effect. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* A long URL or scope string has no space to break at, so without this it runs off the side of
   a phone and drags the whole page with it. Same rule nine other guides already use. */
code { overflow-wrap: anywhere; }
