/* Сайт программы на главном домене: страница о программе, регистрация и
   вход (templates/site). Цвета, шрифт и поля ввода — из app.css; здесь
   только раскладка сайта. Оформление — светлое или темное (как в системе
   или по кнопке в шапке, site.js), классического здесь нет. */

.site { min-height: 100vh; display: flex; flex-direction: column; }
.site main { flex: 1; }
.site-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--card); padding: 8px 12px; border-radius: var(--r); }
.skip:focus { left: 8px; }

/* Шапка */
.site-top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.site-top .site-wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; letter-spacing: -.02em; color: var(--strong); }
.site-brand:hover { text-decoration: none; }
.site-brand::before { content: ""; width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #22d3ee)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); }
.site-nav { display: flex; gap: 2px; }
.site-nav a { color: var(--muted); padding: 7px 12px; border-radius: var(--r); font-weight: 500; font-size: 14.5px; }
.site-nav a:hover { background: var(--hover); color: var(--strong); text-decoration: none; }
.site-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.site-actions .button { padding: 7px 16px; }
.theme-btn { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; color: var(--muted); }
.theme-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .i-sun { display: none; }
  :root:not([data-theme]) .theme-btn .i-moon { display: block; }
}

.btn-lg { padding: 12px 22px; font-size: 15.5px; border-radius: 10px; }
.button.wide, button.wide { width: 100%; text-align: center; padding: 11px 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; font-weight: 650; color: var(--accent-text); margin: 0 0 14px; }

/* Первый экран */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%); }
.hero::after { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 90%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 56px; align-items: center; padding: 84px 24px 96px; }
.hero h1 { font-size: clamp(48px, 7vw, 76px); line-height: 1; letter-spacing: -.045em; margin: 0 0 20px; }
.lead { font-size: 18.5px; line-height: 1.6; color: var(--muted); margin: 0 0 30px; max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.cta.center { justify-content: center; }
.chips-cap { margin: 30px 0 10px; font-size: 13.5px; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-l { border: 1px solid var(--line-strong); border-radius: 16px; padding: 6px 14px; font-size: 13.5px; color: var(--muted); background: var(--card); }
.chip-l b { color: var(--strong); font-weight: 600; }

/* Окно программы (пример) */
.win { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--raised); }
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.win-url { flex: 1; min-width: 0; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted);
  background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 3px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); font-weight: 650; }
.win-app { display: grid; grid-template-columns: 128px minmax(0, 1fr); }
.win-side { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--raised); font-size: 12.5px; }
.win-side span { padding: 5px 8px; border-radius: 6px; color: var(--muted); }
.win-side span.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.win-brand { display: flex; align-items: center; gap: 7px; color: var(--strong); font-size: 14px; margin: 0 0 10px 6px; }
.win-brand::before { content: ""; width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #22d3ee)); }
.win-body { padding: 18px 20px 20px; min-width: 0; }
.win-h { display: flex; flex-direction: column; margin-bottom: 12px; }
.win-h b { font-size: 17px; color: var(--strong); letter-spacing: -.01em; }
.win-h span { font-size: 12px; color: var(--muted); }
.mkpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mkpi { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--raised); min-width: 0; }
.mkpi span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkpi b { display: block; font-size: 19px; color: var(--strong); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; margin: 1px 0; }
.mkpi em { display: block; font-style: normal; font-size: 11px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkpi em.up { color: var(--ok-fg); }
.mkpi em.late { color: var(--warn); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 48px; margin: 14px 0 4px; padding: 0 2px; border-bottom: 1px solid var(--line); }
.bars span { flex: 1; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--accent) 22%, var(--chip)); }
.bars span.on { background: var(--accent); }
.bars .b1 { height: 38%; } .bars .b2 { height: 46%; } .bars .b3 { height: 41%; } .bars .b4 { height: 55%; }
.bars .b5 { height: 49%; } .bars .b6 { height: 62%; } .bars .b7 { height: 58%; } .bars .b8 { height: 70%; }
.bars .b9 { height: 66%; } .bars .b10 { height: 78%; } .bars .b11 { height: 84%; } .bars .b12 { height: 96%; }
.win-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 650; color: var(--subtle); margin: 14px 0 6px; }
.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 76px; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 12.5px; }
.row .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.row .t { color: var(--strong); font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 10.5px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); white-space: nowrap; }
.row .s.ok { background: var(--ok-bg); color: var(--ok-fg); }
.row b { text-align: right; color: var(--strong); font-variant-numeric: tabular-nums; }

