:root {
  color-scheme: light dark;
  --page: #f5f7fa;
  --surface: #ffffff;
  --text: #17202a;
  --muted: #5f6b78;
  --border: #dce2e8;
  --accent: #1769e0;
  --accent-soft: #e9f1ff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d131a;
    --surface: #151d26;
    --text: #eef3f8;
    --muted: #a8b3bf;
    --border: #2c3743;
    --accent: #7db1ff;
    --accent-soft: #183250;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.72 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.shell {
  width: min(920px, calc(100% - 32px));
  margin: 32px auto;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand { font-weight: 800; letter-spacing: .02em; }

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.language-switch button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

main {
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgb(0 0 0 / 7%);
}

h1 { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.12; }
h2 { margin: 2.2em 0 .5em; font-size: 1.25rem; line-height: 1.35; }
p, li { max-width: 76ch; }
.lead, .meta { color: var(--muted); }
.lead { font-size: 1.05rem; }
.meta { font-size: .9rem; }
.notice {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

footer { padding: 20px 4px 0; color: var(--muted); font-size: .85rem; }
[hidden] { display: none !important; }

@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 920px); margin: 10px auto 24px; }
  main { border-radius: 16px; }
}
