/*
Theme Name: Psyvig
Theme URI: https://psyvig.com
Author: Psychothérapie Vigilance
Description: Тема для psyvig.com: без Gutenberg, без блочных стилей и прочего «шума» WordPress. Скрипты — assets/app.js.
Version: 1.0.1
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 8.5
License: GPL-2.0-or-later
Text Domain: psyvig
*/

/* CSS 2026: @layer, nesting, light-dark(), oklch, container queries, :has(), scroll-driven animations */
@layer reset, base, layout, components;

@layer reset {
  *, ::before, ::after { box-sizing: border-box }
  * { margin: 0 }
  html { -webkit-text-size-adjust: none; text-size-adjust: none; interpolate-size: allow-keywords }
  img, svg, video { display: block; max-width: 100% }
  img { height: auto }
  input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit }
  button { background: none; border: 0; padding: 0; cursor: pointer }
  a { color: inherit; text-decoration: none }
  [hidden] { display: none !important }
}

@layer base {
  :root {
    color-scheme: light dark;
    --paper: light-dark(#f5f1ea, #131210);
    --paper-2: light-dark(#ebe4d8, #1a1815);
    --card: light-dark(#fffdf9, #1f1c19);
    --ink: light-dark(#1c1915, #eee8df);
    --ink-2: light-dark(#4b453d, #c9c1b5);
    --mut: light-dark(#7a7266, #968d80);
    --line: light-dark(#e2dace, #2e2a25);
    --acc: light-dark(#a53b1f, #e58663);
    --acc-2: light-dark(#f8e5dc, #35211a);
    --on-acc: light-dark(#fff, #1a110d);
    --sh: 0 1px 2px rgb(60 40 20 / .06), 0 14px 34px -18px rgb(60 40 20 / .28);
    --r: 1.25rem;
    --r-s: .75rem;
    --w: 75rem;
    --gut: 1rem;
    --serif: "Iowan Old Style", "Sitka Text", "Palatino Linotype", Palatino, Charter, "Bitstream Charter", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
  }
  :root[data-theme=light] { color-scheme: light }
  :root[data-theme=dark] { color-scheme: dark }

  @view-transition { navigation: auto }

  html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; hanging-punctuation: first allow-end last }
  body {
    min-height: 100dvh; display: flex; flex-direction: column;
    background: var(--paper); color: var(--ink);
    font: 400 1rem/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
  }
  main { flex: 1 }
  h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.14; letter-spacing: -.012em; text-wrap: balance }
  p, li, dd { text-wrap: pretty }
  :focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px }
  ::selection { background: var(--acc); color: var(--on-acc) }

  .sc-i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round }
  .sc-w { width: min(100% - 2 * var(--gut), var(--w)); margin-inline: auto }
  .sc-skip {
    position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .6rem 1rem; border-radius: 999px;
    background: var(--ink); color: var(--paper); translate: 0 -300%;
    &:focus { translate: 0 }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto }
    *, ::before, ::after { animation-duration: 0s !important; transition-duration: 0s !important }
  }
}

/* ───────── Layout ───────── */
@layer layout {
  .sc-hd {
    position: sticky; top: var(--wp-admin--admin-bar--height, 0); z-index: 50;
    background: color-mix(in oklab, var(--paper) 84%, transparent);
    backdrop-filter: blur(14px) saturate(1.4);
    border-bottom: 1px solid var(--line);
    & > .sc-w { display: flex; align-items: center; gap: .5rem; height: 4rem }
  }

  /* Прогресс чтения — без JS */
  @supports (animation-timeline: scroll()) {
    .sc-is-single .sc-hd::after {
      content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--acc);
      transform-origin: 0 50%; animation: progress linear both; animation-timeline: scroll(root);
    }
    @keyframes progress { from { scale: 0 1 } to { scale: 1 1 } }
  }

  .sc-logo {
    display: flex; align-items: center; gap: .65rem; margin-inline-end: auto;
    & .sc-eye { width: 2.6rem; fill: none; stroke: currentColor; stroke-width: 3 }
    & .sc-pu { fill: var(--acc); stroke: none }
    & b { display: block; font: 700 1.2rem/1 var(--serif); letter-spacing: .02em }
    & small { display: block; margin-top: .2rem; font-size: .66rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--mut) }
  }

  .sc-nav {
    display: flex; gap: .15rem; margin-inline-end: .5rem;
    & :is(a, button) {
      display: inline-flex; align-items: center; gap: .2rem; padding: .45rem .8rem; border-radius: 999px;
      font-size: .9rem; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s;
      &:hover, &[aria-current] { background: var(--paper-2); color: var(--ink) }
    }
    & .sc-i { width: 1rem; height: 1rem }
  }

  .sc-ib {
    display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none;
    color: var(--ink-2); transition: background .2s, color .2s;
    &:hover { background: var(--paper-2); color: var(--ink) }
  }
  .sc-mb { display: none }

  /* Меню рубрик: на десктопе — выпадающая панель, на мобильном — шторка */
  #sc-mn {
    inset: 4.5rem 0 auto; margin-inline: auto; width: min(58rem, 100% - 2rem); max-height: calc(100dvh - 6rem);
    padding: 1rem; border: 1px solid var(--line); border-radius: var(--r);
    background: var(--card); color: var(--ink); box-shadow: 0 30px 70px -30px rgb(30 20 10 / .45);
    opacity: 0; translate: 0 -.5rem;
    transition: opacity .2s, translate .25s var(--ease), display .25s allow-discrete, overlay .25s allow-discrete;
    &:popover-open { opacity: 1; translate: 0; @starting-style { opacity: 0; translate: 0 -.5rem } }
    &::backdrop { background: rgb(20 15 10 / .18) }
  }
  .sc-mn-hd, .sc-mn-nav { display: none }
  .sc-mn-t { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin: 0 .6rem .5rem }
  .sc-cats {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: .1rem;
    & a {
      display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border-radius: .7rem; font-size: .9rem; line-height: 1.25;
      &:hover { background: var(--paper-2) }
    }
    & .sc-i {
      width: 2rem; height: 2rem; padding: .42rem; border-radius: .55rem; stroke-width: 2;
      color: light-dark(oklch(40% .1 var(--h)), oklch(85% .08 var(--h)));
      background: light-dark(oklch(94% .04 var(--h)), oklch(30% .05 var(--h)));
    }
    & small { margin-inline-start: auto; font-size: .75rem; color: var(--mut); font-variant-numeric: tabular-nums }
  }

  @media (width < 62rem) {
    .sc-nav { display: none }
    .sc-mb { display: grid }
    .sc-logo small { display: none }
    #sc-mn {
      inset: 0 0 0 auto; width: min(24rem, 100%); height: 100dvh; max-height: none; margin: 0;
      border: 0; border-radius: 0; padding: 1rem; overflow: auto; translate: 100% 0; opacity: 1;
      &:popover-open { translate: 0; @starting-style { translate: 100% 0 } }
      &::backdrop { background: rgb(20 15 10 / .45) }
    }
    .sc-mn-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; font: 600 1.1rem var(--serif) }
    .sc-mn-nav {
      display: grid; gap: .1rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
      & a { padding: .6rem; border-radius: .6rem; font-weight: 500; &[aria-current] { background: var(--paper-2) } }
    }
    .sc-cats { grid-template-columns: 1fr }
  }

  /* Поиск в модальном окне */
  #sc-sd {
    margin: 12vh auto auto; width: min(40rem, 100% - 2rem); padding: 0; border: 0; border-radius: var(--r);
    background: var(--card); color: var(--ink); box-shadow: 0 40px 90px -30px rgb(0 0 0 / .5);
    opacity: 0; translate: 0 1rem;
    transition: opacity .2s, translate .25s var(--ease), display .25s allow-discrete, overlay .25s allow-discrete;
    &[open] { opacity: 1; translate: 0; @starting-style { opacity: 0; translate: 0 1rem } }
    &::backdrop { background: rgb(20 15 10 / .45); backdrop-filter: blur(4px) }
  }

  .sc-sec { padding-block: clamp(2.75rem, 6vw, 4.75rem) }
  .sc-alt { background: var(--paper-2) }

  .sc-ft {
    margin-top: auto; padding-top: 3.5rem; font-size: .9rem;
    background: light-dark(#1c1915, #0c0b0a); color: #d8d0c4;
    & .sc-logo { color: #f3ede4; & small { color: #9a9183 } }
    & p { margin-top: 1rem; max-width: 26rem; color: #a59d90 }
    & h2 { margin-bottom: 1rem; font: 600 .7rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #8e8577 }
    & nav { display: grid; gap: .45rem; align-content: start }
    & nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px }
  }
  .sc-ft-g { display: grid; grid-template-columns: 1.2fr 1.4fr .8fr; gap: 2.5rem }
  .sc-fc { grid-template-columns: 1fr 1fr; column-gap: 1.5rem }
  .sc-fb {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
    margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid #34302a; font-size: .8rem; color: #8e8577;
  }
  @media (width < 50rem) { .sc-ft-g { grid-template-columns: 1fr } }
}

/* ───────── Components ───────── */
@layer components {
  .sc-kick {
    font: 600 .72rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--acc);
    &:is(a):hover { text-decoration: underline; text-underline-offset: 3px }
  }
  .sc-btn {
    display: inline-flex; align-items: center; gap: .5rem; justify-self: start; padding: .75rem 1.25rem; border-radius: 999px;
    background: var(--acc); color: var(--on-acc); font-weight: 600; font-size: .92rem; transition: filter .2s, translate .2s;
    &:hover { filter: brightness(1.08); translate: 0 -1px }
  }
  .sc-more {
    display: inline-flex; align-items: center; gap: .35rem; color: var(--acc); font-weight: 600; font-size: .9rem;
    & .sc-i { width: 1.1rem; transition: translate .2s var(--ease) }
    &:hover .sc-i { translate: 3px }
  }

  /* Hero */
  .sc-hero {
    position: relative; isolation: isolate; overflow: clip; text-align: center;
    padding-block: clamp(3rem, 8vw, 6rem) clamp(2.75rem, 6vw, 4.5rem);
    &::before {
      content: ""; position: absolute; inset: 0; z-index: -2;
      background:
        radial-gradient(38rem 24rem at 12% 0%, color-mix(in oklab, var(--acc) 13%, transparent), transparent 70%),
        radial-gradient(34rem 22rem at 92% 10%, color-mix(in oklab, #c49a5c 16%, transparent), transparent 70%);
    }
    /* Глаз-водяной знак */
    &::after {
      content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(64rem, 140vw); aspect-ratio: 64 / 36;
      translate: -50% -50%; background: var(--ink); opacity: .035;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 36' fill='none' stroke='%23000' stroke-width='.6'%3E%3Cpath d='M3 18C10.5 7.5 20 2.5 32 2.5S53.5 7.5 61 18c-7.5 10.5-17 15.5-29 15.5S10.5 28.5 3 18Z'/%3E%3Ccircle cx='32' cy='18' r='8.5'/%3E%3Ccircle cx='32' cy='18' r='3.2' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
    }
    & > .sc-w { display: grid; justify-items: center; gap: 1.1rem }
    & h1 { font-size: clamp(2.3rem, 1.3rem + 4.2vw, 4.4rem); max-width: 17ch }
    & .sc-lead { max-width: 42rem; color: var(--ink-2); font-size: clamp(1rem, .95rem + .3vw, 1.15rem) }
    & .sc-sf { width: min(100%, 36rem); margin-top: .6rem }
  }
  .sc-hero-s {
    padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2.25rem, 5vw, 3.5rem);
    & h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); max-width: 22ch }
    &::after { opacity: .025 }
  }
  .sc-hi {
    display: grid; place-items: center; width: 4.75rem; height: 4.75rem; border-radius: 1.3rem; color: #fff;
    background: linear-gradient(155deg, oklch(50% .09 var(--h)), oklch(30% .06 var(--h))); box-shadow: var(--sh);
    & .sc-i { width: 2.2rem; height: 2.2rem; stroke-width: 1.5 }
  }
  .sc-cnt { color: var(--mut); font-size: .85rem; & b { display: block; font: 700 2.2rem/1 var(--serif); color: var(--ink) } }

  .sc-chips {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem; font-size: .8rem; color: var(--mut);
    & a {
      padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); transition: .2s;
      &:hover { border-color: var(--acc); color: var(--acc) }
    }
  }
  .sc-stats {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem clamp(1.75rem, 5vw, 3.5rem); margin-top: .75rem;
    & div { display: flex; flex-direction: column-reverse; align-items: center }
    & dd { font: 700 clamp(1.9rem, 1.4rem + 2vw, 2.7rem)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums }
    & dt { margin-top: .45rem; font-size: .66rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--mut) }
  }
  @media (width < 40rem) { .sc-stats { display: grid; grid-template-columns: 1fr 1fr } }
  .sc-disc { max-width: 34rem; font-size: .8rem; color: var(--mut) }

  /* Поиск и подсказки */
  .sc-sf {
    position: relative; display: flex; align-items: center; gap: .5rem; padding: .35rem .35rem .35rem 1.35rem;
    background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--sh);
    transition: border-color .2s, box-shadow .2s;
    &:focus-within { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-2), var(--sh) }
    & input { flex: 1; min-width: 0; padding: .6rem 0; border: 0; outline: 0; background: none; font-size: 1rem }
    & input::placeholder { color: var(--mut) }
    & > button {
      display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; flex: none;
      background: var(--acc); color: var(--on-acc); transition: filter .2s;
      &:hover { filter: brightness(1.1) }
    }
  }
  .sc-sg {
    position: absolute; z-index: 5; inset: calc(100% + .5rem) 0 auto; max-height: 60vh; overflow: auto; padding: .35rem; text-align: start;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: var(--sh);
    & a {
      display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem .75rem; border-radius: .55rem;
      &:is(:hover, :focus) { background: var(--paper-2); outline: 0 }
    }
    & small { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: var(--mut) }
    & mark { background: var(--acc-2); color: inherit; border-radius: 2px }
    & p { padding: .6rem .75rem; font-size: .88rem; color: var(--mut) }
  }
  #sc-sd {
    & .sc-sf { flex-wrap: wrap; border: 0; border-radius: 0; box-shadow: none; padding: .6rem .6rem .6rem 1.25rem }
    & .sc-sg { position: static; flex: 1 0 100%; margin: .6rem -.6rem -.6rem -1.25rem; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; max-height: 55vh }
  }

  /* Заголовок секции */
  .sc-sh {
    display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem;
    & h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem) }
    & p { margin-top: .35rem; color: var(--mut); font-size: .95rem }
  }

  /* Плитки рубрик */
  .sc-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem 1.25rem }
  .sc-tl {
    display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .65rem .5rem;
    & > span {
      position: relative; grid-column: 1 / -1; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden;
      border-radius: var(--r); color: #fff; box-shadow: var(--sh);
      background:
        radial-gradient(120% 90% at 15% 0%, oklch(60% .1 var(--h) / .7), transparent 60%),
        linear-gradient(155deg, oklch(46% .085 var(--h)), oklch(27% .05 var(--h)));
      transition: translate .35s var(--ease), box-shadow .35s;
      &::after {
        content: attr(data-n); position: absolute; left: .4rem; bottom: -.3em;
        font: 700 clamp(2.2rem, 4vw, 3.4rem)/1 var(--serif); white-space: nowrap; letter-spacing: -.02em; opacity: .09;
      }
    }
    & .sc-i { width: 3rem; height: 3rem; stroke-width: 1.4; transition: scale .35s var(--ease) }
    & b { font-weight: 600; font-size: .95rem; line-height: 1.3 }
    & small { font-size: .75rem; color: var(--mut); white-space: nowrap }
    &:hover > span { translate: 0 -4px; box-shadow: 0 22px 40px -20px oklch(30% .08 var(--h) / .7) }
    &:hover .sc-i { scale: 1.1 }
  }
  @media (width < 62rem) { .sc-tiles { grid-template-columns: repeat(3, 1fr) } }
  @media (width < 40rem) { .sc-tiles { grid-template-columns: repeat(2, 1fr); gap: 1.1rem .9rem } .sc-tl .sc-i { width: 2.3rem; height: 2.3rem } }

  .sc-cloud {
    display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem;
    & a {
      display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .5rem .45rem .9rem; border-radius: 999px;
      background: var(--card); border: 1px solid var(--line); font-size: .88rem; transition: .2s;
      &:hover { border-color: oklch(55% .1 var(--h)); color: oklch(45% .1 var(--h)) }
    }
    & small {
      min-width: 1.6rem; padding: .05rem .45rem; border-radius: 999px; text-align: center; font-size: .72rem; font-weight: 600;
      background: light-dark(oklch(94% .04 var(--h)), oklch(30% .05 var(--h))); color: light-dark(oklch(40% .1 var(--h)), oklch(85% .08 var(--h)));
    }
  }

  /* Карточки */
  .sc-g { container: grid / inline-size; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 2.25rem 1.5rem }
  .sc-cd {
    position: relative; display: grid; align-content: start; gap: .5rem;
    & .sc-cv {
      container-type: inline-size; position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden;
      margin-bottom: .35rem; border-radius: var(--r);
      color: light-dark(oklch(44% .09 var(--h)), oklch(82% .07 var(--h)));
      background:
        radial-gradient(90% 80% at 85% 100%, light-dark(oklch(88% .045 var(--h) / .8), oklch(24% .035 var(--h))), transparent 70%),
        light-dark(oklch(95.5% .02 var(--h)), oklch(29% .03 var(--h)));
      box-shadow: inset 0 0 0 1px color-mix(in oklab, currentColor 12%, transparent);
      transition: translate .35s var(--ease), box-shadow .35s;
      /* «Радужка» глаза за буквой */
      &::before { content: ""; position: absolute; width: 52cqi; aspect-ratio: 1; border-radius: 50%; border: 1px solid currentColor; opacity: .16 }
      &:has(img)::before { display: none }
      & > b { font: 600 clamp(3rem, 34cqi, 7rem)/1 var(--serif); letter-spacing: -.03em }
      & > .sc-i { position: absolute; right: 1rem; bottom: 1rem; width: 1.6rem; height: 1.6rem; opacity: .55 }
      & img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
    }
    & .sc-bd {
      position: absolute; z-index: 1; top: .75rem; left: .75rem; max-width: calc(100% - 1.5rem);
      padding: .28rem .65rem; border-radius: 999px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      background: var(--card); color: var(--ink); font-size: .72rem; font-weight: 600; box-shadow: 0 1px 3px rgb(0 0 0 / .1);
    }
    & a.bd:hover { background: var(--acc); color: var(--on-acc) }
    & span.bd { background: var(--acc); color: var(--on-acc) }
    & h3 {
      font-size: 1.16rem; line-height: 1.28;
      & a { transition: color .2s; &::after { content: ""; position: absolute; inset: 0 } &:focus-visible { outline: 0 } }
    }
    & p { color: var(--ink-2); font-size: .9rem; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden }
    & small { color: var(--mut); font-size: .78rem }
    &:hover .sc-cv { translate: 0 -3px; box-shadow: inset 0 0 0 1px color-mix(in oklab, currentColor 18%, transparent), var(--sh) }
    &:hover h3 a { color: var(--acc) }
    &:has(h3 a:focus-visible) .sc-cv { outline: 2px solid var(--acc); outline-offset: 3px }
  }
  /* Узкий контейнер — компактные горизонтальные карточки */
  @container grid (width < 36rem) {
    .sc-cd {
      grid-template-columns: 6rem 1fr; gap: .25rem 1rem;
      & > :not(.sc-cv) { grid-column: 2 }
      & .sc-cv { grid-row: 1 / span 4; aspect-ratio: 1; margin: 0; border-radius: var(--r-s); & > b { font-size: 3rem } & > .sc-i { display: none } }
      & .sc-bd { position: static; justify-self: start; padding: 0; background: none; box-shadow: none; color: var(--acc); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase }
      & span.bd { background: none; color: var(--acc) }
      & a.bd:hover { background: none; color: var(--ink) }
      & h3 { font-size: 1.05rem }
      & p { -webkit-line-clamp: 2; line-clamp: 2; font-size: .85rem }
    }
  }

  /* Лексикон */
  .sc-lx {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
    & > div { display: grid; gap: 1rem }
    & h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem) }
    & > div > p:not(.sc-kick) { color: var(--ink-2) }
  }
  @media (width < 56rem) { .sc-lx { grid-template-columns: 1fr } }
  .sc-wd {
    display: grid; gap: .3rem; padding: 1.1rem 1.25rem; border-radius: var(--r-s);
    background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--acc); transition: border-color .2s;
    & small { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--acc) }
    & b { font: 600 1.3rem/1.2 var(--serif) }
    & span { font-size: .9rem; color: var(--ink-2) }
    &:hover { border-color: var(--acc) }
  }
  .sc-az {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(3.1rem, 1fr)); gap: .5rem;
    & :is(a, span) {
      display: grid; place-items: center; aspect-ratio: 1; border-radius: .85rem;
      background: var(--card); border: 1px solid var(--line); font: 600 1.3rem var(--serif); transition: .2s;
    }
    & a:hover, & [aria-current] { background: var(--acc); border-color: var(--acc); color: var(--on-acc) }
    & span:not([aria-current]) { opacity: .35 }
    & .sc-all { grid-column: span 2; aspect-ratio: auto; font: 600 .85rem var(--sans) }
    .sc-sec > & { margin-bottom: 2.25rem }
  }

  /* Сортировка, пагинация, крошки */
  .sc-tabs {
    display: flex; flex-wrap: wrap; gap: .2rem; padding: .25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .84rem;
    & a { padding: .4rem .85rem; border-radius: 999px; color: var(--ink-2); &:hover { color: var(--ink) } }
    & [aria-current] { background: var(--ink); color: var(--paper); &:hover { color: var(--paper) } }
  }
  .sc-pg {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 3rem;
    & :is(a, span) {
      display: grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding-inline: .8rem; border-radius: 999px;
      border: 1px solid var(--line); background: var(--card); font-weight: 500; font-variant-numeric: tabular-nums;
    }
    & a:hover { border-color: var(--acc); color: var(--acc) }
    & [aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper) }
    & span:not([aria-current]) { border: 0; background: none; min-width: auto; padding: 0 }
    & .sc-i { width: 1.1rem }
  }
  .sc-bc {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; font-size: .8rem; color: var(--mut);
    & a { &:hover { color: var(--acc) } &::after { content: "›"; margin-inline-start: .4rem; opacity: .6 } }
    & span { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  }
  .sc-empty { display: grid; justify-items: center; gap: 1.25rem; padding: 3rem 1rem; text-align: center; color: var(--mut); & .sc-sf { width: min(100%, 32rem) } }

  /* Статья */
  .sc-meta {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
    & span { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .8rem; color: var(--ink-2) }
    & .sc-i { width: 1rem; height: 1rem; color: var(--mut) }
  }
  .sc-doc {
    max-width: 50rem; margin-inline: auto; padding: clamp(1.25rem, 4.5vw, 3.5rem);
    background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) * 1.4); box-shadow: var(--sh);
  }
  .sc-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
    margin-bottom: 2rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--mut);
    & div { display: flex; gap: .3rem }
    & .sc-ib { width: 2.3rem; height: 2.3rem; border: 1px solid var(--line); & .sc-i { width: 1.05rem; height: 1.05rem } }
    & [data-done] { position: relative; color: var(--acc); border-color: var(--acc) }
    & [data-done]::after {
      content: "Lien copié"; position: absolute; bottom: calc(100% + .4rem); right: 0; padding: .25rem .5rem; border-radius: .4rem;
      background: var(--ink); color: var(--paper); font-size: .72rem; white-space: nowrap;
    }
  }
  .sc-fi { margin-bottom: 2rem; & img { width: 100%; border-radius: var(--r-s) } }
  .sc-toc {
    margin-bottom: 2rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper);
    & summary { display: flex; justify-content: space-between; padding: .9rem 1.1rem; font-weight: 600; cursor: pointer; list-style: none;
      &::-webkit-details-marker { display: none }
      &::after { content: "+"; color: var(--acc); transition: rotate .25s } }
    &[open] summary::after { rotate: 45deg }
    &::details-content { block-size: 0; overflow: clip; transition: block-size .3s var(--ease), content-visibility .3s allow-discrete }
    &[open]::details-content { block-size: auto }
    & ol { padding: 0 1.25rem 1.1rem 2.6rem; font-size: .92rem; & li + li { margin-top: .35rem } & a:hover { color: var(--acc) } & .sc-sub { margin-inline-start: 1rem; list-style: circle; counter-increment: list-item 0 } }
  }

  .sc-prose {
    font: 400 clamp(1.06rem, 1rem + .25vw, 1.2rem)/1.75 var(--serif); hyphens: auto; overflow-wrap: break-word;
    & > * + * { margin-top: 1.1em }
    .sc-doc & > p:first-child { min-height: 2lh }
    .sc-doc & > p:first-child::first-letter { initial-letter: 2; -webkit-initial-letter: 2; margin-inline-end: .45rem; font-weight: 700; color: var(--acc) }
    & h2 { margin-top: 2em; font-size: 1.6em }
    & h3 { margin-top: 1.7em; font-size: 1.25em }
    & a { color: var(--acc); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; &:hover { text-decoration-thickness: 2px } }
    & :is(b, strong) { font-weight: 700 }
    & blockquote { padding: .2rem 0 .2rem 1.25rem; border-inline-start: 3px solid var(--acc); color: var(--ink-2); font-style: italic }
    & :is(ul, ol) { padding-inline-start: 1.4em; & li + li { margin-top: .4em } }
    & img { border-radius: var(--r-s) }
    & figcaption { margin-top: .5rem; font: .85rem var(--sans); color: var(--mut) }
    & table { width: 100%; border-collapse: collapse; font: .95rem var(--sans); & :is(th, td) { padding: .55rem; border-bottom: 1px solid var(--line); text-align: start } }
    & hr { height: 1px; margin-block: 2em; border: 0; background: var(--line) }
    & .sc-ra {
      padding: 1rem 1.25rem; border-radius: var(--r-s); border-inline-start: 3px solid var(--acc); background: var(--acc-2); font: 1rem/1.45 var(--sans);
      & b { display: block; margin-bottom: .35rem; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--acc) }
      & a { display: block; color: var(--ink); font-weight: 600; text-decoration: none; &:hover { color: var(--acc) } }
      & a + a { margin-top: .3rem }
    }
  }
  .sc-af {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
    & > a:not(.sc-more) { padding: .25rem .7rem; border-radius: 999px; background: var(--paper-2); font-size: .82rem; &:hover { color: var(--acc) } }
    & .sc-more { margin-inline-start: auto }
  }
  .sc-pn {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 50rem; margin: 1.5rem auto 0;
    & a { display: grid; gap: .2rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); transition: border-color .2s; &:hover { border-color: var(--acc) } }
    & small { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mut) }
    & b { font: 600 1.02rem/1.3 var(--serif) }
    & .sc-nx { grid-column: 2; text-align: end }
  }
  .sc-art + .sc-sec { margin-top: clamp(3rem, 6vw, 4.5rem) }
  .sc-is-page main, .sc-art:last-child { padding-bottom: clamp(3rem, 6vw, 4.5rem) }
  @media (width < 40rem) { .sc-pn { grid-template-columns: 1fr; & .sc-nx { grid-column: 1 } } }

  /* О нас на главной */
  .sc-about {
    max-width: 48rem; display: grid; gap: 1rem;
    & h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin-bottom: .5rem }
  }
  .sc-rd {
    & summary { justify-self: start; display: inline-flex; margin-top: 1.25rem; padding: .6rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 600; font-size: .9rem; cursor: pointer; list-style: none; &::-webkit-details-marker { display: none } &:hover { border-color: var(--acc); color: var(--acc) } }
    &[open] summary { display: none }
    &::details-content { block-size: 0; overflow: clip; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete }
    &[open]::details-content { block-size: auto }
    & .sc-prose { margin-top: 1.1em }
  }
}
