/* Вопросы и финальный блок: доработка 15 ноября. Все новые классы начинаются с ff-. */

/* ---------- Вопросы: знак без подложки, плавное раскрытие ---------- */
.faq .pm, .faq details[open] .pm { width: 36px; height: 36px; border-radius: 0; background: none; color: var(--blue); }
.faq .pm { transition: transform .5s var(--ease); }
.faq .pm .i { width: 30px; height: 30px; stroke-width: 1.9; }
.faq details[open] .pm { transform: rotate(135deg); }
.faq summary { border-radius: 22px; -webkit-tap-highlight-color: transparent; }
.faq .a { padding: 0; max-width: none; }
.faq .ff-ans { padding: 0 clamp(18px, 2.2vw, 28px) clamp(18px, 2vw, 24px); max-width: 44em; }
/* Со скриптом состояние ведет класс ff-open: так закрытие тоже успевает проиграться. */
.ff-js .faq details[open]:not(.ff-open) { box-shadow: 0 0 0 1px rgba(27, 86, 223, .06), 0 20px 44px -36px rgba(20, 60, 160, .4); }
.ff-js .faq details[open]:not(.ff-open) .pm { transform: none; }
.ff-js .faq .a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .46s var(--ease); }
.ff-js .faq .ff-clip { min-height: 0; overflow: hidden; }
.ff-js .faq .ff-ans { opacity: 0; transform: translateY(-8px); transition: opacity .22s ease, transform .46s var(--ease); }
.ff-js .faq details.ff-open .a { grid-template-rows: 1fr; }
.ff-js .faq details.ff-open .ff-ans { opacity: 1; transform: none; transition: opacity .4s ease .08s, transform .46s var(--ease); }
@media (hover: hover) { .faq summary:hover .pm { color: var(--sky-0); } }

/* ---------- «Не подойдем, если»: строки с волосяной линией и тонким крестиком ---------- */
.notfit ul { gap: 0; }
.notfit li { gap: 13px; padding: 12px 0; border-top: 1px solid var(--hair); color: var(--ink); }
.notfit li:first-child { border-top: 0; padding-top: 2px; }
.notfit li:last-child { padding-bottom: 0; }
.notfit li .i { width: 18px; height: 18px; padding: 0; border-radius: 0; background: none; color: var(--ink-3); stroke-width: 2.4; margin-top: 3px; }

/* ---------- Финал: общее для трех вариантов ---------- */
.ff-num {
  display: block; width: 54px; padding-bottom: 12px; text-align: center; font: 800 54px/.9 var(--f-d); letter-spacing: -.04em; font-variant-numeric: lining-nums;
  background: linear-gradient(90deg, var(--s1) 0 28%, transparent 28% 36%, var(--s2) 36% 64%, transparent 64% 72%, var(--s3) 72% 100%) bottom / 100% 5px no-repeat;
  color: #fff; --on: #fff; --off: rgba(255, 255, 255, .32); --s1: var(--off); --s2: var(--off); --s3: var(--off);
}
li:nth-child(1) > .ff-num { --s1: var(--on); }
li:nth-child(2) > .ff-num { --s2: var(--on); }
li:nth-child(3) > .ff-num { --s3: var(--on); }
.ff-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; white-space: nowrap; font: 650 14px/1 var(--f-d); letter-spacing: .005em; color: #fff; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34); }
.ff-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.ff-fin .ff-step p { margin-top: 8px; font-size: 16px; line-height: 1.45; color: rgba(255, 255, 255, .93); text-wrap: pretty; }
.ff-who { display: flex; align-items: center; gap: 14px; text-align: left; }
.ff-fin .ff-who .face { width: 60px; height: 60px; margin: 0; border-width: 2.5px; box-shadow: 0 0 0 6px rgba(255, 255, 255, .16), 0 16px 30px -14px rgba(3, 18, 96, .7); }
.ff-who b { display: block; font: 750 18px/1.15 var(--f-d); letter-spacing: -.02em; }
.ff-who span { display: block; margin-top: 3px; font-size: 15px; line-height: 1.2; color: rgba(255, 255, 255, .84); }

