/* -------------------- variables -------------------- */
:root {
  --bg-base: #111214;
  --bg-surface: #1c1e21;
  --bg-elevated: #26282c;
  --bg-card: #393c41;

  --border-strong: #2e3146;
  --border-default: #3a3a3a;
  --border-subtle: rgba(218, 223, 247, 0.08);

  --text-primary: #f4f4f6;
  --text-secondary: #d2d2da;
  --text-muted: #bcbcc8;

  --accent: #09b4e3;
  --accent-dark: #078cb0;
  --accent-strong: #5b6eae;
  --accent-soft: rgba(114, 137, 218, 0.1);
  --accent-muted: rgba(114, 137, 218, 0.2);

  --flurple: #7f47dc;
  --flreen: #56e39f;
  --warning: #faa61a;
  --danger: #f04747;

  --overlay-light: rgba(255, 255, 255, 0.05);
  --overlay-medium: rgba(255, 255, 255, 0.1);
  --overlay-strong: rgba(255, 255, 255, 0.2);

  --gradient-main: linear-gradient(
    160deg,
    var(--bg-base) 0%,
    #1e2030 50%,
    #1a1a2e 100%
  );
  --gradient-surface: linear-gradient(
    135deg,
    var(--bg-base) 0%,
    var(--bg-elevated) 100%
  );
  --gradient-accent: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-strong) 100%
  );

  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 8px 20px rgba(114, 137, 218, 0.35);
}

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

/* -------------------- base -------------------- */
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

svg.lucide {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  stroke: currentColor;
  stroke-width: 3;
  flex-shrink: 0;
}

/* -------------------- section shared -------------------- */
/*
  Shared styles for hero, features, and any other full-width sections.
*/

.section-title {
  font-size: 36px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* -------------------- buttons -------------------- */
.btn-primary,
.btn-secondary {
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-base);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:hover,
.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

@keyframes btn-pulse-accent {
  0%,
  100% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.4),
      0 0 12px var(--accent),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.4),
      0 0 22px var(--accent),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

.btn-primary:hover {
  color: var(--text-primary);
  transform: translateY(-2px) scale(1.04);
  animation: btn-pulse-accent 1.2s ease-in-out infinite;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* -------------------- navbar -------------------- */
.navbar {
  background-color: var(--bg-base);
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 20px;
}

.navbar .logo {
  display: flex;
  gap: 10px;
}

.navbar .logo img {
  height: 3em;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.navbar .logo img:hover {
  transform: scale(1.1);
}

.navbar .nav-links {
  font-weight: 600;
  display: flex;
  gap: 30px;
  align-items: center;
}

.navbar .nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 16px;
  padding: 10px 14px;
  margin: 0 -10px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.navbar .nav-links a:hover {
  color: var(--accent);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.navbar .nav-links a:hover::before {
  left: 125%;
}

.navbar .nav-links a.btn-nav {
  background-color: var(--flreen);
  color: var(--bg-base);
  padding: 10px 20px;
  margin: 0;
}

@keyframes btn-pulse-nav {
  0%,
  100% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.4),
      0 0 12px var(--flreen),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.4),
      0 0 22px var(--flreen),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

.navbar .nav-links a.btn-nav:hover {
  color: var(--bg-base);
  transform: translateY(-2px) scale(1.04);
  animation: btn-pulse-nav 1.2s ease-in-out infinite;
}

/* -------------------- footer -------------------- */
footer {
  background-color: var(--bg-base);
  border-top: 1px solid var(--border-strong);
  padding: 16px 0;
}

.footer-brand {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 14px 0 24px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 20px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 8px;
}

.footer-column ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-column ul li a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--text-primary);
}

