/* ============================================================================
   Roxyr Pay (pg.roxyr.com) — Fintech Software Landing System
   Built on design-taste-frontend 2.5: WebGL shader stages (fx.js), lit feature
   panels, real product UI fragments, pulsing flow diagrams (diagram.js),
   line-by-line entrance motion, and official Roxy Cloud character identity.
   ============================================================================ */

:root,
html[data-theme="light"] {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-2: #ecece8;
  --ink: #111214;
  --ink-2: #3d4047;
  --muted: #636770;
  --line: rgba(17, 18, 20, 0.1);
  --line-strong: rgba(17, 18, 20, 0.18);
  --accent: #e04d2c;
  --accent-hot: #ee4d2d;
  --accent-ink: #ffffff;
  --accent-soft: rgba(224, 77, 44, 0.1);
  --accent-line: rgba(224, 77, 44, 0.28);
  --ok: #15803d;
  --ok-soft: rgba(21, 128, 61, 0.11);
  --ok-line: rgba(21, 128, 61, 0.28);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.11);
  --frag: #ffffff;
  --frag-2: #f7f7f5;
  --code-bg: #111317;
  --code-ink: #f4f4f6;
  --nav-bg: rgba(244, 244, 242, 0.92);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
}

html[data-theme="dark"] {
  --bg: #08090b;
  --surface: #131519;
  --surface-2: #1b1e24;
  --ink: #f4f5f7;
  --ink-2: #c6c9d0;
  --muted: #8e939e;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #f25f3a;
  --accent-hot: #ff6e4a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(242, 95, 58, 0.15);
  --accent-line: rgba(242, 95, 58, 0.35);
  --ok: #30d158;
  --ok-soft: rgba(48, 209, 88, 0.14);
  --ok-line: rgba(48, 209, 88, 0.32);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.15);
  --frag: #17191e;
  --frag-2: #1f2229;
  --code-bg: #0d0f13;
  --code-ink: #f4f5f7;
  --nav-bg: rgba(8, 9, 11, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
select {
  font-family: inherit;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.pg-skip-link {
  position: fixed;
  left: 24px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.pg-skip-link:focus {
  top: 14px;
}

.pg-wrap {
  width: min(100% - 64px, 1280px);
  margin: 0 auto;
}

@media (max-width: 767px) {
  .pg-wrap {
    width: calc(100% - 32px);
  }
}

/* ── Fixed Opaque Fintech Header with Real Roxyr Character Logo ──────────── */
.pg-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.pg-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.pg-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
  flex-shrink: 0;
}

.pg-logo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex-shrink: 0;
  transition: transform 180ms var(--ease);
}

.pg-brand:hover .pg-logo-avatar {
  transform: scale(1.05);
}

.pg-brand-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.pg-brand-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}

.pg-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pg-nav-link {
  position: relative;
  padding: 8px 13px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.pg-nav-link:hover {
  color: var(--ink);
  background: color-mix(in oklab, var(--ink) 5%, transparent);
}

.pg-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Tactile Motion Buttons (motion.md: 1px lift on hover, .985 press) ───── */
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease), border-color 150ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .pg-btn:hover {
    transform: translateY(-1px);
    border-color: color-mix(in oklab, var(--ink) 32%, transparent);
  }
}

.pg-btn:active {
  transform: translateY(1px) scale(0.985);
}

.pg-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

@media (hover: hover) and (pointer: fine) {
  .pg-btn-primary:hover {
    background: var(--accent-hot);
    border-color: var(--accent-hot);
  }
}

.pg-btn-sm {
  min-height: 38px;
  padding: 0 13px;
  font-size: 13.5px;
}

.pg-mobile-menu-btn {
  display: none;
}

.pg-mobile-drawer {
  position: fixed;
  inset: 68px 0 0 0;
  z-index: 95;
  background: var(--bg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--line);
}

@media (max-width: 960px) {
  .pg-nav,
  .pg-desktop-only {
    display: none !important;
  }
  .pg-mobile-menu-btn {
    display: inline-flex;
  }
}

/* ── Load Entrance Animation (--ease-enter, once on load) ────────────────── */
@keyframes pgEnterUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pgStageSettle {
  from {
    opacity: 0;
    transform: scale(0.985) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pg-enter-1 {
  animation: pgEnterUp 620ms var(--ease-enter) both;
}
.pg-enter-2 {
  animation: pgEnterUp 680ms 90ms var(--ease-enter) both;
}
.pg-enter-3 {
  animation: pgEnterUp 680ms 180ms var(--ease-enter) both;
}
.pg-enter-stage {
  animation: pgStageSettle 820ms 110ms var(--ease-enter) both;
}

/* ── Section 1: Split Fintech Hero + WebGL Shader Stage ──────────────────── */
.pg-hero {
  padding: 52px 0 72px;
  border-bottom: 1px solid var(--line);
}

.pg-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 44px;
  align-items: center;
}

.pg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 20px;
}

