:root {
  color-scheme: light dark;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --page-width: 74rem;
  --text-width: 70ch;
  --canvas: #f4f4f4;
  --surface: #ffffff;
  --surface-muted: #f8f8f8;
  --ink: #161616;
  --ink-muted: #525252;
  --line: #8d8d8d;
  --line-soft: #d8dee4;
  --header: #161616;
  --header-ink: #ffffff;
  --accent: #1d70b8;
  --accent-strong: #003078;
  --focus: #ffdd00;
  --active-ink: #005a30;
  --active-bg: #cce2d8;
  --active-line: #00703c;
  --current-bg: #e5f1fb;
  --current-line: #1d70b8;
  --locked-bg: #f3f2f1;
  --stopped-ink: #942514;
  --stopped-bg: #f6d7d2;
  --stopped-line: #d4351c;
  --code-bg: #eef1f4;
  --selection: #b3d9ff;
  --radius: 0.25rem;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    "Source Han Sans SC", sans-serif;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111315;
    --surface: #1d2023;
    --surface-muted: #24282c;
    --ink: #f2f4f6;
    --ink-muted: #b9c0c7;
    --line: #8b949e;
    --line-soft: #3e454d;
    --header: #090a0b;
    --header-ink: #ffffff;
    --accent: #78a9ff;
    --accent-strong: #a6c8ff;
    --focus: #ffdd00;
    --active-ink: #b6f1cf;
    --active-bg: #133c28;
    --active-line: #42be65;
    --current-bg: #162d45;
    --current-line: #78a9ff;
    --locked-bg: #2c3034;
    --stopped-ink: #ffb3a7;
    --stopped-bg: #4a211c;
    --stopped-line: #ff8389;
    --code-bg: #2b3035;
    --selection: #264f78;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--selection);
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

a:focus-visible,
summary:focus-visible {
  outline: 0.25rem solid var(--focus);
  outline-offset: 0.2rem;
  box-shadow: 0 0 0 0.15rem #0b0c0c;
}

p,
dd {
  max-width: var(--text-width);
}

h1,
h2,
h3,
h4,
p,
dl,
ol {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 {
  max-width: 16ch;
  margin-bottom: var(--space-5);
  font-size: clamp(2.35rem, 6vw, 4.75rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
  font-size: clamp(1.3rem, 2.3vw, 1.75rem);
}

h4 {
  margin-bottom: var(--space-2);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 0.2rem;
  background: var(--code-bg);
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0;
  left: var(--space-4);
  transform: translateY(-140%);
  padding: var(--space-3) var(--space-4);
  background: var(--focus);
  color: #0b0c0c;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-top: 0.3rem solid var(--accent);
  background: var(--header);
  color: var(--header-ink);
}

.site-header__inner,
.hero,
.board-section,
.sources-section,
.site-footer {
  width: min(calc(100% - 2rem), var(--page-width));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  width: fit-content;
  color: var(--header-ink);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-name__mark {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 0.12rem solid currentColor;
  font-size: 0.9rem;
  line-height: 1;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.site-header nav a {
  color: var(--header-ink);
  font-weight: 650;
  text-decoration-color: var(--accent);
}

.site-header nav span {
  display: inline-block;
  min-width: 1.5rem;
  margin-left: var(--space-1);
  padding-inline: var(--space-1);
  border-radius: 2rem;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-size: 0.78rem;
}

.hero {
  padding-block: var(--space-8) var(--space-9);
}

.eyebrow,
.section-kicker {
  margin-bottom: var(--space-3);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.lead {
  margin-bottom: var(--space-7);
  color: var(--ink-muted);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.55;
}

.summary-strip {
  display: grid;
  margin-bottom: var(--space-5);
  border-top: 0.1rem solid var(--line);
  border-bottom: 0.1rem solid var(--line);
}

.summary-strip > div {
  padding-block: var(--space-4);
}

.summary-strip > div + div {
  border-top: 0.05rem solid var(--line-soft);
}

.summary-strip dt,
.source-line dt,
.version-list dt {
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.summary-strip dd,
.source-line dd,
.version-list dd {
  margin: 0;
}

.summary-strip dd {
  margin-top: var(--space-1);
  font-size: 1.05rem;
}

.summary-strip strong {
  margin-right: var(--space-1);
  font-size: 2rem;
  line-height: 1;
}

.snapshot-note {
  margin-bottom: 0;
  padding-left: var(--space-4);
  border-left: 0.3rem solid var(--accent);
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.board-section,
.sources-section {
  padding-block: var(--space-8);
  border-top: 0.35rem solid var(--line);
}

.board-section--active {
  border-color: var(--active-line);
}

.board-section--stopped {
  border-color: var(--stopped-line);
}

.section-heading {
  display: grid;
  gap: var(--space-5);
  align-items: end;
  margin-bottom: var(--space-7);
}

.section-heading > p {
  margin-bottom: 0;
  color: var(--ink-muted);
}

.section-heading--compact {
  margin-bottom: var(--space-6);
}

.work-list {
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-card,
.stopped-card {
  border: 0.08rem solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.work-card {
  border-top: 0.35rem solid var(--active-line);
}

.work-card__header {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border-bottom: 0.08rem solid var(--line-soft);
}

.work-card__header h3 {
  margin-bottom: 0;
}

.work-number {
  flex: 0 0 auto;
  padding-top: var(--space-1);
  color: var(--active-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 800;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-3);
}

.status,
.scope,
.stage-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.7rem;
  padding: 0.18rem 0.55rem;
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
}

.status--active {
  background: var(--active-bg);
  color: var(--active-ink);
}

.status--stopped {
  background: var(--stopped-bg);
  color: var(--stopped-ink);
}

.scope {
  border: 0.08rem solid var(--line);
  color: var(--ink-muted);
}

.plain-grid {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
}

.plain-grid > div {
  padding: var(--space-4);
  background: var(--surface-muted);
}

.plain-grid p {
  margin-bottom: 0;
}

.stage-list {
  margin: 0 var(--space-5) var(--space-5);
  padding: 0;
  border-top: 0.08rem solid var(--line-soft);
  list-style: none;
}

.stage {
  display: grid;
  gap: var(--space-3);
  padding-block: var(--space-4);
  border-bottom: 0.08rem solid var(--line-soft);
}

.stage-label {
  align-self: start;
  justify-content: center;
  min-width: 5.4rem;
}

.stage--done .stage-label {
  background: var(--active-bg);
  color: var(--active-ink);
}

.stage--current .stage-label {
  background: var(--current-bg);
  color: var(--accent-strong);
}

.stage--locked .stage-label {
  border: 0.08rem solid var(--line);
  background: var(--locked-bg);
  color: var(--ink-muted);
}

.source-line {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4) var(--space-5);
  border-top: 0.08rem solid var(--line-soft);
  background: var(--surface-muted);
}

.source-line > div {
  display: grid;
  gap: var(--space-1);
}

.stopped-grid {
  display: grid;
  gap: var(--space-4);
}

.stopped-card {
  padding: var(--space-5);
  border-top: 0.3rem solid var(--stopped-line);
}

.stopped-card h3 {
  margin-bottom: var(--space-5);
}

.stopped-card p:last-child {
  margin-bottom: 0;
}

.continuation {
  padding-top: var(--space-3);
  border-top: 0.08rem solid var(--line-soft);
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.boundary-note {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border-left: 0.35rem solid var(--line);
  background: var(--surface);
}

.boundary-note h3 {
  margin-bottom: var(--space-3);
  font-size: 1.2rem;
}

.boundary-note p {
  margin-bottom: 0;
}

.source-grid {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.source-grid > div {
  padding-top: var(--space-4);
  border-top: 0.18rem solid var(--accent);
}

.source-grid h3 {
  margin-bottom: var(--space-3);
  font-size: 1.1rem;
}

.source-grid p {
  margin-bottom: 0;
}

details {
  border-top: 0.08rem solid var(--line);
  border-bottom: 0.08rem solid var(--line);
}

summary {
  padding-block: var(--space-4);
  cursor: pointer;
  font-weight: 750;
}

.version-list {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.version-list > div {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) 2fr;
  gap: var(--space-3);
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  justify-content: space-between;
  padding-block: var(--space-6);
  border-top: 0.08rem solid var(--line);
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.site-footer p {
  margin-bottom: var(--space-2);
}

.site-footer a {
  flex: 0 0 auto;
}

@media (min-width: 44rem) {
  .site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .summary-strip > div + div {
    padding-left: var(--space-5);
    border-top: 0;
    border-left: 0.05rem solid var(--line-soft);
  }

  .section-heading {
    grid-template-columns: minmax(18rem, 1fr) minmax(20rem, 0.8fr);
  }

  .section-heading--compact {
    grid-template-columns: 1fr;
  }

  .plain-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stage {
    grid-template-columns: 7rem 1fr;
  }

  .source-line {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer {
    flex-direction: row;
  }
}

@media (min-width: 60rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(19rem, 0.8fr);
    gap: var(--space-8);
    align-items: end;
  }

  .hero__copy {
    grid-row: span 2;
  }

  .summary-strip {
    grid-template-columns: 1fr;
    margin-bottom: 0;
  }

  .summary-strip > div + div {
    padding-left: 0;
    border-top: 0.05rem solid var(--line-soft);
    border-left: 0;
  }

  .snapshot-note {
    grid-column: 2;
  }

  .stopped-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 10pt;
  }

  .site-header nav,
  .skip-link,
  .site-footer > a {
    display: none;
  }

  .site-header {
    border-top-color: #000000;
    background: #ffffff;
    color: #000000;
  }

  .site-name {
    color: #000000;
  }

  .hero,
  .board-section,
  .sources-section {
    padding-block: 1.5rem;
  }

  .work-card,
  .stopped-card,
  .boundary-note,
  .source-grid > div {
    break-inside: avoid;
  }

  a {
    color: #000000;
  }
}