/* -------------------- hero -------------------- */
.hero {
  background: var(--gradient-main);
  padding: 90px 20px 80px;
  text-align: center;
  border-bottom: 1px solid var(--border-strong);
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hero-tagline {
  font-size: 15px;
  color: #7289da;
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

.columns {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 auto 40px;
  background: var(--overlay-light);
  border: var(--border-default);
  border-radius: 6px;
  padding: 18px;
  width: fit-content;
}

.column {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  color: #dcddde;
  font-size: 15px;
  font-weight: 500;
}

.column i,
.column svg.lucide {
  color: var(--accent);
  font-size: 20px;
}

.column-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
}

.hero-cta {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  justify-content: center;
  gap: 160px;
  margin-top: 80px;
}

.stat-item h3 {
  font-size: 48px;
  color: #7289da;
  margin-bottom: 10px;
  font-weight: 700;
}

.stat-item p {
  color: #8e9297;
  font-size: 16px;
}

/* -------------------- features -------------------- */
.features {
  background: var(--gradient-surface);
  padding: 80px 20px;
  border-bottom: 1px solid var(--border-strong);
}

.features.alt {
  background: var(--gradient-main);
}

.features.node {
  background: none;
}

.features.node h2 {
  color: var(--text-primary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-item {
  background-color: var(--bg-card);
  padding: 25px;
  border-radius: 8px;
  transition: all 0.3s;
}

.features.alt .feature-item {
  background-color: var(--bg-elevated);
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-accent);
}

.feature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.feature-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-item i,
.feature-item svg.lucide {
  font-size: 24px;
  color: var(--accent);
  line-height: 1;
}

.feature-item h3 {
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 600;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.feature-badge {
  display: inline-block;
  color: var(--text-primary);
  background-color: var(--flurple);
  box-shadow: 0 0 25px rgba(127, 71, 220, 0.8);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.feature-badge.beta {
  background-color: var(--flreen);
  color: var(--bg-card);
  box-shadow: 0 0 25px rgba(86, 227, 159, 0.8);
}

.feature-badge.soon {
  background-color: var(--warning);
  box-shadow: 0 0 25px rgba(250, 166, 26, 0.8);
}

/* -------------------- node / selfhost -------------------- */
.node-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.node-content .section-title {
  margin-bottom: 12px;
}

.node-content .section-subtitle {
  margin-bottom: 24px;
}

.selfhost-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.node-code {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface);
}

.code-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: monospace;
}

.code-copy {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  transition:
    border-color 0.3s,
    color 0.3s;
}

.code-copy:hover {
  color: var(--text-primary);
  border-color: var(--flreen);
  background: var(--overlay-light);
}

.code-copy .icon-check {
  display: none;
  transform: scale(0.5);
}

.code-copy.copied {
  border-color: var(--flreen);
  color: var(--flreen);
}

.code-copy.copied .icon-copy {
  display: none;
  opacity: 0;
}

.code-copy.copied .icon-check {
  display: inline;
  animation: check-pop 0.3s ease forwards;
}

.code-copy .icon-copy,
.code-copy .icon-check {
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

@keyframes check-pop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.node-code pre {
  padding: 20px;
  margin: 0;
  overflow-x: auto;
}

.node-code pre code {
  font-family: monospace;
  font-size: 14px;
  color: var(--flreen);
  line-height: 1.8;
}

/* -------------------- cta -------------------- */
.cta-box {
  text-align: center;
  padding: 80px 40px;
  background: var(--gradient-main);
  border-radius: 12px;
  border: 1px solid var(--border-strong);
}

.cta-box h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.cta-box p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.cta-box .btn-primary,
.cta-box .btn-secondary {
  margin: 0 8px;
}

/* -------------------- story -------------------- */
.story {
  padding: 80px 20px;
  background: var(--gradient-main);
  min-height: calc(100vh - 80px);
}

.story .container {
  max-width: 1150px;
}

.story-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 56px 0;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.story-card > * {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.story h1 {
  font-size: 38px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--border-subtle);
}

.story h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-top: 50px;
  margin-bottom: 20px;
}

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

.story p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.story a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.story a:hover {
  color: var(--text-primary);
}

.story code {
  font-family: monospace;
  font-size: 0.9em;
  color: var(--flreen);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-default);
}

.story-note {
  background: var(--bg-elevated);
  border-left: 3px solid var(--flurple);
  border-radius: 0 6px 6px 0;
  padding: 16px 20px;
  color: var(--text-muted);
  font-size: 15px;
  margin: 8px auto 16px;
}

/* -------------------- responsive -------------------- */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
  }

  .navbar .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .node-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .story-card {
    padding: 40px 32px;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    flex-direction: column;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .navbar .nav-links a {
    font-size: 14px;
    padding: 8px 10px;
  }
}

/* -------------------- nodes -------------------- */

