:root {
  color-scheme: dark light;
  --bg: #101214;
  --surface: #191d21;
  --surface-muted: #22282e;
  --text: #f2f5f7;
  --muted: #a9b3bd;
  --border: #333b43;
  --accent: #69c0a3;
  --accent-strong: #a3e2cf;
  --accent-soft: #142b26;
  --header-bg: rgba(16, 18, 20, 0.9);
  --header-border: rgba(74, 85, 96, 0.74);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f7f6;
    --surface: #ffffff;
    --surface-muted: #eef3f1;
    --text: #17211e;
    --muted: #5d6a66;
    --border: #d7e0dc;
    --accent: #13775d;
    --accent-strong: #0d5744;
    --accent-soft: #e3f5ef;
    --header-bg: rgba(255, 255, 255, 0.92);
    --header-border: rgba(215, 224, 220, 0.86);
    --shadow: 0 20px 45px rgba(23, 33, 30, 0.08);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

a:hover {
  color: var(--accent-strong);
}

code {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-muted);
  padding: 0.1rem 0.3rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  pointer-events: none;
  transform: translateY(calc(-100% - 1px));
  transition: transform 180ms ease;
}

.site-header.is-visible {
  pointer-events: auto;
  transform: translateY(0);
}

.site-header-inner {
  display: flex;
  align-items: center;
  width: min(1120px, calc(100% - 2rem));
  min-height: 4.25rem;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.brand-text {
  font-size: 1rem;
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.intro {
  display: block;
  padding: 1rem 0 3rem;
}

.section-heading h2,
.detail-panel h2,
.notes h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-banner {
  display: block;
  width: 100%;
  height: auto;
}

.intro-copy p {
  max-width: 46rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.overview,
.details-grid,
.notes,
.licence {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 0.55fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.4rem;
}

.section-heading h2,
.notes h2 {
  font-size: 2.45rem;
}

.section-heading p,
.notes-content p,
.licence p,
.detail-panel p,
.step-card p {
  color: var(--muted);
}

.section-heading p {
  margin: 0;
}

.step-grid,
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.step-card,
.detail-panel,
.notes,
.licence {
  border-radius: 8px;
}

.step-card,
.detail-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.3rem;
}

.step-number,
.eyebrow {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.step-card h3 {
  margin: 0.55rem 0 0.55rem;
  font-size: 1.18rem;
}

.step-card p,
.detail-panel p {
  margin: 0;
}

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

.detail-panel h2 {
  margin-top: 0.3rem;
  font-size: 2rem;
}

.detail-panel p {
  margin-top: 0.8rem;
}

.resource-list {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding-left: 1.15rem;
}

.tree-view {
  overflow: auto;
  margin: 1rem 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 1rem;
}

.tree-view code {
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  white-space: pre;
}

.notes {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  gap: 2rem;
}

.notes-content {
  display: grid;
  gap: 1rem;
}

.notes-content p,
.licence p {
  margin: 0;
}

.licence {
  padding: 1rem 0 1.5rem;
  text-align: center;
}

@media (max-width: 860px) {
  .section-heading,
  .step-grid,
  .details-grid,
  .notes {
    grid-template-columns: 1fr;
  }

  .intro {
    padding-top: 1rem;
  }

  .section-heading h2,
  .notes h2 {
    font-size: 2.15rem;
  }
}

@media (max-width: 600px) {
  .site-header-inner {
    min-height: 3.8rem;
  }

  .intro-copy p {
    font-size: 1rem;
  }

  .detail-panel h2,
  .section-heading h2,
  .notes h2 {
    font-size: 2rem;
  }
}
