:root {
  color-scheme: light dark;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --fg: #1b2430;
  --muted: #526071;
  --accent: #1d4ed8;
  --border: #dce3ec;
  --code-bg: #eef2f6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1722;
    --surface: #16202e;
    --fg: #e8eef5;
    --muted: #9aa8ba;
    --accent: #60a5fa;
    --border: #263549;
    --code-bg: #1e2c3e;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  padding-bottom: 3rem;
}

.container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  color: var(--fg);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

nav {
  display: flex;
  gap: 1.25rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

.hero {
  padding: 3rem 0 2rem;
}

.hero.compact {
  padding: 2.25rem 0 1.5rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.lead {
  margin: 0;
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.15rem;
  margin-bottom: 2rem;
}

.card,
.panel,
.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 1.35rem 1.5rem;
}

.panel,
.note {
  margin-bottom: 1.25rem;
}

.card h2 a {
  color: var(--fg);
  text-decoration: none;
}

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

.card p,
.panel p,
.note p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.meta {
  margin: 0 0 0.4rem !important;
  font-size: 0.82rem;
  color: var(--muted);
}

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
}

.specs dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.specs dd {
  margin: 0.2rem 0 0;
  font-weight: 500;
}

.principles {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.principles li {
  margin-bottom: 0.5rem;
}

.principles strong {
  color: var(--fg);
}

code {
  background: var(--code-bg);
  color: var(--fg);
  padding: 0.1rem 0.35rem;
  border-radius: 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.footer-inner p {
  margin: 0;
}
