/*
Theme Name: Laparatoria
Theme URI: https://lapalaba.com
Author: Laparatoria Team
Description: Кастомная тема Лапаратории — образование для зоозащиты. Чистая типографика, воздух, плавные анимации.
Version: 1.8.1
Requires at least: 6.0
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: laparatoria
*/

/* ═══ Tokens ═══ */
:root {
  --bg: #F7F6F8;
  --bg-soft: #EFEDF3;
  --ink: #141018;
  --ink-soft: #4A4055;
  --ink-faint: #8B8494;
  --lavender: #7B6FA0;
  --lavender-soft: #E8E3F2;
  --teal: #00736A;
  --teal-soft: #C8EDE6;
  --white: #FFFFFF;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Dela Gothic One', sans-serif;
  --font-mono: 'LXGW WenKai Mono TC', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;
  --container: 1160px;
  --transition: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══ Reset ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: transparent;
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ═══ Texture — задний слой за контентом ═══ */
body {
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-color: var(--bg);
  background-image: url('assets/img/texture.webp');
  background-size: 800px auto;
  background-repeat: repeat;
  background-blend-mode: multiply;
  opacity: 0.2;
}

/* ═══ Layout ═══ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══ Typography ═══ */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--lavender);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--lavender);
}

/* ═══ Header ═══ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 248, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(20, 16, 24, 0.07);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lavender), var(--teal));
}
.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
}
.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  transition: color 0.25s;
}
.site-nav a:hover { color: var(--ink); }
.header-cta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--ink);
  color: var(--bg);
  padding: 9px 20px;
  border-radius: 100px;
  border: none;
  transition: transform 0.3s var(--transition), background 0.25s;
}
.header-cta:hover {
  background: var(--lavender);
  transform: translateY(-1px);
}
.nav-toggle { display: none; }

/* ═══ Ticker ═══ */
.ticker {
  background: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
}
.ticker-track {
  display: inline-flex;
  gap: 48px;
  animation: ticker 28s linear infinite;
}
.ticker span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--bg);
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.ticker span::after {
  content: '✦';
  color: var(--lavender);
  font-size: 0.7rem;
}
.ticker .ticker-dog {
  height: 34px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin: -10px 0;
}
.ticker span.has-dog::after { content: none; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ═══ Hero ═══ */
.hero {
  position: relative;
  padding: 28px 0 36px;
  overflow: hidden;
}
.hero-aura {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  pointer-events: none;
  opacity: 0.22;
  animation: aura-breathe 12s ease-in-out infinite alternate;
}
.aura-1 {
  right: 0;
  background: radial-gradient(ellipse 70% 90% at right center, var(--lavender), transparent 70%);
}
.aura-2 {
  left: 0;
  background: radial-gradient(ellipse 70% 90% at left center, var(--teal), transparent 70%);
  animation-delay: -6s;
}
@keyframes aura-breathe {
  from { opacity: 0.16; }
  to { opacity: 0.28; }
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: center;
}
.hero-content {
  position: relative;
  max-width: 760px;
}
.hero-book {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-book img {
  max-width: 280px;
  filter: drop-shadow(0 10px 24px rgba(20, 16, 24, 0.12));
  animation: book-float 5s ease-in-out infinite alternate;
}
@keyframes book-float {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-10px) rotate(2deg); }
}
.hero .label { margin-bottom: 28px; }
.hero h1 { margin-bottom: 24px; }
.hero h1 .accent-lav { color: var(--lavender); }
.hero h1 .accent-teal {
  background: linear-gradient(120deg, var(--teal), var(--lavender));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ═══ Buttons ═══ */
.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 14px 28px;
  border-radius: 100px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.35s var(--transition), box-shadow 0.35s var(--transition), background 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--lavender);
  box-shadow: 0 12px 32px rgba(123, 111, 160, 0.35);
}
.btn-accent {
  background: var(--teal);
  color: var(--white);
}
.btn-accent:hover { box-shadow: 0 12px 32px rgba(0, 115, 106, 0.3); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(20, 16, 24, 0.2);
}
.btn-ghost:hover { border-color: var(--ink); }

