/* Диалог24 — дизайн-система. 17.08.2026
 *
 * Визуальный язык намеренно уходит от типового «белый фон + синяя кнопка», на котором
 * сидят все сервисы в этой нише. Отличия принципиальные, а не косметические:
 *
 *   1. Фон — тёплая бумага (#FBFAF7), а не белый. Интерфейс читается как печатный
 *      разворот, а не как очередная админка.
 *   2. Заголовки — антиква (Georgia). В нише поголовно Inter и системный sans;
 *      засечки дают редакционный, «издательский» характер с первого экрана.
 *   3. Акцент — чернильный индиго (#2E3480), глубже и холоднее обычного SaaS-синего,
 *      плюс янтарь (#F59E0B) как второй смысловой цвет: им обозначены ночь и всё,
 *      что требует человека.
 *   4. Границы — тонкая линия чернил со смещённой сплошной тенью (offset shadow),
 *      как у типографской плашки, вместо размытых мягких теней.
 *
 * Ключевой мотив бренда — сутки: 24-часовая шкала и деление на день/ночь.
 */

:root {
    /* Чернила и бумага */
    --paper:      #FBFAF7;
    --paper-2:    #F4F2EC;
    --paper-3:    #EBE8DF;
    --ink:        #14161F;
    --ink-2:      #3A3F52;
    --ink-3:      #6B7080;
    --ink-4:      #9B9FAC;
    --line:       #DFDBD0;
    --line-2:     #EDEAE2;
    --white:      #FFFFFF;

    /* Индиго — основной акцент */
    --indigo:     #2E3480;
    --brand:      #2E3480;
    --indigo-600: #3F49BF;
    --indigo-400: #7C86D8;
    --indigo-200: #C7D2FE;
    --indigo-50:  #EEF1FE;

    /* Янтарь — ночь, внимание, «нужен человек» */
    --amber:      #F59E0B;
    --amber-700:  #A65E06;
    --amber-100:  #FDEFD3;
    --amber-50:   #FEF8EC;

    /* Шалфей — подтверждение, «всё хорошо» */
    --sage:       #10B981;
    --sage-700:   #04785B;
    --sage-50:    #E9F8F2;

    --red:        #D33C3C;
    --red-700:    #A32020;
    --red-50:     #FCEEEC;

    --radius:     10px;
    --radius-sm:  7px;
    --radius-lg:  16px;

    /* Смещённая сплошная тень — типографский приём вместо размытой SaaS-тени */
    --lift:       3px 3px 0 var(--paper-3);
    --lift-ink:   4px 4px 0 var(--ink);
    --lift-sm:    2px 2px 0 var(--paper-3);
    --soft:       0 8px 24px rgba(20, 22, 31, .07);
    --soft-lg:    0 18px 48px rgba(20, 22, 31, .11);

    --maxw:       1200px;
    --serif:      Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
    --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font:       var(--sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16.5px;
    line-height: 1.62;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -.015em;
    line-height: 1.14;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(2.15rem, 4.8vw, 3.75rem); }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }
h4 { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin: 0 0 .5em; }
p  { margin: 0 0 1em; }
a  { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--indigo-600); }
em { font-style: italic; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.narrow { max-width: 780px; }

.muted { color: var(--ink-3); }
.small { font-size: .9rem; }
.tiny  { font-size: .8125rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono  { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
.strong { font-weight: 600; }
.amber-text { color: var(--amber-700); }
.mt0{margin-top:0}.mb0{margin-bottom:0}
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}.mt32{margin-top:32px}.mt48{margin-top:48px}
.mb8{margin-bottom:8px}.mb16{margin-bottom:16px}.mb24{margin-bottom:24px}.mb32{margin-bottom:32px}

/* Надзаголовок секции: мелкие капители с чертой — вместо цветной «таблетки», которая
   стоит в этой роли у всех конкурентов. */
.kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--ink-3); margin-bottom: 18px;
}
.kicker::before { content: ''; width: 26px; height: 1px; background: var(--ink-4); }
.kicker-amber { color: var(--amber-700); }
.kicker-amber::before { background: var(--amber); }

