/*
 * Геометрия сайта: тот же язык, что и в панели (core/Admin/assets/css/geometry.css), макет 10.10.2026.
 *
 * Тема сохраняет свои цвета и шрифты; отсюда она получает только форму: одно скругление у карточек, одно у кнопок и полей, пилюли
 * у фильтров и меток, рамка в одну линию. Раньше у каждой темы был свой радиус (0, 4, 10, 12, 16 точек) — и один и тот же
 * блок в разных темах «говорил на разных языках»; теперь радиус общий, а различаются цвета, шрифты и характер заголовков.
 * Файл подключается после темы и общего слоя: уберёшь его — сайт станет прежним.
 */
:root {
    /* углы берутся из переменных темы (в мастерской оформления владелец меняет их же): «Скругление карточек / кнопок / полей» */
    --nx-radius-card: var(--card-radius, var(--radius, 3px));
    --nx-radius-ctl: var(--button-radius, var(--radius, 3px));
    --nx-radius-pill: var(--radius, 3px);
    --nx-border-w: 1px;
    --nx-pad-card: 1.35rem;
    --nx-gap: 1.5rem;
    --nx-ctl-h: 2.625rem;

    /* «тяжёлое» уходит: ни смещённых чёрных теней, ни подъёма при наведении; карточка держится рамкой и воздухом */
    --shadow-panel: none;
    --shadow-panel-sm: none;
    --shadow-lift: none;
}

/* карточки и блоки */
.block,
.panel,
.card,
.news-card,
.feed-item,
.forum-category,
.good,
.mod-card,
.banner,
.form-page,
.news-hero,
.home-files__card,
.content-home-card,
.subscribe-card {
    border-radius: var(--nx-radius-card);
    border-width: var(--nx-border-w);
}

.panel { padding: var(--nx-pad-card); }

/* кнопки и поля */
.button,
.input,
select.input,
textarea.input,
.site-search-form { border-radius: var(--nx-radius-ctl); }

.button,
.input:not(textarea) { min-height: var(--nx-ctl-h); }

/* пилюли */
.chip,
.tag,
.news-category,
.sidebar-hub__tab,
.langs__item,
.site-filter,
.pager__link,
.pager__now { border-radius: var(--nx-radius-pill); }

@media (max-width: 640px) {
    :root { --nx-pad-card: 1rem; --nx-gap: 1.1rem; }
}


/* ======================================================================================================== v2 ====
 * Смелее, плотнее и строже (замечание главного чата 10.10): без украшений за шапкой и под кнопками,
 * плитки разделов — ровные, как плитки панели.
 */

/* кнопки и карточки не поднимаются и не отбрасывают тени, как бы тема этого ни хотела */
.button,
.button:hover,
.button:active,
.card,
.card:hover,
.news-card,
.news-card:hover,
.block,
.panel,
.good,
.good:hover { box-shadow: none; transform: none; }

/* градиентные пятна и круги за шапкой главной уходят: фон ровный */
.is-modular-home::before,
.welcome-shell .welcome-hero::after,
.welcome-shell .welcome-hero::before { content: none; }

.welcome-shell .welcome-hero { background: none; border-bottom: var(--nx-border-w) solid var(--nx-line); }

/* плитки разделов — одной карточкой с тонкими разделителями (как строка показателей панели) */
.welcome-cards { border-radius: var(--nx-radius-card); overflow: hidden; box-shadow: none; }

/* рамка карточки — тонкая нейтральная линия темы, а не чёрный контур; поиск на главной без тени */
.block,
.panel,
.card,
.news-card,
.feed-item,
.forum-category,
.good,
.mod-card,
.banner,
.welcome-cards,
.welcome-cards > * { border-color: var(--nx-line); }

.welcome-shell .welcome-hero__search,
.welcome-hero__search { box-shadow: none; }

/* ---- панель разметки (ответ на форуме и др.): нажимаемое не меньше 32 точек; выбор файла в стиле темы (замечание обхода 5a) ---- */
.markup-bar__btn,
.markup-bar__color { min-height: 2rem; min-width: 2rem; }

