:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #172032;
  --muted: #5c6b7a;
  --accent: #2563eb;
  --accent-strong: #1748a4;
  --border: #dce6f2;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, #eef4fb 100%);
  color: var(--text);
  line-height: 1.7;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
  text-decoration: none;
}

.site-nav,
.language-switch {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.site-nav a,
.language-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.language-switch a:hover {
  background: #eaf2ff;
  color: var(--accent);
}

.site-main {
  flex: 1;
  padding: 2rem 0 3rem;
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1, h2, h3 {
  line-height: 1.25;
  color: var(--accent-strong);
}

.summary {
  font-size: 1.04rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.article-body, .wiki-body, .example-body, .implementation-body {
  color: var(--text);
}

.article-body p,
.wiki-body p,
.example-body p,
.implementation-body p {
  margin: 0 0 1rem;
}

.article-body h1,
.wiki-body h1,
.example-body h1,
.implementation-body h1,
.article-body h2,
.wiki-body h2,
.example-body h2,
.implementation-body h2 {
  margin-top: 1.5rem;
}

.related-panel,
.wiki-links,
.implementation-links {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.site-footer {
  padding: 1rem 0 2rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 700px) {
  .page-card { padding: 1.2rem; }
  .site-header__inner { padding: 0.8rem 0; }
}
