/* YouPilot — единая дизайн-система */

:root{
  --paper:#0b0e1a;
  --card:#10142a;
  --card-glass:#171b33;
  --ink:#f4f5fa;
  --muted:#9195b8;
  --line:rgba(255,255,255,.08);
  --accent:#6c7eff;
  --accent-ink:#0b0e1a;
  --accent-soft:rgba(108,126,255,.16);
  --accent-gradient:linear-gradient(90deg,#6c7eff,#a78bfa,#f472b6);
  --success:#34d399;
  --danger:#f87171;
  --danger-soft:rgba(239,68,68,.16);
  --radius:16px;
  --radius-s:11px;
  --shadow:0 18px 50px rgba(0,0,0,.5);
  --shadow-s:0 6px 20px rgba(0,0,0,.35);
  --glow:0 0 20px rgba(59,130,246,.25);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Arial,sans-serif;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.6 var(--font)}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}
button{color:inherit}
.app-body *{min-width:0}
.app-body h1,.app-body h2,.app-body h3,.app-body p{overflow-wrap:anywhere}
h1,h2,h3{letter-spacing:-.02em}

.skip-link{position:fixed;left:16px;top:-60px;z-index:999;background:var(--accent);color:#fff;padding:12px;border-radius:10px}
.skip-link:focus{top:12px}

/* ---------- Шапка приложения ---------- */
.app-header{height:68px;padding:0 clamp(20px,4vw,56px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:rgba(20,28,46,.82);backdrop-filter:blur(14px);position:sticky;top:0;z-index:50}
.brand{display:flex;align-items:center;gap:8px;font-weight:800;letter-spacing:.02em;font-size:17px}
.brand>span:not(.brand-mark){background:var(--accent-gradient);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.brand-mark{display:none}
.brand:after{content:none}
.app-nav{display:flex;align-items:center;gap:22px;font-size:14px;font-weight:600}
.app-nav>a:not(.button){color:var(--muted);transition:color .15s}
.app-nav>a:not(.button):hover{color:var(--ink)}
.app-nav form{margin:0}
.nav-link{border:0;background:none;padding:0;cursor:pointer;color:var(--muted)}
.nav-link:hover{color:var(--ink)}

/* ---------- Кнопки ---------- */
.button{border:0;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:0 24px;border-radius:999px;font-weight:700;font-size:15px;cursor:pointer;transition:transform .15s,box-shadow .15s,background .15s;white-space:nowrap}
.button:hover{transform:translateY(-1px)}
.button:active{transform:translateY(0)}
.button-small{min-height:40px;padding:0 18px;font-size:14px}
.button-dark{background:rgba(255,255,255,.1);color:#fff}
.button-dark:hover{background:rgba(255,255,255,.16)}
.button-accent{background:var(--accent-gradient);color:var(--accent-ink);box-shadow:var(--glow)}
.button-accent:hover{box-shadow:0 0 26px rgba(59,130,246,.4)}
.button-ghost{border:1px solid var(--line);background:var(--card-glass);color:var(--ink)}
.text-link{border-bottom:1px solid currentColor;padding-bottom:2px;font-weight:700}

/* ---------- Тосты ---------- */
.toast-stack{position:fixed;z-index:100;right:24px;top:84px;display:grid;gap:10px}
.toast{background:var(--card);padding:14px 18px;border:1px solid var(--line);border-left:4px solid var(--accent);box-shadow:var(--shadow);border-radius:12px;transition:.4s;font-size:14px}
.toast-success{border-left-color:var(--success)}
.toast-error{border-left-color:var(--danger)}
.toast-out{opacity:0;transform:translateX(20px);pointer-events:none}

.eyebrow,.kicker{font-size:12px;letter-spacing:.14em;font-weight:800;text-transform:uppercase;color:var(--muted)}

/* ============================================================
   Лендинг
   ============================================================ */
.landing-hero{padding:clamp(56px,9vh,110px) 24px 64px;display:grid;justify-items:center;text-align:center}
.hero-inner{width:min(860px,100%);display:grid;justify-items:center}
.hero-badge{display:inline-flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--line);border-radius:999px;padding:8px 16px;font-size:13px;font-weight:600;color:var(--muted)}
.hero-badge:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--accent)}
.landing-hero h1{font-size:clamp(38px,6vw,68px);line-height:1.04;font-weight:800;margin:26px 0 18px}
.hero-sub{font-size:clamp(16px,2vw,19px);color:var(--muted);max-width:620px;margin:0 0 34px}
.hero-brief{width:min(720px,100%);background:var(--card);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);padding:16px;display:grid;gap:12px;text-align:left}
.hero-brief:focus-within{border-color:var(--accent);box-shadow:0 0 0 4px rgba(59,130,246,.22),var(--shadow)}
.hero-brief textarea{border:0;outline:none;resize:none;min-height:76px;background:transparent;font-size:16px;line-height:1.5}
.hero-brief-foot{display:flex;align-items:center;justify-content:space-between;gap:14px}
.hero-brief-foot small{color:var(--muted);font-size:12px}
.hero-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:18px}
.hero-chips button,.brief-chips button{border:1px solid var(--line);background:var(--card);border-radius:999px;padding:9px 16px;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer;transition:.15s}
.hero-chips button:hover,.brief-chips button:hover{border-color:var(--ink);color:var(--ink)}
.hero-points{display:flex;flex-wrap:wrap;gap:10px 26px;justify-content:center;list-style:none;padding:0;margin:36px 0 0;color:var(--muted);font-size:14px;font-weight:600}
.hero-points li:before{content:"✓";color:var(--success);font-weight:800;margin-right:8px}

