:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1b2430;
  --muted: #647084;
  --line: #dbe1ea;
  --accent: #0757a8;
  --accent-2: #146c43;
  --accent-3: #8a4b08;
  --surface: #eef4f9;
  --shadow: 0 12px 28px rgba(27, 36, 48, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand:hover,
.card:hover,
.link-list a:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #1b5e5a;
  color: white;
  font-weight: 850;
}

.brand strong,
.brand small {
  display: block;
}

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

.search {
  display: grid;
  gap: 4px;
  width: min(380px, 42vw);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: white;
  font: inherit;
}

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

.sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  height: calc(100vh - 76px);
  overflow: auto;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}

.sidebar nav {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}

.sidebar nav a,
.menu-link {
  display: block;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
}

.sidebar nav a.active,
.menu-link.active,
.sidebar nav a:hover,
.menu-link:hover {
  background: var(--surface);
  text-decoration: none;
}

.sidebar-section h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.menu-group {
  margin: 12px 0;
}

.menu-group summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.content {
  width: min(1120px, 100%);
  padding: 38px;
}

.hero {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.landing-hero {
  display: grid;
  gap: 18px;
  max-width: 980px;
  padding: 34px 0 22px;
}

.landing-section {
  display: grid;
  gap: 18px;
  margin: 34px 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.two-column {
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  align-items: start;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-weight: 750;
}

.button:hover {
  border-color: #a7c8ed;
  text-decoration: none;
}

.button.primary {
  border-color: #1b5e5a;
  background: #1b5e5a;
  color: white;
}

.eyebrow {
  margin: 0;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
}

h2 {
  margin: 32px 0 12px;
}

.landing-section h2 {
  margin-top: 0;
  font-size: 28px;
  line-height: 1.16;
}

h3 {
  margin: 22px 0 8px;
}

.lead {
  max-width: 880px;
  color: var(--muted);
  font-size: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.card {
  min-height: 120px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

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

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 22px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.tag.pillar {
  color: var(--accent);
}

.tag.behaviour {
  color: var(--accent-2);
}

.tag.product {
  color: var(--accent-3);
}

.doc {
  max-width: 900px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.doc h1:first-child {
  font-size: 34px;
}

.doc pre {
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #101828;
  color: white;
}

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.command-card {
  display: grid;
  gap: 16px;
}

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

.command-surface {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.command-surface h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.command-surface-full h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

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

.command-surface ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.command-surface li {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.command-surface code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.link-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.link-list a {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.link-list a:hover {
  border-color: #a7c8ed;
}

.link-list small {
  color: var(--muted);
}

.flow {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.flow-step {
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: var(--panel);
  border-radius: 0 8px 8px 0;
}

.empty,
.loading {
  color: var(--muted);
}

@media (max-width: 860px) {
  .topbar {
    position: static;
    display: grid;
    padding: 16px;
  }

  .search {
    width: 100%;
  }

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

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

  .content {
    padding: 24px 16px 40px;
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}
