:root {
  --pa-unified-bg: #070a10;
  --pa-unified-panel: rgba(18, 25, 36, .78);
  --pa-unified-panel-strong: rgba(22, 31, 45, .94);
  --pa-unified-line: rgba(255, 255, 255, .14);
  --pa-unified-line-strong: rgba(255, 255, 255, .23);
  --pa-unified-text: #f7f9fc;
  --pa-unified-muted: #aab4c3;
  --pa-unified-dim: #788397;
  --pa-unified-orange: #ff7a1a;
  --pa-unified-orange-soft: rgba(255, 122, 26, .18);
  --pa-unified-blue: #53a7ff;
  --pa-unified-green: #2fd477;
  --pa-unified-violet: #a98cff;
  --pa-unified-shadow: 0 26px 90px rgba(0, 0, 0, .42);
  --pa-unified-font: "Avenir Next", "SF Pro Display", ui-rounded, system-ui, sans-serif;
}

html { overflow-x: hidden; color-scheme: dark; background: var(--pa-unified-bg); }

/* Keep typography consistent across the full ProductivityApps site. */
body.pa-unified-theme,
body.pa-unified-theme * {
  font-family: var(--pa-unified-font) !important;
}

body.pa-unified-theme:not(.pa-premium) {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--pa-unified-text);
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 122, 26, .2), transparent 32rem),
    radial-gradient(circle at 16% 18%, rgba(83, 167, 255, .15), transparent 30rem),
    radial-gradient(circle at 60% 76%, rgba(47, 212, 119, .07), transparent 30rem),
    repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.017) 0 1px, transparent 1px 74px),
    var(--pa-unified-bg) !important;
  font-family: var(--pa-unified-font) !important;
}

body.pa-unified-theme:not(.pa-premium)::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(110deg, transparent 0 42%, rgba(255,255,255,.04) 42.2%, transparent 43%),
    radial-gradient(circle at center, transparent 0, rgba(0,0,0,.34) 78%);
}

