/* Посадочная /ai-agents/. Янтарный — «ждёт вас», синий — «сделано». */
.page-agents { --wait: var(--accent-2); --wait-ink: var(--accent-2-ink); --wait-soft: var(--accent-2-soft); scroll-behavior: smooth; }
html:has(.page-agents) { scroll-behavior: smooth; scroll-padding-top: 76px; }
.page-agents main { position: relative; z-index: 1; background: var(--bg); }
.page-agents footer { position: relative; z-index: 1; margin-top: 0 !important; }
.page-agents .ixbg { display: none; }

/* Цифры на этой странице — основным шрифтом: моноширинный ломает крупные суммы */
.page-agents .num { font-family: inherit; font-variant-numeric: tabular-nums; }

/* Шапка */
.agents-nav { display: none; gap: 24px; }
.agents-nav a { font-size: 14px; color: var(--muted); }
.agents-nav a:hover { color: var(--accent); }
.agents-tel { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.agents-head-cta { display: none; }

/* Первый экран */
.ag-hero { padding: 36px 0 48px; border-bottom: 1px solid var(--hair); }
.ag-hero-grid { display: grid; gap: 40px; }
.ag-hero-text, .ag-demo { min-width: 0; }
.ag-h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.06; letter-spacing: -.03em; font-weight: 550; text-wrap: balance; }
.ag-lede { margin-top: 18px; max-width: 50ch; }
.ag-cta { margin-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ag-btn { padding: 14px 22px; font-size: 16px; justify-content: center; white-space: normal; text-align: center; max-width: 100%; }
.ag-cta-note { font-size: 14px; color: var(--muted); max-width: 44ch; line-height: 1.45; }
.ag-facts { list-style: none; margin: 30px 0 0; padding: 18px 0 0; border-top: 1px solid var(--hair); display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.ag-facts b { color: var(--ink); font-weight: 600; }

/* Диалог */
.ag-demo { border: 1px solid var(--hair); border-radius: 18px; background: var(--surface); overflow: hidden; box-shadow: 0 24px 60px -34px color-mix(in srgb, var(--accent) 45%, transparent); }
.ag-tabs { display: flex; gap: 4px; padding: 10px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--hair); background: var(--surface-2); }
.ag-tabs::-webkit-scrollbar { display: none; }
.ag-tab { flex: 0 0 auto; padding: 8px 12px; border-radius: 9px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.ag-tab:hover { color: var(--ink); }
.ag-tab[aria-current] { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(20, 23, 26, .12); }
.ag-thread { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; }
.ag-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.ag-msg p { margin: 0; }
.ag-msg-a { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.ag-msg-u { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.ag-time { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ag-nw { white-space: nowrap; }
.ag-draft { align-self: stretch; border: 1.5px solid var(--wait); border-radius: 14px; padding: 12px 14px 14px; background: color-mix(in srgb, var(--wait) 6%, var(--surface)); transition: border-color .3s ease, background .3s ease; }
.ag-draft-to { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--wait-ink); flex-wrap: wrap; }
.ag-draft-to span[data-draft-state] { font-weight: 600; }
.ag-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--wait); }
.ag-draft-text { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.ag-draft-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ag-draft-btns[hidden] { display: none; }
.ag-yes, .ag-fix { border-radius: 9px; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid transparent; min-height: 44px; }
.ag-yes { background: var(--accent); color: #fff; }
.ag-yes:hover { background: var(--accent-press); }
.ag-fix { background: var(--surface); border-color: var(--hair); color: var(--ink); }
.ag-fix:hover { border-color: var(--accent); }
.ag-draft.is-done { border-color: var(--accent); background: var(--accent-soft); }
.ag-draft.is-done .ag-draft-to { color: var(--accent-ink); }
.ag-draft.is-done .ag-dot { background: var(--accent); }
.ag-demo-note { margin: 0; padding: 10px 16px 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--hair); }
.ag-wait { display: flex; gap: 5px; padding: 14px; }
.ag-wait i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: ag-blink 1s infinite; }
.ag-wait i:nth-child(2) { animation-delay: .15s; }
.ag-wait i:nth-child(3) { animation-delay: .3s; }
@keyframes ag-blink { 50% { opacity: .25; } }
@keyframes ag-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: no-preference) {
	.ag-thread .is-new { animation: ag-in .35s cubic-bezier(.2, .7, .2, 1) backwards; }
}
@media (prefers-reduced-motion: reduce) { html:has(.page-agents) { scroll-behavior: auto; } }

/* Разделы */
.ag-sec { padding: 56px 0; }
.ag-sec-soft { background: var(--surface-2); }
.ag-h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 550; max-width: 24ch; text-wrap: balance; }
.ag-sub { margin-top: 12px; max-width: 52ch; }
.ag-fine { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 14px 0 0; }

