:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #2364aa;
  --accent-soft: #e8f1fb;
  --tag: #0f766e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.72;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

aside {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow: auto;
}

.brand {
  display: block;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

input[type="search"] {
  width: 100%;
  height: 40px;
  margin-bottom: 18px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

nav {
  display: grid;
  gap: 6px;
}

nav a {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

main {
  width: min(860px, calc(100vw - 320px));
  margin: 0 auto;
  padding: 52px 32px 80px;
}

article {
  min-width: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 1.8em 0 0.65em;
}

h1 {
  margin-top: 0;
  font-size: 36px;
}

h2 {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 25px;
}

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

p,
li {
  font-size: 17px;
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef2f6;
}

pre {
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: #172033;
  color: #eef4ff;
}

img {
  max-width: 100%;
  border-radius: 8px;
}

.wikilink {
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.tag {
  display: inline-flex;
  margin: 0 6px 6px 0;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--tag);
  background: #e8f5f2;
  font-size: 14px;
  text-decoration: none;
}

footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.search-results {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.search-results a {
  display: block;
  padding: 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  text-decoration: none;
}

@media (max-width: 760px) {
  body {
    display: block;
  }

  aside {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  main {
    width: 100%;
    padding: 32px 20px 64px;
  }

  h1 {
    font-size: 30px;
  }
}
