/* SetHttps documentation — shares the marketing site's visual language
   (dark navy, cyan→blue→violet gradient, Inter + JetBrains Mono). */

:root {
  --bg: #050914;
  --bg-soft: #08101f;
  --panel: #0b1526;
  --panel-2: #0e1b31;
  --line: rgba(120, 160, 255, 0.14);
  --line-strong: rgba(103, 232, 249, 0.34);
  --text: #e8eef9;
  --body: #c3cfe2;
  --muted: #9aa9c0;
  --muted-2: #74849e;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --grad: linear-gradient(120deg, #22d3ee 0%, #3b82f6 48%, #8b5cf6 100%);
  --radius: 14px;
  --max: 1180px;
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  background:
    radial-gradient(900px 520px at 88% -10%, rgba(34, 211, 238, 0.12), transparent 62%),
    radial-gradient(760px 460px at 4% 0%, rgba(59, 130, 246, 0.12), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: #7dd3fc; text-decoration: none; }
a:hover { color: #a5f3fc; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 9, 20, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; color: #fff; }
.brand img { width: 26px; height: 26px; border-radius: 8px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.topnav { display: flex; align-items: center; gap: 6px; }
.topnav a {
  color: var(--muted);
  font-size: 14px;
  padding: 7px 11px;
  border-radius: 8px;
  transition: color .16s ease, background .16s ease;
}
.topnav a:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); text-decoration: none; }
.topnav a.active { color: var(--text); background: rgba(148, 163, 184, 0.1); }
.topnav .cta {
  margin-left: 8px;
  color: #04121c;
  background: var(--grad);
  font-weight: 650;
  padding: 8px 14px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.28);
}
.topnav .cta:hover { color: #04121c; background: var(--grad); filter: brightness(1.06); }

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 56px;
  padding-top: 44px;
  padding-bottom: 88px;
  align-items: start;
}

.side { position: sticky; top: 86px; font-size: 14px; }
.side h4 {
  margin: 22px 0 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
}
.side h4:first-child { margin-top: 0; }
.side a {
  display: block;
  padding: 6px 10px;
  margin: 1px 0;
  border-radius: 8px;
  color: var(--muted);
  border-left: 2px solid transparent;
}
.side a:hover { color: var(--text); background: rgba(148, 163, 184, 0.07); text-decoration: none; }
.side a.active {
  color: var(--text);
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--cyan);
}

/* ---------- article ---------- */
.doc { max-width: 800px; }
.doc h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}
.lede { margin: 0 0 34px; font-size: 17px; line-height: 1.7; color: var(--muted); }
.doc h2 {
  margin: 46px 0 14px;
  padding-top: 8px;
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text);
}
.doc h3 { margin: 28px 0 8px; font-size: 16.5px; color: var(--text); }
.doc p { margin: 12px 0; }
.doc ul, .doc ol { margin: 12px 0; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--text); font-weight: 650; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--line-strong); }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.12);
  color: #bae6fd;
  word-break: break-word;
}
pre {
  margin: 16px 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: #070e1c;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.75;
}
pre code { padding: 0; background: none; color: #dbeafe; font-size: 13px; }
pre .c { color: #64748b; }
pre .k { color: #c4b5fd; }
pre .s { color: #86efac; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 22px 0; counter-reset: s; }
.steps > li {
  position: relative;
  counter-increment: s;
  padding: 2px 0 22px 46px;
  margin: 0;
  border-left: 1px solid var(--line);
  margin-left: 15px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(s);
  position: absolute;
  left: -16px;
  top: 0;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.steps h3 { margin: 3px 0 6px; font-size: 16.5px; }

/* ---------- callouts ---------- */
.note {
  margin: 18px 0;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  background: rgba(34, 211, 238, 0.05);
  font-size: 14.5px;
  line-height: 1.7;
  color: #cbd5e1;
}
.note.warn { border-left-color: var(--amber); background: rgba(251, 191, 36, 0.06); }
.note.ok { border-left-color: var(--green); background: rgba(52, 211, 153, 0.06); }
.note b { color: var(--text); }
.note p { margin: 6px 0; }

/* ---------- table ---------- */
table { width: 100%; margin: 18px 0; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  padding: 9px 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid rgba(120, 160, 255, 0.08); vertical-align: top; }
td:first-child { color: var(--text); }

/* ---------- page nav ---------- */
.pagenav { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); }
.pagenav a {
  flex: 1;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
}
.pagenav a:hover { border-color: var(--line-strong); text-decoration: none; }
.pagenav .k { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.pagenav .next { text-align: right; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 30px 0 44px; font-size: 13px; color: var(--muted-2); }
.foot-in { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between; }
.foot a { color: var(--muted); }
.foot .mono { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }

/* ---------- responsive ---------- */
/* Tables hold long unbroken values (paths, hostnames); let them scroll instead
   of stretching the page on narrow screens. */
@media (max-width: 760px) {
  table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
  th { white-space: normal; }
  .kv dd { overflow-wrap: anywhere; }
}

@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; gap: 26px; padding-top: 28px; }
  .side {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
  }
  .side h4 { width: 100%; margin: 6px 0 2px; }
  .side a { border-left: 0; padding: 6px 10px; background: rgba(148, 163, 184, 0.06); }
  .side a.active { border-left: 0; background: rgba(59, 130, 246, 0.18); }
  .topnav a:not(.cta) { display: none; }
}
