/* =============================================================
 * 组件：按钮 / 标签 / 卡片 / 代码块 / Tab / Callout / Step / 表格
 * ============================================================= */

/* —— 按钮 —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fz-base);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: #000;
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

[data-theme="dark"] .btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--muted-2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border);
  height: 36px;
  padding: 0 14px;
  font-size: var(--fz-sm);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: var(--fz-sm);
  border-radius: var(--r-sm);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* —— 卡片 —— */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-1);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-hover:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.card-pad-lg {
  padding: var(--sp-8);
}

.card-title {
  font-size: var(--fz-lg);
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--text);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--sp-4);
  font-size: 20px;
}

.card-desc {
  color: var(--muted);
  font-size: var(--fz-sm);
  line-height: 1.65;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: var(--fz-xs);
  color: var(--muted);
}

.card-meta dt {
  color: var(--muted-2);
  font-weight: 500;
}

.card-meta dd {
  margin: 0;
  color: var(--text-soft);
  font-weight: 500;
}

.card-meta-row {
  display: flex;
  gap: 6px;
}

/* —— 标签 —— */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: var(--fz-xs);
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.tag-accent {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: transparent;
}

.tag-method {
  font-weight: 700;
  padding: 0 8px;
  height: 22px;
  border-radius: var(--r-sm);
  font-size: 11px;
  letter-spacing: 0.04em;
  border: none;
}

.tag-method.m-get {
  background: var(--m-get-bg);
  color: var(--m-get);
}
.tag-method.m-post {
  background: var(--m-post-bg);
  color: var(--m-post);
}
.tag-method.m-put {
  background: var(--m-put-bg);
  color: var(--m-put);
}
.tag-method.m-patch {
  background: var(--m-patch-bg);
  color: var(--m-patch);
}
.tag-method.m-delete {
  background: var(--m-delete-bg);
  color: var(--m-delete);
}
.tag-method.m-head,
.tag-method.m-options {
  background: var(--m-head-bg);
  color: var(--m-head);
}

/* —— 折叠块（次要详情：长代码 / 进阶说明） —— */
.collapsible {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.collapsible[open] {
  border-color: var(--border-strong);
}

.collapsible > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: var(--fz-sm);
  color: var(--text);
  user-select: none;
  background: var(--surface-2);
  border-bottom: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary::marker { content: ""; }

.collapsible > summary::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.collapsible[open] > summary::before {
  transform: rotate(90deg);
}

.collapsible > summary:hover {
  background: var(--border);
}

.collapsible[open] > summary {
  border-bottom-color: var(--border);
}

.collapsible-body {
  padding: var(--sp-5);
}

.collapsible-body > :last-child {
  margin-bottom: 0;
}

.collapsible-body .table {
  margin: 0;
}

.collapsible > .code-block {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.collapsible > .code-block .code-block-header {
  border-top: 0;
}

.event-payload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--surface);
}

.event-payload-grid .code-block {
  min-width: 0;
  margin: 0;
}

.event-field-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: var(--sp-4);
}

.event-field-title {
  font-size: var(--fz-sm);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.event-field-note {
  margin: 0 0 var(--sp-3);
  color: var(--muted);
  font-size: var(--fz-sm);
  line-height: 1.7;
}

.event-field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fz-sm);
}

.event-field-table tr + tr {
  border-top: 1px solid var(--border);
}

.event-field-table td {
  vertical-align: top;
  padding: 9px 0;
  line-height: 1.6;
}

.event-field-table td:first-child {
  width: 42%;
  padding-right: var(--sp-3);
  color: var(--text);
}

.event-field-table td:last-child {
  color: var(--muted);
}

@media (max-width: 900px) {
  .event-payload-grid {
    grid-template-columns: 1fr;
  }
}

/* —— 代码块 —— */
.code-block {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: var(--sp-3) 0;
}

[data-theme="dark"] .code-block {
  background: #0b0d11;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 12px 0 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: var(--fz-xs);
  font-weight: 500;
  color: var(--muted);
  font-family: var(--font-mono);
}

[data-theme="dark"] .code-block-header {
  background: #14171c;
}

.code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: var(--fz-sm);
  line-height: 1.65;
  color: var(--text);
}

