:root {
  --bg-0: #ffffff;
  --bg-1: #fafbfc;
  --bg-2: #f5f7f9;
  --text-0: #1a1f26;
  --text-1: #586069;
  --text-2: #6a737d;
  --card: #ffffff;
  --card-hover: #ffffff;
  --line: rgba(27, 31, 36, 0.10);
  --line-strong: rgba(27, 31, 36, 0.18);
  --accent: #0969da;
  --accent-hover: #0550ae;
  --accent-light: rgba(9, 105, 218, 0.08);
  --accent-gradient: linear-gradient(135deg, #0969da 0%, #54aeff 100%);
  --chip-bg: #f5f7f9;
  --chip-hover: #ebeef2;
  --danger: #cf222e;
  --success: #1a7f37;
  --warning: #bf8700;
  --info: #0969da;
  --shadow-sm: 0 1px 3px rgba(27, 31, 36, 0.08), 0 1px 2px rgba(27, 31, 36, 0.04);
  --shadow-md: 0 4px 12px rgba(27, 31, 36, 0.08), 0 2px 6px rgba(27, 31, 36, 0.04);
  --shadow-lg: 0 8px 24px rgba(27, 31, 36, 0.10), 0 4px 12px rgba(27, 31, 36, 0.05);
  --shadow-xl: 0 12px 32px rgba(27, 31, 36, 0.12), 0 6px 16px rgba(27, 31, 36, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-0);
  background: var(--bg-0);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  z-index: 0;
}

.bg-shape {
  display: none;
}

.bg-shape-a {
  display: none;
}

.bg-shape-b {
  display: none;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.hero {
  margin-bottom: 32px;
  max-width: 980px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px 14px 14px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  max-width: min(100%, 800px);
}

.hero-brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
}

.hero-brand-title {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.58rem, 3.9vw, 2.55rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-1);
  margin: 0;
  text-wrap: balance;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 16px;
}

h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-1);
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .hero-brand {
    gap: 12px;
    padding: 12px 18px 12px 12px;
    align-items: center;
    border-radius: 26px;
  }

  .hero-brand-icon {
    width: 52px;
    height: 52px;
    align-self: center;
  }

  .hero-brand-title {
    letter-spacing: 0.03em;
  }
}

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms var(--ease-smooth);
  white-space: nowrap;
}

.btn svg {
  flex-shrink: 0;
  transition: transform 180ms var(--ease-smooth);
}

.btn:hover svg {
  transform: scale(1.1);
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.25);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn-secondary:hover {
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary.is-live {
  border-color: rgba(9, 105, 218, 0.45);
  background: linear-gradient(180deg, rgba(9, 105, 218, 0.12) 0%, rgba(9, 105, 218, 0.04) 100%);
  box-shadow: 0 0 0 1px rgba(9, 105, 218, 0.2), var(--shadow-sm);
}

.btn-secondary.is-live:hover {
  border-color: rgba(9, 105, 218, 0.65);
  background: linear-gradient(180deg, rgba(9, 105, 218, 0.18) 0%, rgba(9, 105, 218, 0.06) 100%);
  box-shadow: 0 0 0 1px rgba(9, 105, 218, 0.3), var(--shadow-md);
}

.btn-ghost-link {
  color: var(--text-0);
  border-color: var(--line);
  background: transparent;
}

.btn-ghost-link:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--line-strong);
}

.star-count {
  font-weight: 600;
}

.hero-stats {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-2);
  font-weight: 500;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.control label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-group {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 16px;
  align-items: start;
}

.control-group > * {
  min-width: 0;
}

.control-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-0);
}

.control-hint {
  font-size: 0.78rem;
  color: var(--text-2);
}

.hint {
  font-size: 0.76rem;
  color: var(--text-2);
  margin-top: 2px;
}

kbd {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(31, 42, 48, 0.06);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-2);
  pointer-events: none;
  transition: color 180ms var(--ease-smooth);
}

.input-wrapper:focus-within .input-icon {
  color: var(--accent);
}

/* Token input (composite search bar with chips) */
.token-input {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 180ms var(--ease-smooth), box-shadow 180ms var(--ease-smooth);
  cursor: text;
}

.token-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light), var(--shadow-sm);
}

.token-input:focus {
  outline: none;
}

.token-input-icon {
  color: var(--text-2);
  flex-shrink: 0;
  pointer-events: none;
  transition: color 180ms var(--ease-smooth);
}

.token-input:focus-within .token-input-icon {
  color: var(--accent);
}

.token-input input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  min-width: 80px;
  min-height: 32px;
  padding: 4px 4px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text-0);
  box-shadow: none;
}

.token-input input:focus {
  border: none;
  box-shadow: none;
}

.token-input input:hover {
  border: none;
  background: transparent;
}

.token-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.6;
  user-select: none;
  -webkit-user-select: none;
  animation: chip-in 160ms var(--ease-smooth);
}

