:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-strong: #e2e8f0;
  --text: #0f172a;
  --text-soft: #475569;
  --text-faint: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.12);
  --brand: #2563eb;
  --brand-soft: rgba(37, 99, 235, 0.10);
  --success-soft: rgba(14, 165, 233, 0.08);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

html { scroll-behavior: smooth; }
body {
  background: linear-gradient(180deg, #f8fafc 0%, #f8fafc 58%, #eef4ff 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #1d4ed8; }

.site-header,
.site-footer {
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(12px);
}

.navbar-brand { min-width: 0; }
.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.24);
  flex: 0 0 auto;
}
.brand-mark-sm { width: 2.25rem; height: 2.25rem; border-radius: 14px; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { font-size: 1rem; line-height: 1.1; color: var(--text); }
.brand-copy small { color: var(--text-faint); font-size: 0.82rem; line-height: 1.2; }

.top-search-wrap { width: min(100%, 640px); }
.search-shell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}
.search-shell i { color: var(--text-faint); font-size: 1rem; }
.search-shell input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.97rem;
}
.search-shell input::placeholder { color: #94a3b8; }

.nav-link { color: var(--text-soft); font-weight: 500; }
.nav-link:hover,
.nav-link:focus { color: var(--text); }
.btn-primary {
  --bs-btn-bg: #2563eb;
  --bs-btn-border-color: #2563eb;
  --bs-btn-hover-bg: #1d4ed8;
  --bs-btn-hover-border-color: #1d4ed8;
  --bs-btn-active-bg: #1e40af;
  --bs-btn-active-border-color: #1e40af;
}
.btn-outline-primary {
  --bs-btn-color: #2563eb;
  --bs-btn-border-color: rgba(37,99,235,.22);
  --bs-btn-hover-bg: rgba(37,99,235,.08);
  --bs-btn-hover-border-color: rgba(37,99,235,.22);
  --bs-btn-hover-color: #1d4ed8;
}

.dashboard-shell { min-height: calc(100vh - 180px); }
.top-offset { top: 1.5rem; }

.sidebar-panel,
.hero-card,
.dashboard-block,
.content-frame,
.info-card,
.metric-card {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sidebar-panel {
  border-radius: var(--radius-lg);
  padding: 1.2rem;
}
.sidebar-section + .sidebar-section { margin-top: 1rem; }
.sidebar-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 0.85rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  color: var(--text-soft);
  background: transparent;
  margin-bottom: 0.45rem;
  transition: .2s ease;
}
.sidebar-link:hover,
.sidebar-link.active {
  background: var(--surface-muted);
  color: var(--text);
}
.sidebar-note {
  margin-top: 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(37,99,235,.08), rgba(14,165,233,.05));
  border: 1px solid rgba(37,99,235,.08);
  padding: 1rem;
  color: var(--text-soft);
}
.sidebar-note strong { display: block; color: var(--text); margin-bottom: 0.35rem; }

