:root {
  --phoenixrise-hero-ink: #07152d;
  --phoenixrise-hero-edge: #91ddeb;
  --phoenixrise-hero-glow: #f8fdff;
  --phoenixrise-page-bg: #ffffff;
  --phoenixrise-hero-accent: #065399;
  --phoenixrise-font: "Plus Jakarta Sans", sans-serif;
  --phoenixrise-gradient: url("../image/phoenixrise/phoenixrise-landing-background.png");
  --phoenixrise-sidebar-active: #7138c8;
  --phoenixrise-sidebar-text: #07152d;
  --phoenixrise-sidebar-hover: #344159;
  --phoenixrise-surface: #ffffff;
  --phoenixrise-tint: #dbf3ff;
  --phoenixrise-link: #03045e;
  --phoenixrise-rule: #c6ccd6;
  --phoenixrise-sidebar-bg: rgba(255, 255, 255, 0.97);
  /* The egg's tooltip, toasts and skip button */
  --phoenixrise-bubble: #0e0a1c;
}

/* Dark mode keeps the PhoenixRise blue, lightened for contrast on the
   homepage's dark background */
:root[data-portfolio-theme="dark"] {
  --phoenixrise-hero-ink: #f5f1fa;
  --phoenixrise-hero-edge: #0b2340;
  --phoenixrise-page-bg: #0e0a1c;
  --phoenixrise-hero-accent: #7cc7f2;
  --phoenixrise-sidebar-active: #c9a8ff;
  --phoenixrise-sidebar-text: #f5f1fa;
  --phoenixrise-sidebar-hover: #c9a8ff;
  --phoenixrise-surface: #171128;
  --phoenixrise-tint: #13304a;
  --phoenixrise-link: #a9dcff;
  --phoenixrise-rule: #4a4560;
  --phoenixrise-sidebar-bg: rgba(14, 10, 28, 0.97);
  /* Lifted off the dark page so the bubbles stay visible */
  --phoenixrise-bubble: #2b2247;
}

:root[data-portfolio-theme="dark"] .phoenixrise-hero-shell {
  background-blend-mode: multiply;
}

/* These research screenshots have dark text on a transparent background,
   so they sit on a light panel in dark mode */
:root[data-portfolio-theme="dark"] .phoenixrise-defining-problem__examples img,
:root[data-portfolio-theme="dark"]
  .phoenixrise-exploring-solutions__examples
  img,
:root[data-portfolio-theme="dark"] .phoenixrise-competitor-analysis__image {
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f5f1fa;
}

:root[data-portfolio-theme="dark"] .phoenixrise-page img[src*="scribble"] {
  filter: brightness(2.2);
}

:root[data-portfolio-theme="dark"] .phoenixrise-hero-shell::after {
  background: linear-gradient(
    to bottom,
    rgba(14, 10, 28, 0) 0%,
    var(--phoenixrise-page-bg) 100%
  );
}

body.phoenixrise-page {
  margin: 0;
  padding: 0;
  color: var(--phoenixrise-hero-ink);
  background: var(--phoenixrise-page-bg);
  font-family: var(--phoenixrise-font);
}

.phoenixrise-hero-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--phoenixrise-hero-edge);
  background-image: var(--phoenixrise-gradient);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.phoenixrise-hero-shell::after {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 30%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.025) 12%,
    rgba(255, 255, 255, 0.07) 24%,
    rgba(255, 255, 255, 0.15) 38%,
    rgba(255, 255, 255, 0.29) 53%,
    rgba(255, 255, 255, 0.49) 68%,
    rgba(255, 255, 255, 0.71) 81%,
    rgba(255, 255, 255, 0.88) 91%,
    rgba(255, 255, 255, 0.97) 97%,
    var(--phoenixrise-page-bg) 100%
  );
  content: "";
  pointer-events: none;
}

.phoenixrise-page .portfolio-header {
  position: relative;
  z-index: 3;
  width: 100%;
  margin: 0;
  color: var(--phoenixrise-hero-ink);
  background: transparent;
  font-family: var(--phoenixrise-font);
}

.phoenixrise-page .portfolio-nav {
  background: transparent;
}

.phoenixrise-hero {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - clamp(40px, 8vw, 128px)));
  margin: 0 auto;
  padding: clamp(52px, 4.3vw, 66px) 0 0;
  text-align: center;
}

.phoenixrise-hero__intro {
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.phoenixrise-hero h1 {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--phoenixrise-hero-ink);
  /* Fraunces at its softest: a warm, rounded serif that feels hopeful and
     human, echoing the app's soft UI. The rest of the page stays in Plus
     Jakarta Sans. */
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(46px, 5.2vw, 80px);
  font-weight: 600;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-align: center;
}

.phoenixrise-hero__intro p {
  margin: clamp(12px, 1.6vw, 22px) 0 0;
  color: var(--phoenixrise-hero-ink);
  font-family: var(--phoenixrise-font);
  font-size: clamp(20px, 2.35vw, 36px);
  font-weight: 400;
  line-height: 1.4;
}

.phoenixrise-phones-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: clamp(32px, 2.8vw, 42px) auto 0;
}

.phoenixrise-phones {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 46%,
    rgba(0, 0, 0, 0.94) 52%,
    rgba(0, 0, 0, 0.7) 62%,
    rgba(0, 0, 0, 0.46) 72%,
    rgba(0, 0, 0, 0.25) 82%,
    rgba(0, 0, 0, 0.09) 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 46%,
    rgba(0, 0, 0, 0.94) 52%,
    rgba(0, 0, 0, 0.7) 62%,
    rgba(0, 0, 0, 0.46) 72%,
    rgba(0, 0, 0, 0.25) 82%,
    rgba(0, 0, 0, 0.09) 93%,
    transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

html {
  scroll-behavior: smooth;
}

.phoenixrise-case-study {
  display: grid;
  box-sizing: border-box;
  width: min(1320px, calc(100% - clamp(40px, 8vw, 128px)));
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(36px, 5vw, 72px);
  margin: 0 auto;
  padding: 40px 0 96px;
  background: var(--phoenixrise-page-bg);
}

.phoenixrise-section-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.phoenixrise-section-sidebar::-webkit-scrollbar,
.phoenixrise-section-nav__panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.phoenixrise-section-nav {
  position: static;
  display: block;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--phoenixrise-sidebar-text);
  background: transparent;
  animation: none;
  font-family: var(--phoenixrise-font);
}

.phoenixrise-section-nav__mobile-toggle {
  display: none;
}

.phoenixrise-section-nav__panel {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: none;
}

.phoenixrise-section-nav__groups,
.phoenixrise-section-nav__submenu ul {
  position: static;
  right: auto;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  transform: none;
  list-style: none;
}

/* main2.css nudges every "nav ul li" down 0.4rem (for the old top menu);
   inside a group's clipped list that cut off the bottom of the last link,
   so the nudge is undone here */
.phoenixrise-section-nav .phoenixrise-section-nav__groups li {
  margin: 0;
  padding: 0;
  line-height: 1.35;
  transform: none;
}

.phoenixrise-section-nav__group + .phoenixrise-section-nav__group,
.phoenixrise-section-nav__standalone,
.phoenixrise-section-nav__standalone + .phoenixrise-section-nav__group {
  margin-top: 14px !important;
}

.phoenixrise-section-nav__group-toggle,
.phoenixrise-section-nav__standalone a {
  display: flex;
  width: 100%;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  border: 0;
  color: var(--phoenixrise-sidebar-text);
  background: transparent;
  font: 600 16px/1.4 var(--phoenixrise-font);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.phoenixrise-section-nav__group-toggle:hover,
.phoenixrise-section-nav__standalone a:hover,
.phoenixrise-section-nav__submenu a:hover {
  color: var(--phoenixrise-sidebar-hover);
  text-decoration: underline;
  text-decoration-color: var(--phoenixrise-rule);
  text-underline-offset: 3px;
}

.phoenixrise-section-nav__group-toggle[aria-current="true"],
.phoenixrise-section-nav__standalone a[aria-current="true"] {
  color: var(--phoenixrise-sidebar-active);
  font-weight: 700;
}

.phoenixrise-section-nav__group-toggle svg,
.phoenixrise-section-nav__mobile-toggle svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 220ms ease;
}

.phoenixrise-section-nav__group-toggle svg {
  display: none;
}

.phoenixrise-section-nav__group[data-expanded="false"]
  .phoenixrise-section-nav__group-toggle
  svg {
  transform: rotate(-90deg);
}

