/* ═══════════════════════════════════════════════════════════════════════
   dev4rev · TV — отдельные страницы (privacy, 404)
   Использует токены и базовые стили из main.css
   ═══════════════════════════════════════════════════════════════════════ */

.page-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ─── Общая шапка страницы ─────────────────────────────────────────── */

.page-header {
  position: relative;
  z-index: 2;
  width: var(--vv-w, 100%);
  margin-left: var(--vv-x, 0);
  padding: calc(22px + env(safe-area-inset-top, 0px))
           calc(24px + env(safe-area-inset-right, 0px))
           12px
           calc(24px + env(safe-area-inset-left, 0px));
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.page-header__inner {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: auto;
}
.page-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.page-brand .dot { color: var(--accent); }
.page-brand:hover { color: var(--accent); }
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.page-back:hover { color: var(--ink); border-color: var(--line-h); background: var(--surface-h); }
.page-back svg { width: 13px; height: 13px; }

/* ─── Политика конфиденциальности ──────────────────────────────────── */

.doc-page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.doc-eyebrow,
.nf-eyebrow {
  margin: 0 0 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.doc-eyebrow::before,
.nf-eyebrow::before { content: '// '; color: var(--faint); }

.doc-page h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(34px, 7vw, 68px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.doc-lead {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
  color: var(--ink-soft);
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.doc-chip {
  padding: 7px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.doc-chip--accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 44px 0 8px;
}
.doc-card {
  padding: 18px;
  background: linear-gradient(160deg, var(--surface) 0%, rgba(23,23,23,.35) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.doc-card b {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--accent);
}
.doc-card span {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.doc-section {
  margin-top: 52px;
  scroll-margin-top: 24px;
}
.doc-section h2 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
}
.doc-section h2::before {
  content: '// ';
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--accent);
}
.doc-section p,
.doc-section li {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.doc-section ul { margin: 0 0 18px; padding-left: 22px; }
.doc-section li::marker { color: var(--accent); }
.doc-section strong { color: var(--ink); font-weight: 600; }
.doc-section a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); }
.doc-section a:hover { border-bottom-color: var(--accent); }
.doc-section code {
  padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 5px;
}
.doc-note {
  padding: 18px 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}
.doc-note p { margin: 0; }

/* ─── Страница 404 ─────────────────────────────────────────────────── */

.notfound-page {
  flex: 1;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 32px 24px 88px;
}
.notfound {
  width: min(720px, 100%);
  text-align: center;
}
.nf-eyebrow { margin-bottom: 26px; }

.nf-screen {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 16 / 10;
  margin: 0 auto 38px;
  overflow: hidden;
  border: 1px solid var(--line-h);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 45%, #1a2036 0%, #0d0d14 58%, #050507 100%);
  box-shadow:
    0 0 0 1px rgba(0,0,0,.8),
    0 0 60px rgba(137,168,255,.10),
    0 28px 70px rgba(0,0,0,.55);
}
.nf-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,.035) 0 1px,
    transparent 1px 4px
  );
  animation: nf-scan 7s linear infinite;
}
.nf-screen::after {
  content: '';
  position: absolute;
  inset: -60%;
  z-index: 3;
  pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 68%, rgba(137,168,255,.18) 78%, transparent 86%);
  animation: nf-sweep 9s linear infinite;
}
.nf-bars {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  opacity: .32;
}
.nf-bars i {
  display: block;
  width: 3px;
  height: 34%;
  background: var(--accent);
  border-radius: 2px;
  animation: nf-eq 1.3s ease-in-out infinite alternate;
}
.nf-bars i:nth-child(2) { animation-delay: -.2s; height: 58%; }
.nf-bars i:nth-child(3) { animation-delay: -.45s; height: 78%; }
.nf-bars i:nth-child(4) { animation-delay: -.1s; height: 46%; }
.nf-bars i:nth-child(5) { animation-delay: -.65s; height: 66%; }
.nf-bars i:nth-child(6) { animation-delay: -.35s; height: 30%; }