/* ---------- Вариант A: слева решение, справа маршрут на одной плашке ---------- */
.ff-fin-a { text-align: left; }
.ff-a {
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); column-gap: clamp(32px, 5vw, 72px);
  grid-template-rows: 1fr auto auto auto auto 1fr;
  grid-template-areas: ". route" "who route" "head route" "cta route" "guar route" ". route";
}
.ff-a .ff-who { grid-area: who; margin-bottom: clamp(20px, 2.2vw, 28px); }
.ff-a .head { grid-area: head; text-align: left; margin-bottom: clamp(26px, 3vw, 38px); }
.ff-a .cta { grid-area: cta; margin-top: 0; text-align: left; }
.ff-a .cta .note { justify-content: flex-start; }
.ff-a .guar { grid-area: guar; margin: clamp(22px, 2.4vw, 30px) 0 0; max-width: 540px; }
.ff-route { grid-area: route; align-self: center; padding: clamp(6px, .8vw, 10px) clamp(20px, 2.4vw, 32px); }
.ff-route .ff-step { display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: clamp(16px, 2vw, 26px); align-items: start; padding: clamp(20px, 2.6vw, 36px) 0; }
.ff-route .ff-step + .ff-step { background: repeating-linear-gradient(90deg, var(--gl) 0 7px, transparent 7px 15px) top / 100% 1.5px no-repeat; }
.ff-route .ff-top { padding-top: 2px; }

