:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef6f4;
  --text: #17202a;
  --muted: #667085;
  --line: #d8e1ea;
  --brand: #0f6fff;
  --brand-2: #11b7a6;
  --accent: #c8e943;
  --warning: #f2a12b;
  --shadow: 0 14px 40px rgba(20, 41, 69, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
}

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

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

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(216, 225, 234, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
}

.nav a:hover {
  color: var(--text);
  background: #eef3f8;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: end;
  padding: 56px 0 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #0c8278;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.intro h1,
.submit-section h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
}

.intro-text,
.submit-section p,
.results-head p,
.empty-state p {
  color: var(--muted);
  line-height: 1.75;
}

.intro-text {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 18px;
}

.intro-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.intro-panel div {
  min-height: 120px;
  padding: 20px;
  background: var(--surface);
}

.intro-panel strong {
  display: block;
  font-size: 34px;
}

.intro-panel span {
  color: var(--muted);
  font-size: 13px;
}

.directory {
  padding: 24px 0 64px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-box input,
.toolbar select,
.submit-form input,
.submit-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.search-box input,
.toolbar select {
  height: 46px;
  padding: 0 14px;
}

.search-box input:focus,
.toolbar select:focus,
.submit-form input:focus,
.submit-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 111, 255, 0.12);
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 22px;
}

.chip,
.text-button,
.collection,
.primary-button,
.copy-button,
.dialog-close {
  border: 0;
  cursor: pointer;
}

.chip {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.chip.is-active {
  color: #062b26;
  border-color: rgba(17, 183, 166, 0.55);
  background: #daf7f2;
}

.directory-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.side-panel h2,
.results-head h2,
.empty-state h3 {
  margin: 0;
  font-size: 20px;
}

.collection {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  text-align: left;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.collection span,
.collection small {
  display: block;
}

.collection small {
  margin-top: 4px;
  color: var(--muted);
}

.collection:hover,
.collection.is-active {
  background: var(--surface-2);
}

.results {
  min-width: 0;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

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

.text-button {
  color: var(--brand);
  background: transparent;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.skill-card {
  min-height: 244px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(20, 41, 69, 0.06);
}

.skill-card:hover {
  border-color: rgba(15, 111, 255, 0.32);
  transform: translateY(-1px);
}

.skill-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.skill-title {
  margin: 0;
  font-size: 19px;
}

.skill-source {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.badge {
  flex: 0 0 auto;
  height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #edf4ff;
  color: #0f4fb8;
  font-size: 12px;
  font-weight: 800;
}

.skill-summary {
  margin: 0;
  color: #405060;
  line-height: 1.65;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  padding: 5px 8px;
  border-radius: 8px;
  color: #455468;
  background: #f0f3f7;
  font-size: 12px;
}

.card-actions {
  display: flex;
  gap: 8px;
  padding-top: 2px;
}

.primary-button,
.copy-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--brand);
}

.primary-button:hover {
  background: #095bd3;
}

.copy-button {
  color: #063632;
  background: var(--accent);
}

.empty-state {
  padding: 42px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.65);
}

.submit-section {
  padding: 64px 0;
  background: #102033;
  color: #fff;
}

.submit-section .eyebrow {
  color: var(--accent);
}

.submit-section p {
  color: #b9c8d8;
}

.submit-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 44px;
  align-items: start;
}

.submit-form {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.submit-form label {
  display: block;
  margin-bottom: 12px;
}

.submit-form span {
  display: block;
  margin-bottom: 7px;
  color: #dce6f1;
  font-size: 14px;
}

.submit-form input,
.submit-form textarea {
  padding: 12px;
}

.submit-form textarea {
  resize: vertical;
}

.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.beian {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
}

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

.skill-dialog {
  width: min(720px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  box-shadow: var(--shadow);
}

.skill-dialog::backdrop {
  background: rgba(9, 20, 34, 0.55);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--muted);
  background: #eef3f8;
}

.dialog-body {
  padding: 28px;
}

.dialog-body h2 {
  margin: 0;
  font-size: 28px;
}

.dialog-meta {
  margin: 8px 0 18px;
  color: var(--muted);
}

.install-box {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #101828;
  color: #f8fafc;
  overflow-x: auto;
}

.install-box code {
  flex: 1;
  white-space: nowrap;
}

.dialog-list {
  margin: 20px 0 0;
  padding-left: 18px;
  color: #405060;
  line-height: 1.8;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #101828;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

@media (max-width: 900px) {
  .intro,
  .directory-layout,
  .submit-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

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

@media (max-width: 680px) {
  .header-inner,
  .footer-inner,
  .results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    padding-left: 0;
  }

  .intro {
    padding-top: 34px;
  }

  .intro h1,
  .submit-section h2 {
    font-size: 38px;
  }

  .intro-panel,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: 0;
  }

  .card-actions {
    flex-direction: column;
  }

  .beian {
    justify-content: flex-start;
  }
}
