/* Нейро Рич — neurorich.ru
   Cascade: @layer order is fixed by first appearance
   (reset, tokens, base, components, responsive, accessibility, overrides-a11y).
   Unlayered rules after the layers win over layered rules.
*/

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

  html {
    scroll-behavior: smooth;
    scroll-padding-top: 6.5rem;
  }

  body, h1, h2, h3, p, ul, ol, dl, dd, figure {
    margin: 0;
  }

  ul, ol {
    padding: 0;
  }

  button, input {
    font: inherit;
  }

  button {
    border: 0;
  }

  a {
    color: inherit;
  }

  svg, img {
    max-width: 100%;
    display: block;
  }

  [hidden] {
    display: none !important;
  }
}

@layer tokens {
  :root {
    color-scheme: dark;
    --bg: #0f0f0f;
    --bg-deep: #080808;
    --bg-soft: #151515;
    --surface: #161616;
    --surface-raised: #202020;
    --surface-border: #2f2f2f;
    --paper-card: #161616;
    --ink: #ffffff;
    --ink-soft: #e6e6e6;
    --text: #f5f5f5;
    --text-soft: #d6d6d6;
    --muted: #a8a8a8;
    --mint: #ffd84d;
    --gold: #ffcc00;
    --danger: #f38c86;
    --line: #ffffff1a;
    --shell: 78rem;
    --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: .2rem;
    --radius-md: .28rem;
    --mark-w: 22px;
    --mark-h: 3px;
    --mark-gap: 8px;
    --transition: .18s cubic-bezier(.2, .7, .2, 1);
  }
}

@layer base {
  body {
    background: var(--bg);
    min-width: 20rem;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font-sans);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: clip;
  }

  ::selection {
    background: var(--gold);
    color: #0d0c0b;
  }

  a {
    text-underline-offset: .22em;
    text-decoration-thickness: .08em;
  }

  h1, h2, h3 {
    font-family: var(--font-display);
    letter-spacing: -.03em;
    text-wrap: balance;
    font-weight: 700;
  }

  h2 {
    font-size: clamp(2rem,4vw,3.5rem);
    line-height: 1.03;
  }

  h3 {
    font-size: 1.25rem;
    line-height: 1.2;
  }

  main {
    display: block;
  }

  .shell {
    width: min(calc(100% - 3rem),var(--shell));
    margin-inline: auto;
  }

  .section {
    padding-block: clamp(4.5rem,8vw,7rem);
    position: relative;
  }

  .section-kicker {
    color: var(--mint);
    letter-spacing: .14em;
    text-transform: uppercase;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1rem;
    font-size: .75rem;
    font-weight: 760;
    line-height: 1.2;
    display: flex;
  }

  .section-kicker span {
    letter-spacing: .08em;
    border: 1px solid;
    border-radius: 999px;
    place-items: center;
    min-width: 2.2rem;
    height: 1.4rem;
    font-size: .75rem;
    display: inline-grid;
  }

  .sr-only {
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    position: absolute !important;
    overflow: hidden !important;
  }

  .icon {
    object-fit: contain;
    image-rendering: auto;
    flex: none;
  }

  img.icon {
    max-width: none;
  }

  .wiki-search__field > .icon--glyph {
    filter: none;
  }

  .button {
    background: var(--mint);
    min-height: 2.9rem;
    color: var(--ink);
    transition: background var(--transition),border-color var(--transition),transform var(--transition);
    border: 1px solid #0000;
    border-radius: .7rem;
    justify-content: center;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1.15rem;
    font-size: .9rem;
    font-weight: 720;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
  }

  .button--ghost {
    border-color: var(--surface-border);
    color: var(--text);
    background: 0 0;
  }
}

@layer components {
  .skip-link {
    z-index: 1000;
    background: var(--gold);
    color: #0d0c0b;
    transition: transform var(--transition);
    border-radius: .5rem;
    padding: .75rem 1rem;
    font-weight: 750;
    text-decoration: none;
    position: fixed;
    top: .75rem;
    left: .75rem;
    transform: translateY(-180%);
  }

  .skip-link:focus {
    transform: translateY(0);
    outline: 2px solid #0d0c0b;
    outline-offset: 2px;
  }

  .brand {
    flex: none;
  }

  .brand__name {
    line-height: 1.05;
  }

  .brand__tagline {
    line-height: 1.2;
  }

  .desktop-nav ul, .footer-nav ul {
    align-items: center;
    gap: .2rem;
    list-style: none;
    display: flex;
  }

  .desktop-nav a {
    padding-inline: .85rem;
  }

  .header-search {
    padding-inline: .7rem;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .menu-label--close, .mobile-nav[open] .menu-label--open {
    display: none;
  }

  .mobile-nav[open] .menu-label--close {
    display: block;
  }

  .mobile-nav:not([open]) .mobile-nav__panel {
    display: none;
  }

  .mobile-nav a {
    padding-inline: .7rem;
  }

  .wiki-search__field {
    background: var(--paper-card);
    min-height: 4.15rem;
    color: var(--ink);
    transition: border-color var(--transition),box-shadow var(--transition);
    border: 1px solid #ffffff21;
    border-radius: .9rem;
    align-items: center;
    gap: .8rem;
    padding: .5rem .5rem .5rem 1.15rem;
    display: flex;
    box-shadow: 0 18px 50px #00000040;
  }

  .wiki-search__field > .icon {
    color: #71706b;
  }

  .wiki-search input {
    width: 100%;
    min-width: 0;
    color: var(--ink);
    background: 0 0;
    border: 0;
    outline: 0;
    font-size: .98rem;
  }

  .wiki-search input::placeholder {
    color: #85837d;
    opacity: 1;
  }

  .wiki-search input::-webkit-search-cancel-button {
    cursor: pointer;
    width: 1.15rem;
    height: 1.15rem;
  }

  .wiki-search button {
    background: var(--ink);
    min-height: 3.15rem;
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition),transform var(--transition);
    border-radius: .65rem;
    flex: none;
    padding-inline: 1.3rem;
    font-size: .87rem;
    font-weight: 730;
  }

  .wiki-search__help {
    color: var(--muted);
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .9rem;
    margin-top: .8rem;
    font-size: .76rem;
    display: flex;
  }

  .wiki-search__help a {
    min-height: 2.75rem;
    color: var(--text-soft);
    align-items: center;
    text-decoration-color: #ffffff38;
    display: inline-flex;
  }

  .wiki-search {
    margin-top: 1.7rem;
  }

  .wiki-search__field {
    border-color: var(--surface-border);
    border-radius: .35rem;
    min-height: 3.9rem;
    box-shadow: 0 8px 20px #00000029;
  }

  .wiki-search__field:focus-within {
    border-color: #a5a39c;
    box-shadow: 0 0 0 3px #a5a39c3b,0 8px 20px #00000029;
  }

  .wiki-search button {
    background: #2c2b28;
    border: 1px solid #4f4e48;
    border-radius: .25rem;
    min-height: 2.9rem;
  }

  .site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-deep);
  }

  .site-footer__brand > p {
    max-width: 24rem;
    color: var(--muted);
    margin-top: 1.3rem;
    font-size: .82rem;
  }

  .site-footer__edition {
    color: #8f8d84;
    letter-spacing: .08em;
    text-transform: uppercase;
    align-items: center;
    gap: .45rem;
    font-size: .75rem;
    font-weight: 680;
    display: inline-flex;
  }

  .site-footer__edition span {
    background: var(--mint);
    border-radius: 50%;
    width: .38rem;
    height: .38rem;
  }

  .footer-nav > p {
    color: #8f8d84;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
    font-size: .75rem;
    font-weight: 720;
  }

  .footer-nav ul {
    align-items: start;
    gap: .65rem;
    display: grid;
  }

  .footer-nav a {
    min-height: 2.75rem;
    color: var(--text-soft);
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    text-decoration: none;
    display: inline-flex;
  }

  .footer-nav a[target=_blank] .icon {
    color: #8f8d84;
    transform: rotate(-45deg);
    transition: transform var(--transition),color var(--transition);
  }

  .site-footer__bottom {
    border-top: 1px solid var(--line);
    color: #8f8e88;
    font-size: .75rem;
  }

  .article-main, .listing-main, .search-main, .project-main, .error-main {
    background: var(--bg);
    min-height: 70vh;
    color: var(--text);
  }

  .article-shell, .listing-shell, .search-shell, .project-shell, .error-shell {
    padding-block: clamp(2rem,5vw,4.5rem) clamp(5rem,9vw,8rem);
  }

  .breadcrumbs {
    color: #c1c0bb;
    margin-bottom: clamp(.75rem,1.6vw,1.15rem);
    font-size: .76rem;
    font-weight: 640;
  }

  .breadcrumbs ol {
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .55rem;
    list-style: none;
    display: flex;
  }

  .breadcrumbs li {
    align-items: center;
    gap: .55rem;
    display: inline-flex;
  }

  .breadcrumbs li:not(:last-child):after {
    color: #89877d;
    content: "/";
  }

  .breadcrumbs a {
    align-items: center;
    min-height: 2.75rem;
    text-decoration-color: #aeada9;
    display: inline-flex;
  }

  .breadcrumbs [aria-current=page] {
    color: var(--gold);
    font-weight: 700;
  }

  .listing-header h1, .search-header h1, .error-content h1 {
    font-size: clamp(2.55rem,6vw,5rem);
    line-height: .98;
  }

  .listing-header > p:last-of-type, .search-header > p, .error-content > p:not(.error-code) {
    max-width: 49rem;
    color: var(--ink-soft);
    margin-top: 1.3rem;
    font-size: clamp(1rem,1.7vw,1.15rem);
    line-height: 1.7;
  }

  .article-facts {
    border-top: 1px solid var(--surface-border);
    border-bottom: 1px solid var(--surface-border);
    grid-template-columns: repeat(4,minmax(8rem,1fr));
    gap: 0;
    margin-top: 2.2rem;
    display: grid;
  }

  .article-facts div {
    gap: .15rem;
    padding: 1rem 1.2rem 1rem 0;
    display: grid;
  }

  .article-facts div:not(:last-child) {
    border-right: 1px solid var(--surface-border);
    margin-right: 1.2rem;
  }

  .article-facts dt {
    color: var(--muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .75rem;
    font-weight: 720;
  }

  .article-facts dd {
    font-size: .83rem;
    font-weight: 680;
    color: #fff;
  }

  .article-layout {
    border-top: 1px solid var(--surface-border);
    padding-top: clamp(2.5rem,5vw,4rem);
  }

  .article-toc {
    top: 6.2rem;
  }

  .article-toc > p {
    color: #6a6863;
    letter-spacing: .09em;
    text-transform: uppercase;
    margin-bottom: .75rem;
    font-size: .75rem;
    font-weight: 740;
  }

  .article-toc ol {
    padding-left: 0;
  }

  .article-toc li {
    margin-left: -1px;
  }

  .article-prose strong {
    color: #fff;
  }

  .article-prose code {
    background: #0d0c0b;
    border: 1px solid var(--surface-border);
    color: #f4f1e9;
    border-radius: .2rem;
    padding: .12em .32em;
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    font-size: .88em;
  }

  .article-prose pre code {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 1em;
  }

  .related-content .section-kicker, .listing-header .section-kicker, .search-header .section-kicker {
    color: #ffd84d;
  }

  .related-content h2 {
    font-size: clamp(1.65rem,3vw,2.4rem);
  }

  .related-content {
    border-top: 1px solid var(--surface-border);
    max-width: 69rem;
    margin: clamp(4rem,8vw,7rem) auto 0;
    padding-top: clamp(2.5rem,5vw,4rem);
  }

  .related-content__heading {
    margin-bottom: 1.6rem;
  }

  .content-card-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 1rem;
    display: grid;
  }

  .content-card {
    background: var(--surface);
    min-height: 19rem;
    transition: border-color var(--transition),box-shadow var(--transition),transform var(--transition);
    border: 1px solid var(--surface-border);
    color: var(--text);
    flex-direction: column;
    padding: 1.35rem;
    display: flex;
  }

  .content-card__meta, .content-card__footer {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    display: flex;
  }

  .content-card__meta {
    color: #c1c0bb;
    letter-spacing: .045em;
    text-transform: uppercase;
    font-size: .75rem;
    font-weight: 700;
  }

  .content-card__meta time {
    text-align: right;
  }

  .content-card h2 {
    margin-top: 2.8rem;
    font-size: 1.3rem;
    line-height: 1.18;
  }

  .content-card h2 a {
    text-decoration: none;
  }

  .content-card > p {
    color: #e3e2df;
    margin-top: .75rem;
    font-size: .82rem;
  }

  .content-card__footer {
    margin-top: auto;
    padding-top: 1.5rem;
  }

  .content-card__footer > a {
    color: #ffd84d;
    align-items: center;
    gap: .4rem;
    min-height: 2.75rem;
    font-size: .78rem;
    font-weight: 720;
    text-decoration: none;
    display: inline-flex;
  }

  .listing-header, .search-header {
    max-width: 54rem;
    margin-bottom: clamp(3rem,7vw,5.5rem);
  }

    .search-form {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    max-width: 48rem;
    margin-top: 1.8rem;
    display: flex;
  }

  .search-form input {
    width: 100%;
    min-width: 0;
    color: #fff;
    background: 0 0;
    border: 0;
    outline: 0;
    padding: .9rem 1rem;
  }

  .search-form:focus-within {
    border-color: #7d7b71;
    box-shadow: 0 0 0 3px #7d7b712e;
  }

  .search-form button {
    background: var(--surface-raised);
    border-left: 1px solid var(--surface-border);
    color: #fff;
    cursor: pointer;
    flex: none;
    padding-inline: 1.25rem;
    font-weight: 720;
  }

  .search-summary {
    color: var(--muted);
    margin-bottom: 1.2rem;
    font-size: .82rem;
  }

  .search-results-page {
    gap: .8rem;
    list-style: none;
    display: grid;
  }

  .search-results-page .content-card {
    min-height: 0;
  }

  .error-shell {
    place-items: center;
    min-height: 68vh;
    display: grid;
  }

  .error-content {
    text-align: center;
    max-width: 45rem;
  }

  .error-code {
    color: #b38f00;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .75rem;
    font-weight: 760;
  }

  .error-actions {
    flex-wrap: wrap;
    justify-content: center;
    gap: .7rem;
    margin-top: 1.8rem;
    display: flex;
  }

  .error-actions .button--ghost {
    color: var(--text);
    border-color: var(--surface-border);
  }
}

