:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #66736d;
  --line: #dce4df;
  --surface: #f7f9f6;
  --panel: #ffffff;
  --accent: #1f7a5a;
  --accent-strong: #155f47;
  --source: #e8f2ef;
  --view: #eef3ff;
  --report: #fff3da;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 24px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.brand {
  display: grid;
  gap: 4px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.nav a {
  padding: 9px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 160ms ease, transform 160ms ease;
}

.nav a:hover {
  color: var(--accent-strong);
  transform: translateX(3px);
}

.status {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 28px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.status b {
  color: var(--ink);
  font-weight: 650;
}

.content {
  min-width: 0;
  padding: 34px 44px 56px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 10px;
  max-width: 780px;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
}

.intro p {
  max-width: 800px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.meta {
  min-width: 240px;
  display: grid;
  gap: 7px;
  padding: 14px 0 0;
  border-top: 2px solid var(--accent);
  color: var(--muted);
  font-size: 13px;
}

.meta strong {
  color: var(--ink);
}

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

.section h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: 0;
}

.section > p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 900px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.legend .source {
  background: var(--source);
}

.legend .view {
  background: var(--view);
}

.legend .report {
  background: var(--report);
}

.diagram-wrap {
  overflow: auto;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mermaid {
  min-width: 1180px;
}

.notes {
  display: grid;
  gap: 12px;
  max-width: 980px;
}

.note {
  padding: 0 0 0 14px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.note strong {
  color: var(--ink);
}

.deploy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step {
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

.step b {
  display: block;
  margin-bottom: 6px;
}

.step span {
  color: var(--muted);
  font-size: 14px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  color: var(--accent-strong);
}

@media (max-width: 900px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status {
    position: static;
    margin-top: 20px;
  }

  .content {
    padding: 26px 20px 42px;
  }

  .intro {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }

  .deploy {
    grid-template-columns: 1fr;
  }
}
