/* ============================================
   Википедия-стиль — Московский центр научной психологии и EMDR
   ============================================ */

:root {
  --wiki-bg: #f6f6f6;
  --wiki-white: #ffffff;
  --wiki-border: #a2a9b1;
  --wiki-link: #0645ad;
  --wiki-link-visited: #0b0080;
  --wiki-link-red: #ba0000;
  --wiki-text: #202122;
  --wiki-light-bg: #f8f9fa;
  --wiki-infobox-bg: #f8f9fa;
  --wiki-heading-border: #a2a9b1;
  --wiki-accent: #cee0f2;
  --wiki-table-header: #eaecf0;
  --wiki-green: #2B7A78;
  --wiki-green-dark: #1F5F5D;
}

body {
  background: var(--wiki-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Liberation Sans', 'Helvetica Neue', sans-serif;
  color: var(--wiki-text);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ===== WIKI PAGE WRAPPER ===== */
.wiki-page {
  background: var(--wiki-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  min-height: 100vh;
}

@media (min-width: 1200px) {
  .wiki-page {
    max-width: 1100px;
    margin: 0 auto;
  }
}

.wiki-content {
  padding: 1.5rem 2rem 3rem;
  max-width: 960px;
  margin: 0 auto;
}

/* ===== WIKI TABS ===== */
.wiki-tabs {
  display: flex;
  gap: 0;
  font-size: 0.8rem;
  padding: 0 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid var(--wiki-border);
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.wiki-tab {
  padding: 0.5rem 1rem;
  color: var(--wiki-link);
  white-space: nowrap;
  cursor: default;
  position: relative;
  bottom: -1px;
  text-decoration: none;
  flex-shrink: 0;
}

.wiki-tab.active {
  background: #fff;
  border: 1px solid var(--wiki-border);
  border-bottom: 1px solid #fff;
  color: #000;
  font-weight: 700;
}

.wiki-tab:not(.active) {
  background: #eaecf0;
  border: 1px solid var(--wiki-border);
  border-bottom: 1px solid var(--wiki-border);
}

/* ===== WIKI HEADINGS ===== */
.wiki-content h1 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.8rem;
  font-weight: 400;
  border-bottom: 1px solid var(--wiki-heading-border);
  padding-bottom: 0.3rem;
  margin: 0 0 1rem;
  color: #000;
  line-height: 1.3;
}

.wiki-content h2 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.5rem;
  font-weight: 400;
  border-bottom: 1px solid var(--wiki-heading-border);
  padding-bottom: 0.17rem;
  margin: 1.8rem 0 0.75rem;
  color: #000;
}

.wiki-content h3 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.4rem 0 0.5rem;
  color: #000;
}

.wiki-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.2rem 0 0.4rem;
}

.wiki-content p {
  margin: 0.5rem 0 1rem;
  font-size: 0.9375rem;
}

.wiki-content ul, .wiki-content ol {
  margin: 0.3rem 0 1rem 1.6rem;
  padding: 0;
  font-size: 0.9375rem;
}

.wiki-content li {
  margin-bottom: 0.25rem;
}

.wiki-content a {
  color: var(--wiki-link);
  text-decoration: none;
}
.wiki-content a:hover {
  text-decoration: underline;
}
.wiki-content a:visited {
  color: var(--wiki-link-visited);
}

/* ===== HATNOTE ===== */
.wiki-hatnote {
  font-style: italic;
  padding: 0.3rem 1.5rem;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.3rem;
}

/* ===== INFOBOX ===== */
.wiki-infobox {
  float: right;
  width: 270px;
  background: var(--wiki-infobox-bg);
  border: 1px solid var(--wiki-border);
  padding: 0.5em;
  margin: 0.5rem 0 1.5rem 1.5rem;
  font-size: 0.8rem;
  line-height: 1.5;
  clear: right;
}

.wiki-infobox .infobox-title {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  padding: 0.3em 0;
  background: var(--wiki-accent);
  margin: -0.5em -0.5em 0.5em;
}

.wiki-infobox .infobox-image {
  text-align: center;
  padding: 0.5em 0;
}

.wiki-infobox .infobox-image img {
  max-width: 100%;
  height: auto;
}

.wiki-infobox table {
  width: 100%;
}

.wiki-infobox th {
  text-align: left;
  vertical-align: top;
  padding: 0.2em 0.4em;
  font-weight: 400;
  color: #555;
  width: 40%;
  white-space: nowrap;
}

.wiki-infobox td {
  vertical-align: top;
  padding: 0.2em 0.4em;
}

/* ===== TABLE OF CONTENTS ===== */
.wiki-toc {
  background: var(--wiki-light-bg);
  border: 1px solid var(--wiki-border);
  font-size: 0.85rem;
  padding: 0.5em 1em;
  margin: 1rem 0 1.5rem;
  display: inline-block;
  min-width: 280px;
}

.wiki-toc .toc-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.3em;
}

.wiki-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wiki-toc > ul {
  margin-left: 0;
}

