:root {
  --bg: #050814;
  --bg-alt: #0b1020;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.12);
  --text: #f5f7ff;
  --text-muted: #b8bed8;
  --border-subtle: #242a3c;
  --radius-lg: 1rem;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
  --focus-ring: 0 0 0 3px rgba(79, 140, 255, 0.7);
  --max-width: 960px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

html {
  font-size: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, #101632 0, #050814 60%);
  color: var(--text);
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

header {
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(to right, #050814, #06091a);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--text);
  text-decoration: none;
}

.brand a:hover,
.brand a:focus-visible {
  text-decoration: none;
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--accent-soft);
  color: var(--text);
  text-decoration: none;
}

.nav-link.active {
  background: var(--accent-soft);
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text);
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.nav-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Main layout */

main {
  flex: 1;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.5rem;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.page-title {
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}

.page-lead {
  margin: 0;
  color: var(--text-muted);
  max-width: 42rem;
}

/* Cards */

.card-grid {
  display: grid;
  gap: 1.25rem;
}

.card {
  background: linear-gradient(145deg, #050814, #080c18);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.4rem;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card h2 {
  font-size: 1.2rem;
}

.card h3 {
  font-size: 1rem;
}

.card p {
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.badge-primary {
  border-color: var(--accent);
  color: var(--accent);
}

.code-block {
  margin-top: 0.75rem;
  background: #050814;
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 0.9rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
}

/* Tables */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0.6rem;
}

.table th {
  text-align: left;
  background: #080c18;
}

/* Footer */

footer {
  border-top: 1px solid var(--border-subtle);
  background: #050814;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
}

/* Skip link */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  padding: 0.4rem 0.7rem;
  background: #ffffff;
  color: #000;
  border-radius: 999px;
  font-size: 0.8rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
}

/* Typography */

h1,
h2,
h3 {
  font-weight: 650;
}

ul {
  padding-left: 1.1rem;
}

/* Responsive */

@media (min-width: 720px) {
  .card-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  nav {
    position: absolute;
    inset-inline: 0;
    top: 3.1rem;
    background: #050814;
    border-bottom: 1px solid var(--border-subtle);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease-out, opacity 0.18s ease-out;
  }

  nav[data-open="true"] {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 1.25rem 0.75rem;
  }

  .page {
    padding-top: 2.25rem;
  }

  .header-inner {
    position: relative;
  }
}