[data-theme="dark"] .code-block pre {
  color: #d4d7dd;
}

.code-block code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  font-family: var(--font-mono);
}

.command-stack {
  display: grid;
  gap: var(--sp-3);
}

.command-stack .code-block {
  margin: 0;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: var(--fz-xs);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.copy-btn.is-copied {
  background: var(--success-bg);
  color: var(--success);
  border-color: transparent;
}

.copy-btn.is-copy-failed {
  background: rgba(231, 76, 60, 0.12);
  color: #c0392b;
  border-color: transparent;
}

[data-theme="dark"] .copy-btn.is-copy-failed {
  background: rgba(231, 76, 60, 0.18);
  color: #ff8478;
}

[data-theme="dark"] .copy-btn:hover {
  background: var(--surface-2);
}

/* —— Tab —— */
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-3);
  width: fit-content;
}

.tab-btn {
  height: 32px;
  padding: 0 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: var(--fz-sm);
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.tab-btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-1);
}

.tab-btn .tab-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: 1px;
}

.tab-btn.is-active .tab-badge {
  background: var(--accent);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

/* —— Callout —— */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--info-bg);
  border-left: 3px solid var(--info);
  margin: var(--sp-4) 0;
}

.callout-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--info);
}

.callout-body {
  flex: 1;
  min-width: 0;
}

.callout-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  font-size: var(--fz-sm);
}

.callout-body p {
  font-size: var(--fz-sm);
  color: var(--text-soft);
}

.callout-warn {
  background: var(--warn-bg);
  border-left-color: var(--warn);
}

.callout-warn .callout-icon {
  color: var(--warn);
}

.callout-danger {
  background: var(--danger-bg);
  border-left-color: var(--danger);
}

.callout-danger .callout-icon {
  color: var(--danger);
}

.callout-success {
  background: var(--success-bg);
  border-left-color: var(--success);
}

.callout-success .callout-icon {
  color: var(--success);
}

/* —— Step（流程条） —— */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin: var(--sp-6) 0;
}

.step {
  flex: 1;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: var(--fz-sm);
  margin-bottom: var(--sp-3);
  font-family: var(--font-mono);
}

.step-title {
  font-weight: 600;
  font-size: var(--fz-md);
  color: var(--text);
  margin-bottom: 4px;
}

.step-desc {
  font-size: var(--fz-sm);
  color: var(--muted);
  line-height: 1.6;
}

/* —— 表格 —— */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-size: var(--fz-sm);
}

.table thead {
  background: var(--surface-2);
}

.table th,
.table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  color: var(--text);
  font-size: var(--fz-sm);
}

.table td {
  color: var(--text-soft);
  vertical-align: top;
}

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

.table tbody tr:hover td {
  background: var(--surface-2);
}

.table code {
  font-size: 12px;
}

/* —— 接口卡片 —— */
.endpoint {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-3);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.endpoint:hover {
  border-color: var(--border-strong);
}

.endpoint-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.endpoint-head:hover {
  background: var(--surface-2);
}

.endpoint-path {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--fz-sm);
  color: var(--text);
  word-break: break-all;
  font-weight: 500;
}