input[type="file"]::file-selector-button {
    margin-inline-end: 0.75rem;
    padding: 0.4rem 0.9rem;
    min-height: 2rem;
    border: var(--nx-border-w) solid var(--nx-line);
    border-radius: var(--nx-radius-ctl);
    background: var(--nx-panel, transparent);
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* ======================================================================================================== поиск на главной (вариант C, выбор автора 10.10) ====
 * Одна цельная строка: лупа слева, «Поиск» — плоский акцентный текст за вертикальной чертой; под строкой «→ О движке» и разделы чипами.
 * Без подсказок и горячих клавиш. Углы, рамка и цвета — из токенов темы.
 */
.welcome-shell .welcome-hero__search-label { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.welcome-shell .welcome-hero__search { position: relative; display: flex; align-items: center; gap: 0; max-width: 640px; margin: 0 auto; padding: 0; border: var(--nx-border-w, 1px) solid var(--nx-line); border-radius: var(--nx-radius-ctl); background: var(--color-surface, var(--nx-panel)); box-shadow: none; }
.welcome-shell .welcome-hero__search::before { content: ""; flex: none; width: 20px; height: 20px; margin-inline-start: 16px; background: currentColor; opacity: .55; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><circle cx='10.5' cy='10.5' r='6.5'/><path d='M15.5 15.5L21 21'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><circle cx='10.5' cy='10.5' r='6.5'/><path d='M15.5 15.5L21 21'/></svg>") center / contain no-repeat; }
.welcome-shell .welcome-hero__search label { flex: 1; min-width: 0; }
.welcome-shell .welcome-hero__search .input { width: 100%; height: 52px; padding: 0 14px; border: 0; background: transparent; box-shadow: none; font-size: 1rem; }
.welcome-shell .welcome-hero__search:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent); }
.welcome-shell .welcome-hero__search .input:focus { outline: none; box-shadow: none; }

.welcome-shell .welcome-hero__search { max-width: 680px; }
.welcome-shell .welcome-hero__search .input { height: 60px; font-size: 1.0625rem; }
.welcome-shell .welcome-hero__search .button { height: 60px; min-width: 0; padding: 0 22px; border: 0; border-inline-start: var(--nx-border-w, 1px) solid var(--nx-line); border-radius: 0 var(--nx-radius-ctl) var(--nx-radius-ctl) 0; background: transparent; color: var(--color-accent); font-weight: 700; }
.welcome-shell .welcome-hero__search .button:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.welcome-shell .welcome-hero__search .button span { display: none; }
.welcome-shell .welcome-hero__actions { margin-top: 16px; gap: 8px; }
.welcome-shell .welcome-hero__actions::before { content: "→"; color: var(--color-muted); margin-inline-end: 4px; }
.welcome-shell .welcome-hero__actions .button { min-height: 2rem; padding: 4px 12px; border: var(--nx-border-w, 1px) solid var(--nx-line); border-radius: var(--nx-radius-ctl); background: color-mix(in srgb, var(--color-text) 4%, transparent); color: inherit; font-size: .875rem; font-weight: 600; }
.welcome-shell .welcome-hero__actions .button:hover { border-color: var(--color-accent); color: var(--color-accent); }
.welcome-shell .welcome-hero__search .input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }

/* ---- главная: стрелка «→» перед действием уже есть, вторая («↗») в самой кнопке — дубль ---- */
.welcome-shell .welcome-hero__actions .button span[aria-hidden="true"] { display: none; }

/* ---- телефон: нажимаемое не ниже 44 точек (правило автора — не меньше 32, берём с запасом) ---- */
@media (max-width: 640px) {
    .hm__more,
    .home-block__all,
    .news-home__read,
    .news-home a,
    .site-foot__col a,
    .site-foot__line a,
    .nav-more__button { display: inline-flex; align-items: center; min-height: 2.75rem; }
    .site-foot__col a { display: flex; }
}

