:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #151a21;
  --muted: #5a6674;
  --line: #e3e7ed;
  --accent: #1a5fb4;
  --accent-soft: #e9f0fa;
  --code-bg: #f1f3f6;
  --code-ink: #1f2733;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1218;
    --panel: #151a22;
    --ink: #e7ecf3;
    --muted: #9aa6b5;
    --line: #232b36;
    --accent: #78b3f0;
    --accent-soft: #16243a;
    --code-bg: #11171f;
    --code-ink: #dfe6ef;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.66 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--panel); color: var(--ink);
  padding: .6rem 1rem; border: 1px solid var(--line); border-radius: .4rem; z-index: 10;
}
.skip:focus { left: .6rem; top: .6rem; }
.wrap { width: min(760px, calc(100% - 2.4rem)); margin: 0 auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: .2rem; }

header.site { border-bottom: 1px solid var(--line); background: var(--panel); }
header.site .wrap {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  align-items: baseline; justify-content: space-between; padding: .95rem 0;
}
.brand { color: var(--ink); font-weight: 650; font-size: 1.12rem; letter-spacing: -.01em; padding-block: .3rem; display: inline-block; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand .dot { color: var(--accent); }
nav.site { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .95rem; }
nav.site a { color: var(--muted); display: inline-block; padding-block: .3rem; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--ink); }

main { padding: 2.4rem 0 3.4rem; }
.intro { margin: 0 0 2.2rem; }
.intro h1 { margin: 0 0 .6rem; font-size: clamp(1.45rem, 3.6vw, 1.95rem); line-height: 1.22; letter-spacing: -.015em; }
.intro p { margin: 0; color: var(--muted); max-width: 62ch; }
.section-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 2.4rem 0 .2rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line);
  font-size: .82rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.section-label a { font-size: .82rem; letter-spacing: 0; text-transform: none; display: inline-block; padding-block: .35rem; }

ul.posts { list-style: none; margin: 0; padding: 0; }
ul.posts li { padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
ul.posts li:last-child { border-bottom: 0; }
.post-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .9rem;
  font-size: .86rem; color: var(--muted); margin-bottom: .3rem;
}
.post-meta time { font-variant-numeric: tabular-nums; }
.post-meta .rel { color: var(--muted); }
.post-title { margin: 0 0 .35rem; font-size: 1.22rem; line-height: 1.32; letter-spacing: -.01em; }
.post-title a { color: var(--ink); display: inline-block; padding-block: .2rem; }
.post-title a:hover { color: var(--accent); text-decoration: none; }
.post-summary { margin: 0; color: var(--muted); font-size: .97rem; max-width: 64ch; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; padding: 0; }
.tags li { margin: 0; }
.tags a {
  display: inline-block; padding: .32rem .62rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--panel); color: var(--muted); font-size: .82rem; white-space: nowrap;
}
.tags a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

article.post header { margin-bottom: 1.6rem; }
article.post h1 { margin: .35rem 0 .7rem; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.24; letter-spacing: -.015em; }
article.post .body { font-size: 1.03rem; max-width: 68ch; }  /* мера строки: 60–75 знаков */
article.post .body h2 { margin: 2.1rem 0 .7rem; font-size: 1.2rem; line-height: 1.3; }
article.post .body p { margin: 0 0 1.05rem; }
article.post .body ul, article.post .body ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
article.post .body li { margin: .4rem 0; }
article.post .body blockquote {
  margin: 1.3rem 0; padding: .2rem 0 .2rem 1rem; border-left: 3px solid var(--accent);
  color: var(--muted); font-style: italic;
}
article.post .body blockquote p { margin: .4rem 0; }
.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data caption { caption-side: top; text-align: left; color: var(--muted); font-size: .86rem; padding-bottom: .45rem; }
table.data th, table.data td { text-align: left; padding: .45rem .55rem; border-bottom: 1px solid var(--line); }
table.data th { color: var(--muted); font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
table.data td + td, table.data th + th { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody tr:last-child td { border-bottom: 0; }
pre {
  margin: 1.2rem 0; padding: .85rem 1rem; background: var(--code-bg); color: var(--code-ink);
  border: 1px solid var(--line); border-radius: .5rem; overflow-x: auto; font-size: .88rem; line-height: 1.55;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
p code, li code { background: var(--code-bg); padding: .08rem .3rem; border-radius: .25rem; font-size: .9em; }

.notes { margin: 0; padding: 0; list-style: none; }
.notes li { padding: .7rem 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .96rem; }
.notes li:last-child { border-bottom: 0; }
.notes .when { color: var(--ink); font-variant-numeric: tabular-nums; }

.post-nav a { display: inline-block; padding-block: .3rem; }
.post-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .95rem; }
.post-nav .dir { display: block; color: var(--muted); font-size: .82rem; }

.author { margin-top: 2.6rem; padding: 1.2rem 1.3rem; background: var(--panel); border: 1px solid var(--line); border-radius: .7rem; }
.author p { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }
.author strong { font-size: 1rem; }

footer.site { border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: .9rem; }
footer.site .wrap { padding: 1.3rem 0; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; justify-content: space-between; }
footer.site a { color: var(--muted); display: inline-block; padding-block: .3rem; }
footer.site a:hover { color: var(--accent); }
.updated { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  body { font-size: 16px; }
  main { padding: 1.8rem 0 2.6rem; }
  .post-title { font-size: 1.1rem; }
}
