:root {
  --bg: #f4f5f6; --paper: #fff; --ink: #22272b; --muted: #6b747c; --line: #e1e4e7;
  --slate: #2e363c; --slate-2: #3b454c; --accent: #d9820f; --accent-ink: #a85f00;
  --radius: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent-ink); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* header */
.top { background: linear-gradient(#4a555c, var(--slate)); }
.top-inner { display: flex; align-items: center; justify-content: space-between; }
.logo img { display: block; width: 700px; max-width: 100%; height: auto; }
.menu-toggle { display: none; background: none; border: 1px solid #fff5; color: #fff; font-size: 22px;
  border-radius: var(--radius); padding: 2px 10px; cursor: pointer; }
.topnav { background: var(--slate-2); border-top: 1px solid #ffffff14; }
.topnav .wrap { display: flex; flex-wrap: wrap; }
.topnav a { color: #e9ecee; text-decoration: none; padding: 10px 14px; font-weight: 500; }
.topnav a:hover, .topnav a.on { background: #0002; color: #ffb547; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; padding-top: 24px; padding-bottom: 40px; }
main:focus { outline: none; }
main[aria-busy="true"] { opacity: .5; transition: opacity .2s .15s; }

/* articles */
.post { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px; }
.post h1, .post h2 { margin: 0 0 4px; line-height: 1.25; }
.post h2 { font-size: 1.4rem; }
.post h2 a { color: var(--ink); text-decoration: none; }
.post h2 a:hover { color: var(--accent-ink); }
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.crumb { margin: 0 0 6px; font-size: .9rem; }
.content { overflow-wrap: anywhere; }
.content table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.content td, .content th { border: 1px solid var(--line); padding: 4px 8px; }
.content h1 { font-size: 1.3rem; }
.more { font-weight: 600; text-decoration: none; }
h1.cat { margin: 0 0 16px; font-size: 1.6rem; }
.pager { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.error { background: #fdecea; border: 1px solid #f5c2bd; padding: 12px 16px; border-radius: var(--radius); }

/* sidebar */
aside > * { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.sidenav a { display: block; padding: 10px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.sidenav a:last-child { border-bottom: 0; }
.sidenav a:hover, .sidenav a.on { color: var(--accent-ink); background: #fdf6ec; }
.sidenav:empty, .about:empty { display: none; }
.langs { display: flex; padding: 6px; gap: 6px; }
.langs a { flex: 1; text-align: center; padding: 6px 0; border-radius: 4px; text-decoration: none; color: var(--ink); font-weight: 600; }
.langs a.on { background: var(--accent); color: #fff; }
.langs a:not(.on):hover { background: #f1f2f3; }
.about { padding: 16px; font-size: .95rem; }
.about h1 { font-size: 1.15rem; margin: .3em 0; }
.about img { display: block; margin: 0 auto; }
.about [color="orange"] { color: inherit; }

.foot { background: var(--slate); color: #c9ced2; padding: 18px 0; font-size: .9rem; }
.foot a { color: #ffb547; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .logo img { max-width: calc(100vw - 80px); }
  .topnav { display: none; }
  .nav-open .topnav { display: block; }
  .topnav .wrap { flex-direction: column; }
  .post { padding: 16px; }
}
