/* =========================================================
   Deep Breath Academy — product page
   Accent: magenta / pink (#e11d8c, #f256ec)
   Extends styles.css
   ========================================================= */

.page-academy {
  --accent: #e11d8c;
  --accent-soft: #f256ec;
  --accent-dim: rgba(225, 29, 140, 0.14);
}

/* Header overrides for academy pink accent if needed */
.page-academy .site-header {
  /* Slightly more opaque header treatment to match reference */
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.65) 65%, transparent 100%);
}

.page-academy .login-link {
  color: #d1d5db;
  font-size: 0.93rem;
}

.page-academy .login-link:hover {
  color: #fff;
}

.page-academy .btn-outline {
  border-color: rgba(242, 86, 236, 0.55);
}

.page-academy .btn-outline:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(242, 86, 236, 0.22);
}

/* Use the existing brand gradient (cyan → magenta) — perfect for Academy */
.page-academy .btn-gradient {
  background-image:
    linear-gradient(#0a0a0a, #0a0a0a),
    linear-gradient(100deg, #56ccf2 0%, #9b7cff 48%, #f256ec 100%);
}

.page-academy .btn-gradient:hover {
  box-shadow: 0 0 26px rgba(242, 86, 236, 0.26);
}

.page-academy .btn-gradient .arrow {
  color: #f256ec;
}

/* ---------- HERO ---------- */
.ap-hero {
  position: relative;
  min-height: 100dvh;
  min-height: 100vh;
  background: #000;
  padding-top: var(--header-h);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ap-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.25rem clamp(1.5rem, 5vw, 2.9rem) 2.6rem;
  padding-right: 1rem;
  display: grid;
  grid-template-columns: minmax(540px, 0.98fr) 1fr;
  gap: 1.5rem;
  align-items: center;
}

/* Left column */
.ap-hero-copy {
  max-width: 650px;
}

.ap-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #f256ec;
  text-transform: uppercase;
  margin-bottom: 0.95rem;
}

.ap-kicker .icon {
  width: 15px;
  height: 15px;
  color: #f256ec;
}

.ap-title {
  font-size: clamp(2.15rem, 4.8vw, 3.35rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.032em;
  margin-bottom: 1.05rem;
  color: #fff;
  max-width: 650px; /* Wide 4-line title — always exactly 4 lines thanks to <br>, spans generously on wide screens */
}

.ap-lead {
  font-size: 1.01rem;
  line-height: 1.58;
  color: #a1a1aa;
  max-width: 42ch;
  margin-bottom: 1.45rem;
}

.ap-ctas {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.65rem;
}

.ap-btn-main {
  font-size: 0.98rem;
  padding: 0.72rem 1.35rem;
}

.ap-ctas .btn-outline {
  padding: 0.72rem 1.45rem;
  font-size: 0.95rem;
}

/* Feature badges row */
.ap-features {
  display: flex;
  gap: 1.35rem;
  flex-wrap: wrap;
}

.ap-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.79rem;
  line-height: 1.35;
  color: #a1a1aa;
  max-width: 138px;
}

.ap-feat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: #c026ff;
  margin-top: 1px;
}

.ap-feat-icon .icon {
  width: 16px;
  height: 16px;
}

/* Right column: visual collage - right aligned */
.ap-hero-visual {
  position: relative;
  width: 640px;
  height: 620px;
  margin-left: auto;
  margin-right: 0;
  justify-self: end;
}

/* Floating cards — reuse background/border treatment from main page (eco-preview + hero panels) */
.ap-card {
  position: absolute;
  background: #0a0d17;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  color: #e2e8f0;
  font-size: 0.86rem;
}

/* Product screenshots fill the original card box (do not grow the card) */
.ap-card-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  vertical-align: top;
}

/* Case Review — product screenshot (420 wide, proportional height ~16:9) */
.ap-card--case {
  top: 8px;
  right: 0;
  width: 420px;
  height: auto;
  aspect-ratio: 1672 / 941;
  z-index: 3;
  padding: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.8rem 0.5rem;
  background: #11151f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-head-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-icon {
  font-size: 1rem;
  line-height: 1;
}

.card-title {
  font-weight: 600;
  font-size: 0.87rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.73rem;
  color: #64748b;
  margin-top: 1px;
}

.card-tabs {
  display: flex;
  gap: 2px;
  font-size: 0.68rem;
}

