:root {
    --navy: #0a2540;
    --navy-2: #12385e;
    --ink: #1b2733;
    --muted: #5b6b7b;
    --line: #e1e8ef;
    --bg: #f4f8fb;
    --card: #ffffff;
    --green: #12945a;
    --green-dark: #0d7a49;
    --gold: #e0a526;
    --gold-soft: #fff7e0;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(10, 37, 64, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Armenian", "Noto Sans Georgian", "Noto Sans Arabic", "Noto Sans Hebrew", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}
img, svg { max-width: 100%; }
a { color: var(--navy-2); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
section { padding: 56px 0; }
.sub { color: var(--muted); margin: -.2em 0 1.8em; max-width: 60ch; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); text-decoration: none; font-size: 1.1rem; }
.logo svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 20px; margin-inline-start: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--green-dark); }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: .92rem; background: #fff; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: "▾"; margin-inline-start: 6px; font-size: .8em; }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 180px; max-height: 70vh; overflow: auto; }
.lang li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang li a:hover, .lang li a[aria-current] { background: var(--bg); font-weight: 700; }
.btn { display: inline-block; padding: 13px 24px; border-radius: 12px; background: var(--green); color: #fff !important; font-weight: 700; text-decoration: none; border: 2px solid var(--green); transition: background .15s, transform .15s; text-align: center; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.55); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.small { padding: 9px 16px; font-size: .92rem; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #3b2a00 !important; }
.btn.gold:hover { background: #c98f13; border-color: #c98f13; }

/* hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #1b6a6f 0%, transparent 60%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 64px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); font-weight: 700; font-size: .85rem; letter-spacing: .02em; margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .45em; }
.hero p.lead { font-size: 1.12rem; color: #d3e1ef; max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: #d3e1ef; font-size: .97rem; }
.trust li::before { content: "✓"; color: #5be0a0; font-weight: 800; margin-inline-end: 10px; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(380px, 100%); filter: drop-shadow(0 24px 40px rgba(0,0,0,.35)); }

/* status */
.status { margin-top: -28px; position: relative; z-index: 2; padding: 0; }
.status .box { display: flex; gap: 16px; align-items: flex-start; background: #e7f7ee; border: 1px solid #a6dcc0; border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.status .box.open { background: #e7f7ee; border-color: #a6dcc0; }
.status .ico { font-size: 1.6rem; line-height: 1; }
.status h2 { font-size: 1.1rem; margin: 0 0 4px; }
.status p { margin: 0; color: #4a4a4a; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 12px; }
.step h3 { font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .96rem; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1080px; margin-inline: auto; }
.plan { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 32px 28px; display: flex; flex-direction: column; position: relative; }
.plan.gold { border-color: var(--gold); }
.plan.rec { border-color: var(--green); box-shadow: 0 16px 40px rgba(18, 148, 90, .22); }
.plan .tag { position: absolute; top: -14px; inset-inline-start: 24px; background: var(--green-dark); color: #fff; font-weight: 800; font-size: .8rem; padding: 4px 14px; border-radius: 999px; }
.plan h3 { font-size: 1.3rem; margin-bottom: 2px; }
.plan .tagline { color: var(--muted); margin: 0 0 14px; }
.plan .price { font-size: 3rem; font-weight: 800; color: var(--navy); line-height: 1.1; margin-bottom: 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; flex: 1; align-content: start; }
.plan li { padding-inline-start: 28px; position: relative; font-size: .97rem; }
.plan li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--green); font-weight: 800; }
.plan.gold li::before { color: var(--gold); }
.fee-note { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 22px; }

/* why */
.why { background: #fff; border-block: 1px solid var(--line); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-card { padding: 4px 4px; }
.why-card .ico { width: 46px; height: 46px; border-radius: 12px; background: #e7f7ee; color: var(--green-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 12px; }
.why-card h3 { font-size: 1.05rem; }
.why-card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* faq */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq details[open] { border-color: #b8cde0; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; padding: 18px 28px 18px 0; font-weight: 700; color: var(--navy); list-style: none; position: relative; }
[dir="rtl"] .faq summary { padding: 18px 0 18px 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--green); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 18px; color: #3c4a58; }

/* seo */
.seo { background: #fff; border-top: 1px solid var(--line); }
.seo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 48px; }
.seo article h2 { font-size: 1.25rem; }
.seo article p { margin: 0; color: #3c4a58; }

/* disclaimer + footer */
.disc { background: #fff6f4; border: 1px solid #f2cdc4; border-radius: var(--radius); padding: 22px 26px; }
.disc h2 { font-size: 1.1rem; color: #8a2b19; }
.disc p { margin: 0 0 8px; color: #5a3a34; font-size: .96rem; }
.site-footer { background: var(--navy); color: #b7c7d8; padding: 36px 0; font-size: .92rem; }
.site-footer a { color: #d7e4f1; }
.site-footer .langs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0; }
.site-footer p { margin: 6px 0; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { order: -1; }
    .hero-art svg { width: 240px; }
    .steps, .grid4 { grid-template-columns: repeat(2, 1fr); }
    .plans, .seo-grid { grid-template-columns: 1fr; }
    .nav { display: none; }
    .lang { margin-inline-start: auto; }
}
@media (max-width: 520px) {
    section { padding: 40px 0; }
    .steps, .grid4 { grid-template-columns: 1fr; }
    .hero { padding: 40px 0 56px; }
    .btn { width: 100%; }
    /* кнопки шапки скрываются точечно ниже */
}

/* ===== форма заявки ===== */
.form-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 40px 0 56px; }
.form-hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: .4em; }
.form-hero p { color: #d3e1ef; max-width: 62ch; margin: 0; }
.form-notices { padding: 0 0 8px; }
.form-notices .status { margin-top: -28px; }
.private-note { color: var(--muted); font-size: .92rem; margin: 14px 0 0; }
.apply-form { padding: 24px 0 110px; display: grid; gap: 22px; }
.card-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 26px 10px; margin: 0; min-width: 0; }
.card-block[hidden], #spouse-section[hidden], #children-section[hidden] { display: none; }
.card-block legend { float: none; width: 100%; padding: 0; margin: 0 0 18px; font-weight: 800; font-size: 1.2rem; line-height: 1.3; color: var(--navy); }
.field { margin-bottom: 22px; }
.lbl { display: block; font-weight: 600; font-size: 1rem; line-height: 1.4; margin-bottom: 8px; color: var(--navy); }
.sub-lbl { margin-top: 14px; }
.apply-form input[type=text], .apply-form input[type=number], .apply-form input[type=email], .apply-form input[type=tel],
.apply-form input[type=date], .apply-form select, .apply-form input[type=file] {
    width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid #cfd9e3; border-radius: 10px; background: #fff; color: var(--ink);
    font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.apply-form input:focus, .apply-form select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(18, 148, 90, .18); }
.apply-form input:disabled { background: #eef2f6; color: #7a8896; }
.apply-form input + input, .apply-form .grid3 + input, .apply-form input + .grid3 { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hint { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }
.hint.strong { color: var(--ink); }
.check, .radios label { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 4px; font-weight: 500; cursor: pointer; }
.radios { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.radios.col { flex-direction: column; gap: 0; }
.radios label { margin-top: 6px; }
.apply-form input[type=checkbox], .apply-form input[type=radio] { width: 24px; height: 24px; accent-color: var(--green); flex: none; }
.child-card { border: 1.5px dashed #b8c8d8; border-radius: 14px; padding: 18px 18px 0; margin-bottom: 18px; background: #fafcfe; }
.child-card h3 { font-size: 1.05rem; }
.plans-pick { margin-top: 12px; }
.consent { display: flex; align-items: flex-start; gap: 12px; max-width: 880px; margin: 0 auto 28px; padding: 16px 18px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.consent input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.plan .btn { width: 100%; cursor: pointer; font: inherit; font-weight: 700; }
.fee-note { text-align: center; color: var(--muted); font-size: .92rem; margin: 14px 0 0; }

/* вспомогательные страницы: оплата, спасибо, условия, ошибка */
.narrow { width: min(560px, 100% - 32px); margin: 40px auto 64px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.panel .head { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 24px 28px; }
.panel .head h1 { color: #fff; font-size: 1.4rem; margin: 0; }
.panel .head p { margin: 4px 0 0; color: #b9cde3; font-size: .92rem; }
.panel .body { padding: 26px 28px; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: .96rem; }
.row span:first-child { color: var(--muted); }
.row span:last-child { font-weight: 700; text-align: end; }
.total { margin: 18px 0 8px; padding: 18px; border-radius: 14px; background: var(--bg); text-align: center; }
.total .usd { font-size: 2.6rem; font-weight: 800; color: var(--navy); }
.alert { margin: 14px 0; padding: 13px 15px; border-radius: 12px; background: #fdecec; color: #a12626; }
.alert.info { background: var(--gold-soft); color: #5a4300; }
.wallet { margin-top: 18px; padding: 14px; border-radius: 14px; border: 1px solid #c9d8e8; }
.wallet-na { display: flex; align-items: center; gap: 8px; color: #4a5a6a; font-size: .92rem; line-height: 1.4; }
.wallet-na::before { content: "i"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #dbe7f3; color: var(--navy-2); font: 700 .8rem/20px Georgia, serif; text-align: center; }
.methods { display: flex; flex-direction: column; }
.methods.wallets-off #cardPayBtn { order: 1; }
.methods.wallets-off .divider { display: none; }
.methods.wallets-off .wallet { order: 2; margin-top: 14px; }
.wallet-title { font-size: .85rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.wallet iframe { display: block; width: 100%; height: 56px; border: 0; }
[hidden] { display: none !important; }
.skeleton { height: 56px; border-radius: 10px; background: linear-gradient(90deg, #eef2f6 25%, #e0e7ef 50%, #eef2f6 75%); background-size: 200% 100%; animation: sh 1.2s infinite linear; }
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.wallet-error { color: #a12626; font-size: .9rem; }
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: #8a96a3; font-size: .8rem; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.panel .btn { display: block; width: 100%; }
.btn.loading { opacity: .6; pointer-events: none; }
.secure { margin-top: 16px; text-align: center; color: #8a96a3; font-size: .85rem; }
.done { text-align: center; padding: 38px 28px; }
.done .icon { font-size: 3.4rem; color: var(--green); line-height: 1; }
.done h1 { color: var(--green-dark); margin: 14px 0 16px; font-size: 1.7rem; }
.done h1.wait { color: var(--navy); }
.done .order { color: var(--muted); font-size: .9rem; }
.prose { width: min(760px, 100% - 32px); margin: 40px auto 64px; }
.prose h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.prose h2 { font-size: 1.15rem; margin-top: 1.6em; }
.prose .lead { font-size: 1.1rem; color: var(--muted); }
@media (max-width: 640px) {
    .grid3 { grid-template-columns: 1fr; }
    .grid3.birth-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .apply-form select { padding-inline: 10px 4px; text-overflow: ellipsis; }
    .card-block legend { font-size: 1.1rem; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
    .field { margin-bottom: 26px; }
    .grid2 { grid-template-columns: 1fr; }
    .card-block { padding: 20px 16px 6px; }
}
.grid2 > *, .grid3 > * { margin-top: 0 !important; }

.wallet-hint { margin: 10px 0 0; color: var(--muted); font-size: .85rem; }

/* Требования к фото и живая проверка при загрузке */
.photo-req { margin: 0 0 14px; padding: 16px; border: 1px solid #cfe3d8; background: #f3faf6; border-radius: 14px; display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; }
.photo-req h4 { margin: 0 0 4px; font-size: 1rem; color: var(--navy); }
.photo-req .spec { margin: 0 0 10px; font-size: .85rem; color: var(--muted); }
.photo-req ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.photo-req li { position: relative; padding-inline-start: 24px; }
.photo-req li::before { position: absolute; inset-inline-start: 0; top: 0; font-weight: 700; }
.photo-req .yes li::before { content: "✓"; color: var(--green-dark); }
.photo-req .no { margin-top: 8px; }
.photo-req .no li::before { content: "✗"; color: #c0392b; }
.photo-req svg.sample { width: 120px; height: auto; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
@media (max-width: 520px) { .photo-req { grid-template-columns: 1fr; } .photo-req svg.sample { width: 100px; } }
.photo-out { margin-top: 12px; }
.photo-out:empty { display: none; }
.photo-frame { position: relative; width: 220px; max-width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #eef2f6; }
.photo-frame canvas { width: 100%; height: 100%; display: block; }
.photo-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.photo-cap { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }
.photo-msg { margin: 8px 0 0; font-size: .9rem; font-weight: 600; }
.photo-out.ok .photo-msg { color: var(--green-dark); }
.photo-out.bad .photo-msg { color: #b3261e; }
.photo-again { margin-top: 8px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .9rem; cursor: pointer; }

/* Страница «Посмотреть свою заявку» */
.status-table th, .status-table td { text-align: start; padding: 9px 4px; border-bottom: 1px solid #e3eaf2; vertical-align: top; }
.status-table th { font-weight: 500; color: #5b6b7c; width: 38%; }
.status-table td { font-weight: 600; word-break: break-word; }
.panel form label { display: block; margin: 0 0 14px; font-weight: 600; }
.panel form label input { margin-top: 6px; }

/* Подсказка «введите латиницей» */
.latin-hint { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #fff4d6; color: #6b4a00; font-size: 14px; }
.latin-apply { margin-inline-start: 4px; padding: 4px 10px; border: 1px solid #c9a24a; border-radius: 6px; background: #fff; color: inherit; font: inherit; cursor: pointer; }
.latin-hint[hidden] { display: none; }
input[data-latin] { text-transform: uppercase; }
.panel form button.btn { font: inherit; font-weight: 700; cursor: pointer; margin-top: 8px; }
.alert { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: #fdecec; border: 1px solid #f1c3c3; color: #8f1f1f; font-weight: 600; }
.st-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .92rem; font-weight: 700; }
.st-accepted { background: #e3f6ea; color: #17733b; }
.st-submitted { background: #e1ecfb; color: #164a99; }
.st-won { background: #fff1c9; color: #7a5600; }
.st-not_won { background: #eceff3; color: #4d5967; }
.st-wait { background: #fff4d6; color: #8a6100; }
.panel .done p:last-child, .panel .body > p:last-child { text-align: center; }

/* общая шапка и подвал */
.bar .btn-status { display: inline-flex; align-items: center; gap: 7px; background: #fff; color: var(--navy) !important; border: 2px solid var(--line); }
.bar .btn-status:hover { background: #f3f7fb; border-color: #c4d3e2; }
.bar .btn-status svg { width: 18px; height: 18px; flex: none; }
.foot-brand { font-size: 1.1rem; color: #fff; }
.foot-tag { margin: 6px 0 22px; max-width: 60ch; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 22px 28px; margin-bottom: 8px; }
.foot-grid h3 { margin: 0 0 6px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #8fa6bd; font-weight: 700; }
.foot-grid a { display: block; padding: 9px 0; text-decoration: none; font-size: .98rem; }
.foot-grid a:hover { text-decoration: underline; }
.foot-user { display: block; color: #8fa6bd; font-size: .92rem; }
.site-footer .langs { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; margin-top: 18px; }
.site-footer .langs a { padding: 6px 2px; }
.foot-copy { color: #8fa6bd; font-size: .85rem; }
@media (max-width: 900px) { .bar .btn-status { margin-inline-start: 0; } }
@media (max-width: 520px) {
    .bar .btn.small.btn-apply { display: none; }
    .bar .btn.small.btn-status { display: inline-flex; width: auto; padding: 9px 11px; }
    .bar .btn-status span { display: none; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .foot-grid a { padding: 11px 0; }
}
.logo { white-space: nowrap; } @media (max-width: 520px) { .logo { font-size: 1rem; gap: 8px; } .logo svg { width: 30px; height: 30px; } .bar { gap: 10px; } }
.consent-note { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.field-err { display: flex; align-items: center; gap: 6px; color: #b3261e; font-size: .88rem; font-weight: 600; margin: 8px 0 0; line-height: 1.3; }
.field-err::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: #b3261e; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.apply-form .has-err { border-color: #d93025; background: #fff8f7; }
.apply-form .has-err:focus { border-color: #d93025; box-shadow: 0 0 0 3px rgba(217, 48, 37, .2); }
.field-bad { padding: 10px 12px; background: #fff3f1; border-radius: 12px; box-shadow: 0 0 0 1px #f3b9b3; scroll-margin-top: 90px; animation: fb-shake .35s; }
.consent.field-bad { border-color: #d93025; box-shadow: none; }
@keyframes fb-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .field-bad { animation: none; } }
/* компактная плашка сверху вместо длинного списка */
.form-errors { position: fixed; top: 10px; inset-inline: 12px; z-index: 50; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #b3261e; color: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: .95rem; font-weight: 600; }
.form-errors[hidden] { display: none; }
.fe-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #b3261e; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.fe-msg { flex: 1; line-height: 1.3; }
.fe-go { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: #fff; color: #b3261e; font: inherit; font-weight: 700; cursor: pointer; }
.plan .btn:disabled { opacity: .6; cursor: wait; }

/* мобильный UX: тап-цели >=44px, статус не залезает на блок дат, место под кнопку чата */
.lang summary { min-height: 44px; display: flex; align-items: center; box-sizing: border-box; }
.lang li a { min-height: 44px; display: flex; align-items: center; box-sizing: border-box; }
.bar .btn.small.btn-status { min-height: 44px; }
.site-footer { padding-bottom: 84px; }
.site-footer .langs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.logo { min-height: 44px; display: inline-flex; align-items: center; }

.apply-form { padding-bottom: 96px; }
.apply-form input[type=radio].has-err, .apply-form input[type=checkbox].has-err { outline: 2px solid #d93025; outline-offset: 2px; border-radius: 50%; }
.apply-form input[type=file].has-err { border-style: dashed; }

/* Сообщение «у вас уже есть заявка» на странице оплаты */
.dup-card { display: flex; gap: 14px; margin: 16px 0; padding: 16px; border-radius: 14px; background: #eef7ff; border: 1px solid #b9d8f2; }
.dup-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #1c6fb8; color: #fff; font: 800 1.1rem/34px Georgia, serif; text-align: center; }
.dup-body { flex: 1; min-width: 0; }
.dup-body h2 { margin: 0 0 4px; font-size: 1.05rem; color: var(--navy); }
.dup-body p { margin: 0 0 12px; color: var(--ink); font-size: .95rem; }
.dup-actions { display: flex; flex-direction: column; gap: 10px; }
.panel .btn.outline, .btn.outline { background: #fff; color: var(--navy) !important; border-color: #b9c9da; }
.btn.outline:hover { background: var(--bg); border-color: var(--navy-2); }
.dup-verify summary { list-style: none; cursor: pointer; display: block; }
.dup-verify summary::-webkit-details-marker { display: none; }
.dup-verify form { margin-top: 12px; }
.dup-verify input { display: block; width: 100%; margin-bottom: 10px; padding: 12px; border: 1px solid #b9c9da; border-radius: 10px; font: inherit; background: #fff; }
.dup-verify .btn { font: inherit; font-weight: 700; cursor: pointer; }
.dup-bad { color: #a12626 !important; font-weight: 600; }
@media (min-width: 560px) { .dup-actions { flex-direction: row; flex-wrap: wrap; align-items: flex-start; } .dup-actions > .btn, .dup-actions > .dup-verify { flex: 1 1 200px; } }

/* Подтверждение паспорта и телефона над формой в режиме правки */
.edit-verify { margin: 16px 0; padding: 14px 16px; border: 1px solid #b9d8f2; background: #eef7ff; border-radius: 12px; display: grid; gap: 10px; }
.edit-verify p { margin: 0; font-size: .95rem; }
.edit-verify input { width: 100%; padding: 12px; border: 1px solid #b9c9da; border-radius: 10px; font: inherit; background: #fff; }
.edit-verify .btn { font: inherit; font-weight: 700; cursor: pointer; }
@media (min-width: 720px) { .edit-verify { grid-template-columns: 1fr 1fr auto; align-items: center; } .edit-verify p { grid-column: 1 / -1; } }

/* iOS: date input не должен выходить за карточку */
.apply-form input[type=date] { display: block; min-width: 0; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; text-align: start; }
.apply-form input[type=date]::-webkit-date-and-time-value { text-align: start; min-height: 1.4em; }
@media (max-width: 520px) { .photo-req { padding: 14px; gap: 12px; } .photo-req svg.sample { width: 84px; } }

/* ===== v26: полный редизайн формы (mobile-first) ===== */
.apply-form { --f-gap: 20px; --f-h: 52px; padding: 16px 0 120px; gap: 16px; }
.form-progress { position: sticky; top: 64px; z-index: 15; margin: 0 -16px 4px; padding: 10px 16px 8px; background: rgba(244,247,250,.94); backdrop-filter: blur(8px); }
.form-progress .fp-bar { height: 6px; border-radius: 99px; background: #dde6ee; overflow: hidden; }
.form-progress .fp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #12945a, #2bbf7e); border-radius: 99px; transition: width .3s; }
.form-progress .txt { margin-top: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }

/* карточка секции: заголовок внутри, без прохода через рамку (трюк float для fieldset/legend в Safari) */
.card-block { display: block; padding: 20px 18px 8px; border: 0; border-radius: 20px; box-shadow: 0 2px 4px rgba(10,37,64,.04), 0 12px 32px rgba(10,37,64,.07); }
.card-block legend { float: left; width: 100%; padding: 0; margin: 0 0 18px; font-size: 1.2rem; font-weight: 800; line-height: 1.3; color: var(--navy); border: 0; }
.card-block legend + * { clear: both; }
.card-block legend::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 4px; background: var(--green); margin-bottom: 12px; }
.field { margin-bottom: var(--f-gap); }
.lbl { font-size: .95rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.hint { font-size: .85rem; line-height: 1.45; margin-top: 8px; }

.apply-form input[type=text], .apply-form input[type=number], .apply-form input[type=email], .apply-form input[type=tel],
.apply-form input[type=date], .apply-form select {
    min-height: var(--f-h); padding: 14px 16px; font-size: 16px; border: 1.5px solid #d3dde7; border-radius: 14px; background-color: #f8fafc; box-shadow: none;
}
.apply-form input::placeholder { color: #8d9bab; }
.apply-form input:focus, .apply-form select:focus { background: #fff; border-color: var(--green); box-shadow: 0 0 0 4px rgba(18,148,90,.15); }
.apply-form select { -webkit-appearance: none; appearance: none; padding-inline-end: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%235b6b7b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; text-overflow: ellipsis; }
[dir=rtl] .apply-form select { background-position: left 16px center; }
.apply-form input[type=date] { display: block; width: 100%; min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; text-align: start; }
.apply-form input[type=file] { padding: 12px; background: #f8fafc; border-style: dashed; min-height: var(--f-h); font-size: 15px; }
.apply-form input + input, .apply-form .grid3 + input, .apply-form input + .grid3 { margin-top: 12px; }

/* сетки: minmax(0,1fr) — ничто не раздвигает колонки за край */
.grid2, .grid3 { gap: 12px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid2 > *, .grid3 > * { min-width: 0; }
.grid3.birth-row { gap: 8px; }
.grid3.birth-row select { padding-inline: 12px 28px; background-position: right 10px center; }
[dir=rtl] .grid3.birth-row select { background-position: left 10px center; }
@media (max-width: 640px) {
    .grid3 { grid-template-columns: minmax(0, 1fr); }
    .grid3.birth-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .grid3.birth-row select { padding-inline: 10px 22px; background-position: right 7px center; background-size: 11px; }
    .grid2 { grid-template-columns: minmax(0, 1fr); }
    .card-block { padding: 20px 16px 8px; }
    .card-block legend { font-size: 1.15rem; border-bottom: 0; padding-bottom: 0; }
}

/* выбор: крупные чипы вместо мелких радио */
.radios { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.radios.col { grid-template-columns: 1fr; gap: 10px; }
.radios label { margin: 0; min-height: var(--f-h); padding: 12px 16px; gap: 12px; border: 1.5px solid #d3dde7; border-radius: 14px; background: #f8fafc; font-weight: 600; transition: border-color .15s, background .15s; }
.radios label:has(input:checked) { border-color: var(--green); background: #e9f8f0; color: var(--green-dark); box-shadow: 0 0 0 3px rgba(18,148,90,.12); }
.apply-form input[type=checkbox], .apply-form input[type=radio] { width: 24px; height: 24px; }
.check { min-height: 48px; margin-top: 8px; padding: 6px 2px; font-weight: 500; }

.photo-req { border-radius: 16px; }
.child-card { border-radius: 16px; }
.consent { border-radius: 16px; }

/* ошибки/валидность */
.apply-form input:not(:placeholder-shown):valid:not([type=file]):not([type=checkbox]):not([type=radio]) { border-color: #8fd3b3; }
.field-bad { padding: 12px; border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { .form-progress .fp-bar i { transition: none; } }
@supports (padding: env(safe-area-inset-bottom)) { .apply-form { padding-bottom: calc(110px + env(safe-area-inset-bottom)); } }
