:root {
  --bg: #07070a;
  --bg-subtle: #0c0c10;
  --bg-muted: #15151a;
  --surface: #0f0f13;
  --surface-hover: #181820;
  --border: #1c1c24;
  --border-strong: #2a2a34;
  --text: #f5f5f4;
  --text-muted: #a5a3a0;
  --text-faint: #5a5a64;
  --accent-on: #07070a;
  --warn: #f59e0b;
  --danger: #ef6b5c;
  --ok: #4ade80;
  --warn-rgb: 245, 158, 11;
  --danger-rgb: 239, 107, 92;
  --ok-rgb: 74, 222, 128;
  --code-bg: #0c0c10;
  --grid-line: rgba(255, 255, 255, 0.04);
  --grid-line-strong: rgba(255, 255, 255, 0.08);
  --glow: rgba(255, 255, 255, 0.12);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

html,
body,
#app {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre,
.mono {
  font-family: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.grow { flex: 1; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.t-tiny {
  color: var(--text-faint);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.t-h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: -0.025em;
  font-weight: 560;
}

.t-h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.24;
  letter-spacing: -0.016em;
  font-weight: 560;
  display: inline-flex;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 460;
  white-space: nowrap;
  transition: background 100ms, border-color 100ms, transform 100ms;
}

.btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled,
.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}
.btn.primary { background: var(--text); color: var(--accent-on); border-color: var(--text); }
.btn.primary:hover { box-shadow: 0 0 0 1px var(--glow), 0 0 18px var(--glow); }
.btn:disabled:hover,
.icon-btn:disabled:hover {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: none;
  color: var(--text-muted);
}
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 0 8px; font-size: 12px; }
.btn.lg { height: 38px; padding: 0 16px; font-size: 14px; }
.btn.danger { color: #ff9a90; border-color: rgba(239, 107, 92, 0.4); background: rgba(239, 107, 92, 0.1); }

.icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  transition: background 100ms, border-color 100ms, color 100ms, transform 100ms;
}

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

.icon-btn:active { transform: translateY(1px); }

.icon-btn.danger {
  color: #ff9a90;
  border-color: rgba(239, 107, 92, 0.25);
}

.icon-btn.danger:hover {
  background: rgba(239, 107, 92, 0.12);
  border-color: rgba(239, 107, 92, 0.5);
}

.ri-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1.08em;
}

.brand .ri-icon,
.muted .ri-icon,
.tree-row .ri-icon,
.bp-tree-icon .ri-icon {
  color: currentColor;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.tag.solid {
  color: var(--accent-on);
  background: var(--text);
  border-color: var(--text);
}

.tag.warn {
  color: #ffd2a3;
  border-color: rgba(255, 186, 116, 0.35);
  background: rgba(255, 186, 116, 0.08);
}

.tag.ready {
  color: #7ee8a2;
  border-color: rgba(126, 232, 162, 0.35);
  background: rgba(126, 232, 162, 0.08);
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 5px;
  color: var(--text);
  outline: none;
  padding: 8px 10px;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--text);
}

.input.invalid,
.textarea.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px rgba(239, 107, 92, 0.2);
}

.textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.55;
}

.field-label {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 560;
}

.field-block {
  display: block;
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.field-hint.error {
  color: var(--danger);
}

.field-hint.warn {
  color: var(--warn);
}

.field-hint.inline {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  padding: 2px 6px;
  border: 1px solid rgba(239, 107, 92, 0.28);
  border-radius: 999px;
  background: rgba(239, 107, 92, 0.08);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.hr {
  height: 1px;
  background: var(--border);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.42);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.42); }
  70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  height: 68px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 26px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.brand-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--text);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 800;
}

.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.crumbs button {
  padding: 0;
  background: transparent;
  color: var(--text-muted);
}

.crumbs button:hover,
.crumbs .current {
  color: var(--text);
}

.crumbs .sep { color: var(--text-faint); }

.dashboard {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 40px 80px;
  overflow: auto;
}