.tab {
  padding: 2px 8px;
  border-radius: 999px;
  color: #64748b;
}

.tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-weight: 600;
}

.case-body {
  padding: 0.6rem 0.75rem 0.65rem;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 0.6rem;
}

.case-patient {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #0b1220;
  height: 100%;
  min-height: 122px;
}

.placeholder-img {
  width: 100%;
  height: 100%;
  min-height: 122px;
  background: #0a0d17;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
}

.play-btn {
  width: 26px;
  height: 26px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 9px;
  padding-left: 1.5px;
  color: #e2e8f0;
}

/* Waveforms */
.waveforms {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wave-row {
  display: grid;
  grid-template-columns: 58px 1fr 52px;
  align-items: center;
  gap: 6px;
}

.wave-info {
  font-size: 0.68rem;
  line-height: 1;
  color: #94a3b8;
}

.wave-name {
  font-weight: 600;
  color: #cbd5e1;
}

.wave-unit {
  font-size: 0.63rem;
  color: #64748b;
}

.wave-plot {
  height: 28px;
  background: #0a0d17;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.wave-plot svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wave-value {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
  color: #e2e8f0;
  line-height: 1.05;
}

.wave-val-label {
  display: block;
  font-size: 0.61rem;
  font-weight: 400;
  color: #64748b;
  margin-top: -1px;
}

/* Time axis */
.wave-time {
  position: relative;
  grid-column: 2 / 3;
  height: 14px;
  margin-top: -2px;
}

.time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.58rem;
  color: #475569;
  padding: 0 2px;
}

.time-cursor {
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 1.5px;
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

/* Protocol / Courses card */
.ap-card--protocol {
  top: 200px;
  right: 200px;
  width: 400px;
  height: 220px;
  z-index: 4;
  padding: 0;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.5);
}

.card-head.compact {
  padding: 0.42rem 0.65rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.protocol-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-track {
  width: 54px;
  height: 3px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, #e11d8c, #f256ec);
  border-radius: 999px;
}

.progress-text {
  font-size: 0.61rem;
  color: #64748b;
}

.protocol-body {
  padding: 0;
  font-size: 0.82rem;
  line-height: 0;
  width: 100%;
  height: 100%;
}

.protocol-body .ap-card-shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.protocol-question {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.55rem;
  color: #e2e8f0;
}

.protocol-options {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 0.55rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  cursor: pointer;
  font-size: 0.81rem;
}

.option.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.option input {
  accent-color: #3b82f6;
  width: 13px;
  height: 13px;
}

.opt-text {
  color: #cbd5e1;
}

.protocol-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.learning-obj {
  flex: 1;
}

.lo-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(147, 51, 234, 0.15);
  color: #c084fc;
  margin-bottom: 2px;
}

.lo-text {
  font-size: 0.69rem;
  line-height: 1.2;
  color: #64748b;
}

.mini-btn {
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: #1a1f2b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  white-space: nowrap;
  cursor: pointer;
}

.mini-btn:hover {
  border-color: rgba(242, 86, 236, 0.4);
}

.protocol-feedback {
  margin-top: 0.4rem;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 0.73rem;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.25;
}

.protocol-feedback.correct {
  background: rgba(16, 185, 129, 0.1);
  color: #4ade80;
}

.protocol-feedback .check {
  font-weight: 700;
  margin-top: 1px;
}

.protocol-feedback .fb-text {
  flex: 1;
  color: #86efac;
}

.protocol-feedback .continue {
  font-size: 0.68rem;
  color: #4ade80;
  white-space: nowrap;
  margin-top: 2px;
}

/* Ventilator Simulator card — 380 wide, proportional height */
.ap-card--sim {
  top: 360px;
  right: 0;
  width: 380px;
  height: auto;
  aspect-ratio: 2000 / 983;
  z-index: 5;
  padding: 0;
  background: #0a0d17;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
}

.sim-screen-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Background decorative glows */
.ap-bg-glows {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
}

.g1 {
  width: 380px;
  height: 380px;
  background: #c026ff;
  right: -80px;
  top: -60px;
}

.g2 {
  width: 260px;
  height: 300px;
  background: #e11d8c;
  right: 120px;
  top: 220px;
}

.g3 {
  width: 210px;
  height: 210px;
  background: #7c5cfc;
  left: 40%;
  top: 55%;
  opacity: 0.16;
}