/* ---------- Вариант B: белый талон записи с отрывной линией ---------- */
.ff-b .head { margin-bottom: clamp(26px, 3.2vw, 42px); }
.ff-ticket { max-width: 900px; margin-inline: auto; text-align: left; color: var(--ink); filter: drop-shadow(0 40px 50px rgba(3, 18, 96, .38)); }
.ff-ticket-main, .ff-ticket-foot { background: var(--paper); }
.ff-ticket-main { border-radius: var(--r-l) var(--r-l) 20px 20px; padding: 6px clamp(18px, 2.8vw, 36px) 4px; }
.ff-ticket-foot { position: relative; border-radius: 20px 20px var(--r-l) var(--r-l); padding: clamp(20px, 2.4vw, 28px) clamp(18px, 2.8vw, 36px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px clamp(20px, 2.6vw, 34px); align-items: center; }
.ff-ticket-foot::before { content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px; background: repeating-linear-gradient(90deg, rgba(27, 86, 223, .3) 0 7px, transparent 7px 15px); }
.ff-ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0 14px; border-bottom: 1px solid var(--hair); font: 700 13px/1 var(--f-d); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ff-ticket-top b { font-weight: 700; color: var(--green-ink); }
.ff-ticket .ff-step { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; column-gap: clamp(16px, 2vw, 26px); align-items: center; padding: clamp(16px, 1.9vw, 22px) 0; }
.ff-ticket .ff-step + .ff-step { border-top: 1px solid var(--hair); }
.ff-ticket .ff-num { color: var(--blue); --on: var(--blue); --off: rgba(27, 86, 223, .2); width: 46px; font-size: 46px; padding-bottom: 10px; background-size: 100% 4px; }
.ff-fin .ff-ticket .ff-step p { margin-top: 5px; color: var(--ink-2); }
.ff-ticket .ff-tag { color: var(--blue); background: var(--cloud); box-shadow: none; }
.ff-ticket .btn { padding-inline: 30px; box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(150, 86, 0, .22), 0 2px 0 rgba(120, 66, 0, .28), 0 16px 30px -14px rgba(255, 172, 24, .8); }
.ff-ticket-g { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.ff-ticket-g .i { width: 24px; height: 24px; color: var(--green); margin-top: 1px; }
.ff-ticket-g b { color: var(--ink); }
.ff-b .ff-after { margin-top: 18px; font-size: 15px; color: rgba(255, 255, 255, .88); }

/* ---------- Вариант C: сначала кнопка, шаги на одной направляющей с крестиками ---------- */
.ff-c .head { margin-bottom: clamp(26px, 3vw, 38px); }
.ff-c .cta { margin-top: 0; }
.ff-line { position: relative; margin-top: clamp(44px, 5vw, 68px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 44px); text-align: left; }
.ff-line::before { content: ""; position: absolute; left: -100vw; right: -100vw; top: 10px; height: 1.5px; background: repeating-linear-gradient(90deg, var(--gl) 0 7px, transparent 7px 15px); }
.ff-line .ff-step { position: relative; padding-top: 44px; }
.ff-line .ff-step::before { content: ""; position: absolute; left: 0; top: 0; width: 21px; height: 21px; background: linear-gradient(#fff, #fff) center / 100% 2px no-repeat, linear-gradient(#fff, #fff) center / 2px 100% no-repeat; }
.ff-line .ff-num { width: auto; padding: 0; background: none; text-align: left; font-size: 15px; line-height: 1; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #d4ecff; margin-bottom: 12px; }
.ff-line .ff-top { justify-content: flex-start; }
.ff-c .guar { margin-top: clamp(34px, 4vw, 50px); }

/* ---------- Узкие экраны ---------- */
@media (max-width: 940px) {
  .ff-fin-a { text-align: center; }
  .ff-a { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "who" "head" "route" "cta" "guar"; }
  .ff-a .ff-who { justify-self: center; }
  .ff-a .head { text-align: center; }
  .ff-a .cta { margin-top: clamp(26px, 4vw, 38px); text-align: center; }
  .ff-a .cta .note { justify-content: center; }
  .ff-a .guar { margin-inline: auto; max-width: 660px; }
  .ff-route { text-align: left; }
}
@media (min-width: 941px) and (max-width: 1180px) {
  .ff-route .ff-top { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 860px) {
  .ff-ticket-foot { grid-template-columns: minmax(0, 1fr); }
  .ff-ticket .btn { width: 100%; }
}
@media (max-width: 760px) {
  .ff-line { grid-template-columns: minmax(0, 1fr); row-gap: 30px; padding-left: 38px; }
  .ff-line::before { left: 10px; right: auto; top: -30px; bottom: -30px; width: 1.5px; height: auto; background: repeating-linear-gradient(180deg, var(--gl) 0 7px, transparent 7px 15px); -webkit-mask: linear-gradient(180deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); mask: linear-gradient(180deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); }
  .ff-line .ff-step { padding-top: 0; }
  .ff-line .ff-step::before { left: -38px; top: -3px; }
}
@media (max-width: 640px) {
  .ff-num { width: 42px; font-size: 42px; padding-bottom: 10px; background-size: 100% 4px; }
  .ff-route { padding-inline: 18px; }
  .ff-route .ff-top { flex-direction: column; align-items: flex-start; }
  .ff-route .ff-step { grid-template-columns: 42px minmax(0, 1fr); column-gap: 16px; padding: 20px 0; }
  .ff-ticket .ff-step { grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; align-items: start; }
  .ff-ticket .btn { padding-inline: 8px; font-size: 16px; }
  .ff-ticket .ff-num { width: 38px; font-size: 38px; }
  .ff-ticket .ff-tag { grid-column: 2; justify-self: start; margin-top: 10px; }
  .ff-fin .ff-who .face { width: 52px; height: 52px; }
}

/* 15.11, правка Артема: в финале настоящее фото Миши (вырезка из misha-hse.jpg, фон размыт), крупнее и с кольцом, как на портрете в блоке «О Мише» */
.ff-fin .ff-who { gap: 18px; }
.ff-fin .ff-who .face {
  width: 84px; height: 84px; border: 3px solid #fff; object-position: 50% 50%;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .14), 0 0 0 8px rgba(255, 255, 255, .22), 0 22px 40px -16px rgba(3, 18, 96, .85);
}
.ff-fin .ff-who b { font-size: 21px; }
.ff-fin .ff-who span { font-size: 15.5px; }
@media (max-width: 640px) {
  .ff-fin .ff-who { gap: 14px; }
  .ff-fin .ff-who .face { width: 68px; height: 68px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .14), 0 0 0 6px rgba(255, 255, 255, .22), 0 18px 32px -14px rgba(3, 18, 96, .85); }
  .ff-fin .ff-who b { font-size: 19px; }
}

/* ---------- Вопросы: карточки отделены от светлого фона (синяя кромка, тень, знак на голубой подложке) ---------- */
.faq details, .ff-js .faq details[open]:not(.ff-open) { box-shadow: 0 0 0 1.5px rgba(27, 86, 223, .16), 0 2px 4px rgba(20, 60, 160, .05), 0 22px 40px -26px rgba(20, 60, 160, .5); }
.faq details { transition: box-shadow .3s, transform .3s var(--ease); }
.faq details[open], .ff-js .faq details.ff-open { box-shadow: 0 0 0 2px rgba(27, 86, 223, .5), 0 30px 56px -30px rgba(20, 60, 160, .6); }
.faq .pm, .faq details[open] .pm { width: 40px; height: 40px; border-radius: 50%; background: #e4edff; display: grid; place-items: center; flex: none; }
.faq .pm .i { width: 22px; height: 22px; stroke-width: 2.3; }
.faq details[open] .pm, .ff-js .faq details.ff-open .pm { background: var(--blue); color: #fff; }
.ff-js .faq details[open]:not(.ff-open) .pm { background: #e4edff; color: var(--blue); }
@media (hover: hover) {
  .faq details:not([open]):hover { transform: translateY(-2px); box-shadow: 0 0 0 1.5px rgba(27, 86, 223, .38), 0 26px 44px -24px rgba(20, 60, 160, .6); }
  .faq summary:hover .pm { background: var(--blue); color: #fff; }
}
.notfit.sheet { box-shadow: 0 0 0 1.5px rgba(27, 86, 223, .16), 0 22px 40px -26px rgba(20, 60, 160, .5); }