.nodes-section {
  padding: 30px 20px;
  background: var(--gradient-main);
  min-height: calc(100vh - 80px);
}

.nodes-controls {
  margin-bottom: 40px;
}

.nodes-controls .section-title {
  font-size: 28px;
  margin-bottom: 16px;
}

.nodes-search-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.search-box {
  flex: 1;
  max-width: 300px;
}

.search-box input {
  width: 100%;
  padding: 8px 20px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 16px;
  transition: border-color 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

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

.filter-buttons {
  display: flex;
  gap: 10px;
}

.filter-btn {
  width: 90px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--text-primary);
}

.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.node-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 25px;
  transition: all 0.2s;
}

.node-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-strong);
  box-shadow: var(--shadow-accent);
}

.node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.node-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.node-url {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  font-family: monospace;
  margin: 4px 0 16px;
}

.node-number {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: monospace;
}

.node-details h3 {
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.node-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.node-status.online {
  background-color: var(--flreen);
  animation: status-ping 10s infinite;
}

@keyframes status-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(86, 227, 159, 0.5);
  }
  70% {
    box-shadow: 0 0 0 4px rgba(86, 227, 159, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(86, 227, 159, 0);
  }
}
.node-status.offline {
  background-color: var(--bg-card);
}

.node-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--bg-base);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.node-stat {
  text-align: center;
}

.node-stat .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-strong);
  display: block;
  margin-bottom: 5px;
}

.node-stat .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.node-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.node-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-meta-item i,
.node-meta-item svg.lucide {
  color: var(--accent);
  width: 16px;
}

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

.node-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
}

.node-btn-primary {
  background-color: var(--accent-strong);
  color: var(--text-primary);
}

.node-btn-primary:hover {
  background-color: var(--accent);
  color: var(--bg-base);
}

.node-btn-secondary {
  background-color: var(--bg-elevated);
  color: var(--text-muted);
  border-color: var(--border-default);
}

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

.loading-state,
.empty-state {
  text-align: center;
  padding: 80px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.loading-state i,
.loading-state svg.lucide,
.empty-state i,
.empty-state svg.lucide {
  font-size: 64px;
  width: 64px;
  height: 64px;
  color: var(--accent);
  stroke: var(--accent);
  margin-bottom: 20px;
}

.empty-state.error svg.lucide {
  stroke: var(--danger);
}

.loading-state h2,
.empty-state h2 {
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.loading-state p,
.empty-state p {
  color: var(--text-muted);
  font-size: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

svg.lucide-loader-circle {
  animation: spin 1s linear infinite;
  width: 64px;
  height: 64px;
  stroke: var(--accent);
  stroke-width: 1.5;
}

@media (max-width: 768px) {
  .nodes-controls {
    flex-direction: column;
  }

  .search-box {
    max-width: 100%;
  }

  .nodes-grid {
    grid-template-columns: 1fr;
  }

  .node-stats {
    grid-template-columns: 1fr;
  }
}

/* -------------------- docs -------------------- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr 220px;
  min-height: calc(100vh - 80px);
  /* max-width: 1600px; */
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* -------------------- sidebar -------------------- */
.docs-sidebar {
  border-right: 1px solid var(--border-default);
  padding: 32px 0;
  position: sticky;
  top: 0;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

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

.docs-sidebar-inner {
  padding-right: 24px;
}

/* -------------------- search -------------------- */
.docs-search-wrap {
  position: relative;
  margin-bottom: 28px;
}

.docs-search-icon,
.docs-search-icon svg.lucide {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 13px;
  height: 13px;
  pointer-events: none;
}

#docs-search {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s;
}

#docs-search:focus {
  outline: none;
  border-color: var(--accent);
}

#docs-search::placeholder {
  color: var(--text-muted);
}

/* -------------------- left nav -------------------- */
.docs-nav-group {
  margin-bottom: 28px;
}

.docs-nav-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 4px;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
  margin-bottom: 2px;
}

.docs-nav-link svg.lucide {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--text-muted);
  transition: stroke 0.15s;
}

.docs-nav-link:hover {
  background: var(--overlay-light);
  color: var(--text-primary);
}

.docs-nav-link:hover svg.lucide {
  stroke: var(--accent);
}

.docs-nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.docs-nav-link.active svg.lucide {
  stroke: var(--accent);
}