.wiki-toc ul ul {
  margin-left: 1.5em;
}

.wiki-toc .toc-number {
  color: #555;
}

/* ===== QUOTE BOX ===== */
.wiki-quote {
  background: var(--wiki-light-bg);
  border-left: 4px solid var(--wiki-accent);
  padding: 0.75rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

/* ===== WIKI TABLE ===== */
.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.wiki-table th {
  background: var(--wiki-table-header);
  text-align: left;
  padding: 0.4em 0.6em;
  border: 1px solid var(--wiki-border);
  font-weight: 700;
}

.wiki-table td {
  padding: 0.4em 0.6em;
  border: 1px solid var(--wiki-border);
  vertical-align: top;
}

.wiki-table tr:nth-child(even) td {
  background: #f8f9fa;
}

/* ===== REFERENCES ===== */
.wiki-references {
  font-size: 0.85rem;
  column-count: 2;
  column-gap: 2rem;
}

.wiki-references ol {
  margin: 0.3rem 0 1rem 1.6rem !important;
}

.wiki-references li {
  margin-bottom: 0.4rem;
}

/* ===== NAVBOX ===== */
.wiki-navbox {
  border: 1px solid var(--wiki-border);
  font-size: 0.85rem;
  margin: 2rem 0 1rem;
  clear: both;
}

.wiki-navbox .navbox-title {
  background: var(--wiki-accent);
  text-align: center;
  padding: 0.3rem;
  font-weight: 700;
}

.wiki-navbox .navbox-body {
  padding: 0.5rem 1rem;
}

/* ===== CATEGORIES ===== */
.wiki-categories {
  background: var(--wiki-light-bg);
  border: 1px solid var(--wiki-border);
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

/* ===== AMBASSADOR BOX ===== */
.wiki-ambox {
  display: flex;
  background: #fef6e7;
  border: 1px solid #fc3;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.875rem;
  align-items: flex-start;
  gap: 0.5rem;
}

.wiki-ambox.ambox-green {
  background: #f0faf0;
  border-color: #a3d3a3;
}

/* ===== SIDEBAR NAV ===== */
.wiki-sidebar {
  float: left;
  width: 170px;
  font-size: 0.8rem;
  padding: 1rem 0.75rem;
  margin-right: 2rem;
  display: none;
}

@media (min-width: 992px) {
  .wiki-sidebar {
    display: block;
  }
}

.wiki-sidebar .sidebar-logo {
  text-align: center;
  margin-bottom: 1rem;
}

.wiki-sidebar .sidebar-logo img {
  max-width: 135px;
}

.wiki-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wiki-sidebar li {
  padding: 0.3rem 0;
}

.wiki-sidebar a {
  color: var(--wiki-link);
  text-decoration: none;
}

.wiki-sidebar a:hover {
  text-decoration: underline;
}

.wiki-sidebar .sidebar-section {
  font-weight: 700;
  color: #555;
  margin-top: 0.8rem;
  padding-top: 0.5rem;
  border-top: 1px solid #ddd;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== MAIN WITH SIDEBAR ===== */
.wiki-main {
  overflow: hidden;
}

/* ===== WIKI BUTTONS ===== */
.wiki-btn {
  display: inline-block;
  background: #f8f9fa;
  border: 1px solid var(--wiki-border);
  color: var(--wiki-link);
  font-weight: 700;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s;
}
.wiki-btn:hover {
  background: #fff;
  text-decoration: none;
  color: var(--wiki-link);
}

.wiki-btn-primary {
  background: var(--wiki-green);
  border-color: var(--wiki-green-dark);
  color: #fff;
}
.wiki-btn-primary:hover {
  background: var(--wiki-green-dark);
  color: #fff;
}

/* ===== WIKI FORM ===== */
.wiki-form .form-control {
  border: 1px solid var(--wiki-border);
  border-radius: 2px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background: #fff;
  transition: border-color 0.15s;
}
.wiki-form .form-control:focus {
  border-color: #36c;
  box-shadow: 0 0 0 1px #36c;
  outline: none;
}
.wiki-form label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #000;
  margin-bottom: 0.25rem;
}

/* ===== WIKI FOOTER ===== */
.wiki-footer {
  border-top: 1px solid var(--wiki-border);
  padding: 1.5rem 2rem;
  font-size: 0.75rem;
  color: #555;
  max-width: 960px;
  margin: 0 auto;
}

.wiki-footer a {
  color: var(--wiki-link);
}

.wiki-footer ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.wiki-footer li {
  margin-bottom: 0.25rem;
}

/* ===== TOAST ===== */
.custom-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #202122;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  animation: slideUp 0.4s ease, fadeOut 0.4s ease 3.5s forwards;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .wiki-infobox {
    float: none;
    width: 100%;
    margin: 1rem 0;
  }

  .wiki-references {
    column-count: 1;
  }

  .wiki-content {
    padding: 1rem;
  }

  .wiki-footer ul {
    flex-direction: column;
    gap: 0.25rem;
  }
}