@layer responsive {
  @media (max-width: 68rem) {

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

  @media (max-width: 52rem) {
    .shell {
      width: min(calc(100% - 2rem),var(--shell));
    }

    .article-toc {
      background: var(--surface);
      border: 1px solid var(--surface-border);
      position: static;
    }

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

    .article-facts div:nth-child(2) {
      border-right: 0;
      margin-right: 0;
    }

    .article-facts div:nth-child(-n+2) {
      border-bottom: 1px solid var(--surface-border);
    }
  }

  @media (max-width: 40rem) {
    html {
      scroll-padding-top: 5.3rem;
    }

    .section {
      padding-block: 5rem;
    }

    .brand__mark {
      width: 2.45rem;
      height: 2.45rem;
    }

    .site-header .brand__tagline, .header-search span {
      display: none;
    }

    .header-search {
      border: 1px solid var(--surface-border);
    }

    .wiki-search__field {
      gap: .55rem;
      min-height: 3.75rem;
      padding-left: .85rem;
    }

    .wiki-search button {
      min-height: 2.85rem;
      padding-inline: 1rem;
    }

    .wiki-search button span {
      display: none;
    }

    .site-footer__bottom {
      grid-template-columns: 1fr;
    }

    .site-footer__bottom p:last-child {
      text-align: left;
    }

    .content-card-grid {
      grid-template-columns: 1fr;
    }

    .content-card {
      min-height: 16rem;
    }

    .article-facts {
      grid-template-columns: 1fr;
    }

    .article-facts div, .article-facts div:not(:last-child) {
      border-bottom: 1px solid var(--surface-border);
      border-right: 0;
      margin-right: 0;
      padding-right: 0;
    }

    .article-facts div:last-child {
      border-bottom: 0;
    }

    .search-form {
      display: grid;
    }

    .search-form button {
      min-height: 3rem;
    }
  }

  @media (max-width: 29rem) {
    .shell {
      width: min(calc(100% - 1.5rem),var(--shell));
    }

    .wiki-search__field > .icon {
      display: none;
    }

    .wiki-search input {
      font-size: .9rem;
    }
  }
}

@layer accessibility {
  main:focus:not(:focus-visible) {
    outline: none;
  }

  @media (hover:hover) and (pointer:fine) {
    .button:hover {
      transform: translateY(-2px);
    }

    .button--ghost:hover {
      background: #ffffff0a;
      border-color: #67655d;
    }

    .desktop-nav a:hover, .header-search:hover, .mobile-nav a:hover {
      color: var(--text);
      background: #ffffff0d;
    }

    .wiki-search button:hover {
      background: #484741;
    }

    .footer-nav a[target=_blank]:hover .icon {
      color: var(--gold);
      transform: translate(.15rem,-.15rem) rotate(-45deg);
    }

    .content-card:hover {
      border-color: var(--gold);
      transform: translateY(-.18rem);
      box-shadow: 0 16px 34px #26252314;
    }

    .footer-nav a:hover {
      color: var(--text);
    }
  }

  @media (prefers-reduced-motion:reduce) {
    html {
      scroll-behavior: auto;
    }

    *, :before, :after {
      scroll-behavior: auto !important;
      transition-duration: .01ms !important;
      animation-duration: .01ms !important;
      animation-iteration-count: 1 !important;
    }
  }

  @media (forced-colors:active) {
    .brand__face, .site-footer__edition span {
      fill: canvastext;
      background: canvastext;
    }

    .button, .wiki-search__field {
      border: 1px solid canvastext;
    }
  }

  @media print {
    .site-header, .wiki-search, .site-footer {
      display: none;
    }

    body {
      color: #000;
      background: #fff;
    }

    .section {
      padding-block: 2rem;
    }
  }
}

@layer components {
  .section-kicker span {
    display: none;
  }

  .section-kicker {
    letter-spacing: .04em;
    text-transform: none;
    font-weight: 600;
  }

  .button {
    background: var(--gold);
    color: #0d0c0b;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 720;
    transition: background var(--transition),border-color var(--transition),transform var(--transition);
  }

  .button:hover {
    background: #ffd83d;
    color: #0d0c0b;
    border-color: #ffd83d;
    transform: none;
  }

  .button--ghost {
    border: 1px solid var(--surface-border);
    color: var(--text);
    background: transparent;
  }

  .button--ghost:hover {
    background: #ffffff14;
    border-color: #ffffff40;
    color: #fff;
  }

  .content-card {
    transition: border-color .18s ease,background-color .18s ease,box-shadow .18s ease;
  }

  .content-card:hover {
    transform: none;
    border-color: var(--gold);
    background: var(--surface-raised);
  }

  .content-card:hover h2 a, .content-card:hover h3 a {
    color: var(--gold);
  }

  .content-card:hover .content-card__footer > a {
    color: var(--gold);
  }

  .listing-header p {
    max-width: 42rem;
  }

  .wiki-faq {
    margin-top: 2.5rem;
    padding: 1.25rem 1.35rem 1.1rem;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-md);
  }

  .listing-header, .search-header {
    margin-bottom: 1.6rem;
  }

  .wiki-faq h2 {
    margin: 0 0 .85rem;
    font-size: 1.35rem;
    line-height: 1.25;
    color: #fff;
  }

  .wiki-faq details {
    border-top: 1px solid var(--surface-border);
    padding: .75rem 0;
  }

  .article-prose details {
    border-top: 1px solid var(--surface-border);
    border-top: 1px solid color-mix(in srgb,currentColor 18%,transparent);
    padding: .75rem 0;
  }

  .wiki-faq details:first-of-type, .article-prose details:first-of-type {
    border-top: 0;
    padding-top: .15rem;
  }

  .wiki-faq summary, .article-prose summary {
    cursor: pointer;
    font-weight: 650;
    list-style: none;
  }

  .wiki-faq summary {
    position: relative;
    padding-right: 1.8rem;
  }

  .wiki-faq summary:after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    translate: 0 -50%;
    font-weight: 500;
    color: var(--muted);
  }

  .wiki-faq details[open] summary:after {
    content: "−";
  }

  .wiki-faq summary::-webkit-details-marker,
  .wiki-faq summary::marker,
  .article-prose summary::-webkit-details-marker,
  .article-prose summary::marker {
    display: none;
  }

  .wiki-faq details p {
    margin: .55rem 0 0;
    color: #e3e2df;
    max-width: 48rem;
    line-height: 1.55;
  }

  .wiki-faq details a {
    text-decoration: underline;
    text-underline-offset: .14em;
  }

  .article-prose details p {
    margin: .55rem 0 0;
    max-width: 44rem;
  }

  .related-content__heading .section-kicker {
    margin-bottom: .35rem;
  }

  .site-footer__edition, .footer-nav > p, .site-footer__bottom {
    color: #c3c1bc;
  }

  .breadcrumbs {
    color: #c1c0bb;
    font-size: .76rem;
    font-weight: 640;
    margin-bottom: clamp(.75rem,1.6vw,1.15rem);
  }

  .breadcrumbs a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: #ffffff59;
  }

  .breadcrumbs a:hover {
    color: var(--gold);
    text-decoration-color: var(--gold);
  }

  .breadcrumbs li:not(:last-child):after {
    color: #89877d;
  }

  .breadcrumbs [aria-current=page] {
    color: var(--gold);
    font-weight: 700;
  }

  .search-summary {
    color: var(--muted);
  }

  .content-card__meta {
    color: #c1c0bb;
  }

  .listing-header > p:last-of-type {
    color: #e3e2df;
  }

  .wiki-lead, .wiki-shot, .wiki-infobox, .project-lead {
    margin: 0;
    background: #1d1c1a;
    border: 1px solid var(--surface-border);
    border-radius: .4rem;
    overflow: hidden;
  }

  .wiki-lead, .project-lead {
    margin: 0 0 clamp(1.5rem,3.4vw,2.2rem);
  }

  .wiki-lead img, .wiki-shot img, .wiki-infobox img, .project-lead img, .content-card__shot img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #22211f;
  }

  .wiki-article .wiki-lead img, .wiki-article .wiki-shot img, .wiki-article .wiki-infobox img {
    cursor: zoom-in;
  }

  .shot-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #10100ef2;
    cursor: zoom-out;
    overscroll-behavior: contain;
  }

  .shot-lightbox::backdrop {
    background: transparent;
  }

  .shot-lightbox img {
    max-width: min(100vw - 2rem,1600px);
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: .2rem;
    box-shadow: 0 18px 50px #0006;
    cursor: default;
  }

  .shot-lightbox__close {
    position: absolute;
    top: .85rem;
    right: .95rem;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #ffffff1a;
    color: #f4f1e9;
    cursor: pointer;
  }

  .shot-lightbox__close .icon {
    display: block;
    flex: none;
  }

  .shot-lightbox__close:hover {
    background: #ffffff2e;
  }

  /* On html, not body: see the note at html:has(.mobile-nav[open]). */
  html:has(> body.shot-lightbox-open) {
    overflow: hidden;
  }

  .article-prose .wiki-infobox {
    max-width: none;
  }

  .article-prose > .wiki-infobox:first-child {
    margin-bottom: 1.35rem;
  }

  .content-card {
    padding: 0;
    overflow: hidden;
  }

  .content-card__shot {
    display: block;
    border-bottom: 1px solid var(--surface-border);
    background: #242320;
  }

  .content-card__shot img {
    aspect-ratio: 16/9;
  }

  .content-card__meta, .content-card h2, .content-card h3, .content-card > p, .content-card__footer {
    padding-inline: 1.35rem;
  }

  .content-card__meta {
    padding-top: 1.05rem;
  }

  .content-card h2, .content-card h3 {
    margin-top: .85rem;
  }

  .content-card > p {
    padding-bottom: 0;
  }

  .content-card__footer {
    padding-bottom: 1.15rem;
  }

  .project-lead {
    max-width: none;
    margin: 0 0 1.6rem;
  }

  .listing-main .content-card-grid, .related-content .content-card-grid {
    grid-template-columns: 1fr;
    gap: .9rem;
  }

  .listing-main .content-card, .related-content .content-card, .search-results-page .content-card {
    display: grid;
    grid-template-columns: minmax(16rem,22rem) minmax(0,1fr);
    grid-template-rows: auto auto auto auto;
    align-items: center;
    min-height: 0;
  }

  .listing-main .content-card__shot, .related-content .content-card__shot, .search-results-page .content-card__shot {
    grid-column: 1;
    grid-row: 1/-1;
    align-self: stretch;
    display: flex;
    align-items: center;
    border-bottom: 0;
    border-right: 1px solid var(--surface-border);
    overflow: hidden;
    background: transparent;
  }

  .listing-main .content-card__shot img, .related-content .content-card__shot img, .search-results-page .content-card__shot img {
    width: 100%;
    height: auto;
    flex: none;
    display: block;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 16/9;
  }

  .listing-main .content-card__meta, .listing-main .content-card h2, .listing-main .content-card h3, .listing-main .content-card > p, .listing-main .content-card__footer, .related-content .content-card__meta, .related-content .content-card h2, .related-content .content-card h3, .related-content .content-card > p, .related-content .content-card__footer, .search-results-page .content-card__meta, .search-results-page .content-card h2, .search-results-page .content-card h3, .search-results-page .content-card > p, .search-results-page .content-card__footer {
    grid-column: 2;
  }

  .listing-main .content-card__meta, .related-content .content-card__meta, .search-results-page .content-card__meta {
    padding-top: 1.15rem;
  }

  .listing-main .content-card__footer, .related-content .content-card__footer, .search-results-page .content-card__footer {
    padding-bottom: 1.15rem;
  }

  .listing-main .content-card h2, .listing-main .content-card h3, .related-content .content-card h2, .related-content .content-card h3, .search-results-page .content-card h2, .search-results-page .content-card h3 {
    margin-top: .45rem;
  }

  @media (max-width: 40rem) {
    .listing-main .content-card, .related-content .content-card, .search-results-page .content-card {
      grid-template-columns: 1fr;
      grid-template-rows: auto;
    }

    .listing-main .content-card__shot, .listing-main .content-card__meta, .listing-main .content-card h2, .listing-main .content-card h3, .listing-main .content-card > p, .listing-main .content-card__footer, .related-content .content-card__shot, .related-content .content-card__meta, .related-content .content-card h2, .related-content .content-card h3, .related-content .content-card > p, .related-content .content-card__footer, .search-results-page .content-card__shot, .search-results-page .content-card__meta, .search-results-page .content-card h2, .search-results-page .content-card h3, .search-results-page .content-card > p, .search-results-page .content-card__footer {
      grid-column: auto;
      grid-row: auto;
    }

    .listing-main .content-card__shot, .related-content .content-card__shot, .search-results-page .content-card__shot {
      border-right: 0;
      border-bottom: 1px solid var(--surface-border);
    }

    .listing-main .content-card__shot img, .related-content .content-card__shot img, .search-results-page .content-card__shot img {
      height: auto;
      max-height: none;
      aspect-ratio: 16/9;
    }
  }
}

