/* ============================================
   SatoshiOffers FAQ - GitBook Three-Column Layout
   Based on SatoshiHero docs styling
   ============================================ */

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

:root {
  /* Dark Theme (Default) */
  --bg-primary: #171717;
  --bg-secondary: #1a1a1a;
  --bg-sidebar: #1e1e1e;
  --bg-card: #262626;
  --bg-card-hover: #2a2a2a;
  --bg-header: #2d2a35;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --text-muted: #737373;
  --border-color: #2e2e2e;
  --border-light: #404040;
  --accent: #a78bfa;
  --accent-hover: #c4b5fd;
  --link-color: #60a5fa;
  --check-color: #22c55e;
  --header-height: 60px;
  --sidebar-width: 260px;
  --toc-width: 240px;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-sidebar: #f3f4f6;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --bg-header: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --border-light: #d1d5db;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.toc-wrapper::-webkit-scrollbar {
  width: 4px;
}

/* ============================================
   Layout
   ============================================ */

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

/* ============================================
   Left Sidebar
   ============================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  font-family: 'Brush Script MT', 'Segoe Script', cursive;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.logo:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.logo-text {
  font-family: inherit;
  font-size: inherit;
  font-weight: normal;
  color: inherit;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 8px;
}

.nav-section {
  margin-bottom: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  margin-bottom: 2px;
}

.nav-item:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-item.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.nav-item-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item-text {
  flex: 1;
}

.nav-item-arrow {
  margin-left: auto;
  font-size: 0.625rem;
  transition: transform 0.2s;
  color: var(--text-muted);
  padding: 8px;
  cursor: pointer;
}

.nav-item.expanded .nav-item-arrow {
  transform: rotate(90deg);
}

/* Expandable children */
.nav-children {
  display: none;
  padding-left: 20px;
  margin-top: 2px;
}

.nav-children.show {
  display: block;
}

.nav-child-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  border-radius: 6px;
  transition: all 0.15s;
  margin-bottom: 1px;
}

.nav-child-item:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-child-item.active {
  color: var(--text-primary);
}

.nav-child-icon {
  font-size: 0.875rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.15s;
}

.sidebar-footer a:hover {
  background-color: var(--bg-card);
  text-decoration: none;
}

/* ============================================
   Main Content Area
   ============================================ */

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.header-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.header-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  min-width: 180px;
  transition: all 0.2s;
}

.search-btn:hover {
  border-color: var(--border-light);
}

.search-btn .search-placeholder {
  flex: 1;
  text-align: left;
  color: var(--text-muted);
}

.search-btn kbd {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-family: inherit;
}

.external-link-btn {
  background: transparent;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
  flex: 1;
  min-width: 0;
}

/* Flex layout when content-wrapper or toc-wrapper exists (for TOC sidebar) */
.main-content:has(> .content-wrapper),
.main-content:has(> .toc-wrapper) {
  display: flex;
}

.content-wrapper {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}

/* Content Header */
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.page-title-icon {
  font-size: 2rem;
}

.page-description {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 40px;
}

/* ============================================
   Content Typography (matches SatoshiHero)
   ============================================ */

/* For CMS-edited pages (Type B: content directly in main) */
.main-content h1 {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.main-content h2,
.content-section h2,
.content-wrapper h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.main-content h1 + h2,
.content-wrapper h1 + h2,
.page-description + .content-section h2 {
  margin-top: 24px;
}

.content-section:first-child h2 {
  margin-top: 0;
}

.main-content h3,
.content-section h3,
.content-wrapper h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.main-content h4,
.content-section h4,
.content-wrapper h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.main-content p,
.content-section p,
.content-wrapper p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.main-content p strong,
.content-section p strong,
.content-wrapper p strong {
  color: var(--text-primary);
}

.main-content a,
.content-section a,
.content-wrapper a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.main-content a:hover,
.content-section a:hover,
.content-wrapper a:hover {
  color: var(--accent-hover);
}

/* Lists */
.main-content ul,
.content-section ul,
.content-wrapper ul {
  list-style: none;
  margin-bottom: 16px;
}

.main-content ol,
.content-section ol,
.content-wrapper ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.main-content li,
.content-section li,
.content-wrapper li {
  padding: 4px 0;
  color: var(--text-secondary);
}

/* Diamond bullet markers — same as SatoshiHero */
.main-content ul:not([class]) li::before,
.content-section ul:not([class]) li::before,
.content-wrapper ul:not([class]) li::before {
  content: "\25C6\00A0";
  color: var(--accent);
}

.main-content img,
.content-wrapper img {
  max-width: 100%;
  border-radius: 8px;
  margin: 16px 0;
  display: block;
}

.main-content hr,
.content-wrapper hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 32px 0;
}

