/* ============================================================
   MMMM Modern — editorial journal design system
   Playfair Display (headings) + Golos Text (body), warm paper
   palette, refined bronze accent. Separate from legacy cassiopeia.
   ============================================================ */

:root {
  --mm-bg: #f4f1ea;
  --mm-surface: #ffffff;
  --mm-surface-2: #faf8f3;
  --mm-ink: #1b1814;
  --mm-soft: #5d574e;
  --mm-faint: #8c8579;
  --mm-accent: #b0682c;
  --mm-accent-2: #8c4f1d;
  --mm-line: #e7e0d4;
  --mm-line-strong: #d8cfbf;
  --mm-dark: #1d1a15;
  --mm-dark-2: #272219;
  --mm-dark-soft: #b7ad9d;

  --mm-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --mm-sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --mm-shell: 1400px;
  --mm-radius: 10px;
  --mm-radius-sm: 8px;
  --mm-shadow: 0 1px 2px rgba(28, 25, 21, .05), 0 8px 30px rgba(28, 25, 21, .07);
  --mm-shadow-lg: 0 18px 50px rgba(28, 25, 21, .16);
  --mm-ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body.mm {
  margin: 0;
  background: var(--mm-bg);
  color: var(--mm-ink);
  font-family: var(--mm-sans);
  font-size: calc(17px * var(--mm-font-scale, 1));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: rgba(176, 104, 44, .15);
}

img { max-width: 100%; height: auto; }

/* Joomla/Bootstrap a11y utilities (we don't load Bootstrap, so define them). */
.visually-hidden, .sr-only, .visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

a { color: var(--mm-accent-2); text-decoration: none; transition: color .15s var(--mm-ease); }
a:hover { color: var(--mm-accent); }

/* Keyboard-only focus ring (visible, on-brand; mouse clicks stay clean). */
:focus-visible { outline: 2px solid var(--mm-accent); outline-offset: 3px; border-radius: 5px; }
::selection { background: rgba(176, 104, 44, .22); }

h1, h2, h3, h4 { font-family: var(--mm-serif); font-weight: 700; line-height: 1.12; color: var(--mm-ink); letter-spacing: -.01em; text-wrap: balance; }

.mm-shell { width: 100%; max-width: var(--mm-shell); margin: 0 auto; padding: 0 64px; }

.mm-skip { position: absolute; left: -9999px; top: 0; background: var(--mm-ink); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; }
.mm-skip:focus { left: 0; }

/* ---------- Header ---------- */
.mm-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 241, 234, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--mm-ease), background .25s var(--mm-ease), box-shadow .25s var(--mm-ease);
}
.mm-header.is-scrolled { border-bottom-color: var(--mm-line); box-shadow: 0 6px 24px rgba(28,25,21,.06); }

.mm-header__bar { display: flex; align-items: center; gap: 18px; min-height: 68px; }

.mm-brand { display: inline-flex; align-items: center; gap: 14px; color: var(--mm-ink); flex: 0 0 auto; }
.mm-brand:hover { color: var(--mm-ink); }
.mm-brand__mark {
  display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto;
  font-family: var(--mm-serif); font-weight: 800; font-size: 20px; color: #fff;
  background: linear-gradient(150deg, var(--mm-accent), var(--mm-accent-2));
  border-radius: 12px; box-shadow: var(--mm-shadow); position: relative;
}
.mm-brand__mark small { font-size: 10px; font-weight: 700; position: absolute; right: 7px; bottom: 6px; opacity: .85; }
.mm-brand__name {
  font-family: var(--mm-serif); font-weight: 700; font-size: 15px; line-height: 1.12;
  max-width: 22ch; letter-spacing: -.01em;
}

.mm-header__tools { margin-left: 6px; display: flex; align-items: center; gap: 0; flex: 0 0 auto; }

/* ---------- Nav (mod_menu) ---------- */
.mm-nav { flex: 1 1 auto; min-width: 0; }
.mm-nav .mod-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; justify-content: flex-end; flex-wrap: nowrap; }
.mm-nav .mod-menu > li { position: relative; }
.mm-nav .mod-menu > li > a,
.mm-nav .mod-menu > li > span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 8px;
  font-family: var(--mm-sans); font-weight: 600; font-size: 14px; color: var(--mm-soft);
  white-space: nowrap; transition: background .15s var(--mm-ease), color .15s var(--mm-ease);
}
.mm-nav .mod-menu > li > a:hover { color: var(--mm-ink); background: rgba(176,104,44,.10); }
.mm-nav .mod-menu > li.current > a,
.mm-nav .mod-menu > li.active > a { color: var(--mm-accent-2); background: rgba(176,104,44,.12); }
.mm-nav .mod-menu .mod-menu__toggle-sub { display: none; }
/* caret on items that have a submenu */
.mm-nav .mod-menu > li:has(ul) > a::after {
  content: ""; width: 6px; height: 6px; margin-left: 2px; flex: 0 0 auto;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: translateY(-2px) rotate(45deg); opacity: .7;
}

