:root {
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #282826;
  --surface2: #3c3c3a;
  --accent: #c96442;
  --accent-dim:   rgba(212,132,93,.12);
  --text: #edecea;
  --text-secondary: #b8b7b4;
  --border: rgba(255, 255, 255, 0.1);
  --code-bg: #3c3c3a;
  --code-border: #6f6f6d;
  --code-text: #e8a4b8;
}

[data-theme="light"] {
  --bg: #f0eee6;
  --surface2: #dfddd8;
  --accent: #c96442;
  --accent-dim:   rgba(212,132,93,.10);
  --text: #4d4d4d;
  --text-secondary: #7d7d7d;
  --border: rgba(0, 0, 0, 0.08);
  --code-bg: #f2f1ee;
  --code-border: #d4c9b8;
  --code-text: #d97757;
}

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

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0rem 2rem;
  display: flex;
  /* justify-content: space-between; */
  align-items: center;
  width: 100%;
  z-index: 101;
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.container {
  display: flex;
  flex: 1;
  overflow: hidden;
  padding: 0 0rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  gap: 0rem;
}

/* SIDEBAR */

.sidebar {
  width: 240px;
  background: var(--bg);
  border-right: 1px solid var(--bg);
  overflow-y: auto;
  padding: 2rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  letter-spacing: -0.5px;
}

.site-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.nav-menu {
  padding: 0 0.5rem;
}

.nav-section {
  margin-bottom: 1.75rem;
  padding: 0 0.5rem;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  padding: 0 0.75rem 0.75rem;
  display: block;
}

.nav-item {
  display: block;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.15rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
  border-radius: 2x;
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  /* border-left-color: var(--accent); */
  font-weight: 600;
}

.nav-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-secondary);
}

.nav-item.disabled:hover {
  background: transparent;
  color: var(--text-secondary);
}

/* MAIN CONTENT */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.logo {
  height: 40px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  /* margin-right: 0.5rem; */
  margin-left: 0rem;
  border: 0px;
  /* padding: 4px; */
}
.logo-text {
  height: 25px;
  width: auto;
  /* max-width: 150px; */
  object-fit: contain;
  margin-right: 0.5rem;
  border: 0px;
}
.docs-text {
  height: 25px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  margin-right: 0.5rem;
  border: 0px;
}
.theme-toggle {
  background: var(--bg);
  border: 0px solid var(--border);
  color: var(--text);
  cursor: pointer;
  width: 30px; 
  height: 30px;
  padding: 0;  
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* font-weight: 500; */
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 1.5rem;
}

.theme-toggle:hover {
  color: var(--accent);
}

.content {
  flex: 1;
  padding: 2rem 2rem;
  max-width: 1000px;
  overflow-y: auto;
  line-height: 1.8;
  margin: 0 auto;
  width: 100%;
  justify-content: center;
}

.content.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 0px solid var(--surface2);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

h5, h6 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.8;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.5;
}

/* ============================================
   CODE BLOCKS
   ============================================ */

pre {
  /* background: var(--accent); */
  /* border: 0px solid var(--border); */
  /* border-radius: 8px; */
  /* padding: 1rem; */
  overflow-x: auto;
  margin-bottom: 1rem;
  line-height: 1.5;
}

code {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--code-text);
  border-radius: 5px;
  border-color: var(--accent);
}

pre code {
  background-color: var(--code-bg) !important;
  border-color: var(--code-border) !important;
  border: 1px solid;
  color: inherit;
  background: none;
  padding: 0;
}

/* Inline code */
p code,
li code,
h1 code,
h2 code,
h3 code {
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--code-text);
}

/* ============================================
   GITHUB ALERT BOXES
   ============================================ */

.alert {
  /* border-left: 4px solid; */
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.03);
}

.alert strong svg {
  vertical-align: middle;
  margin-right: 0.3rem;
}