/* ------------------------------- Кнопки ------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-sm);
    font: inherit; font-weight: 600; font-size: .9375rem;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    background: var(--white); color: var(--ink);
    transition: transform .12s, box-shadow .12s, background .14s, color .14s;
    box-shadow: var(--lift-sm);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--paper-3); color: var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--paper-3); }

.btn-primary {
    background: var(--indigo); border-color: var(--indigo); color: var(--white);
    box-shadow: 2px 2px 0 var(--indigo-200);
}
.btn-primary:hover { background: var(--indigo-600); border-color: var(--indigo-600); color: var(--white); box-shadow: 4px 4px 0 var(--indigo-200); }
.btn-ghost { background: transparent; }
.btn-soft { background: var(--indigo-50); border-color: var(--indigo-200); color: var(--indigo); }
.btn-soft:hover { background: var(--indigo-200); color: var(--indigo); }
.btn-amber { background: var(--amber); border-color: var(--amber); color: var(--ink); box-shadow: 2px 2px 0 var(--amber-100); }
.btn-amber:hover { box-shadow: 4px 4px 0 var(--amber-100); color: var(--ink); }
.btn-danger { color: var(--red-700); border-color: #E9C4C0; }
.btn-danger:hover { background: var(--red-50); color: var(--red-700); }
.btn-lg { padding: 15px 32px; font-size: 1rem; }
.btn-sm { padding: 7px 15px; font-size: .8375rem; box-shadow: none; }
.btn-sm:hover { box-shadow: 2px 2px 0 var(--paper-3); }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-plain { border-color: transparent; box-shadow: none; background: transparent; }
.btn-plain:hover { border-color: var(--line); box-shadow: none; transform: none; background: var(--paper-2); }

/* ------------------------------- Формы -------------------------------- */

.field { margin-bottom: 18px; }
.label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.hint { margin-top: 7px; font-size: .8125rem; color: var(--ink-3); line-height: 1.5; }

.input, .textarea, .select {
    width: 100%; padding: 11px 14px;
    font: inherit; font-size: .9375rem; color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .14s, box-shadow .14s;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--indigo); box-shadow: 2px 2px 0 var(--indigo-200);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.58; }
.select {
    appearance: none; padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7080' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}

.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; cursor: pointer; }
.check input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--indigo); flex: none; cursor: pointer; }
.check-text { font-size: .9375rem; }