.phoenixrise-section-nav__submenu {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 240ms ease,
    opacity 180ms ease;
}

.phoenixrise-section-nav__group[data-expanded="false"]
  .phoenixrise-section-nav__submenu {
  grid-template-rows: 0fr;
  opacity: 0;
}

.phoenixrise-section-nav__submenu > ul {
  min-height: 0;
  overflow: hidden;
  padding-left: 16px;
}

.phoenixrise-section-nav__submenu a {
  display: block;
  padding: 5px 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
}

.phoenixrise-section-nav__standalone a:link,
.phoenixrise-section-nav__standalone a:visited,
.phoenixrise-section-nav__submenu a:link,
.phoenixrise-section-nav__submenu a:visited {
  color: var(--phoenixrise-sidebar-text);
}

.phoenixrise-section-nav__standalone a:link:hover,
.phoenixrise-section-nav__submenu a:link:hover,
.phoenixrise-section-nav__standalone a:visited:hover,
.phoenixrise-section-nav__submenu a:visited:hover {
  color: var(--phoenixrise-sidebar-hover);
}

.phoenixrise-section-nav__standalone a[aria-current="true"],
.phoenixrise-section-nav
  .phoenixrise-section-nav__standalone
  a[aria-current="true"],
.phoenixrise-section-nav
  .phoenixrise-section-nav__submenu
  a[aria-current="true"] {
  color: var(--phoenixrise-sidebar-active);
  font-weight: 700;
}

.phoenixrise-section-nav__submenu a[aria-current="true"] {
  color: var(--phoenixrise-sidebar-active);
  font-weight: 700;
}

.phoenixrise-section-nav a:focus-visible,
.phoenixrise-section-nav button:focus-visible {
  outline: 2px solid var(--phoenixrise-sidebar-active);
  outline-offset: 3px;
}

.phoenixrise-case-study__content {
  min-width: 0;
}

