/* light-theme: manual
   NexPal "adventure sticker" style (nexpal.html only, after nexpal-extra.css).
   Rounded playful type (Fredoka), panels like stuck-on stickers with thick rims
   and solid offset shadows, chunky press-down buttons, tilted chips and a paw
   print pattern. Remove the <link> in nexpal.html to revert. Selectors start
   with :root to outrank the generated light-theme rules; light variant at the end. */

:root .nexpal-page {
  --np-head: "Fredoka", "Inter", sans-serif;
  --np-rim: #2a170b;
  --np-panel: #24170f;
  --np-panel-2: #1a2a2e;
  --np-cream: #fcefdc;
  --np-orange: #f08a3c;
  --np-orange-dark: #8a3f14;
  --np-teal: #2bb3c0;
  --np-teal-dark: #0b5560;
  --np-muted: #e3cdb4;
  --np-shadow: #0b0603;
  /* paw prints (inline SVG, tinted via opacity) */
  --np-paws: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23f08a3c' fill-opacity='0.07'%3E%3Cg transform='translate(22 26) rotate(-18)'%3E%3Cellipse cx='0' cy='8' rx='9' ry='7.5'/%3E%3Ccircle cx='-9' cy='-4' r='3.6'/%3E%3Ccircle cx='-3' cy='-9' r='3.6'/%3E%3Ccircle cx='4' cy='-9' r='3.6'/%3E%3Ccircle cx='10' cy='-4' r='3.6'/%3E%3C/g%3E%3Cg transform='translate(84 82) rotate(22)'%3E%3Cellipse cx='0' cy='8' rx='9' ry='7.5'/%3E%3Ccircle cx='-9' cy='-4' r='3.6'/%3E%3Ccircle cx='-3' cy='-9' r='3.6'/%3E%3Ccircle cx='4' cy='-9' r='3.6'/%3E%3Ccircle cx='10' cy='-4' r='3.6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- sticker panels --- */
:root .nexpal-page .nexpal-hero-band,
:root .nexpal-page .nexpal-cycle-step,
:root .nexpal-page .nexpal-progress-band,
:root .nexpal-page .nexpal-cta-band {
  border: 3px solid var(--np-rim);
  border-radius: 26px;
  box-shadow: 7px 7px 0 var(--np-shadow), 0 0 0 1px rgba(252, 239, 220, 0.06) inset;
}

:root .nexpal-page .nexpal-hero-band {
  background:
    var(--np-paws) 0 0 / 120px 120px,
    radial-gradient(circle at 0% 0%, rgba(240, 138, 60, 0.3), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(43, 179, 192, 0.22), transparent 55%),
    var(--np-panel);
  box-shadow: 9px 9px 0 var(--np-orange-dark), 9px 9px 0 3px var(--np-shadow);
}

:root .nexpal-page .nexpal-progress-band,
:root .nexpal-page .nexpal-cta-band {
  background: var(--np-paws) 0 0 / 120px 120px, var(--np-panel);
}

:root .nexpal-page .nexpal-cycle-step {
  background: linear-gradient(170deg, #1f3a3f, var(--np-panel-2));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

/* stickers sit slightly crooked and straighten up on hover */
:root .nexpal-page .nexpal-cycle-step:nth-child(1) { transform: rotate(-1.2deg); }
:root .nexpal-page .nexpal-cycle-step:nth-child(3) { transform: rotate(0.8deg); }
:root .nexpal-page .nexpal-cycle-step:nth-child(5) { transform: rotate(-0.6deg); }

:root .nexpal-page .nexpal-cycle-step:hover {
  transform: rotate(0deg) translate(-3px, -3px);
  box-shadow: 10px 10px 0 var(--np-teal-dark), 10px 10px 0 3px var(--np-shadow);
}

/* --- type --- */
:root .nexpal-page .nexpal-hero-title,
:root .nexpal-page .nexpal-cycle-step h3,
:root .nexpal-page .nexpal-progress-head h2,
:root .nexpal-page .nexpal-cta-band h3,
:root .nexpal-page .nexpal-section-title,
:root .nexpal-page .nexpal-btn,
:root .nexpal-page .nexpal-chip,
:root .nexpal-page .nexpal-tagline,
:root .nexpal-page .nexpal-status-badge,
:root .nexpal-page .nexpal-cycle-num {
  font-family: var(--np-head);
}

:root .nexpal-page .nexpal-hero-title {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--np-cream);
  text-shadow: 3px 3px 0 var(--np-shadow);
}

/* highlight: solid orange with a hand-drawn swoosh underneath */
:root .nexpal-page .nexpal-highlight {
  font-style: normal;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--np-orange);
  padding-bottom: 0.1em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 40 2, 90 2, 120 6 S 180 10, 198 4' fill='none' stroke='%232bb3c0' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.28em;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

:root .nexpal-page .nexpal-cycle-step h3,
:root .nexpal-page .nexpal-progress-head h2,
:root .nexpal-page .nexpal-cta-band h3 {
  font-weight: 600;
  color: var(--np-cream);
}

:root .nexpal-page .nexpal-section-title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--np-orange);
}

:root .nexpal-page .nexpal-section-title::before { content: "🐾 "; }

:root .nexpal-page .nexpal-hero-sub,
:root .nexpal-page .nexpal-cycle-step p,
:root .nexpal-page .nexpal-cta-band p,
:root .nexpal-page .nexpal-progress-list span { color: var(--np-muted); }