html { scroll-behavior: smooth; }
/* ============================================
   ТЕМА «ЭНЦИКЛОПЕДИЯ» — Центр научной психологии и EMDR
   Поверх вики-базы: тёплый научный стиль
   ============================================ */

:root {
  --encyclopedia-bg: #faf8f5;
  --encyclopedia-white: #fffefb;
  --encyclopedia-accent: #1a5c5a;
  --encyclopedia-accent-light: #e8f4f3;
  --encyclopedia-link: #1a6b68;
  --encyclopedia-link-hover: #0f4543;
  --encyclopedia-heading: #1e3332;
  --encyclopedia-border: #d8d3cb;
  --encyclopedia-toc-bg: #f5f2ec;
  --encyclopedia-ambox-bg: #fef9f0;
  --encyclopedia-ambox-border: #e8c876;
  --encyclopedia-ambox-green-bg: #f2f8f6;
  --encyclopedia-ambox-green-border: #8cc9b8;
  --encyclopedia-navbox-title: #dce8e7;
  --encyclopedia-infobox-title: #dce8e7;
  --encyclopedia-table-stripe: #f8f6f2;
  --encyclopedia-footer-text: #6b6560;
}

/* ===== BODY OVERRIDE ===== */
body {
  background: var(--encyclopedia-bg);
  overflow-x: hidden;
}

/* ===== WIKI PAGE — тёплый оттенок + защита от горизонтального скролла ===== */
.wiki-page {
  background: var(--encyclopedia-white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow-x: hidden;
}

/* ===== TABS — энциклопедический стиль ===== */
.wiki-tabs {
  background: #f0ede7;
  border-bottom: 1px solid var(--encyclopedia-border);
  padding: 0 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  overscroll-behavior-x: contain;
}

/* Скрываем полосу прокрутки в WebKit-браузерах, но сохраняем функциональность */
.wiki-tabs::-webkit-scrollbar {
  height: 4px;
}
.wiki-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.wiki-tabs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.wiki-tab {
  padding: 0.5rem 1.2rem;
  font-size: 0.82rem;
  color: #555;
  font-weight: 500;
  letter-spacing: 0.2px;
  flex-shrink: 0;
  white-space: nowrap;
}

.wiki-tab.active {
  background: var(--encyclopedia-white);
  border: 1px solid var(--encyclopedia-border);
  border-bottom: 1px solid var(--encyclopedia-white);
  color: var(--encyclopedia-heading);
  font-weight: 700;
}

.wiki-tab:not(.active) {
  background: #e8e4dc;
  border: 1px solid var(--encyclopedia-border);
  border-bottom: 1px solid var(--encyclopedia-border);
  color: var(--encyclopedia-link);
}
.wiki-tab:not(.active):hover {
  background: #f0ede7;
  text-decoration: none;
  color: var(--encyclopedia-link-hover);
}

/* ===== HEADINGS — Linux Libertine + тёплый оттенок ===== */
.wiki-content h1 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 2rem;
  font-weight: 400;
  border-bottom: 1px solid var(--encyclopedia-border);
  padding-bottom: 0.35rem;
  margin: 0.25rem 0 1rem;
  color: var(--encyclopedia-heading);
  letter-spacing: -0.3px;
}

.wiki-content h2 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.55rem;
  font-weight: 400;
  border-bottom: 1px solid var(--encyclopedia-border);
  padding-bottom: 0.18rem;
  margin: 2rem 0 0.75rem;
  color: var(--encyclopedia-heading);
}

.wiki-content h3 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: var(--encyclopedia-heading);
}

/* ===== LINKS — тёплый бирюзовый ===== */
.wiki-content a {
  color: var(--encyclopedia-link);
}
.wiki-content a:hover {
  color: var(--encyclopedia-link-hover);
}
.wiki-content a:visited {
  color: #4a7c79;
}

/* ===== HATNOTE ===== */
.wiki-hatnote {
  font-style: italic;
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: #777;
  margin-bottom: 0.5rem;
}

/* ===== INFOBOX — энциклопедический ===== */
.wiki-infobox {
  float: right;
  width: 275px;
  background: #fdfcf9;
  border: 1px solid var(--encyclopedia-border);
  padding: 0.5em;
  margin: 0.5rem 0 1.5rem 1.5rem;
  font-size: 0.8rem;
  line-height: 1.5;
  clear: right;
  border-radius: 3px;
}

.wiki-infobox .infobox-title {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  padding: 0.35em 0;
  background: var(--encyclopedia-infobox-title);
  margin: -0.5em -0.5em 0.5em;
  color: var(--encyclopedia-heading);
  letter-spacing: 0.3px;
}

.wiki-infobox .infobox-image {
  text-align: center;
  padding: 0.5em 0;
}

.wiki-infobox .infobox-image img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

.wiki-infobox table {
  width: 100%;
}

.wiki-infobox th {
  text-align: left;
  vertical-align: top;
  padding: 0.2em 0.4em;
  font-weight: 400;
  color: #888;
  width: 40%;
  white-space: nowrap;
}

