/* ═══════════════════════════════════════════════════════════════════
   Stars — оформление экранов: каталог и карточка материала, «Мои покупки», поддержка, кабинет, консультация.
   Цвета берутся из переменных сервиса (body.svc-*): --accent, --accent-ink, --accent-wash.
   ═══════════════════════════════════════════════════════════════════ */

/* ── общий заголовок экрана ── */
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px;margin:8px 0 18px}
.page-head h1{margin:0;font:600 clamp(26px,4.4vw,36px)/1.15 var(--display)}
.page-head p{margin:6px 0 0;color:var(--text-2);max-width:62ch}
.crumbs{font-size:13.5px;color:var(--text-3);margin:4px 0 6px}
.crumbs a{color:inherit}

/* ── фильтры каталога ── */
.filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:10px;background:var(--card);border:1px solid var(--line);
  border-radius:var(--r-lg);padding:14px;margin-bottom:18px}
.filters .field{margin:0}
@media (max-width:720px){.filters{grid-template-columns:1fr}}
.count-line{font-size:13.5px;color:var(--text-3);margin:-8px 0 14px}

/* ── карточки материалов ── */
.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.prod{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);
  overflow:hidden;box-shadow:var(--shadow);text-decoration:none;color:inherit;transition:transform .15s}
.prod:hover{transform:translateY(-2px)}
.prod-art{aspect-ratio:316/224;background:var(--accent-wash);display:block;overflow:hidden}
.prod-art img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block}
.prod-body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px;flex:1}
.prod-meta{font-size:12.5px;color:var(--text-3);text-transform:uppercase;letter-spacing:.04em}
.prod h3{margin:0;font-size:17px;line-height:1.3}
.prod p{margin:0;color:var(--text-2);font-size:14px;line-height:1.45}
.prod-foot{margin-top:auto;padding-top:10px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.price{font-weight:700;font-size:18px;color:var(--text)}
.price small{display:block;font-weight:500;font-size:12px;color:var(--text-3)}
.price.free{color:var(--ok)}
.tag{display:inline-block;font-size:12px;font-weight:700;border-radius:999px;padding:3px 9px;background:var(--accent-wash);color:var(--accent-ink)}
.tag.ok{background:var(--ok-wash);color:var(--ok)}
.tag.warn{background:var(--warn-wash);color:var(--warn)}
.tag.bad{background:var(--bad-wash);color:var(--bad)}

/* ── карточка материала ── */
.product{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:22px;align-items:start}
@media (max-width:860px){.product{grid-template-columns:1fr}}
.product-top{display:grid;grid-template-columns:190px minmax(0,1fr);gap:20px;align-items:start;margin-bottom:6px}
@media (max-width:560px){.product-top{grid-template-columns:110px minmax(0,1fr);gap:14px}}
.product-cover{border-radius:12px;overflow:hidden;border:1px solid var(--line);background:var(--accent-wash);box-shadow:var(--shadow)}
.product-cover img{display:block;width:100%;height:auto}
.product h1{margin:4px 0 6px;font:600 clamp(22px,3.6vw,32px)/1.18 var(--display)}
.product .sub{color:var(--text-2);margin:0 0 10px;font-size:17px}
.buy{position:sticky;top:calc(var(--head-h) + 12px);background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:18px;box-shadow:var(--shadow)}
@media (max-width:860px){.buy{position:static}}
.buy .price{font-size:28px;display:block;margin-bottom:4px}
.buy .kv{margin:12px 0}
.buy .legal{font-size:12.5px;color:var(--text-3);line-height:1.5;margin-top:12px}

/* ── мои покупки и платежи ── */
.purchase{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:14px 0;border-bottom:1px solid var(--line)}
.purchase:last-child{border-bottom:0}
.purchase .what{flex:1;min-width:220px}
.purchase .what b{display:block;font-size:15.5px}
.purchase .what em{display:block;font-style:normal;font-size:13px;color:var(--text-3)}
.purchase .acts{display:flex;flex-wrap:wrap;gap:8px}
.pay-state{display:flex;gap:12px;align-items:center;padding:14px 16px;border-radius:var(--r);background:var(--accent-wash);margin-bottom:16px}
.pay-state.ok{background:var(--ok-wash)}
.pay-state.bad{background:var(--bad-wash)}

/* ── поддержка ── */
.ticket{border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;margin:10px 0;background:var(--card)}
.ticket header{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;justify-content:space-between}
.ticket header b{font-size:15px}
.ticket p{margin:6px 0 0;white-space:pre-wrap}
.ticket .answer{margin-top:10px;padding:10px 12px;border-radius:12px;background:var(--ok-wash)}
.topics{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 10px}

/* ── кабинет ── */
.cab-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px;align-items:start}
.cab-grid .card{margin:0}
.codes{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin:10px 0}
.codes div{background:var(--accent-wash);border-radius:12px;padding:8px 10px}
.codes small{display:block;font-size:12px;color:var(--text-3)}
.codes b{font-family:var(--mono);font-size:15px}
.sess{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px}
.sess:last-child{border-bottom:0}
.notif{padding:10px 0;border-bottom:1px solid var(--line)}
.notif.new b::before{content:"● ";color:var(--accent)}
.notif em{display:block;font-style:normal;font-size:12.5px;color:var(--text-3)}
.danger-zone{border-color:#F3C3BE}

/* ── консультация ── */
.steps-h{counter-reset:s;list-style:none;padding:0;margin:12px 0;display:grid;gap:10px}
.steps-h li{counter-increment:s;padding:10px 12px 10px 48px;position:relative;background:var(--card);border:1px solid var(--line);border-radius:var(--r)}
.steps-h li::before{content:counter(s);position:absolute;left:12px;top:10px;width:26px;height:26px;border-radius:50%;
  background:var(--accent);color:#fff;font-weight:700;display:grid;place-items:center;font-size:14px}

/* ── оформление заказа ── */
.checkout-sum{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:12px 14px;border-radius:var(--r);
  background:var(--accent-wash)}
.checkout-sum b{font-size:16px}
.checkout-sum .price{font-size:22px;white-space:nowrap}
.check{display:flex;gap:10px;align-items:flex-start;margin:12px 0 0;font-size:14px;line-height:1.45;cursor:pointer}
.check input{width:20px;height:20px;flex:0 0 auto;margin-top:1px;accent-color:var(--accent)}
.check.bad span{color:var(--bad)}
.err-line{font-size:13px;color:var(--bad);font-weight:600;margin-top:4px}
.spin.sm{width:20px;height:20px;margin:0;border-width:2px;flex:0 0 auto}

/* ── кабинет: номера, уведомления ── */
.codes .code{display:block;text-align:left;border:0;cursor:pointer;background:var(--accent-wash);border-radius:12px;padding:8px 10px;color:inherit}
.codes .code:hover{filter:brightness(.97)}
.notif-list{max-height:420px;overflow:auto}
.notif p{margin:4px 0 0;color:var(--text-2)}
.small-b{font:600 16px/1.3 var(--font)!important}
ul.ticks.plain,ul.ticks{list-style:none;padding:0;margin:8px 0}
ul.ticks li{padding:6px 0 6px 28px;position:relative;border-bottom:1px dashed var(--line)}
ul.ticks li:last-child{border-bottom:0}
ul.ticks li::before{content:"✓";position:absolute;left:4px;color:var(--ok);font-weight:700}

/* ── частые вопросы ── */
details.faq{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:0 14px;margin:8px 0}
details.faq summary{cursor:pointer;padding:12px 0;font-weight:600;list-style:none}
details.faq summary::-webkit-details-marker{display:none}
details.faq summary::after{content:"+";float:right;color:var(--text-3);font-weight:400}
details.faq[open] summary::after{content:"−"}
details.faq p{margin:0 0 12px;color:var(--text-2)}

/* ── плитки разделов ── */
.tile{display:flex;flex-direction:column;gap:4px;text-decoration:none;color:inherit}
.tile b{font-size:17px}
.tile span{color:var(--text-3);font-size:14px}
.tile:hover{border-color:var(--accent)}
