:root {
  color-scheme: light;
  --bg: #f4f5f8;
  --bg2: #edeef6;
  --fg: #16181f;
  --fg2: rgb(22 24 31 / 62%);
  --fg3: rgb(22 24 31 / 42%);
  --fg-strong: rgb(22 24 31 / 82%);
  --accent: #5a4fe6;
  --accent-deep: #4438c4;
  --accent-bg: rgb(90 79 230 / 8%);
  --surface: rgb(255 255 255 / 76%);
  --card: rgb(255 255 255 / 86%);
  --panel: rgb(255 255 255 / 54%);
  --border: rgb(22 24 31 / 10%);
  --border-soft: rgb(22 24 31 / 6%);
  --border-strong: rgb(22 24 31 / 17%);
  --nav-bg: rgb(244 245 248 / 86%);
  --ok: #0e9c6b;
  --ok-bg: rgb(14 156 107 / 10%);
  --info: #2c74d6;
  --info-bg: rgb(44 116 214 / 10%);
  --warn: #9b661a;
  --warn-bg: rgb(183 122 34 / 11%);
  --error: #c93d47;
  --error-bg: rgb(216 71 79 / 10%);
  --hero-glow: rgb(90 79 230 / 17%);
  --shadow-1: 0 0 0 1px rgb(24 21 14 / 4%), 0 1px 2px rgb(24 21 14 / 5%), 0 8px 24px -12px rgb(24 21 14 / 18%);
  --shadow-2: 0 0 0 1px rgb(24 21 14 / 4%), 0 14px 36px -18px rgb(24 21 14 / 22%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;
  --max: 1280px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07070f;
  --bg2: #100d24;
  --fg: #eceeff;
  --fg2: rgb(236 238 255 / 60%);
  --fg3: rgb(236 238 255 / 38%);
  --fg-strong: rgb(236 238 255 / 82%);
  --accent: #7b80ff;
  --accent-deep: #989cff;
  --accent-bg: rgb(123 128 255 / 13%);
  --surface: rgb(255 255 255 / 5%);
  --card: rgb(255 255 255 / 6%);
  --panel: rgb(255 255 255 / 3%);
  --border: rgb(255 255 255 / 9%);
  --border-soft: rgb(255 255 255 / 5%);
  --border-strong: rgb(255 255 255 / 16%);
  --nav-bg: rgb(9 10 20 / 78%);
  --ok: #4ecda0;
  --ok-bg: rgb(78 205 160 / 13%);
  --info: #6aa6f5;
  --info-bg: rgb(106 166 245 / 13%);
  --warn: #e8b45a;
  --warn-bg: rgb(232 180 90 / 13%);
  --error: #ec6e77;
  --error-bg: rgb(236 110 119 / 13%);
  --hero-glow: rgb(123 128 255 / 24%);
  --shadow-1: inset 0 1px 0 rgb(255 255 255 / 7%), 0 8px 24px -12px rgb(0 0 0 / 65%);
  --shadow-2: inset 0 1px 0 rgb(255 255 255 / 9%), 0 18px 42px -18px rgb(0 0 0 / 72%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse 75% 500px at 76% -120px, var(--hero-glow), transparent 72%),
    var(--bg);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; }
img { display: block; }
::selection { background: var(--accent); color: #f8f8ff; }
::placeholder { color: var(--fg3); }

.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;
}
.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
}
.nav-shell, .section-shell, .footer-shell, .hero-shell {
  width: min(calc(100% - 80px), var(--max));
  margin-inline: auto;
}
.nav-shell {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  white-space: nowrap;
}
.brand-name { font-weight: 700; letter-spacing: -.03em; }
.brand-divider { width: 1px; height: 18px; background: var(--border-strong); }
.brand-product { color: var(--fg2); font-size: .82rem; font-weight: 600; }
nav { display: flex; align-items: center; gap: 4px; }
nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--fg2);
  font-size: .86rem;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease;
}
nav a:hover { background: var(--surface); color: var(--fg); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  min-width: 58px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--fg2);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: .55rem 1.15rem;
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms var(--ease), border-color 150ms ease, background 150ms ease;
}
.button:hover { transform: translateY(-1px); border-color: var(--accent); }
.button-primary { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 8px 20px -12px var(--accent); }
.button-primary:hover { background: var(--accent-deep); }
.nav-cta { min-height: 38px; padding-inline: 16px; font-size: .82rem; }

