/* recourse.help. Палитра — как в приложении и просмотрщике: почти чёрный, нейтральные серые,
   красный только для записи и тревоги. Шрифты системные: ни одного запроса к чужим серверам.
   Отступы и выравнивание — логические свойства, чтобы персидская версия зеркалилась сама. */
:root {
  color-scheme: light;
  --ink: #101418;
  --paper: #ffffff;
  --mist: #f4f5f7;
  --line: #d5d8dc;
  --text: #101418;
  --muted: #4a4f57;
  --rec: #e5322d;
  --rec-text: #c62828;
  --btn: #101418;
  --on-btn: #ffffff;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #101418;
    --mist: #161b21;
    --line: #3a4048;
    --text: #e6e8eb;
    --muted: #b8bdc4;
    --rec-text: #ff8a80;
    --btn: #e6e8eb;
    --on-btn: #101418;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.55 var(--sans); }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--rec); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 16px; top: 16px; z-index: 10; background: #fff; color: #101418; padding: 10px 14px; border-radius: 8px; }

h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; max-width: 22em; text-wrap: balance; }
h3 { font-size: 1.14rem; line-height: 1.3; font-weight: 700; }
/* Письменности, где сжатие букв ломает начертание. */
:lang(fa) :is(h1, h2), :lang(ka) :is(h1, h2), :lang(hy) :is(h1, h2) { letter-spacing: 0; }
.lead { font-size: 1.16rem; color: var(--muted); max-width: 40em; margin-top: 16px; }
.fine { font-size: 0.92rem; color: var(--muted); max-width: 52em; margin-top: 32px; }

