:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-muted: #edf3f5;
  --ink: #172033;
  --muted: #5d6876;
  --line: #d9e1e7;
  --blue: #2f6fba;
  --green: #1f8a70;
  --gold: #b9822b;
  --red: #b14b4b;
  --code-bg: #101827;
  --code-ink: #eaf2ff;
  --shadow: 0 18px 48px rgba(23, 32, 51, 0.11);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

code,
pre {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

code {
  border: 1px solid rgba(47, 111, 186, 0.16);
  border-radius: 5px;
  background: #eef4fb;
  color: #183f69;
  padding: 0.08rem 0.32rem;
  font-size: 0.92em;
}

pre {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 1rem 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

pre code {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: table;
}

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

th {
  background: #eef5f7;
  color: #223043;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 20;
  border-radius: 5px;
  background: var(--ink);
  color: white;
  padding: 0.55rem 0.75rem;
}

.skip-link:focus {
  left: 0.75rem;
}

.site-header {
  background:
    linear-gradient(135deg, rgba(47, 111, 186, 0.12), rgba(31, 138, 112, 0.14)),
    #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 3.6rem 1.5rem 2.7rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 2.4rem;
  align-items: end;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

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

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.1rem, 3.2vw, 3.6rem);
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
}

h3 {
  margin: 1.4rem 0 0.55rem;
  font-size: 1.08rem;
}

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

.status-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.status-panel dl {
  margin: 0;
}

.status-panel div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.8rem;
  padding: 0.86rem 1rem;
  border-bottom: 1px solid var(--line);
}

.status-panel div:last-child {
  border-bottom: 0;
}

.status-panel dt {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
}

.status-panel dd {
  min-width: 0;
  margin: 0;
  font-weight: 700;
}

.status-panel code {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  font-size: 0.78rem;
}

.layout {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2.2rem;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding-top: 1.8rem;
}

.sidebar nav {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.55rem;
}

.sidebar a {
  display: block;
  border-radius: 6px;
  color: #2b3647;
  text-decoration: none;
  padding: 0.48rem 0.62rem;
  font-size: 0.93rem;
  font-weight: 700;
}

.sidebar a:hover,
.sidebar a:focus {
  background: #eaf4f2;
  color: #0f5f4d;
}

.content {
  min-width: 0;
  padding-top: 1.8rem;
}

.doc-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
  margin-bottom: 1.2rem;
  padding: 1.6rem;
  scroll-margin-top: 1.5rem;
}

.doc-section > p:first-of-type {
  margin-top: 0;
}

.overview-flow,
.config-grid,
.ops-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
}

.overview-flow {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  gap: 0;
  overflow: hidden;
}

.overview-row {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
}

.overview-row:last-child {
  border-bottom: 0;
}

.overview-label {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  color: var(--green);
  font-weight: 800;
  white-space: nowrap;
}

.overview-row p {
  margin: 0;
}

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

.config-grid article,
.ops-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 1rem;
}

.config-grid h3,
.ops-grid h3 {
  margin-top: 0;
}

.code-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1rem;
  align-items: stretch;
}

.code-pair ul {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 1rem 1rem 1rem 1.35rem;
}

.media {
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  overflow: hidden;
}

.media img {
  display: block;
  width: 100%;
  height: auto;
}

.media figcaption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.75rem 0.9rem;
}

.media.compact {
  max-width: 900px;
}

.steps {
  padding-left: 1.3rem;
}

.steps li {
  margin-bottom: 0.68rem;
}

.artifact-list {
  padding-left: 1.25rem;
}

.artifact-list li {
  margin-bottom: 0.45rem;
}

@media (max-width: 980px) {
  .header-inner,
  .layout {
    grid-template-columns: 1fr;
  }

  .header-inner {
    padding-top: 2.6rem;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding-top: 1rem;
  }

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

  .overview-row,
  .config-grid,
  .ops-grid,
  .code-pair {
    grid-template-columns: 1fr;
  }

  .overview-row {
    gap: 0.35rem;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .header-inner,
  .layout {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .doc-section {
    padding: 1.05rem;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th,
  td {
    padding: 0.7rem;
  }

  .status-panel div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
