:root {
  --bg: #0b0b0d;
  --bg-deep: #08080a;
  --bg-code: #101013;
  --bg-card: #121215;
  --bg-hover: #17171a;
  --border: #2a2a2e;
  --border-soft: #202024;
  --text: #f2f2f4;
  --muted: #b4b4b9;
  --dim: #85858b;
  --faint: #68686e;
  --blue: #6f9ff7;
  --blue-dim: #4f74b5;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", sans-serif;
  --radius: 9px;
  --sidebar-w: 272px;
  --topbar-h: 56px;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(111, 159, 247, 0.25);
  color: #fff;
}

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

a:hover {
  color: #9dbcfb;
}

:focus-visible {
  outline: 2px solid #9a9aa2;
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  background: var(--text);
  color: #111;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
  color: #111;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0.9rem 0.75rem 0.7rem;
  background: var(--bg-deep);
  border-right: 1px solid var(--border-soft);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2e transparent;
}

.sidebar-top {
  display: none;
}

.sidebar-top .brand {
  color: var(--text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 21px;
  height: 21px;
  color: var(--text);
  flex: none;
}

.version-pill {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.05rem 0.4rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 38px;
  margin-bottom: 1.15rem;
  padding: 0 0.55rem;
  background: #141417;
  border: 1px solid #2c2c31;
  border-radius: 6px;
}

.search-box:focus-within {
  border-color: #45454c;
}

.search-icon {
  width: 16px;
  height: 16px;
  color: #8d8d93;
  flex: none;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.86rem;
  padding: 0;
}

.search-box input::placeholder {
  color: #8f8f95;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.search-box kbd {
  flex: none;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #9a9aa0;
  background: #19191c;
  border: 1px solid #303035;
  border-radius: 4px;
  padding: 0.1rem 0.32rem;
  white-space: nowrap;
}

.side-nav {
  flex: 1;
}

.nav-group {
  margin-bottom: 0.1rem;
}

.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  list-style: none;
  cursor: pointer;
  padding: 0.42rem 0.4rem;
  border-radius: 5px;
  color: #e8e8ea;
  font-size: 0.9rem;
  font-weight: 500;
  user-select: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary:hover {
  background: var(--bg-hover);
}

.chev {
  width: 15px;
  height: 15px;
  color: #8b8b91;
  transition: transform 0.15s ease;
}

.nav-group[open] .chev {
  transform: rotate(90deg);
}

.nav-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0.05rem 0 0.45rem 0.9rem;
}

.nav-items a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.34rem 0.5rem;
  border-radius: 5px;
  color: #d3d3d8;
  font-size: 0.86rem;
  line-height: 1.4;
}

.nav-items a:hover {
  color: #fff;
  background: var(--bg-hover);
}

.nav-items a[aria-current="true"],
.nav-items a[aria-current="page"] {
  color: #fff;
  background: #1b1b1f;
}

.nav-items a em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  flex: none;
}

.search-empty {
  margin: 0.5rem 0.5rem;
  font-size: 0.82rem;
  color: var(--faint);
}

.sidebar-foot {
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border-soft);
}

.sidebar-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #2f2f34;
  border-radius: 6px;
  color: #e4e4e8;
  font-size: 0.82rem;
}

.sidebar-action:hover {
  color: #fff;
  background: var(--bg-hover);
  border-color: #3c3c42;
}

.sidebar-action span:first-child {
  color: #a6a6ac;
}

.sidebar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0 0.15rem;
  font-size: 0.7rem;
  color: var(--faint);
}

.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 45;
  align-items: center;
  gap: 0.75rem;
  height: var(--topbar-h);
  padding: 0 1rem;
  background: rgba(11, 11, 13, 0.94);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.menu-btn {
  appearance: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex: none;
}

.menu-btn svg {
  width: 18px;
  height: 18px;
}

.mobile-bar .brand {
  font-size: 0.9rem;
}

.mobile-gh {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
}

.mobile-gh svg {
  width: 16px;
  height: 16px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.65);
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(320px, 1fr);
  gap: 2.2rem;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 3rem 5rem;
  align-items: start;
}

.doc {
  min-width: 0;
}

.rule {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border-soft);
}

.doc-section {
  padding: 2.5rem 0;
  scroll-margin-top: 1rem;
}