.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.dash-head p {
  margin: 6px 0 0;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hidden-file-input {
  display: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-grid.five {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.tile {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  color: var(--text);
}

button.tile:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.tile-label {
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tile-value {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 560;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.proj-card {
  position: relative;
  min-height: 142px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 20px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  transition: border-color 120ms, box-shadow 120ms, transform 120ms;
}

.proj-card[data-card-action] {
  cursor: pointer;
}

.proj-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.proj-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.proj-card-actions {
  position: absolute;
  right: 20px;
  bottom: 20px;
}

.proj-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.proj-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.proj-card .meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.new-project-form {
  border-style: dashed;
  gap: 12px;
}

.new-project-form .btn[type="submit"] {
  height: 38.25px;
}

.ide {
  flex: 1;
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 0;
  overflow: hidden;
}

.ide.three-pane {
  grid-template-columns: 232px 280px 1fr;
}

.sidebar {
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-subtle);
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.side-project {
  padding: 14px 12px 12px;
}

.side-project strong,
.side-project span {
  display: block;
  margin-top: 4px;
}

.sidebar-section {
  padding: 12px 12px 4px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 12px;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
}

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

.sidebar-item.active {
  background: var(--surface);
  color: var(--text);
  border-left-color: var(--text);
}

.sidebar-item .ico {
  width: 16px;
  color: var(--text-faint);
  text-align: center;
}

.sidebar-item .count {
  margin-left: auto;
  color: var(--text-faint);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 11px;
}

.side-export {
  margin: auto 12px 12px;
  padding: 12px;
}

.side-export p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  word-break: break-all;
}

.list-pane {
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.list-pane-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.list-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  position: relative;
}

.list-row:hover {
  background: var(--surface-hover);
}

.list-row.active {
  background: var(--bg-muted);
}

.list-row.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--text);
}

.list-row span {
  color: var(--text-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--bg);
}

.detail-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.detail-body {
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 24px 40px;
}

.detail-body.wide {
  max-width: none;
}

.overview-card,
.two-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.overview-card .field-block:first-child {
  grid-column: 1 / -1;
}

.fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.fieldset-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid var(--border);
}

.fieldset-row:last-child {
  border-bottom: 0;
}

.fieldset-row.checklist {
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  padding: 12px 14px;
  gap: 12px;
}

.fieldset-row.checklist p {
  margin: 3px 0 0;
  color: var(--text-muted);
}

.check-dot {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent-on);
  font-size: 12px;
}

.check-dot.done {
  background: var(--text);
  border-color: var(--text);
}

.fieldset-label {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  background: var(--bg-subtle);
}

.fieldset-label strong,
.fieldset-label span {
  display: block;
}

.fieldset-label span {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 11.5px;
}

.fieldset-input {
  padding: 8px 10px;
}

.warning {
  color: var(--text-muted);
  background: var(--bg-subtle);
}

.fact-banner {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) 1fr;
  gap: 18px;
  align-items: start;
  border-color: var(--border-strong);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.055), transparent),
    var(--bg-subtle);
}

.fact-banner span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.fact-banner strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.fact-banner p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.overview-hint {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-faint);
}

.kb-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 560;
  transition: color 100ms;
}

.kb-help-btn .ri-icon {
  color: var(--text-faint);
  font-size: 13px;
}

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

.kb-help-btn:hover .ri-icon {
  color: var(--text-muted);
}

.required-mark {
  color: var(--danger);
  font-weight: 600;
}

.kb-tooltip {
  position: fixed;
  width: 320px;
  padding: 10px 14px;
  background: #1a1a22;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.6;
  font-weight: 400;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.seg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.defaults-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.defaults-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.defaults-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.defaults-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.option-pill {
  justify-content: flex-start;
  padding: 0 12px;
}

.zipbox {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
}

.zipbox .file {
  width: 36px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 800;
}

.zipbox p {
  margin: 3px 0 0;
}

.md-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  min-height: 420px;
}

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

.md-split.tall {
  min-height: calc(100vh - 210px);
}

.md-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.md-side + .md-side {
  border-left: 1px solid var(--border);
}

.md-side-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-faint);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.md-textarea {
  flex: 1;
  min-height: 360px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 14px;
  background: var(--surface);
  color: var(--text);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
}

.terminal {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--code-bg);
  padding: 16px 18px;
  overflow: auto;
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
}

.terminal .line {
  display: flex;
  gap: 8px;
}

.terminal .prompt {
  color: var(--text-faint);
  user-select: none;
}

.terminal .you {
  color: var(--text);
}

.terminal .ai {
  color: var(--text-muted);
}

.terminal.tech {
  position: relative;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    var(--code-bg);
  background-size: 24px 24px;
}

