/* ============ Оформление в духе интерфейсов Apple ============
   Скругления, мягкие тени, заливки вместо рамок, без тонких линий.
   data-theme: light | dark | auto, data-accent: blue | indigo | green | orange | pink | graphite */

:root {
  --bg: #F5F5F7;
  --bg-alt: #FFFFFF;
  --card: #FFFFFF;
  --card-2: #F5F5F7;
  --ink: #1D1D1F;
  --ink-2: #424245;
  --muted: #6E6E73;
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .07);
  --thumb: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
  --shadow: 0 2px 6px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .07);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06);
  --header: rgba(245, 245, 247, .78);
  --green: #248A3D; --green-bg: rgba(52, 199, 89, .14);
  --orange: #C93400; --orange-bg: rgba(255, 149, 0, .15);
  --red: #D70015; --red-bg: rgba(255, 59, 48, .1);
  --dot-green: #34C759; --dot-blue: #007AFF; --dot-amber: #FF9500; --dot-red: #FF3B30; --dot-off: #AEAEB2;

  --accent: #0066CC;
  --accent-fill: #0071E3;
  --accent-ink: #FFFFFF;

  --f: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --wrap: 1180px;
  --gut: 24px;
  --head-h: 64px;
  --ease: cubic-bezier(.25, .1, .25, 1);
  color-scheme: light;
}