/* ═══ Sections ═══ */
.section { padding: 44px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head h2 { max-width: 560px; }
.section-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal);
  border-bottom: 1.5px solid var(--teal-soft);
  padding-bottom: 3px;
  transition: border-color 0.25s;
  white-space: nowrap;
}
.section-link:hover { border-color: var(--teal); }

/* ═══ Values (стикеры) ═══ */
.section-values { padding: 24px 0 44px; }
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.value-card.sticker {
  aspect-ratio: 1 / 1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 8px 20px rgba(20, 16, 24, 0.18));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 18%;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: transform 0.35s var(--transition), filter 0.35s var(--transition);
}
.value-card.sticker:active { cursor: grabbing; }
.value-card.sticker:nth-child(odd) { transform: rotate(-2deg); }
.value-card.sticker:nth-child(even) { transform: rotate(1.6deg); }
.value-card.sticker:hover {
  filter: drop-shadow(0 14px 30px rgba(20, 16, 24, 0.26));
}
.value-card.sticker.dragging {
  transition: none;
  filter: drop-shadow(0 20px 40px rgba(20, 16, 24, 0.3));
  z-index: 50;
}
.value-card.sticker:nth-child(1) { background-image: url('assets/img/sticker-2.webp'); }
.value-card.sticker:nth-child(2) { background-image: url('assets/img/sticker-4.webp'); }
.value-card.sticker:nth-child(3) { background-image: url('assets/img/sticker-1.webp'); }
.value-card.sticker:nth-child(4) { background-image: url('assets/img/sticker-3.webp'); }
.value-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.value-card p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ═══ Paw trail ═══ */
.paw-print {
  position: fixed;
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.55;
  animation: paw-fade 1.4s ease-out forwards;
}
@keyframes paw-fade {
  0% { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .paw-print { display: none; }
}

/* ═══ Courses ═══ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.courses-cta {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}
.course-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 26px;
  border: 1px solid rgba(20, 16, 24, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 210px;
  transition: transform 0.4s var(--transition), box-shadow 0.4s var(--transition);
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(20, 16, 24, 0.08);
}
.course-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 100px;
  width: fit-content;
}
.badge-free { background: var(--teal-soft); color: var(--teal); }
.badge-paid { background: var(--lavender-soft); color: var(--lavender); }
.badge-soon { background: var(--bg-soft); color: var(--ink-faint); }
.course-card h3 { font-size: 1.05rem; line-height: 1.3; }
.course-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: auto;
}

/* ═══ Club band ═══ */
.club {
  position: relative;
  background: var(--ink);
  border-radius: 28px;
  padding: 64px 56px;
  overflow: hidden;
  color: var(--bg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.club-aura {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  pointer-events: none;
}
.club-aura-1 { background: var(--lavender); top: -160px; right: -80px; }
.club-aura-2 { background: var(--teal); bottom: -180px; left: 10%; }
.club-content { position: relative; }
.club h2 { color: var(--bg); margin-bottom: 14px; }
.club h2 em { font-style: normal; color: var(--lavender); }
.club p {
  color: rgba(247, 246, 248, 0.65);
  max-width: 440px;
  margin-bottom: 24px;
}
.club-perks { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.club-perks li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(247, 246, 248, 0.85);
  display: flex;
  align-items: center;
  gap: 10px;
}
.club-perks li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}
.club .btn { position: relative; }

/* ═══ Experts ═══ */
.experts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.expert-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 20px;
  border: 1px solid rgba(20, 16, 24, 0.06);
  text-align: left;
  transition: transform 0.4s var(--transition), box-shadow 0.4s var(--transition);
}
.expert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(20, 16, 24, 0.08);
}
.expert-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lavender-soft), var(--teal-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--lavender);
  margin-bottom: 14px;
}
.expert-card h3 { font-size: 1rem; margin-bottom: 6px; }
.expert-role {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 100px;
  display: inline-block;
  margin: 0 3px 5px 0;
  white-space: nowrap;
}
.expert-card p {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ═══ Knowledge ═══ */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.knowledge-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 26px;
  border: 1px solid rgba(20, 16, 24, 0.06);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform 0.4s var(--transition), box-shadow 0.4s var(--transition);
}
.knowledge-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(20, 16, 24, 0.08);
}
.knowledge-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.knowledge-card h3 { font-size: 0.98rem; margin-bottom: 3px; }
.knowledge-card p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ═══ Footer ═══ */
.site-footer {
  border-top: 1px solid rgba(20, 16, 24, 0.08);
  padding: 32px 0;
  margin-top: 20px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 22px; list-style: none; }