.hero-card {
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37,99,235,.14), transparent 68%);
  pointer-events: none;
}
.slim-hero { padding: 1.8rem; }
.hero-kicker,
.eyebrow {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand);
}
.eyebrow span { color: #94a3b8; letter-spacing: 0; text-transform: none; }
.hero-title,
.page-title {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0;
}
.page-title { font-size: clamp(1.8rem, 2.5vw, 2.6rem); }
.hero-text,
.page-subtitle {
  margin: 0.95rem 0 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-soft);
  max-width: 62ch;
}
.hero-metrics {
  display: grid;
  gap: 0.9rem;
}
.metric-card {
  border-radius: 22px;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.9));
}
.metric-label {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.metric-card strong { font-size: 0.98rem; line-height: 1.5; }

.dashboard-block {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.section-head {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.section-head h2 {
  font-size: 1.35rem;
  margin: 0;
  letter-spacing: -0.03em;
}
.section-head p {
  margin: 0.3rem 0 0;
  color: var(--text-soft);
}
.section-link {
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}

.dashboard-card,
.info-card {
  display: block;
  height: 100%;
  border-radius: 22px;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  border-color: rgba(37,99,235,.16);
}
.card-playbook { border-top: 4px solid rgba(37,99,235,.28); }
.card-library { border-top: 4px solid rgba(14,165,233,.24); }
.muted-card { opacity: 0.9; }
.card-tag,
.soft-pill,
.step-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
}
.card-tag,
.soft-pill {
  font-size: 0.75rem;
  padding: 0.45rem 0.7rem;
  background: var(--surface-muted);
  color: var(--text-soft);
  border: 1px solid rgba(148,163,184,.16);
}
.soft-pill-lg { padding-inline: 0.85rem; }
.dashboard-card h3,
.info-card h3 {
  font-size: 1.08rem;
  margin: 0.9rem 0 0.55rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}
.dashboard-card p,
.info-card p,
.footer-copy {
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
  color: var(--text-faint);
  font-size: 0.88rem;
}
.step-chip {
  width: 2.2rem;
  height: 2.2rem;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.82rem;
}

.content-frame {
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.6rem 1.75rem;
}
.content-hero { padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.prose-content {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--text);
}
.prose-content > *:first-child { margin-top: 0; }
.prose-content h2,
.prose-content h3,
.prose-content h4 {
  color: var(--text);
  letter-spacing: -0.03em;
  margin-top: 1.7em;
  margin-bottom: 0.65em;
}
.prose-content h2 { font-size: 1.55rem; }
.prose-content h3 { font-size: 1.2rem; }
.prose-content p,
.prose-content ul,
.prose-content ol,
.prose-content blockquote { color: var(--text-soft); }
.prose-content ul,
.prose-content ol { padding-left: 1.2rem; }
.prose-content li { margin-bottom: 0.45rem; }
.prose-content blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid rgba(37,99,235,.28);
  background: rgba(37,99,235,.06);
  border-radius: 0 18px 18px 0;
}
.prose-content code {
  background: rgba(15,23,42,.06);
  padding: .18rem .38rem;
  border-radius: .45rem;
  color: #0f172a;
}
.prose-content pre {
  padding: 1rem;
  border-radius: 18px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
}
.prose-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--text); }
.footer-nav { font-weight: 500; }

.search-hidden { display: none !important; }
.search-empty {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(148,163,184,.5);
  border-radius: 18px;
  color: var(--text-soft);
  background: rgba(255,255,255,.72);
}
.search-empty.show { display: block; }

@media (max-width: 991.98px) {
  .site-header .navbar-collapse { display: none !important; }
  .hero-card,
  .dashboard-block,
  .content-frame,
  .sidebar-panel { padding: 1.15rem; }
  .hero-title,
  .page-title { letter-spacing: -0.03em; }
}

@media (max-width: 767.98px) {
  .top-search-wrap { width: 100%; }
  .search-shell { padding: 0.85rem 1rem; }
  .section-head { flex-direction: column; align-items: start; }
  .hero-card { border-radius: 22px; }
}

.brand-logo {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  display: inline-block;
  flex: 0 0 auto;
}

.brand-logo-sm {
  width: 2.25rem;
  height: 2.25rem;
}

.top-search-wrap {
  max-width: 560px;
}

.top-nav-links {
  white-space: nowrap;
}

.nav-cta {
  min-width: 116px;
  justify-content: center;
}

@media (min-width: 992px) {
  .navbar > .container-xxl {
    display: grid;
    grid-template-columns: auto minmax(320px, 560px) auto;
    align-items: center;
    gap: 1rem;
  }

  .navbar-brand {
    min-width: 0;
  }

  #topNav.navbar-collapse {
    display: contents !important;
  }

  .top-search-wrap {
    grid-column: 2;
    width: 100%;
  }

  .top-nav-links {
    grid-column: 3;
    justify-self: end;
  }
}