.detail-header .tag,
.proj-card .meta .tag {
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 6px;
}

.generate-detail {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.generate-detail > .status-line {
  margin: 24px 24px 0;
}

.generate-detail > .validation-banner {
  margin: 24px 24px 0;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms, transform 200ms;
  z-index: 9999;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 200ms;
}

.modal-overlay.visible {
  opacity: 1;
}

.modal-box {
  width: min(400px, calc(100% - 40px));
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 200ms;
}

.modal-overlay.visible .modal-box {
  transform: scale(1);
}

.modal-message {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dirty-dot {
  color: var(--warn) !important;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.dirty-mark {
  margin-left: 8px;
  color: var(--warn) !important;
  font-size: 13px;
  line-height: 1;
}

.platform-select {
  width: 170px;
  padding: 6px 32px 6px 10px;
  height: 30px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a5a3a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.status-line {
  --status-rgb: 165, 163, 160;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 16px;
  padding: 10px 13px;
  border: 1px solid rgba(var(--status-rgb), 0.3);
  border-left: 2px solid rgb(var(--status-rgb));
  border-radius: 8px;
  background: rgba(var(--status-rgb), 0.08);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
}

.status-line::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--status-rgb));
  box-shadow: 0 0 0 3px rgba(var(--status-rgb), 0.18);
}

.status-line.error { --status-rgb: var(--danger-rgb); }
.status-line.ok { --status-rgb: var(--ok-rgb); }
.status-line.warn { --status-rgb: var(--warn-rgb); }

.validation-banner {
  margin: 24px 24px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.validation-banner.ok {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(74, 222, 128, 0.08);
}

.validation-banner.warn {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.08);
}

.validation-banner.error {
  border-color: rgba(239, 107, 92, 0.34);
  background: rgba(239, 107, 92, 0.08);
}

.validation-title {
  margin-bottom: 8px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.validation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  color: var(--text);
}

.validation-row + .validation-row {
  margin-top: 6px;
}

.validation-mark {
  width: 18px;
  color: var(--danger);
  font-weight: 800;
  text-align: center;
}

.validation-banner.ok .validation-mark {
  color: var(--ok);
}

.generate-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  margin: 24px 24px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.tree-panel {
  min-width: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-subtle);
  overflow: auto;
}

.tree-head,
.preview-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 12px;
}

.tree {
  padding: 8px 4px;
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 12px;
}

.tree-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
}

.tree-row:hover,
.tree-row.active {
  background: var(--bg-muted);
  color: var(--text);
}

.preview-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.md-pre {
  flex: 1;
  margin: 0;
  padding: 20px 24px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface);
  color: var(--text);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
}

.empty {
  padding: 56px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-faint);
  text-align: center;
}

.empty.compact {
  padding: 20px;
}

.empty .ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
}

.bp-page {
  min-height: 100vh;
  overflow: auto;
  background: var(--bg);
  position: relative;
  padding-top: 68px;
}

.bp-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--glow), transparent 70%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, #000 40%, transparent 80%);
}

.bp-scan-beam {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0 44%, rgba(255,255,255,0.055) 49%, transparent 56%);
}

.bp-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 26px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 10, 0.78);
  backdrop-filter: blur(18px);
}

.bp-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.bp-nav a {
  padding: 5px 8px;
  color: var(--text-muted);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 11px;
}

.bp-section {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 52px));
  margin: 0 auto;
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.bp-hero {
  border-bottom: 0;
}

.bp-chapter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bp-chapter-rule {
  height: 1px;
  flex: 1;
  background: var(--border);
}

.bp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.86fr);
  gap: 56px;
  align-items: center;
}

.hero-tag {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  background: rgba(15,15,19,0.74);
  color: var(--text-muted);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 11px;
}

.bp-hero-title {
  margin: 22px 0;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  font-weight: 620;
  max-width: 820px;
}


