/* ==========================================================================
   Периметр — cybersecuritygroup.com.ua
   Темна тема: "Dark Slate + Amber" — editorial / tech
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Палітра: поверхні */
  --bg: #121418;
  --surface: #181b20;
  --surface-2: #1f2329;
  --surface-3: #262b32;
  --code-bg: #0f1114;

  /* Палітра: текст */
  --text: #dde0e5;
  --text-strong: #eceef1;
  --muted: #a4abb5;
  --faint: #8b929c;

  /* Палітра: лінії */
  --line: #2a2f37;
  --line-strong: #3a414b;

  /* Акценти */
  --accent: #d9a957;
  --accent-hover: #e8bd72;
  --accent-soft: rgba(217, 169, 87, 0.12);
  --accent-line: rgba(217, 169, 87, 0.42);
  --visited: #c4a987;
  --threat: #e48d80;
  --threat-soft: rgba(228, 141, 128, 0.12);

  --selection-bg: rgba(217, 169, 87, 0.32);
  --focus: #f0c77f;

  /* Типографіка */
  --f-head: "Onest", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --f-body: "Literata", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.8125rem;
  --lh-body: 1.75;
  --lh-head: 1.3;

  /* Шкала відступів */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Радіуси та бордери */
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 12px;
  --border: 1px solid var(--line);
  --border-strong: 1px solid var(--line-strong);

  /* Розміри */
  --wrap: 1160px;
  --measure: 70ch;
  --gutter: var(--s-4);
  --tap: 44px;

  --ease: 160ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--s-5);
  scrollbar-color: var(--line-strong) var(--bg);
  scrollbar-width: thin;
  background: var(--bg);
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--selection-bg); color: var(--text-strong); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #4a525e; }

img, picture, video, canvas, svg, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}
img, video { border-radius: var(--r); filter: brightness(0.93); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-head);
  color: var(--text-strong);
  line-height: var(--lh-head);
  font-weight: 700;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* ---------- Посилання ---------- */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--ease), text-decoration-color var(--ease), background-color var(--ease);
}
a:visited { color: var(--visited); }
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- Форми ---------- */
input, textarea, select, button {
  font: inherit;
  color: var(--text);
}
input, textarea, select {
  width: 100%;
  min-height: var(--tap);
  padding: var(--s-2) var(--s-3);
  background: var(--surface-2);
  border: var(--border-strong);
  border-radius: var(--r);
  color-scheme: dark;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, textarea:hover, select:hover { border-color: #4a525e; }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--accent);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

button, .button, input[type="submit"], input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: auto;
  min-height: var(--tap);
  padding: var(--s-2) var(--s-5);
  background: var(--surface-3);
  color: var(--text-strong);
  border: var(--border-strong);
  border-radius: var(--r);
  font-family: var(--f-head);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
button:hover, .button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}
button:active, input[type="submit"]:active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1407;
}

/* ---------- Каркас ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus, .skip:focus-visible {
  left: var(--s-3);
  top: var(--s-3);
  z-index: 300;
  padding: var(--s-2) var(--s-4);
  background: var(--accent);
  color: #1a1407;
  font-family: var(--f-head);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--r);
}

/* ---------- Шапка ---------- */
.topbar {
  position: relative;
  z-index: 100;
  background: rgba(24, 27, 32, 0.96);
  border-bottom: var(--border);
  box-shadow: inset 0 2px 0 var(--accent);
}

.topbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  min-height: 60px;
  padding-top: var(--s-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap);
  color: var(--text-strong);
  text-decoration: none;
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  margin-right: auto;
}
.brand:visited { color: var(--text-strong); }
.brand:hover { color: var(--text-strong); }
.brand-mark { color: var(--accent); }

.menu {
  order: 3;
  display: flex;
  gap: var(--s-1);
  width: 100%;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) var(--s-1);
  width: calc(100% + var(--gutter) * 2);
  overflow-x: auto;
  scrollbar-width: none;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 0.9375rem;
  border-top: var(--border);
}
.menu::-webkit-scrollbar { display: none; }