.pg-kicker img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.pg-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.pg-h1 {
  margin: 0;
  font-size: clamp(34px, 3.3vw, 50px);
  line-height: 1.07;
  letter-spacing: -0.035em;
  font-weight: 650;
  text-wrap: balance;
}

.pg-lead {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 48ch;
}

.pg-hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pg-works-with {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.pg-works-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 12px;
}

.pg-icon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pg-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 11px 0 8px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.pg-tool-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Hero Live Shader Stage holding Real Product Console + Overlapping QR Phone */
.pg-hero-stage {
  position: relative;
  isolation: isolate;
  border-radius: 20px;
  padding: 28px 28px 30px;
  min-height: 510px;
  background: linear-gradient(135deg, #dfd4c3 0%, #ccd8e4 52%, #e6cfc2 100%);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pg-stage-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.pg-stage-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(17, 18, 20, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  gap: 3px;
}

.pg-stage-tab {
  border: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}

.pg-stage-tab.is-active {
  background: #ffffff;
  color: #111214;
}

.pg-stage-pause {
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(17, 18, 20, 0.62);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

/* Real Console Window on the Stage */
.pg-showcase-composition {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 212px;
  gap: 16px;
  align-items: end;
}

.pg-live-window {
  background: var(--frag);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.16);
}

.pg-win-head {
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--frag-2);
}

.pg-win-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

.pg-win-brand img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: cover;
}