.landing-section{padding:clamp(64px,9vw,110px) clamp(24px,7vw,110px);max-width:1280px;margin:0 auto}
.section-heading{max-width:720px;margin:0 auto 54px;text-align:center}
.section-heading h2{font-size:clamp(28px,3.6vw,44px);line-height:1.12;margin:14px 0 12px}
.section-heading p{color:var(--muted);margin:0;font-size:16px}

.steps-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.steps-grid article{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:28px;box-shadow:var(--shadow-s)}
.steps-grid article>b{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--accent-soft);color:var(--accent);font-size:16px}
.steps-grid h3{font-size:19px;margin:20px 0 8px}
.steps-grid p{color:var(--muted);margin:0;font-size:14px}

.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.feature-grid article{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:28px;box-shadow:var(--shadow-s)}
.feature-grid article.feature-wide{grid-column:1/-1;display:grid;grid-template-columns:1.1fr .9fr;gap:34px;align-items:center;background:linear-gradient(150deg,#141c2e 0%,#1a1636 100%);color:#fff;border-color:rgba(139,92,246,.3)}
.feature-wide p{color:#a9b2c5}
.feature-tag{display:inline-block;font-size:11px;letter-spacing:.14em;font-weight:800;text-transform:uppercase;color:var(--accent);margin-bottom:14px}
.feature-wide .feature-tag{color:#9fb0ff}
.feature-grid h3{font-size:20px;margin:0 0 8px}
.feature-grid p{color:var(--muted);font-size:14px;margin:0}
.command-demo{background:#0e1422;border:1px solid var(--line);border-radius:14px;padding:18px;display:flex;align-items:center;gap:12px;font-size:14px;color:#dfe2e8}
.command-demo i{width:9px;height:9px;background:var(--accent);border-radius:50%;flex:none}
.command-demo b{margin-left:auto;color:#9fb0ff;font-size:13px;white-space:nowrap}

.landing-cta{max-width:1280px;margin:0 auto;padding:0 clamp(24px,7vw,110px) 90px}
.landing-cta>div{background:linear-gradient(150deg,#1b2740 0%,#221a44 100%);border:1px solid rgba(139,92,246,.28);color:#fff;border-radius:26px;padding:clamp(44px,6vw,72px);display:grid;justify-items:center;text-align:center}
.landing-cta h2{font-size:clamp(30px,4.4vw,52px);line-height:1.08;margin:14px 0 12px}
.landing-cta p{color:#a9b2c5;max-width:520px;margin:0 0 30px}
.landing-cta .eyebrow{color:#9fb0ff}

.landing-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:30px clamp(24px,7vw,110px);border-top:1px solid var(--line);color:var(--muted);font-size:14px}
.landing-footer .brand{color:var(--ink)}

/* ============================================================
   Страницы приложения
   ============================================================ */
.page-shell{max-width:1280px;margin:auto;padding:52px clamp(20px,5vw,64px) 100px}
.narrow-shell{max-width:760px}
.page-title{margin-bottom:38px}
.page-title h1{font-size:40px;line-height:1.05;margin:14px 0 8px}
.page-title p{color:var(--muted);margin:0}

/* ---------- Дашборд ---------- */
.row-title,.dashboard-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}
.dashboard-head h1{font-size:clamp(32px,4.6vw,46px);font-weight:800;margin:10px 0 0}
.dashboard-head sup{font-size:14px;color:var(--muted);vertical-align:top;margin-left:8px;font-weight:600}
.filter-bar{display:flex;justify-content:space-between;gap:16px;margin:36px 0 22px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:10px 16px}
.search-field{display:flex;gap:8px;align-items:center;min-width:280px;color:var(--muted)}
.search-field input,.filter-bar select{border:0;background:transparent;outline:none;color:var(--ink)}
.search-field input{width:100%}
.filter-bar select{color:var(--muted);cursor:pointer}
.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.project-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:.2s;box-shadow:var(--shadow-s)}
.project-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.project-preview{height:220px;display:block;position:relative;overflow:hidden;background:#1c2438}
.project-preview img{width:100%;height:100%;object-fit:cover;display:block}
.project-preview:before{content:"";position:absolute;inset:26px 34px -10px;background:#fff;border-radius:10px 10px 0 0;border:1px solid rgba(0,0,0,.07);box-shadow:0 10px 30px rgba(0,0,0,.08)}
.project-preview:has(img):before{display:none}
.family-premium_dark{background:#25272d}
.family-vivid_tech{background:#dce3ff}
.family-warm_organic{background:#efe3d3}
.family-editorial{background:#f4ddd6}
.family-strict_corporate{background:#dfe7ea}
.family-modern_minimal{background:#e9e8e3}
.preview-brand{position:absolute;z-index:2;left:56px;top:48px;font-size:34px;font-weight:800;color:#15171c}
.preview-lines{position:absolute;z-index:2;left:56px;right:56px;bottom:24px}
.preview-lines i{display:block;height:6px;border-radius:4px;background:#d8d6cf;margin-top:9px}
.preview-lines i:nth-child(2){width:70%}
.preview-lines i:nth-child(3){width:38%;background:var(--accent);height:16px}
.status{display:inline-flex;align-items:center;border-radius:30px;padding:5px 11px;background:rgba(255,255,255,.08);color:var(--muted);font-size:10px;letter-spacing:.06em;font-weight:800;text-transform:uppercase}
.project-preview>.status{position:absolute;z-index:3;top:12px;right:12px;background:rgba(11,15,25,.85);backdrop-filter:blur(6px)}
.status-ready,.status-published,.status-done{background:rgba(52,211,153,.16);color:#6ee7b7}
.status-failed,.status-spam{background:var(--danger-soft);color:#fca5a5}
.status-generating,.status-in_progress{background:rgba(250,204,21,.14);color:#fde047}
.project-info{display:flex;justify-content:space-between;align-items:flex-start;padding:18px 20px}
.project-info h2{font-size:17px;margin:0 0 6px}
.project-info p{font-size:12px;color:var(--muted);margin:0}
.card-menu{position:relative}
.card-menu summary{list-style:none;cursor:pointer;letter-spacing:2px;color:var(--muted);padding:2px 6px;border-radius:8px}
.card-menu summary:hover{background:var(--paper)}
.card-menu summary::-webkit-details-marker{display:none}
.card-menu>div{position:absolute;right:0;top:28px;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow);width:190px;padding:8px;z-index:5;border-radius:12px}
.card-menu a,.card-menu button{display:block;width:100%;border:0;background:none;padding:9px 10px;text-align:left;cursor:pointer;font-size:13px;border-radius:8px}
.card-menu a:hover,.card-menu button:hover{background:var(--paper)}
.card-menu .danger{color:var(--danger)}
.retry-row{border-top:1px solid var(--line);padding:10px 20px;display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}
.retry-row button{border:0;background:none;font-weight:800;cursor:pointer;color:var(--accent)}
.empty-state{grid-column:1/-1;text-align:center;padding:80px 20px;border:1.5px dashed rgba(255,255,255,.18);border-radius:var(--radius);background:var(--card-glass)}
.empty-state h2{font-size:30px;margin:16px 0 8px}
.empty-state p{color:var(--muted);max-width:460px;margin:0 auto 24px}
.empty-visual{height:88px;display:flex;align-items:flex-end;justify-content:center;gap:6px}
.empty-visual i{width:24px;border-radius:6px 6px 0 0;background:rgba(255,255,255,.14)}
.empty-visual i:nth-child(1){height:36px}
.empty-visual i:nth-child(2){height:82px;background:var(--accent)}
.empty-visual i:nth-child(3){height:54px}
.pagination{display:flex;justify-content:center;align-items:center;gap:22px;margin-top:40px;font-weight:700}
.surface-card,.table-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:32px;box-shadow:var(--shadow-s)}

/* ---------- Авторизация ---------- */
/* ---------- Авторизация ---------- */
.auth-shell{min-height:calc(100vh - 68px);display:grid;grid-template-columns:1.1fr 0.9fr;background:var(--bg)}
.auth-aside{
  background: radial-gradient(circle at 10% 20%, rgba(110, 168, 254, 0.12) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(167, 139, 250, 0.15) 0%, transparent 45%),
              linear-gradient(155deg, #090c1e 0%, #0e122b 50%, #151a3a 100%);
  color: #fff;
  padding: 60px clamp(32px, 5vw, 70px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-aside-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(110, 168, 254, 0.12);
  border: 1px solid rgba(110, 168, 254, 0.28);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #93b4ff;
  letter-spacing: 0.02em;
  width: fit-content;
  margin-bottom: 24px;
}
.auth-aside-badge .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecf8e;
  box-shadow: 0 0 8px #3ecf8e;
}
.auth-aside h1 {
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.auth-aside h1 .grad-text {
  background: linear-gradient(135deg, #6ea8fe 0%, #a78bfa 60%, #ffd166 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-aside-sub {
  font-size: 14px;
  line-height: 1.6;
  color: #9aa3c7;
  max-width: 480px;
  margin: 0 0 32px;
}
.auth-feature-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
}
.auth-feature-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}
.auth-feature-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(110, 168, 254, 0.3);
  transform: translateX(4px);
}
.feature-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(110, 168, 254, 0.2), rgba(167, 139, 250, 0.2));
  border: 1px solid rgba(110, 168, 254, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.feature-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.feature-card-body strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #eef1ff;
}
.feature-card-body span {
  font-size: 12px;
  color: #8b93c4;
  line-height: 1.45;
}
.auth-aside-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-aside-stats .stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.auth-aside-stats .stat-val {
  font-size: 18px;
  font-weight: 800;
  color: #6ea8fe;
  font-family: var(--font-mono, monospace);
}
.auth-aside-stats .stat-lbl {
  font-size: 11px;
  color: #8b93c4;
}

.auth-panel{display:grid;place-items:center;padding:50px 32px;background:var(--bg)}
.auth-panel>div{width:min(440px,100%)}
.auth-panel h2{font-size:32px;line-height:1.1;margin:12px 0 8px;font-weight:800;letter-spacing:-0.02em}
.auth-panel>div>p{color:var(--muted);margin:0 0 26px;font-size:14px;line-height:1.5}

/* ---------- Формы ---------- */
.stack-form{display:grid;gap:18px}
.stack-form>div,.field-group{display:grid;gap:7px}
.stack-form label,.field-group label{font-size:13px;font-weight:700}
.stack-form input:not([type="checkbox"]):not([type="radio"]),
.stack-form textarea,
.stack-form select,
.project-form input:not([type="checkbox"]):not([type="radio"]),
.project-form textarea,
.project-form select{
  width:100%;border:1.5px solid var(--line);background:var(--card);padding:13px 15px;outline:none;border-radius:var(--radius-s);transition:border-color .15s,box-shadow .15s;color:var(--ink);font-family:inherit;font-size:14px;
}
.stack-form input:not([type="checkbox"]):not([type="radio"]):focus,
.stack-form textarea:focus,
.project-form input:not([type="checkbox"]):not([type="radio"]):focus,
.project-form textarea:focus,
.project-form select:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(59,130,246,.22)}

/* 152-FZ Consent Block */
.consent-field-wrap{margin:4px 0 2px}
.consent-row{
  display:flex!important;
  flex-direction:row!important;
  align-items:flex-start!important;
  gap:12px!important;
  cursor:pointer;
  padding:12px 14px!important;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.09);
  border-radius:12px;
  transition:all .15s;
}
.consent-row:hover{background:rgba(255,255,255,0.06);border-color:rgba(110,168,254,0.35)}
.consent-row input[type="checkbox"]{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  margin:2px 0 0 0!important;
  padding:0!important;
  accent-color:#6ea8fe!important;
  cursor:pointer;
  flex-shrink:0!important;
}
.consent-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.consent-title{font-size:12.5px;font-weight:700;color:var(--ink);line-height:1.35}
.consent-desc{font-size:11px;color:var(--muted);line-height:1.45;font-weight:400}
.consent-desc a{color:#6ea8fe;text-decoration:underline}
.consent-desc a:hover{color:#a78bfa}
.helptext{font-size:12px;color:var(--muted)}
.input-status-wrap{position:relative}
.field-help{font-size:12px;color:var(--muted);margin:0 0 4px;line-height:1.4}
.field-error{font-size:12px;color:#fca5a5;margin:4px 0 0;font-weight:600}
ul.errorlist{margin:0;padding:9px 13px;list-style:none;background:var(--danger-soft);color:#fca5a5;font-size:13px;border-radius:10px}
.form-error{padding:12px 15px;background:var(--danger-soft);color:#fca5a5;border-radius:var(--radius-s);font-size:14px;margin-bottom:16px}
.form-links{display:flex;justify-content:space-between;gap:14px;margin-top:24px;font-size:14px;color:var(--muted)}
.form-links a{font-weight:700;color:var(--ink);border-bottom:1px solid}

/* ---------- Служебные страницы ---------- */
.state-page{text-align:center;min-height:70vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px}
.state-icon{width:72px;height:72px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:28px}
.state-page h1{font-size:38px;margin:24px 0 8px}
.state-page p{color:var(--muted);margin-bottom:25px}

/* ---------- Privacy / комплаенс ---------- */
.compliance-section{background:transparent}
.compliance-grid,.privacy-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.compliance-grid article,.privacy-grid article{border:1px solid var(--line);background:var(--card);border-radius:var(--radius);padding:28px;min-height:220px;box-shadow:var(--shadow-s)}
.compliance-grid article>b,.privacy-grid article>b{display:grid;place-items:center;width:52px;height:52px;background:var(--accent-soft);color:var(--accent);border-radius:14px;font-size:13px;font-weight:800}
.compliance-grid h3,.privacy-grid h2{font-size:20px;line-height:1.15;margin:26px 0 10px}
.compliance-grid p,.privacy-grid p{color:var(--muted);font-size:14px}
.compliance-note{font-size:12px;color:var(--muted);max-width:820px;margin:22px auto 0}
.privacy-page{max-width:1240px}
.privacy-note{margin-top:20px;background:linear-gradient(150deg,#1b2740,#221a44);border:1px solid rgba(139,92,246,.28);color:#fff;padding:24px;border-radius:var(--radius);display:grid;grid-template-columns:120px 1fr;gap:20px}
.privacy-note p{margin:0;color:#a9b2c5}

/* ---------- Таблицы ---------- */
.table-card{padding:0;overflow:auto}
.table-card table{border-collapse:collapse;width:100%}
.table-card th,.table-card td{text-align:left;border-bottom:1px solid var(--line);padding:16px 20px}
.table-card th{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.table-card td span{display:block;font-size:12px;color:var(--muted)}
.table-empty{text-align:center!important;padding:60px!important;color:var(--muted)}

/* ============================================================
   Создание сайта (бриф)
   ============================================================ */
.create-page{max-width:780px;margin:0 auto;padding:clamp(44px,7vh,72px) 24px 110px}
.create-head{text-align:center;margin-bottom:34px}
.create-head h1{font-size:clamp(30px,4.4vw,44px);line-height:1.08;margin:14px 0 10px}
.create-head p{color:var(--muted);max-width:560px;margin:0 auto;font-size:16px}
.brief-box{background:var(--card);border:1.5px solid var(--line);border-radius:22px;box-shadow:var(--shadow);padding:18px;display:grid;gap:12px}
.brief-box:focus-within{border-color:var(--accent);box-shadow:0 0 0 4px rgba(59,130,246,.22),var(--shadow)}
.brief-box textarea{border:0!important;box-shadow:none!important;outline:none;resize:vertical;min-height:120px;background:transparent;font-size:16px;line-height:1.55;padding:4px!important}
.brief-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.brief-foot small{color:var(--muted);font-size:12px}
.brief-foot small.ok{color:var(--success);font-weight:700}
.brief-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:18px 0 8px}
.create-details{margin-top:14px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-s)}
.create-details summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;font-size:15px;font-weight:700}
.create-details summary::-webkit-details-marker{display:none}
.create-details summary small{font-weight:500;color:var(--muted)}
.create-details summary b{font-weight:400;color:var(--muted);transition:transform .2s}
.create-details[open] summary b{transform:rotate(45deg)}
.create-details-body{padding:4px 22px 22px;display:grid;grid-template-columns:1fr 1fr;gap:16px}
.create-details-body .field-group:has(textarea),.create-details-body>.wide{grid-column:1/-1}
.create-details-body label{font-size:13px;font-weight:700}
.file-grid input[type=file]{background:var(--paper);border-style:dashed;cursor:pointer}
.image-cleanup{display:flex!important;align-items:center;gap:8px!important;font-weight:500!important}
.image-cleanup input{width:16px!important;height:16px!important;margin:0}
.photo-preview{margin-top:6px;padding:16px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-s);grid-column:1/-1}
.photo-preview>div:first-child{display:grid}
.photo-preview>div:first-child span{font-size:12px;color:var(--muted)}
#photo-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:13px}
#photo-preview-grid figure{margin:0;background:var(--card);border:1px solid var(--line);border-radius:10px;overflow:hidden}
#photo-preview-grid img{width:100%;height:92px;object-fit:cover;display:block}
#photo-preview-grid figcaption{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px}
#photo-preview-grid figure{position:relative}
.photo-remove{position:absolute;top:4px;right:4px;z-index:1;width:22px;height:22px;border:none;border-radius:50%;background:rgba(10,14,26,.75);color:#fff;font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
.photo-remove:hover{background:#dc2626}
.brief-submit-bottom{display:flex;align-items:center;gap:14px;margin-top:18px}
.brief-submit-bottom small{color:var(--muted);font-size:12px}
.create-note{text-align:center;color:var(--muted);font-size:13px;margin-top:20px}

/* ============================================================
   Экран генерации: сайт собирается на глазах
   ============================================================ */
.generation-page{min-height:calc(100vh - 68px);padding:clamp(30px,6vh,60px) clamp(20px,5vw,64px);display:grid;place-items:center}
.gen-layout{display:grid;grid-template-columns:minmax(320px,.9fr) minmax(0,1.1fr);gap:clamp(30px,5vw,72px);align-items:center;width:min(1180px,100%)}
.gen-status h1{font-size:clamp(26px,3.4vw,38px);line-height:1.12;margin:16px 0 10px;min-height:1.2em}
.gen-status>p{color:var(--muted);margin:0 0 26px}
.gen-progress{height:8px;background:rgba(255,255,255,.1);border-radius:99px;overflow:hidden;position:relative}
.gen-progress-bar{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#3b82f6,#8b5cf6);transition:width .6s ease;position:relative;overflow:hidden}
.gen-progress-bar:after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.5) 50%,transparent 70%);animation:gen-sheen 1.6s linear infinite}
@keyframes gen-sheen{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.gen-percent{margin:12px 0 26px;font-size:15px;font-weight:800}
.gen-percent small{color:var(--muted);font-weight:600;margin-left:8px}
.gen-steps{list-style:none;padding:0;margin:0;display:grid;gap:6px}
.gen-steps li{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:12px;color:var(--muted);font-size:14px;font-weight:600;transition:.25s}
.gen-steps li i{flex:none;width:22px;height:22px;border-radius:50%;border:2px solid rgba(255,255,255,.22);display:grid;place-items:center;font-style:normal;font-size:12px;transition:.25s;background:var(--card)}
.gen-steps li.current{background:var(--card);color:var(--ink);box-shadow:var(--shadow-s)}
.gen-steps li.current i{border-color:var(--accent);position:relative}
.gen-steps li.current i:after{content:"";width:8px;height:8px;border-radius:50%;background:var(--accent);animation:gen-pulse 1.1s ease-in-out infinite}
@keyframes gen-pulse{0%,100%{transform:scale(.7);opacity:.6}50%{transform:scale(1);opacity:1}}
.gen-steps li.done{color:var(--ink)}
.gen-steps li.done i{border-color:var(--success);background:var(--success);color:#fff}
.gen-steps li.done i:before{content:"✓";font-weight:800}
.generation-error{margin-top:22px;background:var(--danger-soft);color:#fca5a5;padding:16px;border-radius:var(--radius-s);font-size:14px}
.generation-retry{margin-top:16px}

/* Мокап собирающегося сайта: тёмная рамка браузера, светлый сайт внутри */
.gen-canvas{min-width:0}
.gen-browser{background:var(--card);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow),var(--glow);overflow:hidden}
.gen-browser-top{display:flex;align-items:center;gap:6px;padding:12px 16px;border-bottom:1px solid var(--line);background:#101726}
.gen-browser-top i{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.18)}
.gen-browser-top span{margin:0 auto;font-size:11px;color:var(--muted);background:rgba(255,255,255,.06);border-radius:8px;padding:4px 14px}
.gen-site{padding:22px;display:grid;gap:14px;min-height:420px;background:#fff}
.gs-block{opacity:0;transform:translateY(14px);transition:opacity .6s ease,transform .6s ease}
.gs-block.built{opacity:1;transform:none}
.gs-shimmer{position:relative;overflow:hidden;background:#eeece6;border-radius:10px}
.gs-shimmer:after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.75) 50%,transparent 70%);animation:gen-sheen 1.5s linear infinite}
.gs-header{display:flex;align-items:center;gap:12px}
.gs-header .gs-logo{width:88px;height:16px;border-radius:6px;background:#15171c}
.gs-header .gs-nav{flex:1;height:10px;border-radius:6px;background:#eeece6;max-width:280px;margin-left:auto}
.gs-header .gs-cta{width:92px;height:28px;border-radius:99px;background:var(--accent)}
.gs-hero{display:grid;grid-template-columns:1.1fr .9fr;gap:18px;align-items:center}
.gs-lines{display:grid;gap:10px}
.gs-lines i{display:block;height:18px;border-radius:7px;background:#e4e2db}
.gs-lines i:nth-child(1){height:26px;width:92%;background:#d7d5cd}
.gs-lines i:nth-child(2){width:70%}
.gs-lines i:nth-child(3){width:52%}
.gs-lines .gs-cta{width:130px;height:34px;border-radius:99px;background:var(--accent);margin-top:6px}
.gs-media{height:150px;border-radius:14px}
.gs-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.gs-cards i{display:block;height:74px;border-radius:12px;background:#efede7;border:1px solid rgba(0,0,0,.06)}
.gs-banner{height:56px;border-radius:12px;background:#15171c}
.gs-form{display:grid;grid-template-columns:1fr 1fr;gap:10px;background:#f4f2ec;border-radius:14px;padding:16px}
.gs-form i{display:block;height:26px;border-radius:8px;background:#fff;border:1px solid rgba(0,0,0,.08)}
.gs-form .gs-cta{grid-column:1/-1;height:32px;border-radius:99px;background:var(--accent);border:0;max-width:180px}
.gs-footer{height:34px;border-radius:10px;background:#e4e2db}
.generation-page.failed .gen-progress-bar{background:var(--danger)}

/* ============================================================
   Адаптив
   ============================================================ */
@media(max-width:1050px){
  .steps-grid{grid-template-columns:repeat(2,1fr)}
  .feature-grid{grid-template-columns:1fr 1fr}
  .feature-grid article.feature-wide{grid-template-columns:1fr}
  .project-grid{grid-template-columns:repeat(2,1fr)}
  .auth-shell{grid-template-columns:.8fr 1.2fr}
  .gen-layout{grid-template-columns:1fr;gap:34px}
  .gen-canvas{order:-1}
  .compliance-grid,.privacy-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:760px){
  .app-header{height:60px}
  .app-nav{gap:14px}
  .app-nav>a:not(.button){display:none}
  .app-nav form{display:none}
  .landing-hero{padding-top:44px}
  .hero-brief-foot{flex-direction:column;align-items:stretch}
  .hero-brief-foot .button{width:100%}
  .steps-grid,.feature-grid{grid-template-columns:1fr}
  .landing-footer{flex-direction:column;align-items:flex-start;gap:10px}
  .project-grid{grid-template-columns:1fr}
  .dashboard-head,.row-title{flex-direction:column;align-items:flex-start}
  .filter-bar{flex-direction:column}
  .search-field{min-width:0}
  .auth-shell{display:block}
  .auth-aside{min-height:280px;padding:44px 24px}
  .auth-panel{padding:40px 20px}
  .create-details-body{grid-template-columns:1fr}
  .brief-foot{flex-direction:column;align-items:stretch}
  .brief-foot .button{width:100%}
  .gen-site{min-height:340px}
  .gs-hero{grid-template-columns:1fr}
  .gs-media{height:100px}
  .page-shell{padding:40px 18px}
  .form-links{flex-direction:column}
  #photo-preview-grid,.compliance-grid,.privacy-grid{grid-template-columns:1fr 1fr}
  .privacy-note{grid-template-columns:1fr}
}
@media(max-width:430px){#photo-preview-grid,.compliance-grid,.privacy-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

html[data-theme="light"] {
  --void: #f4f1ea;
  --void-2: #fffdf8;
  --void-3: #efe8dc;
  --stroke: rgba(40, 32, 24, 0.10);
  --stroke-2: rgba(40, 32, 24, 0.16);
  --text: #1c1915;
  --text-dim: #5c564c;
  --text-faint: #8a8378;
  --bg-primary: var(--void);
  --bg-surface: var(--void-2);
  --bg-card: var(--void-3);
  --text-primary: var(--text);
  --text-secondary: var(--text-dim);
  --paper: var(--void);
  --card: var(--void-2);
  --card-glass: var(--void-3);
  --ink: var(--text);
  --muted: var(--text-dim);
  --line: var(--stroke);
}
html[data-theme="light"] .app-header {
  background: rgba(255, 253, 248, 0.86);
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 7px;
  border: 1px solid var(--stroke, var(--line));
  border-radius: 999px;
  background: var(--void-3, var(--card-glass));
  color: var(--text, var(--ink));
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.theme-switch-sun,
.theme-switch-moon {
  width: 16px;
  font-size: 13px;
  text-align: center;
  opacity: 0.45;
}
.theme-switch[aria-checked="true"] .theme-switch-sun,
html[data-theme="light"] .theme-switch-sun { opacity: 1; }
.theme-switch[aria-checked="false"] .theme-switch-moon,
html[data-theme="dark"] .theme-switch-moon { opacity: 1; }
.theme-switch-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--void, var(--paper));
  border: 1px solid var(--stroke-2, var(--line));
}
.theme-switch-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}
.theme-switch[aria-checked="false"] .theme-switch-thumb,
html[data-theme="dark"] .theme-switch-thumb { transform: translateX(14px); }
.theme-switch[aria-checked="true"] .theme-switch-thumb,
html[data-theme="light"] .theme-switch-thumb {
  transform: translateX(0);
  background: #1c1915;
}

/* ---------- Правовые документы ---------- */
/* Оферта — двадцать тысяч знаков сплошного текста. Читаемость здесь важнее
   плотности: узкая колонка, крупный интерлиньяж, разделы с воздухом. */
.legal-page { max-width: 780px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 28px) 80px; }
.legal-crumbs { font-size: 13px; color: var(--muted, #8b8b8b); margin-bottom: 18px; }
.legal-crumbs a { color: inherit; }
.legal-crumbs a:hover { color: var(--accent, #6ea8fe); }
.legal-head h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; margin: 0 0 10px; }
.legal-edition { color: var(--muted, #8b8b8b); font-size: 14px; margin: 0 0 28px; }
.legal-text { font-size: 15.5px; line-height: 1.75; }
.legal-text h2 { font-size: 19px; line-height: 1.35; margin: 34px 0 12px; }
.legal-text p { margin: 0 0 12px; }
.legal-text ul { margin: 0 0 16px; padding-left: 22px; }
.legal-text li { margin-bottom: 7px; }
.legal-text strong { font-weight: 700; }
.legal-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line, rgba(255,255,255,.12)); font-size: 14px; color: var(--muted, #8b8b8b); }
.legal-foot p { margin: 0 0 6px; }
.legal-cards { display: grid; gap: 14px; }
.legal-card { display: block; padding: 20px 22px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 14px; transition: border-color .2s ease, transform .2s ease; }
.legal-card:hover { border-color: var(--accent, #6ea8fe); transform: translateY(-2px); }
.legal-card h2 { font-size: 18px; margin: 0 0 8px; }
.legal-card p { margin: 0 0 10px; color: var(--muted, #8b8b8b); font-size: 14.5px; line-height: 1.6; }
.legal-card-more { font-size: 13.5px; color: var(--accent, #6ea8fe); }

/* ── Вход через Яндекс ID и ВКонтакте ────────────────────────────────
   Правила живут здесь, а не только в сборке React: страницы входа и
   регистрации наследуют base.html, и он подключает ТОЛЬКО этот файл. Пока
   ключи провайдеров не заданы, блока на странице нет, поэтому пропажу стилей
   никто бы не заметил — она всплыла бы ровно в день включения (2026-09-16). */
.auth-oauth { margin-top: 18px; }
.auth-oauth-sep { position: relative; text-align: center; margin: 0 0 14px; }
.auth-oauth-sep::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: var(--line, rgba(255,255,255,.12));
}
.auth-oauth-sep span {
  position: relative; padding: 0 12px; font-size: 12px;
  color: var(--text-faint, #8a8378); background: var(--bg-surface, #12141f);
}
.auth-oauth-row { display: grid; gap: 10px; }
.auth-oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 14px; border-radius: var(--radius-s, 11px);
  font-size: 14px; font-weight: 600; text-decoration: none; color: #fff;
  background: var(--panel-2, #2a2f45);
  transition: filter .2s ease, transform .2s ease;
}
.auth-oauth-btn:hover { filter: brightness(1.08); transform: translateY(-1px); text-decoration: none; }
/* Фирменные цвета: в React они заданы инлайном, на серверных страницах —
   классом auth-oauth-<провайдер>, поэтому нужны здесь. */
.auth-oauth-yandex { background: #fc3f1d; }
.auth-oauth-vk { background: #0077ff; }
/* Контейнер виджета VK ID. Отдельное имя: класс auth-oauth-vk выше задаёт
   фон КНОПКИ, и контейнер получал синюю заливку под собой. */
.auth-oauth-widget { width: 100%; min-height: 44px; }
.auth-oauth-note {
  margin: 12px 0 0; font-size: 11.5px; line-height: 1.5; text-align: center;
  color: var(--text-faint, #8a8378);
}
.auth-oauth-note a { color: var(--text-dim, #9aa3c7); }