.wiki-infobox td {
  vertical-align: top;
  padding: 0.2em 0.4em;
  color: #333;
}

/* ===== TOC — тёплый ===== */
.wiki-toc {
  background: var(--encyclopedia-toc-bg);
  border: 1px solid var(--encyclopedia-border);
  font-size: 0.875rem;
  padding: 0.6em 1.2em;
  margin: 1.2rem 0 1.5rem;
  display: inline-block;
  min-width: 280px;
  border-radius: 2px;
}

.wiki-toc .toc-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.4em;
  color: var(--encyclopedia-heading);
  font-size: 0.95rem;
}

/* ===== QUOTE BOX ===== */
.wiki-quote {
  background: var(--encyclopedia-toc-bg);
  border-left: 4px solid var(--encyclopedia-accent);
  padding: 0.85rem 1.35rem;
  margin: 1.2rem 0;
  font-size: 0.9rem;
  border-radius: 0 3px 3px 0;
}

/* ===== WIKI TABLE ===== */
.wiki-table th {
  background: #eeebe4;
  padding: 0.5em 0.7em;
  border: 1px solid var(--encyclopedia-border);
  font-weight: 700;
  color: var(--encyclopedia-heading);
}

.wiki-table td {
  padding: 0.5em 0.7em;
  border: 1px solid var(--encyclopedia-border);
  vertical-align: top;
}

.wiki-table tr:nth-child(even) td {
  background: var(--encyclopedia-table-stripe);
}

/* ===== AMBOX ===== */
.wiki-ambox {
  display: flex;
  background: var(--encyclopedia-ambox-bg);
  border: 1px solid var(--encyclopedia-ambox-border);
  padding: 0.6rem 1.1rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.875rem;
  align-items: flex-start;
  gap: 0.6rem;
  border-radius: 3px;
}

.wiki-ambox.ambox-green {
  background: var(--encyclopedia-ambox-green-bg);
  border-color: var(--encyclopedia-ambox-green-border);
}

/* ===== NAVBOX ===== */
.wiki-navbox {
  border: 1px solid var(--encyclopedia-border);
  font-size: 0.85rem;
  margin: 2rem 0 1rem;
  clear: both;
  border-radius: 2px;
}

.wiki-navbox .navbox-title {
  background: var(--encyclopedia-navbox-title);
  text-align: center;
  padding: 0.35rem;
  font-weight: 700;
  color: var(--encyclopedia-heading);
}

/* ===== CATEGORIES ===== */
.wiki-categories {
  background: var(--encyclopedia-toc-bg);
  border: 1px solid var(--encyclopedia-border);
  padding: 0.6rem 1.1rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  border-radius: 2px;
}

/* ===== BUTTONS ===== */
.wiki-btn {
  display: inline-block;
  background: #f5f2ec;
  border: 1px solid var(--encyclopedia-border);
  color: var(--encyclopedia-link);
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.15s;
  border-radius: 3px;
}
.wiki-btn:hover {
  background: #fff;
  text-decoration: none;
  color: var(--encyclopedia-link-hover);
  border-color: var(--encyclopedia-accent);
}

.wiki-btn-primary {
  background: var(--encyclopedia-accent);
  border-color: var(--encyclopedia-accent);
  color: #fff;
}
.wiki-btn-primary:hover {
  background: #144e4c;
  color: #fff;
}

/* ===== FORM ===== */
.wiki-form .form-control {
  border: 1px solid var(--encyclopedia-border);
  border-radius: 3px;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  background: #fffefb;
  transition: border-color 0.15s;
}
.wiki-form .form-control:focus {
  border-color: var(--encyclopedia-accent);
  box-shadow: 0 0 0 2px rgba(26,92,90,0.1);
  outline: none;
}
.wiki-form label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--encyclopedia-heading);
  margin-bottom: 0.3rem;
}

/* ===== FOOTER ===== */
.wiki-footer {
  border-top: 1px solid var(--encyclopedia-border);
  padding: 1.5rem 2rem;
  font-size: 0.78rem;
  color: var(--encyclopedia-footer-text);
  max-width: 960px;
  margin: 0 auto;
}

.wiki-footer a {
  color: var(--encyclopedia-link);
}

/* ===== TOAST ===== */
.custom-toast {
  background: var(--encyclopedia-heading);
  border-radius: 4px;
}

