:root {
  --font-sans: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 22px;
  --text-xl: clamp(32px, 5vw, 56px);
  --text-signature: clamp(56px, 7vw, 92px);
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f3f3f1;
  --surface-3: #e9e9e6;
  --text: #171715;
  --text-2: #62625d;
  --text-3: #8b8b84;
  --border: #deded9;
  --border-strong: #babbb4;
  --accent: #6545df;
  --accent-text: #5433c7;
  --accent-ink: #ffffff;
  --success: #177a58;
  --success-bg: #e7f6ef;
  --warning: #8f5d05;
  --warning-bg: #fff4d6;
  --scrim: rgb(18 18 16 / 0.58);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-floating: 0 2px 4px rgb(24 24 20 / 0.06), 0 24px 64px rgb(24 24 20 / 0.16);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 140ms;
  --t-med: 240ms;
  --container: 1440px;
}

html[data-theme="dark"] {
  --bg: #0e0f11;
  --surface: #141518;
  --surface-2: #1c1d21;
  --surface-3: #25262b;
  --text: #e9e8e5;
  --text-2: #aaa9a4;
  --text-3: #787975;
  --border: #303136;
  --border-strong: #494a50;
  --accent: #a58cff;
  --accent-text: #c0afff;
  --accent-ink: #100b24;
  --success: #66cba4;
  --success-bg: #15382d;
  --warning: #efc263;
  --warning-bg: #3b2b10;
  --scrim: rgb(0 0 0 / 0.72);
  --shadow-floating: 0 0 0 1px rgb(255 255 255 / 0.08), 0 24px 72px rgb(0 0 0 / 0.48);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color-scheme: light;
  scroll-behavior: smooth;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

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

[hidden] {
  display: none !important;
}

.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;
  z-index: 1000;
  top: var(--s3);
  left: var(--s3);
  transform: translateY(-160%);
  padding: var(--s2) var(--s4);
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 64px;
  padding: 0 clamp(16px, 3vw, 40px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: var(--s3);
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
}

.brand-name {
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.server-state {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s3);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-3);
}

.server-state[data-state="online"] .status-dot {
  background: var(--success);
}

.server-state[data-state="error"] .status-dot {
  background: var(--accent);
}

.icon-button,
.locale-button {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

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

.icon-button .icon {
  width: 18px;
  height: 18px;
}

.locale-button {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 650;
}

html[data-theme="light"] .theme-icon-dark,
html[data-theme="dark"] .theme-icon-light {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--s8);
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: var(--s8) clamp(20px, 4vw, 64px) var(--s7);
  border-bottom: 1px solid var(--border);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.09em;
}