@layer overrides-a11y {
  .wiki-faq summary, .article-prose summary {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
  }

  .wiki-lead img, .wiki-shot img, .wiki-infobox img, .project-lead img {
    outline: none;
  }

  .wiki-lead img:focus-visible, .wiki-shot img:focus-visible, .wiki-infobox img:focus-visible, .project-lead img:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
  }

  svg.icon {
    flex: none;
    display: block;
    max-width: none;
  }

  svg.icon--glyph {
    filter: none;
  }

  .wiki-search__field svg.icon {
    color: var(--muted);
  }

  .wiki-search__field > .icon--glyph {
    filter: none;
    color: var(--muted);
  }

  .wiki-search input::placeholder {
    color: #a2a098;
    opacity: 1;
  }

  .search-form input::placeholder {
    color: #a2a098;
    opacity: 1;
  }

  .search-form button {
    transition: background var(--transition),color var(--transition);
  }

  .search-form button:hover {
    background: #353430;
    color: var(--gold);
  }

  .header-search svg.icon, .desktop-nav svg.icon, .mobile-nav svg.icon, .footer-nav svg.icon {
    color: currentColor;
  }

  .shot-lightbox:not([open]) {
    display: none;
  }

  .shot-lightbox[open] {
    display: flex;
  }

  .site-footer__bottom a[rel=license] {
    color: #d8d7d4;
    text-decoration-color: #8f8d84;
  }

  .search-results-page .content-card__shot img, .listing-main .content-card__shot img, .related-content .content-card__shot img {
    height: auto;
    min-height: 0;
    aspect-ratio: 16/9;
  }

  .content-card__shot img {
    transition: transform .35s ease;
  }

  @media (hover:hover) and (pointer:fine) {
    .button:hover, .content-card:hover {
      transform: none;
      box-shadow: none;
    }

    .content-card:hover .content-card__shot img {
      transform: scale(1.03);
    }
  }

  @media (prefers-reduced-motion:reduce) {
    .content-card__shot img {
      transition: none;
      transform: none !important;
    }
  }

  .error-main {
    overflow-x: clip;
  }

  .error-shell {
    display: block;
    min-height: 68vh;
    place-items: unset;
  }

  .error-content {
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .error-content h1, .error-lead, .error-links__title, .error-links__hint {
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .error-content h1 {
    max-width: none;
  }

  .error-lead, .error-content > p {
    max-width: min(100%,58rem);
  }

  .error-actions {
    justify-content: flex-start;
  }

  .error-actions .button {
    min-width: 0;
    max-width: 100%;
  }

  .error-links {
    margin-top: clamp(2.2rem,4vw,3.1rem);
  }

  .error-links h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.15rem,2vw,1.4rem);
    line-height: 1.25;
  }

  .error-links__grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: .75rem;
  }

  .error-links__grid > li {
    display: flex;
    min-width: 0;
  }

  .error-links__grid a {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .28rem;
    min-width: 0;
    min-height: 5.4rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
  }

  .error-links__grid a:hover {
    border-color: var(--gold);
    background: var(--surface-raised);
  }

  .error-links__grid a:focus-visible {
    outline: 2px solid var(--mint);
    outline: 2px solid color-mix(in srgb,var(--mint) 65%,var(--ink));
    outline-offset: 3px;
  }

  .error-links__title {
    font-weight: 650;
    line-height: 1.3;
  }

  .error-links__hint {
    color: var(--ink-soft);
    font-size: .92rem;
    line-height: 1.45;
  }

  @media (max-width:68rem) {
    .error-links__grid {
      grid-template-columns: repeat(2,minmax(0,1fr));
    }
  }

  @media (max-width:36rem) {
    .error-actions {
      display: grid;
      grid-template-columns: 1fr;
    }

    .error-actions .button {
      width: 100%;
      justify-content: center;
      text-align: center;
    }

    .error-links__grid {
      grid-template-columns: minmax(0,1fr);
    }
  }

  .wiki-article > .article-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 1.7rem;
    row-gap: .45rem;
    max-width: none;
    margin: 1.5rem 0 0;
    padding: .9rem 0 0;
    border: 0;
    border-top: 1px solid var(--surface-border);
    background: transparent;
  }

  .wiki-article > .article-facts > div, .wiki-article > .article-facts > div:not(:last-child), .wiki-article > .article-facts > div:nth-child(2), .wiki-article > .article-facts > div:nth-child(-n+2), .wiki-article > .article-facts > div:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .3rem .45rem;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .wiki-article > .article-facts dt {
    color: var(--muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .75rem;
    font-weight: 640;
  }

  .wiki-article > .article-facts dd {
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
  }

  .article-prose, .listing-header h1, .search-header h1 {
    overflow-wrap: break-word;
  }

  .article-prose code, .article-prose a {
    overflow-wrap: anywhere;
  }

  .listing-main .content-card-grid, .related-content .content-card-grid {
    grid-template-columns: minmax(0,1fr);
  }

  .listing-main .content-card, .related-content .content-card, .search-results-page .content-card, .article-layout, .site-header__inner, .brand, .brand__copy {
    min-width: 0;
  }

  @media (max-width: 52rem) {
    .listing-main .content-card, .related-content .content-card, .search-results-page .content-card {
      grid-template-columns: minmax(0,1fr);
      grid-template-rows: auto;
    }

    .listing-main .content-card__shot, .listing-main .content-card__meta, .listing-main .content-card h2, .listing-main .content-card h3, .listing-main .content-card > p, .listing-main .content-card__footer, .related-content .content-card__shot, .related-content .content-card__meta, .related-content .content-card h2, .related-content .content-card h3, .related-content .content-card > p, .related-content .content-card__footer, .search-results-page .content-card__shot, .search-results-page .content-card__meta, .search-results-page .content-card h2, .search-results-page .content-card h3, .search-results-page .content-card > p, .search-results-page .content-card__footer {
      grid-column: auto;
      grid-row: auto;
    }

    .listing-main .content-card__shot, .related-content .content-card__shot, .search-results-page .content-card__shot {
      border-right: 0;
      border-bottom: 1px solid var(--surface-border);
    }

    .listing-main .content-card__shot img, .related-content .content-card__shot img, .search-results-page .content-card__shot img {
      height: auto;
      max-height: none;
      min-height: 0;
      aspect-ratio: 16/9;
    }

    .article-prose {
      overflow-x: visible;
    }
  }

  @media (max-width: 40rem) {
    .wiki-search__field {
      min-width: 0;
    }
  }

  @media (forced-colors:active) {
    .site-footer__edition span {
      background: canvastext;
    }
  }
}