/* Роли */
.ag-roles { margin-top: 32px; border-top: 1px solid var(--hair); }
.ag-role { display: grid; gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--hair); }
.ag-role-name { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.ag-role-does { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; line-height: 1.45; }
.ag-role-does li { padding-left: 18px; position: relative; }
.ag-role-does li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ag-role-yours { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--wait-soft); line-height: 1.45; align-self: start; }
.ag-role-yours .ag-dot { margin-top: .4em; }
.ag-after { margin: 24px 0 0; color: var(--muted); line-height: 1.5; }
.ag-after a, .ag-brief-tel a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Сравнение */
.ag-table { width: 100%; margin-top: 28px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.ag-table thead { display: none; }
.ag-table tr { display: block; padding: 18px 0; border-top: 1px solid var(--hair); }
.ag-table th[scope=row] { display: block; text-align: left; font-weight: 600; margin-bottom: 8px; }
.ag-table tbody td { display: grid; grid-template-columns: 108px 1fr; gap: 12px; padding: 6px 0; color: var(--muted); }
.ag-table tbody td::before { content: attr(data-l); font-size: 13px; }
.ag-table tbody td.is-agent { color: var(--ink); background: var(--accent-soft); border-radius: 8px; padding: 10px; margin-top: 4px; grid-template-columns: 98px 1fr; }

/* Шаги */
.ag-steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 28px; counter-reset: s; }
.ag-steps li { padding-left: 20px; border-left: 3px solid var(--accent); }
.ag-steps li:last-child { border-left-color: var(--wait); }
.ag-step-when { font-size: 14px; color: var(--accent-ink); font-weight: 500; }
.ag-steps li:last-child .ag-step-when { color: var(--wait-ink); }
.ag-steps h3 { margin-top: 4px; font-size: 1.15rem; font-weight: 600; }
.ag-steps p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.ag-connect { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--hair); display: grid; gap: 10px; line-height: 1.5; }
.ag-connect p { margin: 0; }