/* dropdowns — force display:block (Joomla's metismenu layout sets display:none
   on the submenu <ul>; we show/hide via opacity instead). */
.mm-nav .mod-menu ul {
  display: block !important;
  list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0;
  min-width: 230px; background: var(--mm-surface); border: 1px solid var(--mm-line);
  border-radius: var(--mm-radius-sm); box-shadow: var(--mm-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s var(--mm-ease), transform .18s var(--mm-ease), visibility .18s;
  z-index: 50;
}
.mm-nav .mod-menu li:hover > ul,
.mm-nav .mod-menu li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.mm-nav .mod-menu ul a {
  display: block; padding: 8px 12px; border-radius: 7px; font-size: 14.5px; font-weight: 500; color: var(--mm-soft);
}
.mm-nav .mod-menu ul a:hover { background: var(--mm-surface-2); color: var(--mm-accent-2); }

/* ---------- Language switcher (mod_languages in 'search') ---------- */
.mm-header__tools .mod-languages { display: flex; align-items: center; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--mm-line); }
.mm-header__tools .mod-languages ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.mm-header__tools .mod-languages li { display: flex; margin: 0; padding: 0; }
.mm-header__tools .mod-languages a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 30px; padding: 0; border-radius: 7px;
  border: 1px solid var(--mm-line); background: var(--mm-surface);
  box-shadow: 0 1px 2px rgba(28,25,21,.04);
}
.mm-header__tools .mod-languages a:hover { border-color: var(--mm-accent); background: var(--mm-surface-2); }
.mm-header__tools .mod-languages img { display: block; width: 21px; height: auto; border-radius: 3px; }