.endpoint-summary {
  color: var(--muted);
  font-size: var(--fz-sm);
  margin-left: var(--sp-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.endpoint-scopes {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.endpoint-toggle {
  flex-shrink: 0;
  color: var(--muted-2);
  transition: transform 0.2s ease;
}

.endpoint.is-open .endpoint-toggle {
  transform: rotate(90deg);
}

.endpoint-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.endpoint.is-open .endpoint-body {
  display: block;
}

.endpoint-section {
  margin-top: var(--sp-4);
}

.endpoint-section-title {
  font-size: var(--fz-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}

.endpoint-section-subtitle {
  font-size: var(--fz-sm);
  font-weight: 600;
  color: var(--text);
  margin: var(--sp-3) 0 8px;
}

/* —— Schema 渲染 —— */
.schema-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: var(--fz-sm);
}

.schema-head-name {
  font-weight: 600;
  color: var(--text);
}

.schema-head-type {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: 12px;
}

.schema-head-desc {
  color: var(--muted);
  font-size: var(--fz-sm);
  margin: 4px 0 8px;
}

.schema-head-desc-inline {
  color: var(--muted);
  font-size: var(--fz-sm);
}

.tag-required {
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 11px;
  padding: 0 8px;
  height: 20px;
  border-radius: var(--r-sm);
}

.tag-status {
  font-weight: 700;
  padding: 0 8px;
  height: 22px;
  border-radius: var(--r-sm);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.tag-status-ok {
  background: var(--m-get-bg);
  color: var(--m-get);
}

.tag-status-redirect {
  background: var(--m-patch-bg);
  color: var(--m-patch);
}

.tag-status-client {
  background: var(--m-put-bg);
  color: var(--m-put);
}

.tag-status-server {
  background: var(--m-delete-bg);
  color: var(--m-delete);
}

.tag-status-default {
  background: var(--surface-2);
  color: var(--muted);
}

.table-schema {
  font-size: 13px;
}

.table-schema th,
.table-schema td {
  padding: 8px 12px;
}

.table-schema .schema-name {
  white-space: nowrap;
  font-size: 12px;
}

.schema-indent {
  color: var(--muted-2);
  user-select: none;
}

/* —— 接口列表过滤器 —— */
.api-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  margin-bottom: var(--sp-6);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.input {
  height: 36px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--fz-sm);
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  min-width: 0;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.skills-textarea {
  display: block;
  width: 100%;
  height: auto;
  min-height: 360px;
  padding: var(--sp-5);
  line-height: 1.6;
  resize: vertical;
}

.input-grow {
  flex: 1;
  min-width: 200px;
}

.method-filter {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.method-filter button {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.method-filter button:hover {
  background: var(--surface-2);
}

.method-filter button.is-active {
  border-color: transparent;
}

.method-filter button.is-active.m-get {
  background: var(--m-get-bg);
  color: var(--m-get);
}
.method-filter button.is-active.m-post {
  background: var(--m-post-bg);
  color: var(--m-post);
}
.method-filter button.is-active.m-put {
  background: var(--m-put-bg);
  color: var(--m-put);
}
.method-filter button.is-active.m-patch {
  background: var(--m-patch-bg);
  color: var(--m-patch);
}
.method-filter button.is-active.m-delete {
  background: var(--m-delete-bg);
  color: var(--m-delete);
}

/* —— 侧边目录 —— */
.toc-group {
  margin-bottom: var(--sp-5);
}

.toc-group-title {
  font-size: var(--fz-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 12px;
  margin-bottom: 6px;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  font-size: var(--fz-sm);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  min-width: 0;
}

.toc-item > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toc-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.toc-item-count {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* —— 状态面板 —— */
.state-panel {
  padding: var(--sp-12) var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-align: center;
}

.state-panel-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto var(--sp-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.state-panel-icon.is-error {
  background: var(--danger-bg);
  color: var(--danger);
}

.state-panel h3 {
  margin-bottom: var(--sp-2);
}

.state-panel p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto var(--sp-4);
}

/* —— Spinner —— */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* —— Toast —— */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-pill);
  font-size: var(--fz-sm);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 1000;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* —— 锚点偏移（防被 sticky nav 挡） —— */
.anchor-offset {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* —— 页内目录列表 —— */
.list-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-bullets li {
  padding-left: 24px;
  position: relative;
  color: var(--text-soft);
  margin: 8px 0;
  font-size: var(--fz-sm);
  line-height: 1.65;
}

.list-bullets li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* —— 字段定义列表 —— */
.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px var(--sp-4);
  font-size: var(--fz-sm);
  align-items: baseline;
}

.kv dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.kv dd {
  margin: 0;
  color: var(--text-soft);
}

/* —— Pill 列表 —— */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* —— Nav 下拉菜单（API Key 等多子项的折叠组）—— */
.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown-trigger {
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  gap: 6px;
}

.nav-dropdown-caret {
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.nav-dropdown:hover .nav-dropdown-caret,
.nav-dropdown:focus-within .nav-dropdown-caret,
.nav-dropdown[data-open="true"] .nav-dropdown-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  min-width: 200px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 60;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown[data-open="true"] .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  font-size: var(--fz-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-dropdown-item.is-active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}
