:root {
  --brand-primary: #76ff8d;
  --brand-dark: #56d87a;
  --brand-light: rgba(118, 255, 141, .15);

  --bg-page: #3d4c37;
  --bg-surface: #4a5a44;
  --bg-sidebar: #38473200;
  --bg-inline: #556050;
  --bg-tip: #3a5a3a;
  --bg-note: #3a4a5a;
  --bg-warn: #5a4a2a;
  --bg-danger: #5a3a3a;

  --text-primary: #f0f6fc;
  --text-secondary: #c8dfc0;
  --text-muted: #8aaa80;
  --text-inline: #76ff8d;
  --text-link: #76ff8d;

  --border: #556050;

  --sidebar-w: 260px;
  --header-h: 58px;
  --content-max: 880px;
  --radius: 8px;
  --radius-sm: 4px;
  
  --shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, .25), 0 2px 4px rgba(0, 0, 0, .2);
  color-scheme: dark;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-page);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand-primary);
  white-space: nowrap;
}

.site-logo:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

.site-header-spacer {
  flex: 1;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1;
}

.site-body {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  height: calc(100vh - var(--header-h));
  position: sticky;
  top: var(--header-h);
  overflow-y: auto;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-group-title {
  padding: 0.5rem 1.1rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}

.sidebar a {
  display: block;
  padding: 0.38rem 1.1rem 0.38rem 1.3rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .12s, background .12s, border-color .12s;
  line-height: 1.4;
}

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

.sidebar a.active {
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
  background: var(--brand-light);
  font-weight: 600;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 2.5rem 4rem;
}

.content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.1rem;
  margin-top: 1.4rem;
  margin-bottom: 0.4rem;
}

h4 {
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

p strong {
  color: var(--text-primary);
}

ul,
ol {
  margin: 0 0 1rem 1.5rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.3rem;
}

li strong {
  color: var(--text-primary);
}

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 0.4rem;
}

.page-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--text-link);
  text-decoration: none;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-inline);
  color: var(--text-inline);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

.highlight {
  background: var(--bg-inline);
  padding: 0.9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left: 4px solid var(--brand-primary);
  margin: 1rem 0;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.highlight strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.highlight ul,
.highlight ol {
  margin-bottom: 0;
}

.callout {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-left: 4px solid;
  font-size: 0.925rem;
}

.callout p {
  margin: 0;
  color: inherit;
}

.callout p+p {
  margin-top: 0.5rem;
}

.callout strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.callout-tip {
  background: var(--bg-tip);
  border-color: #10b981;
  color: #065f46;
}

.callout-note {
  background: var(--bg-note);
  border-color: #3b82f6;
  color: #1e40af;
}

.callout-warn {
  background: var(--bg-warn);
  border-color: #f59e0b;
  color: #78350f;
}

.callout-danger {
  background: var(--bg-danger);
  border-color: #ef4444;
  color: #7f1d1d;
}

@media (prefers-color-scheme: dark) {
  .callout-tip {
    color: #6ee7b7;
  }

  .callout-note {
    color: #93c5fd;
  }

  .callout-warn {
    color: #fcd34d;
  }

  .callout-danger {
    color: #fca5a5;
  }
}

.body-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  animation: fadeIn .35s ease;
}

.body-section h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.body-section h3 {
  color: var(--text-primary);
}

.body-section p,
.body-section li {
  color: var(--text-secondary);
}

.body-section ul,
.body-section ol {
  padding-left: 1.25rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--bg-surface);
}

thead tr {
  background: var(--bg-sidebar);
}

th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

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

tbody tr:hover td {
  background: var(--bg-inline);
}

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: color .15s, border-color .15s, background .15s;
}

.btn-nav:hover {
  color: var(--text-primary);
  border-color: var(--brand-primary);
  background: var(--brand-light);
  text-decoration: none;
}

.btn-nav.next {
  margin-left: auto;
}

.hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  animation: fadeIn .5s ease;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.8rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.hero-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.hero-badge {
  display: inline-block;
  background: var(--bg-inline);
  color: var(--text-muted);
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.btn-invite {
  display: inline-block;
  background: var(--bg-surface);
  color: #fff !important;
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s, transform .15s;
}

.btn-invite:hover {
  outline: 1px solid var(--brand-primary);
  transform: translateY(-2px);
}

.section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: var(--shadow);
  display: block;
  animation: fadeIn .35s ease;
}

.section-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
  text-decoration: none;
  color: inherit;
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  display: block;
}

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

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

.feature-strip {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}

.feature-strip-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  max-width: 820px;
  margin: 0 auto;
}

.feature-strip-item {
  flex: 1;
  min-width: 150px;
}

.feature-strip-item .fi-icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.feature-strip-item strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.feature-strip-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text-link);
  text-decoration: none;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    z-index: 90;
    transition: left .25s cubic-bezier(.4, 0, .2, 1);
  }

  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .18);
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .content {
    padding: 1.5rem 1.25rem 3rem;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .3);
    z-index: 80;
  }

  .sidebar-backdrop.open {
    display: block;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.65rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .section-cards {
    grid-template-columns: 1fr;
    padding: 0 1rem 3rem;
  }

  .page-nav {
    flex-direction: column;
  }

  .btn-nav.next {
    margin-left: 0;
    align-self: flex-end;
  }
}

.site-search {
  position: relative;
  margin-left: auto;
}

.site-search-input {
  background: var(--bg-inline);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  padding: 0.35rem 0.75rem;
  width: 200px;
  outline: none;
  transition: border-color .15s, width .2s;
  font-family: inherit;
}

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

.site-search-input:focus {
  border-color: var(--brand-primary);
  width: 260px;
}

.site-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
  display: none;
  animation: fadeIn .15s ease;
}

.site-search-dropdown.open {
  display: block;
}

.search-result {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 1rem;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  transition: background .1s;
  cursor: pointer;
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover,
.search-result.focused {
  background: var(--bg-inline);
  text-decoration: none;
  color: var(--text-primary);
}

.search-result-title {
  font-weight: 600;
  color: var(--brand-primary);
}

.search-result-section {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.search-result-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-empty {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 600px) {
  .site-search-input {
    width: 130px;
  }

  .site-search-input:focus {
    width: 160px;
  }

  .site-search-dropdown {
    width: 260px;
  }
}

.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    font-size: .82rem;
    color: var(--text-muted);
}