.menu a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: var(--tap);
  padding: 0 var(--s-3);
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--r-sm);
  box-shadow: inset 0 -2px 0 transparent;
}
.menu a:visited { color: var(--muted); }
.menu a:hover { color: var(--text-strong); background: var(--surface-2); }
.menu a[aria-current="page"] {
  color: var(--text-strong);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.lang {
  display: flex;
  gap: var(--s-1);
  font-family: var(--f-head);
  font-size: var(--fs-small);
}
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 var(--s-2);
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lang a:visited { color: var(--muted); }
.lang a:hover { color: var(--text-strong); border-color: var(--line-strong); }
.lang a[aria-current="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
  font-weight: 700;
}

/* ---------- Хлібні крихти і заголовок ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-2);
  margin: var(--s-6) 0 var(--s-4);
  font-family: var(--f-head);
  font-size: var(--fs-small);
  color: var(--faint);
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:visited { color: var(--muted); }
.crumbs a:hover { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-line); }

.post-head { max-width: 860px; }

.post-head h1 {
  font-size: 1.375rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.012em;
  max-width: 38ch;
  color: var(--text-strong);
}

.post-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin: var(--s-4) 0 var(--s-6);
  padding-top: var(--s-3);
  border-top: var(--border);
  font-family: var(--f-head);
  font-size: var(--fs-small);
  color: var(--muted);
}
.post-info > * { position: relative; }

/* ---------- Обкладинка ---------- */
.cover {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto var(--s-7);
  padding: 0 var(--gutter);
}
.cover img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--r-lg);
}

/* ---------- Сітка статті ---------- */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
}

/* ---------- Зміст ---------- */
.toc {
  font-family: var(--f-head);
  font-size: var(--fs-small);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-4) var(--s-3);
}
.toc-title {
  margin-bottom: var(--s-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.toc ol {
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: toc;
}
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  gap: var(--s-2);
  align-items: baseline;
  min-height: var(--tap);
  padding: var(--s-2) 0;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  border-top: var(--border);
}
.toc li:first-child a { border-top: 0; }
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: 0 0 auto;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--faint);
}
.toc a:visited { color: var(--muted); }
.toc a:hover { color: var(--text-strong); }
.toc a:hover::before { color: var(--accent); }

/* ---------- Стаття ---------- */
.post {
  min-width: 0;
  max-width: calc(var(--measure) + var(--s-7) * 2);
  padding: var(--s-5) var(--s-4);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--r-lg);
}

.post > *:first-child { margin-top: 0; }
.post > *:last-child { margin-bottom: 0; }

.post p { margin: 0 0 1.25em; }

.post .intro {
  font-size: 1.075em;
  line-height: 1.7;
  color: var(--text-strong);
  padding-bottom: var(--s-5);
  margin-bottom: var(--s-5);
  border-bottom: var(--border);
}

.post h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: var(--s-7) 0 var(--s-3);
  padding-top: var(--s-5);
  border-top: var(--border);
  position: relative;
}
.post h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.post h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  margin: var(--s-6) 0 var(--s-2);
}

.post h4 {
  font-size: 1rem;
  font-weight: 650;
  margin: var(--s-5) 0 var(--s-2);
  color: var(--text);
}

.post h2 + p, .post h3 + p, .post h4 + p { margin-top: 0; }

/* Списки */
.post ul, .post ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}
.post li { margin-bottom: 0.5em; padding-left: 0.3em; }
.post li:last-child { margin-bottom: 0; }
.post ul li::marker { color: var(--accent); font-size: 0.95em; }
.post ol li::marker { color: var(--accent); font-family: var(--f-head); font-weight: 700; font-size: 0.9em; }
.post li > ul, .post li > ol { margin: 0.5em 0 0.25em; }
.post li > ul li::marker { color: var(--faint); }

/* Summary */
.summary {
  margin: var(--s-2) 0 var(--s-5);
  padding: var(--s-4) var(--s-4);
  background: var(--surface-2);
  border: var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--r);
}
.summary-title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-2) !important;
}
.summary p:last-child, .summary ul:last-child, .summary ol:last-child { margin-bottom: 0; }