/* Responsive adjustments */
@media (max-width: 1080px) {
  .ap-hero-inner {
    grid-template-columns: 1fr;
    padding-top: 1.8rem;
  }

  .ap-hero-copy {
    max-width: 100%;
  }

  .ap-hero-visual {
    width: 100%;
    max-width: 100%;
    height: 580px;
    margin: 0 auto;
  }

  .ap-card--case {
    width: min(420px, 92%);
    right: 0;
  }

  .ap-card--protocol {
    width: min(400px, 78%);
    height: 200px;
    right: 160px;
  }

  .ap-card--sim {
    width: min(380px, 88%);
    right: 0;
  }
}

@media (max-width: 720px) {
  .ap-hero-visual {
    height: 420px;
  }

  .ap-card--case,
  .ap-card--protocol,
  .ap-card--sim {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin-bottom: 0.75rem;
  }

  .ap-hero-visual {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .case-body {
    grid-template-columns: 92px 1fr;
  }
}

/* =========================================================
   Academy Story / Screens 02→03 morph (same as research page)
   Text + colors transform on scroll. Challenge (light) → Solution (dark)
   ========================================================= */

/* Viz area for the Academy UI mock */

/* Academy UI mock - dark neon style matching reference + main page dark cards */
.academy-mock {
  background: #0a0d17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  font-size: 0.82rem;
  color: #e2e8f0;
  width: 100%;
  max-width: 620px;
  margin-left: auto;
}

.mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.9rem;
  background: #11151f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

.mock-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mock-logo {
  font-size: 1rem;
}

.mock-header-actions {
  display: flex;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.mock-main {
  display: grid;
  grid-template-columns: 138px 1fr 148px;
  gap: 0.5rem;
  padding: 0.6rem;
}

.mock-sidebar {
  background: #11151f;
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.72rem;
}

.mock-search {
  background: #1a1f2b;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.4rem;
  color: #64748b;
}

.mock-case {
  padding: 0.25rem 0.35rem;
  margin-bottom: 0.15rem;
  border-radius: 4px;
  cursor: default;
}

.mock-case.active {
  background: rgba(242, 86, 236, 0.15);
  border: 1px solid rgba(242, 86, 236, 0.3);
}

.mock-case small {
  display: block;
  color: #64748b;
  font-size: 0.65rem;
}

.mock-view-all {
  font-size: 0.65rem;
  color: #f256ec;
  margin-top: 0.3rem;
}

.mock-player {
  background: #11151f;
  border-radius: 8px;
  overflow: hidden;
}

.mock-case-header {
  padding: 0.35rem 0.5rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.mock-badge {
  background: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
  font-size: 0.6rem;
  padding: 0 0.35rem;
  border-radius: 999px;
}

.mock-video {
  position: relative;
  background: #0a0e1a;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mock-patient {
  text-align: center;
  color: #64748b;
  font-size: 0.8rem;
}

.mock-patient .patient-icon {
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
}

.mock-patient .patient-label {
  font-size: 0.7rem;
  line-height: 1.2;
}

.mock-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.play-circle {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #56ccf2, #f256ec);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 0 0 6px rgba(242, 86, 236, 0.2);
}

.mock-video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
}

.mock-sim {
  background: #11151f;
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.7rem;
}

.mock-sim-header {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.mock-settings > div {
  margin-bottom: 0.2rem;
}

.mock-wave-small svg {
  width: 100%;
  height: 22px;
}

.mock-trends {
  margin-top: 0.4rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 0.3rem;
}

.mock-trend-header {
  font-size: 0.65rem;
  color: #64748b;
}

.mock-trend-line {
  height: 18px;
  background: linear-gradient(90deg, transparent, #a78bfa);
  border-radius: 2px;
  margin-top: 0.2rem;
}

.mock-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  padding: 0.4rem 0.6rem;
  background: #11151f;
  font-size: 0.68rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.mock-checklist label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mock-float {
  position: absolute;
  width: 32px;
  height: 32px;
  background: #0a0d17;
  border: 1px solid rgba(242, 86, 236, 0.4);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  z-index: 3;
}

.mock-float-doc { top: 15%; right: -8px; }
.mock-float-book { top: 38%; right: -18px; }
.mock-float-wave { top: 58%; right: -4px; }
.mock-float-shield { top: 78%; right: -14px; }





.mini-doc {
  top: 8px;
  right: 20px;
  width: 52px;
  height: 62px;
}

.mini-doc .mini-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.mini-doc .mini-lines span {
  height: 3px;
  background: #e2e8f0;
  border-radius: 2px;
}
.mini-doc .mini-lines span:nth-child(1) { width: 70%; }
.mini-doc .mini-lines span:nth-child(2) { width: 90%; }
.mini-doc .mini-lines span:nth-child(3) { width: 55%; }

.mini-check {
  top: 55px;
  right: 95px;
  width: 68px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
}
.check-item .check {
  color: #22c55e;
  font-weight: 700;
}
.check-item span:last-child {
  flex: 1;
  height: 3px;
  background: #e2e8f0;
  border-radius: 2px;
}

.mini-graph {
  top: 5px;
  right: 115px;
  width: 72px;
  height: 38px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-graph-svg {
  width: 100%;
  height: 100%;
}

.mini-person {
  top: 78px;
  left: 105px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #a78bfa, #f256ec);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.mini-person .mini-icon {
  width: 22px;
  height: 22px;
}

.mini-shield {
  top: 115px;
  right: 45px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.mini-shield .mini-icon {
  width: 18px;
  height: 18px;
  color: #f256ec;
}

.mini-list {
  top: 135px;
  left: 55px;
  width: 48px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mini-list-item {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
}
.mini-list-item.checked {
  background: linear-gradient(90deg, #f256ec, #a78bfa);
}

/* =========================================================
   Screen 2: The Challenge (light)
   Reuses main page: fonts, .research-kicker style, .research-card / .eco-card 
   (white bg + border + radius + shadow), light section bg, typography.
   Academy accent: pink/magenta gradient for kicker bar and icons.
   ========================================================= */

.ap-challenge {
  background: #f4f7fb;
  padding: 4rem clamp(1.25rem, 4vw, 2.75rem) 2.5rem;
  min-height: 820px; /* laptop screen height feel */
}

.ap-challenge-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.ap-challenge-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 1fr;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.ap-challenge-text {
  max-width: 42ch;
}

.ap-challenge .ap-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.ap-kicker-bar {
  display: inline-block;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(100deg, #56ccf2 0%, #9b7cff 45%, #f256ec 100%);
}

.ap-section-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #0f172a;
  margin-bottom: 0.85rem;
}

.ap-section-lead {
  font-size: clamp(1.1rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: #64748b;
}

/* Right decorative visual - product / story illustrations */
.ap-challenge-visual {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.ap-story-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ap-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mini-card {
  position: absolute;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  z-index: 2;
  font-size: 0.68rem;
  padding: 6px 7px;
}

.mini-doc { width: 48px; height: 56px; }
.mini-doc .mini-doc-lines { display: flex; flex-direction: column; gap: 3px; padding-top: 3px; }
.mini-doc .mini-doc-lines span { height: 2.5px; background: #e2e8f0; border-radius: 2px; }
.mini-doc .mini-doc-lines span:nth-child(1) { width: 60%; }
.mini-doc .mini-doc-lines span:nth-child(2) { width: 82%; }
.mini-doc .mini-doc-lines span:nth-child(3) { width: 48%; }

.mini-checklist { width: 58px; }
.mini-check { display: flex; align-items: center; gap: 3px; margin-bottom: 2px; }
.mini-check-icon { color: #22c55e; font-size: 0.65rem; line-height: 1; }
.mini-check .mini-line { flex: 1; height: 2px; background: #e2e8f0; border-radius: 1px; }

.mini-graph { width: 62px; height: 30px; display: flex; align-items: center; justify-content: center; }

.mini-person {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: #f1f5f9;
  border-radius: 999px;
  color: #64748b;
}

.mini-shield {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 7px;
}

.mini-list { width: 42px; padding: 3px 4px; }
.mini-list-row { height: 2.5px; background: #e2e8f0; border-radius: 1px; margin-bottom: 2px; }
.mini-list-row.checked { background: #f256ec; }

/* Cards used in story morph (now placed via .ap-feat-row grids to exactly match research screens 2/3) */
.ap-ch-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  font-size: 0.92rem; /* match site body / card copy (~0.9–0.95rem) */
  line-height: 1.45;
  color: #334155;
}

.ap-ch-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: #fff;
}

.ap-ch-card strong {
  color: #0f172a;
  font-weight: 700;
}

/* Responsive for feat rows — mobile handled in .ap-story block below */

/* =========================================================
   Screen 3: The Solution (dark theme)
   Same layout/structure as Screen 2 (Challenge), but dark.
   Texts taken directly from reference image.
   Reuses fonts, spacing, card patterns from main page + challenge screen.
   ========================================================= */

.ap-solution {
  background: #000;
  color: #fff;
  padding: 4rem clamp(1.25rem, 4vw, 2.75rem) 2.5rem;
  min-height: 820px;
}

.ap-solution-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.ap-solution-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.ap-solution-text {
  max-width: 42ch;
}

.ap-solution .ap-kicker {
  color: #a1a1aa;
}

.ap-solution .ap-kicker-bar {
  background: linear-gradient(100deg, #56ccf2 0%, #9b7cff 45%, #f256ec 100%);
}

.ap-solution .ap-section-title {
  color: #fff;
}

.ap-solution .ap-section-lead {
  color: #a1a1aa;
}

/* Big Academy UI screenshot */
.ap-solution-visual {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  background: #0a0d17;
}

.ap-solution-visual .ap-story-shot {
  object-position: center top;
}

.solution-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.solution-mock {
  background: #0a0d17;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  font-size: 0.72rem;
  color: #e2e8f0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  background: #11151f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
  font-size: 0.78rem;
}

.mock-brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mock-logo-icon {
  font-size: 0.9rem;
}

.mock-header-icons {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.mock-body {
  display: grid;
  grid-template-columns: 110px 1fr 120px;
  gap: 0.4rem;
  padding: 0.5rem;
  flex: 1;
  min-height: 0;
}

.mock-sidebar {
  background: #11151f;
  border-radius: 6px;
  padding: 0.35rem;
  font-size: 0.62rem;
  display: flex;
  flex-direction: column;
}

.mock-search {
  background: #1a1f2b;
  border-radius: 4px;
  padding: 0.2rem 0.35rem;
  margin-bottom: 0.3rem;
  color: #64748b;
  font-size: 0.58rem;
}

.mock-case-list {
  flex: 1;
  font-size: 0.6rem;
}

.mock-case-item {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem 0.25rem;
  border-radius: 3px;
  margin-bottom: 0.1rem;
}

.mock-case-item.active {
  background: rgba(242, 86, 236, 0.15);
}

.mock-case-item small {
  display: block;
  color: #64748b;
  font-size: 0.52rem;
}

.mock-view-all {
  font-size: 0.55rem;
  color: #f256ec;
  margin-top: auto;
  padding-top: 0.2rem;
}

.mock-player {
  background: #11151f;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mock-case-header {
  padding: 0.25rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mock-badge {
  background: rgba(167, 139, 250, 0.25);
  color: #a78bfa;
  font-size: 0.52rem;
  padding: 0 0.25rem;
  border-radius: 999px;
}

.mock-video {
  position: relative;
  background: #0a0e1a;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-patient {
  text-align: center;
  color: #64748b;
  font-size: 0.6rem;
}

.mock-patient .patient-icon {
  font-size: 1.6rem;
}

.mock-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-circle {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #56ccf2, #f256ec);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.7rem;
}

.mock-scrubber {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  padding: 0.15rem 0.35rem;
  font-size: 0.52rem;
}

.mock-simulator {
  background: #11151f;
  border-radius: 6px;
  padding: 0.35rem;
  font-size: 0.6rem;
  display: flex;
  flex-direction: column;
}

.sim-header {
  font-weight: 600;
  margin-bottom: 0.2rem;
  font-size: 0.62rem;
}

.sim-settings {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.58rem;
}

.setting {
  display: flex;
  justify-content: space-between;
}

.setting-wave {
  margin-top: 0.15rem;
}

.sim-trends {
  margin-top: auto;
  padding-top: 0.2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.trends-label {
  font-size: 0.52rem;
  color: #64748b;
}

.trends-graph {
  height: 14px;
  background: linear-gradient(90deg, transparent, #a78bfa);
  border-radius: 2px;
  margin-top: 0.15rem;
}

.mock-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
  padding: 0.3rem 0.45rem;
  background: #11151f;
  font-size: 0.58rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.mock-checklist label {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

/* Floating icons */
.mock-float {
  position: absolute;
  width: 26px;
  height: 26px;
  background: #0a0d17;
  border: 1px solid rgba(242, 86, 236, 0.4);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  z-index: 3;
}

.mock-float-doc { top: 12%; right: -6px; }
.mock-float-book { top: 35%; right: -14px; }
.mock-float-wave { top: 55%; right: -3px; }
.mock-float-shield { top: 75%; right: -10px; }

/* Solution cards (dark) - placed in feat rows like research */
.ap-sol-card {
  background: #11151f;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-size: 0.92rem; /* match site body / card copy (~0.9–0.95rem) */
  line-height: 1.45;
  color: #e2e8f0;
}

.ap-sol-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: #fff;
}

.ap-sol-card strong {
  color: #fff;
  font-weight: 700;
}

/* Responsive already handled by feat-row rules above for solution too */


/* =========================================================
   Academy Story (Challenge → Solution) - exactly same as research rp-story
   ========================================================= */
.ap-story {
  --story-t: 0; /* 0 = challenge light, 1 = solution dark */
  position: relative;
  height: 320vh;
}

.ap-story-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding:
    calc(var(--header-h) + 0.75rem)
    clamp(1.25rem, 4vw, 2.75rem)
    1.5rem;
  overflow: hidden;
}

.ap-story-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Light challenge → dark solution (fixed so at t=0 it's fully bright/light) */
  background:
    radial-gradient(
      900px 500px at 70% 35%,
      rgba(242, 86, 236, calc(0 + var(--story-t) * 0.16)),
      transparent 55%
    ),
    linear-gradient(
      180deg,
      rgb(
        calc(244 + (0 - 244) * var(--story-t)),
        calc(247 + (0 - 247) * var(--story-t)),
        calc(251 + (0 - 251) * var(--story-t))
      ) 0%,
      rgb(
        calc(236 + (10 - 236) * var(--story-t)),
        calc(242 + (12 - 242) * var(--story-t)),
        calc(255 + (18 - 255) * var(--story-t))
      ) 100%
    );
  transition: none;
}

.ap-story-inner {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.25fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
  height: 960px; /* room for 320px middle visual + top/bottom card rows */
}

.ap-story-copy {
  position: relative;
  min-height: 22rem;
  max-width: 42ch;
}

.ap-story-layer {
  transition: none;
  will-change: opacity;
}

.ap-story-layer--challenge {
  position: relative;
  opacity: 1;
}

.ap-story-layer--solution {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.ap-story-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.ap-story-badge--challenge {
  color: #64748b;
}

.ap-story-badge--solution {
  color: #f256ec;
}

.ap-story-title {
  font-size: clamp(2.8rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 0.85rem;
}

.ap-story-title--challenge {
  color: #0f172a;
}

.ap-story-title--solution {
  color: #fff;
}

.ap-story-lead {
  font-size: clamp(1.15rem, 1.5vw, 1.25rem);
  line-height: 1.55;
}

.ap-story-lead--challenge {
  color: #64748b;
}

.ap-story-lead--solution {
  color: #a1a1aa;
}

/* Right viz - two overlaid states (sandwich like research: top row / image / bottom row) */
.ap-story-viz {
  position: relative;
  height: 100%;
}

.ap-viz-challenge,
.ap-viz-solution {
  position: absolute;
  inset: 0;
  transition: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem; /* exact match to research .rp-story-viz */
  justify-content: center; /* center the top/image/bottom sandwich block vertically within the area (balanced like research) */
}

.ap-viz-challenge {
  opacity: calc(1 - var(--story-t, 0));
  z-index: 1;
}

.ap-viz-solution {
  opacity: var(--story-t, 0);
  z-index: 2;
}

/* Visual (image) in the middle of the sandwich */
.ap-viz-challenge .ap-challenge-visual,
.ap-viz-solution .ap-solution-visual {
  height: 320px;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
}

.ap-viz-solution .ap-solution-visual .solution-mock {
  height: 100%;
}

/* Exact research feat-row sandwich layout for cards + image */
.ap-feat-row {
  display: grid;
  gap: 0.75rem;
}

.ap-feat-row--top {
  grid-template-columns: 1fr 1fr;
}

.ap-feat-row--bottom {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Cards inside feat rows fill the grid cells (full width of their column) */
.ap-feat-row .ap-ch-card,
.ap-feat-row .ap-sol-card {
  width: 100%;
  box-sizing: border-box;
}

/* ---------- Story morph: mobile (cards only, keep scroll transform) ---------- */
@media (max-width: 960px) {
  .ap-story-sticky {
    align-items: flex-start;
    padding-top: calc(var(--header-h) + 0.5rem);
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }

  .ap-story-inner {
    grid-template-columns: 1fr;
    height: auto;
    max-height: calc(100dvh - var(--header-h) - 1rem);
    min-height: 0;
    gap: 0.85rem;
    align-content: start;
    overflow: hidden;
  }

  .ap-story-copy {
    min-height: 0;
    max-width: none;
  }

  .ap-story-title {
    font-size: clamp(1.55rem, 5.5vw, 2.15rem);
    margin-bottom: 0.5rem;
  }

  .ap-story-lead {
    font-size: 0.9rem;
    line-height: 1.45;
    /* Keep copy short on small screens so cards fit */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .ap-story-badge {
    margin-bottom: 0.45rem;
  }

  /* Hide middle sandwich visuals — cards only on mobile */
  .ap-challenge-visual,
  .ap-solution-visual,
  .ap-viz-challenge .ap-challenge-visual,
  .ap-viz-solution .ap-solution-visual {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    overflow: hidden;
  }

  /*
   * Stack challenge/solution card layers in one grid cell so
   * opacity morph still works and height is driven by content.
   */
  .ap-story-viz {
    position: relative;
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ap-viz-challenge,
  .ap-viz-solution {
    position: relative;
    grid-area: 1 / 1;
    inset: auto;
    gap: 0.55rem;
    justify-content: flex-start;
    min-height: 0;
  }

  .ap-feat-row {
    gap: 0.5rem;
  }

  /* 2 + 3 cards → single column list on narrow screens */
  .ap-feat-row--top,
  .ap-feat-row--bottom {
    grid-template-columns: 1fr;
  }

  .ap-ch-card,
  .ap-sol-card {
    padding: 0.7rem 0.8rem;
    font-size: 0.84rem;
    line-height: 1.35;
    gap: 0.55rem;
  }

  .ap-ch-icon,
  .ap-sol-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
}

@media (max-width: 560px) {
  .ap-story-title br {
    display: none; /* allow title to wrap naturally */
  }

  .ap-story-lead {
    -webkit-line-clamp: 2;
    font-size: 0.86rem;
  }

  .ap-ch-card,
  .ap-sol-card {
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
  }
}

/* =========================================================
   How it works — light section (after story morph)
   Type scale aligned with homepage ecosystem / research cards
   ========================================================= */
.ap-how {
  position: relative;
  background:
    radial-gradient(900px 420px at 78% 18%, rgba(242, 86, 236, 0.06), transparent 55%),
    radial-gradient(700px 380px at 18% 80%, rgba(86, 204, 242, 0.06), transparent 55%),
    #f4f7fb;
  padding: clamp(4rem, 8vh, 5.5rem) 0 clamp(4.5rem, 9vh, 6rem);
  overflow: hidden;
}

.ap-how-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.75rem);
}

/* ---- Top: copy + diagram ---- */
.ap-how-top {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 5vh, 3.5rem);
}

.ap-how-copy {
  max-width: 28rem;
}

.ap-how-kicker {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.ap-how-kicker-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e11d8c;
}

.ap-how-kicker-bar {
  display: block;
  width: 2.75rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #56ccf2 0%, #9b7cff 48%, #f256ec 100%);
}

.ap-how-title {
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: #0f172a;
  margin-bottom: 1rem;
}

.ap-how-lead {
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.6;
  color: #64748b;
  max-width: 28rem;
}

/* ---- Flow diagram ---- */
.ap-how-diagram {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.ap-how-sources {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex-shrink: 0;
}

.ap-how-src {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 0.65rem 0.75rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  width: 128px;
  text-align: center;
}

.ap-how-src span {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  color: #475569;
}

.ap-how-src-img {
  width: 96px;
  height: 88px;
  display: grid;
  place-items: center;
}

.ap-how-src-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ap-how-src-img--vent {
  height: 96px;
}

.ap-how-flow-line {
  flex: 0 0 auto;
  width: 18px;
  height: 0;
  border-top: 1.5px dashed rgba(124, 92, 252, 0.45);
  position: relative;
}

.ap-how-flow-line--src {
  width: 22px;
}

.ap-how-hub {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 28px rgba(124, 92, 252, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ap-how-hub img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.ap-how-platform {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 280px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 0.7rem 0.75rem 0.65rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.ap-how-plat-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
}

.ap-how-plat-head img {
  width: 16px;
  height: 18px;
}

.ap-how-plat-body {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.45rem;
}

.ap-how-plat-side {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.2rem;
}

.ap-how-plat-side .dot {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: #eef2ff;
  border: 1px solid rgba(124, 92, 252, 0.2);
}

.ap-how-plat-main {
  min-width: 0;
}

.ap-how-plat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.ap-how-plat-search {
  height: 18px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 0.45rem;
}

.ap-how-plat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.ap-how-plat-tile {
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(86, 204, 242, 0.08), rgba(242, 86, 236, 0.08));
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.ap-how-plat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.ap-how-plat-tags span {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #7c5cfc;
  background: rgba(124, 92, 252, 0.08);
  border-radius: 999px;
  padding: 0.18rem 0.4rem;
  white-space: nowrap;
}

.ap-how-flow-node {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(124, 92, 252, 0.25);
  box-shadow: 0 6px 16px rgba(124, 92, 252, 0.1);
  display: grid;
  place-items: center;
  color: #7c5cfc;
  flex-shrink: 0;
}

.ap-how-outputs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
  width: 168px;
}

.ap-how-out {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 0.5rem 0.65rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.ap-how-out-ico {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(124, 92, 252, 0.08);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ap-how-out strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.ap-how-out-bar {
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 0.25rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.55), rgba(242, 86, 236, 0.25));
}

/* =========================================================
   Step cards — equal height, consistent text alignment
   ========================================================= */
.ap-how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* 4 equal cards + 3 narrow arrow columns */
  grid-template-columns:
    minmax(0, 1fr) auto
    minmax(0, 1fr) auto
    minmax(0, 1fr) auto
    minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
}

.ap-how-step {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  /* Match homepage eco-card padding */
  padding: 1.35rem 1.25rem 1.25rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
  /*
   * Layout (matches reference):
   *   [icon]  1. Title (2-line reserved)
   *           body…
   * Equal card heights via grid parent; shared row tracks keep
   * icon/title/body tops aligned across the 4 cards.
   */
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 0.85rem;
  row-gap: 0.75rem;
  align-content: start;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}

.ap-how-step-icon {
  grid-column: 1;
  grid-row: 1;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #7c5cfc;
  background: rgba(124, 92, 252, 0.1);
  flex-shrink: 0;
  align-self: start;
}

.ap-how-step-icon .icon {
  width: 22px;
  height: 22px;
}

.ap-how-step-title {
  grid-column: 2;
  grid-row: 1;
  /* Match eco-card h3 */
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
  align-self: center;
  /* Reserve 2 lines so card 1/2/4 titles don't shift body start vs card 3 */
  min-height: calc(1.3em * 2);
}

.ap-how-step-n {
  color: #7c5cfc;
  font-weight: 700;
  margin-right: 0.15em;
}

.ap-how-step-body {
  /* Align under title column so left edge matches title (not under icon) */
  grid-column: 2;
  grid-row: 2;
  /* Match site body (~0.92–0.95rem) */
  font-size: 0.92rem;
  line-height: 1.55;
  color: #64748b;
  margin: 0;
  /* Body starts on same baseline across all 4 cards */
}

/* Arrow connectors between cards — vertically centered to card mid */
.ap-how-step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  position: relative;
  align-self: center;
}

.ap-how-step-arrow::before,
.ap-how-step-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  border-top: 1.5px dashed rgba(124, 92, 252, 0.4);
}

.ap-how-step-arrow::before {
  right: calc(50% + 12px);
}

.ap-how-step-arrow::after {
  left: calc(50% + 12px);
}

.ap-how-arrow-pill {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid rgba(124, 92, 252, 0.35);
  box-shadow: 0 4px 12px rgba(124, 92, 252, 0.1);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.ap-how-arrow-chev {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: #7c5cfc;
  transform: translateX(0.5px);
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .ap-how-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .ap-how-copy {
    max-width: 36rem;
  }

  .ap-how-diagram {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
}

@media (max-width: 960px) {
  .ap-how-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .ap-how-step-arrow {
    display: none;
  }

  .ap-how-step-title {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .ap-how-steps {
    grid-template-columns: 1fr;
  }

  .ap-how-diagram {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.75rem;
  }

  .ap-how-flow-line {
    display: none;
  }

  .ap-how-sources {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .ap-how-outputs {
    width: 100%;
    max-width: 280px;
  }

  .ap-how-platform {
    max-width: 100%;
  }
}
