/* ==========================================
   PLEADING SANITY — SHARED SITE SHELL
   One nav · One footer · Every page
   Loaded last so the shell looks identical everywhere
============================================ */

.ps-nav,
.ps-footer {
  --ps-cyan: #00fff0;
  --ps-magenta: #ff00ff;
  --ps-bg: #000103;
  --ps-deep: #0d1b2a;
  --ps-text: #eafffd;
  --ps-muted: #a9c7d1;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  box-sizing: border-box;
}
.ps-nav *,
.ps-footer * { box-sizing: border-box; }

/* ─── NAV ─── */
.ps-nav {
  position: relative;
  z-index: 1000;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: rgba(0, 1, 3, 0.92);
  border: 0;
  border-bottom: 1px solid rgba(0, 255, 240, 0.18);
  box-shadow: 0 0 24px rgba(0, 255, 240, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
}
.ps-nav .ps-nav-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px;
}
.ps-nav .ps-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  color: var(--ps-cyan);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(0, 255, 240, 0.45);
  white-space: nowrap;
}
.ps-nav .ps-brand img { width: 34px; height: 34px; display: block; }
.ps-nav .ps-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.ps-nav .ps-links a,
.ps-nav .ps-group-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  box-shadow: none;
  color: var(--ps-text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  text-shadow: none;
  transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.ps-nav .ps-links a::before,
.ps-nav .ps-links a::after { content: none; }
.ps-nav .ps-links a:hover,
.ps-nav .ps-links a:focus-visible,
.ps-nav .ps-group-btn:hover,
.ps-nav .ps-group-btn:focus-visible {
  color: var(--ps-cyan);
  background: rgba(0, 255, 240, 0.08);
  border-color: rgba(0, 255, 240, 0.35);
  transform: none;
}
.ps-nav .ps-links a[aria-current="page"] {
  color: #000103;
  background: var(--ps-cyan);
  border-color: var(--ps-cyan);
  box-shadow: 0 0 14px rgba(0, 255, 240, 0.45);
}
.ps-nav .ps-links a.ps-crisis {
  color: #ffd6ff;
  border-color: rgba(255, 0, 255, 0.55);
}
.ps-nav .ps-links a.ps-crisis:hover,
.ps-nav .ps-links a.ps-crisis:focus-visible,
.ps-nav .ps-links a.ps-crisis[aria-current="page"] {
  color: #000103;
  background: var(--ps-magenta);
  border-color: var(--ps-magenta);
}

/* Groups — Heal · Play · Community */
.ps-nav .ps-group { position: relative; }
.ps-nav .ps-group-btn { gap: 0; overflow: visible; }
.ps-nav .ps-group-btn::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}
.ps-nav .ps-group-btn[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.ps-nav .ps-group.has-current > .ps-group-btn { border-color: rgba(0, 255, 240, 0.55); color: var(--ps-cyan); }
.ps-nav .ps-group-btn[aria-expanded="true"] { background: rgba(0, 255, 240, 0.12); border-color: var(--ps-cyan); }
.ps-nav .ps-group-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 1100;
  display: none;
  grid-template-columns: 1fr;
  gap: 2px;
  min-width: 220px;
  padding: 6px;
  background: #06101c;
  border: 1px solid rgba(0, 255, 240, 0.3);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 255, 240, 0.12);
  transform: translateX(-50%);
}
.ps-nav .ps-group.open > .ps-group-menu,
.ps-nav:not(.ps-js) .ps-group:focus-within > .ps-group-menu { display: grid; animation: ps-menu-in 0.18s ease-out; }
.ps-nav .ps-group-menu a { justify-content: flex-start; width: 100%; border-radius: 10px; font-size: 0.95rem; }
@keyframes ps-menu-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ps-nav .ps-install {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ps-cyan);
  border-radius: 999px;
  background: rgba(0, 255, 240, 0.12);
  color: var(--ps-text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ps-nav .ps-install[hidden] { display: none; }
.ps-nav .ps-install:hover { background: var(--ps-cyan); color: #000103; }
.ps-nav .ps-install:focus-visible,
.ps-nav a:focus-visible,
.ps-nav button:focus-visible,
.ps-footer a:focus-visible {
  outline: 3px solid var(--ps-cyan);
  outline-offset: 2px;
}

/* Phones: brand + account on top, then four big pills.
   A group opens as a full-width panel under the bar. */
@media (max-width: 960px) {
  .ps-nav .ps-nav-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand account" "links links" "install install";
    align-items: center;
    gap: 4px 8px;
    padding: 6px 10px 8px;
  }
  .ps-nav .ps-brand { grid-area: brand; font-size: 1rem; }
  .ps-nav .ps-account { grid-area: account; }
  .ps-nav .ps-install { grid-area: install; justify-self: center; }
  .ps-nav .ps-links { grid-area: links; justify-content: space-between; gap: 4px; margin: 0; }
  .ps-nav .ps-links > .ps-home { display: none; }
  .ps-nav .ps-group { position: static; flex: 1 1 0; }
  .ps-nav .ps-group-btn,
  .ps-nav .ps-links > a.ps-crisis { width: 100%; justify-content: center; padding: 0 8px; font-size: 0.88rem; }
  .ps-nav .ps-links > a.ps-crisis { flex: 1 1 0; }
  .ps-nav .ps-group-menu {
    left: 8px;
    right: 8px;
    top: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    transform: none;
  }
  .ps-nav .ps-group-menu a { white-space: normal; line-height: 1.2; padding: 8px 12px; }
  @keyframes ps-menu-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (max-width: 380px) {
  .ps-nav .ps-group-btn,
  .ps-nav .ps-links > a.ps-crisis { font-size: 0.8rem; padding: 0 4px; }
  .ps-nav .ps-group-btn::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-nav .ps-group-menu { animation: none !important; }
}

/* ─── FOOTER ─── */
.ps-footer {
  display: block;
  width: 100%;
  margin: 3rem 0 0;
  padding: 2.5rem 1rem 2rem;
  background: linear-gradient(180deg, rgba(13, 27, 42, 0.6), #000103);
  border: 0;
  border-top: 1px solid rgba(0, 255, 240, 0.18);
  color: var(--ps-muted);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.7;
}
.ps-footer .ps-footer-inner { max-width: 960px; margin: 0 auto; }
.ps-footer p { margin: 0.35rem 0; color: var(--ps-muted); font-size: 0.95rem; }
.ps-footer .ps-motto { color: var(--ps-cyan); font-size: 1.1rem; font-weight: 700; text-shadow: 0 0 10px rgba(0, 255, 240, 0.35); }
.ps-footer .ps-help {
  margin: 1rem auto;
  padding: 0.75rem 1rem;
  max-width: 640px;
  border: 1px solid rgba(255, 0, 255, 0.4);
  border-radius: 12px;
  background: rgba(255, 0, 255, 0.06);
  color: var(--ps-text);
}
.ps-footer .ps-help a { color: #ffb3ff; font-weight: 700; }
.ps-footer .ps-footer-links,
.ps-footer .ps-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  margin: 0.75rem 0;
  padding: 0;
  list-style: none;
}
.ps-footer .ps-footer-links a,
.ps-footer .ps-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  color: var(--ps-text);
  text-decoration: none;
  border-radius: 999px;
  background: none;
  border: 0;
}
.ps-footer .ps-footer-links a:hover,
.ps-footer .ps-socials a:hover { color: var(--ps-cyan); background: rgba(0, 255, 240, 0.08); }
.ps-footer .ps-legacy {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 255, 240, 0.1);
}
.ps-footer .ps-legacy strong { color: #ffd700; font-weight: 700; }
.ps-footer .ps-copy { font-size: 0.85rem; }

/* ==========================================
   SHARED PAGE LAYOUT — pages with <body class="ps-page">
============================================ */
.ps-page {
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 255, 240, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(255, 0, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 120%, #1a0b3d 0, #0d1b2a 45%, #000103 100%);
  background-attachment: fixed;
  color: #eafffd;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.ps-page .container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 2rem; }
.ps-page .narrow { max-width: 800px; }
.ps-page .hero { text-align: center; padding: 3rem 0 2rem; }
.ps-page .hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.1;
  background: linear-gradient(135deg, #00fff0, #ff00ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ps-page .lead { font-size: 1.15rem; color: #b9faff; max-width: 62ch; margin: 0 auto 1.5rem; }
.ps-page section { margin: 3rem 0; }
.ps-page h2 { color: #00fff0; }
.ps-page .muted { color: #a9c7d1; }
.ps-page .grid { display: grid; gap: 1.25rem; }
.ps-page .grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ps-page .grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ps-page .cosmic-card { display: block; color: inherit; text-decoration: none; }
.ps-page .cosmic-card h3 { margin: 0 0 0.4rem; color: #eafffd; }
.ps-page .cosmic-card p { margin: 0.3rem 0; color: #c9e9ef; }
.ps-page .card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.ps-page .tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 240, 0.3);
  color: #b9faff;
  font-size: 0.8rem;
}
.ps-page blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid #00fff0;
  border-radius: 0 12px 12px 0;
  background: rgba(0, 255, 240, 0.05);
}
.ps-page .btn { min-height: 44px; }
.ps-page .fade-in { animation: psFadeIn 0.7s ease-out both; }
@keyframes psFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ps-page .fade-in { animation: none; } }

/* ==========================================
   AUTO-STREAM VIDEO PLAYER — js/video-feed.js
============================================ */
.ps-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000103;
  border: 1px solid rgba(0, 255, 240, 0.18);
  box-shadow: 0 0 18px rgba(0, 255, 240, 0.12);
  margin-bottom: 1rem;
}
.ps-video-stage, .ps-video-poster, .ps-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ps-video-poster {
  display: flex; align-items: flex-end; justify-content: flex-start;
  background: radial-gradient(circle at 30% 30%, rgba(0, 255, 240, 0.18), transparent 60%),
              radial-gradient(circle at 75% 70%, rgba(255, 0, 255, 0.16), transparent 60%), #0d1b2a;
}
.ps-video-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.ps-video-shimmer {
  position: relative; margin: 0.75rem; padding: 0.25rem 0.7rem; border-radius: 999px;
  font-size: 0.8rem; color: #eafffd; background: rgba(0, 1, 3, 0.7);
  animation: psVideoPulse 1.6s ease-in-out infinite;
}
.ps-video-shimmer:empty { display: none; }
.ps-video.is-ready .ps-video-poster { opacity: 0; transition: opacity 0.6s ease; pointer-events: none; }
.ps-video iframe { z-index: 1; }
.ps-video.is-ready iframe { z-index: 2; }
@keyframes psVideoPulse { 50% { opacity: 0.5; } }
.ps-video-sound, .ps-video-play {
  position: absolute; z-index: 3; min-width: 44px; min-height: 44px; border-radius: 999px;
  border: 1px solid rgba(0, 255, 240, 0.55); background: rgba(0, 1, 3, 0.75); color: #eafffd;
  font: inherit; font-size: 1.1rem; cursor: pointer;
}
.ps-video-sound { top: 0.6rem; right: 0.6rem; }
.ps-video-play { top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 0 1.4rem; font-weight: 700; }
.ps-video-sound:hover, .ps-video-sound:focus-visible,
.ps-video-play:hover, .ps-video-play:focus-visible { background: rgba(0, 255, 240, 0.2); border-color: #00fff0; outline: 3px solid #00fff0; outline-offset: 2px; }
.ps-video-quote {
  position: absolute; inset: 0; margin: 0; padding: 1.5rem; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.6rem; text-align: center;
  background: radial-gradient(circle at 20% 25%, rgba(0, 255, 240, 0.22), transparent 55%),
              radial-gradient(circle at 80% 75%, rgba(255, 0, 255, 0.2), transparent 55%),
              linear-gradient(160deg, #0d1b2a, #000103);
}
.ps-video-quote blockquote {
  margin: 0; padding: 0; border: 0; background: none; font-size: clamp(1rem, 2.6vw, 1.35rem);
  line-height: 1.5; color: #eafffd; font-style: italic; max-width: 36ch;
}
.ps-video-quote figcaption { color: #00fff0; font-weight: 600; font-size: 0.9rem; }
.ps-video-quote-link { color: #ff99ff; font-size: 0.9rem; min-height: 44px; display: inline-flex; align-items: center; }

/* Home hero — muted looped video or live cosmic animation behind the headline */
.ps-hero-stage { position: relative; isolation: isolate; overflow: hidden; border-radius: 24px; }
.ps-hero-media { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ps-hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 1, 3, 0.25), rgba(0, 1, 3, 0.7));
}
.ps-hero-video, .ps-hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

@media (prefers-reduced-motion: reduce) {
  .ps-video-shimmer { animation: none; }
  .ps-video.is-ready .ps-video-poster { transition: none; }
}
.ps-page .hero.ps-hero-stage { padding: 4rem 1.25rem 3rem; margin-top: 0.5rem; }
.video-card .ps-video { margin: 0; border: 0; border-radius: 0; }

/* ==========================================
   ACCOUNT — sign in / avatar menu (js/auth.js)
============================================ */
.ps-nav .ps-account { position: relative; flex: none; display: flex; align-items: center; gap: 6px; }
.ps-nav .ps-signin {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid #00fff0; border-radius: 999px; background: rgba(0, 255, 240, 0.12);
  color: #eafffd; font-weight: 700; font-size: 0.92rem; text-decoration: none; white-space: nowrap;
}
.ps-nav .ps-signin:hover, .ps-nav .ps-signin:focus-visible { background: #00fff0; color: #000103; }
.ps-nav .ps-avatar-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 4px;
  border: 1px solid rgba(0, 255, 240, 0.35); border-radius: 999px; background: rgba(0, 255, 240, 0.06);
  color: #eafffd; font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer;
}
.ps-nav .ps-avatar-btn:hover, .ps-nav .ps-avatar-btn[aria-expanded="true"] { border-color: #ff00ff; }
.ps-nav .ps-avatar-btn:focus-visible { outline: 3px solid #00fff0; outline-offset: 2px; }
.ps-nav .ps-avatar-btn .ps-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ff00ff; color: #000103; font-size: 0.75rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ps-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 1100; min-width: 200px; padding: 6px;
  background: #06101c; border: 1px solid rgba(0, 255, 240, 0.3); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 255, 240, 0.1);
}
.ps-menu[hidden] { display: none; }
.ps-menu a, .ps-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 10px; background: none; color: #eafffd; font: inherit; font-size: 0.95rem;
  text-align: left; text-decoration: none; cursor: pointer;
}
.ps-menu a:hover, .ps-menu a:focus-visible, .ps-menu button:hover, .ps-menu button:focus-visible { background: rgba(0, 255, 240, 0.1); color: #00fff0; outline: none; }
.ps-menu .ps-menu-role { margin: 4px 12px 6px; color: #a9c7d1; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; }
.ps-menu hr { border: 0; border-top: 1px solid rgba(0, 255, 240, 0.15); margin: 4px 0; }
@media (max-width: 960px) {
  .ps-nav .ps-account { justify-self: end; }
  .ps-nav .ps-avatar-btn > span:not(.ps-avatar):not(.ps-badge) { max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.ps-nav .ps-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0, 255, 240, 0.35), rgba(255, 0, 255, 0.25) 70%, #0d1b2a);
  border: 1px solid rgba(0, 255, 240, 0.45); font-size: 17px; font-weight: 800; line-height: 1;
}

/* Toast */
.ps-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000; max-width: min(92vw, 480px); padding: 12px 20px; border-radius: 14px; background: #06101c; border: 1px solid #00fff0; color: #eafffd; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-weight: 600; }


/* ==========================================
   ARRON APP — homepage banner & "Meet Arron"
========================================== */
.ps-arron-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 255, 240, 0.4);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 255, 240, 0.1), rgba(255, 0, 255, 0.1));
}
.ps-arron-banner[hidden] { display: none; }
.ps-arron-banner p { flex: 1 1 16rem; margin: 0; }
.ps-arron-banner .btn { margin: 0; }
.ps-arron-banner-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(0, 255, 240, 0.3);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.ps-arron-banner-orb {
  --size: 40px;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), transparent 22%),
    radial-gradient(circle at 50% 55%, #00fff0, transparent 62%),
    radial-gradient(circle at 70% 75%, #ff00ff, transparent 60%),
    #06121f;
  box-shadow: 0 0 18px rgba(0, 255, 240, 0.45), 0 0 36px rgba(255, 0, 255, 0.25);
  animation: ps-arron-breathe 6s ease-in-out infinite;
}
.ps-arron-banner-orb.lg { --size: 110px; }
@keyframes ps-arron-breathe {
  0%, 100% { transform: scale(0.9); }
  50% { transform: scale(1.06); }
}
.ps-meet-arron {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  border-color: rgba(0, 255, 240, 0.45);
}
.ps-meet-arron > div { flex: 1 1 18rem; }
.ps-meet-arron ul { padding-left: 0; list-style: none; display: grid; gap: 0.4rem; }
.ps-meet-arron-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.ps-meet-arron-actions .btn { margin: 0; }
@media (max-width: 640px) {
  .ps-meet-arron { justify-content: center; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-arron-banner-orb { animation: none; }
}