@layer components {
  .article-toc > p, .article-toc a {
    color: #c1c0bb;
  }

  .article-facts dt, .content-card__meta, .listing-header > span, .wiki-faq details p, .search-summary {
    color: #c1c0bb;
  }

  .article-facts dd {
    color: #fff;
  }

  .related-content .section-kicker, .listing-header .section-kicker, .search-header .section-kicker {
    color: #ffd84d;
  }

  .error-code {
    color: var(--gold);
  }

  .wiki-faq summary, .article-prose summary {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
  }

}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #10100fed;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 4px 20px #00000059;
  transition: background .25s ease,border-color .25s ease,box-shadow .25s ease;
}

@supports (backdrop-filter:blur(12px)) or (-webkit-backdrop-filter:blur(12px)) {
  .site-header {
    background: #10100fd1;
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    backdrop-filter: blur(16px) saturate(170%);
  }
}

/* Три колонки по 1fr + auto: меню строго по центру страницы, логотип и кнопки — у краёв */
.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  min-height: 4.5rem;
  gap: 1.5rem;
  min-width: 0;
}

.site-header__inner > .brand {
  justify-self: start;
}

.site-header__inner > .site-header__actions {
  justify-self: end;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  outline: none;
  border-radius: var(--radius-sm);
  transition: opacity .2s ease,transform .2s ease;
}

.brand:hover {
  opacity: .95;
}

.brand:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.brand__mark {
  width: 2.6rem;
  height: 2.6rem;
  flex-shrink: 0;
  overflow: visible;
  filter: drop-shadow(0 2px 8px rgba(255,204,0,.25));
  transition: filter .25s ease;
}

.brand:hover .brand__mark {
  filter: drop-shadow(0 4px 14px rgba(255,204,0,.45));
}

.brand__mouth {
  fill: none;
  stroke: #421d03;
  stroke-linecap: round;
  stroke-width: 2.1px;
}

.brand__eye {
  fill: #421d03;
}

.brand__shine {
  fill: #99631b;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  gap: .08rem;
  line-height: 1.1;
  min-width: 0;
}

.brand__name {
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -.02em;
  color: #f9f9f8;
  white-space: nowrap;
}

.brand__name strong {
  color: var(--gold);
  font-weight: 800;
  text-shadow: 0 0 16px rgba(255,204,0,.35);
}

.brand__tagline {
  font-size: .75rem;
  font-weight: 680;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  margin-inline: auto;
  min-width: 0;
}

.desktop-nav ul {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.desktop-nav a {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 2.35rem;
  padding: .42rem .72rem;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #d1d0cc;
  text-decoration: none;
  border-radius: .45rem;
  transition: color .18s ease,background-color .18s ease,box-shadow .18s ease;
  outline: none;
  white-space: nowrap;
}

.desktop-nav a:hover {
  color: #fff;
  background: #ffffff12;
}

.desktop-nav a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.desktop-nav a[aria-current] {
  color: #fff5cd;
  background: #ffcc0024;
  font-weight: 680;
  box-shadow: inset 0 0 0 1px #ffcc0047,0 2px 10px #ffcc001f;
  text-decoration: none;
}

.desktop-nav a[aria-current]:after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translate(-50%);
  width: 1.1rem;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  box-shadow: 0 0 6px var(--gold);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}

.header-search {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.45rem;
  padding: .42rem .75rem .42rem .65rem;
  font-size: .84rem;
  font-weight: 600;
  color: #c3c2bd;
  text-decoration: none;
  background: #ffffff0a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
  transition: background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease;
  outline: none;
  white-space: nowrap;
}

.header-search:hover {
  color: #fff;
  background: #ffffff14;
  border-color: #ffcc004d;
  box-shadow: 0 2px 12px #00000040;
}

.header-search:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.header-search svg.icon {
  color: #a2a099;
  transition: color .18s ease;
}

.header-search:hover svg.icon {
  color: var(--gold);
}

.header-search[aria-current] {
  color: var(--gold);
  border-color: #ffcc0066;
  background: #ffcc001a;
  text-decoration: none;
}