@keyframes chip-in {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.token-chip.is-negated {
  background: var(--text-2);
}

.token-chip.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: 0 0 0 2px var(--accent-light);
}

.token-chip .token-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1;
  border-radius: 50%;
  transition: opacity 120ms, background 120ms;
}

.token-chip .token-remove:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

/* Autocomplete dropdown */
.autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 20;
  max-height: 200px;
  overflow-y: auto;
}

.autocomplete[hidden] {
  display: none;
}

.autocomplete-item {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-0);
  transition: background 80ms;
}

.autocomplete-item.is-active,
.autocomplete-item:hover {
  background: var(--accent-light);
}

input,
select {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.9);
  transition: all 180ms var(--ease-smooth);
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input::placeholder {
  color: var(--text-2);
}

input:hover,
select:hover {
  border-color: var(--line-strong);
  background: #fff;
}

input:focus,
select:focus,
.chip:focus-visible,
.ghost-btn:focus-visible,
.btn:focus-visible,
.btn-copy:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light), var(--shadow-sm);
}

.filter-section {
  margin-bottom: 20px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-0);
  margin: 0;
}

.popular-tags-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
}

.popular-tags-hint svg {
  color: var(--accent);
  width: 14px;
  height: 14px;
}

.popular-tags-hint small {
  font-size: 0.8rem;
}

.popular-tags-hint span {
  color: var(--text-1);
  font-weight: 500;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 42px;
  background: var(--chip-bg);
  color: var(--text-0);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 160ms var(--ease-smooth);
  -webkit-user-select: none;
  user-select: none;
}

.chip:hover:not(:disabled) {
  background: var(--chip-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.chip:active:not(:disabled) {
  transform: translateY(0);
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.chip[aria-pressed="true"]:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
}

.results-summary {
  margin: 0;
  color: var(--text-1);
  font-size: 0.92rem;
  font-weight: 500;
}

.quickstart {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(9, 105, 218, 0.04) 0%, var(--card) 40%);
  padding: 24px;
  margin: 0 0 32px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--accent);
  min-width: 0;
}

.quickstart-header {
  margin-bottom: 16px;
}

.quickstart-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-0);
}

.quickstart-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

.quickstart-description {
  margin: 0;
  font-size: 1rem;
  color: var(--text-0);
  line-height: 1.5;
  font-weight: 500;
}

.quickstart-description-main {
  display: block;
}

.quickstart-description-alt {
  display: block;
  margin-top: 6px;
  color: var(--text-0);
  opacity: 0.88;
}

.registry-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.registry-row > * {
  min-width: 0;
}

.registry-url {
  flex: 1 1 360px;
  width: auto;
  max-width: none;
  min-width: 0;
  display: block;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--text-0);
  overflow-x: auto;
  white-space: nowrap;
}

.registry-url::-webkit-scrollbar {
  height: 6px;
}

.registry-url::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}

.btn-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-0);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 40px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
  transition: all 160ms var(--ease-smooth);
}

.btn-copy:hover {
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-copy:active {
  transform: translateY(0);
}

.btn-copy svg {
  flex-shrink: 0;
  transition: transform 180ms var(--ease-smooth);
}

.btn-copy:hover svg {
  transform: scale(1.1);
}

.copy-status {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--success);
  min-height: 1.5em;
  opacity: 0;
  transition: opacity 200ms var(--ease-smooth);
}

.copy-status:not(:empty) {
  opacity: 1;
}

.quickstart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.btn-reset {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 36px;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
  transition: all 160ms var(--ease-smooth);
}

.btn-reset svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.btn-reset:hover:not(:disabled) {
  background: var(--bg-2);
  border-color: var(--line-strong);
  color: var(--text-0);
}

.btn-reset:hover:not(:disabled) svg {
  opacity: 1;
}

.btn-reset:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-reset:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ghost-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-0);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 40px;
  padding: 8px 16px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 160ms var(--ease-smooth);
}

.ghost-btn:hover:not(:disabled) {
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.ghost-btn:active:not(:disabled) {
  transform: translateY(0);
}

.ghost-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.panel.loading {
  color: var(--text-1);
  background: var(--bg-2);
}

.loading-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.panel.error {
  border-color: var(--danger);
  color: var(--danger);
  background: #fff5f5;
  font-weight: 500;
}

.panel.empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 24px;
}

.panel.empty[hidden] {
  display: none;
}

.empty-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.empty-icon {
  flex-shrink: 0;
  color: var(--text-2);
}

.empty-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-0);
}

.empty-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-1);
}

.panel.empty p {
  margin: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
  animation: card-in 280ms var(--ease-smooth) both;
  transition: transform 200ms var(--ease-smooth), 
              box-shadow 200ms var(--ease-smooth),
              border-color 200ms var(--ease-smooth);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card:active {
  transform: translateY(-2px);
  transition-duration: 80ms;
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:focus-visible {
  outline: 3px solid rgba(9, 105, 218, 0.4);
  outline-offset: 2px;
}

.card h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-0);
}