/* телефон и планшет: кнопки и поля сайта не ниже 44 точек (проба «низкие кнопки») */
@media (max-width: 768px) {
    :root { --nx-ctl-h: 2.75rem; }
    .button { min-height: 2.75rem; }
    .welcome-shell .welcome-hero__actions .button { min-height: 2.75rem; }
}

/* подпись над полем сортировки: строка поля ровно по высоте поля, иначе кнопка рядом (выровнена по низу) уезжает вниз */
.shop-sort-form label { grid-template-rows: auto var(--nx-ctl-h); }

/* высоту кнопки задаёт токен, а не отступы с межстрочным: иначе кнопка (48) рядом с полем (42) разъезжается на 4–6 точек */
.button:not(.button--small) { padding-block: 0.25rem; }
.shop-results-toolbar__actions { align-items: flex-end; }

/* то же для полей: высоту даёт токен, а не отступы (текстовое поле и кнопка выбора были по 52 при кнопке 42–44) */
.input:not(textarea, select), .pick__btn { padding-block: 0.25rem; }

/* пары полей профиля: у одного поля есть подсказка снизу, у другого нет — по низу они разъезжались; ставим по верху */
.profile-two-fields { align-items: start; }
.profile-two-fields > .field + .field,
.comments-compose__guest > .field + .field { margin-top: 0; }
.comments-compose__guest { align-items: start; }

/* ======================================================================================================== подвал ====
 * Сетка «О сайте | столбцы-группы ссылок»: у каждого столбца заголовок (группу объявляет сам модуль), заголовки мелкие,
 * серые, разрядкой; ссылки плотным списком; язык (и тема) — меню в первой колонке под именем. На 1280 — бренд и до пяти
 * столбцов в одну строку, на 768 — два столбца, на телефоне — один, нажимаемое от 44 точек.
 */
.site-foot__grid { display: grid; grid-template-columns: minmax(12rem, 1.3fr) repeat(auto-fit, minmax(7rem, 1fr)); gap: 1.6rem 1.5rem; align-items: start; padding-block: clamp(1.8rem, 4vw, 2.6rem) 1.4rem; }
.site-foot__brand { min-width: 0; }
.site-foot__name { font-size: 1.15rem; font-weight: 700; }
.site-foot__lead { max-width: 20rem; margin: .5rem 0 0; font-size: .92rem; line-height: 1.5; opacity: .8; }
.site-foot__col { min-width: 0; max-width: none; }
.site-foot__col h2 { margin: 0 0 .7rem; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--color-muted); }
.site-foot__col ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.site-foot__col a { display: inline-block; padding: .22rem 0; color: inherit; text-decoration: none; opacity: .9; }
.site-foot__col a:hover, .site-foot__col a:focus-visible { text-decoration: underline; opacity: 1; color: var(--color-accent); }
.site-foot__col--long ul { columns: 1; }
.site-foot__prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.site-foot__prefs .site-foot__langs { margin: 0; }
@media (max-width: 62rem) { .site-foot__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .site-foot__brand { grid-column: 1 / -1; } }

/* столбец-складка: на широком экране всегда раскрыт и не нажимается, на телефоне — строка во всю ширину со знаком «+»/«−» */
.site-foot__fold > summary { list-style: none; cursor: default; pointer-events: none; }
.site-foot__fold > summary::-webkit-details-marker { display: none; }
.site-foot__fold > summary h2 { margin: 0 0 .7rem; }

@media (max-width: 37.5rem) {
    .site-foot__grid { grid-template-columns: 1fr; gap: 0; }
    .site-foot__brand { margin-bottom: 1.2rem; }
    .site-foot__col { border-top: var(--nx-border-w, 1px) solid var(--nx-line); }
    .site-foot__col:last-of-type { border-bottom: var(--nx-border-w, 1px) solid var(--nx-line); }
    .site-foot__fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; padding: .25rem 0; cursor: pointer; pointer-events: auto; }
    .site-foot__fold > summary h2 { margin: 0; }
    .site-foot__fold > summary::after { content: "+"; flex: none; width: 1.5rem; text-align: center; color: var(--color-muted); font-size: 1.25rem; line-height: 1; }
    .site-foot__fold[open] > summary::after { content: "−"; }
    .site-foot__fold > summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
    .site-foot__fold > ul { padding-bottom: .6rem; }
    .site-foot__col a { padding: .55rem 0; }
}

