:root {
  /* Сайт целиком тёмный (переключателя темы нет) — без этого браузер рисует
     нативные элементы (в первую очередь попап <select>) в своей светлой
     теме поверх наших тёмных текстов, отсюда «выцветшие» строки в списке. */
  color-scheme: dark;
  --bg: #07121b;
  --bg2: #081521;
  --bg3: #060f16;
  --card: rgba(255, 255, 255, .02);
  --card-hover: rgba(255, 255, 255, .04);
  --line: rgba(126, 160, 166, .16);
  --line-soft: rgba(126, 160, 166, .1);
  --text: #e9f3ef;
  --muted: #9fb4b4;
  --muted2: #7e939b;
  --faint: #58707a;
  --accent: #3ee0ae;
  --accent-light: #7cf0cd;
  --accent2: #35b8e0;
  --accent3: #8b7bf7;
  --warn: #f2b74e;
  --danger: #ff8a80;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Onest', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

h1, h2, h3 { font-family: 'Unbounded', sans-serif; font-weight: 600; margin: 0; }

button { font-family: inherit; }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@keyframes dg-pulse { 0%, 100% { opacity: .55; } 50% { opacity: .9; } }

/* ── Nav ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(14px);
  background: rgba(7, 18, 27, .78);
  border-bottom: 1px solid rgba(62, 224, 174, .1);
}
.nav .wrap { padding: 14px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(62, 224, 174, .25), rgba(62, 224, 174, .08));
  border: 1px solid rgba(62, 224, 174, .35);
  display: grid; place-items: center; flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14.5px; }
.nav-links a:not(.btn-nav) { color: var(--muted); }
.nav-links a:not(.btn-nav):hover { color: var(--text); }
.nav-toggle { display: none; }

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15.5px; padding: 15px 28px; border-radius: 999px;
  border: none; cursor: pointer; font-family: 'Onest', sans-serif; transition: all .15s;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06231a; box-shadow: 0 8px 28px rgba(62, 224, 174, .25); }
.btn-primary:hover { background: linear-gradient(135deg, #5aeabf, #54c8ec); color: #06231a; box-shadow: 0 10px 36px rgba(62, 224, 174, .38); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(174, 194, 192, .3); }
.btn-ghost:hover { border-color: rgba(62, 224, 174, .6); color: var(--text); }
.btn-danger { background: rgba(255, 138, 128, .12); color: var(--danger); border: 1px solid rgba(255, 138, 128, .4); }
.btn-danger:hover { background: rgba(255, 138, 128, .2); border-color: var(--danger); }
.btn-sm { padding: 10px 22px; font-size: 14px; border-radius: 999px; }
.btn-nav { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06231a; font-weight: 600; padding: 10px 22px; border-radius: 999px; }
.btn-nav:hover { background: linear-gradient(135deg, #5aeabf, #54c8ec); color: #06231a; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 600px at 78% 10%, rgba(62, 224, 174, .14), transparent 60%),
    radial-gradient(800px 520px at 26% 22%, rgba(139, 123, 247, .12), transparent 60%),
    radial-gradient(900px 500px at 12% 90%, rgba(242, 183, 78, .09), transparent 60%),
    linear-gradient(180deg, #0a1a26, #07121b);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(126, 160, 166, .14) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(700px 500px at 70% 30%, black, transparent);
  pointer-events: none;
}
.hero .wrap {
  padding: 96px 32px 110px; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 64px; align-items: center; position: relative;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(62, 224, 174, .25); background: rgba(62, 224, 174, .07);
  color: var(--accent-light); font-size: 13px; font-weight: 600; letter-spacing: .04em; margin-bottom: 26px;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: dg-pulse 2.4s infinite; flex-shrink: 0; }
.hero h1 { font-size: 46px; line-height: 1.18; margin: 0 0 24px; letter-spacing: -.01em; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent2) 55%, var(--accent3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 18px; line-height: 1.65; color: var(--muted); margin: 0 0 36px; max-width: 460px; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Phone mock */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone-glow { position: absolute; inset: -40px -20px; background: radial-gradient(340px 420px at 50% 45%, rgba(62, 224, 174, .16), transparent 70%); filter: blur(10px); }
.phone {
  position: relative; width: 300px; background: linear-gradient(160deg, #22333f, #0c161f 40%);
  border-radius: 52px; padding: 9px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(126, 160, 166, .3), inset 0 0 0 5px #05090d;
}
.phone-screen {
  position: relative; background: linear-gradient(180deg, #0e2130, #0a1823); border-radius: 44px;
  padding: 12px 16px 10px; overflow: hidden; height: 596px; display: flex; flex-direction: column;
}
.phone-status { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 10px; font-size: 13px; font-weight: 700; color: #cfe2dd; }
.phone-back { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted2); margin-bottom: 10px; }
.phone-title { font-family: 'Unbounded', sans-serif; font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.phone-sub { font-size: 12px; color: var(--muted2); margin-bottom: 14px; }
.phone-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.phone-stat { border-radius: 12px; padding: 10px; text-align: center; }
.phone-stat.ok { background: rgba(62, 224, 174, .08); border: 1px solid rgba(62, 224, 174, .3); }
.phone-stat.bad { background: rgba(255, 122, 112, .06); border: 1px solid rgba(255, 122, 112, .25); }
.phone-stat b { display: block; font-size: 20px; font-weight: 700; }
.phone-stat.ok b { color: var(--accent); }
.phone-stat.bad b { color: var(--danger); }
.phone-stat span { font-size: 11px; color: var(--muted); }
.phone-section-label { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: .08em; color: var(--muted2); margin-bottom: 8px; }
.phone-section-count { background: rgba(126, 160, 166, .15); border-radius: 999px; padding: 2px 8px; }
.phone-finding { background: rgba(255, 255, 255, .03); border: 1px solid rgba(126, 160, 166, .16); border-radius: 14px; padding: 12px; display: flex; gap: 10px; margin-bottom: 14px; }
.phone-finding-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.phone-finding-title { font-size: 13.5px; font-weight: 600; }
.phone-finding-desc { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.phone-badge { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px; }

/* ── Trust strip ─────────────────────────────────────────────────────── */

.trust {
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--bg2);
}
.trust .wrap { padding: 56px 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.trust-item { border-top: 2px solid var(--accent); padding-top: 20px; }
.trust-item:nth-child(2) { border-top-color: var(--accent2); }
.trust-item:nth-child(3) { border-top-color: var(--accent3); }
.trust-item b { display: block; font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.trust-item p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; }

/* ── Section shell ───────────────────────────────────────────────────── */

section.block { background: var(--bg); }
section.block.alt { background: var(--bg2); border-top: 1px solid var(--line-soft); }
#pricing {
  background:
    radial-gradient(1100px 600px at 78% 10%, rgba(62, 224, 174, .14), transparent 60%),
    radial-gradient(800px 520px at 26% 22%, rgba(139, 123, 247, .12), transparent 60%),
    radial-gradient(900px 500px at 12% 90%, rgba(242, 183, 78, .09), transparent 60%),
    linear-gradient(180deg, #0a1a26, #07121b);
}
section.block .wrap { padding: 110px 32px; }
.eyebrow-label { font-size: 13px; font-weight: 700; letter-spacing: .18em; color: var(--accent); margin-bottom: 16px; }
h2.section-title { font-size: 34px; margin: 0 0 18px; }
p.section-lead { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 560px; margin: 0 0 48px; }

/* ── Features grid ───────────────────────────────────────────────────── */

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px;
  transition: border-color .15s;
}
.feature-card:hover { border-color: rgba(62, 224, 174, .4); }
.feature-card.wide { grid-column: span 2; }
.feature-card.hero-feature {
  background: linear-gradient(135deg, rgba(62, 224, 174, .06), rgba(255, 255, 255, .02));
  border-color: rgba(62, 224, 174, .18);
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center;
}
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px; }
.feature-card h3 { font-size: 17px; margin-bottom: 12px; }
.feature-card p { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin: 0; }
.feature-sample { background: rgba(7, 18, 27, .7); border: 1px solid var(--line); border-radius: 14px; padding: 6px 18px; }
.feature-sample-row { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid rgba(126, 160, 166, .12); font-size: 13.5px; }
.feature-sample-row:last-child { border-bottom: none; }
.feature-sample-row span:first-child { color: #cfe2dd; }
.feature-sample-row span:last-child { color: var(--danger); font-weight: 600; }
.module-star { color: var(--accent2); font-weight: 400; }
.modules-note { margin-top: 28px; font-size: 13px; color: var(--muted2); }
.modules-note .module-star { margin-right: 2px; }

/* ── Feature comparison table ────────────────────────────────────────── */

.compare-hint { display: none; text-align: center; font-size: 13px; color: var(--muted2); margin: 18px 2px 0; }
.compare-wrap { position: relative; margin-top: 56px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.compare-table { width: 100%; min-width: 480px; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.compare-table thead th { font-family: 'Unbounded', sans-serif; font-size: 12px; letter-spacing: .06em; color: var(--muted2); font-weight: 600; text-transform: uppercase; text-align: left; }
.compare-table td:first-child { color: var(--text); }
.compare-table th:not(:first-child), .compare-table td:not(:first-child) { text-align: center; }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table td.yes { color: var(--accent); font-weight: 600; }
.compare-table td.no { color: var(--muted2); }

/* ── Faith-check section ─────────────────────────────────────────────── */
/* Портировано из макета (Цифровой страж.dc.html) буквально: там весь этот
   блок стилизован инлайново через функцию mk()/themes в компоненте, без
   единого CSS-класса. Здесь — то же самое: только структурная раскладка
   (grid) в CSS, а все цвета темы landing.js выставляет как style.cssText
   один в один со строками, которые считала mk() в макете. */

[data-faith-section] .wrap { padding: 110px 32px; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.faith-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.faith-rows { display: grid; gap: 12px; }
.faith-panel { padding-top: 64px; }

.chip {
  font-family: 'Onest', sans-serif; font-size: 14px; font-weight: 600; padding: 10px 20px;
  border-radius: 999px; cursor: pointer; transition: all .15s; background: transparent;
  border: 1px solid rgba(174, 194, 192, .3); color: var(--muted);
}
.chip.active { background: rgba(62, 224, 174, .14); border-color: var(--accent); color: var(--accent-light); box-shadow: 0 0 0 3px rgba(62, 224, 174, .14); }

/* ── How it works ────────────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; border-top: 1px solid rgba(126, 160, 166, .15); padding-top: 40px; }
.step-num { font-family: 'Unbounded', sans-serif; color: var(--accent); font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.step b { display: block; font-weight: 700; font-size: 16.5px; margin-bottom: 10px; }
.step p { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin: 0; }

/* ── Articles ─────────────────────────────────────────────────────────── */

.articles-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.article-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.article-card:hover { border-color: rgba(242, 183, 78, .45); }
.article-thumb { height: 170px; position: relative; background: var(--bg3); overflow: hidden; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; }
.article-body h3 { font-weight: 700; font-size: 16.5px; line-height: 1.4; }
.article-body p { font-size: 14px; line-height: 1.6; color: var(--muted); flex: 1; margin: 0; }
.article-body .read-more { font-size: 14px; font-weight: 600; }
.article-hero-thumb { height: 280px; border-radius: 20px; background: var(--bg3); overflow: hidden; margin-bottom: 32px; }
.article-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.empty-note { color: var(--muted); font-size: 15px; }

/* ── Pricing ─────────────────────────────────────────────────────────── */

.payment-banner { border-radius: 14px; padding: 16px 22px; font-size: 14.5px; margin: 0 0 32px; text-align: center; }
.payment-banner.ok { background: rgba(62, 224, 174, .1); border: 1px solid rgba(62, 224, 174, .35); color: var(--accent-light); }
.payment-banner.ok a { color: inherit; text-decoration: underline; }
.payment-banner.fail { background: rgba(255, 122, 112, .1); border: 1px solid rgba(255, 122, 112, .35); color: #ffb3ab; }

.price-free {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 32px; margin-bottom: 22px;
}
.price-free-name { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.price-free-note { font-size: 14px; color: var(--muted); max-width: 480px; }

.periods-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.period-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; }
.period-card.featured {
  background: linear-gradient(160deg, rgba(62, 224, 174, .15), rgba(53, 184, 224, .08) 55%, rgba(139, 123, 247, .1));
  border-color: rgba(62, 224, 174, .5); box-shadow: 0 24px 60px rgba(62, 224, 174, .12);
}
.period-badge {
  position: absolute; top: -13px; left: 26px; background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #06231a; font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 999px;
}
.period-name { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 19px; margin-bottom: 8px; }
.period-note { font-size: 13px; color: var(--muted2); min-height: 34px; margin-bottom: 20px; }
.period-rows { display: grid; gap: 8px; }
.period-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(7, 18, 27, .6); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px;
  color: var(--text); font-size: 14.5px; transition: border-color .15s, background .15s;
}
.period-row:hover { border-color: rgba(62, 224, 174, .45); background: rgba(62, 224, 174, .06); color: var(--text); }
.period-row span { color: var(--muted); white-space: nowrap; }
.period-row b { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 15px; white-space: nowrap; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq-list { display: grid; gap: 14px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.faq-q {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 20px;
  background: none; border: none; color: var(--text); font-family: 'Onest', sans-serif; font-weight: 700;
  font-size: 16px; text-align: left; padding: 22px 26px; cursor: pointer;
}
.faq-q .sym { color: var(--accent); font-size: 20px; font-weight: 400; flex-shrink: 0; }
.faq-a { padding: 0 26px 24px; font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 680px; display: none; }
.faq-item.open .faq-a { display: block; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.site-footer { background: var(--bg3); }
.footer-rule { height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent2) 35%, var(--accent3) 70%, var(--warn)); }
.footer-grid { padding: 72px 32px 0; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; margin-bottom: 18px; }
.footer-brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.footer-desc { font-size: 14px; line-height: 1.25; color: var(--muted2); max-width: 280px; }
.footer-heading { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--muted2); margin-bottom: 18px; }
.footer-links { display: grid; gap: 12px; font-size: 14.5px; }
.footer-links a { color: #aec2c0; }
.footer-links a:hover { color: var(--accent); }
.footer-contacts { display: grid; gap: 14px; font-size: 14.5px; }
.footer-hours { display: grid; gap: 4px; font-size: 13.5px; color: var(--muted2); }
.footer-note { font-size: 13.5px; color: var(--muted2); }
.footer-bottom { max-width: var(--max); margin: 40px auto 0; padding: 24px 32px; border-top: 1px solid rgba(126, 160, 166, .1); font-size: 13px; color: var(--faint); }
.payment-icons { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.payment-badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 6px; background: #fff; }
.payment-badge-text { font-weight: 700; font-size: 11.5px; color: #0a0a0a; letter-spacing: .3px; }

/* ── Banner ──────────────────────────────────────────────────────────── */

.banner {
  display: flex; align-items: center; gap: 12px; border: 1px solid rgba(62, 224, 174, .4);
  background: rgba(62, 224, 174, .05); border-radius: 14px; padding: 18px 24px; margin-bottom: 56px;
}
.banner span { color: var(--accent-light); font-weight: 600; font-size: 14.5px; }
.banner.warn { border-color: rgba(242, 183, 78, .45); background: rgba(242, 183, 78, .06); }
.banner.warn span { color: var(--warn); }

/* ── Auth pages ──────────────────────────────────────────────────────── */

.auth-main {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 600px at 78% 10%, rgba(62, 224, 174, .14), transparent 60%),
    radial-gradient(800px 520px at 26% 22%, rgba(139, 123, 247, .12), transparent 60%),
    radial-gradient(900px 500px at 12% 90%, rgba(242, 183, 78, .09), transparent 60%),
    linear-gradient(180deg, #0a1a26, #07121b);
}
.auth-main::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(126, 160, 166, .14) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(700px 500px at 70% 30%, black, transparent);
  pointer-events: none;
}
.auth-main .wrap { padding: 48px 32px 120px; position: relative; }
.auth-card {
  max-width: 440px; margin: 0 auto; background: linear-gradient(180deg, #0d1f2c, #0a1823);
  border: 1px solid var(--line); border-radius: 24px; padding: 40px 40px 44px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.auth-card h1 { font-size: 23px; margin: 0 0 14px; }
.auth-card p.lead { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 30px; }
.field-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.field-input {
  width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, .03); border: 1px solid rgba(126, 160, 166, .25);
  border-radius: 12px; padding: 15px 18px; font-size: 16px; color: var(--text); font-family: 'Onest', sans-serif; outline: none;
}
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(62, 224, 174, .15); }
.field-input option { background-color: #0d1f2c; color: var(--text); }
.field-input.code-input { font-size: 26px; letter-spacing: .5em; text-align: center; }
.phone-field {
  display: flex; align-items: stretch; background: rgba(255, 255, 255, .03); border: 1px solid rgba(126, 160, 166, .25);
  border-radius: 12px; overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.phone-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(62, 224, 174, .15); }
.phone-country {
  display: flex; align-items: center; gap: 8px; background: none; border: none; border-right: 1px solid rgba(126, 160, 166, .2);
  color: var(--text); font-family: 'Onest', sans-serif; font-size: 16px; font-weight: 600; padding: 15px 14px; cursor: pointer;
}
.phone-country:hover { background: rgba(255, 255, 255, .03); }
.phone-country svg { color: var(--muted2); flex-shrink: 0; }
.phone-flag { font-size: 18px; line-height: 1; }
.phone-input {
  flex: 1; min-width: 0; background: none; border: none; outline: none; padding: 15px 18px 15px 14px;
  font-size: 16px; color: var(--text); font-family: 'Onest', sans-serif;
}
.field-hint { font-size: 12.5px; line-height: 1.55; color: var(--muted2); margin: 10px 2px 22px; }
.field-error { font-size: 13px; color: var(--danger); margin: 10px 2px 0; display: none; }
.field-error.show { display: block; }
.back-link { display: inline-block; background: none; border: none; color: var(--accent); font-family: 'Onest', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 22px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.auth-step { display: none; }
.auth-step.active { display: block; }
.auth-icon {
  width: 56px; height: 56px; border-radius: 16px; background: rgba(62, 224, 174, .12); border: 1px solid rgba(62, 224, 174, .3);
  display: grid; place-items: center; margin: 0 auto 20px;
}
.mode-tabs {
  display: flex; gap: 6px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(126, 160, 166, .2);
  border-radius: 12px; padding: 5px; margin-bottom: 24px;
}
.mode-tab {
  flex: 1; font-family: 'Onest', sans-serif; font-size: 14.5px; font-weight: 600; color: var(--muted);
  background: none; border: none; border-radius: 8px; padding: 11px 0; cursor: pointer; transition: all .15s;
}
.mode-tab.active { background: rgba(62, 224, 174, .14); color: var(--accent-light); }
.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin-top: 22px;
  font-size: 13px; line-height: 1.55; color: var(--muted);
}
.checkbox-row input[type="checkbox"] {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); cursor: pointer;
}
.checkbox-row a { color: var(--accent-light); }

/* ── Country picker sheet ────────────────────────────────────────────── */

.country-sheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.country-sheet[hidden] { display: none; }
.country-sheet-backdrop { position: absolute; inset: 0; background: rgba(4, 10, 15, .6); backdrop-filter: blur(2px); }
.country-sheet-panel {
  position: relative; width: 100%; max-width: 440px; max-height: 78vh; margin: 0 auto;
  background: linear-gradient(180deg, #0d1f2c, #0a1823); border: 1px solid var(--line); border-bottom: none;
  border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column; padding: 22px 20px 0;
}
@media (min-width: 640px) {
  .country-sheet { align-items: center; }
  .country-sheet-panel { border-radius: 20px; border-bottom: 1px solid var(--line); max-height: 72vh; }
}
.country-sheet-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.country-sheet-close { background: none; border: none; color: var(--muted2); font-size: 16px; cursor: pointer; padding: 4px; line-height: 1; }
.country-sheet-close:hover { color: var(--text); }
.country-search {
  width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, .04); border: 1px solid rgba(126, 160, 166, .25);
  border-radius: 12px; padding: 13px 16px; font-size: 14.5px; color: var(--text); font-family: 'Onest', sans-serif; outline: none; margin-bottom: 12px;
}
.country-search:focus { border-color: var(--accent); }
.country-list { overflow-y: auto; padding-bottom: 18px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.country-item {
  display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: none; border-bottom: 1px solid rgba(126, 160, 166, .12);
  padding: 13px 4px; cursor: pointer; text-align: left; font-family: 'Onest', sans-serif; color: var(--text);
}
.country-item:hover { background: rgba(255, 255, 255, .03); }
.country-item .phone-flag { font-size: 20px; }
.country-item-name { flex: 1; font-size: 14.5px; }
.country-item-code { font-size: 14px; color: var(--muted2); }
.country-item-check { color: var(--accent); font-size: 14px; width: 16px; text-align: center; }
.country-empty { padding: 24px 4px; text-align: center; color: var(--muted2); font-size: 14px; }

/* ── Cabinet ─────────────────────────────────────────────────────────── */

.cabinet-main {
  position: relative;
  background:
    radial-gradient(900px 500px at 70% 0%, rgba(62, 224, 174, .09), transparent 60%),
    radial-gradient(700px 460px at 14% 30%, rgba(139, 123, 247, .08), transparent 60%),
    radial-gradient(600px 420px at 88% 70%, rgba(242, 183, 78, .05), transparent 60%),
    var(--bg);
}
.cabinet-main .wrap { padding: 48px 32px 120px; position: relative; }
.cabinet-main h1 { font-size: 34px; margin: 0 0 18px; }
.cabinet-main > .wrap > p.lead { font-size: 16.5px; line-height: 1.6; color: var(--muted); margin: 0 0 48px; max-width: 480px; }
.cabinet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; min-width: 0; }
.cabinet-col { display: grid; gap: 24px; min-width: 0; }
.cab-card { border-radius: 20px; padding: 30px 32px; min-width: 0; }
.cab-card.plain { background: var(--card); border: 1px solid var(--line); }
.cab-card.accent-green { background: linear-gradient(160deg, rgba(62, 224, 174, .12), rgba(53, 184, 224, .05) 55%, #0a1823); border: 1px solid rgba(62, 224, 174, .28); }
.cab-card.accent-purple { background: linear-gradient(160deg, rgba(139, 123, 247, .09), rgba(255, 255, 255, .02) 60%); border: 1px solid rgba(139, 123, 247, .28); }
.cab-card.accent-amber { background: linear-gradient(160deg, rgba(242, 183, 78, .08), rgba(255, 255, 255, .02) 60%); border: 1px solid rgba(242, 183, 78, .26); }
.cab-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.cab-card-title { font-weight: 700; font-size: 17px; }
.cab-status-pill {
  display: inline-flex; align-items: center; gap: 7px; background: rgba(62, 224, 174, .1); border: 1px solid rgba(62, 224, 174, .35);
  color: var(--accent-light); font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
}
.cab-status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cab-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(126, 160, 166, .14); font-size: 14.5px; min-width: 0; }
.cab-row:last-of-type { border-bottom: none; }
.cab-row span:first-child { color: var(--muted); flex-shrink: 0; }
.cab-row span:last-child { font-weight: 600; }
/* Flex children default to min-width:auto, which refuses to shrink below the
   value's own content width — on a narrow phone that pushes the whole card
   (and its grid column) wider than the viewport instead of truncating. */
.cab-row span:last-child:not(.cab-edit-wrap) {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right;
}
.cab-row select.field-input { min-width: 0; }

.sub-tier-list { display: grid; gap: 12px; margin: 4px 0 20px; }
.sub-tier-card {
  background: rgba(7, 18, 27, .5); border: 1px solid rgba(126, 160, 166, .2); border-radius: 14px;
  padding: 14px 18px 4px;
}
.sub-tier-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; min-width: 0; }
.sub-tier-name { font-weight: 700; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-status-pill { flex-shrink: 0; }
.sub-tier-card .cab-row { padding: 10px 0; font-size: 13.5px; }
.lang-toggle { display: flex; gap: 10px; flex-wrap: wrap; }
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; border: 1px solid rgba(126, 160, 166, .35); background: rgba(255, 255, 255, .05); cursor: pointer; padding: 0; transition: all .2s; }
.switch.on { border-color: var(--accent); background: rgba(62, 224, 174, .25); }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #8fa6a8; transition: all .2s; }
.switch.on .switch-knob { left: 22px; background: var(--accent); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.cab-edit-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cab-edit-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-edit-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0;
  background: transparent; border: 1px solid rgba(126, 160, 166, .3); border-radius: 7px; color: var(--muted);
  cursor: pointer; transition: all .15s; padding: 0;
}
.cab-edit-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.cab-edit-input { width: 190px; max-width: 50vw; padding: 8px 12px; font-size: 14px; }
.cab-edit-save {
  font-family: 'Onest', sans-serif; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 9px; white-space: nowrap;
  background: rgba(62, 224, 174, .14); border: 1px solid var(--accent); color: var(--accent-light); cursor: pointer; transition: opacity .15s;
}
.cab-edit-save:disabled { opacity: .5; cursor: not-allowed; }
.soon-note { font-size: 13px; color: var(--faint); margin-top: 6px; }
.cab-empty { text-align: center; }
.device-list { display: grid; gap: 2px; margin-top: 8px; }
.device-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid rgba(126, 160, 166, .14); }
.device-row:last-child { border-bottom: none; }
.device-icon {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(126, 160, 166, .1); color: var(--muted);
  display: grid; place-items: center; flex-shrink: 0;
}
.device-info { min-width: 0; flex: 1; }
.device-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.device-badge {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--accent-light);
  background: rgba(62, 224, 174, .14); border: 1px solid rgba(62, 224, 174, .35); border-radius: 999px; padding: 2px 9px;
}
.device-meta { font-size: 13px; color: var(--muted2); margin-top: 3px; }
.device-revoke {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; background: transparent; border: 1px solid rgba(126, 160, 166, .3);
  color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: all .15s;
}
.device-revoke:hover { border-color: var(--danger); color: var(--danger); }

/* ── Confirm modal ───────────────────────────────────────────────────── */

.confirm-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.confirm-modal[hidden] { display: none; }
.confirm-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 10, 15, .6); backdrop-filter: blur(2px); }
.confirm-modal-panel {
  position: relative; width: 100%; max-width: 380px;
  background: linear-gradient(180deg, #0d1f2c, #0a1823); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); padding: 22px;
}
.confirm-modal-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.confirm-modal-text { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0 0 20px; }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

.pricing-modal-panel { max-width: 900px; max-height: 88vh; overflow-y: auto; padding: 32px; }
.pricing-modal-close {
  position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.pricing-modal-close:hover { color: var(--text); border-color: rgba(62, 224, 174, .4); }
.pricing-modal-grid { gap: 16px; }
@media (max-width: 720px) { .pricing-modal-grid { grid-template-columns: 1fr; } }

/* ── 404 ─────────────────────────────────────────────────────────────── */
.not-found { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 60px 32px; }

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; padding-bottom: 60px; }
  .phone-wrap { order: -1; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-card.wide { grid-column: span 2; }
  .feature-card.hero-feature { grid-template-columns: 1fr; }
  [data-faith-section] .wrap { grid-template-columns: 1fr; gap: 32px; }
  .faith-panel { padding-top: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .periods-grid { grid-template-columns: 1fr; }
  .price-free { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cabinet-grid { grid-template-columns: 1fr; }
  .trust .wrap { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 900px) {
  .nav-links .hide-mobile { display: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .nav .wrap { padding: 12px 16px; gap: 10px; }
  .brand { font-size: 14.5px; gap: 7px; white-space: nowrap; }
  .brand-mark { width: 28px; height: 28px; }
  .nav-links { gap: 14px; font-size: 13.5px; }
  .btn-nav { padding: 9px 16px; font-size: 13.5px; white-space: nowrap; }
  .cab-card { padding: 22px 20px; }
  .cab-edit-input { width: 140px; }
  .hero h1 { font-size: 32px; }
  section.block .wrap { padding: 64px 20px; }
  .features-grid, .steps, .articles-grid { grid-template-columns: 1fr; }
  .feature-card.wide { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; padding: 56px 20px 0; }
  h2.section-title { font-size: 27px; }
  .phone { width: 100%; max-width: 300px; }
  .compare-hint { display: block; }
  .compare-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 28px;
    background: linear-gradient(to right, transparent, var(--card));
    border-radius: 0 16px 16px 0;
    pointer-events: none;
  }
}
