:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #17202a;
  --muted: #5d6b7a;
  --line: #d8dee8;
  --accent: #155e75;
  --accent-2: #0f766e;
  --warn: #9a5b00;
  --danger: #a33a3a;
  --code: #233044;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

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

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

a:hover {
  text-decoration: underline;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.brand {
  margin-bottom: 28px;
}

.brand a {
  color: var(--text);
}

.brand-title {
  display: block;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.25;
}

.brand-subtitle {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.nav-section {
  margin: 22px 0 10px;
  color: #738092;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  color: #2f3b49;
  font-size: 14px;
}

.nav a.active,
.nav a:hover {
  background: var(--surface-2);
  color: var(--accent);
  text-decoration: none;
}

.content {
  max-width: 1040px;
  width: 100%;
  padding: 44px 56px 72px;
}

.hero {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  margin: 0 0 16px;
  font-size: 38px;
  letter-spacing: 0;
}

h2 {
  margin: 42px 0 14px;
  padding-top: 8px;
  font-size: 26px;
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

p {
  margin: 0 0 14px;
}

.lead {
  color: #334155;
  font-size: 18px;
}

.section {
  margin-top: 28px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.card.compact {
  padding: 16px;
}

.card p:last-child,
.callout p:last-child {
  margin-bottom: 0;
}

.callout {
  margin: 20px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #eaf6f8;
}

.callout.warn {
  border-left-color: var(--warn);
  background: #fff7e8;
}

.callout.danger {
  border-left-color: var(--danger);
  background: #fff0f0;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}

.step-list {
  counter-reset: steps;
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  counter-increment: steps;
  position: relative;
  padding: 16px 18px 16px 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.step-list li::before {
  content: counter(steps);
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 760;
  font-size: 13px;
}

.term {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.term-name {
  font-weight: 760;
  color: var(--code);
}

.term-body p {
  margin-bottom: 8px;
}

.tag {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #4b5563;
  font-size: 12px;
}

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

.next {
  margin-top: 44px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #edf2f7;
  color: var(--code);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

ul,
ol {
  padding-left: 22px;
}

li + li {
  margin-top: 6px;
}

.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

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

th {
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .content {
    padding: 28px 20px 56px;
  }

  h1 {
    font-size: 31px;
  }

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

  .term {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
