:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #f1f2f8;
  background: #10121f;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --surface: #181b2b;
  --line: #303449;
  --muted: #a1a6bd;
  --accent: #aba4ff;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 82% 10%, #818cf81a, transparent 34%), #10121f;
}

.shell {
  width: min(1160px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff12;
}

.wordmark {
  color: #e8e9f4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-decoration: none;
}

.topbar-tag, .demo-count, .footer {
  color: var(--muted);
  font-size: 12px;
}

.topbar-tag { font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }

.catalog {
  flex: 1;
  padding: 68px 0 72px;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
}

.demo-count { margin: 0 0 3px; white-space: nowrap; }

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

.demo-card {
  min-height: 218px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.demo-card:hover, .demo-card:focus-visible {
  border-color: #818cf8;
  background: #22263d;
  transform: translateY(-2px);
  outline: none;
}

.card-header { display: flex; justify-content: space-between; align-items: center; }
.card-number { color: var(--accent); font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.card-arrow { color: #a1a6bd; font-size: 20px; }
.demo-card h2 { margin: 25px 0 8px; font-size: 17px; font-weight: 600; }
.demo-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.card-action { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 20px; color: #c9d5d0; font-size: 12px; }
.card-action span:last-child { color: var(--accent); font-size: 18px; }

.footer {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #ffffff12;
}

@media (max-width: 600px) {
  .shell { width: min(100% - 36px, 480px); }
  .topbar { min-height: 64px; }
  .catalog { padding: 48px 0; }
  .catalog-heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 20px; }
  h1 { font-size: 25px; }
  .demo-list { grid-template-columns: 1fr; }
  .demo-card { min-height: 196px; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 14px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.wordmark img { display: block; width: 180px; max-width: 100%; height: auto; filter: hue-rotate(35deg); }
