/* blog.spelllens.ru. Одна колонка, 68 знаков в строке, светлая и тёмная тема. */
:root {
  color-scheme: light dark;
  --bg: #f7f5f1;
  --fg: #1b1a19;
  --muted: #6e6a66;
  --rule: #d8d3cc;
  --code-bg: #ece8e2;
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111112;
    --fg: #eeeae5;
    --muted: #aaa3b2;
    --rule: #39353e;
    --code-bg: #1b1a1d;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 1.125rem;
  line-height: 1.6;
}
.site-header, main, .site-footer {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* шапка */
.site-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding-top: 2rem;
  padding-bottom: 1.1rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
}
.wordmark-sub {
  font-size: 0.9rem;
  color: var(--muted);
}
.site-header nav { margin-left: auto; }
.site-header nav a {
  margin-left: 1.1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-header nav a:hover,
body[data-nav="home"] nav a[data-nav="home"],
body[data-nav="about"] nav a[data-nav="about"] { color: var(--fg); }

/* текст */
h1, h2, h3, h4 { line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.85rem, 5vw, 2.5rem); margin-bottom: 0.6rem; }
h2 { font-size: 1.45rem; margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
blockquote {
  margin: 1.25rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}
strong { font-weight: 600; }

.post-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 2rem;
}

/* список записей */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { margin: 0 0 2rem; }
.post-list time { display: block; color: var(--muted); font-size: 0.92rem; }
.post-list h2 { font-size: 1.4rem; margin: 0.2rem 0 0.4rem; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; }
.post-list p { margin: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* таблицы */
.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; line-height: 1.4; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.9rem 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}
th { font-weight: 600; }
td:last-child, th:last-child { padding-right: 0; }

/* код: моноширинный только здесь */
code, pre { font-family: var(--font-technical); }
code { font-size: 0.92em; }
:not(pre) > code { background: var(--code-bg); padding: 0.1em 0.35em; }
pre {
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  margin: 0 0 1.25rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
}
pre code { font-size: inherit; background: none; padding: 0; }

/* подвал */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer p { margin: 0; }

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .site-header { padding-top: 1.25rem; margin-bottom: 2rem; }
  .site-header nav { margin-left: 0; width: 100%; }
  .site-header nav a:first-child { margin-left: 0; }
}