/* --- chunky press-down buttons --- */
:root .nexpal-page .nexpal-btn {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 3px solid var(--np-rim);
  border-radius: 999px;
  background: var(--np-orange);
  color: #2a1406;
  box-shadow: 0 5px 0 var(--np-orange-dark), 0 5px 0 3px var(--np-rim);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

:root .nexpal-page .nexpal-btn:hover {
  background: #ffa25a;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--np-orange-dark), 0 7px 0 3px var(--np-rim);
}

:root .nexpal-page .nexpal-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--np-orange-dark), 0 1px 0 3px var(--np-rim);
}

:root .nexpal-page .nexpal-btn-ghost {
  background: var(--np-cream);
  color: #3b2312;
  box-shadow: 0 5px 0 #b89a78, 0 5px 0 3px var(--np-rim);
}

:root .nexpal-page .nexpal-btn-ghost:hover {
  background: #fff7ec;
  box-shadow: 0 7px 0 #b89a78, 0 7px 0 3px var(--np-rim);
}

:root .nexpal-page .nexpal-btn-ghost:active {
  box-shadow: 0 1px 0 #b89a78, 0 1px 0 3px var(--np-rim);
}

/* --- stickers: chips, tagline, badges --- */
:root .nexpal-page .nexpal-chip,
:root .nexpal-page .nexpal-tagline,
:root .nexpal-page .nexpal-status-badge {
  border: 2px solid var(--np-rim);
  background: var(--np-cream);
  color: #3b2312;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--np-shadow);
}

:root .nexpal-page .nexpal-status-badge-live {
  background: #b6f2c4;
  color: #0f4a22;
}

:root .nexpal-page .nexpal-chip:nth-child(odd) { transform: rotate(-2deg); }
:root .nexpal-page .nexpal-chip:nth-child(even) { transform: rotate(1.5deg); }
:root .nexpal-page .nexpal-tagline { transform: rotate(1deg); }
:root .nexpal-page .nexpal-status-badge { transform: rotate(-1.5deg); }

:root .nexpal-page .nexpal-chip i,
:root .nexpal-page .nexpal-tagline i { color: var(--np-orange-dark); }

/* --- loop nodes: bouncy --- */
:root .nexpal-page .nexpal-cycle-node {
  border: 3px solid var(--np-rim);
  background: var(--np-teal);
  box-shadow: 0 4px 0 var(--np-teal-dark), 0 4px 0 3px var(--np-rim);
}

:root .nexpal-page .nexpal-cycle-node i { color: #062a2f; }

:root .nexpal-page .nexpal-cycle-step:hover .nexpal-cycle-node {
  animation: np-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes np-bounce {
  0% { transform: translateY(0) rotate(0); }
  40% { transform: translateY(-8px) rotate(-8deg); }
  100% { transform: translateY(0) rotate(0); }
}

:root .nexpal-page .nexpal-cycle-num {
  border: 2px solid var(--np-rim);
  background: var(--np-orange);
  color: #2a1406;
  font-weight: 700;
}

:root .nexpal-page .nexpal-cycle-arrow { color: var(--np-orange); }

:root .nexpal-page .nexpal-progress-dot {
  border: 2px solid var(--np-rim);
  width: 14px;
  height: 14px;
}

:root .nexpal-page .nexpal-hero-logo img {
  filter: drop-shadow(6px 6px 0 rgba(11, 6, 3, 0.8));
}

@media (prefers-reduced-motion: reduce) {
  :root .nexpal-page .nexpal-cycle-step:hover .nexpal-cycle-node { animation: none; }
}

/* --- light theme: cream paper with ink outlines --- */
html[data-theme="light"] .nexpal-page {
  --np-rim: #3b2312;
  --np-panel: #fff7ec;
  --np-panel-2: #e6f6f7;
  --np-cream: #3b2312;
  --np-muted: #5c4331;
  --np-shadow: #3b2312;
}

html[data-theme="light"] .nexpal-page .nexpal-hero-band {
  background:
    var(--np-paws) 0 0 / 120px 120px,
    radial-gradient(circle at 0% 0%, rgba(240, 138, 60, 0.18), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(43, 179, 192, 0.15), transparent 55%),
    var(--np-panel);
}

html[data-theme="light"] .nexpal-page .nexpal-cycle-step {
  background: linear-gradient(170deg, #f0fbfc, var(--np-panel-2));
}

html[data-theme="light"] .nexpal-page .nexpal-hero-title { text-shadow: 3px 3px 0 rgba(240, 138, 60, 0.35); }

html[data-theme="light"] .nexpal-page .nexpal-highlight { color: #d4661b; }

html[data-theme="light"] .nexpal-page .nexpal-section-title { color: #b4551a; }

html[data-theme="light"] .nexpal-page .nexpal-chip,
html[data-theme="light"] .nexpal-page .nexpal-tagline,
html[data-theme="light"] .nexpal-page .nexpal-status-badge {
  background: #ffffff;
  color: #3b2312;
}

html[data-theme="light"] .nexpal-page .nexpal-status-badge-live { background: #c9f5d3; color: #0f4a22; }

html[data-theme="light"] .nexpal-page .nexpal-btn-ghost {
  background: #ffffff;
  color: #3b2312;
}

html[data-theme="light"] .nexpal-page .nexpal-progress-list strong { color: #3b2312; }

/* --- heading icons: round stickers --- */
:root .nexpal-page .head-ico {
  display: inline-grid;
  place-items: center;
  width: 1.75em;
  height: 1.75em;
  margin-right: 0.5em;
  border-radius: 50%;
  font-size: 0.8em;
  vertical-align: -0.25em;
  color: #2a1406;
  background: var(--np-orange);
  border: 2px solid var(--np-rim);
  box-shadow: 2px 2px 0 var(--np-shadow);
  transform: rotate(-8deg);
}

:root .nexpal-page .nexpal-cta-band h3 .head-ico { background: var(--np-teal); color: #062a2f; }