.phoenixrise-background {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-background__copy {
  min-width: 0;
}

.phoenixrise-background h2 {
  margin: 0 0 14px;
  color: var(--phoenixrise-hero-accent);
  font-family: var(--phoenixrise-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.phoenixrise-background p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-background .phoenixrise-background__lead {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.phoenixrise-background__prototype-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--phoenixrise-hero-accent);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phoenixrise-background__prototype-link img {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
  transition: transform 220ms ease;
}

.phoenixrise-background__prototype-link:hover img,
.phoenixrise-background__prototype-link:focus-visible img {
  transform: translateY(4px);
}

.phoenixrise-background__prototype-link:focus-visible {
  outline: 2px solid var(--phoenixrise-sidebar-active);
  outline-offset: 4px;
}

.phoenixrise-background__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* The image comes after the text in the HTML (the reading and phone order);
   on wide screens it's placed in the left column */
.phoenixrise-opportunity {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  grid-template-areas: "image copy";
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-opportunity__image {
  grid-area: image;
  display: block;
  width: calc(100% - clamp(24px, 4vw, 56px));
  max-width: 460px;
  height: auto;
  margin-left: clamp(24px, 4vw, 56px);
  object-fit: contain;
}

.phoenixrise-opportunity__copy {
  grid-area: copy;
  min-width: 0;
}

.phoenixrise-opportunity h2 {
  margin: 0 0 14px;
  color: var(--phoenixrise-hero-accent);
  font-family: var(--phoenixrise-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.phoenixrise-opportunity p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-opportunity .phoenixrise-opportunity__lead {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

/* Below 1100px the text and image columns get cramped, so each section
   stacks: heading and text, then its own illustration. The gap within a
   section (28px) is clearly smaller than the gap between Background's
   image and the Opportunity heading (60px). */
@media (max-width: 1100px) {
  .phoenixrise-background,
  .phoenixrise-opportunity {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .phoenixrise-opportunity {
    grid-template-areas:
      "copy"
      "image";
  }

  .phoenixrise-background {
    padding-bottom: 0;
  }

  .phoenixrise-opportunity {
    padding-top: 60px;
  }

  .phoenixrise-background__image,
  .phoenixrise-opportunity__image {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }
}

.phoenixrise-solution {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-defining-problem {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-design-goals {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-gamification {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-ai-development {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}
.phoenixrise-usability-testing {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-prototype {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-design-rationale {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-what-i-learned,
.phoenixrise-future-steps,
.phoenixrise-references,
.phoenixrise-more-case-studies {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-solution > h2,
.phoenixrise-defining-problem > h2,
.phoenixrise-competitor-analysis > h2,
.phoenixrise-exploring-solutions > h2,
.phoenixrise-design-goals > h2,
.phoenixrise-gamification > h2,
.phoenixrise-ai-development > h2,
.phoenixrise-usability-testing > h2,
.phoenixrise-prototype > h2,
.phoenixrise-design-rationale > h2,
.phoenixrise-what-i-learned > h2,
.phoenixrise-future-steps > h2,
.phoenixrise-references > h2,
.phoenixrise-more-case-studies > h2,
.phoenixrise-user-feedback > h2,
.phoenixrise-user-flow > h2 {
  margin: 0 0 14px;
  color: var(--phoenixrise-hero-accent);
  font-family: var(--phoenixrise-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.phoenixrise-solution > p,
.phoenixrise-defining-problem > p,
.phoenixrise-competitor-analysis > p,
.phoenixrise-exploring-solutions > p,
.phoenixrise-design-goals > p,
.phoenixrise-user-feedback > p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-solution > .phoenixrise-solution__lead,
.phoenixrise-defining-problem > .phoenixrise-defining-problem__lead,
.phoenixrise-competitor-analysis > .phoenixrise-competitor-analysis__lead,
.phoenixrise-exploring-solutions > .phoenixrise-exploring-solutions__lead,
.phoenixrise-design-goals > .phoenixrise-design-goals__lead,
.phoenixrise-ai-development > .phoenixrise-ai-development__lead,
.phoenixrise-user-feedback > .phoenixrise-user-feedback__lead {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.phoenixrise-defining-problem__examples {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

.phoenixrise-defining-problem__examples img {
  display: block;
  width: 100%;
  height: auto;
}

.phoenixrise-competitor-analysis {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-user-flow {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-user-flow__image {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 28px;
}

.phoenixrise-user-flow .phoenixrise-solution-conclusion {
  margin-top: clamp(24px, 3vw, 40px);
}

.phoenixrise-user-flow__reasoning {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--phoenixrise-hero-accent);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phoenixrise-user-flow__reasoning img {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
  transition: transform 220ms ease;
}

.phoenixrise-user-flow__reasoning:hover img,
.phoenixrise-user-flow__reasoning:focus-visible img {
  transform: translateY(4px);
}

.phoenixrise-user-flow__reasoning:focus-visible {
  outline: 2px solid var(--phoenixrise-sidebar-active);
  outline-offset: 4px;
}

.phoenixrise-competitor-analysis__image {
  display: block;
  width: 100%;
  height: auto;
}

.phoenixrise-exploring-solutions {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-exploring-solutions__examples {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

.phoenixrise-exploring-solutions__examples img {
  display: block;
  width: min(100%, 840px);
  height: auto;
}

.phoenixrise-design-goals__rows {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  margin-top: 28px;
}

.phoenixrise-design-goal {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
}

.phoenixrise-design-goal__copy {
  min-width: 0;
}

.phoenixrise-design-goal h3 {
  position: relative;
  margin: 0 0 14px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-highlight-target {
  position: relative;
  scroll-margin-top: 92px;
}

/* "Reasoning behind question formats" lands on this whole row, so its
   heading, text and image are all in view */
.phoenixrise-design-rationale__row--linked {
  scroll-margin-top: 92px;
}

/* The linked answer glows briefly, like the About page's highlight, without
   moving the text */
.phoenixrise-highlight-target.is-highlighted {
  border-radius: 6px;
  animation: phoenixrise-goal-cue 3.6s ease-out both;
}

@keyframes phoenixrise-goal-cue {
  from,
  30% {
    background: color-mix(in srgb, var(--phoenixrise-hero-accent) 16%, transparent);
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--phoenixrise-hero-accent) 16%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phoenixrise-highlight-target.is-highlighted {
    animation: none;
    background: color-mix(in srgb, var(--phoenixrise-hero-accent) 16%, transparent);
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--phoenixrise-hero-accent) 16%, transparent);
  }
}

.phoenixrise-design-goal p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-design-goal p:last-child {
  margin-bottom: 0;
}

.phoenixrise-design-goal__image {
  display: block;
  width: 100%;
  height: auto;
}

.phoenixrise-design-rationale__rows {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  margin-top: 28px;
}

.phoenixrise-design-rationale__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
}

.phoenixrise-design-rationale__copy {
  min-width: 0;
}

.phoenixrise-design-rationale__copy h3 {
  margin: 0 0 14px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-design-rationale__copy p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-design-rationale__copy p:last-child {
  margin-bottom: 0;
}

.phoenixrise-design-rationale__image {
  display: block;
  width: 100%;
  height: auto;
}

.phoenixrise-design-rationale .phoenixrise-solution-conclusion {
  margin-top: clamp(36px, 5vw, 64px);
}

.phoenixrise-gamification__rows {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  margin-top: 28px;
}

.phoenixrise-gamification__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
}

.phoenixrise-gamification__copy {
  min-width: 0;
}

.phoenixrise-gamification__copy h3 {
  margin: 0 0 14px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-gamification__copy p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-gamification__copy p:last-child {
  margin-bottom: 0;
}

.phoenixrise-gamification__image {
  display: block;
  width: 100%;
  height: auto;
}

.phoenixrise-gamification .phoenixrise-solution-conclusion {
  margin-top: clamp(36px, 5vw, 64px);
}

.phoenixrise-ai-development > p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-ai-development > p:last-of-type {
  margin-bottom: 0;
}

.phoenixrise-ai-development__rows {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  margin-top: 28px;
}

.phoenixrise-ai-development__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
}

.phoenixrise-ai-development__copy {
  min-width: 0;
}

.phoenixrise-ai-development__copy h3 {
  margin: 0 0 14px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-ai-development__copy p {
  margin: 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-ai-development__image,
.phoenixrise-ai-development__flow-image {
  display: block;
  width: 100%;
  height: auto;
}

.phoenixrise-ai-development > .phoenixrise-solution-conclusion {
  margin-top: clamp(36px, 5vw, 64px);
}

.phoenixrise-ai-development__flow-control {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.phoenixrise-ai-development__flow-toggle {
  min-height: 44px;
  padding: 9px 22px;
  border: 1px solid var(--phoenixrise-hero-accent);
  border-radius: 999px;
  color: var(--phoenixrise-sidebar-text);
  background: var(--phoenixrise-surface);
  font: 500 16px/1.4 var(--phoenixrise-font);
  cursor: pointer;
}

.phoenixrise-ai-development__flow-toggle:hover {
  background: var(--phoenixrise-tint);
}

.phoenixrise-ai-development__flow-toggle:focus-visible {
  outline: 2px solid var(--phoenixrise-hero-accent);
  outline-offset: 3px;
}

.phoenixrise-ai-development__flow {
  margin-top: 28px;
}

.phoenixrise-ai-development__flow[hidden] {
  display: none;
}

.phoenixrise-ai-development__flow .phoenixrise-solution-conclusion {
  margin-top: clamp(24px, 3vw, 40px);
}

.phoenixrise-usability-testing__details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
  margin: 28px 0 36px;
}

.phoenixrise-usability-testing__details dt {
  margin-bottom: 8px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-usability-testing__details dd {
  margin: 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 16px;
  line-height: 1.6;
}

/* Secondary line under a value, muted the same way as the "Before" labels
   below (the text colour at 70%) */
.phoenixrise-usability-testing__detail-note {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.7;
}

.phoenixrise-nowrap {
  white-space: nowrap;
}

.phoenixrise-usability-testing__lead {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.phoenixrise-usability-testing > p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-usability-testing__rows {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  margin-top: clamp(36px, 5vw, 52px);
}

.phoenixrise-usability-testing__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
}

.phoenixrise-usability-testing__copy {
  min-width: 0;
}

.phoenixrise-usability-testing__copy h3 {
  margin: 0 0 14px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-usability-testing__copy p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-usability-testing__copy p:last-child {
  margin-bottom: 0;
}

.phoenixrise-usability-testing__compare {
  min-width: 0;
}

.phoenixrise-usability-testing__image {
  display: block;
  width: 100%;
  height: auto;
}

/* Each image shows the old screen on the left and the redesign on the
   right; the labels sit centred over each phone as plain text. "Before" is
   muted and "After" carries the accent, so the eye lands on the
   improvement. */
.phoenixrise-usability-testing__labels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5%;
  margin: 0 0 10px;
}

.phoenixrise-usability-testing__labels span {
  justify-self: center;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  opacity: 0.7;
}

.phoenixrise-usability-testing__labels span:last-child {
  color: var(--phoenixrise-sidebar-active);
  opacity: 1;
}

.phoenixrise-usability-testing .phoenixrise-solution-conclusion {
  margin-top: clamp(36px, 5vw, 64px);
}

.phoenixrise-usability-testing__report {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.phoenixrise-usability-testing__report-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  border: 1px solid var(--phoenixrise-hero-accent);
  border-radius: 999px;
  color: var(--phoenixrise-sidebar-text);
  background: var(--phoenixrise-surface);
  font-family: var(--phoenixrise-font);
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.phoenixrise-usability-testing__report-link:hover {
  background: var(--phoenixrise-tint);
}

.phoenixrise-usability-testing__report-link:focus-visible {
  outline: 2px solid var(--phoenixrise-hero-accent);
  outline-offset: 3px;
}

/* ----- Usability testing report (js/usability-report.js) ----- */

button.phoenixrise-usability-testing__report-link {
  margin: 0;
  cursor: pointer;
}

/* One page at a time, like the AI flow image, capped so the report's text
   stays a comfortable reading size */
.phoenixrise-report {
  max-width: 860px;
  margin: 28px auto 0;
  scroll-margin-top: 28px;
}

.phoenixrise-report[hidden],
.phoenixrise-report__page[hidden],
.phoenixrise-report__nav[hidden] {
  display: none;
}

.phoenixrise-report__page {
  margin: 0;
}

.phoenixrise-report__page img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--phoenixrise-rule);
  border-radius: 8px;
  background: #ffffff;
}

/* The page's text, for screen readers */
.phoenixrise-report__page-text {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

.phoenixrise-report__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.phoenixrise-report__arrow {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--phoenixrise-hero-accent);
  border-radius: 50%;
  color: var(--phoenixrise-sidebar-text);
  background: var(--phoenixrise-surface);
  cursor: pointer;
}

.phoenixrise-report__arrow:hover {
  background: var(--phoenixrise-tint);
}

.phoenixrise-report__arrow:focus-visible {
  outline: 2px solid var(--phoenixrise-hero-accent);
  outline-offset: 3px;
}

.phoenixrise-report__arrow[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}

.phoenixrise-report__arrow[aria-disabled="true"]:hover {
  background: var(--phoenixrise-surface);
}

.phoenixrise-report__arrow svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phoenixrise-report .phoenixrise-report__count {
  min-width: 96px;
  margin: 0;
  color: var(--phoenixrise-sidebar-text);
  font: 600 16px/1.4 var(--phoenixrise-font);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.phoenixrise-usability-testing__follow-up {
  margin-top: clamp(36px, 5vw, 64px);
}

.phoenixrise-usability-testing__follow-up h3 {
  margin: 0 0 14px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-usability-testing__follow-up p {
  margin: 0 0 16px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-usability-testing__follow-up p:last-child {
  margin-bottom: 0;
}

/* Demo video (js/youtube-embed.js). The frame keeps the video's 16:9 shape
   from the start, so swapping the thumbnail for the player doesn't move
   anything around it. */
.phoenixrise-prototype__video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 28px;
  border-radius: 10px;
  background: #a3e1ee;
}

/* Rounds the player's corners; the thumbnail rounds its own so its focus
   ring can sit outside the frame */
.phoenixrise-prototype__video.is-playing {
  overflow: hidden;
}

.phoenixrise-prototype__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.phoenixrise-prototype__play-button {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  cursor: pointer;
}

.phoenixrise-prototype__play-button[aria-busy="true"] {
  cursor: progress;
}

/* A gentle pulse while YouTube's player loads */
.phoenixrise-prototype__play-button[aria-busy="true"] .phoenixrise-prototype__play {
  animation: phoenixrise-play-loading 1s ease-in-out infinite alternate;
}

@keyframes phoenixrise-play-loading {
  to {
    opacity: 0.55;
  }
}

/* The ring sits inside the button, on the light poster, in both themes */
.phoenixrise-prototype__play-button:focus-visible {
  outline: 3px solid #065399;
  outline-offset: -6px;
}

/* The lightbox's purple ring is too faint on the hero's light blue */
.phoenixrise-phones-frame .phoenixrise-phones:focus-visible {
  outline-color: var(--phoenixrise-hero-accent);
}

/* The phones sit in the middle of the image, so the 16:9 crop only trims
   plain background from the top and bottom */
.phoenixrise-prototype__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Round play button in the middle of the thumbnail */
.phoenixrise-prototype__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  color: var(--phoenixrise-page-bg);
  background: var(--phoenixrise-hero-accent);
  box-shadow: 0 10px 30px rgb(7 21 45 / 28%);
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

/* Nudged right so the triangle looks centred in the circle */
.phoenixrise-prototype__play svg {
  display: block;
  width: 34px;
  height: 34px;
  margin-left: 4px;
  fill: currentColor;
}

.phoenixrise-prototype__play-button:hover .phoenixrise-prototype__play,
.phoenixrise-prototype__play-button:focus-visible .phoenixrise-prototype__play {
  box-shadow: 0 14px 36px rgb(7 21 45 / 36%);
  transform: translate(-50%, -50%) scale(1.06);
}

/* Shown in place of the player if it can't load */
.phoenixrise-prototype__video .youtube-embed__error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-radius: inherit;
  color: #07152d;
  background: #dbf3ff;
  font-family: var(--phoenixrise-font);
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.phoenixrise-prototype__video .youtube-embed__error:focus {
  outline: none;
}

.phoenixrise-prototype__video .youtube-embed__error p {
  margin: 0;
  color: inherit;
  font: inherit;
}

.phoenixrise-prototype__video .youtube-embed__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
}

.phoenixrise-prototype__video .youtube-embed__retry {
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #065399;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.phoenixrise-prototype__video .youtube-embed__retry:hover {
  background: #043f75;
}

.phoenixrise-prototype__video .youtube-embed__retry:focus-visible {
  outline: 2px solid #065399;
  outline-offset: 3px;
}

.phoenixrise-prototype__video .youtube-embed__error a {
  color: #065399;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phoenixrise-prototype__video .youtube-embed__error a:focus-visible {
  outline: 2px solid #065399;
  outline-offset: 3px;
}

.phoenixrise-prototype__action {
  display: flex;
  justify-content: center;
  margin-top: clamp(28px, 4vw, 40px);
}

.phoenixrise-prototype__try-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  border: 1px solid var(--phoenixrise-hero-accent);
  border-radius: 999px;
  color: var(--phoenixrise-sidebar-text);
  background: var(--phoenixrise-surface);
  font-family: var(--phoenixrise-font);
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.phoenixrise-prototype__try-link:hover {
  background: var(--phoenixrise-tint);
}

.phoenixrise-prototype__try-link:focus-visible {
  outline: 2px solid var(--phoenixrise-hero-accent);
  outline-offset: 3px;
}

.phoenixrise-design-goals .phoenixrise-solution-conclusion {
  margin-top: clamp(36px, 5vw, 64px);
}

.phoenixrise-user-feedback {
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-reflection__items {
  display: grid;
  gap: clamp(32px, 4vw, 48px);
  margin-top: 28px;
}

.phoenixrise-reflection__items h3 {
  margin: 0 0 8px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-reflection__items p {
  margin: 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-references__details {
  width: min(100%, 960px);
  box-sizing: border-box;
  margin: 28px 0 0;
  overflow: hidden;
  border: 2px solid var(--phoenixrise-tint);
  border-radius: 10px;
}

.phoenixrise-references__summary {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  color: var(--phoenixrise-sidebar-text);
  background: var(--phoenixrise-tint);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.phoenixrise-references__summary::-webkit-details-marker {
  display: none;
}

.phoenixrise-references__summary:focus-visible {
  outline: 2px solid var(--phoenixrise-hero-accent);
  outline-offset: -4px;
}

.phoenixrise-references__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--phoenixrise-hero-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.phoenixrise-references__chevron {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.phoenixrise-references__details[open] .phoenixrise-references__chevron {
  transform: rotate(180deg);
}

.phoenixrise-references__list {
  display: grid;
  gap: 28px;
  padding: clamp(20px, 3vw, 32px);
  border-top: 1px solid var(--phoenixrise-tint);
}

.phoenixrise-references__list h3 {
  margin: 0 0 8px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-references__list p {
  margin: 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.phoenixrise-reference__number {
  margin-right: 0.35em;
  font-weight: 700;
  white-space: nowrap;
}

.phoenixrise-references__list a {
  color: var(--phoenixrise-hero-accent);
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phoenixrise-citation {
  font-size: 0.72em;
  line-height: 0;
  vertical-align: super;
}

.phoenixrise-citation a {
  color: var(--phoenixrise-link);
  font-size: inherit;
  text-decoration: none;
  text-underline-offset: 2px;
}

.phoenixrise-citation a:hover {
  color: var(--phoenixrise-hero-accent);
  text-decoration: underline;
}

.phoenixrise-citation a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--phoenixrise-hero-accent);
  outline-offset: 2px;
}

.phoenixrise-references__list article:focus {
  outline: 2px solid var(--phoenixrise-hero-accent);
  outline-offset: 4px;
}

.phoenixrise-user-feedback__findings {
  display: grid;
  max-width: 760px;
  gap: clamp(36px, 5vw, 56px);
  margin-top: clamp(40px, 5vw, 60px);
}

.phoenixrise-user-feedback__findings h3 {
  margin: 0 0 14px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-user-feedback__findings p {
  margin: 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-user-feedback .phoenixrise-solution-conclusion {
  margin-top: clamp(36px, 5vw, 64px);
}

.phoenixrise-user-feedback__return-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: 20px;
}

.phoenixrise-user-feedback__return-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--phoenixrise-hero-accent);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phoenixrise-user-feedback__return-links img {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
  transform: rotate(180deg);
  transition: transform 220ms ease;
}

.phoenixrise-user-feedback__return-links a:hover img,
.phoenixrise-user-feedback__return-links a:focus-visible img {
  transform: translateY(-4px) rotate(180deg);
}

.phoenixrise-user-feedback__return-links a:focus-visible {
  outline: 2px solid var(--phoenixrise-sidebar-active);
  outline-offset: 4px;
}

/* Gratitude demo: a purple sibling of the blue callout */
.phoenixrise-gratitude-stage {
  --gratitude-bg: #efe6fd;
  --gratitude-text: #1f1238;
  --gratitude-icon: #5b2bb8;
  --gratitude-field: #ffffff;
  --gratitude-border: #c9b3f5;
  --gratitude-muted: #645a73;
  --gratitude-error: #b42318;
  --gratitude-button: #7b3fe4;
  --gratitude-button-hover: #6a2fd0;
  /* The pencil matches the scribbled lightbulb (and Auri) in each theme */
  --gratitude-sketch: #065399;
  position: relative;
  /* Clip the plane sideways only, so it stays visible as it rises */
  overflow-x: clip;
  overflow-y: visible;
  padding-top: clamp(36px, 5vw, 64px);
}

:root[data-portfolio-theme="dark"] .phoenixrise-gratitude-stage {
  --gratitude-bg: #241a3d;
  --gratitude-text: #f5f1fa;
  --gratitude-icon: #c9a8ff;
  --gratitude-field: #171128;
  --gratitude-border: #5a4690;
  --gratitude-muted: #b9b0cc;
  --gratitude-error: #ff8a80;
  /* The lightbulb's blue after the dark-mode brightness(2.2) on scribbles */
  --gratitude-sketch: #0db7ff;
}

.phoenixrise-gratitude-stage .phoenixrise-gratitude {
  margin-top: 0;
  background: var(--gratitude-bg);
}

.phoenixrise-gratitude h3,
.phoenixrise-gratitude .phoenixrise-gratitude__label,
.phoenixrise-gratitude__success p {
  color: var(--gratitude-text);
}

.phoenixrise-gratitude__icon {
  display: block;
  width: 24px;
  height: 32px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--gratitude-sketch);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.phoenixrise-gratitude__label {
  display: block;
  margin: 20px 0 0;
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-gratitude__field {
  position: relative;
  margin-top: 12px;
}

.phoenixrise-gratitude__input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px 34px;
  font-family: var(--phoenixrise-font);
  font-size: 17px;
  line-height: 1.5;
}

.phoenixrise-gratitude__input {
  display: block;
  min-height: calc(3 * 1.5em + 46px);
  overflow: hidden;
  border: 1px solid var(--gratitude-border);
  border-radius: 10px;
  color: var(--gratitude-text);
  background: var(--gratitude-field);
  resize: none;
}

.phoenixrise-gratitude__input::placeholder {
  color: var(--gratitude-muted);
  opacity: 1;
}

.phoenixrise-gratitude__input:focus {
  outline: 2px solid var(--gratitude-icon);
  outline-offset: 2px;
}

.phoenixrise-gratitude__input[aria-invalid="true"] {
  border-color: var(--gratitude-error);
}

.phoenixrise-gratitude__count {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: var(--gratitude-muted);
  font-family: var(--phoenixrise-font);
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
}

/* "Just for you..." under the textbox, in the secondary text colour */
.phoenixrise-gratitude .phoenixrise-gratitude__privacy {
  margin: 10px 0 0;
  color: var(--gratitude-muted);
  font-family: var(--phoenixrise-font);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.phoenixrise-gratitude .phoenixrise-gratitude__error {
  min-height: 0;
  margin: 8px 0 0;
  color: var(--gratitude-error);
  font-size: 16px;
}

.phoenixrise-gratitude .phoenixrise-gratitude__error:empty {
  margin: 0;
}

.phoenixrise-gratitude__actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.phoenixrise-gratitude__send {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--gratitude-button);
  font-family: var(--phoenixrise-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    transform 120ms ease;
}

.phoenixrise-gratitude__send:hover {
  background: var(--gratitude-button-hover);
}

.phoenixrise-gratitude__send:active {
  transform: scale(0.97);
}

.phoenixrise-gratitude__send:focus-visible {
  outline: 2px solid var(--gratitude-icon);
  outline-offset: 3px;
}

.phoenixrise-gratitude__send:disabled {
  cursor: default;
}

.phoenixrise-gratitude__plane {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.phoenixrise-gratitude__plane.is-flying {
  position: absolute;
  z-index: 2;
  margin: 0;
  color: var(--gratitude-icon);
  filter: drop-shadow(0 0 2px rgb(255 255 255 / 90%));
  pointer-events: none;
}

/* Auri lands beside the reply, a speech bubble pointing back at Auri */
.phoenixrise-gratitude__reply {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.phoenixrise-gratitude__auri {
  display: block;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  overflow: visible;
  color: var(--gratitude-sketch);
  transform-origin: 50% 55%;
}

/* Each wing beats from its shoulder (in the drawing's own units) */
.phoenixrise-gratitude__wing {
  transform-box: view-box;
}

.phoenixrise-gratitude__wing--left {
  transform-origin: 51px 55px;
}

.phoenixrise-gratitude__wing--right {
  transform-origin: 73px 55px;
}

.phoenixrise-gratitude .phoenixrise-gratitude__reply-card {
  position: relative;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--gratitude-border);
  border-radius: 12px;
  color: var(--gratitude-text);
  background: var(--gratitude-field);
  font-family: var(--phoenixrise-font);
  font-size: 17px;
  line-height: 1.5;
}

.phoenixrise-gratitude__reply-card::before {
  position: absolute;
  top: 50%;
  left: -7px;
  width: 12px;
  height: 12px;
  border-bottom: 1px solid var(--gratitude-border);
  border-left: 1px solid var(--gratitude-border);
  background: inherit;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.phoenixrise-gratitude__success .phoenixrise-user-feedback__return-links {
  margin-top: 16px;
}

/* "Send another" uses the same link style as "Back to my first and third
   solution" */
.phoenixrise-gratitude__reset {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  color: var(--phoenixrise-hero-accent);
  background: none;
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.phoenixrise-gratitude__reset:focus-visible {
  outline: 2px solid var(--phoenixrise-sidebar-active);
  outline-offset: 4px;
}

@media (max-width: 480px) {
  .phoenixrise-gratitude__send {
    width: 100%;
  }
}

.phoenixrise-exploring-solutions .phoenixrise-solution-conclusion {
  margin-top: clamp(24px, 3vw, 40px);
}

.phoenixrise-back-to-solution,
.phoenixrise-exploring-solutions__links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--phoenixrise-hero-accent);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phoenixrise-back-to-solution {
  margin-top: 20px;
}

.phoenixrise-back-to-solution img,
.phoenixrise-exploring-solutions__links img {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
  transition: transform 220ms ease;
}

.phoenixrise-back-to-solution img {
  transform: rotate(180deg);
}

.phoenixrise-back-to-solution:hover img,
.phoenixrise-back-to-solution:focus-visible img {
  transform: translateY(-4px) rotate(180deg);
}

.phoenixrise-exploring-solutions__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}

.phoenixrise-exploring-solutions__links a:hover img,
.phoenixrise-exploring-solutions__links a:focus-visible img {
  transform: translateY(4px);
}

.phoenixrise-back-to-solution:focus-visible,
.phoenixrise-exploring-solutions__links a:focus-visible {
  outline: 2px solid var(--phoenixrise-sidebar-active);
  outline-offset: 4px;
}

.phoenixrise-solution__features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(40px, 5vw, 68px);
}

.phoenixrise-solution-card {
  min-width: 0;
}

.phoenixrise-solution-card__image {
  display: block;
  width: min(100%, 300px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

#phoenixrise-solution2-image {
  scroll-margin-top: 84px;
}

#phoenixrise-solution1-image,
#phoenixrise-solution3-image {
  scroll-margin-top: 84px;
}

.phoenixrise-solution-card h3 {
  margin: 28px 0 24px;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-solution-card p {
  margin: 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-solution-card__reasoning {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--phoenixrise-hero-accent);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phoenixrise-solution-card__reasoning img {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
  transition: transform 220ms ease;
}

.phoenixrise-solution-card__reasoning:hover img,
.phoenixrise-solution-card__reasoning:focus-visible img {
  transform: translateY(4px);
}

.phoenixrise-solution-card__reasoning:focus-visible {
  outline: 2px solid var(--phoenixrise-sidebar-active);
  outline-offset: 4px;
}

.phoenixrise-solution-conclusion {
  width: min(100%, 820px);
  box-sizing: border-box;
  margin: clamp(48px, 6vw, 76px) auto 0;
  padding: 24px;
  border-radius: 10px;
  background: var(--phoenixrise-tint);
}

.phoenixrise-defining-problem .phoenixrise-solution-conclusion {
  margin-top: clamp(24px, 3vw, 40px);
}

.phoenixrise-competitor-analysis .phoenixrise-solution-conclusion {
  margin-top: clamp(24px, 3vw, 40px);
}

.phoenixrise-solution-conclusion__heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.phoenixrise-solution-conclusion__heading img {
  display: block;
  width: 24px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: contain;
}

.phoenixrise-solution-conclusion h3 {
  margin: 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.phoenixrise-solution-conclusion p {
  margin: 20px 0 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 18px;
  line-height: 1.6;
}

.phoenixrise-placeholder {
  min-height: clamp(280px, 38vh, 380px);
  box-sizing: border-box;
  padding: 18px 0 40px;
  scroll-margin-top: 28px;
}

.phoenixrise-placeholder h2 {
  margin: 0 0 14px;
  color: var(--phoenixrise-hero-accent);
  font-family: var(--phoenixrise-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.phoenixrise-placeholder p {
  margin: 0;
  color: var(--phoenixrise-sidebar-text);
  font-family: var(--phoenixrise-font);
  font-size: 14px;
  line-height: 1.6;
}

.phoenixrise-section-nav__panel-inner {
  min-height: 0;
}

.phoenixrise-more-case-studies {
  font-family: var(--phoenixrise-font);
}

.phoenixrise-more-case-studies .portfolio-case-studies {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 36px);
}

.phoenixrise-more-case-studies .portfolio-case-card {
  --portfolio-case-padding: 26px;
  min-height: 345px;
}

.phoenixrise-more-case-studies .portfolio-case-card__eyebrow {
  margin-bottom: 12px;
  font-size: 16px;
}

.phoenixrise-more-case-studies .portfolio-case-card h3 {
  margin-bottom: 12px;
  font-size: clamp(20px, 1.85vw, 22px);
  line-height: 1.35;
}

.phoenixrise-more-case-studies .portfolio-case-card__tags li {
  font-size: 15px;
}

.phoenixrise-more-case-studies .portfolio-case-card--ux-was-here {
  align-self: stretch;
}

@media (max-width: 900px) {
  .phoenixrise-more-case-studies .portfolio-case-studies {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .phoenixrise-more-case-studies .portfolio-case-card {
    min-height: 0;
  }

  .phoenixrise-design-goal {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .phoenixrise-design-rationale__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .phoenixrise-gamification__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .phoenixrise-ai-development__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .phoenixrise-usability-testing__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .phoenixrise-prototype__play {
    width: 60px;
    height: 60px;
  }

  .phoenixrise-prototype__play svg {
    width: 26px;
    height: 26px;
    margin-left: 3px;
  }

  .phoenixrise-design-goal__image {
    width: min(100%, 628px);
    margin: 0 auto;
  }

  .phoenixrise-design-rationale__image {
    width: min(100%, 618px);
    margin: 0 auto;
  }

  .phoenixrise-gamification__image {
    width: min(100%, 619px);
    margin: 0 auto;
  }

  .phoenixrise-ai-development__image {
    width: min(100%, 609px);
    margin: 0 auto;
  }

  .phoenixrise-usability-testing__compare {
    width: min(100%, 620px);
    margin: 0 auto;
  }

  .phoenixrise-solution__features {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .phoenixrise-hero,
  .phoenixrise-case-study {
    width: calc(100% - 40px);
  }

  .phoenixrise-hero {
    padding-top: clamp(38px, 8vw, 56px);
    padding-bottom: 24px;
  }

  .phoenixrise-hero h1 {
    font-size: clamp(42px, 11vw, 56px);
  }

  .phoenixrise-hero__intro p {
    max-width: 600px;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(19px, 5.5vw, 23px);
    line-height: 1.42;
  }

  .phoenixrise-phones-frame {
    height: clamp(210px, 56.15vw, 430px);
    margin-top: 34px;
    overflow: hidden;
  }

  .phoenixrise-phones {
    position: absolute;
    top: 0;
    left: 50%;
    width: 170vw;
    max-width: none;
    transform: translateX(-50%);
  }
}

@media (max-width: 767px) {
  .phoenixrise-case-study {
    display: block;
    width: 100%;
    padding: 0 0 72px;
  }

  .phoenixrise-section-sidebar {
    top: 0;
    z-index: 5;
    max-height: min(100dvh, 100vh);
    overflow: visible;
    scrollbar-width: none;
    padding: 0 20px;
    background: var(--phoenixrise-sidebar-bg);
    backdrop-filter: blur(12px);
  }

  .phoenixrise-section-nav__mobile-toggle {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    border: 0;
    color: var(--phoenixrise-sidebar-text);
    background: transparent;
    font: 600 16px/1.4 var(--phoenixrise-font);
    text-align: left;
    cursor: pointer;
  }

  .phoenixrise-section-nav__mobile-toggle:focus-visible {
    outline: 2px solid var(--phoenixrise-sidebar-active);
    outline-offset: -2px;
  }

  .phoenixrise-section-nav__panel {
    display: grid;
    grid-template-rows: 1fr;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    scrollbar-width: none;
    opacity: 1;
    transition:
      grid-template-rows 240ms ease,
      opacity 180ms ease;
  }

  .phoenixrise-section-nav__panel[data-open="false"] {
    grid-template-rows: 0fr;
    opacity: 0;
  }

  .phoenixrise-section-nav__panel-inner {
    min-height: 0;
  }

  .phoenixrise-section-nav__panel[data-open="false"]
    .phoenixrise-section-nav__panel-inner {
    overflow: hidden;
  }

  .phoenixrise-section-nav__groups {
    padding: 0 0 14px;
  }

  .phoenixrise-section-nav__group + .phoenixrise-section-nav__group,
  .phoenixrise-section-nav__standalone,
  .phoenixrise-section-nav__standalone + .phoenixrise-section-nav__group {
    margin-top: 4px !important;
  }

  .phoenixrise-case-study__content {
    padding: 0 20px;
  }

  .phoenixrise-placeholder {
    min-height: 300px;
    scroll-margin-top: 72px;
  }

  .phoenixrise-background,
  .phoenixrise-report {
    scroll-margin-top: 72px;
  }

  .phoenixrise-opportunity {
    scroll-margin-top: 72px;
  }

  .phoenixrise-solution {
    padding-right: 0;
    padding-left: 0;
    scroll-margin-top: 72px;
  }

  .phoenixrise-defining-problem {
    scroll-margin-top: 72px;
  }

  .phoenixrise-design-goals {
    scroll-margin-top: 72px;
  }

  .phoenixrise-design-rationale {
    scroll-margin-top: 72px;
  }

  .phoenixrise-gamification {
    scroll-margin-top: 72px;
  }

  .phoenixrise-ai-development {
    scroll-margin-top: 72px;
  }
  .phoenixrise-usability-testing,
  .phoenixrise-prototype {
    scroll-margin-top: 72px;
  }

  .phoenixrise-what-i-learned,
  .phoenixrise-future-steps,
  .phoenixrise-references,
  .phoenixrise-more-case-studies {
    scroll-margin-top: 72px;
  }

  .phoenixrise-usability-testing__details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }

  .phoenixrise-user-feedback {
    scroll-margin-top: 72px;
  }

  .phoenixrise-user-flow {
    scroll-margin-top: 72px;
  }

  .phoenixrise-competitor-analysis {
    scroll-margin-top: 72px;
  }

  .phoenixrise-exploring-solutions {
    scroll-margin-top: 72px;
  }

  #phoenixrise-solution2-image {
    scroll-margin-top: 72px;
  }

  .phoenixrise-exploring-solutions__links {
    align-items: flex-start;
    flex-direction: column;
  }

  .phoenixrise-solution__features {
    grid-template-columns: minmax(0, 1fr);
  }

  .phoenixrise-solution-card__image {
    width: min(100%, 300px);
  }

  .phoenixrise-solution-conclusion {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .phoenixrise-navbar .portfolio-nav__links {
    transition: none;
  }

  .phoenixrise-section-nav__group-toggle svg,
  .phoenixrise-section-nav__mobile-toggle svg,
  .phoenixrise-background__prototype-link img,
  .phoenixrise-solution-card__reasoning img,
  .phoenixrise-back-to-solution img,
  .phoenixrise-exploring-solutions__links img,
  .phoenixrise-user-feedback__return-links img,
  .phoenixrise-user-flow__reasoning img,
  .phoenixrise-prototype__play,
  .phoenixrise-section-nav__submenu,
  .phoenixrise-section-nav__panel {
    transition: none;
  }

  .phoenixrise-prototype__play-button[aria-busy="true"] .phoenixrise-prototype__play {
    animation: none;
  }
}

/* ----- "Crack the egg" light mode easter egg (js/phoenixrise-shell.js) ----- */

.portfolio-theme-toggle.is-shelled {
  position: relative;
  overflow: visible;
}

/* Until it cracks open, the egg replaces the purple moon button: no purple
   fill or ring, a neutral focus outline, and a wobble as the hover cue */
.portfolio-theme-toggle.is-shelled,
.portfolio-theme-toggle.is-shelled:hover,
.portfolio-theme-toggle.is-shelled:active {
  background-color: transparent;
  box-shadow: none;
}

.portfolio-theme-toggle.is-shelled > .portfolio-icon {
  visibility: hidden;
}

.portfolio-nav .portfolio-theme-toggle.is-shelled:focus-visible {
  outline: 2px solid #12345e;
  outline-offset: 10px;
}

/* The egg only shows in dark mode, so its outline is light there */
:root[data-portfolio-theme="dark"]
  .portfolio-nav
  .portfolio-theme-toggle.is-shelled:focus-visible {
  outline-color: #f5f1fa;
}

.portfolio-theme-toggle.is-shelled:focus-visible .phoenixrise-shell {
  filter: drop-shadow(0 7px 8px rgb(10 40 80 / 35%));
  animation: phoenixrise-egg-wobble 400ms ease-in-out 1;
}

@media (hover: hover) {
  .portfolio-theme-toggle.is-shelled:hover .phoenixrise-shell {
    filter: drop-shadow(0 7px 8px rgb(10 40 80 / 35%));
    animation: phoenixrise-egg-wobble 400ms ease-in-out 1;
  }
}

@keyframes phoenixrise-egg-wobble {
  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-4deg);
  }

  75% {
    transform: rotate(4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-theme-toggle.is-shelled .phoenixrise-shell,
  .portfolio-theme-toggle.is-shelled:hover .phoenixrise-shell,
  .portfolio-theme-toggle.is-shelled:focus-visible .phoenixrise-shell {
    animation: none;
  }
}

.phoenixrise-shell {
  position: absolute;
  top: -18%;
  left: -12%;
  width: 124%;
  height: 136%;
  overflow: visible;
  filter: drop-shadow(0 3px 5px rgb(10 40 80 / 35%));
  pointer-events: none;
  transform-origin: 50% 85%;
  transition: filter 200ms ease;
}

/* On the dark nav a soft light rim keeps the egg's darker lower half
   distinct from the background */
:root[data-portfolio-theme="dark"] .phoenixrise-shell {
  filter: drop-shadow(0 0 1px rgb(220 240 255 / 55%))
    drop-shadow(0 3px 6px rgb(0 0 0 / 45%));
}

/* Soft gold halo behind the egg, stronger with each tap */
.phoenixrise-shell-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260%;
  aspect-ratio: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 300ms ease;
}

.phoenixrise-shell-halo > span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #ffd27a 0%,
    rgb(255 179 71 / 55%) 30%,
    rgb(255 179 71 / 0%) 70%
  );
}

/* Thin rays of light from the cracks, growing longer with each tap */
.phoenixrise-shell__ray {
  opacity: 0;
  transform: scaleX(0);
  transform-box: fill-box;
  transform-origin: left center;
  transition:
    opacity 300ms ease,
    transform 300ms ease-out;
}

/* A faint warm dawn across the top of the page, centred on the egg */
.phoenixrise-dawn {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: 100%;
  height: max(100vh, 720px);
  background: radial-gradient(
    ellipse 90vw 70vh at var(--egg-x, 50%) var(--egg-y, 0),
    rgb(255 196 110 / 8%) 0%,
    rgb(255 179 71 / 3%) 45%,
    rgb(255 179 71 / 0%) 75%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease;
}

.phoenixrise-dawn.is-shown {
  opacity: 1;
}

/* The gold burst as the egg shatters */
.phoenixrise-burst {
  position: fixed;
  z-index: 2147483001;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgb(255 210 122 / 90%) 0%,
    rgb(255 179 71 / 45%) 40%,
    rgb(255 179 71 / 0%) 70%
  );
  pointer-events: none;
}

.phoenixrise-shell__body,
.phoenixrise-shell__chip,
.phoenixrise-shell-pieces path {
  transform-box: fill-box;
  transform-origin: center;
}

.phoenixrise-shell__cracks path {
  stroke: #12345e;
  stroke-dasharray: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.1;
}

/* Gold light under the dark crack lines, brighter with each tap */
.phoenixrise-shell__glow {
  opacity: 0;
  transition: opacity 300ms ease;
}

.phoenixrise-shell__glow path {
  stroke: #ffc35c;
  stroke-dasharray: 1;
  stroke-linecap: round;
  stroke-width: 3.5;
}

/* Four dots under the button show how many taps are left */
.phoenixrise-shell-dots {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  display: flex;
  gap: 4px;
  transform: translateX(-50%);
  pointer-events: none;
}

.phoenixrise-shell-dots span {
  width: 5px;
  height: 5px;
  box-sizing: border-box;
  border: 1px solid rgb(14 10 28 / 45%);
  border-radius: 50%;
  background: rgb(255 255 255 / 70%);
  transition: background-color 150ms ease;
}

.phoenixrise-shell-dots span.is-filled {
  border-color: #b9761a;
  background: #f5b544;
}

:root[data-portfolio-theme="dark"] .phoenixrise-shell-dots span {
  border-color: rgb(245 241 250 / 55%);
  background: transparent;
}

:root[data-portfolio-theme="dark"] .phoenixrise-shell-dots span.is-filled {
  border-color: #ffd27a;
  background: #ffb347;
}

.phoenixrise-shell-tip {
  position: absolute;
  z-index: 5;
  top: calc(100% + 24px);
  left: 50%;
  display: grid;
  text-align: center;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 7px;
  color: #f5f1fa;
  background: var(--phoenixrise-bubble);
  font-family: var(--phoenixrise-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.portfolio-theme-toggle.is-shelled:hover .phoenixrise-shell-tip,
.portfolio-theme-toggle.is-shelled:focus-visible .phoenixrise-shell-tip {
  opacity: 1;
}

.phoenixrise-shell-pieces {
  position: fixed;
  z-index: 2147483001;
  overflow: visible;
  pointer-events: none;
}

.phoenixrise-ember {
  position: fixed;
  z-index: 2147483002;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #ffe6b0 0%,
    #f5b544 55%,
    rgb(245 140 40 / 0%) 100%
  );
  box-shadow: 0 0 6px rgb(245 181 68 / 55%);
  pointer-events: none;
}

/* Small speech bubble beside the egg; its pointer aims at the egg */
.phoenixrise-toast {
  position: fixed;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 240px;
  box-sizing: border-box;
  padding: 10px 10px 10px 14px;
  border-radius: 10px;
  color: #f5f1fa;
  background: var(--phoenixrise-bubble);
  box-shadow: 0 6px 16px rgb(14 10 28 / 18%);
  font-family: var(--phoenixrise-font);
}

.phoenixrise-toast::before {
  position: absolute;
  width: 0;
  height: 0;
  border: 7px solid transparent;
  content: "";
}

.phoenixrise-toast[data-side="right"]::before {
  top: 50%;
  right: 100%;
  border-right-color: var(--phoenixrise-bubble);
  transform: translateY(-50%);
}

.phoenixrise-toast[data-side="below"]::before {
  bottom: 100%;
  left: var(--pointer-x, 50%);
  border-bottom-color: var(--phoenixrise-bubble);
  transform: translateX(-50%);
}

.phoenixrise-toast__text {
  margin: 0;
  color: #f5f1fa;
  font-family: var(--phoenixrise-font);
  font-size: 14px;
  line-height: 1.45;
}

.phoenixrise-toast__close {
  display: inline-flex;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  margin: -2px -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #c9c3d6;
  background: none;
  cursor: pointer;
}

.phoenixrise-toast__close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.phoenixrise-toast__close:hover {
  background: rgb(255 255 255 / 8%);
}

.phoenixrise-toast__close:focus-visible {
  outline: 2px solid #c9a8ff;
  outline-offset: 2px;
}

/* "Switch to light mode now": off screen until it gets keyboard focus, then
   a small text button just below the egg */
.portfolio-nav__actions {
  position: relative;
}

.phoenixrise-light-skip {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  color: #f5f1fa;
  background: var(--phoenixrise-bubble);
  font: 500 13px/1.35 var(--phoenixrise-font);
  white-space: nowrap;
  cursor: pointer;
}

.phoenixrise-light-skip:not(:focus) {
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.phoenixrise-light-skip:focus-visible {
  outline: 2px solid #12345e;
  outline-offset: 3px;
}

:root[data-portfolio-theme="dark"] .phoenixrise-light-skip:focus-visible {
  outline-color: #f5f1fa;
}

/* Reduced motion: the light still shows with each tap, but appears without
   growing, fading or breathing */
@media (prefers-reduced-motion: reduce) {
  .phoenixrise-shell__glow,
  .phoenixrise-shell__ray,
  .phoenixrise-shell-halo,
  .phoenixrise-dawn {
    transition: none;
  }
}

.portfolio-nav__actions:has(.phoenixrise-light-skip:focus)
  .phoenixrise-shell-tip {
  opacity: 0;
}
/* Narrow screens: the egg sits near the edge, so the tooltip lines up with
   the egg's right side to stay on screen */
@media (max-width: 660px) {
  .phoenixrise-shell-tip {
    right: -6px;
    left: auto;
    transform: none;
  }
}

/* ----- Ask Auri (js/ask-auri.js) -----
   A short conversation with Auri, the app's companion: her greeting, the
   visitor's question as a small right-aligned bubble, her answer with a
   link to the evidence, and three prompts. Auri (on a navy disc so she
   reads on light and dark pages) is the one bold element; the bubbles and
   prompts each have their own quiet treatment. */

/* Hidden for now: the sidebar panel, the phone corner button and its sheet.
   Remove this rule to bring Ask Auri back. */
.auri-companion,
.auri-fab,
.auri-sheet {
  display: none !important;
}

:root {
  --auri-text: #07152d;
  --auri-muted: #5f5a73;
  --auri-bubble: #f6f2fd;
  --auri-bubble-edge: #7f70b0;
  --auri-visitor: #ece6f8;
  --auri-chip-border: #7a68b3;
  --auri-chip-text: #3c2a73;
  --auri-chip-viewed: #5f5a73;
  --auri-link: #7138c8;
  --auri-disc: #13234a;
  --auri-disc-ring: #7f70b0;
  --auri-focus: #7138c8;
  --auri-sheet: #ffffff;
  --auri-backdrop: rgb(14 10 28 / 45%);
}

:root[data-portfolio-theme="dark"] {
  --auri-text: #f5f1fa;
  --auri-muted: #a89fc0;
  --auri-bubble: #1f1838;
  --auri-bubble-edge: #7a6dab;
  --auri-visitor: #2b2247;
  --auri-chip-border: #8e7cc3;
  --auri-chip-text: #e2d9ff;
  --auri-chip-viewed: #a89fc0;
  --auri-link: #c9a8ff;
  /* Dark: the circle shares the speech bubble's surface, with the softer
     border used across the page */
  --auri-disc: var(--auri-bubble);
  --auri-disc-ring: var(--phoenixrise-rule);
  --auri-focus: #c9a8ff;
  --auri-sheet: #171128;
  --auri-backdrop: rgb(4 3 10 / 65%);
}

/* Desktop: the sidebar becomes a column. If it runs out of height the links
   give way and scroll, and the companion keeps its full height (it only
   scrolls itself in a very short window, leaving the links some room) */
@media (min-width: 768px) {
  .phoenixrise-section-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .phoenixrise-section-nav {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .phoenixrise-section-nav__panel {
    max-height: none;
    overflow: visible;
  }

  .auri-companion {
    flex: 0 0 auto;
    max-height: calc(100vh - 40px - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

.auri-companion {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--phoenixrise-rule);
  color: var(--auri-text);
  font-family: var(--phoenixrise-font);
}

.auri-companion__header {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 6px;
  color: var(--auri-text);
  background: transparent;
  font: 600 15px/1.35 var(--phoenixrise-font);
  text-align: left;
  cursor: pointer;
}

.auri-companion__header span:not(.auri-disc) {
  flex: 1 1 auto;
}

.auri-companion__header svg,
.auri-sheet__close svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Points up while open, down when collapsed */
.auri-companion__header[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.auri-companion__body {
  margin-top: 14px;
}

.auri-companion__body[hidden] {
  display: none;
}

/* Auri on a navy disc: her blue and gold read on both themes */
.auri-disc {
  display: inline-grid;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1.5px solid var(--auri-disc-ring);
  border-radius: 50%;
  background: var(--auri-disc);
}

.auri-disc img {
  display: block;
  width: 84%;
  height: auto;
  margin: 0;
}

.auri-disc--small {
  width: 30px;
  height: 30px;
}

.auri-chat__auri {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auri-chat .auri-chat__name {
  margin: 0;
  color: var(--auri-muted);
  font: 400 13px/1.3 var(--phoenixrise-font);
}

/* "Auri", with "PhoenixRise companion" beneath */
.auri-chat__name strong,
.auri-chat__name span {
  display: block;
}

.auri-chat__name strong {
  color: var(--auri-text);
  font-size: 14px;
  font-weight: 700;
}

/* Auri's bubble: outlined, with a tail up toward her */
.auri-bubble--auri {
  position: relative;
  box-sizing: border-box;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--auri-bubble-edge);
  border-radius: 14px;
  color: var(--auri-text);
  background: var(--auri-bubble);
  font: 400 15px/1.55 var(--phoenixrise-font);
}

.auri-bubble--auri::before {
  position: absolute;
  top: -7px;
  left: 18px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--auri-bubble-edge);
  border-left: 1px solid var(--auri-bubble-edge);
  background: var(--auri-bubble);
  content: "";
  transform: rotate(45deg);
}

.auri-chat .auri-bubble--auri p,
.auri-chat p.auri-bubble--auri {
  color: var(--auri-text);
  font: 400 15px/1.55 var(--phoenixrise-font);
}

.auri-chat .auri-bubble--auri p {
  margin: 0;
}

.auri-chat .auri-bubble__link,
.auri-chat .auri-bubble__link:visited {
  display: inline-block;
  margin-top: 10px;
  color: var(--auri-link);
  font: 600 15px/1.4 var(--phoenixrise-font);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.auri-bubble.is-arriving {
  animation: auri-arrive 220ms ease-out;
}

@keyframes auri-arrive {
  from {
    opacity: 0;
  }
}

/* The visitor's question: smaller, quieter, no outline, to the right */
.auri-chat .auri-bubble--visitor {
  width: fit-content;
  max-width: 85%;
  box-sizing: border-box;
  margin: 0 0 14px auto;
  padding: 7px 12px;
  border-radius: 12px 12px 4px 12px;
  color: var(--auri-text);
  background: var(--auri-visitor);
  font: 500 14px/1.45 var(--phoenixrise-font);
}

/* Typing: three dots, only while Auri "writes" (about 0.4s) */
.auri-bubble--typing {
  display: flex;
  width: fit-content;
  gap: 5px;
  padding: 14px 16px;
}

.auri-bubble--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--auri-muted);
  animation: auri-typing 400ms ease-in-out infinite alternate;
}

.auri-bubble--typing span:nth-child(2) {
  animation-delay: 130ms;
}

.auri-bubble--typing span:nth-child(3) {
  animation-delay: 260ms;
}

@keyframes auri-typing {
  to {
    opacity: 0.3;
  }
}

/* Prompts: outlined, stacked and left-aligned for the narrow sidebar */
.auri-chat__prompts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
}

.auri-chip {
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--auri-chip-border);
  border-radius: 10px;
  color: var(--auri-chip-text);
  background: transparent;
  font: 500 14px/1.35 var(--phoenixrise-font);
  text-align: left;
  cursor: pointer;
}

.auri-chip:hover {
  background: var(--auri-visitor);
}

/* Asked already: quieter, with a dashed edge (still 3:1) */
.auri-chip.is-viewed {
  border-style: dashed;
  color: var(--auri-chip-viewed);
}

.auri-chip[aria-current="true"] {
  border-style: solid;
  color: var(--auri-chip-text);
  background: var(--auri-visitor);
}

.auri-companion__header:focus-visible,
.auri-chip:focus-visible,
.auri-chat .auri-bubble__link:focus-visible,
.auri-fab:focus-visible,
.auri-sheet__close:focus-visible {
  outline: 2px solid var(--auri-focus);
  outline-offset: 2px;
}

.auri-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.auri-visually-hidden[hidden] {
  display: none;
}

/* The egg's halo in the header and the hero's phones reach a few pixels
   past a phone screen; clipping them keeps the page (and the fixed corner
   button) the width of the screen. clip, unlike hidden, keeps the sticky
   sidebar working. */
/* (On the root too, or the body's setting passes to the window and stops
   clipping) */
html:has(> body.phoenixrise-page),
.phoenixrise-page {
  overflow-x: clip;
}

/* ----- Phones: a corner button and a bottom sheet ----- */
.auri-fab,
.auri-sheet {
  display: none;
}

@media (max-width: 767px) {
  .auri-companion {
    display: none;
  }

  .auri-fab {
    position: fixed;
    z-index: 40;
    right: 16px;
    bottom: 16px;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  .auri-fab .auri-disc {
    width: 56px;
    height: 56px;
    border-width: 2px;
    box-shadow: 0 6px 16px rgb(14 10 28 / 28%);
  }

  .auri-sheet[open] {
    position: fixed;
    inset: auto 0 0;
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    max-height: 82dvh;
    margin: 0;
    padding: 0 20px 24px;
    overflow-y: auto;
    border: 0;
    border-top: 1px solid var(--phoenixrise-rule);
    border-radius: 18px 18px 0 0;
    color: var(--auri-text);
    background: var(--auri-sheet);
  }

  .auri-sheet::backdrop {
    background: var(--auri-backdrop);
  }

  .auri-sheet__head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 12px;
    background: var(--auri-sheet);
  }

  .auri-sheet .auri-sheet__title {
    margin: 0;
    color: var(--auri-text);
    font: 600 16px/1.35 var(--phoenixrise-font);
  }

  .auri-sheet__close {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    margin: -8px -8px -8px 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--auri-text);
    background: transparent;
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auri-bubble.is-arriving,
  .auri-bubble--typing span {
    animation: none;
  }
}
