:root {
  color-scheme: dark;
  --bg: #080b12;
  --surface: #101521;
  --surface-2: #151b2a;
  --line: rgba(174, 184, 214, .14);
  --line-strong: rgba(135, 119, 255, .34);
  --text: #f4f6fb;
  --muted: #9ca6bc;
  --violet: #8573ff;
  --violet-soft: rgba(133, 115, 255, .13);
  --cyan: #36c9f5;
  --green: #43dda7;
  --amber: #f1bd61;
  --red: #ff7f91;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 48% -10%, rgba(31, 191, 222, .11), transparent 31rem),
    radial-gradient(circle at 8% 18%, rgba(112, 83, 255, .12), transparent 30rem),
    var(--bg);
  font: 15px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #bdb5ff; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(54, 201, 245, .58); outline-offset: 3px; }

.docs-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 12px clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 18, .88);
  backdrop-filter: blur(18px);
}
.docs-brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; white-space: nowrap; }
.docs-brand img { width: 34px; height: 34px; border-radius: 10px; }
.docs-brand span { display: grid; line-height: 1.15; }
.docs-brand strong { font-size: 15px; letter-spacing: .02em; }
.docs-brand small { color: var(--muted); font-size: 10px; }
.topbar-links { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.topbar-links a { color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.topbar-links .portal-link { color: white; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--violet-soft); }
.menu-toggle { display: none; color: var(--text); border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 11px; }

.docs-layout { display: grid; grid-template-columns: 255px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.docs-sidebar {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow: auto;
  padding: 28px 19px 40px clamp(18px, 3vw, 38px);
  border-right: 1px solid var(--line);
  background: rgba(8, 11, 18, .56);
}
.search-wrap { display: grid; gap: 7px; margin-bottom: 24px; }
.search-wrap label, .sidebar-label { color: #747f99; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.search-wrap input { width: 100%; color: var(--text); border: 1px solid var(--line); background: var(--surface); border-radius: 11px; padding: 10px 12px; outline: none; }
.search-wrap input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--violet-soft); }
.docs-nav { display: grid; gap: 3px; margin: 8px 0 25px; }
.docs-nav a { color: var(--muted); border-radius: 9px; padding: 8px 10px; font-size: 12px; font-weight: 650; text-decoration: none; }
.docs-nav a:hover, .docs-nav a[aria-current="page"] { color: white; background: var(--violet-soft); }
.sidebar-note { color: #737e97; font-size: 10px; line-height: 1.55; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.sidebar-note strong { color: #b5bed1; display: block; margin-bottom: 3px; }

.docs-main { width: min(100%, 1120px); padding: 54px clamp(24px, 5vw, 76px) 90px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #78839c; font-size: 11px; margin-bottom: 25px; }
.breadcrumbs a { color: #99a4ba; text-decoration: none; }
.breadcrumbs i { color: #4c566e; font-style: normal; }
.doc-kicker { color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; }
.docs-hero { max-width: 880px; margin-bottom: 42px; }
.docs-hero h1, .doc-article > header h1 { margin: 0; font-size: clamp(38px, 6vw, 68px); line-height: .98; letter-spacing: -.055em; }
.docs-hero > p:not(.doc-kicker), .doc-article > header > p { max-width: 760px; color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.65; margin: 22px 0 0; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.doc-meta span { color: #aeb7ca; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); padding: 6px 10px; border-radius: 999px; font-size: 10px; font-weight: 700; }

.audience-grid, .guide-grid, .quick-grid { display: grid; gap: 15px; }
.audience-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 25px 0 48px; }
.guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 20px 0 50px; }
.quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.audience-card, .guide-card, .quick-card {
  position: relative;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(20, 26, 41, .91), rgba(12, 16, 26, .9));
  box-shadow: var(--shadow);
  text-decoration: none;
}
.audience-card { padding: 23px; }
.guide-card { padding: 24px; min-height: 195px; display: flex; flex-direction: column; }
.quick-card { padding: 21px; }
.audience-card:hover, .guide-card:hover { border-color: var(--line-strong); transform: translateY(-2px); transition: .18s ease; }
.card-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; color: #c8c1ff; background: var(--violet-soft); font-weight: 850; margin-bottom: 19px; }
.audience-card h2, .guide-card h2, .quick-card h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: -.02em; }
.audience-card p, .guide-card p, .quick-card p { color: var(--muted); margin: 0; font-size: 12px; line-height: 1.6; }
.guide-card .card-link { color: #c8c1ff; font-size: 11px; font-weight: 800; margin-top: auto; padding-top: 20px; }
.guide-card[hidden] { display: none; }
.search-empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 54px 0 18px; }
.section-heading h2 { margin: 0; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.04em; }
.section-heading p { max-width: 520px; color: var(--muted); font-size: 12px; text-align: right; margin: 0; }
.steps { counter-reset: doc-step; display: grid; gap: 12px; margin: 20px 0 38px; }
.step { counter-increment: doc-step; display: grid; grid-template-columns: 44px 1fr; gap: 15px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .022); }
.step::before { content: counter(doc-step); width: 36px; height: 36px; display: grid; place-items: center; color: #c8c1ff; background: var(--violet-soft); border-radius: 11px; font-weight: 850; }
.step h3 { margin: 1px 0 5px; font-size: 14px; }
.step p { color: var(--muted); margin: 0; font-size: 12px; }

.callout { display: grid; grid-template-columns: auto 1fr; gap: 13px; padding: 18px; border: 1px solid rgba(54, 201, 245, .23); background: rgba(54, 201, 245, .07); border-radius: 15px; margin: 22px 0; }
.callout::before { content: "i"; width: 26px; height: 26px; display: grid; place-items: center; color: var(--cyan); border: 1px solid rgba(54, 201, 245, .25); border-radius: 8px; font-weight: 900; }
.callout.warning { border-color: rgba(241, 189, 97, .25); background: rgba(241, 189, 97, .07); }
.callout.warning::before { content: "!"; color: var(--amber); border-color: rgba(241, 189, 97, .27); }
.callout.danger { border-color: rgba(255, 127, 145, .25); background: rgba(255, 127, 145, .07); }
.callout.danger::before { content: "!"; color: var(--red); border-color: rgba(255, 127, 145, .27); }
.callout p { color: #b8c1d4; margin: 0; font-size: 12px; }
.callout strong { color: white; }

.doc-article { max-width: 870px; }
.doc-article > header { margin-bottom: 45px; }
.doc-article h2 { margin: 58px 0 17px; font-size: clamp(27px, 4vw, 38px); line-height: 1.15; letter-spacing: -.04em; }
.doc-article h3 { margin: 35px 0 11px; font-size: 19px; letter-spacing: -.025em; }
.doc-article h4 { margin: 26px 0 9px; font-size: 14px; }
.doc-article p, .doc-article li { color: #b3bccf; }
.doc-article ul, .doc-article ol { padding-left: 22px; }
.doc-article li { margin: 7px 0; }
.doc-article strong { color: #edf0f8; }
.doc-article hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.doc-article code { color: #d8d3ff; background: rgba(133, 115, 255, .1); border: 1px solid rgba(133, 115, 255, .13); border-radius: 5px; padding: 1px 5px; font: .9em ui-monospace, SFMono-Regular, Consolas, monospace; }
.doc-article pre { position: relative; overflow: auto; color: #d8deeb; background: #090d16; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 17px 0 25px; line-height: 1.65; }
.doc-article pre code { color: inherit; background: none; border: 0; padding: 0; font-size: 12px; }
.copy-code { position: absolute; top: 9px; right: 9px; color: #aab3c7; background: #151b29; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 10px; font-weight: 750; }
.copy-code:hover { color: white; border-color: var(--line-strong); }
.table-scroll { overflow-x: auto; margin: 18px 0 30px; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 12px; }
th { color: #d9deea; background: rgba(255, 255, 255, .035); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
td { color: #adb6c9; }
tr:last-child td { border-bottom: 0; }
.checklist { padding: 0 !important; list-style: none; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 900; }
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 28px; }
.do-dont > div { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: rgba(255, 255, 255, .02); }
.do-dont h3 { margin-top: 0; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 800; }
.status-chip.live { color: #9ef0cc; border-color: rgba(67, 221, 167, .25); background: rgba(67, 221, 167, .07); }
.status-chip.review { color: #f3d495; border-color: rgba(241, 189, 97, .25); background: rgba(241, 189, 97, .07); }
.status-chip.planned { color: #aeb7cb; }

.docs-footer { display: flex; justify-content: space-between; gap: 25px; margin-top: 70px; padding-top: 25px; border-top: 1px solid var(--line); color: #6f7a92; font-size: 10px; }
.docs-footer a { color: #939db3; }

@media (max-width: 980px) {
  .audience-grid, .quick-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .docs-topbar { gap: 12px; }
  .menu-toggle { display: block; margin-left: auto; }
  .topbar-links { display: none; }
  .docs-layout { display: block; }
  .docs-sidebar { display: none; position: fixed; z-index: 19; inset: 68px 0 0; width: min(330px, 90vw); height: calc(100vh - 68px); background: #0b0f18; box-shadow: 30px 0 80px rgba(0,0,0,.5); }
  .docs-sidebar.open { display: block; }
  .docs-main { padding: 39px 19px 70px; }
  .guide-grid, .do-dont { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading p { text-align: left; }
  .docs-footer { flex-direction: column; }
}
@media (max-width: 520px) {
  .docs-brand small { display: none; }
  .docs-hero h1, .doc-article > header h1 { font-size: 39px; }
  .step { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .docs-topbar, .docs-sidebar, .copy-code { display: none !important; }
  .docs-layout { display: block; }
  .docs-main { width: 100%; padding: 0; }
  body { color: #111; background: white; }
  .doc-article p, .doc-article li, td { color: #333; }
  .callout, pre, .table-scroll { break-inside: avoid; }
}