/* Плитки-переключатели */
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tile { position: relative; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile span {
    display: block; padding: 8px 15px;
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    font-size: .875rem; font-weight: 500; color: var(--ink-2);
    cursor: pointer; transition: all .14s; background: var(--white);
}
.tile span:hover { border-color: var(--indigo-400); color: var(--indigo); }
.tile input:checked + span {
    background: var(--indigo); border-color: var(--indigo); color: var(--white); font-weight: 600;
    box-shadow: 2px 2px 0 var(--indigo-200);
}
.tile input:focus-visible + span { box-shadow: 0 0 0 3px var(--indigo-200); }

/* -------------------------------- Карточки ---------------------------- */

.card {
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.card-pad-lg { padding: 32px; }
.card-soft { background: var(--paper-2); border-color: var(--line-2); }
.card-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.card-ink h3, .card-ink .card-title { color: var(--white); }
.card-lift { box-shadow: var(--lift); }
.card-hover { transition: transform .16s, box-shadow .16s; }
.card-hover:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--paper-3); }
.card-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 5px; font-family: var(--sans); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.row-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* -------------------------------- Бейджи ------------------------------ */

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 5px;
    font-size: .75rem; font-weight: 700; line-height: 1.55; white-space: nowrap;
    letter-spacing: .01em;
}
.badge-brand { background: var(--indigo-50); color: var(--indigo); }
.badge-amber { background: var(--amber-100); color: var(--amber-700); }
.badge-green { background: var(--sage-50);   color: var(--sage-700); }
.badge-red   { background: var(--red-50);    color: var(--red-700); }
.badge-gray  { background: var(--paper-3);   color: var(--ink-3); }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-green { background: var(--sage); }
.dot-amber { background: var(--amber); }
.dot-gray  { background: var(--ink-4); }
.dot-red   { background: var(--red); }
.dot-live { position: relative; background: var(--sage); }
.dot-live::after {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    border: 1.5px solid var(--sage); animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

/* ------------------------------ Уведомления --------------------------- */

.alert {
    padding: 13px 17px; border-radius: var(--radius-sm);
    font-size: .9375rem; margin-bottom: 18px; line-height: 1.5;
    border: 1.5px solid transparent; border-left-width: 4px;
}
.alert-error { background: var(--red-50);   color: var(--red-700);   border-color: #EBC9C4; border-left-color: var(--red); }
.alert-ok    { background: var(--sage-50);  color: var(--sage-700);  border-color: #C2E9DA; border-left-color: var(--sage); }
.alert-info  { background: var(--indigo-50); color: var(--indigo);   border-color: var(--indigo-200); border-left-color: var(--indigo); }
.alert-warn  { background: var(--amber-50); color: var(--amber-700); border-color: var(--amber-100); border-left-color: var(--amber); }

/* -------------------------------- Таблицы ----------------------------- */

.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th {
    text-align: left; padding: 10px 14px;
    font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: var(--ink-3); border-bottom: 1.5px solid var(--line);
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: var(--paper-2); }
.table-wrap { overflow-x: auto; }

/* ------------------------------ Кабинет ------------------------------- */

.app { display: flex; min-height: 100vh; background: var(--paper); }

.side {
    width: 250px; flex: none;
    background: var(--white); border-right: 1.5px solid var(--line);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.side-head { padding: 20px 20px 14px; }
.side-nav { padding: 6px 10px; flex: 1; overflow-y: auto; }
.side-foot { padding: 14px; border-top: 1.5px solid var(--line); }

.nav-group { margin-bottom: 14px; }
.nav-group-title {
    padding: 6px 12px; font-size: .6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em; color: var(--ink-4);
}
.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--ink-2); font-size: .9375rem; font-weight: 500;
    transition: background .13s, color .13s;
}
.nav-item:hover { background: var(--paper-2); color: var(--ink); }
.nav-item.active { background: var(--indigo); color: var(--white); font-weight: 600; }
.nav-item svg { flex: none; width: 18px; height: 18px; opacity: .8; }
.nav-item.active svg { opacity: 1; }
.nav-count {
    margin-left: auto; padding: 1px 8px; border-radius: 5px;
    background: var(--paper-3); color: var(--ink-3); font-size: .75rem; font-weight: 700;
}
.nav-item.active .nav-count { background: rgba(255,255,255,.22); color: #fff; }
.nav-count-hot { background: var(--amber) !important; color: var(--ink) !important; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    background: var(--white); border-bottom: 1.5px solid var(--line);
    padding: 0 28px; min-height: 62px;
    display: flex; align-items: center; gap: 16px;
    position: sticky; top: 0; z-index: 20;
}
.page { padding: 28px; flex: 1; }
.page-title { font-family: var(--serif); font-size: 1.7rem; margin: 0 0 4px; }

.stat { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { font-size: .8125rem; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.stat-value { font-family: var(--serif); font-size: 2rem; line-height: 1.05; }
.stat-note { font-size: .8125rem; color: var(--ink-4); margin-top: 5px; }

.meter { height: 6px; background: var(--paper-3); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.meter-fill { height: 100%; background: var(--indigo); border-radius: 999px; transition: width .3s; }
.meter-fill.warn { background: var(--amber); }
.meter-fill.over { background: var(--red); }

/* --------------------------------- Чат -------------------------------- */

.chat { display: flex; flex-direction: column; gap: 12px; }
.bubble {
    max-width: 76%; padding: 11px 15px;
    border-radius: 16px; font-size: .9375rem; line-height: 1.52;
    white-space: pre-wrap; word-wrap: break-word;
}
.bubble-in  { background: var(--paper-2); color: var(--ink); border: 1.5px solid var(--line-2); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble-out { background: var(--indigo); color: var(--white); border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble-draft {
    background: var(--amber-50); color: var(--ink);
    border: 1.5px dashed var(--amber); border-bottom-right-radius: 4px; align-self: flex-end;
}
.bubble-meta { font-size: .75rem; color: var(--ink-4); margin-top: 4px; }
.msg { display: flex; flex-direction: column; max-width: 100%; }
.msg-in { align-items: flex-start; }
.msg-out { align-items: flex-end; }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); animation: blink 1.3s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.dlg-list { display: flex; flex-direction: column; }
.dlg-item { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line-2); transition: background .13s; color: var(--ink); }
.dlg-item:hover { background: var(--paper-2); color: var(--ink); }
.dlg-item.active { background: var(--indigo-50); }
.dlg-item.hot { border-left: 3px solid var(--amber); padding-left: 13px; }
.dlg-name { font-weight: 600; font-size: .9375rem; }
.dlg-last { font-size: .875rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------- Логотип ------------------------------ */

.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { width: 33px; height: 33px; flex: none; color: var(--indigo); }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-word { font-family: var(--serif); font-size: 1.3rem; letter-spacing: -.02em; line-height: 1; }
.logo-24 { color: var(--amber-700); }

/* ------------------------------- Лендинг ------------------------------ */

.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(251, 250, 247, .9);
    backdrop-filter: saturate(150%) blur(10px);
    border-bottom: 1.5px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 30px; height: 70px; }
.nav-links { display: flex; gap: 26px; margin-left: 14px; }
.nav-links a { color: var(--ink-2); font-size: .9375rem; font-weight: 500; }
.nav-links a:hover { color: var(--indigo); }

/* Hero: текст слева, суточный циферблат справа */
.hero { padding: 66px 0 56px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 44px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .amber-text { font-style: italic; }
.hero-lead { font-size: 1.1875rem; color: var(--ink-2); line-height: 1.62; margin-bottom: 30px; max-width: 33em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: .875rem; color: var(--ink-3); margin-top: 18px; }
.hero-art { width: 100%; height: auto; display: block; }

/* Полоса фактов под hero — как выходные данные в газете */
.factline {
    border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line);
    background: var(--paper-2);
}
.factline-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.factline-cell { padding: 22px 26px; border-right: 1px solid var(--line); }
.factline-cell:last-child { border-right: none; }
.factline-num { font-family: var(--serif); font-size: 1.85rem; line-height: 1; margin-bottom: 5px; }
.factline-cap { font-size: .8125rem; color: var(--ink-3); line-height: 1.45; }

.section { padding: 78px 0; }
.section-paper2 { background: var(--paper-2); border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); }
.section-ink { background: var(--ink); color: rgba(255,255,255,.82); }
.section-ink h2, .section-ink h3 { color: var(--white); }
.section-ink .kicker { color: rgba(255,255,255,.55); }
.section-ink .kicker::before { background: rgba(255,255,255,.4); }
.section-head { max-width: 720px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .kicker { justify-content: center; }
.section-head p { font-size: 1.0625rem; color: var(--ink-3); margin: 0; }
.section-ink .section-head p { color: rgba(255,255,255,.7); }

/* Суточная шкала: главный смысловой элемент лендинга */
.daybar { border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.daybar-scale { display: flex; height: 74px; position: relative; }
.daybar-hour { flex: 1; border-right: 1px solid var(--line-2); position: relative; }
.daybar-hour:last-child { border-right: none; }
.daybar-hour.night { background: var(--indigo-50); }
.daybar-hour .pip {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 9px; height: 9px; border-radius: 50%;
}
.daybar-hour .pip.answered { background: var(--indigo); }
.daybar-hour .pip.waiting  { background: var(--amber); }
.daybar-labels { display: flex; border-top: 1.5px solid var(--line); background: var(--paper-2); }
.daybar-labels div { flex: 1; padding: 7px 0; text-align: center; font-size: .6875rem; color: var(--ink-3); font-weight: 600; }
.daybar-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; font-size: .8125rem; color: var(--ink-3); }

/* Анатомия ответа: реплика с выносками к источникам факта */
.anatomy-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.anatomy-reply {
    background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius);
    padding: 22px 24px; box-shadow: var(--lift); font-size: 1.0625rem; line-height: 1.7;
}
.fact { border-bottom: 2px solid var(--indigo-200); padding-bottom: 1px; cursor: help; position: relative; font-weight: 600; }
.fact-amber { border-bottom-color: var(--amber); }
.fact-sage  { border-bottom-color: var(--sage); }
.source-list { list-style: none; padding: 0; margin: 0; }
.source-list li {
    display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line-2);
    font-size: .9375rem; align-items: flex-start;
}
.source-list li:last-child { border-bottom: none; }
.source-key {
    flex: none; width: 26px; height: 26px; border-radius: 6px;
    background: var(--indigo-50); color: var(--indigo);
    display: grid; place-items: center; font-size: .75rem; font-weight: 700;
}
.source-key.amber { background: var(--amber-100); color: var(--amber-700); }
.source-key.sage  { background: var(--sage-50);   color: var(--sage-700); }

/* Список «чего агент не сделает» */
.never-list { display: grid; gap: 0; }
.never-item {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.13);
}
.never-item:last-child { border-bottom: none; }
.never-mark {
    flex: none; width: 27px; height: 27px; border-radius: 50%;
    border: 1.5px solid var(--amber); color: var(--amber);
    display: grid; place-items: center; font-size: 1rem; line-height: 1; margin-top: 2px;
}
.never-item h4 { color: var(--white); margin-bottom: 3px; }
.never-item p { margin: 0; font-size: .9375rem; color: rgba(255,255,255,.68); }

/* Шаги подключения — нумерация антиквой, крупно */
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
    flex: none; font-family: var(--serif); font-size: 2.4rem; line-height: .9;
    color: var(--indigo-200); width: 46px;
}
.illus { width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* Тарифы */
.price-card {
    background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius);
    padding: 28px 26px; display: flex; flex-direction: column; position: relative;
}
.price-card.popular { border-color: var(--indigo); box-shadow: var(--lift-ink); }
.price-flag {
    position: absolute; top: -11px; left: 24px;
    background: var(--amber); color: var(--ink);
    padding: 3px 12px; border-radius: 5px; font-size: .75rem; font-weight: 700;
}
.price-val { font-family: var(--serif); font-size: 2.3rem; line-height: 1; margin: 12px 0 3px; }
.price-per { font-size: .875rem; color: var(--ink-3); }
.price-feats { list-style: none; padding: 0; margin: 20px 0 24px; flex: 1; }
.price-feats li { position: relative; padding: 6px 0 6px 25px; font-size: .9375rem; color: var(--ink-2); }
.price-feats li::before {
    content: ''; position: absolute; left: 0; top: 12px; width: 14px; height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%232E3480' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 6.4 4.6 9 10 3.2'/%3E%3C/svg%3E") center no-repeat;
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    padding: 20px 42px 20px 0; cursor: pointer; position: relative;
    font-family: var(--serif); font-size: 1.1875rem; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+'; position: absolute; right: 6px; top: 16px;
    font-family: var(--sans); font-size: 1.4rem; color: var(--indigo); line-height: 1; transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 42px 22px 0; color: var(--ink-2); }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

.cta-band {
    background: var(--ink); color: var(--paper);
    border-radius: var(--radius-lg); padding: 56px 44px; text-align: center;
    position: relative; overflow: hidden;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,.76); font-size: 1.0625rem; max-width: 560px; margin: 0 auto 28px; }
.cta-band .btn-amber { border-color: var(--amber); }

.foot { background: var(--paper-2); border-top: 1.5px solid var(--line); padding: 52px 0 26px; font-size: .9375rem; color: var(--ink-3); }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--indigo); }
.foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.foot h4 { color: var(--ink); }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 9px; }
.foot-bottom { border-top: 1px solid var(--line); padding-top: 22px; font-size: .8125rem; color: var(--ink-4); }