.mm-fontsize { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.mm-fontsize__btn {
  width: 32px; height: 30px; border: 1px solid var(--mm-line); border-radius: 7px;
  background: var(--mm-surface); color: var(--mm-soft); font: 700 12px/1 var(--mm-sans);
  cursor: pointer; padding: 0; box-shadow: 0 1px 2px rgba(28,25,21,.04);
  transition: border-color .15s var(--mm-ease), color .15s var(--mm-ease), background .15s var(--mm-ease);
}
.mm-fontsize__btn:hover { border-color: var(--mm-accent); color: var(--mm-accent-2); background: var(--mm-surface-2); }

/* ---------- Burger (mobile) ---------- */
.mm-burger { display: none; width: 38px; height: 38px; border: 1px solid var(--mm-line); background: var(--mm-surface); border-radius: 8px; cursor: pointer; padding: 0; flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
.mm-nav-backdrop { display: none; }
.mm-burger span { width: 18px; height: 2px; background: var(--mm-ink); border-radius: 2px; transition: transform .2s var(--mm-ease), opacity .2s; }
/* Morph to an X while the menu is open — signals the toggle state. */
.mm-header.nav-open .mm-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mm-header.nav-open .mm-burger span:nth-child(2) { opacity: 0; }
.mm-header.nav-open .mm-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Main layout ---------- */
.mm-main { padding: 14px 0 64px; }
.mm-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
body.mm.has-sidebar .mm-layout { grid-template-columns: minmax(0, 1fr) 280px; }
.mm-content { min-width: 0; }
.mm-sidebar { position: sticky; top: 100px; }

/* ---------- Editorial content typography ---------- */
.mm-content .page-header h1, .mm-content .page-header h2,
.mm-content h1.article-title, .mm-content .item-page > h2 {
  font-size: calc(clamp(24px, 2.6vw, 34px) * var(--mm-font-scale, 1)); margin: 0 0 18px; line-height: 1.12;
}
.mm-content h2 { font-size: calc(25px * var(--mm-font-scale, 1)); margin: 36px 0 13px; }
.mm-content h3 { font-size: calc(20px * var(--mm-font-scale, 1)); margin: 28px 0 10px; }
.mm-content h4, .mm-content h5 { font-family: var(--mm-sans); font-weight: 700; font-size: calc(17px * var(--mm-font-scale, 1)); margin: 24px 0 8px; color: var(--mm-ink); }
.mm-content p, .mm-content li { font-size: calc(17px * var(--mm-font-scale, 1)); line-height: 1.7; color: #2c2820; overflow-wrap: break-word; }
/* Comfortable reading measure (~70-75 chars); 72ch ran ~90 in Golos. */
.mm-content .com-content-article__body,
.mm-content .item-page { max-width: 104ch; }
.mm-content a { color: var(--mm-accent-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; text-decoration-color: rgba(140,79,29,.35); }
.mm-content a:hover { text-decoration-color: var(--mm-accent); }
.mm-content ul { padding-left: 1.25em; }
.mm-content blockquote { border-left: 3px solid var(--mm-accent); margin: 24px 0; padding: 4px 0 4px 20px; color: var(--mm-soft); font-style: italic; }
.mm-content table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 20px 0; font-size: calc(15.5px * var(--mm-font-scale, 1)); }
/* Break long DOIs/emails/URLs that would otherwise overflow a cell. Use
   break-word (not anywhere): anywhere collapses short label columns to a single
   vertical letter in auto-layout tables. Mobile stacks cells (see @media). */
.mm-content table td, .mm-content table th { border: 1px solid var(--mm-line); padding: 8px 11px; overflow-wrap: break-word; }
.mm-content img { border-radius: var(--mm-radius-sm); }
.mm-content hr { border: 0; border-top: 1px solid var(--mm-line); margin: 36px 0; }
.mm-content .label,
.mm-content .badge,
.mm-content span[style*="background"],
.mm-content strong[style*="background"] {
  border-radius: 5px !important;
}
.mm-content span[style*="background"],
.mm-content strong[style*="background"] {
  display: inline-block;
  padding: 4px 8px !important;
  background: var(--mm-accent-2) !important;
  color: #fff !important;
  font-size: .92em;
  line-height: 1.25;
}
.mm-content p > strong,
.mm-content p > b {
  font-weight: 700;
}

.mm-content .article-info,
.mm-content .com-content-article__info {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  margin: 0 0 20px; padding: 0; color: var(--mm-faint); font-size: 13.5px;
  list-style: none; border-bottom: 1px solid var(--mm-line); padding-bottom: 14px;
}
.mm-content .blog-items,
.mm-content .items-leading,
.mm-content .items-row {
  display: grid; gap: 14px;
}
.mm-content .blog-item,
.mm-content .items-leading > div,
.mm-content .items-row > div {
  background: rgba(255,255,255,.62); border: 1px solid var(--mm-line);
  border-radius: 10px; padding: 18px 20px;
}
.mm-content .readmore .btn,
.mm-content .btn,
.mm-content button,
.mm-content input[type="submit"] {
  border-radius: 8px;
}
.mm-content .readmore .btn,
.mm-content a.btn {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px;
  border: 1px solid var(--mm-line-strong); background: var(--mm-surface);
  color: var(--mm-accent-2); text-decoration: none; font-weight: 600;
}
.mm-content .readmore .btn:hover,
.mm-content a.btn:hover {
  border-color: var(--mm-accent); background: var(--mm-surface-2);
}
.mm-content .pagination {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 28px 0 0;
  list-style: none;
}
.mm-content .pagination a,
.mm-content .pagination span {
  display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px;
  border: 1px solid var(--mm-line); border-radius: 8px; background: var(--mm-surface);
  text-decoration: none;
}
.mm-content .pagination .active span,
.mm-content .pagination a:hover {
  background: var(--mm-accent-2); color: #fff; border-color: var(--mm-accent-2);
}

/* checklists from imported content */
.mm-content ul.bt_check_list-3 { list-style: none; padding: 0; }
.mm-content ul.bt_check_list-3 li { position: relative; padding-left: 28px; margin: 7px 0; }
.mm-content ul.bt_check_list-3 li::before { content: "\2713"; position: absolute; left: 0; top: 1px; color: var(--mm-accent); font-weight: 700; }

/* Legacy bt_code / bt_box callout blocks: recolor for the light editorial
   theme (the legacy dark #666 box looks wrong on paper). */
.mm-content div[class*="bt_code"],
.mm-content p.bt_box_message,
.mm-content div.bt_blockquote {
  background: var(--mm-surface-2) !important;
  color: var(--mm-ink) !important;
  border: 1px solid var(--mm-line) !important;
  border-left: 4px solid var(--mm-accent) !important;
  border-radius: var(--mm-radius-sm) !important;
  padding: 20px 24px !important;
  margin: 24px 0 !important;
}
.mm-content div[class*="bt_code"] *,
.mm-content p.bt_box_message * { color: var(--mm-ink) !important; background: transparent !important; }

/* ---------- Cards / boxes ---------- */
.mm-card { background: var(--mm-surface); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); box-shadow: 0 1px 2px rgba(28,25,21,.04); }

/* ---------- Smart Search (mod_finder, main-top) ---------- */
.mm-content .mod-finder, .mm-content form.mod-finder {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--mm-surface); border: 1px solid var(--mm-line); border-radius: var(--mm-radius);
  padding: 18px 20px; margin: 0 0 34px; box-shadow: var(--mm-shadow);
}
.mm-content form.mod-finder { justify-content: flex-start; }
.mm-content form.mod-finder > label.finder { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mm-content .awesomplete { display: inline-block; flex: 1 1 300px; max-width: 460px; }
.mm-content form.mod-finder .form-control,
.mm-content form.mod-finder .form-select,
.mm-content form.mod-finder input[type="text"],
.mm-content form.mod-finder select {
  width: 100%; font-family: var(--mm-sans); font-size: 15px; height: 44px; padding: 0 14px;
  border: 1px solid var(--mm-line-strong); border-radius: 10px; background: var(--mm-surface-2); color: var(--mm-ink);
}
.mm-content form.mod-finder .form-control:focus,
.mm-content form.mod-finder .form-select:focus { outline: none; border-color: var(--mm-accent); box-shadow: 0 0 0 3px rgba(176,104,44,.15); }
.mm-content .mod-finder__advanced, .mm-content .filter-branch { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0; }
.mm-content .control-group { margin: 0; }
.mm-content .control-label label { font-size: 12px; font-weight: 600; color: var(--mm-faint); margin: 0 0 4px; display: block; }
.mm-content .mod-finder .form-select { min-width: 150px; }
.mm-content .mod-finder .btn {
  height: 44px; padding: 0 20px 0 42px; border: 0; border-radius: 10px; color: #fff;
  font-weight: 600; font-family: var(--mm-sans); font-size: 15px; cursor: pointer; line-height: 44px;
  background: var(--mm-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat 15px center;
  background-size: 17px;
}
.mm-content .mod-finder .btn:hover { background-color: var(--mm-accent-2); }
.mm-content .mod-finder .btn .icon-search { display: none; }

/* Hide empty placeholder covers (zaglush) for not-yet-published issues. */
.mmmm-arch-body td:has(> img[src*="zaglush"]),
.mmmm-arch-body td:has(> a img[src*="zaglush"]),
.mm-content img[src*="zaglush"] { display: none !important; }

/* ---------- Archive accordion (user.js builds .mmmm-arch-*) ---------- */
.mmmm-arch-acc { display: grid; gap: 10px; margin: 8px 0 0; }
.mmmm-arch-item { background: var(--mm-surface); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); overflow: hidden; box-shadow: var(--mm-shadow); transition: box-shadow .2s var(--mm-ease); }
.mmmm-arch-item:hover { box-shadow: var(--mm-shadow-lg); }
.mmmm-arch-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer;
  padding: 16px 20px; font-family: var(--mm-serif); font-weight: 600; font-size: 19px; color: var(--mm-ink);
  text-decoration: none;
}
.mmmm-arch-head::after { content: ""; flex: 0 0 auto; width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid var(--mm-accent); border-bottom: 2px solid var(--mm-accent); transform: rotate(45deg); transition: transform .2s var(--mm-ease), margin .2s var(--mm-ease); }
.mmmm-arch-head:hover { color: var(--mm-accent-2); }
.mmmm-arch-head.open { color: var(--mm-accent-2); }
.mmmm-arch-head.open::after { transform: rotate(-135deg); margin-top: 3px; }
.mmmm-arch-body { padding: 4px 20px 22px; }
.mmmm-arch-body table { border: 0; margin: 0; }
.mmmm-arch-body table td, .mmmm-arch-body table th { border: 0; padding: 8px; vertical-align: top; }
.mmmm-arch-body img { border-radius: 8px; box-shadow: var(--mm-shadow); transition: transform .2s var(--mm-ease); }
.mmmm-arch-body a:hover img { transform: translateY(-3px); }
.mmmm-arch-loading { color: var(--mm-faint); }

/* archive issue covers default (when not in accordion) */
.mm-content .item-page img[src*="/images/arhiv/"] { border-radius: 8px; box-shadow: var(--mm-shadow); }

/* ---------- Sidebar indices (mod_custom #16 .mmmm-indexes) ---------- */
.mm-sidebar .moduletable, .mm-sidebar .mod-custom { margin: 0 0 18px; }
.mmmm-indexes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mmmm-indexes a {
  display: grid; place-items: center; min-height: 58px; padding: 10px 12px;
  background: rgba(255,255,255,.72); border: 1px solid var(--mm-line); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(28,25,21,.035);
  transition: transform .15s var(--mm-ease), background .15s var(--mm-ease), border-color .15s;
}
.mmmm-indexes a:hover { transform: translateY(-1px); background: #fff; border-color: var(--mm-line-strong); }
.mmmm-indexes img { width: 100%; max-height: 36px; object-fit: contain; }

/* ---------- Footer (mod_custom #200/202 .mmmm-footer) ---------- */
.mm-footer { background: var(--mm-dark); color: var(--mm-dark-soft); margin-top: 40px; padding: 48px 0; font-size: 14.5px; }
.mm-footer a { color: #fff; }
.mm-footer .mmmm-footer { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
/* Replace the legacy bronze plaque with a clean monogram in the modern footer
   (the shared module content stays intact for the legacy theme). */
.mm-footer .mmmm-footer img { display: none; }
.mm-footer .mmmm-footer::before {
  content: "М\2074"; display: grid; place-items: center; width: 58px; height: 58px;
  font-family: var(--mm-serif); font-weight: 800; font-size: 26px; color: #fff;
  background: linear-gradient(150deg, var(--mm-accent), var(--mm-accent-2)); border-radius: 14px;
}
.mm-footer .mmmm-footer p { margin: 0; line-height: 1.65; color: var(--mm-dark-soft); }

/* ---------- To-top ---------- */
.mm-totop { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; display: grid; place-items: center; background: var(--mm-ink); color: #fff; border-radius: 50%; box-shadow: var(--mm-shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s var(--mm-ease), transform .2s var(--mm-ease), visibility .2s; z-index: 90; }
.mm-totop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.mm-totop:hover { background: var(--mm-accent-2); color: #fff; }
.mm-totop svg { display: block; }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--mm-ease), transform .6s var(--mm-ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Breadcrumbs ---------- */
.mm-content .breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 22px; font-size: 13.5px; color: var(--mm-faint); }
.mm-content .breadcrumb a { color: var(--mm-faint); text-decoration: none; }
.mm-content .breadcrumb a:hover { color: var(--mm-accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  body.mm.has-sidebar .mm-layout { grid-template-columns: minmax(0, 1fr); }
  .mm-sidebar { position: static; }
  .mm-burger { display: flex; }
  .mm-nav-backdrop {
    display: block; position: fixed; inset: 68px 0 0; z-index: 89;
    border: 0; background: rgba(29,26,21,.28); opacity: 0; visibility: hidden;
    transition: opacity .18s var(--mm-ease), visibility .18s; cursor: pointer;
  }
  .mm-header.nav-open .mm-nav-backdrop { opacity: 1; visibility: visible; }
  .mm-nav {
    position: fixed; top: 68px; right: 12px; left: 12px; z-index: 90;
    background: var(--mm-surface); border: 1px solid var(--mm-line);
    border-radius: 10px; box-shadow: var(--mm-shadow-lg);
    padding: 10px; display: block; max-height: calc(100dvh - 88px); overflow: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s var(--mm-ease), transform .18s var(--mm-ease), visibility .18s;
  }
  .mm-header.nav-open .mm-nav { opacity: 1; visibility: visible; transform: none; }
  .mm-nav .mod-menu { flex-direction: column; gap: 2px; justify-content: flex-start; }
  .mm-nav .mod-menu > li > a { font-size: 16px; padding: 12px 12px; }
  .mm-nav .mod-menu ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--mm-line); border-radius: 0; padding: 2px 0 2px 12px; margin: 0 0 4px 12px; min-width: 0; }
  .mm-brand__name { display: none; }
  .mm-shell { padding: 0 18px; }
  .mm-footer .mmmm-footer { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .mm-header__tools { gap: 4px; }
  .mm-fontsize__btn,
  .mm-header__tools .mod-languages a { width: 36px; height: 34px; }
  .mm-main { padding: 22px 0 52px; }
  /* Legacy articles wrap metadata in label|value layout tables with percent
     column widths that collapse on narrow screens. Stack cells so each label
     sits above its value — readable, and never overflows the viewport. */
  .mm-content table, .mm-content tbody, .mm-content tr, .mm-content td, .mm-content th {
    display: block; width: auto !important; }
  .mm-content tr { padding: 6px 0; border-bottom: 1px solid var(--mm-line); }
  .mm-content tr:last-child { border-bottom: 0; }
  .mm-content td, .mm-content th { border: 0; padding: 3px 0; }
  .mm-content td:empty, .mm-content th:empty { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