.hero {
  position: relative;
  overflow: clip;
  padding: 86px 0 72px;
  border-bottom: 1px solid var(--border-soft);
}
.hero-glow {
  position: absolute;
  width: 760px;
  height: 540px;
  right: -180px;
  top: -230px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow), transparent 68%);
  pointer-events: none;
}
.hero-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr);
  align-items: end;
  gap: 72px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
}
h1, h2, h3, p { text-wrap: pretty; }
h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.75rem, 5.4vw, 5.25rem);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 650;
}
.hero-copy {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--fg2);
  font-size: 1.08rem;
}
.hero-search {
  max-width: 720px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 32px;
  padding: 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--card);
  box-shadow: var(--shadow-2);
}
.hero-search input {
  min-width: 0;
  min-height: 48px;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
  color: var(--fg);
}
.hero-search .button { min-height: 48px; }
.hero-aside {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.aside-title { margin: 0 0 18px; color: var(--fg-strong); font-size: .9rem; font-weight: 650; }
.hero-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.hero-metrics div { min-width: 0; }
.hero-metrics dt {
  font-family: "Space Grotesk", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.85rem;
  font-weight: 650;
  line-height: 1.1;
}
.hero-metrics dd { margin: 7px 0 0; color: var(--fg2); font-size: .72rem; line-height: 1.45; }
.hero-policy { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--fg2); font-size: .8rem; }

.market-section, .trust-section, .publish-section { padding: 82px 0; }
.market-section { background: var(--panel); }
.section-heading { max-width: 720px; margin-bottom: 34px; }
.section-heading h2, .trust-intro h2, .publish-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  line-height: 1.14;
  letter-spacing: -.04em;
  font-weight: 650;
}
.section-heading > p:last-child, .trust-intro > p, .publish-copy > p {
  margin: 15px 0 0;
  color: var(--fg2);
}
.market-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.category-panel {
  position: sticky;
  top: 88px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 12px; }
