/* Блок «01 — Тарифы»: слева выбор и цена, справа параметры тарифа с допами. Логика в plans.js */
.ly { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-5); align-items: start; }

/* ===== слева: выбор и цена ===== */
.ly-ctl { position: sticky; top: 110px; display: grid; gap: var(--s-3); }
.seg { position: relative; display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); justify-self: start; margin-top: 14px; }
.seg button { position: relative; border: 0; background: none; padding: 9px 18px; border-radius: var(--r-pill); color: var(--soft); font-size: var(--fs-small); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--text); color: #0b0b0c; }
/* метка над Стандартом */
.seg .tag { position: absolute; left: 50%; bottom: calc(100% + 1px); transform: translateX(-50%); white-space: nowrap;
  background: var(--accent); color: #0b0b0c; font: 500 10px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: var(--r-pill); }

.ly-price { font: 500 var(--fs-h2)/1 var(--sans); letter-spacing: var(--tr-h2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ly-price i { font-style: normal; font-size: .35em; letter-spacing: 0; color: var(--muted); }
.ly-base { color: var(--muted); margin-top: 10px; min-height: 1.2em; }
.ly-base b { color: var(--accent); font-weight: 400; }
.ly-say { color: var(--soft); font-size: var(--fs-lead); max-width: 380px; min-height: 3.1em; }
.ly-all { color: var(--muted); font-size: var(--fs-small); max-width: 380px; }

/* подсказка: Старт с допами догнал Стандарт */
.nudge { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: 12px 12px 12px var(--s-2);
  border-radius: var(--r-m); background: var(--surface); box-shadow: inset 2px 0 0 var(--accent); color: var(--soft); font-size: var(--fs-small); max-width: 440px; }
.nudge b { color: var(--text); font-weight: 400; }
.nudge[hidden] { display: none; }

/* ===== справа: карточка параметров ===== */
.pp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--s-1) var(--s-3) var(--s-3);
  transition: box-shadow var(--t-slow); }
.pp.is-hit { box-shadow: inset 0 2px 0 var(--accent); }
.pp__h { display: flex; justify-content: space-between; padding: var(--s-2) 0 12px; color: var(--muted); }
.pp__h b { color: var(--text); font-weight: 400; }

.row { display: grid; grid-template-columns: 170px 1fr auto; gap: var(--s-2); align-items: center; min-height: 52px; padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--fs-small); }
.row__k { position: relative; color: var(--muted); }
.row__v { color: var(--text); }
.row__v.flash { animation: pp-flash .9s var(--ease); }
@keyframes pp-flash { 0% { color: var(--accent); } 100% { color: var(--text); } }
.row.is-none .row__v { color: var(--dim); }
.row.is-note .row__v { color: var(--muted); }
.row.is-added .row__v::after { content: ' · доп'; color: var(--muted); font-family: var(--mono); font-size: var(--fs-label); }

/* пояснение к пункту: «что такое блок». Всплывает поверх, страница не сдвигается */
.qm { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: help;
  text-decoration: underline dotted rgba(255,255,255,.35); text-underline-offset: 4px; }
.qm:hover, .qm[aria-expanded="true"] { color: var(--text); }
.tip { position: absolute; left: 0; top: calc(100% + 10px); z-index: 4; width: 280px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--soft); font-size: 13px; line-height: 1.45;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity var(--t-fast), transform var(--t-fast); }
.tip.is-on { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: hover) { .row__k:hover .tip { opacity: 1; transform: none; } }

/* кнопка допа прямо в строке: пунктир «пустое место», после нажатия — заполнено */
.add { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer;
  padding: 6px 12px; border-radius: var(--r-pill); border: 1px dashed rgba(255,255,255,.22); background: none;
  color: var(--soft); font: 400 var(--fs-label)/1 var(--mono); letter-spacing: .02em;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), transform var(--t-base) var(--ease); }
.add:hover { border-color: var(--accent); color: var(--text); }
.add:active { transform: scale(.95); }
.add::before { content: '+'; color: var(--accent); font-size: 14px; }
.add[aria-pressed="true"] { border-style: solid; border-color: var(--accent); background: rgba(255,90,31,.12); color: var(--text); }
.add[aria-pressed="true"]::before { content: '✓'; font-size: 12px; }

/* счётчик для допов, которые можно взять несколько раз (круги правок, недели ответов) */
.stp { display: inline-flex; align-items: center; border: 1px solid var(--accent); background: rgba(255,90,31,.12); border-radius: var(--r-pill);
  font: 400 var(--fs-label)/1 var(--mono); letter-spacing: .02em; white-space: nowrap; }
.stp button { width: 28px; height: 28px; border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; font-size: 14px; border-radius: var(--r-pill); }
.stp button:hover:not(:disabled) { color: var(--accent); }
.stp button:disabled { color: var(--dim); cursor: default; }
.stp b { font-weight: 400; color: var(--text); padding: 0 2px; min-width: 64px; text-align: center; }