/* ===== АРИФМЕТИЧЕСКАЯ КАПЧА ===== */
.captcha-group {
  margin-bottom: 1rem;
}
.captcha-group label {
  display: block;
  margin-bottom: 0.35rem;
}
.captcha-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.captcha-input {
  max-width: 180px;
  flex: 1;
}
.captcha-input::-webkit-inner-spin-button,
.captcha-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.captcha-input {
  -moz-appearance: textfield;
}
.captcha-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--encyclopedia-border);
  border-radius: 6px;
  background: #fff;
  color: var(--encyclopedia-link);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.captcha-refresh:hover {
  background: #f0f7ff;
  border-color: var(--encyclopedia-accent);
}
.captcha-error {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .wiki-infobox {
    float: none;
    width: 100%;
    margin: 1rem 0;
  }
  .wiki-references {
    column-count: 1;
  }
  .wiki-content {
    padding: 1rem;
  }
  .wiki-footer ul {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (min-width: 1200px) {
  .wiki-page {
    max-width: 1120px;
    margin: 0 auto;
  }
}

/* ===== ПРИМЕЧАНИЕ О СКРЫТИИ ФАМИЛИИ ===== */
.family-name-note {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ============================================
   СТРАНИЦА «САЙТ ПСИХОЛОГОВ» — psychologists-site.html
   ============================================ */

/* Hero */
.ps-hero {
  background: linear-gradient(135deg, #1a5c5a 0%, #2b8a87 100%);
  color: #fff;
  padding: 3rem 2rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  text-align: center;
}
.ps-hero h1 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 2.2rem;
  font-weight: 400;
  border-bottom: none;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.ps-hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  max-width: 700px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}
.ps-hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.ps-hero-actions .btn-primary {
  background: #fff;
  border-color: #fff;
  color: #1a5c5a;
  font-weight: 700;
  padding: 0.7rem 2rem;
  border-radius: 6px;
}
.ps-hero-actions .btn-primary:hover {
  background: #e8f4f3;
  color: #144e4c;
}
.ps-hero-actions .btn-outline-secondary {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  padding: 0.7rem 2rem;
  border-radius: 6px;
  font-weight: 600;
}
.ps-hero-actions .btn-outline-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
}
.ps-hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}
.ps-stat-item {
  text-align: center;
}
.ps-stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}
.ps-stat-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

/* Ways grid */
.ps-ways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.ps-way-card {
  background: #fdfcf9;
  border: 1px solid #d8d3cb;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.ps-way-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.ps-way-icon {
  width: 48px;
  height: 48px;
  background: #e8f4f3;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #1a5c5a;
}
.ps-way-card h3 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: #1e3332;
}
.ps-way-card p {
  font-size: 0.875rem;
  color: #555;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.ps-way-link {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1a6b68;
  text-decoration: none;
}
.ps-way-link:hover {
  color: #0f4543;
  text-decoration: none;
}
.ps-way-link i {
  font-size: 0.8rem;
  vertical-align: middle;
}

/* Why grid */
.ps-why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.ps-why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fdfcf9;
  border: 1px solid #d8d3cb;
  border-radius: 8px;
  padding: 1.25rem;
}
.ps-why-item i {
  font-size: 1.5rem;
  color: #1a5c5a;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.ps-why-item h3 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  color: #1e3332;
}
.ps-why-item p {
  font-size: 0.85rem;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

/* Start steps */
.ps-start-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.ps-start-step {
  background: #fdfcf9;
  border: 1px solid #d8d3cb;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
}
.ps-start-num {
  width: 40px;
  height: 40px;
  background: #1a5c5a;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 0.75rem;
}
.ps-start-step h3 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: #1e3332;
}
.ps-start-step p {
  font-size: 0.85rem;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

/* Popular tags */
.ps-popular-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 2rem;
}
.ps-popular-tag {
  display: inline-block;
  background: #f5f2ec;
  border: 1px solid #d8d3cb;
  color: #1a6b68;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.ps-popular-tag:hover {
  background: #e8f4f3;
  border-color: #1a5c5a;
  color: #144e4c;
  text-decoration: none;
}

/* CTA */
.ps-cta {
  background: linear-gradient(135deg, #1a5c5a 0%, #2b8a87 100%);
  color: #fff;
  padding: 2.5rem 2rem;
  border-radius: 6px;
  text-align: center;
  margin: 2rem 0 1rem;
}
.ps-cta h2 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.6rem;
  font-weight: 400;
  border-bottom: none;
  color: #fff;
  margin-bottom: 0.75rem;
}
.ps-cta p {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}
.ps-cta .btn-primary {
  background: #fff;
  border-color: #fff;
  color: #1a5c5a;
  font-weight: 700;
  padding: 0.7rem 2rem;
  border-radius: 6px;
}
.ps-cta .btn-primary:hover {
  background: #e8f4f3;
  color: #144e4c;
}

/* Responsive */
@media (max-width: 992px) {
  .ps-ways {
    grid-template-columns: repeat(2, 1fr);
  }
  .ps-start-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .ps-hero {
    padding: 2rem 1rem;
  }
  .ps-hero h1 {
    font-size: 1.6rem;
  }
  .ps-hero-sub {
    font-size: 1rem;
  }
  .ps-hero-stats {
    gap: 1.25rem;
  }
  .ps-stat-num {
    font-size: 1.4rem;
  }
  .ps-ways,
  .ps-why-grid,
  .ps-start-steps {
    grid-template-columns: 1fr;
  }
  .ps-cta {
    padding: 1.5rem 1rem;
  }
}

