:root {
  --bg: #f5f7fb;
  --sidebar: #122033;
  --sidebar-dark: #0d1726;
  --primary: #2563eb;
  --secondary: #0f766e;
  --text: #1f2937;
  --muted: #667085;
  --border: #d9e1ec;
  --card: #ffffff;
  --soft: #eef4ff;
  --soft-green: #eef8f6;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(240px, 560px) auto auto;
  align-items: center;
  gap: 18px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #102033;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.brand-logo { width: 34px; height: 34px; object-fit: contain; }
.global-search input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
}
.global-search input:focus {
  border-color: var(--primary);
  background: #fff;
  outline: 2px solid rgba(37, 99, 235, 0.18);
}

.top-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.top-pills a,
.top-pills button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 12px;
  text-decoration: none;
}
.top-pills a:hover,
.top-pills a.active,
.top-pills button:hover,
.top-pills button.active {
  border-color: rgba(37, 99, 235, 0.34);
  background: var(--soft);
  color: var(--primary);
}

.index-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 58px;
}
.index-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.index-hero > div {
  max-width: 100%;
  min-width: 0;
}
.index-hero h1,
.detail-hero h1 {
  margin: 8px 0 10px;
  color: #102033;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: 0;
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.index-hero p,
.detail-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  overflow-wrap: anywhere;
}
.index-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 13px;
  text-decoration: none;
  white-space: nowrap;
}
.button.secondary {
  background: #fff;
  color: var(--primary);
}
.button.is-disabled {
  border-color: var(--border);
  background: #eef2f7;
  color: #64748b;
}

.eyebrow {
  display: inline-flex;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.summary-strip article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.summary-strip strong {
  display: block;
  color: #102033;
  font-size: 28px;
  line-height: 1;
}
.summary-strip span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}

.index-section,
.content-section,
.doc-section {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
}
.section-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.section-heading h2 {
  margin: 0;
  color: #102033;
  font-size: 23px;
  letter-spacing: 0;
}
.section-note,
.index-help,
.doc-row p,
.doc-card p,
.reference-grid p {
  color: var(--muted);
}
.index-help {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.index-help span {
  border: 1px solid #d7e8ff;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 5px 10px;
}

.docs-directory {
  display: grid;
  gap: 16px;
}
.doc-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.doc-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
}
.doc-group__head h3 {
  margin: 0;
  color: #102033;
  font-size: 16px;
}
.doc-group__head span {
  border-radius: 999px;
  background: #e9f2ff;
  color: var(--primary);
  font-weight: 900;
  min-width: 32px;
  padding: 3px 8px;
  text-align: center;
}
.doc-row-list {
  display: grid;
}
.doc-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(180px, 230px);
  gap: 16px;
  align-items: start;
  border-bottom: 1px solid var(--border);
  padding: 18px;
}
.doc-row:last-child { border-bottom: 0; }
.doc-row__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e9f2ff;
  color: var(--primary);
  font-weight: 900;
}
.doc-row__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.doc-row__title h3 {
  margin: 0;
  color: #102033;
  font-size: 17px;
}
.doc-row__title span,
.doc-row__body small,
.doc-row__meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.doc-row__body p {
  max-width: 900px;
  margin: 6px 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  overflow: hidden;
}
.doc-row__body {
  min-width: 0;
}
.doc-row__body small {
  display: block;
  margin-top: 8px;
}
.doc-row__meta {
  display: grid;
  justify-items: start;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding-top: 2px;
}
.doc-row__meta strong {
  color: #102033;
  font-size: 13px;
}
.empty-state {
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 900px;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  border: 1px solid #bfe6df;
  border-radius: 999px;
  background: var(--soft-green);
  color: var(--secondary);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
  white-space: normal;
  padding: 3px 8px;
}
.tag--more {
  border-style: dashed;
  background: #f8fafc;
  color: #475467;
}
.reference-grid,
.doc-card-grid,
.quick-grid,
.info-grid,
.media-grid,
.scenario-grid {
  display: grid;
  gap: 14px;
}
.reference-grid,
.doc-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.reference-grid article,
.doc-card,
.quick-card,
.info-grid article,
.media-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}
.reference-grid strong,
.doc-card h3,
.quick-card h3 {
  color: #102033;
}

