/* ============================================================
   Hermes Vault — glass-morphism skill catalog
   Inspired by Hermes Portal & Nous Research design language
   ============================================================ */

:root {
  color-scheme: dark;

  /* Core palette */
  --bg: #07080c;
  --bg-2: #0b0d15;
  --bg-3: #0f111a;

  --glass: rgba(255, 255, 255, 0.04);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --glass-active: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.14);

  --panel: rgba(13, 15, 22, 0.85);
  --panel-border: rgba(255, 255, 255, 0.06);

  --text: #f1f5f9;
  --muted: #94a3b8;
  --subtle: #64748b;

  --brand: #7c8cff;
  --brand-soft: rgba(124, 140, 255, 0.12);
  --brand-glow: rgba(124, 140, 255, 0.25);
  --brand-2: #a78bfa;
  --purple-glow: rgba(167, 139, 250, 0.15);

  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(124, 140, 255, 0.08);

  --max-width: 1200px;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ── Base ── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(55% 40% at 20% 15%, rgba(124, 140, 255, 0.08) 0%, transparent 60%),
    radial-gradient(45% 35% at 80% 20%, rgba(167, 139, 250, 0.06) 0%, transparent 55%),
    radial-gradient(40% 30% at 50% 85%, rgba(124, 140, 255, 0.04) 0%, transparent 50%),
    var(--bg);
}

/* Subtle grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button, input, code { font: inherit; }
button { cursor: pointer; }
code { font-family: var(--font-mono); }

[hidden] {
  display: none !important;
}

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

::selection {
  background: var(--brand-soft);
  color: var(--text);
}

/* ── Topbar ── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 12, 0.75);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-bottom: 1px solid var(--glass-border);
}

.topbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand__mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-soft), var(--purple-glow));
  border: 1px solid var(--glass-border-strong);
  font-size: 18px;
  box-shadow: var(--shadow-glow);
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  background: var(--glass);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

.tab {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: none;
  color: var(--muted);
  background: transparent;
  transition: all 180ms ease;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
}

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

.tab--active {
  color: var(--text);
  background: var(--glass-active);
  box-shadow: var(--shadow-sm);
}

.star-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #fde68a;
  background: rgba(251, 191, 36, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Shell ── */

.skills-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: grid;
  gap: 24px;
}

/* ── Hero ── */

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: start;
}

.hero__copy {
  border-radius: var(--radius-xl);
  padding: 28px;
  background: linear-gradient(135deg, var(--panel), var(--panel));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero__copy::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.04), transparent 50%);
  pointer-events: none;
}

.hero__aside {
  display: grid;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--text) 40%, var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__lede {
  margin: 12px 0 0;
  max-width: 70ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.hero__signal {
  margin: 0 0 10px;
  color: rgba(241, 245, 249, 0.72);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__stats {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(124, 140, 255, 0.18);
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.12), rgba(167, 139, 250, 0.06));
  color: rgba(241, 245, 249, 0.88);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stat-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: background 180ms ease, border-color 180ms ease;
}

.stat-card:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border-strong);
}

.stat-card__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--brand);
}

.stat-card__label {
  display: block;
  margin-top: 2px;
  color: var(--subtle);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Note Cards (aside) ── */

.note-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-md);
}

.note-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.note-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.note-card--soft {
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.08), transparent);
  border-color: rgba(124, 140, 255, 0.15);
}

/* ── Toolbar ── */

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) auto minmax(0, 2fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0 0;
}

.search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: border-color 180ms ease, background 180ms ease;
}

.search:focus-within {
  border-color: var(--brand-glow);
  background: var(--glass-hover);
}

.search__icon {
  color: var(--subtle);
  font-size: 1.1rem;
}

.search__input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 0.95rem;
}

.search__input::placeholder {
  color: var(--subtle);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  background: var(--glass);
  transition: all 180ms ease;
  font-size: 0.92rem;
  font-weight: 500;
}

.button:hover {
  color: var(--text);
  background: var(--glass-hover);
  border-color: var(--glass-border-strong);
  transform: translateY(-1px);
}

.button--ghost {
  background: transparent;
  color: var(--subtle);
}

.button--primary {
  color: white;
  border-color: rgba(124, 140, 255, 0.4);
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.92), rgba(167, 139, 250, 0.8));
  box-shadow: 0 12px 30px rgba(124, 140, 255, 0.18);
}

.button--primary:hover {
  color: white;
  border-color: rgba(167, 139, 250, 0.45);
  background: linear-gradient(135deg, rgba(124, 140, 255, 1), rgba(167, 139, 250, 0.9));
}

.button--soft {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.button--small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.85rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.chip {
  --pill-color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  background: transparent;
  transition: all 160ms ease;
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
}

.chip:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--pill-color) 40%, transparent);
  background: color-mix(in srgb, var(--pill-color) 8%, transparent);
}

.chip--active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--pill-color) 50%, transparent);
  background: color-mix(in srgb, var(--pill-color) 14%, transparent);
}

.chip__count {
  color: inherit;
  opacity: 0.7;
  font-size: 0.8rem;
}

/* ── Panel ── */