/* ============================================
   БЛОК «БЫСТРЫЕ ССЫЛКИ» — index.html
   ============================================ */
.wiki-quick-links {
  border-top: 1px solid var(--encyclopedia-border);
  padding: 1.5rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}
.wiki-quick-links h2 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 1.3rem;
  font-weight: 400;
  border-bottom: 1px solid var(--encyclopedia-border);
  padding-bottom: 0.3rem;
  margin: 0 0 1rem;
  color: var(--encyclopedia-heading);
}
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.quick-links-col h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.5rem;
}
.quick-links-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.quick-links-col li {
  margin-bottom: 0.3rem;
}
.quick-links-col a {
  font-size: 0.85rem;
  color: var(--encyclopedia-link);
  text-decoration: none;
}
.quick-links-col a:hover {
  color: var(--encyclopedia-link-hover);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .quick-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wiki-quick-links {
    padding: 1.5rem 1rem;
  }
}

html { scroll-behavior: smooth; }

/* ============================================
   ПРАКТИКА ДЛЯ ВУЗА — лендинг
   ============================================ */

:root {
  --orange: #FF6A2B;
  --orange-dark: #E55815;
  --cream: #F6F1E8;
  --ink: #17140F;
  --text-gray: #5E5850;
  --card-border: #ECE5D9;
}

/* ---------- База лендинга ---------- */
.practice-page body {
  background: #fff;
}
.section {
  padding: 88px 0;
  background: var(--cream);
}
.section-sm {
  padding: 72px 0;
  background: var(--cream);
}
.section-dark {
  background: var(--ink);
  color: #fff;
}
.section-dark .section-title { color: #fff; }
.section-dark .section-subtitle { color: #CFC9BF; }
.section-dark a { color: var(--orange); }

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
}
.section-subtitle {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-gray);
  margin: 0;
}
.section-subtitle a { color: var(--orange); font-weight: 600; }

/* ---------- Навбар ---------- */
.navbar-custom {
  padding: 16px 0;
  background: #fff;
  border-bottom: 1px solid var(--card-border);
}
.navbar-custom .container {
  display: flex;
  align-items: center;
}
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}
.navbar-menu { gap: 26px; }
.navbar-custom .nav-link {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.navbar-custom .nav-link:hover { color: var(--orange); }
.navbar-toggler-mobile {
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu-collapse {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 18px 0 6px;
  width: 100%;
}
.mobile-menu-collapse.open { display: flex; }

/* ---------- Кнопки ---------- */
.btn-orange {
  display: inline-block;
  background: var(--orange);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.btn-orange:hover { background: var(--orange-dark); transform: translateY(-2px); }
.btn-orange-lg { padding: 17px 34px; font-size: 17px; border-radius: 14px; }

/* ---------- Hero ---------- */
.hero-section {
  background: var(--cream);
  padding: 100px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero-title {
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.06;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 26px;
  max-width: 900px;
}
.hero-subtitle {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-gray);
  max-width: 760px;
  margin: 0 0 34px;
}
.hero-subtitle a { color: var(--orange); font-weight: 600; }
.hero-link {
  display: inline-block;
  margin-left: 20px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid rgba(23,20,15,0.3);
  padding-bottom: 2px;
}
.hero-link:hover { color: var(--orange); border-color: var(--orange); }
.animate-in { animation: fadeUp .7s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Горизонтальный блок практики ---------- */
.practice-horizontal {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 46px 48px;
  align-items: start;
}
.practice-left { display: flex; gap: 20px; align-items: flex-start; }
.big-number {
  font-size: 92px;
  font-weight: 850;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--orange);
}
.big-number-sub {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
.practice-date {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-gray);
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}
.practice-features { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 26px; }
.feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.feature-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--orange); flex-shrink: 0;
}
.hero-card-divider { height: 1px; background: var(--card-border); margin: 26px 0; }
.hero-card-skills-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-gray);
  margin-bottom: 18px;
}
.hero-card-skills { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-chip {
  background: var(--cream);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Тёмные карточки ---------- */
.card-dark {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 30px;
  height: 100%;
}
.card-marker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--orange);
  margin-bottom: 16px;
}
.card-title {
  font-size: 20px;
  font-weight: 750;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 10px;
}
.section-dark .card-title { color: #fff; }
.card-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-gray);
  margin: 0;
}
.section-dark .card-text { color: #CFC9BF; }

/* ---------- Белые и оранжевые карточки ---------- */
.card-white {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 30px;
  height: 100%;
}
.card-orange {
  background: var(--orange);
  border-radius: 18px;
  padding: 30px;
  height: 100%;
  color: #fff;
}
.card-orange .big-number { color: #fff; font-size: 64px; }
.card-orange .big-number-sub { color: #fff; }
.card-orange .card-text { color: rgba(255,255,255,0.92); margin-top: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  background: var(--cream);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Студент / ВУЗ ---------- */
.card-student {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 34px;
  height: 100%;
}
.card-student-dark {
  background: var(--ink);
  border-radius: 20px;
  padding: 34px;
  height: 100%;
  color: #fff;
}
.card-student-dark .card-title { color: #fff; }
.card-student-dark .card-text { color: #CFC9BF; }
.label-sm {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 7px;
  margin-bottom: 18px;
}
.label-orange { background: rgba(255,106,43,0.12); color: var(--orange); }
.label-dark { background: rgba(255,106,43,0.16); color: var(--orange); }
.check-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.check-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--ink);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--orange);
  font-weight: 800;
}

/* ---------- Статистика ---------- */
.stat-number {
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--orange);
  line-height: 1;
}
.stat-label {
  font-size: 17px;
  line-height: 1.6;
  color: #CFC9BF;
  max-width: 700px;
  margin-top: 10px;
}

/* ---------- Bento Grid ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.bento-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 30px;
}
.bento-accent { background: var(--orange); border-color: var(--orange); color: #fff; }
.bento-accent .bento-name { color: #fff; }
.bento-accent .bento-text { color: rgba(255,255,255,0.92); }
.bento-accent .bento-chip { background: rgba(255,255,255,0.2); color: #fff; }
.bento-full { grid-column: 1 / -1; }
.bento-card-inner { display: flex; gap: 22px; align-items: flex-start; }
.bento-avatar {
  width: 72px; height: 72px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}
.bento-avatar-lg { width: 104px; height: 104px; border-radius: 20px; }
.bento-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bento-chip {
  background: var(--cream);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.bento-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px;
}
.bento-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-gray);
  margin: 0;
}
.bento-text a { color: var(--orange); font-weight: 600; }

/* ---------- Аккордеон ---------- */
.accordion-custom { display: flex; flex-direction: column; gap: 12px; }
.module-item {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
}
.module-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  cursor: pointer;
  user-select: none;
}
.module-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--orange);
  flex-shrink: 0;
  min-width: 26px;
}
.module-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}
.module-toggle {
  font-size: 26px;
  font-weight: 300;
  color: var(--orange);
  line-height: 1;
  transition: transform .3s ease;
  flex-shrink: 0;
}
.module-item.open .module-toggle { transform: rotate(45deg); }
.module-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.module-item.open .module-body { max-height: 600px; }
.module-content {
  padding: 0 26px 26px 70px;
}
.module-subtitle {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-gray);
  margin-bottom: 12px;
}
.module-content ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.module-content li { font-size: 15px; color: var(--ink); line-height: 1.5; }