.doc-head {
  padding-bottom: 2.2rem;
  scroll-margin-top: 1rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.chip {
  font-family: var(--sans);
  font-size: 0.7rem;
  color: #c9c9ce;
  background: transparent;
  border: 1px solid #3a3a40;
  border-radius: 6px;
  padding: 0.08rem 0.45rem;
}

.chip-quiet {
  color: var(--muted);
}

h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.75rem, 2.6vw, 1.95rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.doc-lede {
  margin: 0 0 1rem;
  max-width: 70ch;
  color: var(--muted);
  font-size: 0.96rem;
}

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.9rem;
}

.doc-links a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--blue-dim);
}

.doc-links a:hover {
  color: #a8c5fc;
  text-decoration-color: var(--blue);
}

.section-label {
  display: none;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.3rem, 2vw, 1.42rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 700;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  letter-spacing: -0.005em;
  font-weight: 600;
}

.section-lede {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.section-lede.left {
  max-width: 70ch;
}

p {
  margin: 0 0 0.95rem;
}

p:last-child {
  margin-bottom: 0;
}

.fine {
  font-size: 0.8rem;
  color: var(--dim);
  line-height: 1.65;
}

.muted {
  color: var(--faint);
}

code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: #1a1a1e;
  border: 1px solid #2f2f34;
  border-radius: 4px;
  padding: 0.07em 0.32em;
  color: #dedee3;
  overflow-wrap: anywhere;
}

h1 code,
h2 code,
h3 code {
  font-size: 0.85em;
}

.inline-code {
  margin: 0 0.2rem;
}

.anchor-heading {
  margin-top: 2.4rem;
  scroll-margin-top: 1.5rem;
}

.subhead {
  margin-top: 2.2rem;
}

.subhead-small {
  margin-top: 1.1rem;
  font-size: 0.94rem;
}

.tabs {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f0f12;
  overflow: hidden;
}

.tablist {
  display: flex;
  gap: 0.9rem;
  padding: 0 0.9rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  background: transparent;
}

.tablist::-webkit-scrollbar {
  display: none;
}

.tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #9d9da3;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.6rem 0;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  color: #dcdce1;
}

.tab[aria-selected="true"] {
  color: #f4f4f6;
  border-bottom-color: #d8d8dd;
}

.panel {
  padding: 1.25rem 1.1rem 1.4rem;
}

.panel > h3:first-child {
  font-size: 1.05rem;
}

.steps {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.steps li {
  margin-bottom: 0.45rem;
}

.steps li::marker {
  color: #c9c9ce;
  font-family: var(--mono);
  font-weight: 700;
}

.code {
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-code);
  overflow: hidden;
}

.code:last-child {
  margin-bottom: 0;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.36rem 0.6rem 0.36rem 0.8rem;
  border-bottom: 1px solid var(--border-soft);
  background: #131316;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: #8b8b91;
}

.code-actions {
  display: flex;
  gap: 0.3rem;
}

.copy {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #8b8b91;
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.16rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
}

.copy:hover {
  color: #e6e6ea;
  border-color: var(--border);
  background: var(--bg-hover);
}

.copy.copied {
  color: #f2f2f4;
  border-color: #4a4a51;
}

.code pre {
  margin: 0;
  padding: 0.85rem 0.95rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.79rem;
  line-height: 1.75;
  color: #d8d8dd;
  tab-size: 2;
}

.code pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  overflow-wrap: normal;
}

.code.compact {
  margin: 0.8rem 0 0;
}

.code.compact pre {
  font-size: 0.74rem;
  padding: 0.65rem 0.8rem;
}

.note {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 1.1rem 0 0;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-left: 2px solid #5a5a61;
  border-radius: 6px;
  background: #111114;
  color: #bfbfc5;
  font-size: 0.86rem;
}

.note strong {
  color: #e8e8ea;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--mono);
}

.check-strip {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.2rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #111114;
  font-size: 0.85rem;
  color: var(--muted);
}

