:root {
  --gold-700: #a67c00;
  --gold-500: #d4a017;
  --gold-300: #e8c56a;
  --black-900: #0e0e0e;
  --white-000: #ffffff;
  --warm-050: #fff9ef;
  --warm-100: #f7eedb;
  --gray-600: #6b6b6b;
  --gray-700: #4a4a4a;
  --success: #3e8e6e;
  --warning: #b8791f;
  --danger: #b94a48;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
}

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@300;400;500;600;700&display=swap");

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--black-900);
  background: radial-gradient(circle at top, var(--warm-050), var(--warm-100));
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  margin: 0 0 10px;
}

h1 {
  font-size: 42px;
  line-height: 1.05;
}

h2 {
  font-size: 30px;
  line-height: 1.1;
}

h3 {
  font-size: 24px;
  line-height: 1.15;
}

p,
li {
  line-height: 1.65;
}

.kb-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

.kb-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 24px;
  background: var(--black-900);
  color: var(--white-000);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
}

.kb-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.kb-brand-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
}

.kb-brand-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
  line-height: 0.95;
}

.kb-brand-subtitle {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.kb-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
}

.kb-sidebar-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.kb-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-left: 4px;
  direction: rtl;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.kb-nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  direction: ltr;
}

.kb-nav-group + .kb-nav-group {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.kb-nav-group-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  padding: 0 4px;
}

.kb-nav-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kb-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--white-000);
}

.kb-nav-toggle.current-group {
  color: var(--white-000);
}

.kb-nav-toggle-caret {
  opacity: 0.75;
  font-size: 11px;
  line-height: 1;
}

.kb-nav-items {
  display: none;
  gap: 8px;
  flex-direction: column;
}

.kb-nav-group.open .kb-nav-items {
  display: flex;
}

.kb-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.84);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.kb-nav a:hover,
.kb-nav a.current {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white-000);
}

.kb-nav::-webkit-scrollbar {
  width: 6px;
}

.kb-nav::-webkit-scrollbar-track {
  background: transparent;
}

.kb-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.kb-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.kb-sidebar-note {
  margin-top: auto;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

.kb-main {
  padding: 28px;
}

.kb-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.kb-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kb-breadcrumbs {
  font-size: 13px;
  color: var(--gray-600);
}

.kb-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kb-mobile-menu-btn,
.kb-mobile-overlay {
  display: none;
}

.kb-search {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.kb-search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.kb-search-input {
  flex: 1 1 320px;
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(166, 124, 0, 0.22);
  background: rgba(255, 255, 255, 0.96);
  font: inherit;
  color: var(--black-900);
}

.kb-search-results {
  display: grid;
  gap: 12px;
}

.kb-search-empty {
  color: var(--gray-700);
  font-size: 14px;
}

.kb-search-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.96);
}

.kb-search-card h3 {
  margin-bottom: 6px;
}

.kb-search-card p {
  margin-bottom: 8px;
}

.kb-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--white-000);
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.primary {
  background: var(--gold-500);
  color: var(--black-900);
}

.btn.secondary {
  background: transparent;
  border: 1px solid rgba(166, 124, 0, 0.3);
  box-shadow: none;
}

.hero-card,
.kb-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  padding: 26px;
  margin-bottom: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
}

.hero-lead {
  font-size: 17px;
  color: var(--gray-700);
  max-width: 760px;
}

.kb-card {
  padding: 22px;
  margin-bottom: 18px;
}

.kb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.kb-list {
  margin: 0;
  padding-left: 18px;
}

.kb-list.tight li + li {
  margin-top: 4px;
}

.muted {
  color: var(--gray-700);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.success {
  background: rgba(62, 142, 110, 0.12);
  color: var(--success);
}

.badge.warning {
  background: rgba(184, 121, 31, 0.12);
  color: var(--warning);
}

.badge.danger {
  background: rgba(185, 74, 72, 0.12);
  color: var(--danger);
}

.kb-steps {
  display: grid;
  gap: 10px;
}

.kb-step {
  padding: 14px;
  border-radius: 14px;
  background: rgba(247, 238, 219, 0.58);
  border: 1px solid rgba(212, 160, 23, 0.18);
}

.kb-step strong {
  display: block;
  margin-bottom: 4px;
}

.kb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.kb-table th,
.kb-table td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.kb-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600);
}

.kb-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: rgba(14, 14, 14, 0.04);
  padding: 2px 6px;
  border-radius: 6px;
}

.kb-content section + section {
  margin-top: 22px;
}

.kb-content ul {
  margin-top: 10px;
  margin-bottom: 0;
}

.kb-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.kb-footer-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--white-000);
  border: 1px solid rgba(166, 124, 0, 0.2);
}

mark {
  background: rgba(232, 197, 106, 0.45);
  color: inherit;
  padding: 0 2px;
  border-radius: 4px;
}

.kb-article-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.kb-article-meta {
  font-size: 13px;
  color: var(--gray-600);
}

@media (max-width: 1080px) {
  .hero-grid,
  .kb-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .kb-shell {
    grid-template-columns: 1fr;
  }

  .kb-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(320px, 86vw);
    height: 100vh;
    z-index: 5000;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .kb-main {
    padding: 16px;
  }

  .kb-mobile-menu-btn {
    display: inline-flex;
    border: 1px solid rgba(166, 124, 0, 0.22);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
  }

  .kb-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 14, 14, 0.28);
    z-index: 4900;
  }

  body.kb-menu-open .kb-sidebar {
    transform: translateX(0);
  }

  body.kb-menu-open .kb-mobile-overlay {
    display: block;
  }

  .kb-topbar,
  .kb-article-title,
  .kb-footer-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .kb-topbar {
    width: 100%;
  }

  .kb-topbar-left {
    width: 100%;
    justify-content: flex-start;
  }

  h1 {
    font-size: 34px;
  }
}
