/* Общие стили публичных страниц в новом дизайне (решение пользователя, 2026-10-16): страницы модулей, блог, оферта.
   Подключается после theme.css; цвета — переменные темы (светлая по умолчанию, тёмная — по выбору, assets/themeinit.js).
   Главная держит такие же стили у себя (landing.html), вход и проверка — свои. */
:root, [data-theme="light"] {
  --pg: #ffffff; --panel: #f4f6f5; --card: #ffffff; --card2: #f6f8fa;
  --green-tx: #1878ad; --violet-tx: #6d4fd8;
  --sh-card: 0 10px 30px rgba(16, 28, 40, .08), 0 2px 6px rgba(16, 28, 40, .05);
  --sh-big: 0 24px 60px rgba(16, 28, 40, .12);
  --banner: linear-gradient(120deg, #23282d 0%, #3a4148 60%, #4b535b 100%);
}
[data-theme="dark"] {
  --pg: #0b131c; --panel: #121c26; --card: #16212c; --card2: #1e2a36;
  --green-tx: #2aabee; --violet-tx: #ad97ff;
  --sh-card: 0 10px 30px rgba(0, 0, 0, .35);
  --sh-big: 0 24px 60px rgba(0, 0, 0, .55);
  --banner: linear-gradient(120deg, #0d1b2a 0%, #11304c 55%, #16466f 100%);
}
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { background: var(--pg); font-size: 16px; overflow-x: hidden; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 860px; }
.btn { text-decoration: none; }
.btn.outline { background: transparent; color: var(--green-tx); border-color: var(--accent); font-weight: 600; }
.btn.outline:hover { background: var(--soft); color: var(--green-tx); border-color: var(--accent); }

/* шапка — как на главной */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--pg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.logo .zlogo { width: 34px; height: 34px; flex: none; display: block; }
.logo span { white-space: nowrap; }
.top nav { display: flex; gap: 26px; flex: 1; justify-content: center; }
.top nav a { position: relative; padding: 6px 0; color: var(--ink2); text-decoration: none; font-size: 15.5px; font-weight: 500; white-space: nowrap; }
.top nav a:hover { color: var(--ink); }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transition: transform .2s; }
.top nav a:hover::after { transform: scaleX(1); }
.top .actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.top .btn.icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; border: 1px solid var(--line); color: var(--ink2); background: transparent; }
.top .btn.icon:hover { color: var(--green-tx); border-color: var(--accent); background: transparent; }
.btn.lang { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; }
.top .actions .btn:not(.icon) { padding: 10px 16px; border-radius: 10px; font-size: 15px; }
@media (max-width: 900px) { .top nav { display: none; } }
@media (max-width: 520px) { .top .actions .btn.outline { display: none; } .top .wrap { gap: 10px; height: 64px; } }
@media (max-width: 400px) { .top .wrap { padding: 0 14px; } .top .actions { gap: 6px; } .top .actions .btn:not(.icon) { padding: 9px 12px; font-size: 14px; }
  .logo { font-size: 17px; } .logo .zlogo { width: 30px; height: 30px; } .top .btn.icon { width: 36px; height: 36px; } }
@media (max-width: 350px) { .logo span { display: none; } }

/* общие элементы */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--green-tx); }
.crumbs b { color: var(--ink); font-weight: 500; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--green-tx); font-size: 14px; font-weight: 600; background: var(--soft);
  padding: 7px 14px; border-radius: 999px; }
.sec-title { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; margin: 0 0 24px; }
/* вопросы — карточками, открытый — белый с тенью */
details.surface { border: 0; border-radius: 20px; padding: 0 26px; margin-bottom: 10px; background: var(--panel); box-shadow: none; transition: background .2s, box-shadow .2s; }
details.surface[open] { background: var(--card); box-shadow: var(--sh-card); }
[data-theme="dark"] details.surface[open] { box-shadow: inset 0 0 0 1px var(--line); }
details.surface summary { cursor: pointer; list-style: none; position: relative; padding: 20px 44px 20px 0; font-size: 17px; font-weight: 600; }
details.surface summary::-webkit-details-marker { display: none; }
details.surface summary::after { content: ""; position: absolute; right: 0; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; transition: transform .2s;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312924a' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; }
[data-theme="dark"] details.surface summary::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232bea80' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E"); }
details.surface[open] summary::after { transform: rotate(45deg); }
details.surface p { margin: 0; padding: 0 0 22px; color: var(--ink2); line-height: 1.6; }
/* призыв в конце страницы — тёмная плашка, как «Не нашли подходящий модуль?» на главной */
.surface.cta-box { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 34px 38px;
  border: 0; border-radius: 30px; color: #fff; background: var(--banner); box-shadow: none; overflow: hidden; isolation: isolate; }
.surface.cta-box::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 90% at 85% 50%, rgba(42, 171, 238, .22), transparent 70%); }
[data-theme="dark"] .surface.cta-box { box-shadow: inset 0 0 0 1px #1e3a52; }
.cta-box h2 { margin: 0 0 6px; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.01em; }
.cta-box p { margin: 0; color: rgba(255, 255, 255, .78); max-width: 60ch; }
.cta-box .btn { padding: 14px 22px; border-radius: 12px; background: #fff; color: #15191c; }
.cta-box .btn:hover { background: #f1f5f9; box-shadow: none; }
[data-theme="dark"] .cta-box .btn { background: var(--accent); color: var(--accent-ink); }

/* подвал — серой панелью */
footer { padding: 72px 0 32px; color: var(--muted); font-size: 14.5px; }
footer .wrap { width: calc(100% - 48px); max-width: 1192px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px 32px; align-items: center;
  padding: 40px 44px 30px; border-radius: 34px; background: var(--panel); }
footer .mods { grid-column: 1 / -1; order: -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
footer .mods a { padding: 5px 0; color: var(--ink2); font-size: 15px; text-decoration: none; }
footer a { color: var(--muted); }
footer a:hover, footer .mods a:hover { color: var(--green-tx); }
@media (max-width: 900px) { footer .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  footer { padding-top: 56px; }
  footer .wrap { width: calc(100% - 32px); grid-template-columns: minmax(0, 1fr); padding: 30px 22px 24px; border-radius: 26px; }
  .surface.cta-box { padding: 26px 22px; border-radius: 26px; }
  details.surface { padding: 0 18px; }
  details.surface summary { font-size: 16px; }
}
