:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --panel: #ffffff;
  --text: #1d2428;
  --muted: #5d6870;
  --line: #cfd7d7;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --accent-soft: #d8f3ef;
  --blue: #2563eb;
  --red: #b42318;
  --shadow: 0 10px 28px rgba(24, 40, 44, 0.08);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: #eef3ef;
}

.hero,
.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 34px 0 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 0.78rem;
}

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

h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(2rem, 6vw, 4.5rem);
}

.lede {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.top-nav a,
.button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.top-nav a[aria-current="page"],
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.page {
  padding: 28px 0 56px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.search {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  font: inherit;
  background: var(--panel);
}

.flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin: 20px 0 28px;
}

.flow-step {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.flow-step strong {
  display: block;
  margin-bottom: 8px;
}

.flow-step span {
  color: var(--muted);
  font-size: 0.92rem;
}

.flow-step.active {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

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

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

.card,
details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card {
  padding: 16px;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

details {
  margin: 14px 0;
  overflow: hidden;
}

summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 750;
  background: #f8faf8;
}

summary::after {
  content: "Open";
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-size: 0.82rem;
}

details[open] summary::after {
  content: "Expanded";
}

.detail-body {
  padding: 0 16px 16px;
}

.refs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.refs a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: #f7fbfa;
  text-decoration: none;
  font-size: 0.88rem;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #d8dee2;
  border-radius: 6px;
  padding: 12px;
  background: #fbfcfd;
}

pre,
pre code {
  white-space: pre;
}

code {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.9em;
}

.note {
  border-left: 4px solid var(--accent);
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: 0 6px 6px 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .toolbar,
  .grid,
  .grid.three,
  .flow {
    grid-template-columns: 1fr;
  }

  .flow-step {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .hero,
  .page {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    padding-top: 24px;
  }

  .top-nav a,
  .button {
    width: 100%;
    justify-content: center;
  }

  summary {
    align-items: flex-start;
    flex-direction: column;
  }
}