/* Разделы страницы */
.sec { padding: 88px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.sec h2, .cta-band h2 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 16px; color: var(--strong); }
.intro { font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 44em; margin: 0 0 40px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease; }
.feat:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.feat h3 { font-size: 16.5px; letter-spacing: -.01em; color: var(--strong); margin: 14px 0 6px; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.split .intro { margin-bottom: 22px; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--fg); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 5px; height: 8px; border: solid var(--accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.login-mock { display: flex; flex-direction: column; padding: 34px 40px 38px; max-width: 360px; margin: 0 auto; }
.lm-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--strong); margin-bottom: 18px; }
.lm-brand::before { content: ""; width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #22d3ee)); }
.login-mock > b { font-size: 22px; color: var(--strong); letter-spacing: -.02em; }
.lm-org { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.lm-label { font-size: 12.5px; color: var(--muted); margin: 8px 0 4px; }
.lm-input { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 7px 10px; font-size: 14px; color: var(--fg); background: var(--card); }
.lm-btn { margin-top: 18px; border-radius: var(--r); padding: 9px; text-align: center; font-weight: 600; background: var(--accent); color: var(--accent-fg); }

.steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(step); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: var(--accent); color: var(--accent-fg); font-weight: 700; font-size: 14px; }
.steps b { color: var(--strong); font-size: 16px; }
.steps span { color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.faq { border-top: 1px solid var(--line); max-width: 900px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 600; font-size: 17px; color: var(--strong); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--muted); transition: transform .15s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); line-height: 1.65; max-width: 46em; }

.cta-band { padding: 88px 0; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, color-mix(in srgb, var(--accent) 14%, transparent), transparent); }
.cta-band .site-wrap { position: relative; }
.cta-band p { color: var(--muted); font-size: 17px; margin: 0 0 26px; }

.site-foot { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: 14px; }
.site-foot .site-wrap { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.site-foot b { color: var(--strong); }
.site-foot .links { display: flex; gap: 20px; }

/* Регистрация и вход */
.auth-page { display: grid; place-items: center; padding: 56px 16px 72px; position: relative; }
.auth-page::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent); }
.auth-card { position: relative; width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow-pop); }
.auth-card.wide { max-width: 560px; }
.auth-card h2, .signin-dialog h2 { font-size: 24px; letter-spacing: -.025em; margin: 0 0 6px; color: var(--strong); }
.auth-card .sub, .signin-dialog .sub { color: var(--muted); margin: 0 0 20px; line-height: 1.55; }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.site-form { display: flex; flex-direction: column; gap: 14px; }
.site-form .error { margin: 0; }
.site-form label .hint { display: block; font-weight: 400; color: var(--subtle); font-size: 12.5px; margin-top: 5px; }
.site-form .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.site-form .fine { font-size: 13px; color: var(--muted); margin: 2px 0 0; line-height: 1.55; }
.slug-field { display: flex; align-items: stretch; margin-top: 4px; }
.slug-field input { margin-top: 0; border-radius: var(--r) 0 0 var(--r); min-width: 0; }
.slug-field .suffix { display: flex; align-items: center; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r) var(--r) 0;
  padding: 0 11px; background: var(--raised); color: var(--muted); font-size: 14px; white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-form .notice { margin: 0; }
.site-note { margin: 0; padding: 10px 14px; border-radius: var(--r); font-size: 14px; line-height: 1.5; color: var(--fg);
  background: color-mix(in srgb, var(--accent) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.site-form input.code { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.site-form.resend { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

.signin-dialog { border: 1px solid var(--line); border-radius: 16px; padding: 30px; width: min(440px, calc(100vw - 32px));
  background: var(--card); color: var(--fg); box-shadow: var(--shadow-pop); }
.signin-dialog::backdrop { background: rgb(5 7 15 / .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.signin-dialog .x { position: absolute; right: 12px; top: 10px; width: 34px; height: 34px; padding: 0; border: 0; box-shadow: none;
  background: transparent; font-size: 22px; font-weight: 400; color: var(--muted); }
.signin-dialog .x:hover { background: var(--hover); }

@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero-grid { padding: 56px 24px 64px; }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { display: none; }
}
@media (max-width: 640px) {
  .site-wrap, .hero-grid { padding-left: 16px; padding-right: 16px; }
  .site-top .site-wrap { gap: 12px; }
  .hide-sm { display: none; }
  .hero h1 { font-size: 48px; }
  .lead { font-size: 17px; }
  .win-app { grid-template-columns: minmax(0, 1fr); }
  .win-side { display: none; }
  .mkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row .d, .row .s { display: none; }
  .feat-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .sec, .cta-band { padding: 64px 0; }
  .site-form .pair { grid-template-columns: minmax(0, 1fr); }
  .auth-card { padding: 24px 20px; }
}