/* Терміни */
.terms {
  display: grid;
  gap: var(--s-3);
  margin: 0 0 1.5em;
}
.terms div {
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--r);
}
.terms dt {
  font-family: var(--f-head);
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: var(--s-1);
}
.terms dd { color: var(--muted); }

/* Цитата */
.post blockquote, blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-4) var(--s-5);
  background: var(--surface-2);
  border: var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--muted);
}
.post blockquote p, blockquote p {
  margin: 0 0 0.75em;
  font-size: 1.05em;
  line-height: 1.65;
  font-weight: 400;
  font-style: italic;
  color: #c3c8cf;
}
.post blockquote p:last-child, blockquote p:last-child { margin-bottom: 0; }
blockquote cite, blockquote footer {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--f-head);
  font-size: var(--fs-small);
  font-style: normal;
  color: var(--faint);
}

/* Код */
code, kbd, samp, pre { font-family: var(--f-mono); }

:not(pre) > code {
  padding: 0.12em 0.4em;
  font-size: 0.86em;
  background: var(--surface-3);
  color: #ecd3a6;
  border: var(--border);
  border-radius: var(--r-sm);
  overflow-wrap: anywhere;
  word-break: break-word;
}

pre {
  max-width: 100%;
  margin: var(--s-5) 0;
  padding: var(--s-4);
  overflow-x: auto;
  background: var(--code-bg);
  border: var(--border);
  border-radius: var(--r);
  font-size: 0.875rem;
  line-height: 1.65;
  color: #d4d8de;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}
pre code {
  padding: 0;
  background: none;
  border: 0;
  font-size: inherit;
  color: inherit;
  white-space: pre;
}

kbd {
  display: inline-block;
  padding: 0.1em 0.45em;
  font-size: 0.82em;
  line-height: 1.4;
  color: var(--text-strong);
  background: var(--surface-3);
  border: var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
}

/* Таблиці */
table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: var(--s-5) 0;
  overflow-x: auto;
  border-collapse: collapse;
  border: var(--border);
  border-radius: var(--r);
  font-family: var(--f-head);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-overflow-scrolling: touch;
}
thead { background: var(--surface-3); }
th, td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  vertical-align: top;
  border-bottom: var(--border);
  min-width: 120px;
}
th {
  color: var(--text-strong);
  font-weight: 650;
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.018); }
tbody tr:hover { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 0; }
caption {
  padding: var(--s-2) var(--s-4);
  text-align: left;
  font-size: var(--fs-small);
  color: var(--muted);
}

/* Інше */
hr {
  height: 0;
  margin: var(--s-7) 0;
  border: 0;
  border-top: var(--border);
  position: relative;
  overflow: visible;
}
hr::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background: var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}

figure { margin: var(--s-6) 0; }
figure img { width: 100%; border: var(--border); }
figcaption {
  margin-top: var(--s-2);
  font-family: var(--f-head);
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--muted);
}

small { font-size: var(--fs-small); color: var(--muted); }

mark {
  padding: 0.05em 0.25em;
  background: rgba(217, 169, 87, 0.22);
  color: var(--text-strong);
  border-radius: 3px;
}

strong, b { font-weight: 700; color: var(--text-strong); }
abbr[title] { text-decoration: underline dotted var(--faint); cursor: help; }
sub, sup { font-size: 0.75em; line-height: 0; }

/* ---------- Читайте також ---------- */
.more {
  margin-top: var(--s-8);
  padding: var(--s-7) 0;
  background: var(--surface);
  border-top: var(--border);
  border-bottom: var(--border);
}
.more h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--s-5);
}
.more h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: var(--s-3);
  background: var(--accent);
}

.more-list {
  list-style: none;
  border-top: var(--border);
}
.more-list li { border-bottom: var(--border); }
.more-list a {
  display: grid;
  gap: var(--s-1) var(--s-5);
  padding: var(--s-4) var(--s-2);
  margin: 0 calc(var(--s-2) * -1);
  color: var(--text);
  text-decoration: none;
  border-radius: var(--r);
  transition: background-color var(--ease);
}
.more-list a:visited { color: var(--text); }
.more-list a:hover { background: var(--surface-2); color: var(--text); }
.more-list a:hover .more-name { color: var(--accent); }