.bp-hero-lead,
.bp-lead {
  max-width: 68ch;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions {
  margin-top: 28px;
}

.schematic {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(180deg, var(--grid-line) 1px, transparent 1px),
    rgba(12,12,16,0.72);
  background-size: 24px 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.schematic-rule {
  position: absolute;
  background: var(--grid-line-strong);
}

.schematic-rule.h { left: 0; right: 0; top: 50%; height: 1px; }
.schematic-rule.v { top: 0; bottom: 0; left: 50%; width: 1px; }

.schematic-card {
  position: relative;
  width: min(390px, calc(100% - 72px));
  border: 1px solid var(--border-strong);
  background: rgba(7,7,10,0.92);
  overflow: hidden;
}

.schematic-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}

.schematic-card-body {
  padding: 18px;
  color: var(--text-muted);
  font-size: 12px;
}

.schematic-card-body p {
  margin: 0 0 10px;
}

.schematic-card-body em {
  display: inline-block;
  width: 30px;
  color: var(--text-faint);
  font-style: normal;
}

.schematic-scan {
  position: absolute;
  inset: -40% 0 auto;
  height: 90px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.14), transparent);
  animation: scan 4s ease-in-out infinite;
}

@keyframes scan {
  0% { transform: translateY(-40px); opacity: 0; }
  20% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(560px); opacity: 0; }
}

.dim {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 10px;
}

.dim-top { top: 22px; }
.dim-bottom { bottom: 22px; }

.callout {
  position: absolute;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: rgba(16,16,21,0.84);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 10px;
}

.callout span { color: var(--text-faint); }
.callout b { color: var(--text); font-weight: 500; }
.callout-left { left: 20px; }
.callout-right { right: 20px; }
.callout.top { top: 88px; }
.callout.bottom { bottom: 88px; }

.bp-marquee {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 14px 26px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 10, 0.78);
  color: var(--text-faint);
  font-size: 11px;
  isolation: isolate;
}

.bp-marquee::before,
.bp-marquee::after {
  content: "";
  position: absolute;
  inset-block: 0;
  z-index: 2;
  width: 260px;
  pointer-events: none;
}

.bp-marquee::before {
  left: 0;
  background: linear-gradient(90deg, rgba(7, 7, 10, 1) 0%, rgba(7, 7, 10, 0) 100%);
}

.bp-marquee::after {
  right: 0;
  background: linear-gradient(270deg, rgba(7, 7, 10, 1) 0%, rgba(7, 7, 10, 0) 100%);
}

.bp-marquee > span {
  position: relative;
  z-index: 3;
  white-space: nowrap;
}

.bp-marquee div {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  width: max-content;
  white-space: nowrap;
  animation: marquee 16.7s linear infinite;
}

.bp-marquee div span {
  flex: 0 0 auto;
  padding-right: 34px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-20%); }
}

.bp-anatomy-grid,
.bp-runtime-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(380px, 1fr);
  gap: 42px;
}

.bp-value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
}

.bp-value-card {
  min-height: 250px;
  padding: 22px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), transparent 42%),
    var(--surface);
}

.bp-value-card:last-child {
  border-right: 0;
}

.bp-value-card > span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 11px;
}

.bp-value-card h3 {
  margin: 54px 0 10px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.bp-value-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.bp-h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.bp-skill-viz {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 0;
}

.bp-tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: var(--text-muted);
}

.bp-tree-row:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.bp-tree-badge {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-faint);
  font-size: 10px;
}

.bp-install-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
}

.bp-step {
  min-height: 210px;
  padding: 24px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.bp-step:last-child {
  border-right: 0;
}

.bp-step h3 {
  margin: 44px 0 8px;
  font-size: 20px;
}

.bp-step p {
  margin: 0;
  color: var(--text-muted);
}

.bp-cta {
  margin-top: 28px;
  padding: 34px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

.bp-cta h2 {
  margin: 0 0 18px;
  font-size: 34px;
  letter-spacing: -0.03em;
}

@media (max-width: 980px) {
  .bp-topbar {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 16px;
    gap: 12px;
  }
  .bp-topbar > .btn { display: none; }
  .bp-nav {
    display: flex;
    gap: 0;
    margin-left: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bp-nav-btn { padding: 6px 10px; white-space: nowrap; font-size: 12px; }
  .bp-hero-grid,
  .bp-value-grid,
  .bp-anatomy-grid,
  .bp-runtime-grid,
  .bp-install-grid,
  .generate-grid,
  .overview-card,
  .two-fields,
  .defaults-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.five { grid-template-columns: repeat(3, 1fr); }
  .dashboard { padding: 26px 18px 60px; }
  .dash-head { align-items: stretch; flex-direction: column; }
  .detail-header { position: relative; flex-wrap: wrap; }
  .bp-section { width: min(100% - 30px, 1180px); padding: 52px 0; }
  .bp-marquee { width: min(100% - 30px, 1180px); }
  .md-split { grid-template-columns: 1fr; }

  /* ── 编辑器：侧栏变横向导航条 ── */
  .ide,
  .ide.three-pane {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
  }
  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    flex-direction: row;
    align-items: center;
    gap: 0;
    -webkit-overflow-scrolling: touch;
  }
  .side-project,
  .sidebar .hr,
  .sidebar-section,
  .side-export {
    display: none;
  }
  .sidebar-item {
    width: auto;
    flex-shrink: 0;
    padding: 10px 14px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-size: 13px;
  }
  .sidebar-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--text);
  }
  .sidebar-item .count {
    margin-left: 4px;
  }
  .list-pane {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-height: 220px;
  }
  .detail-body { padding: 16px 16px 32px; }
  .detail-header { padding: 12px 16px; gap: 8px; }
  .validation-banner { margin: 10px 16px 0; }
  .generate-grid { margin: 10px 16px 16px; }
}