/* Цвета акцента: заливка кнопок (белый текст ≥ 4.5:1) и цвет ссылок */
[data-accent="indigo"] { --accent: #5856D6; --accent-fill: #5E5CE6; }
[data-accent="green"] { --accent: #1F7F38; --accent-fill: #1F7F38; }
[data-accent="orange"] { --accent: #C93400; --accent-fill: #C93400; }
[data-accent="pink"] { --accent: #D30F45; --accent-fill: #D30F45; }
[data-accent="graphite"] { --accent: #48484A; --accent-fill: #48484A; }

:root { --accent-soft: color-mix(in srgb, var(--accent-fill) 12%, transparent); }

/* Тёмное оформление — явно или по настройке системы */
:root[data-theme="dark"] {
  --bg: #000000; --bg-alt: #0D0D0F; --card: #1C1C1E; --card-2: #2C2C2E;
  --ink: #F5F5F7; --ink-2: #D1D1D6; --muted: #98989D;
  --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .14); --thumb: #636366;
  --shadow-sm: none; --shadow: 0 12px 32px rgba(0, 0, 0, .5); --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
  --header: rgba(22, 22, 23, .78);
  --green: #30D158; --orange: #FF9F0A; --red: #FF453A; --red-bg: rgba(255, 69, 58, .16);
  --dot-blue: #0A84FF;
  color-scheme: dark;
}
:root[data-theme="dark"][data-accent="blue"], :root[data-theme="dark"]:not([data-accent]) { --accent: #2997FF; }
:root[data-theme="dark"][data-accent="indigo"] { --accent: #7D7AFF; }
:root[data-theme="dark"][data-accent="green"] { --accent: #30D158; }
:root[data-theme="dark"][data-accent="orange"] { --accent: #FF9F0A; }
:root[data-theme="dark"][data-accent="pink"] { --accent: #FF375F; }
:root[data-theme="dark"][data-accent="graphite"] { --accent: #AEAEB2; --accent-fill: #636366; }

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #000000; --bg-alt: #0D0D0F; --card: #1C1C1E; --card-2: #2C2C2E;
    --ink: #F5F5F7; --ink-2: #D1D1D6; --muted: #98989D;
    --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .14); --thumb: #636366;
    --shadow-sm: none; --shadow: 0 12px 32px rgba(0, 0, 0, .5); --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
    --header: rgba(22, 22, 23, .78);
    --green: #30D158; --orange: #FF9F0A; --red: #FF453A; --red-bg: rgba(255, 69, 58, .16);
    --dot-blue: #0A84FF;
    color-scheme: dark;
  }
  :root[data-theme="auto"][data-accent="blue"], :root[data-theme="auto"]:not([data-accent]) { --accent: #2997FF; }
  :root[data-theme="auto"][data-accent="indigo"] { --accent: #7D7AFF; }
  :root[data-theme="auto"][data-accent="green"] { --accent: #30D158; }
  :root[data-theme="auto"][data-accent="orange"] { --accent: #FF9F0A; }
  :root[data-theme="auto"][data-accent="pink"] { --accent: #FF375F; }
  :root[data-theme="auto"][data-accent="graphite"] { --accent: #AEAEB2; --accent-fill: #636366; }
}

/* ============ База ============ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.47 var(--f);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent-fill) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 18px; border-radius: 999px; background: var(--accent-fill); color: var(--accent-ink); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 max(var(--gut), env(safe-area-inset-right)) 0 max(var(--gut), env(safe-area-inset-left)); }
body.menu-open { overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Типографика */
.h1 { font: 700 clamp(2.4rem, 5vw, 3.9rem)/1.06 var(--f); letter-spacing: -.03em; }
.h2 { font: 700 clamp(1.9rem, 3.2vw, 2.6rem)/1.1 var(--f); letter-spacing: -.025em; }
.h3 { font: 600 1.18rem/1.3 var(--f); letter-spacing: -.015em; }
.lead { font-size: 1.2rem; line-height: 1.5; color: var(--muted); max-width: 58ch; letter-spacing: -.015em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; line-height: 1.45; letter-spacing: -.005em; }
.readout { font-size: .875rem; font-weight: 500; color: var(--muted); letter-spacing: -.005em; }
.num { font-variant-numeric: tabular-nums; }
.note { font-size: .8125rem; color: var(--muted); line-height: 1.45; }

/* Точки статуса и метки-капсулы */
.led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--dot-off); }
.led-green { background: var(--dot-green); }
.led-blue { background: var(--dot-blue); }
.led-amber { background: var(--dot-amber); }
.led-red { background: var(--dot-red); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--fill); color: var(--ink-2); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.tag .led { display: none; }
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-orange { background: var(--orange-bg); color: var(--orange); }

/* Иконка в цветном скруглённом квадрате, как в настройках iOS */
.ico-tile { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.ico-tile .ic { width: 24px; height: 24px; }
.ico-lg { width: 56px; height: 56px; border-radius: 15px; }
.ico-lg .ic { width: 30px; height: 30px; }
.ico-red { background: var(--red-bg); color: var(--red); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--fill); color: var(--accent);
  font-size: 1rem; font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), transform .15s var(--ease), filter .2s;
}
.btn:hover { background: color-mix(in srgb, var(--fill) 100%, var(--ink) 6%); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-fill); filter: brightness(1.08); }
.btn-plain, .btn-ghost { background: transparent; padding: 0 14px; }
.btn-plain:hover, .btn-ghost:hover { background: var(--fill-2); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: .9375rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .ic { width: 18px; height: 18px; }

.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }

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

.card { position: relative; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 24px 24px 0; }
.card-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.card-body { padding: 20px 24px; }
.card-foot { padding: 0 24px 24px; }
.section-alt .card, .section-alt .fnode, .section-alt .faq details { background: var(--card-2); box-shadow: none; }

/* ============ Формы ============ */

.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field > label, .field > .label { font-size: .9375rem; font-weight: 500; color: var(--ink-2); }
.field .opt { color: var(--muted); font-weight: 400; }
.field-err { font-size: .875rem; color: var(--red); }
.hint { font-size: .8125rem; color: var(--muted); }

.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border: 0; border-radius: var(--r-md);
  background: var(--fill); color: var(--ink); font-size: 1.0625rem;
  transition: box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.45; }
.input:hover, .select:hover, .textarea:hover { background: color-mix(in srgb, var(--fill) 100%, var(--ink) 4%); }
.input:focus, .select:focus, .textarea:focus { outline: none; background: var(--card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-fill) 35%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .75; }
[aria-invalid="true"] { background: var(--red-bg) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 30%, transparent) !important; }
.select {
  appearance: none; padding-right: 44px; 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 d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}
.select option { background: var(--card); color: var(--ink); }
input[type="date"] { min-height: 50px; }

.unit-wrap { position: relative; }
.unit-wrap .input { padding-right: 70px; font-weight: 600; font-variant-numeric: tabular-nums; }
.unit-wrap .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: .9375rem; color: var(--muted); pointer-events: none; }

/* Сегментированный переключатель iOS */
.seg { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--fill); }
.seg button {
  flex: 1 1 auto; min-height: 38px; padding: 6px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink); font-size: .9375rem; font-weight: 500;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.seg button:hover { background: var(--fill-2); }
.seg button[aria-pressed="true"] { background: var(--thumb); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); }

/* Галочка и радио */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .9375rem; line-height: 1.45; color: var(--ink-2); }
.check input { appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border-radius: 7px; background: var(--fill); display: grid; place-content: center; cursor: pointer; transition: background-color .15s; }
.check input[type="radio"] { border-radius: 50%; }
.check input::after { content: ''; width: 12px; height: 7px; margin-top: -3px; border: solid var(--accent-ink); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) scale(0); transition: transform .15s var(--ease); }
.check input:checked { background: var(--accent-fill); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--fill-2); font-size: .9375rem; }
.alert .ic { width: 22px; height: 22px; }
.alert-err { background: var(--red-bg); color: var(--red); }
.alert-ok { background: var(--green-bg); color: var(--green); }

/* ============ Шапка ============ */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: var(--header);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.head-row { display: flex; align-items: center; gap: 28px; height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1.3rem; font-weight: 400; letter-spacing: -.035em; white-space: nowrap; line-height: 1; }
.brand-name b { font-weight: 800; }
.brand-dot { color: #1E9BFF; font-weight: 800; }

.nav { display: flex; gap: 2px; }
.nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: .9375rem; transition: background-color .2s, color .2s; }
.nav a:hover { color: var(--ink); background: var(--fill-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--fill); }
.head-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill); }
.lang-btn { min-width: 38px; height: 30px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .8125rem; font-weight: 600; letter-spacing: .02em; }
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-pressed="true"] { background: var(--thumb); color: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }

.theme { position: relative; }
.theme-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--fill); }
.theme-btn:hover { background: color-mix(in srgb, var(--fill) 100%, var(--ink) 6%); }
.theme-dot { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #FFFFFF 50%, #1D1D1F 50%); box-shadow: 0 0 0 2.5px var(--accent-fill); }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 292px; padding: 16px;
  display: grid; gap: 12px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-lg);
  animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.theme-menu-title { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode-opt { display: grid; justify-items: center; gap: 6px; padding: 6px 4px; border: 0; border-radius: 14px; background: transparent; font-size: .8125rem; font-weight: 500; color: var(--ink-2); }
.mode-opt:hover { background: var(--fill-2); }
.mode-pic { width: 68px; height: 46px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(128, 128, 128, .25) inset; }
.mode-pic[data-mode="light"] { background: linear-gradient(#FFFFFF 0 28%, #F5F5F7 28%); }
.mode-pic[data-mode="dark"] { background: linear-gradient(#2C2C2E 0 28%, #000000 28%); }
.mode-pic[data-mode="auto"] { background: linear-gradient(90deg, #F5F5F7 50%, #1C1C1E 50%); }
.mode-opt[aria-pressed="true"] .mode-pic { box-shadow: 0 0 0 3px var(--accent-fill); }
.mode-opt[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.accents { display: flex; gap: 12px; flex-wrap: wrap; padding: 2px; }
.accent-opt { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--sw); transition: transform .15s var(--ease); }
.accent-opt:hover { transform: scale(1.1); }
.accent-opt[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4.5px var(--sw); }
[data-sw="blue"] { --sw: #0071E3; }
[data-sw="indigo"] { --sw: #5E5CE6; }
[data-sw="green"] { --sw: #34C759; }
[data-sw="orange"] { --sw: #FF9500; }
[data-sw="pink"] { --sw: #FF2D55; }
[data-sw="graphite"] { --sw: #8E8E93; }

.menu-btn { display: none; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 50%; background: var(--fill); }
.drawer { display: none; }

/* ============ Главная ============ */

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-fill) 16%, transparent), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; padding-block: 72px 88px; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-content: start; }
.hero-status { display: inline-flex; align-items: center; gap: 8px; justify-self: start; max-width: 100%; padding: 7px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); font-size: .9375rem; color: var(--ink-2); }
.hero-title { max-width: 16ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.quick { border-radius: var(--r-xl); box-shadow: var(--shadow); }
.quick .card-body { display: grid; gap: 18px; }
.quick-result { display: grid; gap: 10px; }
.quick-premium { font-size: clamp(2.4rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.quick-premium small { margin-left: 6px; font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; color: var(--muted); }
.quick-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: .9375rem; color: var(--muted); }
.tick { animation: tick .4s var(--ease); }
@keyframes tick { 0% { opacity: .35; transform: translateY(3px); } 100% { opacity: 1; transform: none; } }

.mand-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-bottom: 56px; }
.mand-row .readout { margin-right: 6px; }
.mand a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); text-decoration: none; font-size: .9375rem; font-weight: 600; transition: transform .2s var(--ease); }
.mand a:hover { transform: translateY(-1px); color: var(--accent); }

/* Секции */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 720px; }

/* Каталог */
.filters { display: flex; gap: 8px; margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 0; border-radius: 999px;
  background: var(--fill); color: var(--ink); font-size: .9375rem; font-weight: 500; white-space: nowrap; transition: background-color .2s, color .2s;
}
.filters button:hover { background: color-mix(in srgb, var(--fill) 100%, var(--ink) 5%); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.filters .count { font-size: .8125rem; opacity: .6; font-variant-numeric: tabular-nums; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; min-height: 248px; padding: 24px;
  border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.tile h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.tile p { color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.tile-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; }
.tile-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.tile-go { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--fill); color: var(--accent); transition: background-color .2s, color .2s; }
.tile:hover .tile-go { background: var(--accent-fill); color: var(--accent-ink); }
.tile-go .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.tiles-empty { padding: 40px; border-radius: var(--r-lg); background: var(--card); color: var(--muted); grid-column: 1 / -1; }

/* Как оформить */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.fnode { display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-sm); }
.fnode-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); font-weight: 700; margin-bottom: 6px; }
.fnode h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em; }
.fnode p { font-size: .9375rem; color: var(--muted); line-height: 1.45; }
.fbranch { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fbranch .fnode { grid-template-columns: auto 1fr; align-items: center; gap: 14px; }
.fbranch .fnode .tag { font-size: .9375rem; }

/* Проверка полиса */
.check-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.check-form { display: grid; gap: 18px; margin-top: 28px; max-width: 460px; }
.result { min-height: 300px; border-radius: var(--r-xl); }
.result-empty { display: grid; place-items: center; min-height: 300px; padding: 32px; text-align: center; color: var(--muted); }
.result-empty .ico-tile { margin: 0 auto 16px; }
.status-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.status-line b { font-size: 1.3rem; letter-spacing: -.02em; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; }
.kv dt { color: var(--muted); }
.kv dd { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Вопросы */
.faq-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 48px; align-items: start; }
.faq-grid .section-head { position: sticky; top: calc(var(--head-h) + 32px); margin: 0; }
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); transition: background-color .2s; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; cursor: pointer; list-style: none; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--fill); color: var(--accent); stroke-width: 2.2; transition: transform .25s var(--ease); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details p { padding: 0 64px 22px 22px; color: var(--ink-2); max-width: 70ch; }

/* Контакты */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.contact-list { display: grid; gap: 18px; margin-top: 32px; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; }
.contact-list li > .ic { width: 44px; height: 44px; padding: 11px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--accent); }
.contact-phone { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.callback { border-radius: var(--r-xl); }
.callback .card-body { display: grid; gap: 18px; }

/* Подвал */
.site-foot { background: var(--bg); padding: 56px 0 36px; font-size: .875rem; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-grid h4 { margin-bottom: 12px; color: var(--ink); font-size: .875rem; font-weight: 600; }
.foot-grid ul { display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: var(--muted); }
.foot-grid a:hover { color: var(--ink); }
.foot-note { margin-top: 14px; max-width: 46ch; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; margin-top: 40px; }
.foot-bottom a { color: var(--muted); }

/* ============ Страница продукта ============ */

.page { padding-top: 36px; padding-bottom: 96px; }
.page-narrow { max-width: 720px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 28px; color: var(--accent); text-decoration: none; font-size: 1rem; }
.back:hover { text-decoration: underline; }
.back .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.prod-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr); grid-template-areas: "head calc" "lists calc"; column-gap: 48px; align-items: start; }
.prod-head { grid-area: head; }
.calc { grid-area: calc; }
.prod-lists { grid-area: lists; }
.prod-head { display: grid; gap: 18px; padding-bottom: 32px; }
.prod-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.prod-desc { color: var(--ink-2); max-width: 64ch; }
.prod-flags { display: flex; flex-wrap: wrap; gap: 10px; }
.prod-lists { display: grid; gap: 16px; }
.plist { display: grid; gap: 16px; padding: 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-sm); }
.plist h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.plist ul { display: grid; gap: 12px; }
.plist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--ink-2); }
.plist li .ic { margin-top: 1px; width: 24px; height: 24px; padding: 4px; border-radius: 50%; stroke-width: 2.6; }
.plist.covers .ic { background: var(--green-bg); color: var(--green); }
.plist.excludes .ic { background: var(--fill); color: var(--muted); }
.plist.documents .ic { background: var(--accent-soft); color: var(--accent); stroke-width: 2; }
.calc { position: sticky; top: calc(var(--head-h) + 20px); border-radius: var(--r-xl); box-shadow: var(--shadow); }
.calc .card-body { display: grid; gap: 18px; }
.calc-out { display: grid; gap: 14px; }
.calc-premium { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.calc-premium .v { font-size: 2.6rem; font-weight: 700; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.calc-premium .per { color: var(--muted); }
.breakdown summary { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; color: var(--accent); font-size: .9375rem; list-style: none; }
.breakdown summary::-webkit-details-marker { display: none; }
.breakdown summary .ic { width: 16px; height: 16px; stroke-width: 2.2; transition: transform .2s var(--ease); }
.breakdown[open] summary .ic { transform: rotate(90deg); }
.breakdown ol { display: grid; gap: 8px; margin-top: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--fill-2); font-size: .875rem; }
.breakdown li { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); }
.breakdown li span:last-child { font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ============ Оформление полиса ============ */

.wiz-head { display: grid; gap: 20px; margin-bottom: 28px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 640px; }
.steps li { display: grid; gap: 10px; color: var(--muted); font-size: .9375rem; font-weight: 500; }
.steps li::before { content: ''; height: 5px; border-radius: 5px; background: var(--fill); transition: background-color .3s var(--ease); }
.steps li > span:last-child { display: inline; }
.steps li { grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; }
.steps li::before { grid-column: 1 / -1; }
.step-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--fill); color: var(--muted); font-size: .8125rem; font-weight: 700; }
.step-n .ic { width: 14px; height: 14px; stroke-width: 3; }
.steps li.is-done::before, .steps li.is-current::before { background: var(--accent-fill); }
.steps li.is-current { color: var(--ink); font-weight: 600; }
.steps li.is-current .step-n { background: var(--accent-fill); color: var(--accent-ink); }
.steps li.is-done .step-n { background: var(--accent-soft); color: var(--accent); }

.wiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.wiz-main { display: grid; gap: 28px; padding: 28px; border-radius: var(--r-xl); }
.wiz-section { display: grid; gap: 18px; }
.wiz-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 4px; }
.wiz-nav .btn-primary { min-width: 180px; }
.wiz-summary { position: sticky; top: calc(var(--head-h) + 20px); display: grid; gap: 18px; padding: 24px; border-radius: var(--r-xl); box-shadow: var(--shadow); }
.sum-head { display: flex; align-items: center; gap: 12px; }
.sum-head > div { display: grid; gap: 2px; min-width: 0; }
.sum-head b { font-size: 1.05rem; letter-spacing: -.015em; line-height: 1.25; }
.sum-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.sum-price .v { font-size: 2.4rem; font-weight: 700; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.sum-price .per { color: var(--muted); }
.wiz-summary .kv { grid-template-columns: auto minmax(0, 1fr); font-size: .9375rem; }
.wiz-summary .kv dt { white-space: nowrap; }

.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pm { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--fill-2); cursor: pointer; transition: background-color .2s, box-shadow .2s; }
.pm:hover { background: var(--fill); }
.pm input { position: absolute; opacity: 0; pointer-events: none; }
.pm > span:last-child { display: grid; gap: 1px; }
.pm small { color: var(--muted); font-size: .8125rem; }
.pm-check { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--fill); color: transparent; transition: background-color .2s, color .2s; }
.pm-check .ic { width: 14px; height: 14px; stroke-width: 3; }
.pm:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-fill); }
.pm:has(input:checked) .pm-check { background: var(--accent-fill); color: var(--accent-ink); }
.pm:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent-fill) 55%, transparent); outline-offset: 2px; }

