:root {
  --bg: #0d1117;
  --fg: #e6edf3;
  --muted: #8b949e;
  --accent: #4f8cff;
  --line: #30363d;
  --panel: #161b22;
  --measure: 44rem;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16.5px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #00122e;
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.site {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

header.site { border-bottom: 1px solid var(--line); }
footer.site {
  border-top: 1px solid var(--line);
  margin-top: 3.5rem;
  padding-block: 1.5rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: block;
}

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

header.site nav { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: 0.95rem; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--fg); }

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero {
  display: block;
  width: 100%;
  max-width: 68rem;
  height: auto;
  margin: 1.25rem auto 0;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.crumbs {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 1.25rem 0 0.5rem;
  word-break: break-word;
}
.crumbs a { color: var(--muted); }

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.35rem 0 0.75rem;
}

.dek {
  font-size: 1.15rem;
  color: #c9d1d9;
  margin: 0 0 2rem;
}

article h2 {
  font-size: 1.25rem;
  margin: 2.4rem 0 0.6rem;
  letter-spacing: -0.01em;
}

article p { margin: 0 0 1rem; }

.widget {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin: 2rem 0;
}
.widget-h { margin: 0 0 0.35rem; font-size: 1rem; }
.widget-note { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.9rem; }
.widget audio { width: 100%; }

pre {
  background: #0b0f14;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.5;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0 0 0.6rem;
  background: var(--panel);
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: 0.6rem 0 0; color: #c9d1d9; }

.related ul { list-style: none; padding: 0; margin: 0; }
.related li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.related li:last-child { border-bottom: 0; }

.meta {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

footer.site p { margin: 0.35rem 0; }

@media (max-width: 40rem) {
  body { font-size: 16px; }
  header.site { align-items: flex-start; flex-direction: column; gap: 0.6rem; }
  .hero { border-radius: 0; border-inline: 0; }
}