.detail-hero {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 26px;
}
.doc-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}
.doc-sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow: auto;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-dark));
  color: #d8e4f5;
  padding: 22px 18px;
}
.sidebar-product {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 14px;
  padding: 12px 12px 18px;
}
.sidebar-product strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 18px;
}
.sidebar-nav {
  display: grid;
  gap: 4px;
}
.sidebar-nav a {
  border-radius: 8px;
  color: #d8e4f5;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 10px;
  text-decoration: none;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.doc-main {
  min-width: 0;
  padding: 30px;
}
.manual {
  max-width: 1060px;
  margin: 0 auto;
}
.doc-card-grid { margin-top: 10px; }
.doc-list,
.step-list {
  margin: 10px 0 0;
  padding-left: 22px;
}
.doc-list li,
.step-list li { margin: 7px 0; }
code {
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  background: #edf2f7;
  color: #102033;
  font-size: 0.92em;
  padding: 2px 5px;
}
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}
th {
  background: #f8fafc;
  color: #102033;
  font-size: 13px;
}
tr:last-child td { border-bottom: 0; }
.media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.media-card {
  margin: 0;
  padding: 10px;
}
.media-card img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}
.media-card figcaption {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 2px 0;
}
.scenario-visual {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.scenario-visual img {
  display: block;
  width: 100%;
  height: auto;
}
.scenario-visual figcaption {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.scenario-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}
.scenario-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}
.scenario-card h3 {
  margin: 0 0 10px;
  color: #102033;
  font-size: 18px;
}
.scenario-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.scenario-card dt {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.scenario-card dd {
  margin: 0;
  color: var(--muted);
}
.nav-toggle {
  display: none;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #102033;
  font: inherit;
  font-weight: 800;
  padding: 0 12px;
}
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr minmax(220px, 420px);
  }
  .top-pills {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .summary-strip,
  .reference-grid,
  .doc-card-grid,
  .scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .doc-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100vw;
    overflow: visible;
    padding: 12px 16px;
  }
  .global-search,
  .top-pills {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: calc(100vw - 32px);
  }
  .top-pills {
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .index-shell {
    width: min(calc(100% - 24px), 1220px);
    max-width: calc(100vw - 24px);
    padding-top: 18px;
  }
  .index-hero {
    align-items: flex-start;
    flex-direction: column;
    max-width: 100%;
    overflow: visible;
    padding: 20px;
  }
  .index-hero > div,
  .index-actions {
    width: 100%;
    max-width: 100%;
  }
  .summary-strip,
  .reference-grid,
  .doc-card-grid,
  .media-grid,
  .scenario-grid {
    grid-template-columns: 1fr;
  }
  .doc-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .doc-row__meta {
    grid-column: 1 / -1;
    justify-items: start;
    padding-left: 58px;
  }
  .doc-layout {
    display: block;
  }
  .doc-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: min(86vw, 320px);
    height: auto;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }
  .doc-sidebar.open { transform: translateX(0); }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .doc-main {
    padding: 18px 12px;
  }
  .detail-hero,
  .content-section,
  .doc-section,
  .index-section {
    max-width: 100%;
    overflow: visible;
    padding: 18px;
  }
  table {
    min-width: 640px;
  }
}

@media (max-width: 520px) {
  .brand span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .index-hero h1,
  .detail-hero h1 {
    font-size: 25px;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .index-hero > div,
  .index-actions {
    max-width: 100%;
  }
  .section-heading h2,
  .doc-row__title h3,
  .doc-row__body p {
    overflow-wrap: anywhere;
  }
  .doc-row {
    grid-template-columns: 1fr;
  }
  .doc-row__meta {
    padding-left: 0;
  }
  .doc-row__mark {
    width: 40px;
    height: 40px;
  }
  .top-pills button,
  .top-pills a {
    font-size: 12px;
    padding-inline: 10px;
  }
}