.panel {
  display: grid;
  gap: 20px;
  border-radius: var(--radius-xl);
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-lg);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.panel__header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.panel__subtle {
  margin: 4px 0 0;
  color: var(--subtle);
  font-size: 0.92rem;
}

.panel--help {
  gap: 16px;
}

.panel--spotlight {
  gap: 16px;
  border-color: rgba(124, 140, 255, 0.12);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(124, 140, 255, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

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

.featured-card {
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow-md);
}

.featured-card__top,
.featured-card__footer,
.featured-card__actions,
.featured-card__tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.featured-card__top,
.featured-card__footer {
  justify-content: space-between;
}

.featured-card__title {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.featured-card__title:hover {
  color: var(--brand);
}

.featured-card__description {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.featured-card__meta {
  color: var(--subtle);
  font-size: 0.84rem;
  font-weight: 600;
}

/* ── Table ── */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.015);
}

.skills-table {
  width: 100%;
  border-collapse: collapse;
}

@media (min-width: 760px) {
  .skills-table {
    min-width: 640px;
  }
}

.skills-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  font-weight: 600;
  background: rgba(7, 8, 12, 0.95);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 16px;
}

.skills-table tbody tr {
  border-bottom: 1px solid var(--glass-border);
  transition: background 160ms ease;
}

.skills-table tbody tr:nth-child(even):not(.row--featured) {
  background: rgba(255, 255, 255, 0.012);
}

.skills-table tbody tr:last-child {
  border-bottom: none;
}

.skills-table tbody tr:hover {
  background: var(--glass);
}

.skills-table tbody tr.row--featured {
  background: linear-gradient(90deg, rgba(124, 140, 255, 0.06), transparent 60%);
}

.skills-table tbody td {
  vertical-align: top;
  padding: 14px 16px;
}

.cell {
  color: var(--text);
}

.cell--skill {
  min-width: 220px;
}

.cell--tested {
  min-width: 200px;
}

.cell--action {
  min-width: 120px;
}

.skill-stack {
  display: grid;
  gap: 3px;
}

.skill-stack__title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-stack__meta {
  color: var(--subtle);
  font-size: 0.82rem;
}

.skill-link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: var(--text);
  font-weight: 600;
  text-align: left;
  font-size: 0.95rem;
  transition: color 160ms ease;
}

.skill-link:hover {
  color: var(--brand);
}

.creator-link {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 160ms ease;
}

.creator-link:hover {
  color: var(--brand-2);
}

.creator-link--verified {
  color: #c7d2fe;
  font-weight: 700;
}

.creator-link--muted {
  color: var(--subtle);
}

.provenance-stack {
  display: grid;
  gap: 2px;
}

/* ── Pills & Badges ── */

.category-pill,
.source-pill,
.badge,
.command-card__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}

.category-pill {
  color: var(--pill-color);
  background: color-mix(in srgb, var(--pill-color) 10%, transparent);
  border-color: color-mix(in srgb, var(--pill-color) 24%, transparent);
}

.source-pill {
  color: var(--muted);
  border-color: var(--glass-border);
  background: var(--glass);
}

.badge--featured {
  color: #fef3c7;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.22);
}

.badge--tested {
  color: #86efac;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.22);
}

.badge--muted {
  color: var(--muted);
  background: var(--glass);
  border-color: var(--glass-border);
}

.badge--official {
  color: #c7d2fe;
  background: rgba(124, 140, 255, 0.1);
  border-color: rgba(124, 140, 255, 0.2);
}

.badge--proven {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
}

.badge--secure {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

.badge--community {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.badge--tag {
  color: var(--muted);
  background: var(--glass);
  border-color: var(--glass-border);
}

.badge--review {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.22);
}

.cell__meta {
  color: var(--subtle);
  font-size: 0.82rem;
  margin-top: 2px;
}

/* ── Action Buttons ── */

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  color: var(--text);
  background: var(--glass);
  transition: all 160ms ease;
  font-size: 0.82rem;
  font-weight: 500;
}

.action-button:hover {
  border-color: rgba(124, 140, 255, 0.3);
  background: rgba(124, 140, 255, 0.08);
  transform: translateY(-1px);
}

.action-button--primary {
  background: rgba(124, 140, 255, 0.12);
  border-color: rgba(124, 140, 255, 0.25);
}

.action-button--primary:hover {
  background: rgba(124, 140, 255, 0.18);
  border-color: rgba(124, 140, 255, 0.35);
}

/* ── Empty ── */

.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--glass-border-strong);
  color: var(--muted);
  background: var(--glass);
}

.empty-state__content {
  max-width: 760px;
  padding: 20px;
  text-align: center;
}

.empty-state__content strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
}

.empty-state__content p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* ── Command Grid ── */

.command-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.command-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  text-align: left;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  transition: all 180ms ease;
}

.command-card:hover {
  border-color: rgba(124, 140, 255, 0.3);
  background: rgba(124, 140, 255, 0.06);
  transform: translateY(-1px);
}

.command-card code {
  display: block;
  color: #e2e8f0;
  font-size: 0.88rem;
  word-break: break-word;
}