/* --------------------------- Вход и регистрация ----------------------- */

.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 44px 26px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-aside {
    background: var(--ink); color: rgba(255,255,255,.8);
    padding: 56px 48px; display: flex; flex-direction: column; justify-content: center;
}
.auth-aside h2 { color: var(--white); }
.auth-aside img { width: 100%; max-width: 420px; height: auto; margin: 0 auto 28px; display: block; mix-blend-mode: screen; opacity: .92; }
.auth-aside ul { list-style: none; padding: 0; margin: 22px 0 0; }
.auth-aside li { position: relative; padding: 9px 0 9px 28px; }
.auth-aside li::before {
    content: ''; position: absolute; left: 0; top: 16px; width: 15px; height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23F59E0B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 6.4 4.6 9 10 3.2'/%3E%3C/svg%3E") center no-repeat;
}

/* ------------------------------- Адаптив ------------------------------ */

@media (max-width: 1000px) {
    .hero-grid { grid-template-columns: 1fr; gap: 34px; }
    .grid-4, .factline-inner { grid-template-columns: repeat(2, 1fr); }
    .factline-cell:nth-child(2) { border-right: none; }
    .factline-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .auth { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .nav-links { display: none; }
    .anatomy-wrap { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 860px) {
    .grid-3 { grid-template-columns: 1fr; }
    .side {
        position: fixed; left: 0; top: 0; z-index: 100;
        transform: translateX(-100%); transition: transform .22s; box-shadow: var(--soft-lg);
    }
    .side.open { transform: none; }
    .page { padding: 18px; }
    .topbar { padding: 0 16px; }
    .daybar-labels div:nth-child(odd) { display: none; }
}

@media (max-width: 620px) {
    .grid-2, .grid-4, .factline-inner { grid-template-columns: 1fr; }
    .factline-cell { border-right: none; border-bottom: 1px solid var(--line); }
    .section { padding: 52px 0; }
    .hero { padding: 40px 0 36px; }
    .cta-band { padding: 38px 22px; }
    .card-pad-lg { padding: 22px; }
    .bubble { max-width: 88%; }
    .daybar-scale { height: 56px; }
}

.side-backdrop { display: none; position: fixed; inset: 0; z-index: 99; background: rgba(20,22,31,.45); }
.side-backdrop.open { display: block; }
.burger { display: none; }
@media (max-width: 860px) { .burger { display: inline-flex; } }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}

/* Переключатель тем (добавлен вместе со второй темой) */
.theme-switch {
    position: fixed; right: 16px; bottom: 16px; z-index: 200;
    display: flex; gap: 4px; padding: 5px;
    background: var(--white); border: 1.5px solid var(--line);
    border-radius: 999px; box-shadow: var(--lift);
}
.theme-switch a {
    padding: 6px 13px; border-radius: 999px;
    font-size: .75rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--ink-3);
}
.theme-switch a.on { background: var(--indigo); color: #fff; }

/* Подсветка в заголовке hero: в бумажной теме — янтарный курсив */
.hero h1 em { color: var(--amber-700); font-style: italic; }

/* Свёрнутые блоки настроек. Страница агента разрослась до 49 полей, и обычный
   человек упирался в стену: техническое спрятано под заголовок-кнопку, на виду
   осталось только то, что обязательно заполнить. */
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary { position: relative; padding-right: 30px; }
details.card > summary::after {
    content: '';
    position: absolute; right: 4px; top: 50%;
    width: 8px; height: 8px; margin-top: -6px;
    border-right: 2px solid var(--ink-3);
    border-bottom: 2px solid var(--ink-3);
    transform: rotate(45deg);
    transition: transform .18s;
}
details.card[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
details.card > summary:hover::after { border-color: var(--brand); }
details.card:not([open]) { padding-bottom: 18px; }
details.card:not([open]) > summary { margin-bottom: 0 !important; }