/* ---------- Мессенджеры ---------- */
.messenger-bar { display: flex; flex-wrap: wrap; gap: 14px; }
.messenger-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: transform .2s ease;
}
.messenger-btn:hover { transform: translateY(-2px); color: #fff; }
.messenger-btn i { font-size: 20px; }
.messenger-btn-telegram { background: #229ED9; }
.messenger-btn-whatsapp { background: #25D366; }
.messenger-btn-max { background: #7B5CFA; }

/* ---------- Адаптив ---------- */
@media (max-width: 991px) {
  .practice-horizontal { grid-template-columns: 1fr; padding: 30px; gap: 30px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-full { grid-column: auto; }
  .module-content { padding-left: 26px; }
}
@media (max-width: 575px) {
  .section { padding: 60px 0; }
  .section-sm { padding: 52px 0; }
  .hero-section { padding: 70px 0; }
  .practice-horizontal { padding: 24px; }
  .big-number { font-size: 68px; }
  .bento-card-inner { flex-direction: column; }
  .hero-link { margin-left: 0; margin-top: 16px; display: block; }
}

/* ============================================
   WIKI ACTION BAR — кнопки записи под хедером
   ============================================ */
.wiki-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0.5rem 1.5rem;
  background: #fffefb;
  border-bottom: 1px solid var(--encyclopedia-border);
  justify-content: flex-end;
  max-width: 960px;
  margin: 0 auto;
}

.wiki-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.wiki-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  color: #fff;
  text-decoration: none;
}
.wiki-action-btn i {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.wiki-action-book {
  background: var(--encyclopedia-accent, #1a5c5a);
}
.wiki-action-book:hover {
  background: #144e4c;
}

.wiki-action-telegram {
  background: #229ED9;
}
.wiki-action-telegram:hover {
  background: #1c8bc0;
}

.wiki-action-max {
  background: #7B5CFA;
}
.wiki-action-max:hover {
  background: #6a4de6;
}

.wiki-action-whatsapp {
  background: #25D366;
}
.wiki-action-whatsapp:hover {
  background: #1ebc59;
}

/* Мобильный Home + гамбургер в action bar — скрыты на десктопе */
.wiki-tab-mobile,
.wiki-menu-toggle-mobile {
  display: none;
}

@media (max-width: 768px) {
  .wiki-action-bar {
    justify-content: flex-start;
    padding: 0.5rem 0.5rem;
    gap: 0.35rem;
    flex-wrap: nowrap;
  }
  .wiki-action-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    flex-shrink: 0;
  }
  .wiki-action-btn i {
    font-size: 0.85rem;
  }

  /* Скрываем Telegram и Max на мобилке */
  .wiki-action-hide-mobile {
    display: none !important;
  }

  /* Показываем Home + гамбургер в action bar */
  .wiki-tab-mobile {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--encyclopedia-heading);
    background: var(--encyclopedia-white);
    border: 1px solid var(--encyclopedia-border);
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: default;
    text-decoration: none;
  }
  .wiki-tab-mobile.active {
    background: var(--encyclopedia-accent);
    color: #fff;
    border-color: var(--encyclopedia-accent);
  }

  .wiki-menu-toggle-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    background: #e8e4dc;
    border: 1px solid var(--encyclopedia-border);
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
    color: var(--encyclopedia-heading);
    font-family: inherit;
  }
  .wiki-menu-toggle-mobile i {
    font-size: 1.15rem;
  }
  .wiki-menu-toggle-mobile.active {
    background: var(--encyclopedia-accent);
    color: #fff;
    border-color: var(--encyclopedia-accent);
  }

  /* Home + гамбургер — справа */
  .wiki-action-bar-top .wiki-tab-mobile {
    margin-left: auto;
  }
}
/* ===== МОБИЛЬНОЕ ВЫПАДАЮЩЕЕ МЕНЮ ===== */
.wiki-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.7rem;
  color: var(--encyclopedia-heading);
  background: #e8e4dc;
  border: 1px solid var(--encyclopedia-border);
  border-bottom: 1px solid var(--encyclopedia-border);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s;
  font-family: inherit;
  position: relative;
  bottom: -1px;
}
.wiki-menu-toggle:hover {
  background: #f0ede7;
}
.wiki-menu-toggle i {
  font-size: 1.25rem;
}
.wiki-menu-toggle.active {
  background: var(--encyclopedia-white);
  border-bottom-color: var(--encyclopedia-white);
  color: var(--encyclopedia-heading);
}

.wiki-menu-dropdown {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--encyclopedia-white);
  border: 1px solid var(--encyclopedia-border);
  border-top: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  max-height: 70vh;
  overflow-y: auto;
}
.wiki-menu-dropdown.open {
  display: flex !important;
}