.command-card__label {
  width: fit-content;
  color: var(--muted);
  border-color: var(--glass-border);
  background: var(--glass);
}

/* ── Dialog ── */

.skill-dialog {
  width: min(700px, calc(100vw - 28px));
  border: none;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.skill-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.skill-dialog__shell {
  border-radius: var(--radius-xl);
  padding: 24px;
  background: linear-gradient(135deg, rgba(13, 15, 22, 0.98), rgba(13, 15, 22, 0.95));
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--shadow-lg);
}

.skill-dialog__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: all 160ms ease;
}

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

.skill-dialog__body {
  display: grid;
  gap: 16px;
}

.skill-dialog__description {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.6;
}

.skill-dialog__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.provenance-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.provenance-list li + li {
  margin-top: 4px;
}

.meta-tile {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass);
}

.meta-tile__label {
  color: var(--subtle);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta-tile__value {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.skill-dialog__section {
  display: grid;
  gap: 10px;
}

.skill-dialog__section h3 {
  margin: 0;
  font-size: 0.95rem;
}

.skill-dialog__note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.skill-dialog__note--strong {
  color: var(--text);
}

.skill-dialog__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-dialog__commands {
  display: grid;
  gap: 8px;
}

.command-block {
  display: grid;
  gap: 6px;
}

.command-block__label {
  color: var(--muted);
  font-size: 0.85rem;
}

.command-block__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass);
}

.command-block code {
  overflow-x: auto;
  white-space: nowrap;
  font-size: 0.85rem;
  color: #e2e8f0;
}

/* ── Footer ── */

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--subtle);
  font-size: 0.85rem;
}

/* ── Toast ── */

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 12, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  font-size: 0.9rem;
  pointer-events: none;
}

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

.toast[data-type='error'] {
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(35, 10, 16, 0.95);
}

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 760px) {
  .topbar__inner,
  .skills-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar__inner {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tabs {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tab {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .hero__copy,
  .hero__aside,
  .panel {
    padding: 18px;
    border-radius: var(--radius-lg);
  }

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

  .hero h1 {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }

  .hero__lede {
    font-size: 0.92rem;
  }

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

  .featured-grid {
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 88%);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .featured-grid::-webkit-scrollbar {
    height: 4px;
  }

  .featured-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
  }

  .featured-card {
    scroll-snap-align: start;
  }

  .featured-card__description {
    -webkit-line-clamp: 3;
  }

  .hero__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 10px;
  }

  .stat-card__value {
    font-size: 1.2rem;
  }

  .stat-card__label {
    font-size: 0.75rem;
  }

  .footer {
    padding-left: 16px;
    padding-right: 16px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .skill-dialog__shell {
    padding: 18px;
  }

  .skill-dialog__meta,
  .command-grid {
    grid-template-columns: 1fr;
  }

  .command-block__row {
    grid-template-columns: 1fr;
  }

  /* Mobile: table → cards */
  .table-wrap {
    border-radius: 0;
    margin-left: -18px;
    margin-right: -18px;
    border-left: none;
    border-right: none;
  }

  .skills-table thead {
    display: none;
  }

  .skills-table,
  .skills-table tbody {
    display: block;
  }

  .skills-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
  }

  .skills-table tbody td {
    padding: 0;
    min-width: 0;
  }

  .skills-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--subtle);
    margin-bottom: 2px;
  }

  .skills-table tbody td:first-child::before {
    display: none;
  }

  .skills-table tbody td:first-child,
  .skills-table tbody td:nth-child(2) {
    grid-column: 1 / -1;
  }

  .skills-table tbody td:nth-child(3) {
    display: none;
  }

  .cell--tested .cell__meta {
    display: none;
  }

  .cell--action {
    min-width: 0;
  }

  tbody tr td:nth-child(5),
  tbody tr td:nth-child(6) {
    display: inline-flex;
    align-items: center;
    width: auto;
    margin-right: 6px;
  }

  tbody tr td:nth-child(5)::before,
  tbody tr td:nth-child(6)::before {
    display: none;
  }

  .action-button {
    width: auto;
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  /* Card-style row */
  .skills-table tbody tr.row--featured {
    background: linear-gradient(180deg, rgba(124, 140, 255, 0.07), transparent);
  }

  .cell--skill,
  .cell--tested {
    min-width: 0;
  }

  .search {
    min-height: 42px;
  }

  .chips {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

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

  .chips::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
  }

  .chip {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .skill-stack__title {
    gap: 4px;
  }

  .note-card {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .hero__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .stat-card {
    padding: 8px;
  }

  .stat-card__value {
    font-size: 1rem;
  }

  .stat-card__label {
    font-size: 0.7rem;
  }

  .hero__copy {
    padding: 14px;
  }

  tbody tr td:nth-child(5),
  tbody tr td:nth-child(6) {
    display: block;
    margin-right: 0;
  }

  .action-button {
    width: 100%;
  }
}

.page--managed-empty .toolbar {
  display: none;
}

.page--managed-empty .table-wrap {
  display: none;
}

.page--managed-empty #emptyState {
  display: none !important;
}
