/* Посадочная страница документа (/document/<slug>/).
   Токены — из theme.css (--on-*); здесь только раскладка и оформление блоков.
   Композиция: тёмно-синий оффер с «листом документа», светлые секции,
   форма в центре внимания. Акцент янтарный — только на целевых действиях. */

.dl { color: var(--on-ink); }
.dl .container { max-width: 1120px; padding-inline: 16px; }
.dl-narrow { max-width: 760px !important; }

/* Типографика */
.dl-eyebrow {
    margin: 0 0 var(--on-space-3);
    font: 600 .8125rem/1.2 var(--on-font-ui);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--on-accent-light);
}
.dl-h1 {
    margin: 0 0 var(--on-space-4);
    font-family: var(--on-font-title);
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    line-height: 1.12;
    color: #fff;
    text-wrap: balance;
}
.dl-lead {
    max-width: 38rem;
    margin: 0 0 var(--on-space-5);
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .86);
}
.dl-h2 {
    margin: 0 0 var(--on-space-5);
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    line-height: 1.2;
    text-wrap: balance;
}
.dl-h3 { margin: var(--on-space-5) 0 var(--on-space-3); font-size: 1.125rem; }

/* Кнопки */
.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 var(--on-space-5);
    border: 2px solid transparent;
    border-radius: var(--on-radius-md);
    font: 600 1rem/1 var(--on-font-ui);
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.dl-btn:focus-visible { outline: 3px solid var(--on-accent-light); outline-offset: 2px; }
.dl-btn--primary { background: var(--on-accent); color: var(--on-navy); }
.dl-btn--primary:hover { background: var(--on-accent-light); color: var(--on-navy); transform: translateY(-1px); }
.dl-btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.dl-btn--ghost:hover { border-color: #fff; color: #fff; }
.dl-btn--block { width: 100%; margin-top: var(--on-space-4); }

/* Оффер */
.dl-hero {
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(245, 158, 11, .16), transparent 60%),
        var(--on-navy);
    padding-block: clamp(36px, 6vw, 72px);
}
.dl-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: var(--on-space-7);
    align-items: center;
}
.dl-hero__text { min-width: 0; }
.dl-cta { display: flex; flex-wrap: wrap; gap: var(--on-space-3); margin-bottom: var(--on-space-6); }

.dl-facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--on-space-3) var(--on-space-6);
    margin: 0;
    padding: var(--on-space-4) 0 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, .18);
}
.dl-facts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-facts strong { font: 600 1.0625rem/1.2 var(--on-font-ui); color: #fff; }
.dl-facts span { font-size: .8125rem; color: rgba(255, 255, 255, .7); }

/* Лист документа */
.dl-sheet { display: flex; justify-content: center; min-width: 0; }
.dl-sheet__paper {
    width: min(100%, 360px);
    padding: 28px 26px 22px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35), 0 2px 0 rgba(255, 255, 255, .6) inset;
    transform: rotate(1.6deg);
}
.dl-sheet__title {
    margin-bottom: 18px;
    font: 700 .78rem/1.35 var(--on-font-title);
    letter-spacing: .02em;
    text-align: center;
    color: var(--on-navy);
}
.dl-sheet__line { height: 7px; margin-bottom: 11px; background: var(--on-line); border-radius: 3px; }
.dl-sheet__line--w90 { width: 90%; }
.dl-sheet__line--w85 { width: 85%; }
.dl-sheet__line--w80 { width: 80%; }
.dl-sheet__line--w75 { width: 75%; }
.dl-sheet__line--w60 { width: 60%; }
.dl-sheet__field {
    display: inline-block;
    max-width: 100%;
    margin: 2px 0 12px;
    padding: 4px 10px;
    font: 500 .8125rem/1.3 var(--on-font-mono);
    color: var(--on-navy);
    background: #FEF3C7;
    border-bottom: 2px solid var(--on-accent);
    border-radius: 3px;
    overflow-wrap: anywhere;
}
.dl-sheet__field--short { margin-right: 8px; }
.dl-sheet__foot {
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid var(--on-line);
    font-size: .6875rem;
    color: var(--on-slate);
}

/* Секции */
.dl-section { padding-block: clamp(36px, 5vw, 64px); }
.dl-section--tint { background: #EEF2F7; }
.dl-section--end { padding-bottom: clamp(48px, 7vw, 88px); }

.dl-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--on-space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}
.dl-steps__item {
    display: flex;
    flex-direction: column;
    gap: var(--on-space-3);
    min-width: 0;
    padding-top: var(--on-space-4);
    border-top: 2px solid var(--on-navy);
}
.dl-steps__item p { margin: 0; line-height: 1.55; }
.dl-steps__num {
    font: 700 1.75rem/1 var(--on-font-title);
    color: var(--on-accent);
}