/* Правила */
.ag-sec-ink { background: #14171a; color: #ecebe8; }
[data-theme=dark] .ag-sec-ink { background: #101012; }
.ag-rules { margin: 32px 0 0; display: grid; gap: 28px; }
.ag-rules dt { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.ag-rules dd { margin: 8px 0 0; line-height: 1.55; color: #b4b2ac; max-width: 52ch; }
.ag-limits { margin-top: 40px; padding: 22px; border-radius: 14px; border: 1px solid #3a3a3e; }
.ag-limits h3 { font-size: 1.1rem; font-weight: 600; }
.ag-limits ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; line-height: 1.5; color: #d3d1cb; }
.ag-limits li { padding-left: 20px; position: relative; }
.ag-limits li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: var(--accent-2); }

/* Ошибки внедрения */
.ag-trips { margin-top: 28px; }
.ag-trips h3 { font-size: 1.1rem; font-weight: 600; }
.ag-trips ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; line-height: 1.5; color: var(--muted); }
.ag-trips li { padding-left: 20px; position: relative; }
.ag-trips li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: var(--accent-2); }
.ag-trips li span { color: var(--ink); font-weight: 500; }

/* Данные и 152-ФЗ */
.ag-data-intro { display: grid; gap: 20px; margin-top: 20px; }
.ag-data-intro .ag-sub { margin-top: 0; }
.ag-law { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; line-height: 1.5; }
.ag-law li { padding-left: 18px; position: relative; }
.ag-law li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ag-h3 { margin-top: 40px; font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.ag-ways { margin-top: 18px; display: grid; gap: 16px; }
.ag-way { padding: 22px; border: 1px solid var(--hair); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.ag-way h4 { font-size: 1.1rem; font-weight: 600; }
.ag-way p { margin: 0; line-height: 1.55; color: var(--muted); }
.ag-way-pm { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto !important; padding-top: 6px; }
.ag-way-pm span { font-size: 14px; padding: 5px 10px; border-radius: 8px; }
.ag-way-pm .is-plus { background: var(--accent-soft); color: var(--ink); }
.ag-way-pm .is-minus { background: var(--surface-2); color: var(--muted); }
.ag-mask { margin: 28px 0 0; padding: 22px; border-radius: 14px; border: 1px dashed var(--hair); }
.ag-mask figcaption { font-weight: 600; }
.ag-mask ol { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.ag-mask li { display: grid; gap: 4px; }
.ag-mask-where { font-size: 13px; color: var(--muted); }
.ag-mask p { margin: 0; line-height: 1.5; }
.ag-mask mark { background: var(--accent-soft); color: var(--ink); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }

/* Работы */
.ag-proof { margin-top: 28px; display: grid; gap: 28px; }
.ag-proof article { display: flex; flex-direction: column; gap: 8px; }
.ag-proof h3 { font-size: 1.15rem; font-weight: 600; }
.ag-proof p { margin: 0; line-height: 1.55; color: var(--muted); }
.ag-proof-who { font-size: 14px; color: var(--accent-ink); }
a.ag-proof-who { text-decoration: underline; text-underline-offset: 3px; }

/* Расчёт */
.ag-calc-grid { display: grid; gap: 28px; }
.ag-calc-text { margin: 14px 0 0; line-height: 1.55; color: var(--muted); max-width: 44ch; }
.ag-calc { background: var(--surface); border-radius: 18px; border: 1px solid var(--hair); padding: 22px; min-width: 0; }
.ag-range { display: block; margin-bottom: 22px; }
.ag-range span { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ag-range output { font-weight: 600; }
.ag-range input { width: 100%; height: 44px; accent-color: var(--accent); cursor: pointer; display: block; }
.ag-calc-res { padding: 18px 0; border-top: 1px solid var(--hair); }
.ag-calc-res p { margin: 0; }
.ag-calc-res b { display: block; font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.02em; font-weight: 600; }
.ag-calc-res span { color: var(--muted); }
.ag-calc-pay { margin-top: 10px !important; line-height: 1.5; min-height: 3em; }
.ag-calc .ag-btn { width: 100%; }

/* Цена */
.ag-prices { margin-top: 28px; display: grid; gap: 20px; }
.ag-price { padding: 24px; border: 1px solid var(--hair); border-radius: 14px; display: flex; flex-direction: column; background: var(--surface); }
.ag-price.is-main { border: 2px solid var(--accent); border-radius: 18px; }
.ag-price h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.ag-price p { margin: 0; }
.ag-price-for { color: var(--muted); margin-top: 4px !important; }
.ag-price-sum { font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; margin-top: 20px !important; line-height: 1.15; }
.ag-price-term { color: var(--muted); margin-top: 4px !important; }
.ag-price ul { margin: 20px 0; padding: 0; list-style: none; display: grid; gap: 10px; line-height: 1.45; }
.ag-price li { padding-left: 18px; position: relative; }
.ag-price li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ag-price-after { margin: auto 0 20px !important; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* Вопросы и заявка */
.ag-faq-grid, .ag-brief-grid { display: grid; gap: 24px; }
.ag-faq { display: grid; gap: 10px; min-width: 0; }
.page-agents .faq-a { max-width: 66ch; }
.ag-brief-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; line-height: 1.5; }
.ag-brief-list li { padding-left: 18px; position: relative; }
.ag-brief-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ag-brief-tel { margin: 24px 0 0; }
.page-agents .toredo-lead-form .btn { padding: 14px 22px; font-size: 16px; justify-content: center; }
.page-agents .field { font-size: 16px; }
.page-agents .toredo-lead-form input[type=checkbox] { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px !important; accent-color: var(--accent); }
.page-agents a:focus-visible, .page-agents button:focus-visible, .page-agents summary:focus-visible, .page-agents input:focus-visible, .page-agents textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ag-stick { position: fixed; inset: auto 0 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--hair); }
.ag-stick[hidden] { display: none; }
.ag-stick .ag-btn { width: 100%; }

@media (min-width: 720px) {
	.ag-roles .ag-role { grid-template-columns: 180px 1fr 250px; gap: 32px; align-items: start; }
	.ag-rules { grid-template-columns: 1fr 1fr; gap: 36px 56px; }
	.ag-limits { padding: 28px 32px; }
	.ag-limits ul { grid-template-columns: 1fr 1fr; gap: 12px 48px; }
	.ag-proof { grid-template-columns: 1fr 1fr; gap: 40px 56px; }
	.ag-prices { grid-template-columns: 1fr 1fr; align-items: stretch; }
	.ag-price.is-main { grid-column: 1 / -1; }
	.ag-ways { grid-template-columns: 1fr 1fr; }
	.ag-mask ol { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
	.ag-trips ul { grid-template-columns: 1fr 1fr 1fr; gap: 12px 32px; }
	.ag-price { padding: 32px; }
	.ag-calc { padding: 30px; }
	.ag-steps { grid-template-columns: 1fr 1fr; gap: 36px 40px; }
	.ag-table thead { display: table-header-group; }
	.ag-table tr { display: table-row; }
	.ag-table thead th { text-align: left; font-weight: 600; padding: 12px 18px; }
	.ag-table th[scope=row], .ag-table tbody td, .ag-table tbody td.is-agent { display: table-cell; padding: 14px 18px; border-top: 1px solid var(--hair); margin: 0; vertical-align: top; border-radius: 0; }
	.ag-table th[scope=row] { padding-left: 0; width: 22%; }
	.ag-table tbody td::before { display: none; }
	.ag-table .is-agent { background: var(--surface) !important; width: 30%; }
	.ag-stick { display: none; }
	.agents-head-cta { display: inline-flex; }
}
@media (min-width: 1000px) {
	.agents-nav { display: flex; }
	.ag-hero { padding: 64px 0 72px; }
	.ag-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; align-items: center; }
	.ag-thread { height: 470px; overflow-y: auto; }
	.ag-sec { padding: 88px 0; }
	.ag-steps { grid-template-columns: 1fr 1.15fr .85fr 1.15fr; gap: 0; }
	.ag-steps li { border-left: 0; border-top: 3px solid var(--accent); padding: 18px 28px 0 0; }
	.ag-steps li:last-child { border-top-color: var(--wait); padding-right: 0; }
	.ag-calc-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
	.ag-prices { grid-template-columns: 1.15fr 1fr 1fr; }
	.ag-price.is-main { grid-column: auto; }
	.ag-data-intro { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
	.ag-mask { padding: 28px 32px; }
	.ag-faq-grid { grid-template-columns: 300px 1fr; gap: 56px; }
	.ag-brief-grid { grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
}