/* выбор темы посетителем — закрытое меню того же вида и размера, что выбор языка (подвал) */
.theme-menu { margin: 0; }
.theme-menu__sw { display: inline-block; flex: none; width: 1rem; height: 1rem; margin-inline-end: 0.5rem; border: var(--nx-border-w) solid var(--nx-line); border-radius: var(--nx-radius-pill); background: linear-gradient(135deg, var(--sw-bg, #ffffff) 0 50%, var(--sw-ac, #0066cc) 50% 100%); vertical-align: -0.15em; }
.theme-menu .langs__item { width: 100%; min-height: 2rem; border: 0; background: transparent; font: inherit; text-align: start; cursor: pointer; }
.theme-menu .langs__item .theme-menu__sw { margin-inline-end: 0.55rem; }
.theme-menu .langs__tag { margin-inline-start: auto; }
.theme-menu .langs__code { margin-inline-end: 0.4rem; }
.theme-menu .langs__list { min-width: 11rem; }
@media (max-width: 37.5rem) { .theme-menu .langs__item { min-height: 2.75rem; } }

/* ======================================================================================================== видео ====
 * Видео в тексте (разметка отдаёт Markup): до нажатия — обложка, крупная кнопка и время; цвета и углы берутся из темы, поверх
 * картинки всегда тёмная подложка и светлый текст, чтобы читалось на любом кадре. Панель управления — nx-player.css (грузится при первом ролике).
 */
.md-video {
    position: relative;
    display: block;
    margin: 1.2rem 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: var(--nx-border-w, 1px) solid var(--nx-line, rgba(127, 127, 127, 0.3));
    border-radius: var(--nx-radius-card, 3px);
    background: #05070a;
    color: #f4f6f8;
}

.md-video__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: inherit;
    text-decoration: none;
    background:
        radial-gradient(60% 80% at 20% 30%, color-mix(in srgb, var(--color-accent, #4fd0ff) 45%, transparent), transparent 70%),
        linear-gradient(135deg, color-mix(in srgb, var(--color-text, #222) 70%, #000), #0b0f14);
}

.md-video__play:focus-visible { outline: 3px solid var(--color-accent, #4fd0ff); outline-offset: -3px; }

.md-video__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.md-video__icon {
    position: relative;
    display: block;
    width: clamp(3.6rem, 12%, 5rem);
    aspect-ratio: 1;
    border: 2px solid var(--color-accent, #4fd0ff);
    border-radius: var(--nx-radius-ctl, 3px);
    background: rgba(8, 10, 14, 0.82);
    transition: transform 0.15s ease;
}

.md-video__icon::before {
    content: "";
    position: absolute;
    inset-block: 27%;
    inset-inline-start: 38%;
    width: 30%;
    background: #f4f6f8;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.md-video__play:hover .md-video__icon,
.md-video__play:focus-visible .md-video__icon { transform: scale(1.06); }

.md-video__time,
.md-video__host,
.md-video__resume {
    position: absolute;
    inset-block-end: 0.8rem;
    padding: 0.15rem 0.55rem;
    border-radius: var(--nx-radius-pill, 3px);
    background: rgba(10, 12, 16, 0.78);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

.md-video__time { inset-inline-end: 0.8rem; }
.md-video__host { inset-inline-start: 0.8rem; color: rgba(244, 246, 248, 0.82); font-weight: 600; }
.md-video__resume { inset-inline-start: 0.8rem; max-width: calc(100% - 6rem); border: 1px solid var(--color-accent, #4fd0ff); }

.md-video__player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