.alert strong {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.alert-note {
  background-color: rgba(9, 105, 218, 0.05);
  border: 0.5px solid;
  border-color: #0969da;
}

[data-theme="dark"] .alert-note {
  background-color: rgba(9, 105, 218, 0.1);
}

.alert-note strong {
  color: #0969da;
}

.alert-tip {
  background-color: rgba(26, 127, 55, 0.05);
  border: 0.5px solid;
  border-color: #1a7f37;
}

[data-theme="dark"] .alert-tip {
  background-color: rgba(26, 127, 55, 0.1);
}

.alert-tip strong {
  color: #1a7f37;
}

.alert-important {
  background-color: rgba(130, 80, 223, 0.05);
  border: 0.5px solid;
  border-color: #8250df;
}

[data-theme="dark"] .alert-important {
  background-color: rgba(130, 80, 223, 0.1);
}

.alert-important strong {
  color: #8250df;
}

.alert-warning {
  background-color: rgba(158, 106, 3, 0.05);
  border: 0.5px solid;
  border-color: #9e6a03;
}

[data-theme="dark"] .alert-warning {
  background-color: rgba(158, 106, 3, 0.1);
}

.alert-warning strong {
  color: #db9c1e;
}

.alert-caution {
  background-color: rgba(209, 36, 47, 0.05);
  border: 0.5px solid;
  border-color: #d1242f;
}

[data-theme="dark"] .alert-caution {
  background-color: rgba(209, 36, 47, 0.1);
}

.alert-caution strong {
  color: #d1242f;
}

/* ============================================
   LISTS
   ============================================ */

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ============================================
   BLOCKQUOTES
   ============================================ */

blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================
   CARDS & CALLOUTS
   ============================================ */

.card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--accent);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.note {
  background: var(--surface2);
  border-left: 4px solid var(--accent);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.note-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.note p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ============================================
   TABLES
   ============================================ */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

table thead {
  background: var(--surface2);
  border-bottom: 2px solid var(--border);
}

table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 700;
  color: var(--text);
}

table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

table tr:hover {
  background: var(--surface2);
}

/* ============================================
   IMAGES
   ============================================ */

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
  border: 1px solid var(--border);
}

/* ============================================
   UTILITIES
   ============================================ */

.loading {
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

   /* Hamburger Menu (hidden by default) */
.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 0.2rem;
}

.menu-toggle span {
  width: 0.9rem;
  height: 1.5px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle:hover span {
  background: var(--accent);
}


.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.sidebar-close {
  display: none;
}
  
@media (max-width: 950px) {
  body {
    overflow-x: hidden;
  }
  .menu-toggle {
    display: flex;
    top: 1rem;
    left: 1rem;
  }
  
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    width: 280px;
    z-index: 200;
    transition: left 0.3s ease;
    border-right: 2px solid var(--border);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .sidebar-close {
    display: block;
  }

  .logo {
  height: 34px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  margin-left: 0.5rem;
  border: 0px;
  }

  .logo-text {
  height: 25px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  margin-right: 0.2rem;
  border: 0px;
  }

  .docs-text {
  height: 25px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  margin-right: 1rem;
  border: 0px;
  }


  .header {
    padding: 0rem 1rem;
    flex-wrap: wrap;
    gap: 0rem;
  }

  .header-title {
    font-size: 1.25rem;
  }

  .container {
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .content {
    padding: 1.5rem;
    max-width: 100%;
    margin: 0;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1rem;
  }

  pre {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .nav-section {
    margin-bottom: 1rem;
  }

  .nav-section-title {
    padding: 0 0.5rem 0.5rem;
  }

  .nav-item {
    padding: 0.5rem 0.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  body {
    overflow-x: hidden;
  }
  .menu-toggle {
    display: flex;
  }
  
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    width: 280px;
    z-index: 200;
    transition: left 0.3s ease;
    border-right: 1px solid var(--border);
  }
  
  .sidebar.open {
    left: 0;
    border-bottom: 3px solid var(--surface2);
  }
  
  .header {
    padding: 0rem 1rem;
    flex-wrap: wrap;
    gap: 0rem;
  }

  .header-title {
    font-size: 1.1rem;
  }

  .content {
    padding: 1rem;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  table {
    font-size: 0.9rem;
  }

  table th, table td {
    padding: 0.5rem;
  }

  .container {
    padding: 0;
  }

  pre {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .nav-section {
    margin-bottom: 1rem;
  }

  .nav-section-title {
    padding: 0 0.5rem 0.5rem;
  }

  .nav-item {
    padding: 0.5rem 0.5rem;
    font-size: 0.9rem;
  }
}



/* Grid */

.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.docs-card {
  display: block;
  padding: 0 !important;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.docs-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.docs-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
}

.docs-card-title {
  height: 58px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 500;
  line-height: 1.2;
  color: #222;
}

.docs-card-disabled {
  cursor: default;
  pointer-events: none;
}

.docs-card-disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

@media (max-width: 900px) {
  .docs-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .docs-card-grid {
    grid-template-columns: 1fr;
  }
}



/* FAQ accordion */

.faq-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.5rem 0 1.75rem;
}

.faq-category-links a,
.faq-category-links span {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-section {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.faq-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  background: var(--bg);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "›";
  font-size: 1.25rem;
  line-height: 1;
  transition: transform var(--transition);
  color: var(--text-secondary);
}

.faq-item[open] summary::before {
  transform: rotate(90deg);
}

.faq-item[open] summary {
  color: var(--text);
}

.faq-item .faq-answer {
  padding: 0 1.25rem 1rem 2.75rem;
  color: var(--text);
}

.faq-item .faq-answer p:last-child,
.faq-item .faq-answer ul:last-child {
  margin-bottom: 0;
}