.summary { display: grid; gap: 4px; padding: 10px 16px; border-radius: 16px; background: var(--fill-2); }
.summary > div { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 16px; padding: 8px 0; font-size: .9375rem; }
.summary dt { color: var(--muted); }
.summary dd { overflow-wrap: anywhere; white-space: pre-line; }

.done { display: grid; justify-items: center; gap: 18px; padding: 48px 32px; text-align: center; border-radius: var(--r-xl); box-shadow: var(--shadow); }
.done-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.done-icon.is-ok { background: var(--green-bg); color: var(--green); }
.done-icon .ic { width: 44px; height: 44px; stroke-width: 1.8; }
.done-number-box { display: grid; gap: 4px; padding: 14px 24px; border-radius: 16px; background: var(--fill-2); }
.done-number { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.done .lead { margin: 0 auto; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

/* ============ Полис ============ */

.policy-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.policy { max-width: 860px; margin: 0 auto; border-radius: var(--r-xl); box-shadow: var(--shadow); }
.policy .card-body { display: grid; gap: 32px; padding: 44px; }
.pol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.pol-no { display: grid; gap: 4px; text-align: right; }
.pol-no .num { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.pol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pol-block { display: grid; gap: 12px; align-content: start; padding: 20px; border-radius: 18px; background: var(--fill-2); }
.pol-block .kv { font-size: .9375rem; }
.pol-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.stamp { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); }
.stamp .mark { width: 36px; height: 36px; }

/* ============ Состояния ============ */

.loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fill); border-top-color: var(--muted); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { padding-block: 80px; display: grid; gap: 20px; justify-items: start; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 12px 20px 12px 14px; border-radius: 999px;
  background: var(--card); color: var(--ink); font-size: .9375rem; font-weight: 500; box-shadow: var(--shadow-lg);
  animation: toast-in .3s var(--ease);
}
.toast .ic { color: var(--green); width: 22px; height: 22px; }
@keyframes toast-in { from { transform: translate(-50%, 16px); opacity: 0; } }

/* Нижняя панель с ценой и главной кнопкой — только на телефоне */
.mbar { display: none; }

/* Настройки в мобильном меню */
.drawer-links { display: grid; gap: 2px; }
.prefs-inline { display: grid; gap: 14px; margin-top: 28px; padding: 20px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-sm); }
.seg-lang button { min-height: 40px; }

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

