/* NAUTEX · выдвижные окна: состав пакета, корзина, вопросы, кейсы, пояснения, сравнение */
/* ---------- Окно с составом пакета ---------- */
html:has(.sheet[open]) { overflow: hidden; }
.sheet {
  width: 100%; max-width: 480px; max-height: 88dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 26px 26px 0 0; background: var(--bg); color: var(--text);
  box-shadow: 0 -12px 40px rgba(0,0,0,.28);
}
.sheet[open] { animation: sheet-up .28s cubic-bezier(.2,.8,.2,1); }
.sheet::backdrop { background: rgba(8,16,24,.55); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-in { max-height: 88dvh; overflow-y: auto; padding: 10px 20px calc(22px + env(safe-area-inset-bottom, 0px)); }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--sd); margin: 0 auto 12px; }
.sheet-head { display: grid; grid-template-columns: 1fr 44px; gap: 12px; align-items: start; }
.sheet-head h3 { font: 600 20px/1.25 "Golos Text", system-ui, sans-serif; }
.sheet-head .t-price { margin-top: 6px; }
.sheet h4 { margin-top: 20px; font-size: 15px; font-weight: 600; }
.sheet p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.sheet .btn { width: 100%; margin-top: 24px; }
.sheet .ph-btn { margin-top: 10px; }
.me { display: flex; align-items: center; gap: 14px; }
.me-ava {
  flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: var(--blue-text); box-shadow: var(--shadow-small);
  font: 600 22px/1 "Geologica", "Golos Text", sans-serif;
}
.sheet .me-sub { margin-top: 2px; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 14px; }
.me-stats div { padding: 14px 6px; border-radius: 16px; background: var(--plate-grad); box-shadow: var(--plate-raise); text-align: center; }
.me-stats b { display: block; font: 700 19px/1.2 "Geologica", "Golos Text", sans-serif; color: var(--num); }
.me-stats span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.3; color: var(--plate-muted); }


/* ---------- Корзина ---------- */
.cart-item { margin-top: 16px; padding: 16px; border-radius: 18px; box-shadow: var(--shadow-inset); }
.cart-item h4 { margin: 0; font-size: 17px; }
.cart-item .t-price { margin-top: 8px; }
.cart-item .t-term { margin-top: 4px; }
.sheet .cart-note { margin-top: 14px; }
.cart-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; margin-top: 20px; }
.sheet .cart-row .btn { margin-top: 0; }

/* ---------- Вопросы ---------- */
.faq { display: grid; gap: 12px; margin-top: 16px; }
.faq details { border-radius: 16px; box-shadow: var(--shadow-small); }
.faq details[open] { box-shadow: var(--shadow-inset); }
.faq details[open] summary { padding-bottom: 6px; }
.faq summary {
  display: block; box-sizing: border-box; list-style: none; position: relative; min-height: 52px; padding: 14px 48px 14px 16px; cursor: pointer;
  font-size: 15px; font-weight: 600; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 22px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 16px; }
.sheet .faq p { margin: 0; padding: 0 16px 14px; }

/* ---------- Кейсы: сетка 2 колонки, обложка + название ---------- */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.case {
  display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: pointer;
  text-align: left; text-decoration: none; font: inherit; color: inherit; background: var(--bg); box-shadow: var(--shadow-small);
}
.case:active { transform: scale(.98); }
.case:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.case-th { aspect-ratio: 5 / 4; background: linear-gradient(160deg, var(--a), var(--b)); }
.case-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.case-tx { padding: 10px 12px 12px; }
.case-tx b { display: block; font-size: 15px; line-height: 1.3; }
.case-tx span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--muted); }


/* ---------- Маленькие окна-пояснения ---------- */
html:has(.tip[open]) { overflow: hidden; }
.tip {
  width: calc(100% - 32px); max-width: 400px; max-height: 82dvh; margin: auto; padding: 0; border: 0; border-radius: 24px;
  background: var(--bg); color: var(--text); box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.tip[open] { animation: tip-in .2s cubic-bezier(.2,.8,.2,1); }
@keyframes tip-in { from { opacity: 0; transform: scale(.95); } }
.tip::backdrop { background: rgba(8,16,24,.55); }
.tip-in { max-height: 82dvh; overflow-y: auto; padding: 18px 20px 20px; }
.tip .sheet-head h3 { font: 600 18px/1.3 "Golos Text", system-ui, sans-serif; padding-top: 10px; }
.tip p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.tip p b { color: var(--text); }
.tip h4 { margin-top: 16px; font-size: 14px; font-weight: 600; }
.tip .btn { width: 100%; margin-top: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.two div { padding: 12px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--sd); }
.two h4 { margin: 0; font-size: 13px; }
.two .ticks { margin-top: 8px; gap: 6px; font-size: 13px; line-height: 1.35; }
.two .ticks li { grid-template-columns: 14px 1fr; gap: 6px; }
.two .ticks li::before { width: 14px; height: 14px; margin-top: 2px; background-size: 9px; }
.two .ticks.no li::before { background-size: 6px 2px; }

/* ---------- Окно «Подробнее» ---------- */
.plq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.plq div { padding: 10px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--sd); }
.plq span { display: block; font-size: 12px; line-height: 1.3; color: var(--muted); }
.plq b { display: block; margin-top: 2px; font-size: 14px; line-height: 1.25; }
.gets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.get { padding: 14px 12px; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--sd); }
.get .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--blue); color: var(--blue-text); }
.get b { display: block; margin-top: 10px; font-size: 14px; line-height: 1.3; }
.sheet .get p { margin-top: 2px; font-size: 12px; line-height: 1.4; }
.sheet .steps { margin-top: 12px; }
.checks { list-style: none; padding: 0; margin-top: 10px; display: grid; gap: 8px; font-size: 15px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.checks li::before {
  content: "✓"; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--blue); color: var(--blue-text);
}
.more { margin-top: 16px; border-radius: 16px; box-shadow: var(--shadow-small); }
.more[open] { box-shadow: var(--shadow-inset); }
.more > summary {
  display: block; box-sizing: border-box; list-style: none; position: relative; min-height: 50px; padding: 14px 48px 14px 16px; cursor: pointer;
  font-size: 15px; font-weight: 600; line-height: 1.35;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: "+"; position: absolute; right: 18px; top: 11px; font-size: 22px; font-weight: 400; color: var(--muted); }