body.pa-unified-theme:not(.pa-premium) > *:not(.pa-unified-atmosphere):not(.pa-unified-progress) { position: relative; z-index: 1; }
body.pa-unified-theme:not(.pa-premium) :where(h1,h2,h3,h4,.gradient-heading) { font-family: var(--pa-unified-font) !important; text-wrap: balance; }
body.pa-unified-theme:not(.pa-premium) :where(h1,h2) { letter-spacing: -.055em !important; }
body.pa-unified-theme:not(.pa-premium) :where(h1) {
  background: linear-gradient(180deg,#fff 12%,#dbe7f7 54%,#9eabbc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}
body.pa-unified-theme:not(.pa-premium) :where(h2,h3,h4) { color: var(--pa-unified-text) !important; }
body.pa-unified-theme:not(.pa-premium) :where(p,li,dd) { text-wrap: pretty; }

.pa-unified-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: 3px;
  pointer-events: none;
  transform: scaleX(var(--pa-unified-progress,0));
  transform-origin: left;
  background: linear-gradient(90deg,var(--pa-unified-orange),var(--pa-unified-blue),var(--pa-unified-green));
  box-shadow: 0 0 18px rgba(255,122,26,.58);
}

.pa-unified-atmosphere { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.pa-unified-atmosphere::before,
.pa-unified-atmosphere::after { position: absolute; content: ""; border: 1px solid rgba(255,122,26,.2); transform: rotate(38deg); }
.pa-unified-atmosphere::before { width: 18rem; height: 18rem; right: -5rem; top: 18vh; box-shadow: inset 0 0 60px rgba(255,122,26,.035),0 0 80px rgba(255,122,26,.04); }
.pa-unified-atmosphere::after { width: 10rem; height: 10rem; left: -4rem; bottom: 12vh; border-color: rgba(83,167,255,.18); }

body.pa-unified-theme:not(.pa-premium) :where(.site-header,header.fixed) {
  border-bottom: 1px solid var(--pa-unified-line) !important;
  background: rgba(7,10,16,.82) !important;
  box-shadow: 0 16px 50px rgba(0,0,0,.16);
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}
body.pa-unified-theme:not(.pa-premium) header.fixed { min-height: 68px; }
body.pa-unified-theme:not(.pa-premium) header.fixed > div.relative > div.flex.justify-between { height: 68px !important; }
body.pa-unified-theme:not(.pa-premium) :where(.brand img,header img[alt*="Logo" i]) { border: 1px solid var(--pa-unified-line); border-radius: 8px !important; }
body.pa-unified-theme:not(.pa-premium) :where(.nav-links a,header nav a) { color: var(--pa-unified-muted) !important; font-weight: 700 !important; }
body.pa-unified-theme:not(.pa-premium) :where(.nav-links a,header nav a):hover { color: var(--pa-unified-text) !important; }

body.pa-unified-theme:not(.pa-premium) :where(.button,.btn-primary,.btn-secondary,a[class*="bg-gradient"],a[class*="border-white"]) {
  border-radius: 999px !important;
  min-height: 46px;
  border: 1px solid var(--pa-unified-line) !important;
  background: rgba(255,255,255,.055) !important;
  color: var(--pa-unified-text) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09),0 14px 38px rgba(0,0,0,.18) !important;
  transition: transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease !important;
}
body.pa-unified-theme:not(.pa-premium) :where(.button.primary,.btn-primary,a[class*="from-blue"],a[class*="bg-blue"]) {
  border-color: rgba(255,122,26,.72) !important;
  background: linear-gradient(135deg,#ffb25f,var(--pa-unified-orange)) !important;
  color: #111827 !important;
  box-shadow: 0 14px 38px rgba(255,122,26,.24),inset 0 1px 0 rgba(255,255,255,.3) !important;
}
body.pa-unified-theme:not(.pa-premium) :where(.button,.btn-primary,.btn-secondary,a[class*="bg-gradient"]):hover { transform: translateY(-2px); border-color: rgba(255,255,255,.3) !important; }

body.pa-unified-theme:not(.pa-premium) :where(.glass-card,.agent-card-grid a,.agent-card-grid article,.agent-links a,article[class*="border"],details) {
  border: 1px solid var(--pa-unified-line) !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg,rgba(22,31,45,.88),rgba(10,15,24,.82)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055),0 24px 70px rgba(0,0,0,.2) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
body.pa-unified-theme:not(.pa-premium) :where(.glass-card,.agent-card-grid a,.agent-links a):hover { border-color: var(--pa-unified-line-strong) !important; }

body.pa-unified-theme:not(.pa-premium) :where(.eyebrow,.section-index,.agent-kicker,.visual-label,.tour-live-chip) {
  border-color: rgba(255,122,26,.4) !important;
  background: var(--pa-unified-orange-soft) !important;
  color: #ffd8ba !important;
  letter-spacing: .11em !important;
}
body.pa-unified-theme:not(.pa-premium) :where(.accent-word,.wave-text) {
  background: linear-gradient(110deg,#fff,#ffb36e 45%,#83c8ff) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

body.pa-unified-theme:not(.pa-premium) :where(main,section,article,footer) { isolation: isolate; }
body.pa-unified-theme:not(.pa-premium) footer { border-top-color: var(--pa-unified-line) !important; }
body.pa-unified-theme:not(.pa-premium) :where(.section-divider) { background: linear-gradient(90deg,transparent,var(--pa-unified-orange),transparent) !important; opacity: .55; }

body.pa-unified-theme:not(.pa-premium) .agent-page,
body.pa-unified-theme:not(.pa-premium) .agent-discovery-section { --agent-bg: var(--pa-unified-bg); --agent-panel: var(--pa-unified-panel); --agent-accent: #ff9b4c; --agent-text: var(--pa-unified-text); --agent-muted: var(--pa-unified-muted); }
body.pa-unified-theme:not(.pa-premium) .agent-page { background: transparent !important; font-family: var(--pa-unified-font) !important; }
body.pa-unified-theme:not(.pa-premium) .agent-page__hero,
body.pa-unified-theme:not(.pa-premium) .agent-discovery-section__inner { border-color: var(--pa-unified-line) !important; background: linear-gradient(145deg,rgba(22,31,45,.88),rgba(10,15,24,.84)) !important; }

body.pa-unified-theme:not(.pa-premium).pa-next-page main:not(#main-content) { padding-top: clamp(7rem,10vw,9rem) !important; }
body.pa-unified-theme:not(.pa-premium).pa-next-page main > h1 { font-size: clamp(3.4rem,7vw,6.3rem) !important; font-weight: 600 !important; line-height: .95 !important; }
body.pa-unified-theme:not(.pa-premium).pa-next-page main :where(.prose,p,li) { color: var(--pa-unified-muted); }
body.pa-unified-theme:not(.pa-premium).pa-next-page main > .space-y-6 > a { padding: clamp(1.3rem,3vw,2rem) !important; transition: transform .2s ease,border-color .2s ease !important; }
body.pa-unified-theme:not(.pa-premium).pa-next-page main > .space-y-6 > a:hover { transform: translateY(-3px); }

.pa-reveal { opacity: 1; transform: none; }
.pa-unified-motion .pa-reveal:not(.is-visible) { opacity: 0; transform: translateY(22px); }
.pa-unified-motion .pa-reveal { transition: opacity .68s ease,transform .68s cubic-bezier(.2,.7,.2,1); transition-delay: var(--pa-reveal-delay,0ms); }
.pa-unified-motion .pa-reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 767px) {
  body.pa-unified-theme:not(.pa-premium) :where(.nav-links) { gap: 2px; }
  body.pa-unified-theme:not(.pa-premium) :where(.nav-links a) { padding-inline: 10px; font-size: .82rem; }
  body.pa-unified-theme:not(.pa-premium).pa-next-page main:not(#main-content) { padding-top: 6.5rem !important; }
  .pa-unified-atmosphere::before { width: 12rem; height: 12rem; right: -6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pa-reveal,.pa-unified-motion .pa-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .pa-unified-progress { display: none; }
}

/* The homepage keeps its original premium art direction; only its type is shared. */
body.pa-unified-theme { font-family: var(--pa-unified-font) !important; }
body.pa-premium :where(h1,h2,h3,h4,.gradient-heading) {
  font-family: var(--pa-unified-font) !important;
  text-wrap: balance;
}
body.pa-premium #hero-heading,
body.pa-premium section h2,
body.pa-premium section h3 { font-family: var(--pa-unified-font) !important; }
body.pa-premium .pa-unified-atmosphere,
body.pa-premium .pa-unified-progress { display: none; }
body.pa-premium .pa-flow-field {
  position: fixed !important;
  inset: 0 !important;
  z-index: 11 !important;
}

/* Clip Flow retains its cool blue/violet identity. */
body.pa-unified-theme.pa-clipflow-page :where(.accent-word,.hero h1 .accent-word) {
  background: linear-gradient(110deg,#f4f8ff,#83d4ff 48%,#b9a5ff) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}
body.pa-unified-theme.pa-clipflow-page :where(.eyebrow,.section-index,.visual-label,.tour-live-chip) {
  border-color: rgba(84,181,255,.38) !important;
  background: rgba(84,181,255,.16) !important;
  color: #b9e5ff !important;
}

/* Detective Cam's glass reflection language, shared without changing page palettes. */
body.pa-unified-theme:not(.pa-premium):not(.pa-detective-page) :where(
  .button,.btn-primary,.btn-secondary,
  a[class*="bg-gradient"],a[class*="border-white"],
  .glass-card,.agent-card-grid a,.agent-card-grid article,.agent-links a,
  [class*="card"],details
) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
body.pa-unified-theme:not(.pa-premium):not(.pa-detective-page) :where(
  .button,.btn-primary,.btn-secondary,
  a[class*="bg-gradient"],a[class*="border-white"],
  .glass-card,.agent-card-grid a,.agent-card-grid article,.agent-links a,
  [class*="card"],details
)::after {
  position: absolute;
  inset: -45% auto -45% -42%;
  z-index: -1;
  width: 34%;
  pointer-events: none;
  content: "";
  opacity: .42;
  transform: skewX(-18deg) translateX(-220%);
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.2),rgba(255,255,255,.52),rgba(255,255,255,.12),transparent);
  filter: blur(1px);
  animation: pa-glass-reflection 8.4s cubic-bezier(.22,.61,.36,1) infinite;
}
body.pa-unified-theme:not(.pa-premium):not(.pa-detective-page) :where([class*="card"],.glass-card,details)::after {
  width: 22%;
  opacity: .24;
  animation-duration: 11.5s;
  animation-delay: -3.2s;
}
body.pa-unified-theme:not(.pa-premium):not(.pa-detective-page) :where(
  .button,.btn-primary,.btn-secondary,a[class*="bg-gradient"],a[class*="border-white"],
  [class*="card"],.glass-card,details
):hover::after { animation-duration: 2.8s; opacity: .58; }

@keyframes pa-glass-reflection {
  0%,58% { transform: skewX(-18deg) translateX(-240%); }
  76%,100% { transform: skewX(-18deg) translateX(760%); }
}

@media (prefers-reduced-motion: reduce) {
  body.pa-unified-theme :where(.button,.btn-primary,.btn-secondary,[class*="card"],.glass-card,details)::after {
    animation: none !important;
    transform: skewX(-18deg) translateX(220%);
    opacity: .18;
  }
}