.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
  transition: color 0.25s;
}
.footer-nav a:hover { color: var(--ink); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ═══ Scroll reveal ═══ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .hero-aura { animation: none; }
}

/* ═══ Content pages (default) ═══ */
.page-content {
  padding: 80px 0;
  max-width: 760px;
  margin: 0 auto;
}
.page-content h1 { margin-bottom: 32px; }
.page-content p { margin-bottom: 20px; color: var(--ink-soft); }

/* ═══ Responsive ═══ */
@media (max-width: 980px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .experts-grid { grid-template-columns: repeat(3, 1fr); }
  .club { grid-template-columns: 1fr; padding: 48px 36px; }
}
@media (max-width: 680px) {
  .section { padding: 32px 0; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-book { display: none; }
  .site-nav { display: none; }
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--ink);
  }
  .site-nav.open {
    display: block;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid rgba(20, 16, 24, 0.08);
    padding: 20px 24px;
  }
  .site-nav.open ul { flex-direction: column; gap: 16px; }
  .values-grid, .courses-grid, .knowledge-grid { grid-template-columns: 1fr; }
  .experts-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 24px 0 32px; }
  .section-head { flex-direction: column; align-items: flex-start; }
}


/* ═══ Hero grid + book ═══ */
.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-art img {
  max-width: 320px;
  margin: 0 auto;
  mix-blend-mode: multiply;
  animation: book-float 6s ease-in-out infinite;
}
@keyframes book-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

/* ═══ Ticker dog ═══ */
.ticker-dog {
  height: 22px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin: 0 8px;
  opacity: 0.2;
}
.ticker-track { align-items: center; }

/* ═══════════════════════════════════════════
   БИБЛИОТЕКА
   ═══════════════════════════════════════════ */

/* — Стартовая — */
.library-search {
  display: flex;
  gap: 10px;
}
.library-search input[type="search"] {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 12px 18px;
  border: 1.5px solid rgba(20, 16, 24, 0.15);
  border-radius: 100px;
  background: var(--white);
  min-width: 260px;
  outline: none;
  transition: border-color 0.25s;
}
.library-search input[type="search"]:focus { border-color: var(--lavender); }

.library-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.library-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 4px 14px;
  border-radius: 100px;
  transition: background 0.2s, color 0.2s;
}
.library-tag:hover { background: var(--teal); color: var(--white); }

.library-folders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.library-folder {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(20, 16, 24, 0.06);
  overflow: hidden;
  transition: transform 0.4s var(--transition), box-shadow 0.4s var(--transition);
}
.library-folder:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(20, 16, 24, 0.1);
}
.folder-cover {
  height: 130px;
  background-size: cover;
  background-position: center;
}
.folder-cover-plain {
  background: linear-gradient(120deg, var(--lavender-soft), var(--teal-soft));
}
.folder-body { padding: 20px 22px 24px; }
.folder-icon { font-size: 1.8rem; margin-top: -38px; margin-bottom: 8px; filter: drop-shadow(0 2px 6px rgba(20,16,24,0.2)); }
.folder-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.folder-body p { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 10px; }
.folder-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

/* — Раскладка документа — */
.library-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 100px);
}
.library-sidebar {
  border-right: 1px solid rgba(20, 16, 24, 0.08);
  padding: 28px 20px;
  background: rgba(255, 255, 255, 0.5);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.sidebar-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 7px 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  display: block;
}
.sidebar-link:hover { background: var(--bg-soft); color: var(--ink); }
.sidebar-favs summary { list-style: none; }
.sidebar-favs summary::-webkit-details-marker { display: none; }

