:root {
  font-family: monospace;
  color-scheme: dark;
  --background: #1a1113;
  --panel: #261a1d;
  --text: #d2d6da;
  --muted: #838b8f;
  --accent: #8dc7e5;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--background); color: var(--text); }
button { font: inherit; cursor: pointer; }
::selection { background: #315c72; color: #fff; }
.app-shell, .workspace { min-height: 100vh; }
.workspace { display: flex; flex-direction: column; }

.site-nav {
  display: flex;
  align-items: stretch;
  flex: none;
  height: 36px;
  padding: 0 27px;
  background: var(--panel);
  border-bottom: 1px solid #36262a;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav button, .site-nav a {
  display: flex;
  align-items: center;
  text-decoration: none;
  appearance: none;
  flex: none;
  padding: 0 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .025em;
}
.site-nav button:hover, .site-nav a:hover { color: #c1c9cc; }
.site-nav button.active { color: #d1dadd; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1; min-height: 0; }
.article { min-width: 0; overflow: auto; padding: 8px 0 60px; }
.editor-lines { min-width: 550px; font-family: monospace; font-size: 12px; line-height: 20px; }
.editor-line {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  min-height: 20px;
  padding-right: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.editor-line:hover { background: #ffffff08; }
.line-number { color: #4e555f; text-align: right; padding-right: 15px; user-select: none; white-space: nowrap; }
.line-code { min-width: 0; color: #b5bbc2; }
.line-divider .line-code { color: #7f858d; }
.line-yaml .line-code { color: #d5b989; }
.syntax-key { color: #80c896; }
.syntax-punctuation, .syntax-bracket { color: #9aa3ac; }
.syntax-string { color: #d6b17d; }
.line-h1 { min-height: 27px; }
.line-h1 .line-code { color: #8ebce6; font-size: 19px; line-height: 27px; font-weight: 700; }
.line-h2 .line-code { color: #93c3e6; font-size: 14px; font-weight: 700; }
.syntax-hash { color: #659fc8; }
.line-paragraph .line-code { color: #c0c3c8; }
.line-list .line-code { color: #b9bec4; }
.line-wiki-link a { color: #8fc7e5; text-decoration: none; border-bottom: 1px dotted #547d94; }
.line-wiki-link a:hover { color: #c5e8fb; border-bottom-style: solid; }
.link-comment { color: #636c76; }
.line-blank { height: 10px; min-height: 10px; }
.line-blank .line-code, .line-blank .line-number { line-height: 10px; }

@media (max-width: 700px) {
  .site-nav { height: 34px; padding: 0 6px; }
  .site-nav button, .site-nav a { font-size: 11px; padding: 0 10px; }
  .article { padding-top: 8px; }
  .editor-lines { min-width: 0; font-size: 11px; }
  .editor-line { grid-template-columns: 38px minmax(0, 1fr); min-height: 18px; padding-right: 12px; line-height: 18px; }
  .line-number { padding-right: 10px; }
  .line-h1 { min-height: 24px; }
  .line-h1 .line-code { font-size: 17px; line-height: 24px; }
  .line-h2 .line-code { font-size: 13px; }
}
.article:has(.line-filler) { padding-bottom: 0; }
.line-filler:hover { background: none; }
.content-grid.has-image { grid-template-columns: minmax(0, 1fr) min(36%, 480px); }
.page-image { padding: 48px 40px 0 24px; }
.page-image img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
@media (max-width: 900px) {
  .content-grid.has-image { grid-template-columns: minmax(0, 1fr); }
  .page-image { order: -1; padding: 16px 16px 0 38px; }
  .page-image img { max-width: 480px; }
}
