:root {
  color: #0f172a;
  background: #ffffff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 20rem;
  background:
    radial-gradient(circle at 12% 0%, rgb(224 231 255 / 0.7), transparent 28rem),
    #ffffff;
  color: #0f172a;
  line-height: 1.6;
}

a {
  color: #4338ca;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #312e81;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
  border-radius: 0.3rem;
  background: #eef2ff;
  padding: 0.08rem 0.28rem;
  color: #3730a3;
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  background: #0f172a;
  padding: 1rem 1.25rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  line-height: 1.65;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 52rem;
  margin-bottom: 1.25rem;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: 1.55rem;
}

ul {
  padding-left: 1.25rem;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  border-bottom: 1px solid rgb(226 232 240 / 0.9);
  background: rgb(255 255 255 / 0.88);
  padding: 0.75rem max(1.25rem, calc((100vw - 72rem) / 2));
  backdrop-filter: blur(16px);
}

.site-header .brand {
  color: #0f172a;
  font-weight: 750;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.site-header nav a {
  color: #475569;
  text-decoration: none;
}

.site-header nav a:hover {
  color: #312e81;
}

main {
  width: min(72rem, calc(100% - 2.5rem));
  margin: 0 auto;
}

main > section {
  padding: 4rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.hero {
  padding-top: clamp(5rem, 12vw, 9rem);
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lede {
  max-width: 42rem;
  color: #475569;
  font-size: 1.2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  padding: 0.55rem 1rem;
  background: #ffffff;
  color: #334155;
  font-weight: 650;
  text-decoration: none;
}

.button:hover {
  border-color: #a5b4fc;
  background: #f8fafc;
}

.button.primary {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #ffffff;
}

.button.primary:hover {
  border-color: #3730a3;
  background: #3730a3;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.component-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.component-card a {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.78);
  padding: 1.1rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.03);
}

.component-card a:hover {
  border-color: #a5b4fc;
  box-shadow: 0 12px 24px rgb(79 70 229 / 0.08);
  transform: translateY(-1px);
}

.component-card code {
  align-self: flex-start;
  font-weight: 700;
}

.component-card span {
  color: #64748b;
  font-size: 0.9rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.8fr);
  gap: 3rem;
  align-items: center;
}

.split pre {
  margin: 0;
}

.resource-list {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.25rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 3rem;
  padding-top: 2rem;
}

.component-nav {
  position: sticky;
  top: 6rem;
  align-self: start;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.component-nav h2 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.component-nav ul {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.component-nav a {
  display: block;
  border-radius: 0.4rem;
  padding: 0.35rem 0.55rem;
  color: #64748b;
  font-size: 0.85rem;
  text-decoration: none;
}

.component-nav a:hover,
.component-nav a[aria-current="page"] {
  background: #eef2ff;
  color: #3730a3;
}

.api-doc {
  min-width: 0;
  padding-bottom: 5rem;
}

.breadcrumbs {
  margin-bottom: 2.5rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.api-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.api-heading h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.api-heading h1 code {
  background: transparent;
  padding: 0;
  color: #0f172a;
}

.description {
  max-width: 48rem;
  color: #475569;
}

.api-doc section {
  padding: 2.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

th,
td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #475569;
  font-weight: 650;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td {
  min-width: 8rem;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  background: #f1f5f9;
  padding: 0.05rem 0.45rem;
  color: #475569;
  font-size: 0.75rem;
  white-space: nowrap;
}

.empty {
  color: #94a3b8;
  font-style: italic;
}

footer {
  width: min(72rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2rem 0;
  color: #94a3b8;
  font-size: 0.8rem;
}

@media (max-width: 48rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .site-header nav {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .section-heading,
  .api-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .docs-layout {
    display: block;
  }

  .component-nav {
    position: static;
    max-height: none;
    margin-bottom: 2.5rem;
  }

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