.pg-win-url {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.pg-win-body {
  padding: 16px;
}

.pg-win-bal-box {
  padding: 14px;
  border-radius: 10px;
  background: var(--frag-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pg-win-bal-lbl {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.pg-win-bal-val {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 2px;
  transition: color 250ms var(--ease);
}

.pg-win-bal-val.is-bump {
  color: var(--ok);
}

.pg-win-delta {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-line);
  transition: transform 240ms var(--ease-enter), opacity 240ms var(--ease);
}

.pg-win-rows {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-win-tx {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  transition: border-color 250ms var(--ease), background-color 250ms var(--ease);
}

.pg-win-tx.is-active-beat {
  border-color: var(--ok-line);
  background: var(--ok-soft);
}

.pg-win-tx code {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
}

.pg-win-tx small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.pg-pill-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.pg-pill-live.is-wait {
  background: var(--warn-soft);
  color: var(--warn);
}

.pg-pill-live.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pg-win-webhook-bar {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pg-wh-ok {
  color: #30d158;
  font-weight: 600;
}

/* Signature ShopeePay QRIS Phone Checkout Card with Animated Laser Sweep */
.pg-phone-checkout {
  background: linear-gradient(180deg, #ee4d2d 0%, #d73211 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  padding: 12px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.pg-phone-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.pg-phone-plate {
  position: relative;
  width: 158px;
  height: 158px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 11px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@keyframes pgScanBeam {
  0%, 100% {
    transform: translateY(-68px);
    opacity: 0;
  }
  15%, 85% {
    opacity: 1;
  }
  50% {
    transform: translateY(68px);
    opacity: 1;
  }
}

.pg-scan-beam {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #ee4d2d, transparent);
  box-shadow: 0 0 10px rgba(238, 77, 45, 0.75);
  animation: pgScanBeam 3.2s ease-in-out infinite;
  pointer-events: none;
}

.pg-hero-stage.is-paused .pg-scan-beam {
  animation-play-state: paused;
}

.pg-phone-paid-badge {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  color: #15803d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease-enter);
  pointer-events: none;
}

.pg-phone-paid-badge.is-shown {
  opacity: 1;
  transform: scale(1);
}

.pg-phone-amt {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pg-phone-sub {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

@media (max-width: 1080px) {
  .pg-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 680px) {
  .pg-hero {
    padding: 32px 0 48px;
  }
  .pg-hero-stage {
    padding: 16px;
    min-height: 0;
  }
  .pg-showcase-composition {
    grid-template-columns: minmax(0, 1fr);
  }
  .pg-phone-checkout {
    max-width: 220px;
    margin: 0 auto;
  }
}

/* ── Shared Section Rhythm & Headings (cards.md / copy.md) ───────────────── */
.pg-section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}

.pg-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.pg-h2 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1.13;
  letter-spacing: -0.03em;
  font-weight: 620;
  text-wrap: balance;
}

.pg-h2 .muted {
  color: var(--muted);
  font-weight: 500;
}

.pg-sec-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .pg-section {
    padding: 56px 0;
  }
  .pg-sec-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 28px;
  }
}

/* ── x.ai / Figma Lit Feature Cards (card > lit shader panel > real UI) ──── */
.pg-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 900px) {
  .pg-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pg-fcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .pg-fcard:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
  }
}

.pg-fcard-copy h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pg-rate-pill {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}

.pg-fcard-copy p {
  margin: 10px 0 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52ch;
}

/* Lit Panel (2-level nesting rule: card > lit panel > real UI fragment) */
.pg-lit-panel {
  position: relative;
  isolation: isolate;
  margin-top: 24px;
  height: 310px;
  border-radius: 13px;
  overflow: hidden;
  padding: 24px 24px 0;
  border: 1px solid rgba(17, 18, 20, 0.08);
}

.pg-lit-panel--sand {
  background: linear-gradient(145deg, #dfd3bf 0%, #ede5d8 100%);
}
.pg-lit-panel--sage {
  background: linear-gradient(145deg, #ced8c7 0%, #dfe7d9 100%);
}
.pg-lit-panel--sky {
  background: linear-gradient(145deg, #c7d5e2 0%, #dae4ed 100%);
}
.pg-lit-panel--warm {
  background: linear-gradient(145deg, #e2cfc4 0%, #efe2da 100%);
}

.pg-ui-cut {
  position: relative;
  z-index: 2;
  background: var(--frag);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  height: 100%;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.pg-ui-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.pg-ui-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pg-ui-tile {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--frag-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
}

.pg-ui-tile span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.pg-ui-tile strong {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
}

.pg-ui-foot-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--ok-soft);
  border: 1px solid var(--ok-line);
  color: var(--ok);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Interactive 0..999 Slot Strip inside Feature Card 1 */
.pg-slot-demo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.pg-slot-cell {
  padding: 10px 6px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--frag-2);
  text-align: center;
  font-family: var(--mono);
  transition: transform 200ms var(--ease-enter), background-color 200ms var(--ease), border-color 200ms var(--ease);
}

.pg-slot-cell strong {
  display: block;
  font-size: 13px;
}

.pg-slot-cell small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
  font-family: var(--sans);
}

.pg-slot-cell.is-picked {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.pg-slot-cell.is-picked small {
  color: var(--accent);
  font-weight: 600;
}

.pg-slot-cell.is-busy {
  background: var(--ok-soft);
  border-color: var(--ok-line);
  color: var(--ok);
}

/* Unified Account Roxy Character Showcase inside Feature Card 4 */
.pg-roxy-ecosystem {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 12px;
  background: var(--frag-2);
  border: 1px solid var(--line);
}

.pg-roxy-crest {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--accent-line);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  flex-shrink: 0;
}

.pg-eco-bridges {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.pg-eco-node {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--frag-2);
  font-size: 12.5px;
}

.pg-eco-node strong {
  display: block;
  font-size: 13px;
}

.pg-eco-node span {
  font-size: 11.5px;
  color: var(--muted);
}

/* ── Section 4: Split Fee Schedule + Pulsing Flow Diagram (diagram.js) ───── */
.pg-arch-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 36px;
  align-items: stretch;
}

@media (max-width: 980px) {
  .pg-arch-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pg-fee-ledger {
  border-top: 1px solid var(--line-strong);
}

.pg-fee-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.pg-fee-item strong {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
}

.pg-fee-item small {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 2px;
}

.pg-fee-val {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}

.pg-diagram-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  --ink: #111214;
  --muted: #636770;
  --accent: #e04d2c;
}

html[data-theme="dark"] .pg-diagram-card {
  --ink: #f4f5f7;
  --muted: #8e939e;
  --accent: #f25f3a;
}

.pg-diagram-stage {
  width: 100%;
  height: 320px;
}

/* ── Section 5: Developer Code Tabs & Closing Character CTA ──────────────── */
.pg-dev-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 36px;
  align-items: center;
}

@media (max-width: 960px) {
  .pg-dev-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pg-code-window {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.pg-code-bar {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pg-lang-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pg-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(244, 245, 247, 0.68);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.pg-lang-btn img {
  width: 14px;
  height: 14px;
}

.pg-lang-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.pg-copy-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.pg-code-pre {
  margin: 0;
  padding: 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  color: #e5e7eb;
}

/* Closing Section + Footer */
.pg-closing {
  padding: 72px 0 44px;
}

.pg-close-banner {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.pg-close-left {
  display: flex;
  align-items: center;
  gap: 22px;
}

.pg-close-Mascot {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex-shrink: 0;
}

.pg-close-left h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.025em;
}

.pg-close-left p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}

.pg-footer-meta {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}

.pg-footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.pg-footer-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}

.pg-footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .pg-close-banner {
    padding: 24px 20px;
  }
  .pg-close-left {
    flex-direction: column;
    align-items: flex-start;
  }
  .pg-lit-panel {
    height: 300px;
    padding: 16px 14px 0;
  }
  .pg-slot-demo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