.more[open] > summary::after { content: "–"; }
.more[open] > summary { padding-bottom: 6px; }
.more > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 16px; }
.more.no > summary { color: var(--muted); }
.more > .ticks { margin: 0; padding: 0 16px 14px; font-size: 14px; gap: 10px; }
.sheet .more p { margin: 0; padding: 0 16px 14px; }
.sheet-foot {
  position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom, 0px)); z-index: 1;
  margin: 20px -20px calc(-22px - env(safe-area-inset-bottom, 0px));
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--bg);
  box-shadow: 0 -12px 18px -14px var(--sd);
}
.sheet .sheet-foot .btn { margin-top: 0; }

/* ---------- Сравнение пакетов ---------- */
/* Сравнение: окно почти на весь экран. Таблица без рамки и плашек: строки на фоне окна, разделены тонкими линиями */
#cmp, #cmp .sheet-in { max-height: 95dvh; }
#cmp .sheet-in { padding-left: 12px; padding-right: 12px; }
.cmp-wrap { margin-top: 0; }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; line-height: 1.3; }
.cmp th, .cmp td { padding: 9px 2px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--sd); }
.cmp td { font-size: 11.5px; letter-spacing: -0.01em; }
.cmp tbody tr:last-child td, .cmp tbody tr:last-child th { border-bottom: 0; }
.cmp th:first-child { position: sticky; left: 0; z-index: 1; width: 100px; padding-left: 4px; text-align: left; font-weight: 500; background: var(--bg); }
.cmp thead th { padding: 0 1px 6px; border-bottom: 1.5px solid var(--text); }
/* Шапка с ценами остаётся на месте при прокрутке таблицы */
.cmp thead th, .cmp thead th:first-child, .cmp thead th:nth-child(5) { position: sticky; top: -10px; z-index: 2; }
.cmp thead th { padding-top: 14px; background: var(--bg); }
.cmp thead th:nth-child(5) { background: linear-gradient(var(--hl-tint), var(--hl-tint)), var(--bg); }
/* Цена в шапке: крупное число, под ним «т.р.». Вся ячейка нажимается */
.cmp-p {
  width: 100%; min-height: 48px; padding: 4px 0; border: 0; border-radius: 10px; cursor: pointer;
  display: grid; justify-items: center; align-content: center; gap: 1px;
  color: var(--text); background: transparent; transition: background-color .14s ease-out;
}
.cmp-p b { font: 600 18px/1 "Geologica", "Golos Text", sans-serif; letter-spacing: -0.03em; }
.cmp-p span { font-size: 11px; line-height: 1.2; color: var(--muted); }
.cmp-p:active { background: var(--sd); }
.cmp-p:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.cmp .y { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.cmp .n { color: var(--muted); }
.cmp-hint { margin-top: 4px; }
/* Выделенный столбец «69 т.р.» (5-я ячейка в строке): рамка + лёгкая выпуклость */
.cmp tr > :nth-child(5) {
  position: relative; background: var(--hl-tint);
  box-shadow: inset 2px 0 0 var(--hl), inset -2px 0 0 var(--hl), 5px 0 9px -6px var(--sd), -5px 0 9px -6px var(--sd);
}
.cmp thead th:nth-child(5) {
  border-radius: 14px 14px 0 0;
  box-shadow: inset 2px 0 0 var(--hl), inset -2px 0 0 var(--hl), inset 0 2px 0 var(--hl), 5px -4px 10px -6px var(--sd), -5px -4px 10px -6px var(--sd);
}
.cmp tbody tr:last-child > :nth-child(5) {
  border-radius: 0 0 14px 14px;
  box-shadow: inset 2px 0 0 var(--hl), inset -2px 0 0 var(--hl), inset 0 -2px 0 var(--hl), 5px 5px 10px -5px var(--sd), -5px 5px 10px -5px var(--sd);
}
.cmp thead th:nth-child(5) .cmp-p b { color: var(--hl); }

/* ---------- Шаги без кнопки «i» (окна «Пульт» и «Партнёрам») ---------- */
.lad.lad-flat li { grid-template-columns: 32px minmax(0, 1fr); }
.lad-flat .lad-tx { font-weight: 500; }
.pt-ex { margin-top: 16px; padding: 14px; border-radius: 16px; box-shadow: var(--shadow-inset); font-size: 14px; }
.pt-ex b { color: var(--num); }
.pt-done { margin-top: 20px; }
.pt-qr { display: block; width: 232px; max-width: 100%; height: auto; margin: 16px auto 0; border-radius: 16px; box-shadow: var(--shadow-small); }
.pt-code { margin-top: 14px; text-align: center; }
.pt-code b { color: var(--num); letter-spacing: .06em; }
.pt-link { margin-top: 4px; text-align: center; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.pt-acts { display: grid; gap: 10px; margin-top: 16px; }
.pt-acts .btn { width: 100%; margin-top: 0; justify-content: center; text-decoration: none; }