.card-description {
  margin: 0;
  color: var(--text-1);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 4px;
}

.badge {
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 5px 10px;
  white-space: nowrap;
  transition: all 160ms var(--ease-smooth);
}

.badge-category {
  background: rgba(31, 111, 98, 0.12);
  border-color: rgba(31, 111, 98, 0.3);
  color: var(--accent);
}

.badge-difficulty {
  background: rgba(255, 207, 139, 0.25);
  border-color: rgba(255, 207, 139, 0.4);
}

.badge-tag {
  background: #f8f3ea;
  border-color: var(--line);
}

.badge-muted {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--line);
}

.badge.is-match,
mark {
  background: rgba(255, 207, 139, 0.5);
  border-color: rgba(255, 207, 139, 0.6);
}

mark {
  color: inherit;
  padding: 1px 2px;
  border-radius: 3px;
  font-weight: 500;
}

/* Tablet breakpoint */
@media (max-width: 980px) {
  .shell {
    padding: 36px 20px 60px;
  }

  .hero {
    margin-bottom: 28px;
  }

  .hero-brand {
    margin-bottom: 12px;
  }

  #marketplace-title {
    white-space: normal;
  }

  .features-cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
  }

  .controls {
    gap: 16px;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 16px;
  }
}

/* Mobile breakpoint */
@media (max-width: 720px) {
  .shell {
    padding: 24px 16px 48px;
  }

  .hero {
    margin-bottom: 28px;
  }

  h1 {
    margin-bottom: 12px;
  }

  .bg-shape {
    opacity: 0.3;
  }

  .bg-shape-a {
    width: 320px;
    height: 320px;
  }

  .bg-shape-b {
    width: 280px;
    height: 280px;
  }

  .hero-actions {
    width: 100%;
  }

  .quickstart-actions .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .features-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 16px;
  }

  .controls {
    position: sticky;
    top: 12px;
    z-index: 10;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
  }

  .control-group {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
    gap: 8px;
  }

  .chips::-webkit-scrollbar {
    height: 6px;
  }

  .chips::-webkit-scrollbar-track {
    background: transparent;
  }

  .chips::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 3px;
  }

  .chip {
    flex: 0 0 auto;
  }

  .status-row,
  .panel.empty {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .status-row .btn-reset,
  .panel.empty .btn {
    width: 100%;
  }

  .quickstart {
    padding: 20px;
    margin-bottom: 24px;
  }

  .quickstart-title {
    font-size: 1rem;
  }

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

  .quickstart-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .registry-row {
    flex-direction: column;
    align-items: stretch;
  }

  .registry-url {
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
  }

  .btn-copy {
    width: 100%;
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 18px;
  }

  .empty-content {
    flex-direction: column;
    text-align: center;
  }

  .footer {
    padding: 24px 16px;
  }

  .footer-content {
    flex-direction: column;
    gap: 8px;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
  }

  .footer-divider {
    display: none;
  }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
  .hero-brand {
    gap: 12px;
    padding: 12px 16px 12px 12px;
    border-radius: 24px;
  }

  .hero-brand-icon {
    width: 56px;
    height: 56px;
  }

  .hero-brand-title {
    font-size: clamp(1.52rem, 6.8vw, 2rem);
    letter-spacing: 0.02em;
  }

  h1 {
    font-size: 2rem;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .card h3 {
    font-size: 1.05rem;
  }

  .card-description {
    font-size: 0.88rem;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card {
    animation: none;
  }

  .loading-spinner {
    animation: none;
    border-top-color: var(--line);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --line: rgba(31, 42, 48, 0.3);
    --line-strong: rgba(31, 42, 48, 0.5);
  }

  .btn-primary {
    border: 2px solid var(--accent);
  }

  .card {
    border-width: 2px;
  }
}

/* Features Grid */
.features-grid {
  margin: 32px 0 40px;
}

.features-header {
  text-align: center;
  margin-bottom: 24px;
}

.features-header h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  margin: 0;
  color: var(--text-0);
}

.features-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 20px;
  transition: all 200ms var(--ease-smooth);
}

.feature-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
  display: block;
  opacity: 0.85;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-0);
}

.feature-card p {
  margin: 0;
  color: var(--text-1);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 48px auto 0;
  padding: 28px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 500;
  transition: color 180ms var(--ease-smooth);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.footer-divider {
  color: var(--line-strong);
  -webkit-user-select: none;
  user-select: none;
}

/* Dark mode ready (optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode */
  /*
  :root {
    --bg-0: #1a1f24;
    --bg-1: #151a1f;
    --text-0: #e8e6e3;
    --text-1: #b8c5cc;
    --text-2: #8a969c;
    --card: rgba(30, 35, 40, 0.9);
    --card-hover: rgba(35, 40, 45, 0.95);
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #3d9b8a;
    --chip-bg: #2a3138;
  }

  body::before {
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  }
  */
}