@media (max-width: 640px) {
  /* ── 顶栏 ── */
  .topbar {
    height: 52px;
    padding: 0 14px;
    gap: 10px;
  }
  .topbar .tag { display: none; }
  .topbar .tag.warn { display: inline-flex; }
  .crumbs { font-size: 12px; }
  .crumbs .current {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: bottom;
  }
  .bp-topbar {
    height: 52px;
    padding: 0 14px;
    gap: 10px;
  }
  .bp-topbar .btn { padding: 5px 10px; font-size: 12px; }

  /* ── Landing ── */
  .bp-hero-title { font-size: 36px; }
  .bp-hero-lead, .bp-lead { font-size: 15px; }
  .bp-h2 { font-size: clamp(28px, 8vw, 58px); }
  .schematic { min-height: 380px; }
  .schematic-card { width: min(320px, calc(100% - 40px)); }
  .callout { display: none; }
  .bp-value-card { min-height: 180px; padding: 18px; }
  .bp-value-card h3 { margin-top: 28px; font-size: 18px; }
  .bp-step { min-height: 160px; padding: 18px; }
  .bp-step h3 { margin-top: 28px; font-size: 17px; }
  .bp-cta { padding: 24px 16px; }
  .bp-cta h2 { font-size: 24px; }
  .bp-section { padding: 36px 0; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  /* ── Dashboard ── */
  .dashboard { padding: 20px 14px 48px; }
  .t-h1 { font-size: 24px; }
  .dash-actions { justify-content: flex-start; }
  .dash-actions .btn { font-size: 12px; padding: 5px 10px; }
  .stat-grid,
  .stat-grid.five { grid-template-columns: repeat(2, 1fr); }
  .proj-grid { grid-template-columns: 1fr; }
  .proj-card { min-height: 110px; padding: 16px; }

  /* ── Editor ── */
  .sidebar-item { padding: 8px 12px; font-size: 12px; }
  .sidebar-item .ico { width: 14px; font-size: 13px; }
  .list-pane { max-height: 180px; }
  .list-pane-header { padding: 10px 12px 8px; }
  .list-row { padding: 8px 12px; }
  .detail-header { padding: 10px 14px; gap: 6px; }
  .detail-header .t-h2 { font-size: 17px; }
  .detail-body { padding: 14px 14px 28px; }
  .md-split.tall { min-height: 320px; }

  /* ── Fieldsets ── */
  .fieldset-row,
  .fact-banner,
  .fieldset-row.checklist {
    grid-template-columns: 1fr;
  }
  .fieldset-label { border-right: 0; border-bottom: 1px solid var(--border); }
  .fieldset-row.checklist { padding: 10px 12px; gap: 8px; }

  /* ── Content pages ── */
  .content-body { width: min(100% - 24px, 860px); padding: 28px 0 60px; }
  .md-article h1 { font-size: 28px; }
  .md-article h2 { font-size: 20px; margin-top: 36px; }
  .platform-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .platform-tip-item { grid-template-columns: 1fr; }
  .ai-metric-grid { grid-template-columns: 1fr; }

  /* ── Generate ── */
  .generate-grid { grid-template-columns: 1fr; margin: 10px 14px 14px; }
  .tree-panel { max-height: 200px; border-right: 0; border-bottom: 1px solid var(--border); }
  .platform-select { width: 100%; }
  .detail-header .platform-select { width: auto; min-width: 120px; }
}

/* ── 导航按钮 ─────────────────────────────────────────────────────────────── */
.bp-nav-btn {
  padding: 5px 8px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color 100ms;
}

.bp-nav-btn:hover,
.bp-nav-btn.active {
  color: var(--text);
}

/* ── 内容页通用布局 ───────────────────────────────────────────────────────── */
.content-page {
  min-height: 100vh;
}

.content-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

/* ── GEO 介绍：文章正文 ───────────────────────────────────────────────────── */
.content-body {
  width: min(860px, calc(100% - 52px));
  margin: 0 auto;
  padding: 56px 0 100px;
}

.md-article {
  color: var(--text);
  line-height: 1.85;
  font-size: 15px;
}

.md-article h1 {
  margin: 0 0 32px;
  font-size: 38px;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.md-article h2 {
  margin: 56px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 24px;
  letter-spacing: -0.02em;
}

.md-article h3 {
  margin: 32px 0 12px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.md-article h4 {
  margin: 24px 0 8px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.md-article p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.md-article strong {
  color: var(--text);
  font-weight: 600;
}

.md-article em {
  color: var(--text-muted);
  font-style: italic;
}

.md-article code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 0.88em;
  color: var(--text);
}

.md-article ul,
.md-article ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text-muted);
}

.md-article li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.md-article blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--border-strong);
  background: var(--surface);
  border-radius: 0 6px 6px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.md-article hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.md-table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.md-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

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

