/* ══════════════════════════════════════════════════════════════════════
   Спільні стилі для довгого контенту: правила, документація
   ══════════════════════════════════════════════════════════════════════ */

.content-wrap { padding: 56px 0 120px; }

.content-header { max-width: 780px; margin: 0 auto 40px; text-align: center; }
.content-header h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 12px; letter-spacing: -0.03em; font-weight: 800;
}
.content-header .meta {
  color: var(--text-dim); font-size: 13px;
  font-family: var(--font-mono);
}

.prose {
  max-width: 780px; margin: 0 auto;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 24px; margin: 52px 0 16px;
  letter-spacing: -0.025em; font-weight: 800;
  scroll-margin-top: 100px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--font-display);
  font-size: 17.5px; margin: 30px 0 12px;
  letter-spacing: -0.02em; font-weight: 700;
  scroll-margin-top: 100px;
}
.prose p { color: var(--text-mute); font-size: 15.5px; margin: 0 0 16px; line-height: 1.65; }
.prose ul, .prose ol { color: var(--text-mute); font-size: 15.5px; margin: 0 0 16px; padding-left: 24px; line-height: 1.65; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-style: dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-style: solid; }
.prose code {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 7px;
  font-size: 13px; font-family: var(--font-mono);
}
.prose .callout {
  border-radius: var(--r-md); border: 1px solid var(--border-hi);
  background: var(--bg-card);
  padding: 18px 20px; margin: 22px 0;
  font-size: 14.5px; color: var(--text-mute);
  line-height: 1.6;
}
.prose .callout.warn { border-color: rgba(245,179,66,.35); background: rgba(245,179,66,.07); }
.prose .callout.info { border-color: rgba(79,124,255,.32); background: rgba(79,124,255,.06); }
.prose .callout strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 14.5px; }

/* ── Документація: макет ─────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr 210px;
  gap: 48px; align-items: start;
}
.docs-search { margin-bottom: 24px; position: relative; }
.docs-search input {
  width: 100%; font: inherit; font-size: 14px;
  padding: 11px 14px 11px 40px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 11px; color: var(--text);
  transition: border-color .18s, box-shadow .18s;
}
.docs-search input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.18);
}
.docs-search .search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none;
}

.side-nav {
  position: sticky; top: 90px;
  display: flex; flex-direction: column; gap: 2px;
}
.side-nav .group-title {
  font-size: 10.5px; font-weight: 700;
  color: var(--text-dim); margin: 20px 0 6px; padding: 0 14px;
  letter-spacing: 1.4px; text-transform: uppercase;
  font-family: var(--font-mono);
}
.side-nav .group-title:first-child { margin-top: 0; }
.side-nav a {
  text-decoration: none; color: var(--text-mute);
  font-size: 14px; font-weight: 600;
  padding: 9px 14px; border-radius: 10px;
}
.side-nav a:hover { background: var(--hover); color: var(--text); }
.side-nav a.active {
  background: rgba(var(--accent-rgb), .12);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.toc { position: sticky; top: 90px; font-size: 13px; }
.toc .toc-title {
  font-weight: 700; color: var(--text-dim);
  margin-bottom: 12px; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 1.4px;
  font-family: var(--font-mono);
}
.toc a {
  display: block; text-decoration: none;
  color: var(--text-dim); padding: 6px 0;
  border-left: 2px solid transparent; padding-left: 12px;
}
.toc a:hover { color: var(--text); }
.toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

.docs-feedback {
  margin-top: 60px; padding: 24px;
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--bg-card); text-align: center;
}
.docs-feedback .row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.docs-feedback .thanks {
  display: none; color: var(--green);
  font-weight: 700; font-size: 14px; margin-top: 12px;
}
.docs-feedback .thanks.show { display: block; }
.docs-feedback .buttons.hidden { display: none; }

.kbd-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; margin: 18px 0 26px;
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.kbd-table th, .kbd-table td {
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.kbd-table th {
  color: var(--text-dim);
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  background: var(--bg-input);
  font-family: var(--font-mono);
}
.kbd-table td { color: var(--text-mute); }
.kbd-table tr:last-child td { border-bottom: none; }

/* ── Changelog entries ──────────────────────────────────────────── */
.changelog-entry {
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  padding: 22px 24px; margin: 18px 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.changelog-entry:first-of-type { border-left-color: var(--accent); }
.changelog-entry:not(:first-of-type) { border-left-color: var(--border-hi); }
.changelog-entry .v {
  font-family: var(--font-mono);
  font-weight: 700; color: var(--accent);
  font-size: 15px;
}
.changelog-entry .d { color: var(--text-dim); font-size: 12.5px; margin-left: 12px; }
.changelog-entry ul { margin-top: 12px; }

@media (max-width: 1024px) {
  .docs-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .side-nav .group-title { display: none; }
  .side-nav a { box-shadow: none; padding: 8px 12px; }
  .side-nav a.active { box-shadow: inset 0 -3px 0 var(--accent); }
  .toc { display: none; }
}
