/* pages.css — страницы «Статус серверов» и «Я защищён?» (Anila «Orbit»).
   Токены и живой фон берутся из theme.css. */
.ap-body { min-height: 100vh; margin: 0; color: var(--text); font-family: var(--font-sans, -apple-system, 'Segoe UI', Inter, sans-serif); }

/* Шапка */
.ap-nav {
  position: sticky; top: max(14px, env(safe-area-inset-top)); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: min(760px, calc(100% - 32px)); margin: 14px auto 0; padding: 8px 8px 8px 16px;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
}
.ap-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 14px; }
.ap-logo svg { width: 22px; height: 22px; filter: drop-shadow(0 0 8px rgba(59,130,246,.45)); }
.ap-navlink {
  font-size: 13px; font-weight: 600; text-decoration: none; color: var(--text);
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--hairline-strong);
}
.ap-navlink:hover { border-color: var(--brand-line); background: var(--brand-soft); }

.ap-wrap { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 64px; }
.ap-hero { text-align: center; margin-bottom: 36px; }
.ap-h1 { font-size: clamp(36px, 7vw, 64px); line-height: 1; font-weight: 700; letter-spacing: -0.05em; margin: 18px 0 14px; }
.ap-lead { font-size: 17px; color: var(--text-2); margin: 0 auto; max-width: 520px; line-height: 1.55; }
.ap-updated { font-size: 13px; color: var(--text-3); margin: 10px 0 0; }
.ap-red { color: #f87171; }
html:not(.dark) .ap-red { color: #dc2626; }

/* Пилюля статуса */
.ap-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.ap-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: 0 0 auto; }
.is-up .ap-dot, .is-on .ap-dot { background: #10b981; }
.is-partial .ap-dot { background: #f59e0b; }
.is-down .ap-dot, .is-off .ap-dot { background: #ef4444; }
.is-up > .ap-dot::after, .ap-pill.is-up .ap-dot::after, .is-on .ap-pill .ap-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; background: rgba(16,185,129,.35);
  animation: lnPulse 2s ease-out infinite;
}

/* Сетка стран */
.ap-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ap-card {
  padding: 16px 16px 12px; border-radius: 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 70%),
              color-mix(in srgb, var(--surface) 42%, transparent);
  border: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
}
html:not(.dark) .ap-card { background: rgba(255,255,255,.55); }
.ap-card.is-partial { border-color: rgba(245,158,11,.35); }
.ap-card.is-down { border-color: rgba(239,68,68,.4); }
.ap-card-top { display: flex; align-items: center; gap: 12px; }
.ap-code {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; letter-spacing: .04em; color: var(--brand-ink);
  background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.ap-card-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ap-card-name b { font-size: 15px; font-weight: 650; }
.ap-card-name span { font-size: 12px; color: var(--text-3); }
.ap-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.ap-bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 26px; margin: 14px 0 6px; }
.ap-bars i { border-radius: 3px; background: var(--surface-3); }
.ap-bars i.ok { background: linear-gradient(180deg, #34d399, #10b981); }
.ap-bars i.warn { background: #f59e0b; }
.ap-bars i.bad { background: #ef4444; }
.ap-card-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); }
.ap-card-foot span:nth-child(2) { color: var(--text-2); font-weight: 600; }
.ap-foot { text-align: center; font-size: 13px; color: var(--text-3); margin: 32px auto 0; max-width: 520px; line-height: 1.6; }
.ap-foot a { color: var(--brand-ink); }

/* Страница проверки */
.ap-check { text-align: center; padding-top: 24px; }
.ap-orb { width: min(300px, 70vw) !important; cursor: default; }
.ap-check .ap-h1 { margin-top: 16px; }
.ap-ip { font-size: 13px; color: var(--text-3); margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.ap-steps {
  text-align: left; max-width: 440px; margin: 24px auto 0; padding: 16px 18px 16px 38px;
  border-radius: 18px; background: color-mix(in srgb, var(--surface) 45%, transparent);
  border: 1px solid var(--hairline); color: var(--text-2); font-size: 14px; line-height: 1.6;
}
.ap-steps li + li { margin-top: 6px; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }
button.ln-btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }

/* Состояния орбиты */
.is-checking .orb-ring { animation-duration: 2.5s !important; }
.is-checking .orb-glow { opacity: .6; }
.is-on .orb-glow { background: radial-gradient(closest-side, rgba(16,185,129,.45), rgba(59,130,246,.2) 55%, transparent) !important; }
.is-off .orb-glow { background: radial-gradient(closest-side, rgba(239,68,68,.35), rgba(239,68,68,.08) 55%, transparent) !important; }
.is-off .orb-mark svg { filter: grayscale(.85) drop-shadow(0 0 12px rgba(239,68,68,.35)) !important; opacity: .75; }
.is-off .orb-ring { animation-play-state: paused !important; opacity: .4; }
.is-error .orb-ring { animation-play-state: paused !important; opacity: .5; }
