:root {
  --page-bg: #f6f7fb;
  --paper: #ffffff;
  --paper-soft: #f9fafc;
  --ink: #202431;
  --text: #4c4c5c;
  --muted: #7d8799;
  --line: #e3e7ef;
  --blue: #2f67d8;
  --blue-deep: #1c3f85;
  --yellow: #f4c145;
  --yellow-deep: #c59011;
  --green: #15956a;
  --red: #d95757;
  --violet: #7a66d9;
  --shadow: 0 16px 42px rgba(31, 35, 48, 0.10);
  --soft-shadow: 0 6px 20px rgba(31, 35, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--page-bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #f8f9fc 0%, #f1f4f9 46%, #f7f8fb 100%);
  font-family: "Nunito", "Segoe UI", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef3ff;
  color: var(--blue-deep);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(227, 231, 239, 0.82);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand:hover,
.top-nav a:hover,
.header-link:hover,
.btn:hover {
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 24px);
  min-width: 0;
  flex: 1 1 auto;
}

.top-nav a,
.header-link {
  color: #586174;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.header-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--blue-deep);
  box-shadow: 0 1px 2px rgba(31, 35, 48, 0.04);
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(28, 63, 133, 0.95) 0%, rgba(27, 32, 48, 0.98) 52%, rgba(37, 45, 67, 0.98) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 86px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 8px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--yellow) 48%, var(--green) 100%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 460px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px clamp(18px, 4vw, 48px) 26px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.kb-section h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 900px;
  color: #ffffff;
  font-size: clamp(36px, 4.8vw, 56px);
  line-height: 1.04;
  font-weight: 900;
}

.hero-lead {
  max-width: 660px;
  margin: 18px 0 0;
  color: #dbe5f4;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 850;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--yellow);
  color: #231f14;
  box-shadow: 0 10px 26px rgba(244, 193, 69, 0.24);
}

.btn.secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.btn.compact {
  min-height: 42px;
  margin-top: 12px;
}

.hero-visual {
  position: absolute;
  z-index: 1;
  right: clamp(-220px, -12vw, -150px);
  bottom: -130px;
  width: min(44vw, 560px);
  min-width: 360px;
  opacity: 0.13;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  filter: drop-shadow(0 24px 54px rgba(0, 0, 0, 0.22));
}

.signal-panel {
  display: none;
  position: absolute;
  right: 3%;
  bottom: 12%;
  grid-template-columns: 10px 1fr;
  gap: 2px 9px;
  min-width: 190px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(27, 32, 48, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.signal-panel span:not(.signal-dot) {
  color: #b9c7dc;
  font-size: 12px;
  font-weight: 700;
}

.signal-panel strong {
  grid-column: 2;
  color: #ffffff;
  line-height: 1.2;
}

.signal-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(21, 149, 106, 0.20);
}

.quick-facts,
.section,
.workflow,
.kb-layout,
.site-footer {
  width: min(1180px, calc(100% - 36px));
  margin-left: auto;
  margin-right: auto;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.quick-facts article,
.feature-card,
.step,
.flow-grid article,
.kb-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.quick-facts article {
  padding: 20px;
}

.quick-facts span,
.flow-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #eef3ff;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 900;
}

.quick-facts strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.quick-facts p,
.feature-card p,
.step p,
.flow-grid p,
.kb-section p,
.clean-list {
  margin: 10px 0 0;
}

.section,
.workflow,
.kb-layout {
  padding-top: 76px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-head h2,
.kb-section h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
}

.section-head p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

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

.feature-card {
  min-height: 224px;
  padding: 22px;
}

.feature-mark {
  display: block;
  width: 42px;
  height: 6px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--blue);
}

.feature-mark.yellow {
  background: var(--yellow);
}

.feature-mark.green {
  background: var(--green);
}

.feature-mark.ink {
  background: var(--ink);
}

.feature-mark.violet {
  background: var(--violet);
}

.feature-mark.red {
  background: var(--red);
}

.feature-card h3,
.step h3,
.flow-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.24;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 38px;
  align-items: start;
}

.steps {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  padding: 18px;
}

.step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
}

.workflow {
  padding-bottom: 4px;
}

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

.flow-grid article {
  position: relative;
  min-height: 240px;
  padding: 22px;
  overflow: hidden;
}

.flow-grid article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--yellow));
}

.kb-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 56px;
}

.kb-nav {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
}

.kb-nav strong {
  color: var(--ink);
  margin-bottom: 6px;
}

.kb-nav a {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 7px;
  color: #586174;
  font-size: 14px;
  font-weight: 750;
}

.kb-nav a:hover {
  background: #eef3ff;
  color: var(--blue-deep);
  text-decoration: none;
}

.kb-content {
  display: grid;
  gap: 14px;
}

.kb-section {
  scroll-margin-top: 96px;
  padding: clamp(22px, 3vw, 32px);
}

.command-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.command-list div {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}

.command-list span {
  min-width: 0;
}

.endpoint-table {
  display: grid;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.endpoint-table div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  background: var(--paper-soft);
}

.endpoint-table div + div {
  border-top: 1px solid var(--line);
}

.endpoint-table strong {
  color: var(--ink);
}

.endpoint-table code {
  width: 100%;
}

.clean-list {
  padding-left: 20px;
}

details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

details:first-of-type {
  margin-top: 12px;
}

details:last-child {
  padding-bottom: 0;
}

summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1060px) {
  .top-nav {
    display: none;
  }

  .hero-inner {
    min-height: 500px;
  }

  .hero-visual {
    width: 320px;
    opacity: 0.28;
  }

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

  .split,
  .kb-layout {
    grid-template-columns: 1fr;
  }

  .kb-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .kb-nav strong {
    grid-column: 1 / -1;
  }
}

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

  .site-header {
    min-height: 64px;
    gap: 12px;
    padding: 10px 16px;
  }

  .brand span {
    font-size: 18px;
  }

  .header-link {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .hero-inner {
    min-height: 0;
    padding: 52px 18px 64px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-visual {
    right: -92px;
    bottom: -62px;
    width: 250px;
    min-width: 0;
    opacity: 0.18;
  }

  .signal-panel {
    display: none;
  }

  .quick-facts,
  .feature-grid,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .section,
  .workflow,
  .kb-layout {
    padding-top: 52px;
  }

  .feature-card,
  .flow-grid article {
    min-height: 0;
  }

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

  .command-list div,
  .endpoint-table div {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 440px) {
  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand span {
    display: none;
  }

  .header-link {
    white-space: normal;
    text-align: center;
  }

  .hero h1 {
    font-size: 32px;
  }

  .btn {
    width: 100%;
  }

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

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