/* --- тёмные блоки: шапка с героем и скачивание --- */
.dark { background: #0c0f12; color: #f1f2f4; --text: #f1f2f4; --muted: #aab0b8; --line: #2c323a; }
.top { display: flex; align-items: center; gap: 28px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.nav { display: flex; gap: 26px; margin-inline-start: auto; font-size: 0.97rem; }
.nav a { text-decoration: none; color: var(--muted); padding-block: 6px; }
.nav a:hover { color: var(--text); }
.lang { position: relative; font-size: 0.97rem; }
.lang summary { cursor: pointer; list-style: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: "▾"; margin-inline-start: 8px; color: var(--muted); }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 5; min-width: 190px; padding: 8px; background: #1b2026; border: 1px solid var(--line); border-radius: 14px; columns: 1; box-shadow: 0 18px 40px rgb(0 0 0 / 0.45); }
.lang li a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; }
.lang li a:hover, .lang li a[aria-current] { background: #2c323a; }

.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 48px; align-items: center; padding-block: 56px 40px; }
.kicker { font: 600 0.82rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.kicker::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rec); margin-inline-end: 10px; }
.hero .lead { font-size: 1.2rem; margin-top: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.note { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1.5px solid transparent; text-align: center; }
.btn-light { background: #ffffff; color: #101418; }
.btn-light:hover { background: #e6e8eb; }
.btn-ghost { border-color: #4a515b; color: #f1f2f4; }
.btn-ghost:hover { border-color: #aab0b8; }
.btn-big { min-height: 60px; font-size: 1.1rem; padding-inline: 32px; margin-top: 30px; }

/* --- телефон с экраном записи --- */
.phone { justify-self: center; width: min(100%, 300px); aspect-ratio: 9 / 18.6; padding: 10px; border-radius: 42px; background: #05070a; border: 1px solid #343b44; box-shadow: 0 30px 80px rgb(0 0 0 / 0.55); }
.phone-screen { position: relative; height: 100%; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 12px 14px; color: #fff; font-size: 0.86rem; line-height: 1.3;
  background: radial-gradient(90% 55% at 15% 30%, #6b5a48 0%, transparent 70%), radial-gradient(70% 45% at 85% 62%, #3e4a55 0%, transparent 70%), linear-gradient(180deg, #2a2420 0%, #171a1e 60%, #0d0f12 100%); }
.badge { display: flex; gap: 10px; align-items: flex-start; align-self: flex-start; max-width: 100%; padding: 10px 14px; border-radius: 18px; background: rgb(12 15 18 / 0.72); }
.badge b { display: block; font-size: 1rem; }
.badge small { display: block; color: #c9ced5; font-size: 0.78rem; margin-top: 2px; }
.dot { flex: none; width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; background: var(--rec); animation: pulse 1s steps(2, jump-none) infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.panel { margin-top: auto; padding: 14px; border-radius: 20px; background: rgb(12 15 18 / 0.78); text-align: center; }
.panel-title { font-weight: 700; font-size: 0.96rem; }
.panel-sent { color: #ff8a80; padding-block: 10px; }
.pin-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.pin { flex: 1; padding-block: 8px; border-bottom: 1.5px solid #6c7480; color: #9aa1ab; font-size: 1.05rem; letter-spacing: 0.06em; }
.pin-btn { padding: 10px 16px; border-radius: 999px; background: #101418; font-weight: 700; font-size: 0.86rem; }
.utc { align-self: flex-start; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: rgb(12 15 18 / 0.72); font-size: 0.74rem; letter-spacing: 0.04em; }

/* --- лента кусков: каждая отметка — полсекунды, уже ушедшие с телефона --- */
.strip { padding-block: 8px 44px; }
.ticks { display: grid; grid-template-columns: repeat(120, 1fr); gap: 2px; height: 34px; direction: ltr; }
.ticks i { background: #2a3038; border-radius: 1px; }
.ticks i.sent { background: #e6e8eb; }
.ticks i.now { background: var(--rec); }
.ticks i:nth-child(20n + 1) { height: 100%; }
.ticks i { height: 62%; align-self: end; }
.strip-caption { margin-top: 12px; font-size: 0.9rem; color: var(--muted); }

/* --- разделы --- */
.band { padding-block: 84px; }
.band.mist { background: var(--mist); }
.band.dark { padding-block: 84px; }

.timeline { margin-top: 44px; border-inline-start: 2px solid var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 0 0 38px 28px; padding-inline: 28px 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--text); }
.timeline li.alarm::before { background: var(--rec); border-color: var(--rec); }
.when { font-size: 1.02rem; font-weight: 700; padding-top: 1px; }
.timeline li.alarm .when { color: var(--rec-text); }
.timeline p { color: var(--muted); margin-top: 6px; max-width: 44em; }

.table-scroll { overflow-x: auto; margin-top: 36px; }
.duress { width: 100%; min-width: 620px; border-collapse: collapse; text-align: start; }
.duress th, .duress td { padding: 18px 16px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: start; }
.duress thead th { font: 600 0.8rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.duress tbody th { font-weight: 700; width: 24%; }
.duress td:nth-child(2) { width: 30%; }
.duress tr.hot td:last-child { color: var(--rec-text); font-weight: 700; }
.toast { display: inline-block; padding: 7px 14px; border-radius: 16px; background: #2c323a; color: #fff; font-size: 0.9rem; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 44px; }
.gap { margin-top: 40px; }
.list { margin-top: 14px; }
.list li { position: relative; padding: 12px 0; padding-inline-start: 34px; border-bottom: 1px solid var(--line); }
.list li::before { position: absolute; inset-inline-start: 0; top: 12px; width: 22px; text-align: center; font-weight: 800; }
.list.cant li::before { content: "✕"; color: var(--rec-text); }
.list.has li::before { content: "—"; color: var(--muted); }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; }
.three article { padding: 26px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.three.plain article { background: transparent; }
.three article svg { margin-bottom: 18px; }
.three article p { color: var(--muted); margin-top: 8px; }
.three article.warn { border-color: var(--rec); }
.three article.warn h3 { color: var(--rec-text); }

.dl { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
.facts { margin-top: 26px; font-size: 0.9rem; color: var(--muted); display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.facts dd { color: var(--text); }
.sha { overflow-wrap: anywhere; font-size: 0.8rem; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 16px 0; padding-inline-start: 52px; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #4a515b; display: grid; place-items: center; font: 700 0.9rem var(--mono); }

.faq { margin-top: 32px; max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); padding-bottom: 20px; max-width: 46em; }

.foot { padding-block: 36px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .lang { margin-inline-start: auto; }
  .hero { grid-template-columns: 1fr; padding-block: 28px 32px; gap: 40px; }
  .phone { width: min(78%, 280px); }
  .band, .band.dark { padding-block: 60px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .two, .three, .dl { grid-template-columns: 1fr; gap: 28px; }
  .ticks { grid-template-columns: repeat(60, 1fr); }
  .ticks i:nth-child(n + 61) { display: none; }
  .ticks i:nth-child(20n + 1) { height: 62%; }
  .ticks i:nth-child(10n + 1) { height: 100%; }
}
/* Узкий экран: таблица «что на экране / что на самом деле» — карточками, без прокрутки вбок. */
@media (max-width: 700px) {
  .table-scroll { overflow: visible; }
  .duress { min-width: 0; display: block; }
  .duress thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .duress tbody, .duress tr, .duress th, .duress td { display: block; width: auto; }
  .duress tr { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .duress tbody th, .duress td { padding: 0; border: 0; }
  .duress td:nth-child(2) { width: auto; }
  .duress tbody th { width: auto; font-size: 1.14rem; margin-bottom: 12px; }
  .duress td { margin-top: 12px; }
  .duress td::before { content: attr(data-label); display: block; margin-bottom: 6px; font: 600 0.74rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .actions .btn { flex: 1 1 100%; }
  .btn-big { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot { animation: none; }
}