.md-table tr:last-child td {
  border-bottom: 0;
}

.md-table tr:hover td {
  background: var(--surface-hover);
  color: var(--text);
}

/* ── 占位页 ───────────────────────────────────────────────────────────────── */
.content-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 68px);
  padding: 60px 26px;
}

.placeholder-inner {
  max-width: 560px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.placeholder-title {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.placeholder-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
}

@media (max-width: 980px) {
  .content-body { width: min(100% - 30px, 860px); padding: 40px 0 80px; }
}

/* ── 内容页通用头部 ───────────────────────────────────────────────────────── */
.content-section-head {
  margin-bottom: 40px;
}

.content-page-title {
  margin: 10px 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.content-page-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
}

/* ── 发文平台网格 ─────────────────────────────────────────────────────────── */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  margin-bottom: 32px;
}

.platform-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 120ms, background 120ms, transform 120ms, box-shadow 120ms;
  position: relative;
  cursor: pointer;
}

.platform-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.platform-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.platform-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.platform-icon-fallback {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

.platform-name {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.platform-arrow {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--text-faint);
  font-size: 12px;
  opacity: 0;
  transition: opacity 100ms;
}

.platform-card:hover .platform-arrow {
  opacity: 1;
}

/* ── 发布建议 ─────────────────────────────────────────────────────────────── */
.platform-tip {
  margin-bottom: 16px;
}

.platform-tip-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.platform-tip-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  align-items: start;
}

.platform-tip-item strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
}

.platform-tip-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.platform-channel-block {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.platform-channel-block p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.platform-channel-block strong {
  color: var(--text);
}

.platform-channel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-channel-tag {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .platform-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .platform-tip-grid { grid-template-columns: 1fr; }
}

/* ── AI 收录页 ───────────────────────────────────────────────────────────── */
.platform-card-highlight {
  border-color: var(--border-strong);
  background: linear-gradient(135deg, rgba(255,255,255,0.06), var(--surface));
  color: var(--text);
}

.platform-card-highlight:hover {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--glow), var(--shadow-md);
}

.ai-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}

.ai-metric-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
}

.ai-metric-label {
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.ai-metric-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .ai-metric-grid { grid-template-columns: 1fr; }
}

/* ── 指令广场 ─────────────────────────────────────────────────────────────── */
.plaza-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.plaza-tab {
  padding: 8px 16px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 100ms, border-color 100ms;
}

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

.plaza-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.plaza-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 60px;
}

.plaza-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 120ms;
}

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

.plaza-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.plaza-card-head strong {
  font-size: 14px;
}

.plaza-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.plaza-card-preview {
  padding: 0 16px 14px;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.plaza-card-body {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.plaza-pre {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-muted);
}