.main-content blockquote,
.content-wrapper blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 16px 0;
  background-color: var(--bg-card);
  border-radius: 0 8px 8px 0;
  color: var(--text-secondary);
}

/* Content sections */
.content-section {
  margin-bottom: 40px;
}

/* ============================================
   Page Link Cards
   ============================================ */

.page-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
  margin-bottom: 8px;
}

.page-link-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-light);
  text-decoration: none;
  color: var(--text-primary);
}

.page-link-icon {
  font-size: 1.1em;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.page-link-text {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.page-link-arrow {
  color: var(--text-muted);
  font-size: 1.4em;
  flex-shrink: 0;
  line-height: 1;
}

/* ============================================
   FAQ Accordion
   ============================================ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-card);
}

.faq-item:not(:last-child) {
  margin-bottom: 8px;
}

.faq-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  gap: 12px;
}

.faq-header:hover {
  background-color: var(--bg-card-hover);
}

.faq-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.expanded .faq-arrow {
  transform: rotate(90deg);
}

.faq-question {
  font-size: 0.95rem;
  color: var(--text-primary);
  flex: 1;
}

.faq-question strong {
  color: var(--accent);
}

.faq-content {
  display: none;
  padding: 0 20px 20px 44px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-item.expanded .faq-content {
  display: block;
}

/* ============================================
   Right Sidebar — Table of Contents
   ============================================ */

.toc-wrapper {
  width: var(--toc-width);
  min-width: var(--toc-width);
  padding: 24px 16px;
  position: sticky;
  top: calc(var(--header-height) + 16px);
  height: fit-content;
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-left: 8px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-item {
  margin-bottom: 0;
}

.toc-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  line-height: 1.4;
}

.toc-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-card);
  text-decoration: none;
}

.toc-link.active {
  color: var(--text-primary);
  border-left-color: var(--accent);
  background-color: transparent;
}

.toc-icon {
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* TOC level-3 indent */
.toc-item.toc-level-3 {
  padding-left: 16px;
}

.toc-item.toc-level-3 .toc-link {
  font-size: 0.75rem;
}

/* ============================================
   Code Blocks
   ============================================ */

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background-color: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background-color: var(--bg-card);
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
}

pre code {
  background: none;
  padding: 0;
}

/* ============================================
   Tables
   ============================================ */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

thead {
  background: linear-gradient(135deg, var(--bg-header) 0%, rgba(167, 139, 250, 0.15) 100%);
}

thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--accent);
}

tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
  background-color: var(--bg-card-hover);
}

tbody td {
  padding: 12px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
}

tbody td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.table-wrapper table {
  margin: 0;
  border: none;
  border-radius: 0;
}

[data-theme="light"] thead {
  background: linear-gradient(135deg, #f8f9fa 0%, rgba(167, 139, 250, 0.1) 100%);
}

[data-theme="light"] tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* ============================================
   Info / Hint Boxes
   ============================================ */

.info-box,
.gitbook-hint {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 16px 0;
  border: 1px solid;
}

.info-box.tip,
.gitbook-hint-info {
  background-color: rgba(96, 165, 250, 0.08);
  border-color: rgba(96, 165, 250, 0.2);
  color: var(--text-secondary);
}

.info-box.warning,
.gitbook-hint-warning {
  background-color: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.2);
  color: var(--text-secondary);
}

.info-box.danger,
.gitbook-hint-danger {
  background-color: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--text-secondary);
}

.gitbook-hint-success {
  background-color: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--text-secondary);
}

.gitbook-hint-icon {
  flex-shrink: 0;
  font-size: 1.1em;
  line-height: 1.7;
}

.gitbook-hint-content {
  flex: 1;
  min-width: 0;
}

