* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #18202a;
  background: #f5f7f9;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: #2458a6;
  text-decoration: none;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  min-height: 48px;
  border-bottom: 1px solid #d9e0e8;
  background: #fff;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1400px);
  min-height: 47px;
  padding: 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #18202a;
  font-weight: 700;
}

.brand-mark {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  color: #314158;
}

.site-nav a:hover,
.site-nav a.active {
  background: #eef5ff;
  color: #2458a6;
}

.nav-toggle {
  display: none;
  min-height: 34px;
  border: 1px solid #2458a6;
  border-radius: 6px;
  color: #fff;
  background: #2458a6;
}

.manual-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: min(100%, 1400px);
  min-height: calc(100vh - 48px);
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
  border-right: 1px solid #d9e0e8;
  background: #eef2f5;
}

.pane-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  border-bottom: 1px solid #d4dce5;
  background: #eef2f5;
  font-weight: 700;
}

.toc {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #314158;
  font-size: 14px;
}

.toc a:hover {
  background: #fff;
  color: #2458a6;
}

.content-pane {
  width: min(100%, 1120px);
  padding: 28px 28px 56px;
}

.intro,
.section {
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #fff;
}

.intro {
  display: grid;
  gap: 12px;
  padding: 28px;
}

.eyebrow {
  margin: 0;
  color: #637083;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 900px;
  font-size: 30px;
  line-height: 1.35;
}

.lead {
  margin: 0;
  max-width: 820px;
  color: #536071;
  font-size: 16px;
  line-height: 1.8;
}

.section {
  margin-top: 18px;
  padding: 22px;
}

.section h2 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.4;
}

.section p {
  margin: 0 0 12px;
  line-height: 1.8;
}

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

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

.feature,
.route,
.trouble-list article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #fafbfc;
}

.feature strong,
.route strong,
.trouble-list strong {
  display: block;
  margin-bottom: 8px;
  line-height: 1.45;
}

.feature p,
.route p,
.trouble-list p {
  margin: 0;
  color: #536071;
  font-size: 14px;
}

.route {
  display: grid;
  gap: 8px;
  color: inherit;
}

.route span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2458a6;
  font-size: 12px;
  font-weight: 700;
}

.notice {
  border-color: #cfe2d8;
  background: #f7fbf8;
}

.definition-list {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #fff;
}

.definition-list dt {
  color: #637083;
  font-weight: 700;
}

.definition-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

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

.flow-step {
  position: relative;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #fafbfc;
}

.flow-step span,
.timeline span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: #2458a6;
  font-weight: 700;
}

.flow-step strong {
  display: block;
  margin-top: 10px;
}

.flow-step p {
  margin: 6px 0 0;
  color: #536071;
  font-size: 14px;
}

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

.check-list li {
  padding: 10px 12px;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #fafbfc;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 22px;
  min-width: 0;
}

.steps li {
  padding-left: 4px;
  min-width: 0;
}

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

pre {
  margin: 10px 0 0;
  padding: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #edf1f5;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.callout {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d8dfc0;
  border-radius: 8px;
  background: #fffdf0;
}

.callout strong {
  display: block;
  margin-bottom: 6px;
}

.callout p {
  margin: 0;
}

.next-action {
  margin-top: 16px;
}

.next-action a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #2458a6;
  border-radius: 6px;
  color: #fff;
  background: #2458a6;
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #fafbfc;
}

.timeline p {
  margin: 3px 0 0;
}

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

@media (max-width: 980px) {
  .manual-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .content-pane {
    padding: 22px;
  }

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

@media (max-width: 760px) {
  .topbar-inner {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }

  .brand {
    min-height: 34px;
    flex: 1 1 auto;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 4px;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    justify-content: flex-start;
    min-height: 38px;
  }

  .manual-layout {
    display: block;
    min-height: auto;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #d9e0e8;
  }

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

  .content-pane {
    padding: 16px;
  }

  .intro,
  .section {
    padding: 18px;
  }

  h1 {
    font-size: 24px;
  }

  .feature-grid,
  .feature-grid.compact,
  .route-grid,
  .flow,
  .trouble-list {
    grid-template-columns: 1fr;
  }

  .definition-list {
    grid-template-columns: 1fr;
  }
}

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

  .brand span {
    max-width: 220px;
  }

  .intro,
  .section {
    padding: 14px;
  }
}
