:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #171717;
  --muted: #666666;
  --border: #e7e7e7;
  --link: #1f5eff;
}

* { 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;
  line-height: 1.7;
}

header {
  border-bottom: 1px solid var(--border);
}

.header-inner,
main,
footer {
  width: min(100% - 40px, 820px);
  margin-inline: auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

nav a,
footer a,
article a {
  color: var(--link);
}

main {
  padding-block: 56px 72px;
}

article {
  overflow-wrap: anywhere;
}

article h1 {
  margin-top: 0;
  line-height: 1.15;
  font-size: clamp(2rem, 7vw, 3.2rem);
}

article h2,
article h3 {
  margin-top: 2em;
  line-height: 1.3;
}

article pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

article blockquote {
  margin-inline: 0;
  padding-left: 18px;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

article table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

article th,
article td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.status {
  color: var(--muted);
}

.error {
  padding: 16px;
  border: 1px solid #d33;
  border-radius: 8px;
}

footer {
  padding-block: 24px 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 560px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 16px;
  }

  main {
    padding-top: 36px;
  }
}