.gitbook-hint-content p {
  margin-bottom: 0;
}

.gitbook-hint-content p + p {
  margin-top: 8px;
}

/* ============================================
   Collapsible Details/Summary Blocks
   ============================================ */

details {
  border: 1px solid var(--border-color);
  border-radius: 0;
  margin: 0;
  background: transparent;
  overflow: hidden;
}

details + details {
  border-top: none;
}

details:not(details + details) {
  margin-top: 24px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

details:not(:has(+ details)) {
  margin-bottom: 24px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

details:not(details + details):not(:has(+ details)) {
  border-radius: 8px;
  margin: 24px 0;
}

details summary {
  padding: 16px 20px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  transition: background-color 0.15s;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: '\203A';
  font-size: 1.3em;
  line-height: 1;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details[open] summary {
  border-bottom: 1px solid var(--border-color);
}

details summary:hover {
  background-color: var(--bg-card-hover);
}

details > *:not(summary) {
  padding: 0 20px;
}

details > *:not(summary):first-of-type {
  padding-top: 16px;
}

details > *:not(summary):last-child {
  padding-bottom: 16px;
  margin-bottom: 0;
}

/* ============================================
   Theme Switcher
   ============================================ */

.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  gap: 4px;
  padding: 4px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  z-index: 1000;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.theme-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

.theme-btn.active {
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

/* ============================================
   Search Modal
   ============================================ */

.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  z-index: 2000;
}

.search-modal.show {
  display: flex;
}

.search-modal-content {
  width: 90%;
  max-width: 600px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.search-icon {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-close {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px;
}

.search-result-item {
  display: block;
  padding: 12px 16px;
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: 4px;
}

.search-result-item:hover {
  background-color: var(--bg-card);
  text-decoration: none;
}

.search-result-title {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.search-result-path {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.search-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

/* ============================================
   Language Selector
   ============================================ */

.language-selector {
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
  position: relative;
}

.language-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.15s;
}

.language-btn:hover {
  background-color: var(--bg-card);
}

.language-btn .flag-icon {
  font-size: 1.125rem;
}

.language-btn .lang-name {
  flex: 1;
  text-align: left;
}

.language-btn .lang-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s;
  color: var(--text-muted);
}

.language-btn.active .lang-arrow {
  transform: rotate(180deg);
}

.language-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 16px;
  right: 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-height: 320px;
  overflow-y: auto;
}

.language-dropdown.show {
  display: block;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  text-align: left;
  transition: all 0.15s;
}

.language-option:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.language-option.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.language-option .flag-icon {
  font-size: 1.25rem;
}

.language-option .lang-name {
  flex: 1;
}

.language-option .check-icon {
  color: var(--check-color);
  font-size: 0.75rem;
  display: none;
}

.language-option.active .check-icon {
  display: block;
}

/* ============================================
   Mobile Overlay
   ============================================ */

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

.sidebar-overlay.show {
  display: block;
}

/* ============================================
   SPA Transitions
   ============================================ */

.content-wrapper {
  transition: opacity 0.15s ease;
}

.content-wrapper.spa-fading {
  opacity: 0;
}

/* ============================================
   Breadcrumb
   ============================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.breadcrumb .flag-icon {
  font-size: 0.875rem;
}

/* ============================================
   Utility / Misc
   ============================================ */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* Hidden nav items (CMS reorder) */
.nav-item-hidden,
.nav-child-item-hidden {
  display: none !important;
}

/* Toast animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1200px) {
  .toc-wrapper {
    display: none;
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .header {
    justify-content: space-between;
  }

  .content-wrapper {
    padding: 24px 20px 60px;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .page-title-icon {
    font-size: 1.5rem;
  }

  .content-section h2 {
    font-size: 1.25rem;
  }

  .theme-toggle {
    bottom: 16px;
    right: 16px;
  }
}

@media (max-width: 600px) {
  .search-btn {
    min-width: auto;
    padding: 8px;
  }

  .search-btn .search-placeholder,
  .search-btn kbd {
    display: none;
  }

  .page-title {
    font-size: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  table {
    font-size: 0.8rem;
  }

  thead th,
  tbody td {
    padding: 10px 12px;
  }
}
