:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f9fbfd;
  --text: #18212f;
  --muted: #5f6f85;
  --line: #dce3ec;
  --line-strong: #c6d1df;
  --accent: #1769e0;
  --accent-dark: #0f4fb1;
  --accent-soft: #e8f1ff;
  --success-soft: #eaf8f1;
  --warning-soft: #fff7e6;
  --warning-line: #f2d28b;
  --code-bg: #101928;
  --code-text: #eaf0f8;
  --shadow: 0 12px 34px rgba(24, 33, 47, 0.08);
  --radius: 8px;
  --topbar-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

code {
  border-radius: 5px;
  background: #eef3f8;
  color: #162235;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  padding: 0.1rem 0.28rem;
}

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

pre code {
  display: block;
  min-width: max-content;
  padding: 1.1rem 1.25rem;
  background: transparent;
  color: var(--code-text);
  font-size: 0.92rem;
  line-height: 1.68;
}

.copy-button {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7fb;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0.42rem 0.55rem;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
  object-fit: contain;
  flex: 0 0 auto;
}

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

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.console-button,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  border-radius: 7px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.console-button,
.primary-action {
  background: var(--accent);
  color: #fff;
  padding: 0.45rem 0.9rem;
}

.console-button:hover,
.primary-action:hover {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  padding: 0.45rem 0.9rem;
}

.secondary-action:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  padding: 0.45rem;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 999px;
  background: var(--text);
}

.mobile-menu {
  display: none;
}

.page-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 820px) 210px;
  gap: 2rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.sidebar,
.toc {
  position: sticky;
  top: calc(var(--topbar-height) + 1.5rem);
  align-self: start;
  max-height: calc(100vh - var(--topbar-height) - 3rem);
  overflow: auto;
}

.sidebar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.sidebar__section + .sidebar__section {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.sidebar__label,
.toc__label {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar a,
.toc a {
  display: block;
  border-radius: 6px;
  color: #314054;
  font-size: 0.92rem;
  line-height: 1.35;
  padding: 0.45rem 0.55rem;
  text-decoration: none;
}

.sidebar a:hover,
.toc a:hover,
.sidebar a.is-active,
.toc a.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.toc {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

.content {
  min-width: 0;
}

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

.hero {
  padding: 2rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero__summary {
  max-width: 680px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.doc-section {
  margin-top: 1.2rem;
  padding: 1.65rem;
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
}

.section-heading {
  margin-bottom: 1.2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.25;
  letter-spacing: 0;
}

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

.info-tile {
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--text);
  padding: 0.95rem;
  text-decoration: none;
}

.info-tile:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}

.info-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.info-tile strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 0.28rem;
  font-size: 0.98rem;
}

.notice,
.warning {
  border-radius: var(--radius);
  padding: 1rem;
}

.notice {
  margin-top: 1rem;
  border: 1px solid #b9d5ff;
  background: var(--accent-soft);
}

.warning {
  border: 1px solid var(--warning-line);
  background: var(--warning-soft);
}

.notice strong,
.warning strong {
  display: block;
  margin-bottom: 0.3rem;
}

.notice p,
.warning p {
  margin: 0;
}

.step-card {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.3rem 0;
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
}

.step-card:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.step-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

h3 {
  margin: 0 0 0.55rem;
  font-size: 1.22rem;
  line-height: 1.35;
  letter-spacing: 0;
}

h4 {
  margin: 1.45rem 0 0.5rem;
  font-size: 1.02rem;
  line-height: 1.35;
  letter-spacing: 0;
}

p {
  margin: 0.65rem 0;
}

ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.35rem;
}

.guide-block,
.faq-item {
  border-top: 1px solid var(--line);
  padding-top: 1.35rem;
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
}

.guide-block + .guide-block,
.faq-item + .faq-item {
  margin-top: 1.35rem;
}

.guide-block:first-of-type,
.faq-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar__inner {
    padding: 0 1rem;
  }

  .menu-toggle {
    display: inline-block;
    flex: 0 0 auto;
  }

  .top-link {
    display: none;
  }

  .brand__text {
    max-width: 48vw;
  }

  .mobile-menu {
    position: sticky;
    z-index: 45;
    top: var(--topbar-height);
    border-bottom: 1px solid var(--line);
    background: #fff;
    padding: 0.6rem 1rem;
  }

  .mobile-menu.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .mobile-menu a {
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    font-size: 0.92rem;
    padding: 0.5rem 0.65rem;
    text-decoration: none;
  }

  .page-shell {
    display: block;
    padding: 1rem 1rem 3rem;
  }

  .sidebar {
    display: none;
  }

  .hero {
    padding: 1.35rem;
  }

  .doc-section {
    padding: 1.15rem;
  }

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

  .step-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

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

  .brand__text {
    max-width: 38vw;
  }

  .console-button {
    padding: 0.42rem 0.65rem;
  }

  .mobile-menu.is-open {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.8rem;
  }
}