.sidebar-search input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 9px 14px;
  border: 1.5px solid rgba(20, 16, 24, 0.12);
  border-radius: 10px;
  background: var(--white);
  outline: none;
  margin-bottom: 22px;
}
.sidebar-search input:focus { border-color: var(--lavender); }

.sidebar-tree-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 8px;
  padding: 0 10px;
}
.lapa-tree { list-style: none; padding-left: 0; }
.lapa-tree .lapa-tree { padding-left: 16px; }
.lapa-tree li { margin: 1px 0; }
.lapa-tree a {
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 5px 10px;
  border-radius: 7px;
  display: block;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}
.lapa-tree a:hover { background: var(--bg-soft); color: var(--ink); }
.lapa-tree li.current > a {
  background: var(--lavender-soft);
  color: var(--lavender);
  font-weight: 500;
}
.tree-icon { font-size: 0.9rem; margin-right: 2px; }
.tree-lock { font-size: 0.7rem; opacity: 0.7; }

/* — Контент документа — */
.library-main { min-width: 0; }
.doc-cover {
  height: 220px;
  background-size: cover;
  background-position: center;
}
.doc-content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 32px 80px;
}
.lapa-crumbs {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-bottom: 22px;
}
.lapa-crumbs a { color: var(--ink-faint); transition: color 0.2s; }
.lapa-crumbs a:hover { color: var(--lavender); }
.crumb-sep { margin: 0 4px; opacity: 0.5; }

.doc-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.doc-title { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.doc-icon { margin-right: 6px; }
.lapa-fav-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--ink-faint);
  transition: color 0.2s, transform 0.2s;
  line-height: 1;
  padding: 6px;
}
.lapa-fav-btn:hover { transform: scale(1.15); }
.lapa-fav-btn.is-fav { color: #E5A50A; }

.doc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }

.doc-content { line-height: 1.75; color: var(--ink-soft); }
.doc-content h2, .doc-content h3 { color: var(--ink); margin: 32px 0 14px; }
.doc-content p { margin-bottom: 16px; }
.doc-content ul, .doc-content ol { margin: 0 0 16px 24px; }
.doc-content li { margin-bottom: 6px; }
.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}
.doc-content table td, .doc-content table th {
  border: 1px solid rgba(20, 16, 24, 0.12);
  padding: 10px 14px;
}
.doc-content table th { background: var(--bg-soft); font-weight: 600; }
.doc-content blockquote {
  border-left: 3px solid var(--lavender);
  padding-left: 18px;
  margin: 20px 0;
  color: var(--ink-soft);
  font-style: italic;
}
.doc-content img { border-radius: var(--radius-sm); }

/* — Замок — */
.lapa-lock {
  text-align: center;
  background: var(--white);
  border: 1.5px dashed var(--lavender);
  border-radius: var(--radius);
  padding: 40px 32px;
  margin: 32px 0;
}
.lapa-lock-icon { font-size: 2rem; margin-bottom: 10px; }
.lapa-lock h3 { margin-bottom: 8px; }
.lapa-lock p { margin-bottom: 20px; color: var(--ink-soft); }

/* — Дочерние карточки — */
.doc-children { margin-top: 48px; }
.doc-children h2 { font-size: 1.3rem; margin-bottom: 18px; }
.doc-children-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.doc-child-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid rgba(20, 16, 24, 0.08);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  transition: transform 0.25s var(--transition), box-shadow 0.25s var(--transition);
}
.doc-child-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 16, 24, 0.08);
}
.child-icon { font-size: 1.2rem; }
.child-title { font-size: 0.9rem; font-weight: 500; }

/* — Мобильная библиотека — */
@media (max-width: 860px) {
  .library-layout { grid-template-columns: 1fr; }
  .library-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(20, 16, 24, 0.08);
  }
  .library-folders { grid-template-columns: 1fr; }
  .doc-children-grid { grid-template-columns: 1fr; }
  .library-search { flex-direction: column; }
  .library-search input[type="search"] { min-width: 0; width: 100%; }
}

/* — Кнопки редактора для авторов — */
.lapa-editor-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.btn-sm {
  padding: 8px 16px !important;
  font-size: 0.78rem !important;
}
