:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --panel-2: #eef2f7;
  --text: #172033;
  --muted: #5e6b7f;
  --line: #d9e0ea;
  --accent: #0f766e;
  --accent-2: #d97706;
  --accent-3: #334155;
  --code: #111827;
  --code-bg: #eef2f7;
  --shadow: 0 18px 48px rgba(23, 32, 51, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); color: var(--text); font-size: 16px; }

body { margin: 0; line-height: 1.65; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 251, 0.94);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 7px;
  background: var(--text);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 0.9rem;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.hero {
  display: grid;
  grid-template-columns: max-content minmax(280px, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  min-height: calc(100vh - 7rem);
  padding-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.18; letter-spacing: 0; }

h1 {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(2.4rem, 4.9vw, 4.05rem);
}

h1 span {
  display: block;
  white-space: nowrap;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4vw, 3rem);
}

h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

.lead {
  max-width: 56ch;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.16rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--text);
  border-radius: 7px;
  background: var(--text);
  color: #fff;
  font-weight: 720;
  text-decoration: none;
}

.button.secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.terminal {
  margin: 1.5rem 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #d1fae5;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: #9ca3af;
  font-size: 0.78rem;
}

.terminal pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}

code, pre {
  font-family: "SF Mono", "Cascadia Code", "Roboto Mono", ui-monospace, monospace;
}

:not(pre) > code {
  padding: 0.12rem 0.3rem;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--code);
  font-size: 0.92em;
}

.diagram-panel {
  min-width: 0;
  width: min(100%, 500px);
  min-height: 680px;
  align-self: center;
  justify-self: end;
  display: flex;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.diagram-panel svg { width: 100%; height: 100%; display: block; }

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}

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

.card {
  min-height: 100%;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.card p { margin: 0; color: var(--muted); }

.metric {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 780;
  line-height: 1;
}

.doc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.doc-link {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-weight: 720;
  text-decoration: none;
}

.doc-link span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 450;
}

.page > h1:first-child {
  max-width: 18ch;
  margin-bottom: 1rem;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.page > p, .page > ul, .page > ol, .page > table, .page > h2, .page > h3, .page > pre {
  max-width: 840px;
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th, td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th { background: var(--panel-2); font-weight: 720; }

pre {
  max-width: 100%;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .diagram-panel {
    width: min(100%, 500px);
    justify-self: start;
  }
}

@media (max-width: 860px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .site-nav { justify-content: flex-start; }
  .split, .grid, .doc-list { grid-template-columns: 1fr; }
  h1 span { white-space: normal; }
}
