:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --soft: #64748b;
  --border: #dbe4ee;
  --border-strong: #cbd5e1;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --ok: #16a34a;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

p {
  color: var(--muted);
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.12;
}

h1 {
  max-width: 760px;
  margin-bottom: 1rem;
  font-size: clamp(2.45rem, 6vw, 4.75rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  background: var(--text);
  color: white;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.narrow {
  width: min(760px, calc(100% - 2rem));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(219, 228, 238, 0.9);
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 2rem));
  min-height: 72px;
  margin: 0 auto;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--accent-dark);
  font-size: 0.95rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.nav-links,
.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--soft);
  font-size: 0.95rem;
}

.section {
  padding: 5.5rem 0;
}

.section-muted {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.hero {
  padding: 6rem 0 5.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  align-items: center;
  gap: 3rem;
}

.hero-subtitle {
  max-width: 650px;
  margin-bottom: 2rem;
  font-size: 1.18rem;
}

.eyebrow {
  margin-bottom: 0.7rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 700;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--text);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: #f0fdfa;
}

.health-panel,
.card,
.status-card,
.code-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.health-panel {
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.55rem;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.health-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.health-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.health-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.health-list dt {
  color: var(--soft);
  font-size: 0.9rem;
}

.health-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.mini-code,
.code-card pre {
  overflow-x: auto;
  margin: 0;
  border-radius: 7px;
  background: var(--code-bg);
  color: var(--code-text);
  line-height: 1.5;
}

.mini-code {
  padding: 0.9rem;
  font-size: 0.82rem;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 2rem;
}

.section-heading.compact {
  margin-bottom: 1.4rem;
}

.feature-grid,
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem;
}

.card p,
.status-card p,
.code-card p {
  margin-bottom: 0;
}

.status-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem;
}

.status-card p {
  color: #166534;
  font-size: 0.95rem;
  font-weight: 700;
}

.docs-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: start;
  gap: 2rem;
}

.code-card {
  padding: 1rem;
}

.code-title {
  margin-bottom: 0.7rem;
  color: var(--soft);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.code-card pre {
  margin-bottom: 1rem;
  padding: 1rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
}

.footer-grid p {
  margin: 0;
  color: var(--soft);
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .nav,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    padding: 1rem 0;
  }

  .nav-links,
  .footer-links {
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
  }

  .hero-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

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

  .section,
  .hero {
    padding: 4rem 0;
  }
}

@media (max-width: 560px) {
  .container,
  .narrow,
  .nav {
    width: min(100% - 1.25rem, 1120px);
  }

  h1 {
    font-size: 2.35rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .feature-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .health-list div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }
}