.docs-nav-link.hidden {
  display: none;
}

/* -------------------- main -------------------- */
.docs-main {
  padding: 40px 48px 60px;
  min-width: 0;
}

/* -------------------- article -------------------- */
.docs-article h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.docs-article .doc-lead {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 28px;
}

.docs-article h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 48px;
  margin-bottom: 16px;
  scroll-margin-top: 24px;
}

.docs-article h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 28px;
  margin-bottom: 10px;
  scroll-margin-top: 24px;
}

.docs-article p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.docs-article a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.docs-article a:hover {
  color: var(--text-primary);
}

.docs-article ul,
.docs-article ol {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  padding-left: 24px;
  margin-bottom: 16px;
}

.docs-article li {
  margin-bottom: 6px;
}

.docs-article code {
  font-family: monospace;
  font-size: 0.875em;
  color: var(--flreen);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-default);
}

.docs-article pre {
  margin-bottom: 20px;
}

.docs-article pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--flreen);
}

/* -------------------- code blocks -------------------- */
.code-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-elevated);
}

.code-block-lang {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-muted);
  text-transform: lowercase;
}

.code-block-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition:
    border-color 0.2s,
    color 0.2s;
  line-height: 1;
}

.code-block-copy:hover {
  color: var(--text-primary);
  border-color: var(--flreen);
  background: var(--overlay-light);
}

.code-block-copy.copied {
  color: var(--flreen);
  border-color: var(--flreen);
}

.code-block-copy svg.lucide {
  width: 12px;
  height: 12px;
}

.code-block-copy .icon-check {
  display: none;
}

.code-block-copy.copied .icon-copy {
  display: none;
}

.code-block-copy.copied .icon-check {
  display: inline-flex;
}

.code-block pre {
  padding: 20px;
  margin: 0;
  overflow-x: auto;
}

/* -------------------- tables -------------------- */
.docs-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}

.docs-article th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border-default);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docs-article td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  vertical-align: top;
}

.docs-article tr:last-child td {
  border-bottom: none;
}

/* -------------------- callouts -------------------- */
.doc-note,
.doc-warning,
.doc-tip {
  border-radius: 0 6px 6px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.doc-note {
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
}

.doc-warning {
  background: rgba(240, 71, 71, 0.08);
  border-left: 3px solid var(--danger);
}

.doc-tip {
  background: rgba(250, 166, 26, 0.08);
  border-left: 3px solid var(--warning);
}

.doc-note strong,
.doc-warning strong,
.doc-tip strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -------------------- toc -------------------- */
.docs-toc {
  padding: 32px 0 32px 32px;
  position: sticky;
  top: 0;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.docs-toc::-webkit-scrollbar {
  width: 4px;
}
.docs-toc::-webkit-scrollbar-track {
  background: transparent;
}
.docs-toc::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 2px;
}

.docs-toc-inner {
  border-left: 1px solid var(--border-default);
  padding-left: 16px;
}

.docs-toc-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

#docs-toc-nav a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.15s;
  line-height: 1.5;
}

#docs-toc-nav a:hover {
  color: var(--text-primary);
}

#docs-toc-nav a.active {
  color: var(--accent);
}

#docs-toc-nav a.toc-h3 {
  padding-left: 12px;
  font-size: 12px;
}

/* -------------------- pagination -------------------- */
.docs-pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
  gap: 20px;
}

.docs-pagination-prev,
.docs-pagination-next {
  flex: 1;
}

.docs-pagination-next {
  text-align: right;
}

.docs-pagination a {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s;
  min-width: 160px;
}

.docs-pagination a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.docs-pagination-next a {
  justify-content: flex-end;
}

.docs-pagination a > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-pagination .pag-dir {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.docs-pagination .pag-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.docs-pagination a svg.lucide {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--text-muted);
  transition: stroke 0.2s;
}

.docs-pagination a:hover svg.lucide {
  stroke: var(--accent);
}

/* -------------------- responsive -------------------- */
@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: 260px 1fr;
  }
  .docs-toc {
    display: none;
  }
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-default);
    padding: 24px 0;
  }
  .docs-sidebar-inner {
    padding-right: 0;
  }
  .docs-main {
    padding: 32px 0 48px;
  }
}