.nf-digits {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(72px, 19vw, 132px);
  font-weight: 500;
  letter-spacing: -.09em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 3px 0 rgba(248,113,113,.45), -3px 0 rgba(80,200,255,.4);
  animation: nf-glitch 6s steps(1) infinite;
}
.nf-corner {
  position: absolute;
  z-index: 5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(245,245,245,.5);
}
.nf-corner--tl { top: 12px; left: 14px; }
.nf-corner--br { right: 14px; bottom: 11px; color: var(--accent); }
.nf-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--err);
  box-shadow: 0 0 10px var(--err);
  vertical-align: 1px;
  animation: nf-blink 2s steps(1) infinite;
}

.notfound h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1.03;
  color: var(--ink);
}
.notfound__text {
  max-width: 560px;
  margin: 20px auto 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.nf-from {
  display: inline-block;
  max-width: min(560px, 100%);
  margin: 24px auto 0;
  padding: 11px 15px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: left;
  word-break: break-all;
  color: var(--muted);
  background: var(--field-bg);
  border: 1px dashed var(--field-border-h);
  border-radius: 9px;
}
.nf-from[hidden] { display: none; }
.nf-from span { color: var(--accent); }
.nf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-h);
  border-radius: 999px;
  text-decoration: none;
  transition: transform .18s var(--ease), background .18s, border-color .18s, color .18s;
}
.page-btn svg { width: 14px; height: 14px; }
.page-btn:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--surface-h); }
.page-btn--primary { color: #0a0a0a; background: var(--ink); border-color: var(--ink); }
.page-btn--primary:hover { color: #0a0a0a; background: var(--accent); border-color: var(--accent); }
.nf-hint {
  margin: 26px 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--faint);
}
.nf-hint kbd {
  padding: 2px 6px;
  font: inherit;
  color: var(--muted);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 4px;
}

@keyframes nf-scan {
  from { transform: translateY(-4px); }
  to   { transform: translateY(4px); }
}
@keyframes nf-sweep {
  to { transform: rotate(360deg); }
}
@keyframes nf-eq {
  from { transform: scaleY(.25); opacity: .35; }
  to   { transform: scaleY(1); opacity: .9; }
}
@keyframes nf-glitch {
  0%, 88%, 92%, 100% { transform: translate(0, 0); }
  89% { transform: translate(-2px, 1px); }
  90% { transform: translate(2px, -1px); }
  91% { transform: translate(-1px, 0); }
}
@keyframes nf-blink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: .2; }
}

/* ─── Подвал страниц ───────────────────────────────────────────────── */

.page-footer {
  border-top: 1px solid var(--line);
  padding: calc(22px + env(safe-area-inset-bottom, 0px))
           calc(24px + env(safe-area-inset-right, 0px))
           22px
           calc(24px + env(safe-area-inset-left, 0px));
  display: flex;
  justify-content: center;
}
.page-footer__inner {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--faint);
}
.page-footer a { color: var(--faint); text-decoration: none; }
.page-footer a:hover { color: var(--accent); }

/* ─── Адаптация ────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .page-header { padding-left: calc(16px + env(safe-area-inset-left, 0px)); padding-right: calc(16px + env(safe-area-inset-right, 0px)); }
  .page-back { min-width: 40px; padding: 0 12px; }
  .doc-page { padding: 40px 20px 72px; }
  .doc-section { margin-top: 42px; }
  .notfound-page { padding: 18px 16px 64px; }
  .nf-screen { border-radius: 14px; }
  .page-btn { min-height: 46px; padding: 0 18px; }
  .page-footer { padding-left: 16px; padding-right: 16px; }
  .page-footer__inner { justify-content: center; text-align: center; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .notfound-page { padding-top: 8px; padding-bottom: 32px; }
  .nf-screen { width: min(250px, 42vw); margin-bottom: 18px; }
  .nf-eyebrow { margin-bottom: 14px; }
  .nf-actions { margin-top: 20px; }
  .nf-hint { margin-top: 14px; }
}