.eyebrow-line {
  width: 32px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: var(--text-xl);
  line-height: 1;
  font-weight: 760;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-copy > p {
  max-width: 62ch;
  margin: var(--s4) 0 0;
  color: var(--text-2);
  font-size: var(--text-base);
}

.snapshot-figure {
  display: grid;
  min-width: 196px;
  justify-items: end;
  align-content: end;
  border-left: 1px solid var(--border);
  padding-left: var(--s6);
  font-variant-numeric: tabular-nums;
}

.snapshot-number {
  font-size: var(--text-signature);
  line-height: 0.82;
  font-weight: 760;
  letter-spacing: -0.075em;
}

.snapshot-caption,
.snapshot-time {
  margin-top: var(--s3);
  color: var(--text-2);
  font-size: var(--text-xs);
}

.snapshot-time {
  margin-top: 2px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.market-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: var(--s7);
  width: min(100%, var(--container));
  min-height: 640px;
  margin: 0 auto;
  padding: var(--s6) clamp(20px, 4vw, 64px) var(--s9);
}

.sticky-categories {
  position: sticky;
  top: 96px;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s3);
  font-size: var(--text-xs);
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-heading .icon {
  width: 14px;
  height: 14px;
}

.category-list {
  display: grid;
  gap: 2px;
}

.category-button {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  width: 100%;
  padding: var(--s2) var(--s3);
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: transparent;
  color: var(--text-2);
  font-size: var(--text-sm);
  text-align: left;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.category-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.category-button[aria-current="true"] {
  border-left-color: var(--accent);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 650;
}

.category-count {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.mirror-note {
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--border);
}

.mirror-note-label {
  display: block;
  margin-bottom: var(--s2);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mirror-note strong {
  display: block;
  font-size: var(--text-sm);
}

.mirror-note p {
  margin: var(--s2) 0 0;
  color: var(--text-3);
  font-size: var(--text-xs);
  line-height: 1.55;
}

.catalog {
  min-width: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 168px;
  gap: var(--s3);
}

.search-field,
.select-field {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.search-field > .icon {
  position: absolute;
  left: var(--s3);
  width: 16px;
  height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

.search-field input,
.select-field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-sm);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.search-field input {
  padding: 0 52px 0 40px;
}

.search-field input::placeholder {
  color: var(--text-3);
}

.search-field input:hover,
.select-field select:hover {
  border-color: var(--border-strong);
}

.search-field input:focus,
.select-field select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.select-field select {
  appearance: none;
  padding: 0 36px 0 var(--s3);
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.search-shortcut {
  position: absolute;
  right: var(--s3);
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
}

.category-select-wrap {
  display: none;
}

.catalog-meta {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  color: var(--text-2);
  font-size: var(--text-sm);
}

.catalog-meta p {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.text-button {
  min-height: 40px;
  padding: 0 var(--s2);
  border: 0;
  background: transparent;
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: 650;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s3);
}

.skill-card {
  position: relative;
  display: flex;
  min-height: 226px;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.skill-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--surface) 96%, var(--accent) 4%);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s5);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
}

.skill-glyph {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
}

.skill-glyph .icon {
  width: 17px;
  height: 17px;
}

.card-title-block {
  min-width: 0;
  flex: 1;
}

.card-title-line {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.card-title-line h3 {
  overflow: hidden;
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-badge {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.card-byline {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--text-3);
  font-size: 11px;
}

.card-byline span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-version {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
}

.card-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text-2);
  font-size: var(--text-xs);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.tag {
  max-width: 136px;
  overflow: hidden;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-domain {
  color: var(--text-2);
}

.card-footer {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: 0 var(--s5);
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.card-downloads,
.card-size {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-footer .icon {
  width: 13px;
  height: 13px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: var(--s6);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0 var(--s5);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 650;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.primary-button {
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
}

.primary-button:hover {
  background: color-mix(in srgb, var(--text) 88%, var(--accent) 12%);
}

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

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

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.button-meta {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s3);
}

.loading-grid span {
  display: block;
  min-height: 226px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 48%, var(--surface) 100%);
  background-size: 240% 100%;
  animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer {
  to { background-position: -240% 0; }
}

.error-state,
.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  padding: var(--s7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.error-state > .icon {
  width: 28px;
  height: 28px;
  margin-bottom: var(--s4);
  color: var(--accent-text);
}

.error-state h2,
.empty-state h2 {
  margin: 0;
  font-size: var(--text-lg);
  letter-spacing: -0.025em;
}

.error-state p,
.empty-state p {
  max-width: 52ch;
  margin: var(--s2) 0 var(--s5);
  color: var(--text-2);
  font-size: var(--text-sm);
}

.empty-index {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 750;
  line-height: 1;
}

.site-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s6);
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: var(--s7) clamp(20px, 4vw, 64px) var(--s8);
  border-top: 1px solid var(--border);
}

.footer-mark {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 780;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.site-footer p {
  margin: var(--s4) 0 0;
  color: var(--text-3);
  font-size: var(--text-xs);
}

.site-footer a {
  min-height: 44px;
  color: var(--text-2);
  font-size: var(--text-sm);
  text-underline-offset: 4px;
}

.drawer-root {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--scrim);
  cursor: default;
  animation: fade-in var(--t-med) var(--ease) both;
}

.detail-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(760px, 100vw);
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-floating);
  animation: slide-in var(--t-med) var(--ease-enter) both;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes slide-in {
  from { transform: translateX(36px); opacity: 0; }
}

.drawer-content {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-header {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: var(--s5) var(--s6);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 52px var(--s5) 0;
  color: var(--text-3);
  font-size: 10px;
}

.breadcrumbs .icon {
  width: 11px;
  height: 11px;
}

.breadcrumbs button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: inherit;
}

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

.drawer-close {
  position: absolute;
  top: var(--s4);
  right: var(--s4);
}

.detail-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s5);
}

.detail-heading-main {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: var(--s4);
}

.detail-glyph {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.detail-glyph .icon {
  width: 25px;
  height: 25px;
}

.detail-title-copy {
  min-width: 0;
}

.detail-title-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 760;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.detail-lede {
  max-width: 62ch;
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px var(--s3);
  margin-top: var(--s3);
  color: var(--text-3);
  font-size: 11px;
}

.detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.detail-meta-item .icon {
  width: 12px;
  height: 12px;
}

.detail-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.detail-actions a,
.detail-actions button {
  min-width: 40px;
  min-height: 40px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s5);
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}

.detail-badge.curated {
  background: var(--warning-bg);
  color: var(--warning);
}

.detail-badge.verified {
  background: var(--success-bg);
  color: var(--success);
}

.detail-body {
  display: grid;
  gap: var(--s6);
  padding: var(--s6);
}

.detail-section {
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s3);
  font-size: var(--text-sm);
  font-weight: 720;
  letter-spacing: -0.01em;
}

.section-title .icon {
  width: 15px;
  height: 15px;
}

.source-card,
.install-card,
.about-card,
.doc-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.source-card {
  display: grid;
  gap: var(--s2);
  padding: var(--s4);
}

.source-card strong {
  font-size: var(--text-sm);
}

.source-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  overflow-wrap: anywhere;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10px;
  text-decoration: none;
}

