@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #faf8f3;
  --bg-alt: #f2ede2;
  --surface: #ffffff;
  --surface-2: #fdfbf7;
  --border: #e5ddd0;
  --border-strong: #d8cdb8;
  --text: #1c1814;
  --text-dim: #6b6560;
  --text-faint: #9a9186;
  --gold: #c9a84c;
  --gold-hover: #d8b85e;
  --gold-text: #97792f;
  --gold-soft: rgba(201, 168, 76, 0.14);
  --dark: #171310;
  --gradient: linear-gradient(135deg, #d8b85e 0%, #c9a84c 55%, #97792f 100%);
  --gradient-text: linear-gradient(120deg, #e2c479 0%, #c9a84c 45%, #93762d 100%);
  --sidebar-w: 280px;
  --radius-md: 20px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-text); text-decoration: none; }
a:hover { color: var(--gold-hover); }
::selection { background: var(--gold); color: #fff; }

.docs-shell {
  display: flex;
  min-height: 100vh;
}

.docs-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.docs-sidebar-head {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
}
.docs-brand img { width: 32px; height: 32px; border-radius: 8px; }
.docs-brand span { background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.docs-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--gold-soft);
  color: var(--gold-text);
}

.docs-search {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.docs-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.docs-search input:focus { border-color: var(--gold); }

.docs-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 24px;
}

.nav-group { margin-bottom: 8px; }
.nav-group-title {
  padding: 8px 12px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.15s;
}
.nav-link:hover { background: var(--gold-soft); color: var(--text); }
.nav-link.active {
  background: var(--gold-soft);
  color: var(--gold-text);
  font-weight: 700;
}
.nav-link.sub { padding-left: 24px; font-size: 0.84rem; }

.docs-sidebar-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.docs-sidebar-foot a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
}
.docs-sidebar-foot a:hover { color: var(--gold-text); }

.docs-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.menu-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.docs-content {
  max-width: 820px;
  padding: 48px 40px 80px;
}

.doc-page { display: none; animation: fadeIn 0.25s ease; }
.doc-page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.doc-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.doc-page h1 .accent {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.doc-lead {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 32px;
  max-width: 640px;
}

.doc-page h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 36px 0 12px;
  padding-top: 8px;
}
.doc-page h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--text);
}
.doc-page p { margin-bottom: 14px; color: var(--text-dim); }
.doc-page ul, .doc-page ol { margin: 0 0 16px 20px; color: var(--text-dim); }
.doc-page li { margin-bottom: 6px; }
.doc-page strong { color: var(--text); font-weight: 700; }

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 20px 0;
}
.doc-card.highlight {
  border-color: rgba(201, 168, 76, 0.35);
  background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(255,255,255,0.9));
}

.doc-table-wrap { overflow-x: auto; margin: 16px 0 24px; }
table.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.doc-table th, .doc-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.doc-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text);
}
.doc-table td { color: var(--text-dim); }

.doc-steps { counter-reset: step; list-style: none; margin-left: 0; }
.doc-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 16px;
}
.doc-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.doc-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--gold-soft);
  color: var(--gold-text);
  border: 1px solid rgba(201,168,76,0.2);
}

.doc-callout {
  border-left: 3px solid var(--gold);
  padding: 14px 18px;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.doc-callout.warn { border-color: #c45c5c; background: rgba(196,92,92,0.06); }

code, .inline-code {
  font-family: ui-monospace, monospace;
  font-size: 0.84em;
  background: var(--bg-alt);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--text);
  border: 1px solid var(--border);
}
pre.doc-code {
  background: var(--dark);
  color: #e8e0d4;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.82rem;
  margin: 16px 0;
  line-height: 1.5;
}

.doc-nav-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.doc-nav-btn {
  flex: 1;
  max-width: 48%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 0.2s;
}
.doc-nav-btn:hover { border-color: var(--gold); }
.doc-nav-btn span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 4px; }
.doc-nav-btn strong { font-size: 0.9rem; color: var(--text); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(23,19,16,0.4);
  z-index: 90;
}

@media (max-width: 900px) {
  .docs-sidebar { transform: translateX(-100%); transition: transform 0.25s; }
  .docs-sidebar.open { transform: translateX(0); }
  .docs-main { margin-left: 0; }
  .docs-topbar { display: flex; }
  .sidebar-overlay.open { display: block; }
  .docs-content { padding: 28px 20px 60px; }
}

/* Animations */
@keyframes docFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes docShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes docPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}
@keyframes docSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

.docs-shell::before,
.docs-shell::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
  animation: docPulse 8s ease-in-out infinite;
}
.docs-shell::before {
  width: 320px; height: 320px;
  top: 10%; right: 5%;
  background: rgba(201, 168, 76, 0.12);
}
.docs-shell::after {
  width: 240px; height: 240px;
  bottom: 15%; left: 35%;
  background: rgba(201, 168, 76, 0.08);
  animation-delay: -4s;
}

.docs-sidebar {
  animation: docSlideIn 0.5s ease;
}
.docs-content {
  animation: docFadeUp 0.45s ease;
}
.doc-page.active h1 {
  animation: docFadeUp 0.5s ease backwards;
}
.doc-page.active .doc-lead {
  animation: docFadeUp 0.55s ease 0.05s backwards;
}
.anim-rise {
  animation: docFadeUp 0.6s ease 0.1s backwards;
}

.doc-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}
.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -16px rgba(28, 24, 20, 0.12);
  border-color: rgba(201, 168, 76, 0.35);
}

.nav-link {
  position: relative;
  overflow: hidden;
}
.nav-link::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gradient);
  transform: scaleY(0);
  transition: transform 0.2s ease;
  border-radius: 0 4px 4px 0;
}
.nav-link.active::before,
.nav-link:hover::before {
  transform: scaleY(1);
}

.doc-table tbody tr {
  transition: background 0.15s;
}
.doc-table tbody tr:hover {
  background: var(--gold-soft);
}

.doc-nav-btn:hover {
  transform: translateX(4px);
}

.docs-badge {
  animation: docFadeUp 0.6s ease 0.2s backwards;
}

.doc-pill {
  transition: transform 0.2s, box-shadow 0.2s;
}
.doc-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.2);
}

