:root {
  --navy: #0d1b2a;
  --navy-light: #1a2e45;
  --blue: #1e6fcc;
  --blue-hover: #1558a8;
  --blue-light: #e8f0fb;
  --sidebar-width: 272px;
  --content-max: 780px;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --tag-bg: #dbeafe;
  --tag-text: #1e40af;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SFMono-Regular', Consolas, monospace;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

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

/* ── Top Nav ── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--navy);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  gap: 24px;
}

.top-nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav .logo svg { flex-shrink: 0; }

.top-nav .nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  list-style: none;
}

.top-nav .nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.top-nav .nav-links a:hover,
.top-nav .nav-links a.active { color: var(--white); text-decoration: none; }

.top-nav .search-wrap {
  position: relative;
  flex: 1;
  max-width: 340px;
}

.top-nav .search-wrap input {
  width: 100%;
  padding: 7px 12px 7px 36px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 0.875rem;
  outline: none;
}

.top-nav .search-wrap input::placeholder { color: rgba(255,255,255,0.5); }
.top-nav .search-wrap input:focus { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }

.top-nav .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}

/* ── Layout ── */
.docs-layout {
  display: flex;
  padding-top: 60px;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 20px 0 40px;
  scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section { margin-bottom: 8px; }

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.sidebar-heading .chevron {
  transition: transform 0.2s;
  font-size: 10px;
}

.sidebar-heading.collapsed .chevron { transform: rotate(-90deg); }

.sidebar-links { list-style: none; }
.sidebar-links.hidden { display: none; }

.sidebar-links li a {
  display: block;
  padding: 6px 16px 6px 28px;
  font-size: 0.875rem;
  color: var(--text);
  border-left: 2px solid transparent;
  transition: background 0.1s, color 0.1s;
}

.sidebar-links li a:hover {
  background: var(--blue-light);
  color: var(--blue);
  text-decoration: none;
}

.sidebar-links li a.active {
  color: var(--blue);
  border-left-color: var(--blue);
  background: var(--blue-light);
  font-weight: 600;
}

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

.content-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px 48px 80px;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); }

/* ── Page Header ── */
.page-header { margin-bottom: 32px; }
.page-header .tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 12px;
}

.page-header .subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Typography ── */
h2 { font-size: 1.375rem; font-weight: 700; color: var(--navy); margin: 36px 0 12px; }
h3 { font-size: 1.1rem; font-weight: 600; color: var(--navy); margin: 24px 0 8px; }
p { margin-bottom: 16px; color: var(--text); }

ul, ol { padding-left: 24px; margin-bottom: 16px; }
li { margin-bottom: 6px; }

/* ── Callout Boxes ── */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 20px 0;
  font-size: 0.9rem;
}

.callout .callout-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

.callout.info { background: #eff6ff; border: 1px solid #bfdbfe; }
.callout.info .callout-icon { color: var(--blue); }

.callout.tip { background: #f0fdf4; border: 1px solid #bbf7d0; }
.callout.tip .callout-icon { color: #16a34a; }

.callout.warning { background: #fffbeb; border: 1px solid #fde68a; }
.callout.warning .callout-icon { color: #d97706; }

/* ── Steps ── */
.steps { margin: 24px 0; }

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step-body h4 { font-weight: 600; margin-bottom: 4px; }
.step-body p { margin-bottom: 0; font-size: 0.9rem; }

/* ── Prev / Next Nav ── */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  max-width: 48%;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: var(--text);
}

.page-nav a:hover { border-color: var(--blue); box-shadow: var(--shadow); text-decoration: none; }

.page-nav a .nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.page-nav a .nav-title { font-size: 0.925rem; font-weight: 600; color: var(--blue); }

.page-nav .next { margin-left: auto; text-align: right; }

/* ── Home Page ── */
.home-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 80px 24px;
  text-align: center;
  color: var(--white);
}

.home-hero h1 { font-size: 2.6rem; font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.home-hero p { font-size: 1.15rem; color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto 32px; }

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary { background: var(--blue); color: var(--white); border: 2px solid var(--blue); }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); text-decoration: none; color: var(--white); }

.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; color: var(--white); }

.home-sections {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 24px;
}

.home-sections h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  margin-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.15s, border-color 0.15s;
  background: var(--white);
  text-decoration: none;
  color: var(--text);
  display: block;
}

.card:hover { box-shadow: var(--shadow-md); border-color: var(--blue); text-decoration: none; }

.card .card-icon { font-size: 1.5rem; margin-bottom: 10px; }
.card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.card p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

.role-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  background: var(--white);
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.role-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue); text-decoration: none; }
.role-card .role-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.role-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.role-card p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 14px; }
.role-card .role-link { font-size: 0.875rem; font-weight: 600; color: var(--blue); }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
}

footer a { color: rgba(255,255,255,0.6); }
footer a:hover { color: var(--white); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .content-wrap { padding: 24px 20px 60px; }
  .role-cards { grid-template-columns: 1fr; }
  .home-hero h1 { font-size: 1.8rem; }
}