.check-strip strong {
  display: block;
  color: #e8e8ea;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}

.check-icon {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1px solid #46464d;
  background: #1b1b1f;
  color: #dedee3;
  font-weight: 700;
  font-size: 0.66rem;
  flex: none;
  margin-top: 0.15rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 1rem;
  min-width: 0;
}

.card p {
  color: var(--muted);
  font-size: 0.86rem;
}

.page-card {
  display: block;
  color: var(--text);
}

.page-card:hover {
  color: var(--text);
  border-color: #45454c;
  background: #151518;
}

.page-card h3 {
  font-size: 0.98rem;
}

.page-card .more {
  display: inline-block;
  margin-top: 0.55rem;
  color: var(--blue);
  font-size: 0.78rem;
}

.page-card:hover .more {
  color: #a8c5fc;
}

.community-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.community-card h2 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
}

.community-card p {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.88rem;
}

.community-card .btn {
  flex: none;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: auto;
  background: #0f0f12;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.81rem;
}

thead th {
  text-align: left;
  padding: 0.58rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b8b91;
  background: #111114;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.52rem 0.75rem;
  border-bottom: 1px solid var(--border-soft);
  color: #c7c7cc;
  vertical-align: top;
}

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

tbody tr:hover td {
  background: #131316;
}

td code {
  white-space: nowrap;
}

.distro-table td:first-child {
  white-space: nowrap;
}

.distro-table td:last-child code {
  display: inline-block;
  margin: 0 0.15rem 0.2rem 0;
}

.module-table td:nth-child(1),
.module-table td:nth-child(3) {
  white-space: nowrap;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.3rem;
}

.stat {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #111114;
  padding: 0.7rem 0.85rem;
}

.stat strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.25rem;
  line-height: 1.2;
  color: #f2f2f4;
}

.stat span {
  font-size: 0.72rem;
  color: var(--dim);
}

.builder {
  padding: 1.1rem;
}

.builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.builder-head p {
  margin: 0.1rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0.46rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-primary {
  background: #e8e8ea;
  color: #111;
}

.btn-primary:hover {
  color: #111;
  background: #fff;
}

.btn-ghost {
  border-color: var(--border);
  color: #d9d9dd;
  background: transparent;
}

.btn-ghost:hover {
  color: #fff;
  border-color: #45454c;
  background: var(--bg-hover);
}

.btn-small {
  padding: 0.28rem 0.6rem;
  font-size: 0.74rem;
}

.field-row {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.95rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.field label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8b8b91;
}

select,
input[type="text"] {
  width: 100%;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0e0e11;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.48rem 0.62rem;
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, #8b8b91 50%),
    linear-gradient(135deg, #8b8b91 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% + 1px),
    calc(100% - 11px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.9rem;
}

select::placeholder,
input[type="text"]::placeholder {
  color: #6f6f75;
}

select:focus,
input[type="text"]:focus {
  outline: 1px solid #57575f;
  outline-offset: 1px;
  border-color: transparent;
}

.switch-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.switch-field input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch {
  position: relative;
  width: 38px;
  height: 21px;
  border-radius: 99px;
  background: #303036;
  flex: none;
  transition: background 0.15s ease;
  order: 2;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #b9b9bf;
  transition: transform 0.15s ease, background 0.15s ease;
}

.switch-field input:checked + .switch {
  background: #d6d6db;
}

.switch-field input:checked + .switch::after {
  transform: translateX(17px);
  background: #111114;
}

.switch-field input:focus-visible + .switch {
  outline: 2px solid #9a9aa2;
  outline-offset: 2px;
}

.preset-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.chip-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: #a8a8ae;
  border-radius: 5px;
  padding: 0.18rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.67rem;
  cursor: pointer;
}

.chip-btn:hover {
  color: #f0f0f2;
  border-color: #4a4a51;
}

.module-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.module-fieldset legend {
  padding: 0;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8b8b91;
  margin-bottom: 0.45rem;
}

.module-fieldset legend .fine {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.68rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.32rem;
}

.module-grid label {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.26rem 0.42rem;
  border: 1px solid #26262b;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.71rem;
  color: #a0a0a6;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.module-grid label:hover {
  border-color: #3a3a41;
  color: #e4e4e8;
}

.module-grid label:has(input:checked) {
  border-color: #51515a;
  background: #19191d;
  color: #f0f0f2;
}

.module-grid input {
  accent-color: #b9b9bf;
  width: 12px;
  height: 12px;
  margin: 0;
  flex: none;
}

.builder-output {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.3rem;
}

.builder-output .code {
  margin: 0;
}

#cfg-json code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.precedence {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.precedence li {
  margin-bottom: 0.4rem;
}

.precedence li::marker {
  color: #c9c9ce;
  font-family: var(--mono);
  font-weight: 700;
}

.precedence strong {
  color: var(--text);
}

.plain-list {
  margin: 0 0 0.8rem;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.plain-list li {
  margin-bottom: 0.28rem;
}

.plain-list li::marker {
  color: #c9c9ce;
}

.logo-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin: 1.2rem 0 1.4rem;
}

.logo-cloud span {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #a8a8ae;
  border: 1px solid #303036;
  border-radius: 5px;
  padding: 0.18rem 0.48rem;
  background: #111114;
}

.logo-cloud span:hover {
  color: #f2f2f4;
  border-color: #4a4a51;
}

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

.faq details {
  border-bottom: 1px solid var(--border-soft);
}

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

.faq summary {
  cursor: pointer;
  padding: 0.8rem 0.95rem;
  font-weight: 500;
  font-size: 0.89rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: #8b8b91;
  font-size: 1rem;
  line-height: 1;
  flex: none;
}

.faq details[open] summary::after {
  content: "−";
}

.faq summary:hover {
  background: #151518;
}

.faq details p {
  padding: 0 0.95rem 0.85rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.rail {
  position: sticky;
  top: 2rem;
  display: grid;
  gap: 0.8rem;
  align-self: start;
  min-width: 0;
}

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

.rail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 500;
}

.rail-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #a8a8ae;
  border: 1px solid #333339;
  border-radius: 4px;
  padding: 0.02rem 0.3rem;
}