/* Форма */
.dl-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: var(--on-space-6);
    align-items: start;
}
.dl-card {
    min-width: 0;
    padding: clamp(20px, 3vw, 36px);
    background: #fff;
    border: 1px solid var(--on-line);
    border-radius: var(--on-radius-lg);
    box-shadow: var(--on-shadow-md);
}
.dl-field { margin-bottom: var(--on-space-4); }
.dl-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9375rem; }
.dl-req { margin-left: 2px; color: var(--on-danger); }
.dl-input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    font: 400 1rem/1.4 var(--on-font-ui);
    color: var(--on-ink);
    background: #fff;
    border: 1.5px solid #CBD5E1;
    border-radius: var(--on-radius-md);
}
.dl-input:focus { outline: none; border-color: var(--on-navy); box-shadow: 0 0 0 3px rgba(10, 31, 68, .15); }
.dl-input.is-invalid { border-color: var(--on-danger); }
.dl-hint { margin: 6px 0 0; font-size: .8125rem; color: var(--on-slate); }
.dl-error { margin: 6px 0 0; font-size: .875rem; font-weight: 500; color: #B91C1C; }
.dl-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; cursor: pointer; }
.dl-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--on-navy); }
.dl-alert {
    margin-bottom: var(--on-space-4);
    padding: 12px 14px;
    font-weight: 500;
    color: #7F1D1D;
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    border-radius: var(--on-radius-md);
}
.dl-fineprint { margin: var(--on-space-3) 0 0; font-size: .75rem; line-height: 1.5; color: var(--on-slate); }

.dl-aside { min-width: 0; padding: var(--on-space-2) 0; }
.dl-aside .dl-h3 { margin-top: 0; }
.dl-checks { margin: 0 0 var(--on-space-4); padding: 0; list-style: none; }
.dl-checks li {
    position: relative;
    padding: 0 0 var(--on-space-3) 28px;
    line-height: 1.45;
}
.dl-checks li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 5px;
    width: 12px;
    height: 7px;
    border-left: 2.5px solid var(--on-online-dark);
    border-bottom: 2.5px solid var(--on-online-dark);
    transform: rotate(-45deg);
}
.dl-aside__note { font-size: .875rem; line-height: 1.5; color: var(--on-slate); }

/* Состав документа */
.dl-contents {
    columns: 2;
    column-gap: var(--on-space-7);
    margin: 0 0 var(--on-space-4);
    padding-left: 0;
    list-style: none;
}
.dl-contents li { margin-bottom: var(--on-space-2); break-inside: avoid; line-height: 1.5; }
.dl-meta { margin: 0; font-size: .875rem; color: var(--on-slate); }

/* FAQ */
.dl-faq { display: flex; flex-direction: column; gap: var(--on-space-2); }
.dl-faq__item { background: #fff; border: 1px solid var(--on-line); border-radius: var(--on-radius-md); }
.dl-faq__item summary {
    padding: 14px 18px;
    font-weight: 600;
    cursor: pointer;
    list-style-position: inside;
}
.dl-faq__item summary:focus-visible { outline: 3px solid var(--on-navy); outline-offset: 2px; border-radius: var(--on-radius-md); }
.dl-faq__item p { margin: 0; padding: 0 18px 16px; line-height: 1.6; color: var(--on-ink); }

/* Перелинковка и оговорка */
.dl-related { display: flex; flex-wrap: wrap; gap: var(--on-space-3); margin: 0; padding: 0; list-style: none; }
.dl-related a {
    display: inline-block;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid var(--on-line);
    border-radius: var(--on-radius-md);
    font-weight: 500;
}
.dl-related a:hover { border-color: var(--on-navy); }
.dl-disclaimer { margin: 0 0 var(--on-space-5); font-size: .875rem; line-height: 1.6; color: var(--on-slate); }

@media (max-width: 900px) {
    .dl-hero__grid, .dl-form-grid { grid-template-columns: minmax(0, 1fr); }
    .dl-sheet { order: 2; }
    .dl-steps { grid-template-columns: minmax(0, 1fr); }
    .dl-contents { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .dl-btn { transition: none; }
    .dl-btn--primary:hover { transform: none; }
}
@media print {
    .dl-hero, .dl-aside, .dl-cta { display: none !important; }
}

/* Оформление заказа */
.dl-hero--compact { padding-block: clamp(24px, 4vw, 44px); }
.dl-hero--compact .dl-h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: var(--on-space-2); }
.dl-hero--compact .dl-lead { margin-bottom: 0; }
.dl-order { margin: 0 0 var(--on-space-4); }
.dl-order dt { margin-top: var(--on-space-3); font-size: .8125rem; color: var(--on-slate); }
.dl-order dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.dl-btn--admin { margin-top: var(--on-space-3); color: var(--on-navy); border-color: var(--on-navy); }
.dl-btn--admin:hover { color: var(--on-navy); background: var(--on-line); }

/* Поле даты: маска + календарь */
.dl-date { position: relative; }
.dl-date .dl-input { padding-right: 48px; }
.dl-date__btn {
    position: absolute; top: 0; right: 0; width: 46px; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 0 var(--on-radius-md) var(--on-radius-md) 0;
    color: var(--on-navy); cursor: pointer;
}
.dl-date__btn:hover { background: var(--on-line); }
.dl-date__btn:focus-visible { outline: 3px solid var(--on-navy); outline-offset: -3px; }
.dl-date__native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