.panel-heading h3 { margin: 0; font-size: .95rem; }
.panel-heading span { color: var(--fg3); font-size: .75rem; }
.category-list { padding: 0 8px 10px; }
.category-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg2);
  text-align: left;
  cursor: pointer;
}
.category-button:hover { color: var(--fg); background: var(--surface); }
.category-button[aria-pressed="true"] { color: var(--accent); background: var(--accent-bg); font-weight: 650; }
.category-button span:last-child { color: var(--fg3); font-size: .72rem; }
.category-note { padding: 18px; border-top: 1px solid var(--border); background: var(--accent-bg); }
.category-note strong { font-size: .86rem; }
.category-note p { margin: 7px 0 10px; color: var(--fg2); font-size: .76rem; }
.category-note a, .text-link { color: var(--accent); font-size: .78rem; font-weight: 650; text-decoration: none; }
.catalog-main { min-width: 0; }
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.catalog-search { flex: 1; }
.catalog-search input, select {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--fg);
}
.catalog-search input { width: 100%; padding: 0 15px; }
select { padding: 0 34px 0 12px; cursor: pointer; }
.toolbar-group { display: flex; gap: 8px; }
.result-summary {
  min-height: 34px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--fg2);
  font-size: .8rem;
}
.result-summary strong { color: var(--fg); font-size: .86rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.skill-card {
  min-height: 286px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-1);
  transition: transform 180ms var(--ease), border-color 180ms ease;
}
.skill-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.card-topline, .card-evidence, .card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.skill-category, .trust-badge, .distribution-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  font-size: .7rem;
  font-weight: 650;
}
.skill-category { background: var(--accent-bg); color: var(--accent); }
.trust-badge { background: var(--ok-bg); color: var(--ok); }
.distribution-badge { background: var(--info-bg); color: var(--info); }
.skill-card h3 { margin: 22px 0 4px; font-size: 1.32rem; letter-spacing: -.025em; }
.skill-original { min-height: 22px; margin: 0; color: var(--fg3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; }
.skill-description {
  display: -webkit-box;
  min-height: 75px;
  margin: 15px 0 20px;
  overflow: hidden;
  color: var(--fg2);
  font-size: .88rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.card-evidence { margin-top: auto; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.evidence-item span { display: block; color: var(--fg3); font-size: .66rem; }
.evidence-item strong { display: block; margin-top: 2px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.card-footer { padding-top: 16px; }
.card-version { color: var(--fg3); font-size: .7rem; }
.card-link { color: var(--accent); font-size: .78rem; font-weight: 650; text-decoration: none; }
.loading-state, .empty-state, .error-state, .no-results-state {
  grid-column: 1 / -1;
  min-height: 350px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
}
.loading-state { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 42px; }
.loading-line { width: 62%; height: 12px; border-radius: var(--radius-pill); background: var(--border); }
.loading-line.short { width: 38%; }
.empty-state {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 42px;
  padding: 42px;
  overflow: hidden;
  position: relative;
}
.empty-state::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -130px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow), transparent 68%);
  pointer-events: none;
}
.empty-copy { position: relative; z-index: 1; }
.empty-copy h3 { max-width: 620px; margin: 0; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.2; letter-spacing: -.035em; }
.empty-copy > p { max-width: 630px; margin: 14px 0 0; color: var(--fg2); }
.empty-actions { display: flex; gap: 8px; margin-top: 24px; }
.empty-actions .button { font-size: .8rem; }
.pipeline-summary {
  position: relative;
  z-index: 1;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.pipeline-summary strong { display: block; font-size: 2.5rem; font-family: "Space Grotesk", ui-monospace, monospace; line-height: 1; }
.pipeline-summary span { display: block; margin-top: 8px; color: var(--fg2); font-size: .78rem; }
.pipeline-summary p { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--warn); font-size: .72rem; }
.error-state, .no-results-state { display: grid; place-content: center; padding: 42px; text-align: center; color: var(--fg2); }
.error-state strong { color: var(--error); }

.trust-section { border-top: 1px solid var(--border-soft); }
.trust-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 76px; align-items: start; }
.trust-intro { position: sticky; top: 100px; }
.text-link { display: inline-flex; margin-top: 22px; }
.gate-list { counter-reset: gate; list-style: none; margin: 0; padding: 0; }
.gate-list li {
  counter-increment: gate;
  display: grid;
  grid-template-columns: 44px 160px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.gate-list li::before {
  content: counter(gate, decimal-leading-zero);
  color: var(--accent);
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: .72rem;
}
.gate-list span { font-weight: 650; }
.gate-list p { margin: 0; color: var(--fg2); font-size: .86rem; }

.publish-section { background: var(--bg2); border-top: 1px solid var(--border); }
.publish-layout { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 72px; align-items: center; }
.publish-copy .button { margin-top: 26px; }
.publish-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.publish-flow article { min-height: 142px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }
.publish-flow strong { font-size: .94rem; }
.publish-flow p { margin: 8px 0 0; color: var(--fg2); font-size: .8rem; }

footer { border-top: 1px solid var(--border); background: var(--bg2); }
.footer-shell { min-height: 140px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
.footer-brand { font-size: .86rem; font-weight: 700; }
.footer-shell p { margin: 0; color: var(--fg2); font-size: .76rem; text-align: center; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--fg2); font-size: .76rem; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 980px) {
  .nav-shell, .section-shell, .footer-shell, .hero-shell { width: min(calc(100% - 40px), var(--max)); }
  nav { display: none; }
  .nav-shell { grid-template-columns: 1fr auto; }
  .hero-shell, .trust-layout, .publish-layout { grid-template-columns: 1fr; gap: 40px; }
  .hero-aside { max-width: 560px; }
  .trust-intro { position: static; }
  .market-layout { grid-template-columns: 1fr; }
  .category-panel { position: static; }
  .category-list { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 12px; }
  .category-button { width: auto; min-width: max-content; gap: 8px; }
  .category-note { display: none; }
}

@media (max-width: 680px) {
  .brand-product, .brand-divider, .nav-cta { display: none; }
  .hero { padding: 64px 0 52px; }
  h1 { font-size: clamp(2.5rem, 12vw, 3.75rem); }
  .hero-search { grid-template-columns: 1fr; border-radius: var(--radius-lg); }
  .hero-search input { min-height: 46px; }
  .hero-search .button { width: 100%; }
  .hero-metrics { gap: 8px; }
  .hero-aside { padding: 20px; }
  .market-section, .trust-section, .publish-section { padding: 58px 0; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-group { display: grid; grid-template-columns: 1fr 1fr; }
  select { width: 100%; }
  .result-summary { align-items: flex-start; flex-direction: column; gap: 2px; margin-bottom: 12px; }
  .catalog-grid, .publish-flow { grid-template-columns: 1fr; }
  .empty-state { grid-template-columns: 1fr; padding: 28px; }
  .pipeline-summary { max-width: 260px; }
  .empty-actions { align-items: stretch; flex-direction: column; }
  .gate-list li { grid-template-columns: 34px 1fr; gap: 10px; }
  .gate-list p { grid-column: 2; }
  .footer-shell { grid-template-columns: 1fr; align-content: center; justify-items: start; padding: 30px 0; gap: 12px; }
  .footer-shell p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header, .hero-aside { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