/* YouTube и Telegram рядом с поиском: квадратные кнопки в стиле .header-search, логотипы в фирменных цветах */
.header-social {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-social li {
  display: flex;
}

.header-social__link {
  --social-glow: rgba(255,255,255,.12);
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  color: #fff;
  background: #ffffff0a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
  outline: none;
  transition: background .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.header-social__link--youtube {
  --social-glow: rgba(255,0,51,.38);
  --social-border: rgba(255,59,92,.55);
}

.header-social__link--telegram {
  --social-glow: rgba(42,171,238,.38);
  --social-border: rgba(55,187,254,.55);
}

.header-social__link svg.icon {
  display: block;
  filter: saturate(.92);
  transition: transform .18s ease,filter .18s ease;
}

.header-social__link:hover {
  background: #ffffff14;
  border-color: var(--social-border);
  box-shadow: 0 2px 14px var(--social-glow);
}

.header-social__link:hover svg.icon {
  filter: saturate(1.1) drop-shadow(0 0 6px var(--social-glow));
  transform: translateY(-1px) scale(1.06);
}

.header-social__link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.icon--youtube__body {
  fill: #ff0033;
}

.icon--youtube__play, .icon--telegram__plane {
  fill: #fff;
}

@media (forced-colors:active) {
  .icon--youtube__body, .icon--telegram__body {
    fill: canvastext;
  }

  .icon--youtube__play, .icon--telegram__plane {
    fill: canvas;
  }
}

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  padding: 0;
  color: #e8e7e5;
  background: #ffffff0a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .5rem;
  cursor: pointer;
  list-style: none;
  transition: background .18s ease,border-color .18s ease,color .18s ease,transform .15s ease;
  outline: none;
}

.mobile-nav summary::-webkit-details-marker, .mobile-nav summary::marker {
  display: none;
}

.mobile-nav summary:hover {
  background: #ffffff14;
  border-color: #ffcc004d;
  color: #fff;
}

.mobile-nav summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.mobile-nav[open] .icon--menu {
  display: none;
}

.mobile-nav summary::after {
  content: "×";
  display: none;
  font-size: 1.65rem;
  font-weight: 400;
  line-height: .8;
}

.mobile-nav[open] summary::after {
  display: block;
  animation: iconSpinIn .2s cubic-bezier(.16, 1, .3, 1);
}

.mobile-nav[open] summary {
  background: #ffcc0024;
  border-color: #ffcc0066;
  color: var(--gold);
}

@keyframes iconSpinIn {
  0% {
    transform: rotate(-45deg) scale(.8);
    opacity: 0;
  }

  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

/* Lock scrolling on html, not body: on phones html has overflow-x: clip, so an overflow
   on body no longer reaches the viewport, body becomes its own scroll box and the sticky
   header with the open menu jumps to the top of the page, off screen. */
html:has(.mobile-nav[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

body:has(.mobile-nav[open])::before {
  content: "";
  position: fixed;
  z-index: 90;
  inset: 0;
  background: #090908a6;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: backdropFadeIn .2s ease;
}

@keyframes backdropFadeIn {
  0% {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.mobile-nav__panel {
  position: absolute;
  top: calc(100% + .6rem);
  right: 0;
  width: min(21.5rem,calc(100vw - 2rem));
  max-height: calc(100vh - 5.5rem);
  max-height: min(calc(100vh - 5.5rem),calc(100dvh - 5.5rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #191917;
  border: 1px solid rgba(255,204,0,.28);
  border-radius: .75rem;
  padding: .75rem;
  box-shadow: 0 16px 48px #000000bf,0 0 0 1px #ffffff0f;
  z-index: 100;
}

@supports (backdrop-filter:blur(16px)) or (-webkit-backdrop-filter:blur(16px)) {
  .mobile-nav__panel {
    background: #161614fa;
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
  }
}

.mobile-nav[open] .mobile-nav__panel {
  display: block;
  animation: mobileNavIn .2s cubic-bezier(.16,1,.3,1);
}

@keyframes mobileNavIn {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mobile-nav__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .45rem .65rem .7rem;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: .35rem;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #88c094;
  font-size: .75rem;
  font-weight: 700;
}

.status-dot:before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: #88c094;
  box-shadow: 0 0 8px #88c094;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.85rem;
  padding: .6rem .85rem;
  font-size: .95rem;
  font-weight: 600;
  color: #dcdcd9;
  text-decoration: none;
  border-radius: .5rem;
  transition: background .15s ease,color .15s ease,transform .15s ease;
  outline: none;
}

.mobile-nav a:hover {
  color: #fff;
  background: #ffffff12;
  transform: translate(2px);
}

.mobile-nav a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.mobile-nav a svg.icon--arrow {
  color: #7a776e;
  transition: color .15s ease,transform .15s ease;
  flex-shrink: 0;
}

.mobile-nav a:hover svg.icon--arrow {
  color: var(--gold);
  transform: translate(3px);
}

.mobile-nav a[aria-current] {
  color: #fff8da;
  background: #ffcc0024;
  border-left: 3px solid var(--gold);
  border-radius: 0 .5rem .5rem 0;
  font-weight: 700;
  text-decoration: none;
}

.mobile-nav a[aria-current] svg.icon--arrow {
  color: var(--gold);
}

.mobile-nav li:last-child {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: .4rem;
  padding-top: .4rem;
}

@media (min-width: 68.001rem) and (max-width: 76rem) {
  .desktop-nav a {
    padding-inline: .52rem;
    font-size: .82rem;
  }

  .site-header__inner {
    gap: .75rem;
  }
}

@media (max-width: 68rem) {
  .site-header__inner {
    display: flex;
    justify-content: space-between;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .site-header__actions {
    margin-left: auto;
  }
}

@media (max-width: 52rem) {
  .site-header__inner {
    min-height: 4.15rem;
  }
}

@media (max-width: 40rem) {
  .site-header .brand__tagline, .header-search span {
    display: none;
  }

  .header-search {
    width: 2.55rem;
    height: 2.55rem;
    min-height: 2.55rem;
    padding: 0;
    justify-content: center;
  }

  .header-social__link {
    width: 2.55rem;
    height: 2.55rem;
  }
}

@media (max-width: 29rem) {
  .brand {
    gap: .55rem;
  }

  .brand__mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  .brand__name {
    font-size: .96rem;
  }

  .site-header__actions {
    gap: .45rem;
  }

  .header-search, .mobile-nav summary, .header-social__link {
    width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
  }

  .header-social {
    gap: .45rem;
  }

  .mobile-nav__panel {
    width: calc(100vw - 1.5rem);
    right: 0;
  }
}

/* Логотип и четыре кнопки (YouTube, Telegram, поиск, меню) не влезают в строку уже на 360px: ужимаем всё вместе */
@media (max-width: 23.75rem) {
  .site-header__inner {
    gap: .5rem;
  }

  .brand {
    gap: .45rem;
  }

  .brand__mark {
    width: 2.1rem;
    height: 2.1rem;
  }

  .brand__name {
    font-size: .9rem;
  }

  .site-header__actions, .header-social {
    gap: .3rem;
  }

  .header-search, .mobile-nav summary, .header-social__link {
    width: 2.3rem;
    height: 2.3rem;
    min-height: 2.3rem;
  }

  .header-social__link svg.icon {
    width: 20px;
    height: 20px;
  }
}

@media (prefers-reduced-motion:reduce) {
  .mobile-nav[open] .mobile-nav__panel, body:has(.mobile-nav[open])::before, .mobile-nav[open] summary::after, .brand__mark, .desktop-nav a, .header-search, .header-social__link, .header-social__link svg.icon {
    animation: none !important;
    transition: none !important;
  }
}

/* Footer */
.site-footer {
  padding-top: 2.1rem;
}

.site-footer__brand p {
  max-width: 36rem;
  margin-top: .55rem;
}

.site-footer__edition {
  margin-top: .7rem;
}

.site-footer__navs {
  display: grid;
  gap: .85rem;
  margin-top: 1.25rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}

.site-footer .footer-nav > p {
  margin-bottom: .15rem;
}

.site-footer .footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.site-footer .footer-nav a {
  min-height: 2.75rem;
  padding-inline: 0 1.15rem;
}

.site-footer__bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
  padding-block: 1.05rem;
  max-width: 46rem;
  font-size: .75rem;
  line-height: 1.5;
}

.site-footer__bottom p:last-child {
  text-align: left;
}

/* Home */
.home-main {
  background: var(--bg);
  color: var(--text);
}

.home-portal {
  position: relative;
  color: var(--text);
  background: #0d0c0b;
  overflow: hidden;
}

.home-portal:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 90% at 50% -10%,rgba(255,204,0,.16),transparent 62%),radial-gradient(ellipse 55% 80% at 92% 45%,#1d1c1a,#0b0b0b 64%),linear-gradient(180deg,#121212,#0b0b0b);
}

.home-portal__stage {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 0;
  padding: clamp(1.1rem,2.4vw,1.55rem)0;
}

.home-portal__copy {
  position: relative;
  z-index: 1;
  padding: 0;
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}

.home-portal h1 {
  margin: 0;
  max-width: none;
  color: #faf6e7;
  font-size: clamp(2.05rem,4.2vw,3.15rem);
  line-height: .96;
  letter-spacing: -.04em;
  text-shadow: 0 8px 22px #00000059;
}

.home-portal__lead {
  margin: .7rem auto 0;
  max-width: 34rem;
  color: #ddddda;
  font-size: clamp(.95rem,1.35vw,1.05rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.home-portal .wiki-search {
  margin-top: 1.15rem;
  margin-inline: auto;
  max-width: 38rem;
  text-align: left;
}

.home-portal .wiki-search__field {
  min-width: 0;
  min-height: 3.2rem;
  border: 1px solid #41403b;
  border-radius: .22rem;
  background: #161514;
  box-shadow: 0 14px 34px #00000052;
  padding: .28rem .28rem .28rem .9rem;
  color: #fff;
}

.home-portal .wiki-search input {
  font-size: 1rem;
  color: #fff;
}

.home-portal .wiki-search input::placeholder {
  color: #a2a098;
}

.home-portal .wiki-search__field:focus-within {
  border-color: #ffcc00;
  box-shadow: 0 0 0 3px #ffcc003d,0 14px 34px #00000052;
}

.home-portal .wiki-search button {
  min-height: 2.55rem;
  padding-inline: 1.1rem;
  border-radius: .16rem;
  background: #2c2b28;
  border: 1px solid #4f4e48;
  color: #fff;
}

.home-portal .wiki-search button:hover {
  background: #393834;
}

.home-portal .wiki-search__help {
  gap: .4rem;
  margin-top: .65rem;
  justify-content: center;
}

.home-portal .wiki-search__help a {
  min-height: 1.75rem;
  padding: .12rem .62rem;
  border: 1px solid #ffffff2e;
  border-radius: .16rem;
  background: #ffffff14;
  color: #ededeb;
  font-size: .75rem;
  text-decoration: none;
}

.home-section-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: .35rem 1.2rem;
  margin-bottom: .85rem;
}

.home-section-head h2 {
  margin: 0;
  grid-column: 1;
  font-size: clamp(1.28rem,2vw,1.55rem);
  line-height: 1.15;
  letter-spacing: -.03em;
}

.home-section-head h2:before, .home-faq__intro h2:before, .project-block h2:before, .project-faq h2:before {
  content: "";
  display: block;
  width: var(--mark-w);
  height: var(--mark-h);
  margin-bottom: var(--mark-gap);
  background: var(--gold);
  border-radius: 1px;
}

.home-start .home-section-head h2:before {
  content: none;
  display: none;
}

.home-section-head__link {
  grid-column: 2;
  grid-row: 1/span 2;
  align-self: center;
  color: #ffd84d;
  font-size: .82rem;
  font-weight: 680;
  text-decoration: none;
  min-height: 2.4rem;
  display: inline-flex;
  align-items: center;
  transition: color .15s ease;
}

.home-section-head__link:hover {
  color: var(--gold);
}

.home-start, .home-featured, .home-catalog, .home-faq {
  padding: clamp(1.25rem,2.6vw,1.75rem)0 0;
}

.home-faq {
  padding-bottom: clamp(2.1rem,4vw,3rem);
}

.home-start__grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .75rem;
}

.home-start__card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  border-radius: .28rem;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease,background-color .15s ease;
}

.home-start__media {
  margin: 0;
  aspect-ratio: 16/8.2;
  overflow: hidden;
  background: #191816;
}

.home-start__media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transition: transform .4s ease;
}

.home-start__body {
  display: grid;
  gap: .22rem;
  padding: .7rem .85rem .85rem;
}

.home-start__label {
  color: #c1c0bb;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.home-start__name {
  font-size: 1.02rem;
  font-weight: 730;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.home-start__desc {
  color: var(--ink-soft);
  font-size: .82rem;
  line-height: 1.4;
}

.home-featured__grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .75rem;
}

.home-article {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: .55rem;
  border: 1px solid var(--surface-border);
  border-radius: .28rem;
  background: var(--surface);
  transition: border-color .15s ease,background-color .15s ease;
}

.home-article__shot {
  display: block;
  overflow: hidden;
  border-radius: .18rem;
  background: #191816;
  aspect-ratio: 16/9;
}

.home-article__shot img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform .4s ease;
}

.home-article__meta {
  margin-top: .7rem;
  color: #c1c0bb;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.home-article h3 {
  margin: .35rem 0 0;
  font-size: .98rem;
  line-height: 1.22;
  letter-spacing: -.02em;
}

.home-article h3 a {
  color: inherit;
  text-decoration: none;
}

.home-article > p {
  margin: .35rem 0 0;
  color: var(--ink-soft);
  font-size: .8rem;
  line-height: 1.4;
}

.home-catalog__layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(15rem,20rem);
  gap: 1rem 1.25rem;
  align-items: start;
}

.home-catalog__main {
  display: contents;
}

.home-catalog__main > .home-section-head {
  grid-column: 1/-1;
}

.home-catalog__main > .home-dir {
  grid-column: 1;
  grid-row: 2;
}

.home-catalog__layout > .home-aside {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

.home-dir {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--surface-border);
  border-radius: .28rem;
  background: var(--surface);
  overflow: hidden;
}

.home-dir li+li {
  border-top: 1px solid var(--surface-border);
}

.home-dir__item {
  display: grid;
  grid-template-columns: 5.25rem minmax(0,1fr) auto;
  align-items: center;
  gap: .85rem;
  min-height: 4.4rem;
  padding: .45rem .75rem .45rem .45rem;
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease;
}

.home-dir__item img {
  width: 5.25rem;
  height: 3.45rem;
  max-width: none;
  object-fit: cover;
  border-radius: .16rem;
  background: #191816;
}

.home-dir__copy {
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.home-dir__name {
  font-size: .95rem;
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.home-dir__desc {
  color: var(--ink-soft);
  font-size: .78rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-dir__item .icon {
  color: var(--muted);
}

.home-aside {
  overflow: hidden;
  border: 1px solid #373631;
  border-radius: .28rem;
  background: #191816;
  color: #f4f1e9;
  transition: border-color .15s ease,background-color .15s ease;
}

.home-aside__link {
  display: grid;
  color: inherit;
  text-decoration: none;
}

.home-aside__shot {
  margin: 0;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #10100f;
}

.home-aside__shot img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: left center;
  transition: transform .4s ease;
}

.home-aside__body {
  padding: 1rem 1.05rem 1.15rem;
}

.home-aside__kicker {
  margin: 0;
  color: #b0aea8;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.home-aside__title {
  margin: .35rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.home-aside__text {
  margin: .45rem 0 0;
  color: #cfceca;
  font-size: .84rem;
  line-height: 1.45;
}

.home-aside__cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .85rem;
  min-height: 2.4rem;
  color: #ffe27a;
  font-size: .84rem;
  font-weight: 700;
  transition: color .15s ease;
}

.home-faq__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  align-items: start;
}

.home-faq__intro h2 {
  margin: 0;
  font-size: clamp(1.28rem,2vw,1.55rem);
  line-height: 1.15;
  letter-spacing: -.03em;
}

.home-faq__intro p {
  margin: .45rem 0 0;
  color: var(--ink-soft);
  font-size: .86rem;
  line-height: 1.4;
}

.home-faq .wiki-faq {
  margin-top: 0;
  padding: .15rem 0 0;
  border: 0;
  border-top: 1px solid var(--surface-border);
  background: transparent;
  border-radius: 0;
}

.home-faq .wiki-faq details {
  border-top: 0;
  border-bottom: 1px solid var(--surface-border);
  padding: .05rem 0;
}

.home-faq .wiki-faq summary {
  font-size: .95rem;
  padding-block: .55rem;
  color: var(--text);
  transition: color .15s ease;
}

.home-faq .wiki-faq details[open] summary {
  color: var(--gold);
}

.home-faq .wiki-faq details p {
  max-width: 44rem;
  padding-bottom: .45rem;
  font-size: .9rem;
}

.home-dir__item:focus-visible, .home-start__card:focus-visible, .home-article h3 a:focus-visible, .home-section-head__link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.home-aside__link:focus-visible {
  outline: none;
}

.home-aside:has(.home-aside__link:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@media (hover:hover) and (pointer:fine) {
  .home-portal .wiki-search button:hover {
    background: #3e3d38;
  }

  .home-portal .wiki-search__help a:hover {
    border-color: #ffcc0099;
    background: #ffcc0024;
    color: #ffefad;
  }

  .home-start__card:hover, .home-article:hover {
    border-color: var(--gold);
    background: var(--surface-raised);
  }

  .home-start__card:hover .home-start__media img, .home-article:hover .home-article__shot img {
    transform: scale(1.04);
  }

  .home-dir__item:hover {
    background: var(--surface-raised);
  }

  .home-dir__item:hover .home-dir__name, .home-article:hover h3 a, .home-section-head__link:hover {
    color: var(--gold);
  }

  .home-aside:hover {
    border-color: var(--gold);
    background: #1e1e1c;
  }

  .home-aside:hover .home-aside__shot img {
    transform: scale(1.04);
  }

  .home-aside:hover .home-aside__cta {
    color: #ffefad;
  }

  .home-faq .wiki-faq summary:hover {
    color: var(--gold);
  }
}

@media (prefers-reduced-motion:reduce) {
  .home-start__media img, .home-article__shot img, .home-aside__shot img {
    transition: none;
  }

  .home-start__card:hover .home-start__media img, .home-article:hover .home-article__shot img, .home-aside:hover .home-aside__shot img {
    transform: none;
  }
}

@media (max-width: 68rem) {
  .home-portal__stage {
    padding: .75rem 0 1rem;
  }

  .home-portal h1 {
    max-width: none;
    font-size: clamp(1.75rem,7vw,2.2rem);
  }

  .home-portal__lead {
    margin-top: .45rem;
    font-size: .92rem;
  }

  .home-portal .wiki-search {
    margin-top: .85rem;
  }

  .home-start__grid, .home-featured__grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-catalog__layout {
    grid-template-columns: 1fr;
  }

  .home-catalog__main > .home-section-head, .home-catalog__main > .home-dir, .home-catalog__layout > .home-aside {
    grid-column: 1;
    grid-row: auto;
  }

  .home-aside {
    display: grid;
    grid-template-columns: minmax(10rem,16rem) minmax(0,1fr);
  }

  .home-aside__shot {
    height: 100%;
    aspect-ratio: auto;
  }

  .home-aside__shot img {
    object-position: left center;
  }

  .home-faq__layout {
    grid-template-columns: 1fr;
    gap: .55rem;
  }

  .home-section-head {
    grid-template-columns: 1fr;
  }

  .home-section-head__link {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

@media (max-width: 52rem) {
  .home-start, .home-featured, .home-catalog, .home-faq {
    padding-top: 1.35rem;
  }

  .home-dir__item {
    grid-template-columns: 4.6rem minmax(0,1fr) auto;
    gap: .7rem;
  }

  .home-dir__item img {
    width: 4.6rem;
    height: 3.05rem;
  }
}

@media (max-width: 40rem) {
  .home-portal h1 {
    font-size: clamp(1.7rem,8vw,2.1rem);
  }

  .home-portal .wiki-search__field {
    min-height: 3rem;
    padding-left: .7rem;
  }

  .home-start__grid, .home-featured__grid, .home-aside {
    grid-template-columns: 1fr;
  }

  .home-aside__shot {
    aspect-ratio: 16/9;
  }

  .home-dir__desc {
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }
}

@media (max-width: 29rem) {
  .home-portal__stage {
    padding: .65rem 0 .9rem;
  }

  .home-portal .wiki-search__help a {
    font-size: .75rem;
    padding-inline: .52rem;
  }

  .home-dir__item .icon {
    display: none;
  }

  .home-dir__item {
    grid-template-columns: 4.2rem minmax(0,1fr);
  }
}

/* Project */
.project-intro {
  max-width: 54rem;
  margin-bottom: clamp(1.8rem,4vw,2.8rem);
}

.project-intro .section-kicker {
  color: #ffd84d;
}

.project-intro h1 {
  font-size: clamp(2.55rem,6vw,5rem);
  line-height: .98;
  letter-spacing: -.04em;
}

.project-intro__lead {
  max-width: 42rem;
  margin-top: 1.15rem;
  color: var(--ink-soft);
  font-size: clamp(1rem,1.7vw,1.15rem);
  line-height: 1.7;
}

.project-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.45rem;
}

.project-intro__actions a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.55rem;
  padding: .45rem 1rem;
  border: 1px solid var(--surface-border);
  border-radius: .22rem;
  background: var(--surface);
  color: var(--text);
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
  transition: border-color .2s ease,background .2s ease,color .2s ease;
}

.project-intro__actions a:first-child {
  border-color: #272623;
  background: #272623;
  color: #f4f1e9;
}

.project-intro__actions a svg {
  flex: none;
}

.project-stage {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(16rem,.85fr);
  gap: clamp(1rem,2.5vw,1.6rem);
  align-items: stretch;
  margin-bottom: clamp(2.2rem,5vw,3.4rem);
}

.project-stage .project-lead {
  display: flex;
  flex-direction: column;
  margin: 0;
  height: 100%;
}

.project-stage .project-lead img {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 16rem;
  object-fit: cover;
}

.project-lead figcaption {
  flex: none;
  margin: 0;
  padding: .75rem .95rem .85rem;
  color: #e3e2df;
  font-size: .84rem;
  line-height: 1.45;
}

.project-snapshot {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  margin: 0;
  border: 1px solid var(--surface-border);
  border-radius: .4rem;
  background: var(--surface);
  overflow: hidden;
  align-self: stretch;
}

.project-snapshot > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
  min-height: 0;
  padding: 1.15rem 1.25rem;
  border-top: 1px solid var(--surface-border);
}

.project-snapshot > div:first-child {
  border-top: 0;
}

.project-snapshot dt {
  color: var(--gold);
  font-size: .75rem;
  font-weight: 760;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.project-snapshot dd {
  margin: 0;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.project-snapshot dd span {
  display: block;
  margin-top: .2rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
}

.project-block {
  max-width: 46rem;
  padding-block: clamp(1.5rem,3.2vw,2.1rem);
  border-top: 1px solid var(--surface-border);
}

.project-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.project-block h2 {
  margin: 0;
  font-size: clamp(1.45rem,2.5vw,1.9rem);
  line-height: 1.15;
  letter-spacing: -.03em;
}

.project-block p {
  margin-top: .9rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.project-block a {
  color: #ffd84d;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

.project-block a:hover {
  color: var(--gold);
}

.project-rules {
  list-style: none;
  display: grid;
  gap: .85rem;
  margin: 1.25rem 0 0;
  padding: 0;
  counter-reset: project-rule;
}

.project-rules li {
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem minmax(0,1fr);
  column-gap: .85rem;
  row-gap: .25rem;
  align-items: start;
  padding: .95rem 0;
  border-bottom: 1px solid var(--surface-border);
  counter-increment: project-rule;
}

.project-rules li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-rules li:before {
  content: counter(project-rule,decimal-leading-zero);
  grid-column: 1;
  grid-row: 1/span 2;
  color: var(--gold);
  font-size: .95rem;
  font-weight: 760;
  letter-spacing: .04em;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.project-rules strong {
  grid-column: 2;
  display: block;
  color: #fff;
  font-size: 1.02rem;
  letter-spacing: -.02em;
}

.project-rules p {
  grid-column: 2;
  margin: 0;
  color: #e3e2df;
  font-size: .92rem;
  line-height: 1.6;
}

.project-faq {
  margin-top: clamp(1.2rem,3vw,2rem);
  padding-top: clamp(1.5rem,3.2vw,2.1rem);
  border-top: 1px solid var(--surface-border);
}

.project-faq__layout {
  display: grid;
  grid-template-columns: minmax(11rem,15rem) minmax(0,1fr);
  gap: 1.2rem 2.4rem;
  align-items: start;
}

.project-faq h2 {
  margin: 0;
  font-size: clamp(1.45rem,2.4vw,1.85rem);
  line-height: 1.15;
  letter-spacing: -.03em;
}

.project-faq .wiki-faq {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--surface-border);
  background: transparent;
  border-radius: 0;
}

.project-faq .wiki-faq details {
  border-top: 0;
  border-bottom: 1px solid var(--surface-border);
  padding: .15rem 0;
}

.project-faq .wiki-faq summary {
  font-size: 1.02rem;
  color: var(--text);
  transition: color .15s ease;
}

.project-faq .wiki-faq summary:hover, .project-faq .wiki-faq details[open] summary {
  color: var(--gold);
}

.project-faq .wiki-faq details p {
  max-width: 42rem;
  padding-bottom: .55rem;
}

.project-next {
  margin-top: clamp(2rem,4vw,3rem);
  padding-top: clamp(1.5rem,3vw,2rem);
  border-top: 1px solid var(--surface-border);
}

.project-next > p.section-kicker {
  margin-bottom: .55rem;
}

.project-next h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem,2.2vw,1.7rem);
  letter-spacing: -.03em;
}

.project-next__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}

.project-next__list a {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 4.1rem;
  padding: .95rem 1.05rem;
  border: 1px solid var(--surface-border);
  border-radius: .28rem;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease,background .2s ease,transform .2s ease;
}

.project-next__list strong {
  display: block;
  font-size: 1.02rem;
  letter-spacing: -.02em;
}

.project-next__list span span {
  display: block;
  margin-top: .2rem;
  color: var(--ink-soft);
  font-size: .84rem;
  line-height: 1.45;
  font-weight: 500;
}

.project-next__list svg {
  color: var(--gold);
}

@media (hover:hover) and (pointer:fine) {
  .project-intro__actions a:hover, .project-intro__actions a:first-child:hover {
    border-color: var(--gold);
    background: var(--surface-raised);
    color: #fff;
  }

  .project-next__list a:hover {
    border-color: var(--gold);
    background: var(--surface-raised);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion:reduce) {
  .project-intro__actions a, .project-next__list a {
    transition: none;
  }

  .project-next__list a:hover {
    transform: none;
  }
}

@media (max-width: 68rem) {
  .project-stage {
    grid-template-columns: 1fr;
  }

  .project-stage .project-lead img {
    min-height: 14rem;
    max-height: 22rem;
  }

  .project-faq__layout {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
}

@media (max-width: 40rem) {
  .project-snapshot {
    grid-template-rows: none;
  }

  .project-snapshot > div {
    min-height: 4.75rem;
  }

  .project-intro__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .project-intro__actions a {
    justify-content: center;
  }
}

/* Listings */
.listing-main .listing-header {
  margin: 0;
  max-width: none;
  padding: clamp(1.15rem,2.4vw,1.65rem) clamp(1.15rem,2.6vw,1.85rem) clamp(1.25rem,2.6vw,1.75rem);
}

.listing-main .listing-header h1 {
  font-size: clamp(1.95rem,4.2vw,3.05rem);
  line-height: 1.02;
  letter-spacing: -.03em;
}

.listing-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .85rem 1.5rem;
  margin-top: .85rem;
}

.listing-header__lead {
  max-width: 40rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem,1.55vw,1.08rem);
  line-height: 1.6;
}

.listing-header__meta {
  margin: 0;
  max-width: none;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  flex: none;
}

.listing-header__meta span {
  color: #c1c0bb;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  padding: .35rem .6rem;
  font-size: .75rem;
  font-weight: 680;
  display: inline-flex;
}

.listing-stage {
  margin: .35rem 0 clamp(1.7rem,3.6vw,2.5rem);
  padding: 0;
  border: 1px solid var(--surface-border);
  border-radius: .45rem;
  background: var(--paper-card);
  overflow: hidden;
  max-width: none;
}

.listing-stage__media {
  margin: 0;
  background: #22211f;
  border: 0;
  border-bottom: 1px solid var(--surface-border);
  border-radius: 0;
  overflow: hidden;
}

.listing-stage__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 21/8;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #22211f;
}

.listing-materials {
  margin-top: 0;
}

.listing-materials__title {
  margin: 0 0 1rem;
  font-size: clamp(1.12rem,2vw,1.32rem);
  font-weight: 760;
  letter-spacing: -.02em;
  color: var(--ink);
}

.listing-materials__title:before {
  content: "";
  display: inline-block;
  width: var(--mark-w);
  height: var(--mark-h);
  margin-right: var(--mark-gap);
  vertical-align: .15em;
  background: var(--gold);
}

@media (max-width: 52rem) {
  .listing-stage__media img {
    aspect-ratio: 16/8;
  }
}

@media (max-width: 40rem) {
  .listing-stage__media img {
    aspect-ratio: 16/9;
    max-height: 13.5rem;
  }

  .listing-header__row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Articles */
/* Блок скачивания — жёлтая полоса во всю ширину: значок формата, название, тёмная кнопка.
   Нажать можно на всю полосу. */
.download-panel {
  position: relative;
  margin: 1.5rem 0 0;
  padding: .75rem .8rem;
  border: 1px solid #ffe066;
  border-radius: .6rem;
  background: linear-gradient(100deg, #ffdb4d 0%, #ffcc00 55%, #f7b900 100%);
  box-shadow: inset 0 1px 0 #ffffff8c, 0 14px 34px -20px #ffcc0099;
  color: #111;
  transition: box-shadow .18s ease, transform .18s ease, filter .18s ease;
}

.download-panel:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: inset 0 1px 0 #ffffffa6, 0 18px 40px -18px #ffcc00bf;
}

.download-panel:has(.download-panel__cta:focus-visible) {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.download-panel__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
}

.download-panel__file {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: .95rem;
  min-width: 0;
}

.download-panel__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: .5rem;
  background: #16130a;
  box-shadow: inset 0 1px 0 #ffffff1a;
  color: var(--gold);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1;
}

.download-panel__copy {
  min-width: 0;
}

/* Двойной класс: иначе .article-prose p добавляет абзацу отступ сверху и название съезжает вниз. */
.download-panel .download-panel__name {
  margin: 0;
  color: #111;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.download-panel__cta,
.article-prose .download-panel__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.4rem;
  padding-inline: 1.05rem;
  border-radius: .4rem;
  background: #111;
  color: var(--gold);
  font-size: .88rem;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

/* Растягиваем ссылку на всю полосу. */
.download-panel__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: .6rem;
}

/* Download icon: arrow into a tray, tinted with the button text colour */
.download-panel__cta::before {
  content: "";
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5v11.5M7 10l5 5 5-5M4.5 15.5v2.5a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-2.5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5v11.5M7 10l5 5 5-5M4.5 15.5v2.5a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-2.5'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .15s ease;
}

.download-panel:hover .download-panel__cta {
  background: #000;
  color: #ffe066;
}

.download-panel:hover .download-panel__cta::before {
  transform: translateY(1px);
}

.download-panel .download-panel__cta:focus-visible {
  outline: none;
}

@media (max-width: 40rem) {
  .download-panel__main {
    flex-wrap: wrap;
  }

  .download-panel__file {
    flex-basis: 100%;
  }

  .download-panel__cta,
  .article-prose .download-panel__cta {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-panel, .download-panel__cta, .download-panel__cta::before {
    transition: none;
  }

  .download-panel:hover, .download-panel:hover .download-panel__cta::before {
    transform: none;
  }
}

.article-main {
  --article-bg:  var(--bg);
  --article-surface:  var(--surface);
  --article-line:  var(--surface-border);
  --article-ink:  var(--text);
  --article-muted:  var(--muted);
  --article-link:  #ffd84d;
  background: var(--article-bg);
  color: var(--article-ink);
}

.article-shell {
  padding-block: clamp(1.35rem,3vw,2.4rem) clamp(3.5rem,7vw,6.5rem);
}

.wiki-article {
  max-width: none;
  margin-inline: 0;
}

.article-main .breadcrumbs {
  margin-bottom: 1.25rem;
  font-size: .78rem;
  font-weight: 560;
  color: var(--article-muted);
}

.article-main .breadcrumbs a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #ffffff59;
}

.article-main .breadcrumbs a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

.article-main .breadcrumbs [aria-current=page] {
  color: var(--gold);
  font-weight: 700;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: clamp(1.25rem,3vw,2.4rem);
  align-items: center;
  margin-bottom: clamp(1.6rem,3.5vw,2.4rem);
  padding: clamp(1.2rem,2.4vw,1.7rem);
  border: 1px solid var(--article-line);
  border-radius: var(--radius-md);
  background: var(--article-surface);
  box-shadow: none;
}

.article-hero__copy {
  min-width: 0;
}

.article-hero h1 {
  margin: 0;
  font-size: clamp(1.85rem,4.2vw,2.85rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  color: var(--article-ink);
}

.article-hero__lead {
  max-width: 38rem;
  margin: .85rem 0 0;
  color: #e3e2df;
  font-size: clamp(1rem,1.5vw,1.1rem);
  line-height: 1.62;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-items: start;
  gap: clamp(1.75rem,3vw,2.75rem);
}

.article-column {
  min-width: 0;
  display: grid;
  gap: clamp(1.8rem,3.5vw,2.6rem);
}

.article-toc {
  position: static;
  margin: 0 0 1.35rem;
  padding: .15rem .95rem .9rem;
  border: 1px solid var(--article-line);
  border-radius: var(--radius-md);
  background: var(--article-surface);
}

.article-toc > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.75rem;
  cursor: pointer;
  margin: 0;
  color: var(--article-ink);
  font-size: .88rem;
  font-weight: 680;
  letter-spacing: .04em;
  text-transform: none;
}

.article-toc > summary::-webkit-details-marker,
.article-toc > summary::marker {
  display: none;
}

.article-toc > summary:after {
  content: "";
  width: .45rem;
  height: .45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: 45deg;
  translate: 0 -.1rem;
  opacity: .7;
}

.article-toc[open] > summary:after {
  rotate: 225deg;
  translate: 0 .15rem;
}

.article-toc ol {
  display: grid;
  gap: .05rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 0;
}

.article-toc li {
  margin: 0;
  border-left: 0;
  padding-left: 0;
}

.article-toc a {
  display: block;
  min-height: 0;
  padding: .38rem .65rem;
  color: #c1c0bb;
  font-size: .8rem;
  font-weight: 560;
  line-height: 1.35;
  text-decoration: none;
  border-radius: .35rem;
  transition: color .15s ease,background .15s ease;
}

.article-toc a:hover {
  color: var(--gold);
  background: #ffffff0f;
}

.article-toc li.is-active a {
  color: var(--gold);
  font-weight: 650;
  background: #ffffff0f;
}

.article-prose {
  min-width: 0;
  color: #eaeae8;
  font-size: 1.045rem;
  line-height: 1.74;
}

.article-prose>:first-child {
  margin-top: 0;
}

.article-prose h2 {
  margin: 2.35rem 0 .8rem;
  scroll-margin-top: 6rem;
  color: #fff;
  font-size: clamp(1.35rem,2.4vw,1.7rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.article-prose h3 {
  margin: 1.7rem 0 .55rem;
  scroll-margin-top: 6rem;
  font-size: 1.12rem;
  line-height: 1.28;
  color: #fff;
}

.article-prose p, .article-prose ul, .article-prose ol {
  margin-top: .9rem;
}

.article-prose ul, .article-prose ol {
  padding-left: 1.2rem;
}

.article-prose li+li {
  margin-top: .35rem;
}

.article-prose a {
  color: var(--article-link);
  font-weight: 600;
  text-decoration-color: #ffd84d66;
  text-underline-offset: .18em;
}

.article-prose a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

.article-prose .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}

.article-prose table {
  width: 100%;
  min-width: 32rem;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: .9rem;
  line-height: 1.45;
  background: var(--surface);
  border: 1px solid var(--article-line);
  color: #eaeae8;
}

.article-prose .table-wrap table {
  margin-top: 0;
}

.article-prose th, .article-prose td {
  border: 1px solid var(--article-line);
  padding: .6rem .7rem;
  text-align: left;
  vertical-align: top;
}

.article-prose th {
  background: var(--surface-raised);
  color: #fff;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 720;
}

.article-prose tbody tr:nth-child(2n) td {
  background: #171715;
}

@media (hover:hover) and (pointer:fine) {
  .article-prose tbody tr:hover td {
    background: #32312d;
  }
}

.article-prose .wiki-infobox {
  float: right;
  clear: right;
  width: min(100%,14.5rem);
  margin: .1rem 0 1rem 1.2rem;
  border: 1px solid var(--article-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1d1d1b;
  box-shadow: 0 8px 18px #1d1d1b10;
}

.article-prose > .wiki-infobox:first-child {
  margin-top: 0;
}

.article-prose .wiki-infobox img {
  aspect-ratio: 4/3;
  object-fit: cover;
}

.article-prose .wiki-shot {
  margin-top: 1.35rem;
  margin-bottom: .15rem;
  border: 1px solid var(--article-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1d1d1b;
}

.article-prose .wiki-faq, .article-column .wiki-faq {
  margin-top: 2.5rem;
  padding: 1.3rem 1.4rem 1.15rem;
  border: 1px solid var(--article-line);
  border-radius: var(--radius-md);
  background: var(--article-surface);
  clear: both;
}

.article-column .wiki-faq {
  margin-top: clamp(2.2rem,4.5vw,3.2rem);
  padding: clamp(1.1rem,2.5vw,1.4rem) clamp(1rem,2.5vw,1.4rem) clamp(.9rem,2vw,1.15rem);
}

.article-column > .article-meta {
  margin-top: clamp(1.8rem,3.5vw,2.6rem);
}

.article-prose .wiki-faq h2, .article-column .wiki-faq h2 {
  margin: 0 0 .7rem;
  font-size: 1.3rem;
  color: #fff;
}

.article-prose .wiki-faq details, .article-column .wiki-faq details {
  border-top: 1px solid var(--article-line);
  border-top: 1px solid color-mix(in srgb,var(--article-line) 70%,transparent);
  padding: .15rem 0;
}

.article-prose .wiki-faq details:first-of-type, .article-column .wiki-faq details:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.article-prose .wiki-faq summary, .article-column .wiki-faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.65rem;
  padding-right: 2rem;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  color: var(--text);
  transition: color .15s ease;
}

.article-prose .wiki-faq summary:hover, .article-column .wiki-faq summary:hover {
  color: var(--gold);
}

.article-prose .wiki-faq details[open] summary, .article-column .wiki-faq details[open] summary {
  color: var(--gold);
}

.article-prose .wiki-faq summary:after, .article-column .wiki-faq summary:after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  translate: 0 -50%;
  color: var(--muted);
  font-size: 1.15em;
  font-weight: 400;
  transition: color .15s ease,transform .2s ease;
}

.article-prose .wiki-faq summary:hover:after, .article-column .wiki-faq summary:hover:after {
  color: var(--gold);
}

.article-prose .wiki-faq details[open] summary:after, .article-column .wiki-faq details[open] summary:after {
  content: "−";
  color: var(--gold);
}

.article-prose .wiki-faq details p, .article-column .wiki-faq details p {
  margin: .1rem 0 .8rem;
  max-width: 40rem;
  color: #e3e2df;
  line-height: 1.55;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .85rem 1.4rem;
  margin-top: clamp(2rem,4.5vw,3.2rem);
  padding: .95rem 1.25rem;
  background: var(--article-surface);
  border: 1px solid var(--article-line);
  border-radius: var(--radius-md);
}

.wiki-article .article-facts, .article-meta .article-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.wiki-article .article-facts > div, .article-meta .article-facts > div {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: .84rem;
  line-height: 1.4;
}

.wiki-article .article-facts dt, .article-meta .article-facts dt {
  color: var(--article-muted);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.wiki-article .article-facts dt:after, .article-meta .article-facts dt:after {
  content: ":";
}

.wiki-article .article-facts dd, .article-meta .article-facts dd {
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  margin: 0;
}

.article-main .related-content {
  max-width: none;
  margin: clamp(2.4rem,5vw,3.6rem)0 0;
  padding-top: clamp(1.6rem,3vw,2.2rem);
  border-top: 1px solid var(--article-line);
}

.article-main .related-content__heading {
  margin-bottom: 1rem;
}

.article-main .related-content__heading h2 {
  margin: 0;
  font-size: clamp(1.25rem,2.2vw,1.55rem);
  line-height: 1.2;
  color: var(--article-ink);
}

.article-main .related-content .home-featured__grid {
  margin: 0;
}

@media (hover:hover) and (pointer:fine) {
  .article-toc a:hover {
    background: #ffffff0f;
    color: var(--gold);
  }
}

@media (max-width: 52rem) {
  .article-hero {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    padding: 1rem;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .article-toc {
    padding: .15rem .85rem .85rem;
  }

  .article-prose .wiki-infobox {
    float: none;
    width: 100%;
    max-width: none;
    margin: 1rem 0 1.1rem;
  }
}

@media (max-width: 40rem) {
  .article-prose {
    font-size: 1rem;
  }

  .article-meta {
    flex-direction: column;
    align-items: stretch;
    gap: .85rem;
    padding: .9rem 1rem;
  }

  .wiki-article .article-facts, .article-meta .article-facts {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
  }
}

@media (prefers-reduced-motion:reduce) {
  .article-toc a, .article-main .related-content .home-article {
    transition: none;
  }
}

.footer-nav a[aria-current] {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: .35em;
}

.table-wrap:focus-visible {
  outline: 2px solid var(--article-link);
  outline-offset: 3px;
}

.article-main .article-shell {
  --shell:  60rem;
  padding-top: 1.25rem;
}

.article-main .breadcrumbs {
  width: min(100%,60rem);
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.article-main .article-hero {
  display: block;
  width: min(100%,60rem);
  margin: 0 auto 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.article-main .article-hero__copy {
  min-width: 0;
}

.article-main .article-hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.85rem,3.6vw,3rem);
  line-height: 1.13;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.article-main .article-hero__lead {
  max-width: none;
  margin: 1rem 0 0;
  font-size: clamp(1rem,1.5vw,1.2rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.article-main .article-hero__updated {
  margin: 1rem 0 0;
  color: var(--article-muted);
  font-size: .75rem;
}

.article-main .article-hero__updated time {
  font-weight: 500;
}

.article-main .article-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  width: min(100%,60rem);
  margin-inline: auto;
  gap: 1.5rem;
  border: 0;
  padding: 0;
}

.article-main .article-navigation {
  position: static;
  min-width: 0;
}

.article-main .article-toc {
  margin: 0;
  padding: 0;
  border: 0;
  border-block: 1px solid var(--article-line);
  border-radius: 0;
  background: transparent;
}

.article-main .article-toc > summary {
  justify-content: flex-start;
  padding: .85rem 0;
  gap: 1rem;
  font-size: .85rem;
}

.article-main .article-toc__hint {
  margin-left: auto;
  color: var(--article-muted);
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: 0;
}

.article-main .article-toc ol {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .15rem 1rem;
  padding-bottom: .85rem;
}

.article-main .article-toc > summary:after {
  flex: none;
}

.article-main .article-toc a {
  padding: .65rem .7rem;
  border-left: 2px solid transparent;
  border-radius: 0;
  color: var(--article-muted);
  line-height: 1.45;
}

.article-main .article-toc li.is-active a {
  border-left-color: var(--gold);
  color: var(--gold);
}

.article-main .article-column {
  display: block;
}

.article-main .article-prose {
  display: flow-root;
  font-size: 1.15rem;
  line-height: 1.8;
}

.article-main :is(.article-prose, .article-faq, .article-facts) {
  overflow-wrap: anywhere;
}

.article-main .article-prose h2 {
  clear: both;
  margin: 2.8rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--article-line);
  font-size: clamp(1.5rem,2.5vw,2rem);
  line-height: 1.2;
}

.article-main .article-prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.article-main .article-prose h3 {
  font-size: 1.2rem;
  line-height: 1.35;
}

.article-main :is(h1, h2, h3)[id] {
  scroll-margin-top: 6rem;
}

.article-main .article-prose .wiki-infobox {
  box-shadow: none;
}

.article-main .article-prose .wiki-shot {
  clear: both;
}

.article-main .article-prose .wiki-shot img {
  width: 100%;
  height: auto;
}

.article-main .article-prose blockquote {
  margin: 1.5rem 0;
  padding: .2rem 1.25rem 1rem;
  border-left: 3px solid var(--gold);
  background: var(--article-surface);
}

.article-main .article-prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  background: #0d0c0b;
  border: 1px solid var(--surface-border);
  color: #f4f1e9;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}

.article-main .article-prose code {
  overflow-wrap: anywhere;
}

.article-main .article-prose pre code {
  overflow-wrap: normal;
  word-break: normal;
}

.article-main .article-faq {
  margin-top: 3rem;
}

.article-main .article-faq .wiki-faq {
  margin: 0;
  padding-top: 1.5rem;
}

.article-main .article-faq .wiki-faq h2 {
  font-size: clamp(1.5rem,2.5vw,2rem);
  margin-bottom: 1rem;
}

.article-main .article-faq summary {
  gap: 1rem;
  padding-block: .9rem;
}

.article-main .article-faq summary h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -.01em;
}

.article-main .article-faq summary::-webkit-details-marker,
.article-main .article-faq summary::marker {
  display: none;
}

.article-main .article-faq a {
  color: var(--article-link);
}

.article-main .article-faq :is(ul, ol) {
  padding-left: 1.4rem;
  margin-block: .8rem;
}

.article-main .article-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.4rem;
}

.article-main :is(a, summary):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.article-main .related-content .home-featured__grid {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

@media (max-width: 68rem) {
  .article-main .related-content .home-featured__grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 52rem) {
  .article-main .article-layout {
    padding: 0;
  }

  .article-main .article-navigation {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .article-main .article-toc ol {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .article-main .article-prose {
    font-size: 1rem;
  }
}

@media (max-width: 40rem) {
  .article-main .article-toc__hint {
    display: none;
  }

  .article-main .article-toc > summary:after {
    margin-left: auto;
  }

  .article-main .article-toc ol, .article-main .related-content .home-featured__grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .article-main {
    background: #fff;
  }

  .article-main .article-shell {
    width: 100%;
    padding: 0;
  }

  .article-main .article-layout {
    display: block;
  }

  .article-main :is(.article-navigation, .related-content) {
    display: none;
  }

  .article-main .article-hero {
    border: 0;
    padding: 0 0 1.5rem;
  }

  .article-main :is(h2, h3) {
    break-after: avoid;
  }

  .article-main figure {
    break-inside: avoid;
  }
}

.article-cover {
  min-width: 0;
  width: min(100%,50rem);
  margin-inline: auto;
}

.article-cover .wiki-lead {
  margin: 0;
  border: 1px solid var(--article-line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px #22211f0a;
}

.article-cover .wiki-lead picture {
  display: block;
}

.article-cover .wiki-lead img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.audio-card {
  margin: 1.15rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.audio-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: .75rem;
}

.audio-card__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid #4e4c46;
  border-radius: .35rem;
  background: #252422;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 780;
  line-height: 1;
}

.audio-card__info {
  min-width: 0;
  flex: 1 1 14rem;
}

.audio-card__title {
  margin: 0;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 720;
  line-height: 1.25;
}

.audio-card__meta {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.audio-card__download {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.25rem;
  padding: .4rem .95rem;
  border: 1px solid #4e4c46;
  border-radius: .35rem;
  background: #252422;
  color: #ffd84d;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease,color .15s ease,border-color .15s ease;
}

.article-prose .audio-card__download {
  color: #ffd84d;
  text-decoration: none;
}

.audio-card__download:hover, .article-prose .audio-card__download:hover {
  background: var(--gold);
  color: #0d0c0b;
  border-color: var(--gold);
}

.audio-card audio {
  width: 100%;
  height: 2.6rem;
  border-radius: .35rem;
}

.audio-card audio:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.audio-playlist {
  margin: 1.25rem 0;
  display: grid;
  gap: .85rem;
}

@media (max-width: 48rem) {
  input[type=search], input[type=text], .wiki-search input, .search-form input {
    font-size: 16px !important;
  }
}

@media (max-width: 40rem) {
  html, body {
    overflow-x: clip;
  }

  h1, h2, h3, h4 {
    overflow-wrap: break-word;
  }

  .article-toc ol {
    gap: .25rem;
  }

  .article-toc a {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    padding: .45rem .65rem;
    font-size: .84rem;
  }

  .article-prose .table-wrap {
    border: 1px solid var(--article-line);
    border-radius: var(--radius-sm);
    margin-inline: -.25rem;
  }

  .article-prose table {
    min-width: 26rem;
    font-size: .84rem;
  }

  .article-prose th, .article-prose td {
    padding: .5rem .6rem;
  }

  .article-main .article-prose pre {
    padding: .85rem;
    font-size: .86rem;
  }

  .audio-card {
    padding: .85rem;
  }

  .audio-card__header {
    gap: .6rem .85rem;
  }

  .audio-card__download {
    width: 100%;
    justify-content: center;
    min-height: 2.6rem;
  }

  .listing-main .listing-header {
    padding: 1rem;
  }

  .listing-main .listing-header h1 {
    font-size: clamp(1.65rem,7vw,2.2rem);
  }

  .listing-header__lead {
    font-size: .94rem;
  }

  .search-form {
    gap: .5rem;
  }

  .search-form input {
    min-height: 2.85rem;
  }
}

@media (max-width: 29rem) {
  .article-shell, .listing-shell, .search-shell {
    padding-block: 1.25rem 3.5rem;
  }

  .breadcrumbs {
    font-size: .75rem;
    margin-bottom: .85rem;
  }

  .article-facts div {
    padding-block: .65rem;
  }

  .home-portal h1 {
    font-size: clamp(1.55rem,7.5vw,1.95rem);
  }

  .home-portal .wiki-search__field {
    min-height: 3.15rem;
  }
}

.button:focus-visible,
.download-panel__cta:focus-visible,
.audio-card__download:focus-visible,
.search-form button:focus-visible,
.wiki-search button:focus-visible,
.project-intro__actions a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  box-shadow: inset 0 0 0 1000px #161514 !important;
}

/* Нейро Рич: blocks the generated pages add on top of the HytaleWiki layout */
.home-portal__mark {
  width: clamp(4rem, 9vw, 5.5rem);
  height: clamp(4rem, 9vw, 5.5rem);
  margin: 0 auto .9rem;
  filter: drop-shadow(0 10px 30px rgba(255,204,0,.35));
}

.home-portal h1 {
  font-weight: 800;
}

.home-dir__icon {
  display: grid;
  place-items: center;
  width: 5.25rem;
  height: 3.45rem;
  border-radius: .16rem;
  background: linear-gradient(135deg, #2a2618, #191919 70%);
  border: 1px solid #3a3420;
  color: var(--gold);
}

.home-empty, .listing-empty {
  margin: 0;
  padding: 1.6rem 1.4rem;
  border: 1px dashed #3d3d3d;
  border-radius: .45rem;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

.home-article:not(:has(.home-article__shot)) {
  padding-top: 1.1rem;
}

/* Cards of articles without a cover: no empty picture column in lists, search and «Смотрите также». */
.listing-main .content-card:not(:has(.content-card__shot)),
.related-content .content-card:not(:has(.content-card__shot)),
.search-results-page .content-card:not(:has(.content-card__shot)) {
  grid-template-columns: minmax(0,1fr);
}

.content-card:not(:has(.content-card__shot)) > * {
  grid-column: 1;
}

@media (max-width: 52rem) {
  .home-dir__icon {
    width: 4.6rem;
    height: 3.05rem;
  }
}

@media (max-width: 29rem) {
  .home-dir__icon {
    width: 4.2rem;
    height: 2.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-portal__mark, .brand__mark {
    transition: none;
  }
}