.pp__sub { padding: var(--s-3) 0 4px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 8px; }
.pp__sub + div > .row:first-child { border-top: 0; }

/* «не нашли своё» — вместо отдельного VIP-тарифа */
.pp__more { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-2); padding: var(--s-2);
  border: 1px dashed rgba(255,255,255,.14); border-radius: var(--r-m); color: var(--soft); font-size: var(--fs-small); }
.pp__more b { color: var(--text); font-weight: 400; }
.pp__more .btn { white-space: nowrap; }

/* ===== телефон: цена липнет к низу экрана, пока видна карточка ===== */
.pbar { position: fixed; left: 50%; bottom: 12px; z-index: 40; width: calc(100% - 24px);
  display: none; align-items: center; justify-content: space-between; gap: var(--s-2);
  padding: 8px 8px 8px 18px; border-radius: var(--r-pill); background: rgba(20,20,22,.6); border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  transform: translate(-50%, 140%); transition: transform var(--t-slow) var(--ease); }
.pbar.is-on { transform: translate(-50%, 0); }
.pbar__t { display: grid; line-height: 1.15; }
.pbar__t small { color: var(--muted); font: 400 var(--fs-label)/1.3 var(--mono); letter-spacing: .02em; }
.pbar__t span { font: 500 20px/1.1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pbar__t i { font-style: normal; font-size: .6em; color: var(--muted); letter-spacing: 0; }

/* лента тарифов и кнопка «Добавить допы» есть только на телефоне */
.pstrip, .padd { display: none; }

@media (max-width: 960px) {
  .ly { grid-template-columns: 1fr; gap: var(--s-4); }
  .ly-ctl { position: static; }
  .pbar { display: flex; }

  /* горизонтальная лента карточек: видно край соседней, листается свайпом */
  .pstrip { display: flex; gap: var(--s-2); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
    margin-inline: calc(var(--pad, 24px) * -1); padding: 6px 12%; scroll-padding-inline: 12%; }
  .pstrip::-webkit-scrollbar { display: none; }
  .pstrip:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-l); }
  .pc { flex: 0 0 76%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; gap: 6px; align-content: start; padding: var(--s-2) var(--s-3) var(--s-3);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); cursor: pointer; opacity: .55;
    transition: opacity var(--t-base), box-shadow var(--t-slow); }
  .pc.is-on { opacity: 1; border-color: rgba(255,255,255,.22); }
  .pc[data-k="1"].is-on { box-shadow: inset 0 2px 0 var(--accent); }
  .pc__n { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--soft); min-height: 20px; }
  .pc__tag { background: var(--accent); color: #0b0b0c; font: 500 10px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: var(--r-pill); }
  .pc__p { font: 500 var(--fs-h2)/1 var(--sans); letter-spacing: var(--tr-h2); font-variant-numeric: tabular-nums; margin-top: 4px; }
  .pc__p i { font-style: normal; font-size: .35em; letter-spacing: 0; color: var(--muted); }
  .pc__t { color: var(--muted); }
  .pc ul { list-style: none; margin: var(--s-1) 0 0; padding: 0; font-size: var(--fs-small); }
  .pc li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); text-align: right; }
  .pc li span { color: var(--muted); text-align: left; }

  /* под лентой: итог, главная кнопка, допы под раскрытием */
  .seg { display: none; }
  .ly-ctl { gap: var(--s-2); }
  .ly-price, .ly-say, .ly-all { display: none; }
  .ly-base { margin-top: 0; text-align: center; }
  .ly-sum:has(.ly-base.is-time) { display: none; }
  /* кнопки допов: зона нажатия ≥ 44px, вид прежний */
  .add, .stp button { position: relative; }
  .add::after, .stp button::after { content: ""; position: absolute; inset: -8px -4px; }
  .ly-ctl .btn:not(.btn--sm) { width: 100%; justify-content: center; }
  .padd { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; border: 1px dashed rgba(255,255,255,.22); border-radius: var(--r-pill);
    background: none; color: var(--soft); font-size: var(--fs-small); cursor: pointer; }
  .padd i { font-style: normal; color: var(--accent); font-size: 18px; transition: transform var(--t-base) var(--ease); }
  .padd[aria-expanded="true"] i { transform: rotate(45deg); }
  .ly:not(.is-open) .pp { display: none; }
  .pp__h, .pp__sub, .row:not(.row--add), .row.no-add { display: none; }
  .pp__sub + div > .row:first-child { border-top: 1px solid var(--line); }
  .pp > #rows + .pp__sub + #extra .row:first-child { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .pp { padding: 4px var(--s-2) var(--s-2); }
  .row { grid-template-columns: 1fr auto; gap: 2px 12px; }
  .row__k { grid-column: 1 / -1; font-size: 13px; }
  .pp__more { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .pbar, .tip, .add, .pp { transition: none; }
  .row__v.flash { animation: none; }
}