@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .head-tools .btn-primary { display: none; }
  .drawer {
    display: grid; gap: 2px; position: fixed; inset: var(--head-h) 0 0; z-index: 39; padding: 20px var(--gut) 40px;
    background: var(--bg); overflow-y: auto; align-content: start; animation: pop .2s var(--ease);
  }
  .drawer[hidden] { display: none !important; }
  .drawer a { padding: 12px 0; text-decoration: none; font-size: 1.6rem; font-weight: 700; letter-spacing: -.025em; }
  .drawer .btn { margin-top: 24px; font-size: 1.0625rem; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero-grid, .check-grid, .faq-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .prod-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "calc" "lists"; row-gap: 20px; }
  .prod-head { padding-bottom: 4px; }
  .hero-grid { padding-block: 40px 56px; }
  .faq-grid .section-head { position: static; }
  .calc, .wiz-summary { position: static; }
  .wiz-grid { grid-template-columns: 1fr; gap: 16px; }
  .wiz-summary { order: -1; }
  .wiz-summary .breakdown, .wiz-summary .note { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .section { padding: 72px 0; }
}

@media (max-width: 640px) {
  :root { --gut: 16px; --head-h: 58px; }
  body { font-size: 16px; }
  .head-row { gap: 10px; }
  .brand-name { font-size: 1.1rem; }
  .mark { width: 30px; height: 30px; }
  .head-tools { gap: 6px; }
  .lang-btn { min-width: 32px; padding: 0 6px; }
  .form-grid { grid-template-columns: 1fr; }
  .flow, .fbranch { grid-template-columns: minmax(0, 1fr); }
  .fbranch .fnode { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .fbranch .fnode .tag { white-space: normal; width: max-content; max-width: 100%; }
  .summary > div { grid-template-columns: 1fr; gap: 2px; }
  .pol-grid { grid-template-columns: 1fr; }
  .policy .card-body { padding: 24px 18px; }
  .pol-head { flex-direction: column; }
  .pol-no { text-align: left; }
  .hero-actions .btn { flex: 1 1 100%; }
  .foot-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .quick-meta { flex-direction: column; gap: 2px; }
  .wiz-main { padding: 20px; }
  .wiz-nav .btn-primary { flex: 1; }
  .done { padding: 36px 20px; }
  .faq details p { padding-right: 22px; }
  .card-head { padding: 20px 20px 0; }
  .card-body { padding: 18px 20px; }
  .card-foot { padding: 0 20px 20px; }
}

/* Телефон: шапка только с логотипом и меню, крупные зоны нажатия, нижняя панель */
@media (max-width: 640px) {
  .head-tools .langs, .head-tools .theme { display: none; }
  .menu-btn { width: 44px; height: 44px; }
  .hero-grid { padding-block: 24px 40px; gap: 28px; }
  .hero-copy { gap: 18px; }
  .hero-status { font-size: .8125rem; padding: 6px 12px; }
  .lead { font-size: 1.0625rem; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 24px; }
  .filters { margin: 0 calc(-1 * var(--gut)) 20px; padding: 2px var(--gut); scroll-snap-type: x proximity; }
  .filters button { scroll-snap-align: start; min-height: 40px; }
  .tile { padding: 20px; gap: 8px; }
  .tile p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mand-row { padding-bottom: 32px; }
  .check-form { max-width: none; }
  .back { margin-bottom: 18px; }
  .page { padding-top: 20px; }

  .has-mbar { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .mbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--header); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, .25);
  }
  .mbar-price { display: grid; line-height: 1.2; min-width: 0; }
  .mbar-price b { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .mbar .btn { flex: none; min-width: 150px; min-height: 50px; }
  .calc-apply, .wiz-nav .btn-primary { display: none; }
  .wiz-nav:not(:has([data-back])) { display: none; }
  .wiz-head { gap: 14px; margin-bottom: 16px; }
  .wiz-summary { padding: 18px; gap: 12px; }
  .wiz-summary .sum-price { display: none; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (pointer: coarse) {
  .seg button { min-height: 44px; }
  .lang-btn { height: 34px; }
  .check input { width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  :root, :root[data-theme] { --bg: #fff; --bg-alt: #fff; --card: #fff; --card-2: #fff; --ink: #000; --ink-2: #222; --muted: #555; --fill-2: #f3f3f3; --shadow: none; --shadow-sm: none; }
  body { background: #fff; }
  .site-head, .site-foot, .policy-tools, .skip, .toast, .drawer { display: none !important; }
  .page { padding: 0; }
  .policy { max-width: none; box-shadow: none; }
}