.wiki-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.6rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  color: var(--encyclopedia-heading);
  text-decoration: none;
  border-bottom: 1px solid #f0ede7;
  transition: background 0.12s;
  font-weight: 500;
  text-align: center;
  box-sizing: border-box;
}
.wiki-menu-item:last-child {
  border-bottom: none;
}
.wiki-menu-item:hover {
  background: var(--encyclopedia-toc-bg);
  text-decoration: none;
  color: var(--encyclopedia-link-hover);
}
.wiki-menu-item i {
  font-size: 1.15rem;
  color: var(--encyclopedia-accent);
  width: 1.4rem;
  text-align: center;
  flex-shrink: 0;
}

/* Мобильная версия */
@media (max-width: 768px) {
  .wiki-tabs {
    position: relative;
    padding: 0 0.5rem;
    gap: 0;
  }

  .wiki-menu-toggle {
    display: flex;
  }

  /* На мобилке Home и гамбургер в action bar — скрываем все табы из tabs */
  .wiki-tabs > .wiki-tab {
    display: none;
  }

  /* Скрываем гамбургер внутри tabs (он теперь в action bar) */
  .wiki-tabs > .wiki-menu-toggle {
    display: none !important;
  }

  /* Языковой переключатель — компактнее */
  .wiki-lang-switch {
    margin-right: 0.4rem;
  }
  .wiki-lang-btn {
    padding: 0.3rem 0.4rem;
    font-size: 0.68rem;
  }
}
/* ===== ЯЗЫКОВОЙ ПЕРЕКЛЮЧАТЕЛЬ В TABS ===== */
.wiki-lang-switch {
  display: flex;
  gap: 2px;
  margin-right: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.wiki-lang-btn {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--encyclopedia-border);
  background: #e8e4dc;
  color: var(--encyclopedia-link);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s;
  line-height: 1;
  font-family: inherit;
}

.wiki-lang-btn:hover {
  background: #f0ede7;
  color: var(--encyclopedia-link-hover);
}

.wiki-lang-btn.active {
  background: var(--encyclopedia-accent);
  border-color: var(--encyclopedia-accent);
  color: #fff;
}
/* Индикатор прокрутки языков — виден только на мобилке */
.wiki-lang-scroll-hint {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--encyclopedia-accent);
  padding: 0 4px;
  animation: langScrollShake 1.6s ease-in-out infinite;
}
.wiki-lang-scroll-hint i {
  font-size: 1.1rem;
}

@keyframes langScrollShake {
  0%, 100% { opacity: 0.6; transform: translateX(0); }
  25% { opacity: 1; transform: translateX(-5px); }
  75% { opacity: 1; transform: translateX(5px); }
}

@media (max-width: 768px) {
  .wiki-lang-scroll-hint {
    display: flex;
  }
}