:root {
  color-scheme: light;
  --ink: #111111;
  --text: #242424;
  --muted: #666666;
  --faint: #8a8a8a;
  --line: #dfdfdf;
  --soft: #f5f5f5;
  --paper: #fafafa;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.62;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

code {
  overflow-wrap: anywhere;
}

.page {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--line);
}

.brand,
.footer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-weight: 800;
}

.brand img,
.footer img {
  border-radius: 6px;
  filter: grayscale(1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
  flex-wrap: wrap;
}

.nav a:hover {
  color: var(--ink);
}

.hero {
  padding: 68px 0 40px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 560px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 4rem;
  line-height: 0.98;
}

h2 {
  max-width: 620px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1.14;
}

h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1rem;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.github-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.section {
  padding: 58px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 24px;
}

.media-panel {
  margin: 0 0 34px;
}

.media-panel img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.desktop-panel {
  width: min(430px, 100%);
  margin-inline: auto;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.workflow-diagram {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.flow-node,
.artifact-node,
.flow-loop {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: start;
  min-width: 0;
  min-height: 62px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.start-node,
.done-node {
  background: var(--white);
}

.implement-node {
  border-color: #b8b8b8;
}

.flow-node strong,
.artifact-node strong,
.flow-loop strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.flow-node span,
.artifact-node span,
.flow-loop span {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.flow-arrow {
  height: 24px;
  color: var(--faint);
  font-weight: 800;
  line-height: 24px;
  text-align: center;
}

.flow-loop {
  margin-top: 16px;
  border-style: dashed;
}

.artifact-node {
  margin-top: 10px;
  border-style: dashed;
  background: var(--soft);
}

.architecture-diagram {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.arch-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.arch-node,
.arch-live {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 78px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.arch-wide {
  min-height: 68px;
  background: var(--white);
}

.arch-store {
  border-style: dashed;
  background: var(--soft);
}

.arch-node strong,
.arch-live strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.arch-node span,
.arch-live span {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.arch-arrow {
  height: 20px;
  color: var(--faint);
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.arch-live {
  min-height: auto;
  border-style: dashed;
  background: var(--white);
}

.command-grid {
  display: grid;
  gap: 14px;
}

.command-grid > div {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

pre {
  overflow-x: auto;
  max-width: 100%;
  margin: 0;
  padding: 16px;
  background: #111111;
  border-radius: 8px;
  color: #eeeeee;
  font-size: 0.9rem;
}

.footer {
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (max-width: 680px) {
  .page {
    width: min(100% - 28px, 760px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 13px;
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 52px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .flow-node,
  .artifact-node,
  .flow-loop {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .arch-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .page {
    width: min(100% - 24px, 760px);
  }

  .topbar {
    padding-top: 22px;
  }

  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.48rem;
  }

  .hero-actions a {
    width: 100%;
    justify-content: center;
  }

  .workflow-diagram,
  .architecture-diagram {
    padding: 12px;
  }

  .flow-node,
  .artifact-node,
  .flow-loop,
  .arch-node,
  .arch-live,
  .command-grid > div {
    padding: 14px;
  }

  pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}