.more-topic {
  justify-self: start;
  font-family: var(--f-head);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.more-topic.is-threat { color: var(--threat); }
.more-name {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--text-strong);
  transition: color var(--ease);
  overflow-wrap: anywhere;
}
.more-desc { color: var(--muted); font-size: 0.95em; line-height: 1.6; }

/* ---------- Підвал ---------- */
.foot {
  background: #0e1013;
  color: var(--muted);
  font-family: var(--f-head);
  font-size: var(--fs-small);
  border-top: var(--border);
}
.foot-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-top: var(--s-6);
  padding-bottom: var(--s-6);
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-1) var(--s-4);
}
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text);
  text-decoration: none;
}
.foot a:visited { color: var(--text); }
.foot a:hover { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-line); }
.foot .dmca, .dmca {
  min-height: 32px;
  padding: 2px var(--s-3);
  font-size: var(--fs-xs);
  border: var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--muted);
}

/* ==========================================================================
   Брейкпоінти
   ========================================================================== */

@media (min-width: 480px) {
  :root { --gutter: 20px; }

  .post-head h1 { font-size: 1.5rem; }
  .post { padding: var(--s-6) var(--s-5); }
  .summary { padding: var(--s-4) var(--s-5); }
}

@media (min-width: 768px) {
  :root {
    --gutter: var(--s-6);
    --fs-body: 1.0625rem;
  }

  html { scroll-padding-top: 88px; }

  .topbar {
    position: sticky;
    top: 0;
  }
  @supports (backdrop-filter: blur(6px)) {
    .topbar { background: rgba(24, 27, 32, 0.9); backdrop-filter: blur(6px); }
  }

  .topbar-row {
    flex-wrap: nowrap;
    gap: var(--s-5);
    min-height: 68px;
    padding-top: 0;
  }
  .brand { margin-right: 0; font-size: 1.2rem; }
  .menu {
    order: 0;
    width: auto;
    margin: 0 auto 0 0;
    padding: 0;
    border-top: 0;
    overflow: visible;
  }
  .menu a { min-height: 68px; border-radius: 0; }
  .menu a:hover { background: transparent; box-shadow: inset 0 -2px 0 var(--line-strong); }
  .menu a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

  .crumbs { margin-top: var(--s-7); }
  .post-head h1 { font-size: 1.6875rem; }
  .post-info { margin-bottom: var(--s-7); }

  .post { padding: var(--s-7) var(--s-7); }
  .post h2 { font-size: 1.375rem; }
  .post h3 { font-size: 1.125rem; }

  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  pre { padding: var(--s-5); }

  .more { padding: var(--s-8) 0; }
  .more h2 { font-size: 1.375rem; }
  .more-list a {
    grid-template-columns: 120px minmax(0, 220px) minmax(0, 1fr);
    align-items: baseline;
    padding: var(--s-5) var(--s-3);
    margin: 0 calc(var(--s-3) * -1);
  }

  .foot-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  :root { --fs-body: 1.125rem; }

  .post-head h1 { font-size: 1.875rem; line-height: 1.28; }

  .post-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: var(--s-7);
    align-items: start;
  }
  .toc {
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: transparent;
    border: 0;
    border-left: var(--border);
    border-radius: 0;
    padding: 0 0 0 var(--s-4);
  }
  .toc a { min-height: 0; }

  .post h2 { font-size: 1.5rem; }
  .post h3 { font-size: 1.1875rem; }
}

@media (min-width: 1280px) {
  .post-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: var(--s-8);
  }
  .post { padding: var(--s-8) var(--s-8); }
}

/* ---------- Доступність ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .post h2::before, .more h2::after, hr::after { display: none; }
  :focus-visible { outline: 2px solid CanvasText; }
}

@media print {
  body { background: #fff; color: #111; }
  .topbar, .toc, .more, .foot, .skip { display: none; }
  .post { border: 0; background: none; padding: 0; }
  a { color: #111; }
}