:root {
  --bg: #f7f5f0;
  --fg: #0f1116;
  --muted: #5a5f6b;
  --card: rgba(255, 255, 255, 0.76);
  --accent: #2f7cf6;
  --accent-2: #0c9c8f;
  --border: rgba(15, 17, 22, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse 100% 80% at 20% 10%, rgba(47, 124, 246, 0.07), transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 5%, rgba(12, 156, 143, 0.06), transparent 50%),
    var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ========================================
   Layout
   ======================================== */

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 28px 72px;
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 320px;
  max-width: 440px;
  text-decoration: none;
  color: inherit;
  white-space: normal;
}

.logo-mark {
  height: 128px;
  width: auto;
  display: block;
}

.brand .logo {
  font-size: 15px;
  line-height: 1.2;
  display: block;
}

.logo {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(47, 124, 246, 0.1);
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.pill:hover {
  background: rgba(47, 124, 246, 0.16);
  border-color: rgba(47, 124, 246, 0.12);
}

.pill.ghost {
  background: rgba(15, 17, 22, 0.04);
}

.pill.ghost:hover {
  background: rgba(15, 17, 22, 0.08);
  border-color: var(--border);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  padding: 24px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}

.hero-copy h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  margin: 8px 0 14px;
  letter-spacing: -0.025em;
}

.hero-copy .lede {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(47, 124, 246, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(47, 124, 246, 0.28);
}

.button.ghost {
  background: rgba(15, 17, 22, 0.05);
  color: var(--fg);
  box-shadow: none;
}

.button.ghost:hover {
  background: rgba(15, 17, 22, 0.09);
}

.hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.hero-meta span {
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(15, 17, 22, 0.04);
}

/* ========================================
   Hero Card
   ======================================== */

.hero-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.75) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card-label {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

.schema-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}

.schema-list li {
  background: rgba(15, 17, 22, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.schema-list span {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.schema-list small {
  color: var(--muted);
  font-size: 13px;
}

.badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(47, 124, 246, 0.1);
  color: var(--fg);
  border: 1px solid transparent;
}

.status-pill.ready {
  background: rgba(12, 156, 143, 0.12);
}

.status-pill.muted {
  background: rgba(15, 17, 22, 0.05);
}

/* ========================================
   Sections
   ======================================== */

.section {
  padding: 48px 0;
}

.section.alt {
  background: rgba(15, 17, 22, 0.025);
  border-radius: 20px;
  padding: 48px 28px;
  margin: 0 -28px;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin: 6px 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-header .lede {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
  line-height: 1.6;
}

.section-header .lede.narrow {
  max-width: 600px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 4px;
}

/* ========================================
   Grid & Cards
   ======================================== */

.grid {
  display: grid;
  gap: 16px;
}

.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin: 2px 0 6px;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
  line-height: 1.55;
}

.list {
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  display: grid;
  gap: 6px;
}

.list li {
  line-height: 1.5;
}

/* ========================================
   Step Cards
   ======================================== */

.step {
  position: relative;
  padding-top: 16px;
  padding-left: 52px;
}

.step-number {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(47, 124, 246, 0.2);
}

/* ========================================
   Registry Filters & Toggle
   ======================================== */

.registry-container {
  width: 100%;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

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

.filter-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--fg);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.filter-button:hover {
  border-color: rgba(47, 124, 246, 0.3);
  background: rgba(255, 255, 255, 0.9);
}

.filter-button.active {
  background: var(--accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(47, 124, 246, 0.2);
}

.view-toggle {
  display: flex;
  gap: 6px;
}

.view-button {
  border: 1px solid var(--border);
  background: rgba(15, 17, 22, 0.03);
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.view-button:hover {
  background: rgba(15, 17, 22, 0.06);
}

.view-button.active {
  background: var(--accent-2);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(12, 156, 143, 0.2);
}

/* ========================================
   Registry Cards
   ======================================== */

.registry-card {
  display: grid;
  gap: 10px;
}

.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.registry-card .title,
.registry-row .title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.registry-card .type-pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  background: rgba(15, 17, 22, 0.03);
  white-space: nowrap;
}

.citation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.citation {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.copy-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--fg);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  border-color: rgba(47, 124, 246, 0.25);
  background: white;
}

.copy-btn.copied {
  background: var(--accent-2);
  color: white;
  border-color: transparent;
}

.registry-card .desc {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.registry-card .title {
  cursor: help;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(15, 17, 22, 0.05);
  color: var(--muted);
  font-size: 12px;
}

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

.action-link {
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.12s ease;
}

.action-link:hover {
  border-color: rgba(47, 124, 246, 0.25);
  background: white;
  transform: translateY(-1px);
}

.action-link.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ========================================
   Registry List Layout
   ======================================== */

.list-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.registry-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.registry-row .title-row {
  margin-bottom: 2px;
}

.registry-row .desc {
  margin: 0;
}

.registry-row .citations {
  font-size: 13px;
}

.registry-row .tag-row {
  margin-top: 2px;
}

.registry-row .actions {
  margin-top: 4px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer .logo {
  font-size: 15px;
}

.footer .muted {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--fg);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.12s ease;
}

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

/* ========================================
   Code
   ======================================== */

code {
  background: rgba(15, 17, 22, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace;
  font-size: 0.9em;
}

/* ========================================
   Code Block
   ======================================== */

.code-block {
  background: rgba(15, 17, 22, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
  color: var(--fg);
}

pre.code-block {
  margin: 8px 0 0;
}

/* ========================================
   Responsive - Tablet (900px)
   ======================================== */

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

  .hero-card {
    max-width: 480px;
  }
}

@media (max-width: 768px) {
  .logo-mark {
    height: 72px;
  }
  .page-shell {
    padding: 24px 20px 60px;
  }

  .section.alt {
    padding: 40px 20px;
    margin: 0 -20px;
    border-radius: 16px;
  }

  .nav {
    gap: 12px;
  }

  .nav-actions {
    gap: 6px;
  }

  .pill {
    padding: 8px 12px;
    font-size: 13px;
  }

  .hero {
    padding: 16px 0 32px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-copy .lede {
    font-size: 16px;
  }

  .section {
    padding: 40px 0;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .section-header .lede {
    font-size: 15px;
  }

  .view-toggle {
    width: 100%;
  }

  .cols-3 {
    grid-template-columns: 1fr;
  }

  .cols-2 {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Responsive - Mobile (480px)
   ======================================== */

@media (max-width: 480px) {
  .page-shell {
    padding: 20px 16px 48px;
  }

  .section.alt {
    padding: 32px 16px;
    margin: 0 -16px;
    border-radius: 12px;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .brand {
    flex: 0 0 auto;
    width: 100%;
  }

  .nav-actions {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: 28px;
  }

  .button {
    padding: 10px 16px;
    font-size: 14px;
  }

  .hero-meta span {
    padding: 6px 10px;
    font-size: 12px;
  }

  .step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
    padding: 16px;
    align-items: flex-start;
  }

  .step-number {
    position: static;
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .filter-button {
    padding: 8px 12px;
    font-size: 13px;
  }

  .card {
    padding: 16px;
  }

  .card h3 {
    font-size: 16px;
  }

  .card p {
    font-size: 14px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-links {
    gap: 12px;
  }
}