.rail-card-body {
  padding: 0.85rem 1rem;
}

.rail-muted {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--dim);
}

.rail-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.42rem 0.55rem;
  margin-bottom: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #0d0d10;
  font-family: var(--mono);
  font-size: 0.77rem;
}

.rail-code code {
  background: none;
  border: 0;
  padding: 0;
  color: #dcdce1;
  font-size: inherit;
}

.rail-copy {
  font-size: 0.6rem;
}

.rail-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.48rem 0.6rem;
  border: 1px solid #333339;
  border-radius: 5px;
  color: #e0e0e4;
  font-size: 0.8rem;
}

.rail-action:hover {
  color: #fff;
  background: var(--bg-hover);
  border-color: #44444b;
}

.rail-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: #8b8b91;
}

.rail-subrow span:last-child {
  color: #b4b4b9;
}

.rail-list {
  display: grid;
  gap: 0.4rem;
}

.rail-list > a,
.rail-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #e4e4e8;
  font-size: 0.78rem;
}

.rail-list > * + * {
  padding-top: 0.4rem;
  border-top: 1px solid var(--border-soft);
}

.rail-list a:hover {
  color: var(--blue);
}

.rail-list strong {
  display: block;
  font-weight: 500;
  line-height: 1.35;
}

.rail-list small {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--faint);
}

.rail-list em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.61rem;
  color: #9a9aa0;
  flex: none;
}

.rail-status em.ok {
  color: #dedee3;
}

.rail-status em.part {
  color: #8b8b91;
}

.rail-paths > div {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.rail-paths span {
  color: var(--dim);
}

.rail-paths code {
  font-size: 0.64rem;
  color: #8b8b91;
  background: none;
  border: 0;
  padding: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
  .content {
    grid-template-columns: minmax(0, 1fr);
    max-width: 880px;
  }

  .rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-bar {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: min(86vw, 310px);
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }

  .nav-open .sidebar {
    transform: none;
  }

  .nav-open {
    overflow: hidden;
  }

  .doc-section,
  .doc-head {
    scroll-margin-top: calc(var(--topbar-h) + 14px);
  }
}

@media (max-width: 760px) {
  .content {
    padding: 1.5rem 1.1rem 3rem;
  }

  .doc-section {
    padding: 2rem 0;
  }

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

  .stat-row {
    gap: 0.45rem;
  }

  .stat {
    padding: 0.55rem 0.65rem;
  }

  .stat strong {
    font-size: 1.05rem;
  }

  .stat span {
    font-size: 0.66rem;
  }

  .panel {
    padding: 1rem;
  }

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

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

  h1 {
    font-size: 1.75rem;
  }

  .module-grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.rail-invite {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  overflow-wrap: anywhere;
}

.community-url {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.community-url a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--blue-dim);
}
