/* Сайт proxy365.ru: главная и блог. Тот же фирменный язык, что в боте и Mini App:
   тёмно-синий, шрифт Golos Text и «пропуск» с перфорацией — для призывов к действию. */

@font-face { font-family: Golos; src: url(/fonts/GolosText-Medium.ttf) format('truetype'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: Golos; src: url(/fonts/GolosText-Bold.ttf) format('truetype'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: Golos; src: url(/fonts/GolosText-ExtraBold.ttf) format('truetype'); font-weight: 800 900; font-display: swap; }

:root {
  --ink: #15357f;
  --ink-deep: #0c2257;
  --sky: #7cc4ff;
  --paper: #ffffff;
  --bg: #f3f6fc;
  --stub: #eef3ff;
  --text: #0f1e3d;
  --muted: #5e6b88;
  --line: #dce3f1;
  --ok: #1f9a4f;
  --link: #1f4bb0;
  /* Шкала доверия сайтов — зелёная: этот цвет и читается как «надёжно». */
  --trust: #1f9a4f;
  --trust-track: #d8f0e0;
  --font: Golos, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151b27;
    --bg: #0d121b;
    --stub: #1c2433;
    --text: #e9eef7;
    --muted: #9aa6bd;
    --line: #263046;
    --link: #8cc8ff;
    --ok: #3fc277;
    --trust: #2fae5e;
    --trust-track: #1c3326;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 17px/1.6 var(--font);
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }
/* Узкая колонка внутри широкой страницы — по левому краю, как остальные секции. */
.measure { max-width: 760px; }

/* ---------- шапка ---------- */
.top { background: var(--ink); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.brand svg { flex: none; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: #fff; text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--sky); }
.nav a.btn-light, .nav a.btn-light:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  font: 700 17px/1 var(--font); text-decoration: none; cursor: pointer; border: 0;
}
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--sky); }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--sky); color: var(--sky); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-deep); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* ---------- главная: первый экран ---------- */
.hero { background: var(--ink); color: #fff; padding-bottom: 72px; overflow-x: clip; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; padding-top: 40px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 18px; text-wrap: balance; }
.hero p.lead { font-size: 20px; color: #d6e4ff; margin: 0 0 28px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.promo { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 22px; padding: 10px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); color: #fff; text-decoration: none; font-weight: 600; }
.promo:hover { background: rgba(255, 255, 255, 0.16); }
.promo s { opacity: 0.6; }
.promo-cta { margin-left: 4px; color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--sky); font-size: 16px; }
.facts li::before { content: '✓ '; font-weight: 800; }

/* ---------- «пропуск» ---------- */
.ticket { background: var(--paper); color: var(--text); border-radius: 28px; position: relative; box-shadow: 10px 22px 0 var(--ink-deep); }
.hero .ticket { transform: rotate(-2.5deg); max-width: 420px; justify-self: end; width: 100%; }
.ticket-main { padding: 30px 32px 26px; }
.ticket-stub { padding: 24px 32px 28px; background: var(--stub); border-radius: 0 0 28px 28px; border-top: 3px dashed var(--line); position: relative; }
.ticket-stub::before, .ticket-stub::after { content: ''; position: absolute; top: -18px; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); }
.ticket-stub::before { left: -17px; }
.ticket-stub::after { right: -17px; }
.ticket h3 { font-size: 30px; line-height: 1.1; margin: 0 0 4px; letter-spacing: -0.02em; }
.ticket .muted { color: var(--muted); margin: 0; }
.ticket .ip { font-weight: 700; font-size: 20px; margin: 18px 0 2px; font-variant-numeric: tabular-nums; }
.price { display: flex; align-items: baseline; gap: 8px; font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -0.03em; }
.price small { font-size: 18px; color: var(--muted); font-weight: 600; letter-spacing: 0; }

/* Пропуск-призыв в конце статьи и на главной — на светлом фоне вырезы цвета страницы. */
.cta { margin: 48px 0; }
.cta .ticket { box-shadow: 8px 16px 0 var(--line); }
.cta .ticket-stub::before, .cta .ticket-stub::after { background: var(--bg); }
.cta h3 { font-size: 26px; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- секции главной ---------- */
section.block { padding-block: 64px 8px; }
section.block > .wrap > h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 8px; }
section.block > .wrap > p.sub { color: var(--muted); margin: 0 0 28px; }