.source-card a:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.install-card {
  display: grid;
  gap: var(--s3);
  padding: var(--s4);
}

.install-title {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  font-weight: 650;
}

.install-hint,
.cache-note {
  margin: 0;
  color: var(--text-2);
  font-size: var(--text-xs);
  line-height: 1.55;
}

.prompt-box {
  max-height: 160px;
  overflow: auto;
  margin: 0;
  padding: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.install-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
}

.install-actions .icon {
  width: 16px;
  height: 16px;
}

.about-card {
  padding: var(--s4);
}

.about-card p {
  margin: 0;
  color: var(--text-2);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--s4);
}

.detail-tags .tag {
  max-width: none;
  padding: 3px 8px;
  font-size: 10px;
}

.doc-card {
  padding: var(--s5);
}

.markdown {
  overflow-wrap: anywhere;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}

.markdown > :first-child {
  margin-top: 0;
}

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

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  margin: 1.8em 0 0.65em;
  color: var(--text);
  font-weight: 720;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.markdown h1 { font-size: 20px; }
.markdown h2 { font-size: 17px; }
.markdown h3 { font-size: 15px; }
.markdown h4,
.markdown h5,
.markdown h6 { font-size: 13px; }

.markdown p,
.markdown ul,
.markdown ol,
.markdown blockquote,
.markdown pre,
.markdown table {
  margin: 0.9em 0;
}

.markdown ul,
.markdown ol {
  padding-left: 1.6em;
}

.markdown li {
  margin: 0.2em 0;
}

.markdown strong {
  color: var(--text);
  font-weight: 700;
}

.markdown a {
  color: var(--accent-text);
  font-weight: 600;
  text-underline-offset: 3px;
}

.markdown code {
  padding: 2px 5px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.markdown pre {
  overflow: auto;
  padding: var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  line-height: 1.55;
}

.markdown pre code {
  padding: 0;
  background: transparent;
}

.markdown blockquote {
  padding: 2px 0 2px var(--s4);
  border-left: 2px solid var(--accent);
  color: var(--text-2);
}

.markdown hr {
  margin: var(--s6) 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.markdown .table-wrap {
  overflow-x: auto;
  margin: var(--s4) 0;
}

.markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.markdown th,
.markdown td {
  padding: var(--s2) var(--s3);
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.markdown th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

.toast {
  position: fixed;
  z-index: 200;
  right: var(--s5);
  bottom: var(--s5);
  max-width: min(360px, calc(100vw - 48px));
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-floating);
  font-size: var(--text-sm);
  animation: toast-in var(--t-med) var(--ease-enter) both;
}

@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
}

@media (max-width: 1220px) {
  .market-grid,
  .loading-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero {
    gap: var(--s5);
    padding-top: var(--s7);
  }

  .market-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .category-panel {
    display: none;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) 160px 160px;
  }

  .category-select-wrap {
    display: flex;
  }
}

@media (max-width: 720px) {
  .server-state {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: var(--s6);
    padding-top: var(--s6);
  }

  .snapshot-figure {
    justify-items: start;
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: var(--s5) 0 0;
  }

  .snapshot-number {
    font-size: 64px;
  }

  .market-shell {
    padding-top: var(--s5);
  }

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

  .search-field {
    grid-column: 1 / -1;
  }

  .market-grid,
  .loading-grid {
    grid-template-columns: 1fr;
  }

  .skill-card,
  .loading-grid span {
    min-height: 214px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .drawer-header,
  .detail-body {
    padding-right: var(--s5);
    padding-left: var(--s5);
  }

  .detail-heading-row {
    display: block;
  }

  .detail-actions {
    margin-top: var(--s3);
    margin-left: 68px;
  }

  .install-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .top-nav {
    padding: 0 var(--s4);
  }

  .brand {
    gap: var(--s2);
  }

  .hero,
  .market-shell,
  .site-footer {
    padding-right: var(--s4);
    padding-left: var(--s4);
  }

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

  .search-field,
  .category-select-wrap {
    grid-column: 1;
  }

  .card-body {
    padding: var(--s4);
  }

  .card-footer {
    padding: 0 var(--s4);
  }

  .drawer-header,
  .detail-body {
    padding-right: var(--s4);
    padding-left: var(--s4);
  }

  .detail-heading-main {
    gap: var(--s3);
  }

  .detail-glyph {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .detail-actions {
    margin-left: 60px;
  }

  .doc-card {
    padding: var(--s4);
  }
}

@media (prefers-contrast: more) {
  :root {
    --border: #9b9b94;
    --text-2: #454541;
  }

  html[data-theme="dark"] {
    --border: #6d6e74;
    --text-2: #d0cfcb;
  }

  .site-header,
  .drawer-header {
    background: var(--bg);
    backdrop-filter: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header,
  .drawer-header {
    background: var(--bg);
  }
}