.types { background: var(--paper); border-radius: 24px; border: 1px solid var(--line); overflow: hidden; }
.type { display: grid; grid-template-columns: minmax(0, 1fr) 150px 140px; gap: 16px; align-items: center; padding: 20px 24px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.type:first-child { border-top: 0; }
.type:hover { background: var(--stub); }
.type b { display: block; font-size: 20px; letter-spacing: -0.01em; }
.type span.d { color: var(--muted); font-size: 15px; }
.meter { display: flex; gap: 5px; align-items: flex-end; }
.meter i { display: block; width: 16px; border-radius: 3px; background: var(--trust-track); }
.meter i.on { background: var(--trust); }
.meter-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.from { text-align: right; font-weight: 800; font-size: 22px; white-space: nowrap; }
.from small { font-weight: 600; color: var(--muted); font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 24px; counter-increment: s; }
.steps li::before { content: counter(s); display: block; font-size: 44px; font-weight: 800; color: var(--ink); line-height: 1; margin-bottom: 12px; }
.steps b { display: block; font-size: 20px; margin-bottom: 4px; }
.steps span { color: var(--muted); }

.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.post { display: flex; flex-direction: column; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 22px; color: inherit; text-decoration: none; }
.post:hover { border-color: var(--ink); }
.post b { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.post span { color: var(--muted); font-size: 15px; }
.tag { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--stub); border-radius: 999px; padding: 3px 10px; }

.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--muted); font-weight: 800; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* ---------- статья ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); }
article header h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.08; letter-spacing: -0.03em; margin: 12px 0 14px; text-wrap: balance; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 15px; align-items: center; }
.article-main > header { margin-bottom: 28px; }
/* Страница статьи — той же ширины, что и блог: текст удобной колонкой, справа оглавление с прогрессом. */
.article-main { max-width: 760px; min-width: 0; }
.article-side { display: none; padding-top: 112px; }
@media (min-width: 1000px) {
  .article-layout.has-side { display: grid; grid-template-columns: minmax(0, 720px) 280px; justify-content: space-between; gap: 48px; }
  .article-layout.has-side .toc { display: none; }
  .article-side { display: block; }
}
.toc-side { position: sticky; top: 32px; }
.toc-side b { display: block; font-size: 15px; margin-bottom: 12px; }
.toc-track { position: relative; padding-left: 22px; }
.toc-track::before, .toc-fill { content: ''; position: absolute; left: 4px; top: 0; width: 3px; border-radius: 2px; }
.toc-track::before { bottom: 0; background: var(--line); }
.toc-fill { display: block; height: 0; background: var(--link); }
.toc-side ol { list-style: none; margin: 0; padding: 0; }
.toc-side li { margin: 0; }
.toc-side a { position: relative; display: block; padding: 7px 0; font-size: 15px; line-height: 1.35; color: var(--muted); text-decoration: none; }
.toc-side a::before { content: ''; position: absolute; left: -22px; top: calc(50% - 5.5px); width: 11px; height: 11px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2.5px var(--line); }
.toc-side a.done { color: var(--text); }
.toc-side a.done::before { background: var(--link); box-shadow: none; }
.toc-side a.current { color: var(--text); font-weight: 700; }
.toc-side a.current::before { background: var(--bg); box-shadow: inset 0 0 0 3px var(--link); }
.toc-side a:hover { color: var(--link); }
.toc-left { color: var(--muted); font-size: 14px; margin: 16px 0 0; }

/* На телефоне сверху — текущий раздел и полоса прочитанного; появляется, когда начался первый раздел. */
.read-now {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: 10px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px));
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: var(--paper); border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: translateY(-110%); pointer-events: none;
}
.read-now.show { transform: none; }
.read-now i { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--link); transform: scaleX(0); transform-origin: 0 50%; }
@media (prefers-reduced-motion: no-preference) { .read-now { transition: transform 0.2s ease; } }
@media (min-width: 1000px) { .read-now { display: none; } }

.toc { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin: 28px 0 8px; }
.toc b { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; }
.prose { font-size: 18px; line-height: 1.7; }
.prose h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; margin: 48px 0 12px; scroll-margin-top: 20px; }
.faq-title { scroll-margin-top: 20px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.prose h3 { font-size: 22px; line-height: 1.25; margin: 32px 0 8px; scroll-margin-top: 20px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin: 6px 0; }
.prose code { font-size: 0.9em; background: var(--stub); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; }
.prose pre { background: var(--stub); border-radius: 14px; padding: 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 4px solid var(--sky); color: var(--muted); }
.table { overflow-x: auto; margin: 0 0 18px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 700; }

.related { padding-bottom: 24px; }
.related h2 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 16px; }

/* ---------- подвал ---------- */
footer.site { margin-top: 72px; background: var(--ink-deep); color: #c9d6f2; font-size: 15px; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding-block: 32px; }
footer.site a { color: #fff; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- телефон ---------- */
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero .ticket { justify-self: start; max-width: calc(100% - 14px); transform: rotate(-1.5deg); }
  .type { grid-template-columns: minmax(0, 1fr) auto; }
  .type .trust { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .nav a.hide-sm { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .post, .type { transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s; }
}

/* ---------- заголовки страниц блога ---------- */
.page-head h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.03em; line-height: 1.08; margin: 12px 0 8px; }
.page-head p { color: var(--muted); margin: 0 0 8px; max-width: 40em; }
.group { padding-top: 36px; }
.group h2, .faq-title { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 16px; }
.faq-title { font-size: 30px; margin-top: 48px; }
.cta .btn:not(.btn-ink) { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.cta .btn:not(.btn-ink):hover { box-shadow: inset 0 0 0 2px var(--ink); }
.measure > .faq-title:first-child { margin-top: 0; }

/* ---------- звезда Telegram Stars ---------- */
.star { width: 0.82em; height: 0.82em; vertical-align: -0.08em; overflow: visible; flex: none; }
.star { filter: drop-shadow(0 1px 1.5px rgba(176, 98, 0, 0.35)); }
/* Раз в 4 секунды звезда «подмигивает»: чуть увеличивается, поворачивается, и по ней пробегает блик. */
.star { transform-origin: 50% 55%; animation: star-wink 4s ease-in-out infinite; animation-delay: var(--star-delay, 0s); }
.star .glint { animation: star-glint 4s ease-in-out infinite; animation-delay: var(--star-delay, 0s); }
@keyframes star-wink {
  0%, 66%, 100% { transform: none; }
  76% { transform: scale(1.18) rotate(-8deg); }
  86% { transform: scale(0.97) rotate(2deg); }
  94% { transform: none; }
}
@keyframes star-glint {
  0%, 68% { transform: translateX(0); }
  92%, 100% { transform: translateX(30px); }
}
@media (prefers-reduced-motion: reduce) {
  .star { animation: none; }
  .star .glint { animation: none; opacity: 0; }
}
